Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
hg-smart
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
platform
hg-smart
Commits
ef8e87bc
Commit
ef8e87bc
authored
Sep 02, 2024
by
liuyang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://git.pseer.com:8800/platform/hg-smart
into dev-ly
parents
fc350c39
8de5987c
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
191 additions
and
108 deletions
+191
-108
DcOpenApi.java
.../com/baosight/hggp/core/extapp/decheng/api/DcOpenApi.java
+4
-5
DcApiUtils.java
...m/baosight/hggp/core/extapp/decheng/utils/DcApiUtils.java
+16
-7
ServiceHGCG003B.java
...java/com/baosight/hggp/hg/cg/service/ServiceHGCG003B.java
+4
-6
HGSqlConstant.java
...ain/java/com/baosight/hggp/hg/constant/HGSqlConstant.java
+2
-0
HgScSqlConstant.java
...ava/com/baosight/hggp/hg/sc/constant/HgScSqlConstant.java
+2
-0
ServiceHGSC101.java
.../java/com/baosight/hggp/hg/sc/service/ServiceHGSC101.java
+12
-10
HGSC001.xml
src/main/java/com/baosight/hggp/hg/sc/sql/HGSC001.xml
+40
-29
HGSCTools.java
src/main/java/com/baosight/hggp/hg/sc/tools/HGSCTools.java
+60
-10
ServiceHGXSOrg.java
.../java/com/baosight/hggp/hg/xs/service/ServiceHGXSOrg.java
+14
-14
ServiceHGXSUser.java
...java/com/baosight/hggp/hg/xs/service/ServiceHGXSUser.java
+9
-10
HGXSOrg.xml
src/main/java/com/baosight/hggp/hg/xs/sql/HGXSOrg.xml
+1
-2
HGXSUser.xml
src/main/java/com/baosight/hggp/hg/xs/sql/HGXSUser.xml
+19
-7
HGXSTools.java
src/main/java/com/baosight/hggp/hg/xs/tools/HGXSTools.java
+2
-2
HGCG002A.jsp
src/main/webapp/HG/CG/HGCG002A.jsp
+1
-1
HGCG003B.js
src/main/webapp/HG/CG/HGCG003B.js
+0
-1
HGCG003B.jsp
src/main/webapp/HG/CG/HGCG003B.jsp
+5
-4
No files found.
src/main/java/com/baosight/hggp/core/extapp/decheng/api/DcOpenApi.java
View file @
ef8e87bc
...
...
@@ -16,7 +16,6 @@ import com.baosight.hggp.util.StringUtils;
import
com.baosight.iplat4j.core.exception.PlatException
;
import
java.io.IOException
;
import
java.util.List
;
import
lombok.extern.slf4j.Slf4j
;
...
...
@@ -50,8 +49,8 @@ public class DcOpenApi {
*
* @param pageIndex 当前页
*/
public
static
Pager
<
DcUserList
>
userList
(
int
pageIndex
)
throws
IOException
,
InstantiationException
,
IllegalAccessException
{
public
static
Pager
<
DcUserList
>
userList
(
int
pageIndex
)
throws
IOException
,
InstantiationException
,
IllegalAccessException
{
JSONObject
paramJson
=
DcApiUtils
.
buildParamJson
(
pageIndex
);
String
result
=
HttpUtils
.
post
(
DeChengConst
.
USER_LIST
,
DcApiUtils
.
buildHeader
(),
JSON
.
toJSONString
(
paramJson
),
HttpUtils
.
JSON_MEDIA_TYPE
);
...
...
@@ -84,7 +83,7 @@ public class DcOpenApi {
* @param endTime 结束日期 20240820
* @param pageIndex 当前页
*/
public
static
List
<
DcChance
>
chanceList
(
String
startTime
,
String
endTime
,
int
pageIndex
)
throws
IOException
{
public
static
Pager
<
DcChance
>
chanceList
(
String
startTime
,
String
endTime
,
int
pageIndex
)
throws
IOException
{
JSONArray
dataJsons
=
new
JSONArray
();
dataJsons
.
add
(
DcApiUtils
.
buildValueJson
(
"a_date_0"
,
startTime
));
dataJsons
.
add
(
DcApiUtils
.
buildValueJson
(
"a_date_1"
,
endTime
));
...
...
@@ -103,7 +102,7 @@ public class DcOpenApi {
*
* @param pageIndex 当前页
*/
public
static
List
<
DcContractList
>
contactList
(
int
pageIndex
)
throws
IOException
{
public
static
Pager
<
DcContractList
>
contactList
(
int
pageIndex
)
throws
IOException
{
JSONArray
dataJsons
=
new
JSONArray
();
dataJsons
.
add
(
DcApiUtils
.
buildValueJson
(
"pageindex"
,
pageIndex
));
dataJsons
.
add
(
DcApiUtils
.
buildValueJson
(
"pagesize"
,
100
));
...
...
src/main/java/com/baosight/hggp/core/extapp/decheng/utils/DcApiUtils.java
View file @
ef8e87bc
...
...
@@ -191,12 +191,24 @@ public class DcApiUtils {
* @param result
* @return
*/
public
static
<
T
>
List
<
T
>
handleResult
(
String
result
,
Class
<
T
>
clazz
)
{
public
static
<
T
>
Pager
<
T
>
handleResult
(
String
result
,
Class
<
T
>
clazz
)
{
JSONObject
resultJson
=
JSONObject
.
parseObject
(
result
);
// 异常处理
handleMessage
(
resultJson
);
// 获取结果数据集
JSONObject
bodyJson
=
resultJson
.
getJSONObject
(
"body"
);
JSONObject
sourceJson
=
bodyJson
.
getJSONObject
(
"source"
);
JSONObject
tableJson
=
sourceJson
.
getJSONObject
(
"table"
);
// 构建结果数据集
return
buildTableData
(
resultJson
,
clazz
);
Pager
pager
=
new
Pager
<
T
>();
pager
.
setData
(
buildTableData
(
tableJson
,
clazz
));
// 分页数据
JSONObject
pageJson
=
tableJson
.
getJSONObject
(
"page"
);
pager
.
setPageIndex
(
pageJson
.
getInteger
(
"pageindex"
));
pager
.
setPageSize
(
pageJson
.
getInteger
(
"pagesize"
));
pager
.
setTotalRows
(
pageJson
.
getInteger
(
"recordcount"
));
pager
.
setTotalPages
(
pageJson
.
getInteger
(
"pagecount"
));
return
pager
;
}
/**
...
...
@@ -221,15 +233,12 @@ public class DcApiUtils {
/**
* 构建数据集
*
* @param
result
Json
* @param
table
Json
* @param clazz
* @param <T>
* @return
*/
public
static
<
T
>
List
<
T
>
buildTableData
(
JSONObject
resultJson
,
Class
<
T
>
clazz
)
{
JSONObject
bodyJson
=
resultJson
.
getJSONObject
(
"body"
);
JSONObject
sourceJson
=
bodyJson
.
getJSONObject
(
"source"
);
JSONObject
tableJson
=
sourceJson
.
getJSONObject
(
"table"
);
public
static
<
T
>
List
<
T
>
buildTableData
(
JSONObject
tableJson
,
Class
<
T
>
clazz
)
{
JSONArray
colJsons
=
tableJson
.
getJSONArray
(
"cols"
);
JSONArray
rowJsons
=
tableJson
.
getJSONArray
(
"rows"
);
return
rowJsons
.
stream
().
map
(
item
->
{
...
...
src/main/java/com/baosight/hggp/hg/cg/service/ServiceHGCG003B.java
View file @
ef8e87bc
...
...
@@ -109,13 +109,11 @@ public class ServiceHGCG003B extends ServiceBase {
this
.
editData
(
fCg003Bs
,
dbCg003BMap
,
dbCg002AMap
,
cg003
,
dbCg002BMap
);
}
else
{
// 写入数据
for
(
int
i
=
0
;
i
<
fCg003Bs
.
size
();
i
++)
{
HGCG003B
hgcg003B
=
fCg003Bs
.
get
(
i
);
if
(
hgcg003B
.
getId
()
==
null
||
hgcg003B
.
getId
()
==
0
)
{
// 修改数据
this
.
addData
(
hgcg003B
,
cg003
);
for
(
HGCG003B
fCg003B
:
fCg003Bs
)
{
if
(
fCg003B
.
getId
()
==
null
||
fCg003B
.
getId
()
==
0
)
{
this
.
addData
(
fCg003B
,
cg003
);
}
else
{
this
.
updateData
(
hgc
g003B
);
this
.
updateData
(
fC
g003B
);
}
}
//修改主表信息
...
...
src/main/java/com/baosight/hggp/hg/constant/HGSqlConstant.java
View file @
ef8e87bc
...
...
@@ -633,6 +633,8 @@ public class HGSqlConstant {
public
class
HgXsUser
{
// 查询
public
static
final
String
GET_BY_LOGIN
=
"HGXSUser.getByLogin"
;
// 查询
public
static
final
String
QUERY
=
"HGXSUser.query"
;
// 查询
public
static
final
String
COUNT
=
"HGXSUser.count"
;
...
...
src/main/java/com/baosight/hggp/hg/sc/constant/HgScSqlConstant.java
View file @
ef8e87bc
...
...
@@ -14,6 +14,8 @@ public class HgScSqlConstant {
*/
public
static
class
HgSc001
{
// 获取
public
static
final
String
GET_BY_CODE
=
"HGSC001.get"
;
// 德诚修改
public
static
final
String
UPDATE_FOR_DC
=
"HGSC001.updateForDc"
;
// 修改项目名称
...
...
src/main/java/com/baosight/hggp/hg/sc/service/ServiceHGSC101.java
View file @
ef8e87bc
...
...
@@ -3,6 +3,7 @@ package com.baosight.hggp.hg.sc.service;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.core.extapp.decheng.api.DcOpenApi
;
import
com.baosight.hggp.core.extapp.decheng.model.DcContractList
;
import
com.baosight.hggp.core.model.Pager
;
import
com.baosight.hggp.core.utils.ThreadUtils
;
import
com.baosight.hggp.hg.pz.domain.HGPZ009
;
import
com.baosight.hggp.hg.pz.tools.HGPZTools
;
...
...
@@ -125,12 +126,13 @@ public class ServiceHGSC101 extends ServiceEPBase {
if
(
pageIndex
>
1000
)
{
break
;
}
List
<
DcContractList
>
zbContracts
=
DcOpenApi
.
contactList
(
pageIndex
);
if
(
CollectionUtils
.
isEmpty
(
zbContracts
))
{
Pager
<
DcContractList
>
pager
=
DcOpenApi
.
contactList
(
pageIndex
);
List
<
DcContractList
>
dcContractLists
=
pager
.
getData
();
if
(
CollectionUtils
.
isEmpty
(
dcContractLists
)
||
pageIndex
>
pager
.
getTotalPages
())
{
break
;
}
// 写入合同数据
saveContractData
(
accountCode
,
zbContrac
ts
);
saveContractData
(
accountCode
,
dcContractLis
ts
);
pageIndex
++;
}
}
...
...
@@ -139,27 +141,27 @@ public class ServiceHGSC101 extends ServiceEPBase {
* 写入合同信息
*
* @param accountCode
* @param
zbContrac
ts
* @param
dcContractLis
ts
*/
private
void
saveContractData
(
String
accountCode
,
List
<
DcContractList
>
zbContrac
ts
)
{
private
void
saveContractData
(
String
accountCode
,
List
<
DcContractList
>
dcContractLis
ts
)
{
// 查询帐套信息
HGPZ009
dbPz009
=
HGPZTools
.
HgPz009
.
getByCode
(
accountCode
);
String
prefix
=
dbPz009
.
getLoginPrefix
();
for
(
DcContractList
zbContract
:
zbContrac
ts
)
{
String
projCode
=
prefix
+
zbContrac
t
.
getOrd
();
HGSC001
dbSc001
=
HGSCTools
.
Hgsc001
.
query
ByCode
(
projCode
);
for
(
DcContractList
dcContractList
:
dcContractLis
ts
)
{
String
projCode
=
prefix
+
dcContractLis
t
.
getOrd
();
HGSC001
dbSc001
=
HGSCTools
.
Hgsc001
.
get
ByCode
(
projCode
);
if
(
dbSc001
==
null
)
{
dbSc001
=
new
HGSC001
();
dbSc001
.
setAccountCode
(
accountCode
);
dbSc001
.
setDepCode
(
accountCode
);
dbSc001
.
setDepName
(
dbPz009
.
getAccountName
());
dbSc001
.
setProjCode
(
projCode
);
dbSc001
.
setProjName
(
zbContrac
t
.
getTitle
());
dbSc001
.
setProjName
(
dcContractLis
t
.
getTitle
());
DaoUtils
.
insert
(
HGSC001
.
INSERT
,
dbSc001
);
}
else
{
Map
updateMap
=
new
HashMap
();
updateMap
.
put
(
HGSC001
.
FIELD_proj_code
,
projCode
);
updateMap
.
put
(
HGSC001
.
FIELD_proj_name
,
zbContrac
t
.
getTitle
());
updateMap
.
put
(
HGSC001
.
FIELD_proj_name
,
dcContractLis
t
.
getTitle
());
DaoUtils
.
insert
(
HgScSqlConstant
.
HgSc001
.
UPDATE_PROJ_NAME
,
dbSc001
);
}
}
...
...
src/main/java/com/baosight/hggp/hg/sc/sql/HGSC001.xml
View file @
ef8e87bc
...
...
@@ -2,6 +2,37 @@
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
<sqlMap
namespace=
"HGSC001"
>
<sql
id=
"column"
>
id as "id",
company_code as "companyCode",
<!-- 公司编码 -->
company_name as "companyName",
<!-- 公司名称 -->
dep_code as "depCode",
<!-- 部门编码 -->
dep_name as "depName",
<!-- 部门名称 -->
subcontract_code as "subcontractCode",
<!-- 分包商编码 -->
subcontract_name as "subcontractName",
<!-- 分包商名称 -->
genral_contract_code as "genralContractCode",
<!-- 总包商编码 -->
genral_contract_name as "genralContractName",
<!-- 总包商名称 -->
party_pm_name as "partyPmName",
<!-- 甲方项目经理名称 -->
party_pm_hpone as "partyPmHpone",
<!-- 甲方项目经理联系电话 -->
contract_name as "contractName",
<!-- 合同名称 -->
contract_work_txt as "contractWorkTxt",
<!-- 合同工作量 -->
proj_code as "projCode",
<!-- 项目编码 -->
proj_name as "projName",
<!-- 项目名称 -->
proj_type as "projType",
<!-- 项目性质 -->
proj_status as "projStatus",
<!-- 项目状态 0:在建;1:完工 -->
approval_status as "approvalStatus",
<!-- 审批状态 0:待审;1:审核中;2:已审 -->
permiss_start_date as "permissStartDate",
<!-- 准许开工日期 -->
start_date as "startDate",
<!-- 开工日期 -->
end_date as "endDate",
<!-- 完工日期 -->
account_code as "accountCode",
<!-- 帐套 -->
created_by as "createdBy",
<!-- 创建人 -->
created_name as "createdName",
<!-- 创建人名称 -->
created_time as "createdTime",
<!-- 创建时间 -->
updated_by as "updatedBy",
<!-- 更新人 -->
updated_name as "updatedName",
<!-- 修改人名称 -->
updated_time as "updatedTime"
<!-- 更新时间 -->
</sql>
<sql
id=
"condition"
>
<include
refid=
"HGXSDataAuth.authCondition"
/>
<isNotEmpty
prepend=
" AND "
property=
"id"
>
...
...
@@ -98,38 +129,18 @@
</isNotEmpty>
</sql>
<select
id=
"get"
resultClass=
"com.baosight.hggp.hg.sc.domain.HGSC001"
>
SELECT
<include
refid=
"column"
/>
FROM ${hggpSchema}.HGSC001
WHERE PROJ_CODE = #projCode
</select>
<select
id=
"query"
resultClass=
"com.baosight.hggp.hg.sc.domain.HGSC001"
>
SELECT
id as "id",
company_code as "companyCode",
<!-- 公司编码 -->
company_name as "companyName",
<!-- 公司名称 -->
dep_code as "depCode",
<!-- 部门编码 -->
dep_name as "depName",
<!-- 部门名称 -->
subcontract_code as "subcontractCode",
<!-- 分包商编码 -->
subcontract_name as "subcontractName",
<!-- 分包商名称 -->
genral_contract_code as "genralContractCode",
<!-- 总包商编码 -->
genral_contract_name as "genralContractName",
<!-- 总包商名称 -->
party_pm_name as "partyPmName",
<!-- 甲方项目经理名称 -->
party_pm_hpone as "partyPmHpone",
<!-- 甲方项目经理联系电话 -->
contract_name as "contractName",
<!-- 合同名称 -->
contract_work_txt as "contractWorkTxt",
<!-- 合同工作量 -->
proj_code as "projCode",
<!-- 项目编码 -->
proj_name as "projName",
<!-- 项目名称 -->
proj_type as "projType",
<!-- 项目性质 -->
proj_status as "projStatus",
<!-- 项目状态 0:在建;1:完工 -->
approval_status as "approvalStatus",
<!-- 审批状态 0:待审;1:审核中;2:已审 -->
permiss_start_date as "permissStartDate",
<!-- 准许开工日期 -->
start_date as "startDate",
<!-- 开工日期 -->
end_date as "endDate",
<!-- 完工日期 -->
account_code as "accountCode",
<!-- 帐套 -->
created_by as "createdBy",
<!-- 创建人 -->
created_name as "createdName",
<!-- 创建人名称 -->
created_time as "createdTime",
<!-- 创建时间 -->
updated_by as "updatedBy",
<!-- 更新人 -->
updated_name as "updatedName",
<!-- 修改人名称 -->
updated_time as "updatedTime"
<!-- 更新时间 -->
<include
refid=
"column"
/>
FROM ${hggpSchema}.HGSC001 WHERE 1=1
<include
refid=
"customCondition"
/>
<include
refid=
"customCondition"
/>
<dynamic
prepend=
"ORDER BY"
>
<isNotEmpty
property=
"orderBy"
>
$orderBy$
...
...
src/main/java/com/baosight/hggp/hg/sc/tools/HGSCTools.java
View file @
ef8e87bc
package
com
.
baosight
.
hggp
.
hg
.
sc
.
tools
;
import
cn.hutool.core.bean.BeanUtil
;
import
com.baosight.hggp.common.*
;
import
com.baosight.hggp.common.AssignStatusEnum
;
import
com.baosight.hggp.common.CheckStatusEnum
;
import
com.baosight.hggp.common.ComputeTypeEnum
;
import
com.baosight.hggp.common.HandleStatusEnum
;
import
com.baosight.hggp.common.ProductTypeEnum
;
import
com.baosight.hggp.core.constant.CommonConstant
;
import
com.baosight.hggp.core.dao.DaoBase
;
import
com.baosight.hggp.core.dao.DaoUtils
;
...
...
@@ -13,18 +16,37 @@ import com.baosight.hggp.hg.pz.domain.HGPZ004;
import
com.baosight.hggp.hg.pz.domain.HGPZ005
;
import
com.baosight.hggp.hg.pz.domain.HGPZ005A
;
import
com.baosight.hggp.hg.pz.tools.HGPZTools
;
import
com.baosight.hggp.hg.sc.domain.*
;
import
com.baosight.hggp.hg.sc.constant.HgScSqlConstant
;
import
com.baosight.hggp.hg.sc.domain.HGSC001
;
import
com.baosight.hggp.hg.sc.domain.HGSC001A
;
import
com.baosight.hggp.hg.sc.domain.HGSC003
;
import
com.baosight.hggp.hg.sc.domain.HGSC004
;
import
com.baosight.hggp.hg.sc.domain.HGSC004A
;
import
com.baosight.hggp.hg.sc.domain.HGSC004B
;
import
com.baosight.hggp.hg.sc.domain.HGSC005
;
import
com.baosight.hggp.hg.sc.domain.HGSC005A
;
import
com.baosight.hggp.hg.sc.domain.HGSC006
;
import
com.baosight.hggp.hg.sc.domain.HGSC006A
;
import
com.baosight.hggp.hg.sc.domain.HGSC007
;
import
com.baosight.hggp.hg.sc.domain.HGSC008
;
import
com.baosight.hggp.hg.sc.domain.HGSC009
;
import
com.baosight.hggp.hg.sc.domain.HGSC009A
;
import
com.baosight.hggp.hg.sc.domain.HGSC099
;
import
com.baosight.hggp.hg.sj.domain.HGSJ001
;
import
com.baosight.hggp.hg.sj.tools.HGSJTools
;
import
com.baosight.hggp.hg.zl.domain.HGZL002
;
import
com.baosight.hggp.hg.zl.domain.HGZL004
;
import
com.baosight.hggp.hg.zl.tools.HGZLTools
;
import
com.baosight.hggp.util.*
;
import
com.baosight.hggp.util.AssertUtils
;
import
com.baosight.hggp.util.BeanUtils
;
import
com.baosight.hggp.util.DateUtil
;
import
com.baosight.hggp.util.DateUtils
;
import
com.baosight.hggp.util.EiInfoUtils
;
import
com.baosight.hggp.util.FileUtils
;
import
com.baosight.iplat4j.core.ProjectInfo
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
import
com.baosight.iplat4j.core.ei.EiInfo
;
import
com.baosight.iplat4j.core.exception.PlatException
;
import
com.baosight.iplat4j.core.service.soa.XServiceManager
;
import
com.baosight.iplat4j.core.util.NumberUtils
;
import
com.baosight.iplat4j.ed.util.SequenceGenerator
;
import
org.apache.commons.collections.CollectionUtils
;
...
...
@@ -33,12 +55,24 @@ import org.apache.commons.lang3.StringUtils;
import
java.math.BigDecimal
;
import
java.math.RoundingMode
;
import
java.util.*
;
import
java.util.ArrayList
;
import
java.util.Collections
;
import
java.util.Comparator
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.LinkedHashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Objects
;
import
java.util.Optional
;
import
java.util.concurrent.atomic.AtomicReference
;
import
java.util.function.Function
;
import
java.util.stream.Collectors
;
import
static
com
.
baosight
.
hggp
.
common
.
AssignStatusEnum
.*;
import
cn.hutool.core.bean.BeanUtil
;
import
static
com
.
baosight
.
hggp
.
common
.
AssignStatusEnum
.
ASSIGNED
;
import
static
com
.
baosight
.
hggp
.
common
.
AssignStatusEnum
.
PARTIAL_ASSIGN
;
import
static
com
.
baosight
.
hggp
.
common
.
AssignStatusEnum
.
UNASSIGN
;
import
static
java
.
math
.
BigDecimal
.
ROUND_DOWN
;
/**
...
...
@@ -196,6 +230,20 @@ public class HGSCTools {
*/
public
static
class
Hgsc001
{
/**
*
* @param code
* @return
*/
public
static
HGSC001
getByCode
(
String
code
)
{
AssertUtils
.
isNull
(
code
,
"项目Code不能为空!"
);
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
HGSC001
.
FIELD_proj_code
,
code
);
List
<
HGSC001
>
results
=
DaoBase
.
getInstance
().
query
(
HgScSqlConstant
.
HgSc001
.
GET_BY_CODE
,
queryMap
);
return
CollectionUtils
.
isEmpty
(
results
)
?
null
:
results
.
get
(
0
);
}
/**
*
* @param code
...
...
@@ -203,8 +251,10 @@ public class HGSCTools {
*/
public
static
HGSC001
queryByCode
(
String
code
)
{
AssertUtils
.
isNull
(
code
,
"项目Code不能为空!"
);
List
<
HGSC001
>
results
=
DaoBase
.
getInstance
().
query
(
HGSC001
.
QUERY
,
new
HashMap
<
String
,
Object
>(){
{
put
(
"projCode"
,
code
);}
List
<
HGSC001
>
results
=
DaoBase
.
getInstance
().
query
(
HGSC001
.
QUERY
,
new
HashMap
<
String
,
Object
>()
{
{
put
(
"projCode"
,
code
);
}
});
return
CollectionUtils
.
isEmpty
(
results
)
?
null
:
results
.
get
(
0
);
}
...
...
src/main/java/com/baosight/hggp/hg/xs/service/ServiceHGXSOrg.java
View file @
ef8e87bc
...
...
@@ -150,34 +150,34 @@ public class ServiceHGXSOrg extends ServiceBase {
private
void
syncDcDeptData
(
String
accountCode
)
throws
IOException
,
InstantiationException
,
IllegalAccessException
{
int
pageIndex
=
1
;
Pager
<
DcDeptList
>
pager
=
DcOpenApi
.
deptList
(
pageIndex
);
List
<
DcDeptList
>
zbDep
ts
=
pager
.
getData
();
if
(
CollectionUtils
.
isEmpty
(
zbDep
ts
))
{
List
<
DcDeptList
>
dcDeptLis
ts
=
pager
.
getData
();
if
(
CollectionUtils
.
isEmpty
(
dcDeptLis
ts
))
{
return
;
}
// 写入合同数据
syncDcDeptData
(
accountCode
,
zbDep
ts
);
syncDcDeptData
(
accountCode
,
dcDeptLis
ts
);
}
/**
* 写入部门信息
*
* @param accountCode
* @param
zbDep
ts
* @param
dcDeptLis
ts
*/
private
void
syncDcDeptData
(
String
accountCode
,
List
<
DcDeptList
>
zbDep
ts
)
{
private
void
syncDcDeptData
(
String
accountCode
,
List
<
DcDeptList
>
dcDeptLis
ts
)
{
// 查询帐套信息
HGPZ009
dbPz009
=
HGPZTools
.
HgPz009
.
getByCode
(
accountCode
);
for
(
DcDeptList
zbDept
:
zbDep
ts
)
{
String
orgId
=
dbPz009
.
getLoginPrefix
()
+
zbDep
t
.
getNodeId
();
for
(
DcDeptList
dcDeptList
:
dcDeptLis
ts
)
{
String
orgId
=
dbPz009
.
getLoginPrefix
()
+
dcDeptLis
t
.
getNodeId
();
Org
dbOrg
=
HGXSTools
.
XsOrg
.
get
(
orgId
);
if
(
dbOrg
==
null
)
{
dbOrg
=
new
Org
();
dbOrg
.
setOrgId
(
orgId
);
this
.
syncDcDeptAdd
(
accountCode
,
zbDep
t
,
dbOrg
,
dbPz009
);
this
.
syncDcDeptAdd
(
accountCode
,
dcDeptLis
t
,
dbOrg
,
dbPz009
);
}
else
{
Map
updateMap
=
new
HashMap
();
updateMap
.
put
(
Org
.
FIELD_ORG_ID
,
orgId
);
updateMap
.
put
(
Org
.
FIELD_ORG_CNAME
,
zbDep
t
.
getNodeText
());
updateMap
.
put
(
Org
.
FIELD_ORG_CNAME
,
dcDeptLis
t
.
getNodeText
());
updateMap
.
put
(
Org
.
FIELD_REC_REVISOR
,
"System"
);
updateMap
.
put
(
Org
.
FIELD_REC_REVISE_TIME
,
DateUtils
.
shortDateTime
());
updateMap
.
put
(
Org
.
FIELD_IS_DELETED
,
DeleteFlagEnum
.
UN_REMOVE
.
getCode
().
toString
());
...
...
@@ -194,16 +194,16 @@ public class ServiceHGXSOrg extends ServiceBase {
* @param dbOrg
* @param dbPz009
*/
private
void
syncDcDeptAdd
(
String
accountCode
,
DcDeptList
zbDep
t
,
Org
dbOrg
,
HGPZ009
dbPz009
)
{
private
void
syncDcDeptAdd
(
String
accountCode
,
DcDeptList
dcDeptLis
t
,
Org
dbOrg
,
HGPZ009
dbPz009
)
{
String
orgId
=
dbOrg
.
getOrgId
();
dbOrg
.
setAccountCode
(
accountCode
);
dbOrg
.
setOrgEname
(
orgId
);
dbOrg
.
setOrgCname
(
zbDep
t
.
getNodeText
());
dbOrg
.
setOrgCname
(
dcDeptLis
t
.
getNodeText
());
dbOrg
.
setOrgType
(
OrgTypeEnum
.
DEPT
.
getCode
());
dbOrg
.
setParentOrgId
(
"-1"
.
equals
(
zbDep
t
.
getParentId
())
?
accountCode
:
dbPz009
.
getLoginPrefix
()
+
zbDep
t
.
getParentId
());
dbOrg
.
setParentOrgId
(
"-1"
.
equals
(
dcDeptLis
t
.
getParentId
())
?
accountCode
:
dbPz009
.
getLoginPrefix
()
+
dcDeptLis
t
.
getParentId
());
dbOrg
.
setEstablishDate
(
"20240101"
);
dbOrg
.
setSortIndex
(
zbDep
t
.
getFullSort
());
dbOrg
.
setSortIndex
(
dcDeptLis
t
.
getFullSort
());
dbOrg
.
setCompanyCode
(
accountCode
);
dbOrg
.
setCompanyName
(
dbPz009
.
getAccountName
());
dbOrg
.
setRecCreator
(
"System"
);
...
...
src/main/java/com/baosight/hggp/hg/xs/service/ServiceHGXSUser.java
View file @
ef8e87bc
...
...
@@ -238,12 +238,12 @@ public class ServiceHGXSUser extends ServiceBase {
break
;
}
Pager
<
DcUserList
>
pager
=
DcOpenApi
.
userList
(
pageIndex
);
List
<
DcUserList
>
zbUser
s
=
pager
.
getData
();
if
(
CollectionUtils
.
isEmpty
(
zbUser
s
)
||
pageIndex
>
pager
.
getTotalPages
())
{
List
<
DcUserList
>
dcUserList
s
=
pager
.
getData
();
if
(
CollectionUtils
.
isEmpty
(
dcUserList
s
)
||
pageIndex
>
pager
.
getTotalPages
())
{
break
;
}
// 写入合同数据
syncDcUserData
(
accountCode
,
zbUser
s
);
syncDcUserData
(
accountCode
,
dcUserList
s
);
pageIndex
++;
}
}
...
...
@@ -252,14 +252,14 @@ public class ServiceHGXSUser extends ServiceBase {
* 写入用户信息
*
* @param accountCode
* @param
Zb
UserLists
* @param
dc
UserLists
*/
private
void
syncDcUserData
(
String
accountCode
,
List
<
DcUserList
>
Zb
UserLists
)
{
private
void
syncDcUserData
(
String
accountCode
,
List
<
DcUserList
>
dc
UserLists
)
{
// 查询帐套信息
HGPZ009
dbPz009
=
HGPZTools
.
HgPz009
.
getByCode
(
accountCode
);
for
(
DcUserList
zbUserList
:
Zb
UserLists
)
{
for
(
DcUserList
dcUserList
:
dc
UserLists
)
{
try
{
syncDcUserSingle
(
dbPz009
,
zb
UserList
.
getOrd
());
syncDcUserSingle
(
dbPz009
,
dc
UserList
.
getOrd
());
}
catch
(
Exception
e
)
{
log
.
error
(
"同步德诚用户失败:{}"
,
e
.
getMessage
(),
e
);
}
...
...
@@ -281,7 +281,7 @@ public class ServiceHGXSUser extends ServiceBase {
}
String
userId
=
dbPz009
.
getLoginPrefix
()
+
ord
;
// 判断用户是否存在
User
dbUser
=
HGXSTools
.
XsUser
.
get
(
userId
);
User
dbUser
=
HGXSTools
.
XsUser
.
get
ByLogin
(
userId
);
if
(
dbUser
==
null
)
{
this
.
syncDcSingleUserAdd
(
zbUser
,
dbPz009
,
userId
);
}
else
{
...
...
@@ -297,8 +297,7 @@ public class ServiceHGXSUser extends ServiceBase {
* @param userId
* @throws Exception
*/
private
void
syncDcSingleUserAdd
(
DcUser
zbUser
,
HGPZ009
dbPz009
,
String
userId
)
throws
Exception
{
private
void
syncDcSingleUserAdd
(
DcUser
zbUser
,
HGPZ009
dbPz009
,
String
userId
)
throws
Exception
{
// 新增用户
HGXSTools
.
XsUser
.
addUser
(
dbPz009
.
getAccountCode
(),
userId
,
zbUser
.
getName
(),
zbUser
.
getSex
(),
zbUser
.
getEmail
(),
zbUser
.
getCardid
());
...
...
src/main/java/com/baosight/hggp/hg/xs/sql/HGXSOrg.xml
View file @
ef8e87bc
...
...
@@ -57,8 +57,7 @@
SELECT
<include
refid=
"column"
/>
FROM ${platSchema}.TXSOG01
WHERE 1=1
AND ORG_ID = #orgId#
WHERE ORG_ID = #orgId#
</select>
<!-- 查询组织信息 -->
...
...
src/main/java/com/baosight/hggp/hg/xs/sql/HGXSUser.xml
View file @
ef8e87bc
...
...
@@ -2,6 +2,16 @@
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
<sqlMap
namespace=
"HGXSUser"
>
<sql
id=
"column"
>
USER_ID as "userId",
<!-- 用户id -->
USER_NAME as "userName",
<!-- 用户名 -->
LOGIN_NAME as "loginName",
<!-- 登录id -->
GENDER as "gender",
<!-- 性别 -->
MOBILE as "mobile",
<!-- 手机号 -->
EMAIL as "email",
<!-- 邮箱 -->
ACCOUNT_CODE as "accountCode"
<!-- 企业编码 -->
</sql>
<sql
id=
"condition"
>
<isNotEmpty
prepend=
" AND "
property=
"loginName"
>
LOGIN_NAME = #loginName#
...
...
@@ -21,15 +31,17 @@
</sql>
<!-- 查询用户信息 -->
<select
id=
"getByLogin"
resultClass=
"com.baosight.hggp.hg.xs.domain.User"
>
SELECT
<include
refid=
"column"
/>
FROM ${platSchema}.XS_USER
WHERE LOGIN_NAME = #loginName#
</select>
<!-- 查询用户信息 -->
<select
id=
"query"
resultClass=
"com.baosight.hggp.hg.xs.domain.User"
>
SELECT
USER_ID as "userId",
<!-- 用户id -->
USER_NAME as "userName",
<!-- 用户名 -->
LOGIN_NAME as "loginName",
<!-- 登录id -->
GENDER as "gender",
<!-- 性别 -->
MOBILE as "mobile",
<!-- 手机号 -->
EMAIL as "email",
<!-- 邮箱 -->
ACCOUNT_CODE as "accountCode"
<!-- 企业编码 -->
<include
refid=
"column"
/>
FROM ${platSchema}.XS_USER
WHERE 1=1
<include
refid=
"condition"
/>
...
...
src/main/java/com/baosight/hggp/hg/xs/tools/HGXSTools.java
View file @
ef8e87bc
...
...
@@ -121,11 +121,11 @@ public class HGXSTools {
*
* @return
*/
public
static
User
get
(
String
loginName
)
{
public
static
User
get
ByLogin
(
String
loginName
)
{
AssertUtils
.
isEmpty
(
loginName
,
"用户登录名不能为空"
);
Map
paramMap
=
new
HashMap
();
paramMap
.
put
(
"loginName"
,
loginName
);
List
<
User
>
results
=
DaoBase
.
getInstance
().
query
(
HGSqlConstant
.
HgXsUser
.
QUERY
,
paramMap
);
List
<
User
>
results
=
DaoBase
.
getInstance
().
query
(
HGSqlConstant
.
HgXsUser
.
GET_BY_LOGIN
,
paramMap
);
return
CollectionUtils
.
isEmpty
(
results
)
?
null
:
results
.
get
(
0
);
}
...
...
src/main/webapp/HG/CG/HGCG002A.jsp
View file @
ef8e87bc
...
...
@@ -43,7 +43,7 @@
<EF:EFColumn
ename=
"purWeight"
cname=
"采购重量"
width=
"120"
align=
"right"
format=
"{0:N3}"
sumType=
"page"
required=
"true"
/>
<EF:EFComboColumn
ename=
"calculationMethod"
cname=
"计算方式"
enable=
"true"
width=
"100"
align=
"center"
required=
"true"
>
copy=
"true"
required=
"true"
>
<EF:EFCodeOption
codeName=
"hggp.cg.calculationMethod"
/>
</EF:EFComboColumn>
<EF:EFColumn
ename=
"price"
cname=
"单价"
width=
"80"
align=
"right"
format=
"{0:N3}"
required=
"true"
/>
...
...
src/main/webapp/HG/CG/HGCG003B.js
View file @
ef8e87bc
...
...
@@ -108,7 +108,6 @@ $(function () {
//系数
let
coefficient
=
inventRecordBoxBlockId
[
i
][
'param10Field'
]
calUnitWeight
(
e
.
items
[
0
],
e
.
items
[
0
].
length
,
e
.
items
[
0
].
width
,
e
.
items
[
0
].
thick
,
coefficient
);
break
}
}
...
...
src/main/webapp/HG/CG/HGCG003B.jsp
View file @
ef8e87bc
...
...
@@ -49,12 +49,13 @@
sumType=
"page"
/>
<EF:EFColumn
ename=
"receiveWeight"
cname=
"收货重量"
width=
"120"
align=
"right"
format=
"{0:N3}"
sumType=
"page"
required=
"true"
/>
<EF:EFColumn
ename=
"receiveUnitWeight"
cname=
"收货单重"
enable=
"false"
width=
"120"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFComboColumn
ename=
"calculationMethod"
cname=
"计算方式"
enable=
"false"
width=
"120"
align=
"center"
>
<EF:EFColumn
ename=
"receiveUnitWeight"
cname=
"收货单重"
width=
"120"
align=
"right"
format=
"{0:N3}"
required=
"true"
/>
<EF:EFComboColumn
ename=
"calculationMethod"
cname=
"计算方式"
width=
"120"
align=
"center"
required=
"true"
copy=
"true"
>
<EF:EFCodeOption
codeName=
"hggp.cg.calculationMethod"
/>
</EF:EFComboColumn>
<EF:EFColumn
ename=
"price"
cname=
"单价"
enable=
"false"
width=
"120"
align=
"right"
format=
"{0:C3}
"
/>
<EF:EFColumn
ename=
"price"
cname=
"单价"
width=
"120"
align=
"right"
format=
"{0:C3}"
required=
"true
"
/>
<EF:EFColumn
ename=
"amount"
cname=
"金额"
enable=
"false"
width=
"120"
align=
"right"
format=
"{0:C3}"
sumType=
"page"
/>
<EF:EFComboColumn
ename=
"status"
cname=
"状态"
enable=
"false"
width=
"80"
align=
"center"
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment