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
cb68d56c
Commit
cb68d56c
authored
Aug 31, 2024
by
宋祥
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://129.211.46.84:8800/platform/hg-smart
parents
4a3af12b
610f12f4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
53 changed files
with
906 additions
and
340 deletions
+906
-340
ChangeTypeEnum.java
src/main/java/com/baosight/hggp/common/ChangeTypeEnum.java
+1
-0
HgCgConst.java
...main/java/com/baosight/hggp/hg/cg/constant/HgCgConst.java
+23
-0
HGCG001A.java
src/main/java/com/baosight/hggp/hg/cg/domain/HGCG001A.java
+17
-1
HGCG002B.java
src/main/java/com/baosight/hggp/hg/cg/domain/HGCG002B.java
+41
-2
ServiceHGCG001.java
.../java/com/baosight/hggp/hg/cg/service/ServiceHGCG001.java
+1
-0
ServiceHGCG002A.java
...java/com/baosight/hggp/hg/cg/service/ServiceHGCG002A.java
+0
-2
ServiceHGCG003A.java
...java/com/baosight/hggp/hg/cg/service/ServiceHGCG003A.java
+27
-9
ServiceHGCG003B.java
...java/com/baosight/hggp/hg/cg/service/ServiceHGCG003B.java
+65
-38
HGCG001.xml
src/main/java/com/baosight/hggp/hg/cg/sql/HGCG001.xml
+13
-0
HGCG002A.xml
src/main/java/com/baosight/hggp/hg/cg/sql/HGCG002A.xml
+8
-6
HGCG003A.xml
src/main/java/com/baosight/hggp/hg/cg/sql/HGCG003A.xml
+41
-52
HGConstant.java
src/main/java/com/baosight/hggp/hg/constant/HGConstant.java
+4
-2
HGSqlConstant.java
...ain/java/com/baosight/hggp/hg/constant/HGSqlConstant.java
+10
-5
HpDmTools.java
src/main/java/com/baosight/hggp/hg/dm/tools/HpDmTools.java
+1
-1
HgWdSqlConstant.java
...ava/com/baosight/hggp/hg/wd/constant/HgWdSqlConstant.java
+17
-1
HGWD001A.java
src/main/java/com/baosight/hggp/hg/wd/domain/HGWD001A.java
+32
-0
HGWD099.java
src/main/java/com/baosight/hggp/hg/wd/domain/HGWD099.java
+0
-0
ServiceHGWD001.java
.../java/com/baosight/hggp/hg/wd/service/ServiceHGWD001.java
+0
-0
ServiceHGWD001B.java
...java/com/baosight/hggp/hg/wd/service/ServiceHGWD001B.java
+1
-1
ServiceHGWD001C.java
...java/com/baosight/hggp/hg/wd/service/ServiceHGWD001C.java
+1
-1
ServiceHGWD001D.java
...java/com/baosight/hggp/hg/wd/service/ServiceHGWD001D.java
+2
-3
ServiceHGWD001E.java
...java/com/baosight/hggp/hg/wd/service/ServiceHGWD001E.java
+3
-3
ServiceHGWD001F.java
...java/com/baosight/hggp/hg/wd/service/ServiceHGWD001F.java
+3
-3
ServiceHGWD001G.java
...java/com/baosight/hggp/hg/wd/service/ServiceHGWD001G.java
+3
-3
ServiceHGWD099.java
.../java/com/baosight/hggp/hg/wd/service/ServiceHGWD099.java
+21
-62
HGWD001.xml
src/main/java/com/baosight/hggp/hg/wd/sql/HGWD001.xml
+17
-22
HGWD001A.xml
src/main/java/com/baosight/hggp/hg/wd/sql/HGWD001A.xml
+34
-20
HGWD099.xml
src/main/java/com/baosight/hggp/hg/wd/sql/HGWD099.xml
+191
-0
HGWDTools.java
src/main/java/com/baosight/hggp/hg/wd/tools/HGWDTools.java
+55
-1
HGYX001.java
src/main/java/com/baosight/hggp/hg/yx/domain/HGYX001.java
+32
-0
ServiceHGYX001A.java
...java/com/baosight/hggp/hg/yx/service/ServiceHGYX001A.java
+1
-0
ServiceHGYX001B.java
...java/com/baosight/hggp/hg/yx/service/ServiceHGYX001B.java
+1
-0
HGYX001.xml
src/main/java/com/baosight/hggp/hg/yx/sql/HGYX001.xml
+13
-4
ServiceHGZL001B.java
...java/com/baosight/hggp/hg/zl/service/ServiceHGZL001B.java
+1
-0
ServiceXSUserJwt.java
...a/com/baosight/xservices/xs/service/ServiceXSUserJwt.java
+47
-2
application.properties
src/main/resources/application.properties
+7
-7
quartz.properties
src/main/resources/quartz.properties
+6
-6
sqlmap-config.xml
src/main/resources/resources/ibatis/sqlmap-config.xml
+1
-0
HGCG001.js
src/main/webapp/HG/CG/HGCG001.js
+17
-17
HGCG001.jsp
src/main/webapp/HG/CG/HGCG001.jsp
+4
-4
HGCG002A.js
src/main/webapp/HG/CG/HGCG002A.js
+16
-14
HGCG002A.jsp
src/main/webapp/HG/CG/HGCG002A.jsp
+4
-0
HGCG003A.js
src/main/webapp/HG/CG/HGCG003A.js
+6
-0
HGCG003A.jsp
src/main/webapp/HG/CG/HGCG003A.jsp
+8
-0
HGCG003B.js
src/main/webapp/HG/CG/HGCG003B.js
+4
-0
HGCG003B.jsp
src/main/webapp/HG/CG/HGCG003B.jsp
+9
-9
HGWD001.js
src/main/webapp/HG/WD/HGWD001.js
+64
-9
HGWD001.jsp
src/main/webapp/HG/WD/HGWD001.jsp
+3
-1
HGWD001E.js
src/main/webapp/HG/WD/HGWD001E.js
+0
-29
HGYX001.jsp
src/main/webapp/HG/YX/HGYX001.jsp
+8
-0
HGYX001A.js
src/main/webapp/HG/YX/HGYX001A.js
+14
-0
HGYX001A.jsp
src/main/webapp/HG/YX/HGYX001A.jsp
+4
-0
HGYX001B.jsp
src/main/webapp/HG/YX/HGYX001B.jsp
+4
-0
No files found.
src/main/java/com/baosight/hggp/common/ChangeTypeEnum.java
View file @
cb68d56c
...
@@ -11,6 +11,7 @@ public enum ChangeTypeEnum {
...
@@ -11,6 +11,7 @@ public enum ChangeTypeEnum {
UPDATE
(
"update"
,
"修改"
),
UPDATE
(
"update"
,
"修改"
),
DELETE
(
"delete"
,
"删除"
),
DELETE
(
"delete"
,
"删除"
),
UPLOAD_ADD
(
"uploadAdd"
,
"附件添加"
),
UPLOAD_ADD
(
"uploadAdd"
,
"附件添加"
),
UPLOAD_UPDATE
(
"uploadUpdate"
,
"附件变更"
),
UPLOAD_DELETE
(
"uploadDelete"
,
"附件删除"
),
UPLOAD_DELETE
(
"uploadDelete"
,
"附件删除"
),
RELEASE
(
"release"
,
"发布"
),
RELEASE
(
"release"
,
"发布"
),
;
;
...
...
src/main/java/com/baosight/hggp/hg/cg/constant/HgCgConst.java
0 → 100644
View file @
cb68d56c
package
com
.
baosight
.
hggp
.
hg
.
cg
.
constant
;
/**
* @author:songx
* @date:2024/8/30,15:53
*/
public
class
HgCgConst
{
/**
* 计算方式
*
* @author:songx
* @date:2024/2/22,13:57
*/
public
static
class
CalculationMethod
{
// 数量计算
public
static
final
Integer
S0
=
0
;
// 重量计算
public
static
final
Integer
S1
=
1
;
}
}
src/main/java/com/baosight/hggp/hg/cg/domain/HGCG001A.java
View file @
cb68d56c
...
@@ -58,6 +58,7 @@ public class HGCG001A extends DaoEPBase {
...
@@ -58,6 +58,7 @@ public class HGCG001A extends DaoEPBase {
public
static
final
String
FIELD_REMARKS
=
"remarks"
;
/*备注*/
public
static
final
String
FIELD_REMARKS
=
"remarks"
;
/*备注*/
public
static
final
String
FIELD_PROJ_CODE
=
"projCode"
;
/* 项目编码*/
public
static
final
String
FIELD_PROJ_CODE
=
"projCode"
;
/* 项目编码*/
public
static
final
String
FIELD_PROJ_NAME
=
"projName"
;
/* 项目名称*/
public
static
final
String
FIELD_PROJ_NAME
=
"projName"
;
/* 项目名称*/
public
static
final
String
FIELD_CALCULATION_METHOD
=
"calculationMethod"
;
/* 计算方式 0-数量乘单价 1-重量乘单价*/
//页面展示
//页面展示
public
static
final
String
FIELD_SOURCE
=
"source"
;
/* 数据来源 根据采购数据来源小代码 目前默认0材料计划,1手工录入*/
public
static
final
String
FIELD_SOURCE
=
"source"
;
/* 数据来源 根据采购数据来源小代码 目前默认0材料计划,1手工录入*/
...
@@ -143,6 +144,7 @@ public class HGCG001A extends DaoEPBase {
...
@@ -143,6 +144,7 @@ public class HGCG001A extends DaoEPBase {
private
String
remarks
;
/*备注*/
private
String
remarks
;
/*备注*/
private
String
projCode
=
" "
;
/* 项目编码*/
private
String
projCode
=
" "
;
/* 项目编码*/
private
String
projName
=
" "
;
/* 项目名称*/
private
String
projName
=
" "
;
/* 项目名称*/
private
Integer
calculationMethod
;
/* 计算方式 0-数量乘单价 1-重量乘单价*/
//选择合同需要信息
//选择合同需要信息
private
Integer
source
;
/* 数据来源 根据采购数据来源小代码 目前默认0材料计划,1手工录入*/
private
Integer
source
;
/* 数据来源 根据采购数据来源小代码 目前默认0材料计划,1手工录入*/
...
@@ -368,6 +370,10 @@ public class HGCG001A extends DaoEPBase {
...
@@ -368,6 +370,10 @@ public class HGCG001A extends DaoEPBase {
eiColumn
=
new
EiColumn
(
FIELD_PROJ_NAME
);
eiColumn
=
new
EiColumn
(
FIELD_PROJ_NAME
);
eiColumn
.
setDescName
(
"项目名称"
);
eiColumn
.
setDescName
(
"项目名称"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_CALCULATION_METHOD
);
eiColumn
.
setDescName
(
"计算方式 0-数量乘单价 1-重量乘单价"
);
eiMetadata
.
addMeta
(
eiColumn
);
}
}
/**
/**
...
@@ -969,7 +975,15 @@ public class HGCG001A extends DaoEPBase {
...
@@ -969,7 +975,15 @@ public class HGCG001A extends DaoEPBase {
public
void
setProjName
(
String
projName
)
{
public
void
setProjName
(
String
projName
)
{
this
.
projName
=
projName
;
this
.
projName
=
projName
;
}
}
public
Integer
getCalculationMethod
()
{
return
calculationMethod
;
}
public
void
setCalculationMethod
(
Integer
calculationMethod
)
{
this
.
calculationMethod
=
calculationMethod
;
}
/**
/**
* get the value from Map.
* get the value from Map.
*
*
...
@@ -1013,6 +1027,7 @@ public class HGCG001A extends DaoEPBase {
...
@@ -1013,6 +1027,7 @@ public class HGCG001A extends DaoEPBase {
setStatus
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_STATUS
)),
status
));
setStatus
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_STATUS
)),
status
));
setProjCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PROJ_CODE
)),
projCode
));
setProjCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PROJ_CODE
)),
projCode
));
setProjName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PROJ_NAME
)),
projName
));
setProjName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PROJ_NAME
)),
projName
));
setCalculationMethod
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_CALCULATION_METHOD
)),
calculationMethod
));
setSource
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_SOURCE
)),
source
));
setSource
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_SOURCE
)),
source
));
setPrice
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PRICE
)),
price
));
setPrice
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PRICE
)),
price
));
...
@@ -1066,6 +1081,7 @@ public class HGCG001A extends DaoEPBase {
...
@@ -1066,6 +1081,7 @@ public class HGCG001A extends DaoEPBase {
map
.
put
(
FIELD_REMARKS
,
StringUtils
.
toString
(
remarks
,
eiMetadata
.
getMeta
(
FIELD_REMARKS
)));
map
.
put
(
FIELD_REMARKS
,
StringUtils
.
toString
(
remarks
,
eiMetadata
.
getMeta
(
FIELD_REMARKS
)));
map
.
put
(
FIELD_PROJ_CODE
,
StringUtils
.
toString
(
projCode
,
eiMetadata
.
getMeta
(
FIELD_PROJ_CODE
)));
map
.
put
(
FIELD_PROJ_CODE
,
StringUtils
.
toString
(
projCode
,
eiMetadata
.
getMeta
(
FIELD_PROJ_CODE
)));
map
.
put
(
FIELD_PROJ_NAME
,
StringUtils
.
toString
(
projName
,
eiMetadata
.
getMeta
(
FIELD_PROJ_NAME
)));
map
.
put
(
FIELD_PROJ_NAME
,
StringUtils
.
toString
(
projName
,
eiMetadata
.
getMeta
(
FIELD_PROJ_NAME
)));
map
.
put
(
FIELD_CALCULATION_METHOD
,
StringUtils
.
toString
(
calculationMethod
,
eiMetadata
.
getMeta
(
FIELD_CALCULATION_METHOD
)));
map
.
put
(
FIELD_SOURCE
,
StringUtils
.
toString
(
source
,
eiMetadata
.
getMeta
(
FIELD_SOURCE
)));
map
.
put
(
FIELD_SOURCE
,
StringUtils
.
toString
(
source
,
eiMetadata
.
getMeta
(
FIELD_SOURCE
)));
map
.
put
(
FIELD_PRICE
,
StringUtils
.
toString
(
price
,
eiMetadata
.
getMeta
(
FIELD_PRICE
)));
map
.
put
(
FIELD_PRICE
,
StringUtils
.
toString
(
price
,
eiMetadata
.
getMeta
(
FIELD_PRICE
)));
...
...
src/main/java/com/baosight/hggp/hg/cg/domain/HGCG002B.java
View file @
cb68d56c
...
@@ -63,6 +63,8 @@ public class HGCG002B extends DaoEPBase {
...
@@ -63,6 +63,8 @@ public class HGCG002B extends DaoEPBase {
//页面需要展示
//页面需要展示
public
static
final
String
FIELD_BC_RECEIVE_QTY
=
"bcReceiveQty"
;
/* 本次收货数量*/
public
static
final
String
FIELD_BC_RECEIVE_QTY
=
"bcReceiveQty"
;
/* 本次收货数量*/
public
static
final
String
FIELD_BC_MAX_RECEIVE_QTY
=
"bcMaxReceiveQty"
;
/* 本次最大收货数量*/
public
static
final
String
FIELD_BC_MAX_RECEIVE_QTY
=
"bcMaxReceiveQty"
;
/* 本次最大收货数量*/
public
static
final
String
FIELD_BC_RECEIVE_WEIGHT
=
"bcReceiveWeight"
;
/* 本次收货重量*/
public
static
final
String
FIELD_BC_MAX_RECEIVE_WEIGHT
=
"bcMaxReceiveWeight"
;
/* 本次最大收货重量*/
public
static
final
String
FIELD_CONTRACT_DATE
=
"contractDate"
;
/* 合同日期*/
public
static
final
String
FIELD_CONTRACT_DATE
=
"contractDate"
;
/* 合同日期*/
public
static
final
String
FIELD_CONTRACT_NO
=
"contractNo"
;
/* 合同号*/
public
static
final
String
FIELD_CONTRACT_NO
=
"contractNo"
;
/* 合同号*/
public
static
final
String
FIELD_PLAN_NO
=
"planNo"
;
/* 计划单号*/
public
static
final
String
FIELD_PLAN_NO
=
"planNo"
;
/* 计划单号*/
...
@@ -155,6 +157,8 @@ public class HGCG002B extends DaoEPBase {
...
@@ -155,6 +157,8 @@ public class HGCG002B extends DaoEPBase {
//页面需要填写、展示字段
//页面需要填写、展示字段
private
BigDecimal
bcReceiveQty
=
new
BigDecimal
(
0.000
);
/* 本次收货数量*/
private
BigDecimal
bcReceiveQty
=
new
BigDecimal
(
0.000
);
/* 本次收货数量*/
private
BigDecimal
bcMaxReceiveQty
=
new
BigDecimal
(
0.000
);
/* 本次最大收货数量*/
private
BigDecimal
bcMaxReceiveQty
=
new
BigDecimal
(
0.000
);
/* 本次最大收货数量*/
private
BigDecimal
bcReceiveWeight
=
new
BigDecimal
(
0.000
);
/* 本次收货重量*/
private
BigDecimal
bcMaxReceiveWeight
=
new
BigDecimal
(
0.000
);
/* 本次最大收货重量*/
private
String
contractDate
=
" "
;
/* 合同日期*/
private
String
contractDate
=
" "
;
/* 合同日期*/
private
String
contractNo
=
" "
;
/* 合同号*/
private
String
contractNo
=
" "
;
/* 合同号*/
private
String
planNo
=
" "
;
/* 计划单号*/
private
String
planNo
=
" "
;
/* 计划单号*/
...
@@ -359,7 +363,22 @@ public class HGCG002B extends DaoEPBase {
...
@@ -359,7 +363,22 @@ public class HGCG002B extends DaoEPBase {
eiColumn
.
setFieldLength
(
20
);
eiColumn
.
setFieldLength
(
20
);
eiColumn
.
setDescName
(
"本次最大收货数量"
);
eiColumn
.
setDescName
(
"本次最大收货数量"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_BC_RECEIVE_WEIGHT
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
3
);
eiColumn
.
setFieldLength
(
20
);
eiColumn
.
setDescName
(
"本次收货重量"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_BC_MAX_RECEIVE_WEIGHT
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
3
);
eiColumn
.
setFieldLength
(
20
);
eiColumn
.
setDescName
(
"本次最大收货重量"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_CONTRACT_DATE
);
eiColumn
=
new
EiColumn
(
FIELD_CONTRACT_DATE
);
eiColumn
.
setDescName
(
"合同日期"
);
eiColumn
.
setDescName
(
"合同日期"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiMetadata
.
addMeta
(
eiColumn
);
...
@@ -956,7 +975,23 @@ public class HGCG002B extends DaoEPBase {
...
@@ -956,7 +975,23 @@ public class HGCG002B extends DaoEPBase {
public
void
setBcMaxReceiveQty
(
BigDecimal
bcMaxReceiveQty
)
{
public
void
setBcMaxReceiveQty
(
BigDecimal
bcMaxReceiveQty
)
{
this
.
bcMaxReceiveQty
=
bcMaxReceiveQty
;
this
.
bcMaxReceiveQty
=
bcMaxReceiveQty
;
}
}
public
BigDecimal
getBcReceiveWeight
()
{
return
bcReceiveWeight
;
}
public
void
setBcReceiveWeight
(
BigDecimal
bcReceiveWeight
)
{
this
.
bcReceiveWeight
=
bcReceiveWeight
;
}
public
BigDecimal
getBcMaxReceiveWeight
()
{
return
bcMaxReceiveWeight
;
}
public
void
setBcMaxReceiveWeight
(
BigDecimal
bcMaxReceiveWeight
)
{
this
.
bcMaxReceiveWeight
=
bcMaxReceiveWeight
;
}
public
String
getContractDate
()
{
public
String
getContractDate
()
{
return
contractDate
;
return
contractDate
;
}
}
...
@@ -1101,6 +1136,8 @@ public class HGCG002B extends DaoEPBase {
...
@@ -1101,6 +1136,8 @@ public class HGCG002B extends DaoEPBase {
setBcReceiveQty
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_BC_RECEIVE_QTY
)),
bcReceiveQty
));
setBcReceiveQty
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_BC_RECEIVE_QTY
)),
bcReceiveQty
));
setBcMaxReceiveQty
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_BC_MAX_RECEIVE_QTY
)),
bcMaxReceiveQty
));
setBcMaxReceiveQty
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_BC_MAX_RECEIVE_QTY
)),
bcMaxReceiveQty
));
setBcReceiveWeight
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_BC_RECEIVE_WEIGHT
)),
bcReceiveWeight
));
setBcMaxReceiveWeight
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_BC_MAX_RECEIVE_WEIGHT
)),
bcMaxReceiveWeight
));
setContractDate
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_CONTRACT_DATE
)),
contractDate
));
setContractDate
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_CONTRACT_DATE
)),
contractDate
));
setContractNo
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_CONTRACT_NO
)),
contractNo
));
setContractNo
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_CONTRACT_NO
)),
contractNo
));
setPlanNo
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PLAN_NO
)),
planNo
));
setPlanNo
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PLAN_NO
)),
planNo
));
...
@@ -1158,6 +1195,8 @@ public class HGCG002B extends DaoEPBase {
...
@@ -1158,6 +1195,8 @@ public class HGCG002B extends DaoEPBase {
map
.
put
(
FIELD_BC_RECEIVE_QTY
,
StringUtils
.
toString
(
bcReceiveQty
,
eiMetadata
.
getMeta
(
FIELD_BC_RECEIVE_QTY
)));
map
.
put
(
FIELD_BC_RECEIVE_QTY
,
StringUtils
.
toString
(
bcReceiveQty
,
eiMetadata
.
getMeta
(
FIELD_BC_RECEIVE_QTY
)));
map
.
put
(
FIELD_BC_MAX_RECEIVE_QTY
,
StringUtils
.
toString
(
bcMaxReceiveQty
,
eiMetadata
.
getMeta
(
FIELD_BC_MAX_RECEIVE_QTY
)));
map
.
put
(
FIELD_BC_MAX_RECEIVE_QTY
,
StringUtils
.
toString
(
bcMaxReceiveQty
,
eiMetadata
.
getMeta
(
FIELD_BC_MAX_RECEIVE_QTY
)));
map
.
put
(
FIELD_BC_RECEIVE_WEIGHT
,
StringUtils
.
toString
(
bcReceiveWeight
,
eiMetadata
.
getMeta
(
FIELD_BC_RECEIVE_WEIGHT
)));
map
.
put
(
FIELD_BC_MAX_RECEIVE_WEIGHT
,
StringUtils
.
toString
(
bcMaxReceiveWeight
,
eiMetadata
.
getMeta
(
FIELD_BC_MAX_RECEIVE_WEIGHT
)));
map
.
put
(
FIELD_CONTRACT_DATE
,
StringUtils
.
toString
(
contractDate
,
eiMetadata
.
getMeta
(
FIELD_CONTRACT_DATE
)));
map
.
put
(
FIELD_CONTRACT_DATE
,
StringUtils
.
toString
(
contractDate
,
eiMetadata
.
getMeta
(
FIELD_CONTRACT_DATE
)));
map
.
put
(
FIELD_CONTRACT_NO
,
StringUtils
.
toString
(
contractNo
,
eiMetadata
.
getMeta
(
FIELD_CONTRACT_NO
)));
map
.
put
(
FIELD_CONTRACT_NO
,
StringUtils
.
toString
(
contractNo
,
eiMetadata
.
getMeta
(
FIELD_CONTRACT_NO
)));
map
.
put
(
FIELD_PLAN_NO
,
StringUtils
.
toString
(
planNo
,
eiMetadata
.
getMeta
(
FIELD_PLAN_NO
)));
map
.
put
(
FIELD_PLAN_NO
,
StringUtils
.
toString
(
planNo
,
eiMetadata
.
getMeta
(
FIELD_PLAN_NO
)));
...
...
src/main/java/com/baosight/hggp/hg/cg/service/ServiceHGCG001.java
View file @
cb68d56c
...
@@ -101,6 +101,7 @@ public class ServiceHGCG001 extends ServiceBase {
...
@@ -101,6 +101,7 @@ public class ServiceHGCG001 extends ServiceBase {
// 写入数据
// 写入数据
for
(
int
i
=
0
;
i
<
fCg001s
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
fCg001s
.
size
();
i
++)
{
HGCG001
hgcg001
=
fCg001s
.
get
(
i
);
HGCG001
hgcg001
=
fCg001s
.
get
(
i
);
hgcg001
.
setPlanDate
(
DateUtils
.
formatShort
(
hgcg001
.
getPlanDate
()));
if
(
hgcg001
.
getId
()
==
null
||
hgcg001
.
getId
()
==
0
)
{
if
(
hgcg001
.
getId
()
==
null
||
hgcg001
.
getId
()
==
0
)
{
// 修改数据
// 修改数据
this
.
saveData
(
hgcg001
);
this
.
saveData
(
hgcg001
);
...
...
src/main/java/com/baosight/hggp/hg/cg/service/ServiceHGCG002A.java
View file @
cb68d56c
...
@@ -94,11 +94,9 @@ public class ServiceHGCG002A extends ServiceBase {
...
@@ -94,11 +94,9 @@ public class ServiceHGCG002A extends ServiceBase {
@OperationLogAnnotation
(
operModul
=
"采购计划"
,
operType
=
"修改"
,
operDesc
=
"确认"
)
@OperationLogAnnotation
(
operModul
=
"采购计划"
,
operType
=
"修改"
,
operDesc
=
"确认"
)
public
EiInfo
confirm
(
EiInfo
inInfo
)
{
public
EiInfo
confirm
(
EiInfo
inInfo
)
{
try
{
try
{
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
();
List
<
HGCG001A
>
fCg001As
=
MapUtils
.
toDaoEPBases
(
inInfo
,
HGCG001A
.
class
);
List
<
HGCG001A
>
fCg001As
=
MapUtils
.
toDaoEPBases
(
inInfo
,
HGCG001A
.
class
);
// db数据
// db数据
Map
<
Long
,
HGCG001A
>
dbCg001Map
=
this
.
lockGetData
(
fCg001As
);
Map
<
Long
,
HGCG001A
>
dbCg001Map
=
this
.
lockGetData
(
fCg001As
);
//计划主表信息
//计划主表信息
List
<
String
>
planNos
=
fCg001As
.
stream
().
map
(
HGCG001A:
:
getPlanNo
).
collect
(
Collectors
.
toList
());
List
<
String
>
planNos
=
fCg001As
.
stream
().
map
(
HGCG001A:
:
getPlanNo
).
collect
(
Collectors
.
toList
());
Map
<
String
,
HGCG001
>
hgcg001Map
=
HGCGTools
.
HgCg001
.
map
(
planNos
);
Map
<
String
,
HGCG001
>
hgcg001Map
=
HGCGTools
.
HgCg001
.
map
(
planNos
);
...
...
src/main/java/com/baosight/hggp/hg/cg/service/ServiceHGCG003A.java
View file @
cb68d56c
...
@@ -4,7 +4,11 @@ import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
...
@@ -4,7 +4,11 @@ import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import
com.baosight.hggp.common.DdynamicEnum
;
import
com.baosight.hggp.common.DdynamicEnum
;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.core.enums.DeleteFlagEnum
;
import
com.baosight.hggp.core.enums.DeleteFlagEnum
;
import
com.baosight.hggp.hg.cg.domain.*
;
import
com.baosight.hggp.hg.cg.constant.HgCgConst
;
import
com.baosight.hggp.hg.cg.domain.HGCG002
;
import
com.baosight.hggp.hg.cg.domain.HGCG002B
;
import
com.baosight.hggp.hg.cg.domain.HGCG003
;
import
com.baosight.hggp.hg.cg.domain.HGCG003B
;
import
com.baosight.hggp.hg.cg.tools.HGCGTools
;
import
com.baosight.hggp.hg.cg.tools.HGCGTools
;
import
com.baosight.hggp.hg.cg.utils.HGCGUtils
;
import
com.baosight.hggp.hg.cg.utils.HGCGUtils
;
import
com.baosight.hggp.hg.constant.HGConstant
;
import
com.baosight.hggp.hg.constant.HGConstant
;
...
@@ -33,7 +37,7 @@ import java.util.Map;
...
@@ -33,7 +37,7 @@ import java.util.Map;
* @date:2024/5/9,11:04
* @date:2024/5/9,11:04
*/
*/
public
class
ServiceHGCG003A
extends
ServiceBase
{
public
class
ServiceHGCG003A
extends
ServiceBase
{
/**
/**
* 画面初始化
* 画面初始化
*
*
...
@@ -54,7 +58,7 @@ public class ServiceHGCG003A extends ServiceBase {
...
@@ -54,7 +58,7 @@ public class ServiceHGCG003A extends ServiceBase {
}
}
return
inInfo
;
return
inInfo
;
}
}
/**
/**
* 查询操作
* 查询操作
*
*
...
@@ -75,7 +79,7 @@ public class ServiceHGCG003A extends ServiceBase {
...
@@ -75,7 +79,7 @@ public class ServiceHGCG003A extends ServiceBase {
}
}
return
inInfo
;
return
inInfo
;
}
}
/**
/**
* 确认操作.
* 确认操作.
*
*
...
@@ -103,10 +107,11 @@ public class ServiceHGCG003A extends ServiceBase {
...
@@ -103,10 +107,11 @@ public class ServiceHGCG003A extends ServiceBase {
}
}
return
inInfo
;
return
inInfo
;
}
}
/**
/**
* 数据校验
* 数据校验
* @param fCg002Bs
*
* @param fCg002Bs
* @param dbCg002BMap
* @param dbCg002BMap
* @param cg001
* @param cg001
*/
*/
...
@@ -120,6 +125,9 @@ public class ServiceHGCG003A extends ServiceBase {
...
@@ -120,6 +125,9 @@ public class ServiceHGCG003A extends ServiceBase {
AssertUtils
.
isGt
(
fCg002B
.
getBcReceiveQty
(),
fCg002B
.
getBcMaxReceiveQty
(),
AssertUtils
.
isGt
(
fCg002B
.
getBcReceiveQty
(),
fCg002B
.
getBcMaxReceiveQty
(),
String
.
format
(
"合同[%s]本次收货数量(%s)不能大于本次最大收货数量(%s)"
,
cg001
.
getContractNo
(),
String
.
format
(
"合同[%s]本次收货数量(%s)不能大于本次最大收货数量(%s)"
,
cg001
.
getContractNo
(),
fCg002B
.
getBcReceiveQty
(),
fCg002B
.
getBcMaxReceiveQty
()));
fCg002B
.
getBcReceiveQty
(),
fCg002B
.
getBcMaxReceiveQty
()));
AssertUtils
.
isGt
(
fCg002B
.
getBcReceiveWeight
(),
fCg002B
.
getBcMaxReceiveWeight
(),
String
.
format
(
"合同[%s]本次收货重量(%s)不能大于本次最大收货重量(%s)"
,
cg001
.
getContractNo
(),
fCg002B
.
getBcReceiveWeight
(),
fCg002B
.
getBcMaxReceiveWeight
()));
}
}
}
}
...
@@ -135,9 +143,19 @@ public class ServiceHGCG003A extends ServiceBase {
...
@@ -135,9 +143,19 @@ public class ServiceHGCG003A extends ServiceBase {
Long
id
=
fCg002B
.
getId
();
Long
id
=
fCg002B
.
getId
();
HGCG002B
dbCg002b
=
dbCg002BMap
.
get
(
id
);
HGCG002B
dbCg002b
=
dbCg002BMap
.
get
(
id
);
// 总重
// 总重
fCg002B
.
setReceiveWeight
(
fCg002B
.
getBcReceiveQty
().
multiply
(
dbCg002b
.
getPurUnitWeight
()));
BigDecimal
bcReceiveWeight
=
fCg002B
.
getBcReceiveWeight
();
if
(
bcReceiveWeight
==
null
||
bcReceiveWeight
.
compareTo
(
BigDecimal
.
ZERO
)
==
0
)
{
fCg002B
.
setReceiveWeight
(
fCg002B
.
getBcReceiveQty
().
multiply
(
dbCg002b
.
getPurUnitWeight
()));
}
else
{
fCg002B
.
setReceiveWeight
(
bcReceiveWeight
);
}
// 含税总金额
// 含税总金额
BigDecimal
amount
=
fCg002B
.
getReceiveWeight
().
multiply
(
dbCg002b
.
getPrice
());
BigDecimal
amount
;
if
(
HgCgConst
.
CalculationMethod
.
S1
.
equals
(
fCg002B
.
getCalculationMethod
()))
{
amount
=
fCg002B
.
getReceiveWeight
().
multiply
(
dbCg002b
.
getPrice
());
}
else
{
amount
=
fCg002B
.
getBcReceiveQty
().
multiply
(
dbCg002b
.
getPrice
());
}
// 如果税率不为空,总金额减去税额
// 如果税率不为空,总金额减去税额
if
(
dbCg002b
.
getTaxRate
()
!=
null
)
{
if
(
dbCg002b
.
getTaxRate
()
!=
null
)
{
amount
=
amount
.
subtract
(
amount
.
multiply
(
dbCg002b
.
getTaxRate
()).
divide
(
new
BigDecimal
(
"100"
)));
amount
=
amount
.
subtract
(
amount
.
multiply
(
dbCg002b
.
getTaxRate
()).
divide
(
new
BigDecimal
(
"100"
)));
...
@@ -213,5 +231,5 @@ public class ServiceHGCG003A extends ServiceBase {
...
@@ -213,5 +231,5 @@ public class ServiceHGCG003A extends ServiceBase {
// 更新合同状态
// 更新合同状态
HGCGTools
.
HgCg002B
.
updateReceive
(
dbCg002b
,
cg003B
.
getReceiveQty
());
HGCGTools
.
HgCg002B
.
updateReceive
(
dbCg002b
,
cg003B
.
getReceiveQty
());
}
}
}
}
src/main/java/com/baosight/hggp/hg/cg/service/ServiceHGCG003B.java
View file @
cb68d56c
...
@@ -6,7 +6,11 @@ import com.baosight.hggp.common.InventTypeDetailEnum;
...
@@ -6,7 +6,11 @@ import com.baosight.hggp.common.InventTypeDetailEnum;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.core.enums.DeleteFlagEnum
;
import
com.baosight.hggp.core.enums.DeleteFlagEnum
;
import
com.baosight.hggp.core.security.UserSessionUtils
;
import
com.baosight.hggp.core.security.UserSessionUtils
;
import
com.baosight.hggp.hg.cg.domain.*
;
import
com.baosight.hggp.hg.cg.domain.HGCG002
;
import
com.baosight.hggp.hg.cg.domain.HGCG002A
;
import
com.baosight.hggp.hg.cg.domain.HGCG002B
;
import
com.baosight.hggp.hg.cg.domain.HGCG003
;
import
com.baosight.hggp.hg.cg.domain.HGCG003B
;
import
com.baosight.hggp.hg.cg.tools.HGCGTools
;
import
com.baosight.hggp.hg.cg.tools.HGCGTools
;
import
com.baosight.hggp.hg.cg.utils.HGCGUtils
;
import
com.baosight.hggp.hg.cg.utils.HGCGUtils
;
import
com.baosight.hggp.hg.constant.HGConstant
;
import
com.baosight.hggp.hg.constant.HGConstant
;
...
@@ -14,21 +18,30 @@ import com.baosight.hggp.hg.constant.HGSqlConstant;
...
@@ -14,21 +18,30 @@ import com.baosight.hggp.hg.constant.HGSqlConstant;
import
com.baosight.hggp.hg.pz.domain.HGPZ004
;
import
com.baosight.hggp.hg.pz.domain.HGPZ004
;
import
com.baosight.hggp.hg.pz.domain.HGPZ005
;
import
com.baosight.hggp.hg.pz.domain.HGPZ005
;
import
com.baosight.hggp.hg.xs.domain.Company
;
import
com.baosight.hggp.hg.xs.domain.Company
;
import
com.baosight.hggp.util.*
;
import
com.baosight.hggp.util.AssertUtils
;
import
com.baosight.hggp.util.CommonMethod
;
import
com.baosight.hggp.util.DateUtils
;
import
com.baosight.hggp.util.EiInfoUtils
;
import
com.baosight.hggp.util.LogUtils
;
import
com.baosight.hggp.util.MapUtils
;
import
com.baosight.hggp.util.ObjectUtils
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
import
com.baosight.iplat4j.core.ei.EiInfo
;
import
com.baosight.iplat4j.core.ei.EiInfo
;
import
com.baosight.iplat4j.core.service.impl.ServiceBase
;
import
com.baosight.iplat4j.core.service.impl.ServiceBase
;
import
com.baosight.iplat4j.ed.util.SequenceGenerator
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.util.*
;
import
java.util.Arrays
;
import
java.util.HashMap
;
import
java.util.LinkedList
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
* @author:songx
* @author:songx
* @date:2024/5/9,11:04
* @date:2024/5/9,11:04
*/
*/
public
class
ServiceHGCG003B
extends
ServiceBase
{
public
class
ServiceHGCG003B
extends
ServiceBase
{
/**
/**
* 画面初始化
* 画面初始化
*
*
...
@@ -41,18 +54,18 @@ public class ServiceHGCG003B extends ServiceBase {
...
@@ -41,18 +54,18 @@ public class ServiceHGCG003B extends ServiceBase {
try
{
try
{
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
INVENT_TYPE_BOX_BLOCK_ID
),
null
,
false
);
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
INVENT_TYPE_BOX_BLOCK_ID
),
null
,
false
);
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
INVENT_RECORD_BOX_BLOCK_ID
),
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
INVENT_RECORD_BOX_BLOCK_ID
),
new
HashMap
<
String
,
Object
>(){{
new
HashMap
<
String
,
Object
>()
{{
put
(
HGPZ005
.
FIELD_STATUS
,
1
);
put
(
HGPZ005
.
FIELD_STATUS
,
1
);
put
(
HGPZ004
.
FIELD_INVENT_TYPE_DETAILS
,
InventTypeDetailEnum
.
getProdTypeFour
());
put
(
HGPZ004
.
FIELD_INVENT_TYPE_DETAILS
,
InventTypeDetailEnum
.
getProdTypeFour
());
}},
false
);
}},
false
);
EiInfoUtils
.
addBlock
(
inInfo
,
"roleCompany"
,
UserSessionUtils
.
getRoleCompany
(),
Company
.
class
);
EiInfoUtils
.
addBlock
(
inInfo
,
"roleCompany"
,
UserSessionUtils
.
getRoleCompany
(),
Company
.
class
);
inInfo
.
addBlock
(
EiConstant
.
resultBlock
).
addBlockMeta
(
new
HGCG003B
().
eiMetadata
);
inInfo
.
addBlock
(
EiConstant
.
resultBlock
).
addBlockMeta
(
new
HGCG003B
().
eiMetadata
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"初始化失败"
);
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"初始化失败"
);
}
}
return
inInfo
;
return
inInfo
;
}
}
/**
/**
* 查询操作
* 查询操作
*
*
...
@@ -69,7 +82,7 @@ public class ServiceHGCG003B extends ServiceBase {
...
@@ -69,7 +82,7 @@ public class ServiceHGCG003B extends ServiceBase {
}
}
return
inInfo
;
return
inInfo
;
}
}
/**
/**
* 保存操作.
* 保存操作.
*
*
...
@@ -81,7 +94,7 @@ public class ServiceHGCG003B extends ServiceBase {
...
@@ -81,7 +94,7 @@ public class ServiceHGCG003B extends ServiceBase {
try
{
try
{
List
<
HGCG003B
>
fCg003Bs
=
MapUtils
.
toDaoEPBases
(
inInfo
,
HGCG003B
.
class
);
List
<
HGCG003B
>
fCg003Bs
=
MapUtils
.
toDaoEPBases
(
inInfo
,
HGCG003B
.
class
);
HGCG003
cg003
=
HGCGTools
.
HgCg003
.
get
(
fCg003Bs
.
get
(
0
).
getPrimaryId
());
HGCG003
cg003
=
HGCGTools
.
HgCg003
.
get
(
fCg003Bs
.
get
(
0
).
getPrimaryId
());
if
(
cg003
.
getSource
().
intValue
()
==
HGConstant
.
CgSource
.
DEFAULT
)
{
if
(
cg003
.
getSource
().
intValue
()
==
HGConstant
.
CgSource
.
DEFAULT
)
{
// 采购收货DB数据
// 采购收货DB数据
Map
<
Long
,
HGCG003B
>
dbCg003BMap
=
HGCGUtils
.
HgCg003B
.
lockGetDataEp
(
fCg003Bs
);
Map
<
Long
,
HGCG003B
>
dbCg003BMap
=
HGCGUtils
.
HgCg003B
.
lockGetDataEp
(
fCg003Bs
);
// 采购合同DB数据
// 采购合同DB数据
...
@@ -91,16 +104,16 @@ public class ServiceHGCG003B extends ServiceBase {
...
@@ -91,16 +104,16 @@ public class ServiceHGCG003B extends ServiceBase {
Map
<
Long
,
HGCG002B
>
dbCg002BMap
=
HGCGUtils
.
HgCg002B
.
lockGetData
(
Map
<
Long
,
HGCG002B
>
dbCg002BMap
=
HGCGUtils
.
HgCg002B
.
lockGetData
(
ObjectUtils
.
listEpKey
(
fCg003Bs
,
HGCG003B
.
FIELD_CONTRACT_DETAIL_ID
));
ObjectUtils
.
listEpKey
(
fCg003Bs
,
HGCG003B
.
FIELD_CONTRACT_DETAIL_ID
));
// 数据校验
// 数据校验
this
.
checkEditData
(
fCg003Bs
,
dbCg003BMap
,
cg003
);
this
.
checkEditData
(
fCg003Bs
,
dbCg003BMap
,
cg003
);
// 保存数据
// 保存数据
this
.
editData
(
fCg003Bs
,
dbCg003BMap
,
dbCg002AMap
,
cg003
,
dbCg002BMap
);
this
.
editData
(
fCg003Bs
,
dbCg003BMap
,
dbCg002AMap
,
cg003
,
dbCg002BMap
);
}
else
{
}
else
{
// 写入数据
// 写入数据
for
(
int
i
=
0
;
i
<
fCg003Bs
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
fCg003Bs
.
size
();
i
++)
{
HGCG003B
hgcg003B
=
fCg003Bs
.
get
(
i
);
HGCG003B
hgcg003B
=
fCg003Bs
.
get
(
i
);
if
(
hgcg003B
.
getId
()
==
null
||
hgcg003B
.
getId
()
==
0
)
{
if
(
hgcg003B
.
getId
()
==
null
||
hgcg003B
.
getId
()
==
0
)
{
// 修改数据
// 修改数据
this
.
saveData
(
hgcg003B
,
cg003
);
this
.
addData
(
hgcg003B
,
cg003
);
}
else
{
}
else
{
this
.
updateData
(
hgcg003B
);
this
.
updateData
(
hgcg003B
);
}
}
...
@@ -108,7 +121,6 @@ public class ServiceHGCG003B extends ServiceBase {
...
@@ -108,7 +121,6 @@ public class ServiceHGCG003B extends ServiceBase {
//修改主表信息
//修改主表信息
updateCg003Pur
(
cg003
);
updateCg003Pur
(
cg003
);
}
}
inInfo
=
this
.
query
(
inInfo
);
inInfo
=
this
.
query
(
inInfo
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
fCg003Bs
.
size
()
+
"]条数据保存成功!"
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
fCg003Bs
.
size
()
+
"]条数据保存成功!"
);
...
@@ -117,10 +129,11 @@ public class ServiceHGCG003B extends ServiceBase {
...
@@ -117,10 +129,11 @@ public class ServiceHGCG003B extends ServiceBase {
}
}
return
inInfo
;
return
inInfo
;
}
}
/**
/**
* 数据校验
* 数据校验
* @param fCg003Bs
*
* @param fCg003Bs
* @param dbCg003Map
* @param dbCg003Map
* @param cg003
* @param cg003
*/
*/
...
@@ -146,9 +159,10 @@ public class ServiceHGCG003B extends ServiceBase {
...
@@ -146,9 +159,10 @@ public class ServiceHGCG003B extends ServiceBase {
}
}
}
}
}
}
/**
/**
* 数据保存
* 数据保存
*
* @param fCg003Bs
* @param fCg003Bs
* @param dbCg003BMap
* @param dbCg003BMap
* @param dbCg002AMap
* @param dbCg002AMap
...
@@ -167,7 +181,7 @@ public class ServiceHGCG003B extends ServiceBase {
...
@@ -167,7 +181,7 @@ public class ServiceHGCG003B extends ServiceBase {
HGCGTools
.
HgCg002B
.
updateReceive
(
dbCg002BMap
.
get
(
fCg003B
.
getContractDetailId
()),
diffQty
);
HGCGTools
.
HgCg002B
.
updateReceive
(
dbCg002BMap
.
get
(
fCg003B
.
getContractDetailId
()),
diffQty
);
}
}
List
<
HGCG002
>
hgcg002List
=
new
LinkedList
<>();
List
<
HGCG002
>
hgcg002List
=
new
LinkedList
<>();
dbCg002AMap
.
forEach
((
k
,
v
)
->
{
dbCg002AMap
.
forEach
((
k
,
v
)
->
{
hgcg002List
.
add
(
v
);
hgcg002List
.
add
(
v
);
});
});
//根据子表明细刷新合同主表信息
//根据子表明细刷新合同主表信息
...
@@ -175,9 +189,14 @@ public class ServiceHGCG003B extends ServiceBase {
...
@@ -175,9 +189,14 @@ public class ServiceHGCG003B extends ServiceBase {
//修改主表信息
//修改主表信息
updateCg003Pur
(
cg003
);
updateCg003Pur
(
cg003
);
}
}
private
void
saveData
(
HGCG003B
hgcg003B
,
HGCG003
cg003
)
{
/**
// 新增数据
* 新增数据
*
* @param hgcg003B
* @param cg003
*/
private
void
addData
(
HGCG003B
hgcg003B
,
HGCG003
cg003
)
{
hgcg003B
.
setPrimaryId
(
cg003
.
getId
());
hgcg003B
.
setPrimaryId
(
cg003
.
getId
());
hgcg003B
.
setReceiveNo
(
cg003
.
getReceiveNo
());
hgcg003B
.
setReceiveNo
(
cg003
.
getReceiveNo
());
hgcg003B
.
setStatus
(
HGConstant
.
CgReceiveStatus
.
S_0
);
hgcg003B
.
setStatus
(
HGConstant
.
CgReceiveStatus
.
S_0
);
...
@@ -189,24 +208,30 @@ public class ServiceHGCG003B extends ServiceBase {
...
@@ -189,24 +208,30 @@ public class ServiceHGCG003B extends ServiceBase {
hgcg003B
.
setAccountCode
(
cg003
.
getAccountCode
());
hgcg003B
.
setAccountCode
(
cg003
.
getAccountCode
());
DaoUtils
.
insert
(
HGCG003B
.
INSERT
,
hgcg003B
);
DaoUtils
.
insert
(
HGCG003B
.
INSERT
,
hgcg003B
);
}
}
/**
* 修改数据
*
* @param hgcg003B
*/
private
void
updateData
(
HGCG003B
hgcg003B
)
{
private
void
updateData
(
HGCG003B
hgcg003B
)
{
// 新增数据
DaoUtils
.
update
(
HGCG003B
.
UPDATE
,
hgcg003B
);
DaoUtils
.
update
(
HGCG003B
.
UPDATE
,
hgcg003B
);
}
}
private
void
updateCg003Pur
(
HGCG003
cg003
)
{
private
void
updateCg003Pur
(
HGCG003
cg003
)
{
List
<
HGCG003B
>
queryCG003Bs
=
HGCGTools
.
HgCg003B
.
listByPrimaryId
(
cg003
.
getId
());
List
<
HGCG003B
>
queryCG003Bs
=
HGCGTools
.
HgCg003B
.
listByPrimaryId
(
cg003
.
getId
());
//修改主表信息
//修改主表信息
//收货数量
//收货数量
BigDecimal
receiveQtySum
=
queryCG003Bs
.
stream
().
map
(
HGCG003B:
:
getReceiveQty
).
reduce
(
BigDecimal
.
ZERO
,
BigDecimal:
:
add
);
BigDecimal
receiveQtySum
=
queryCG003Bs
.
stream
().
map
(
HGCG003B:
:
getReceiveQty
)
.
reduce
(
BigDecimal
.
ZERO
,
BigDecimal:
:
add
);
cg003
.
setReceiveQty
(
receiveQtySum
);
cg003
.
setReceiveQty
(
receiveQtySum
);
//收货重量
//收货重量
BigDecimal
receiveWeightSum
=
queryCG003Bs
.
stream
().
map
(
HGCG003B:
:
getReceiveWeight
).
reduce
(
BigDecimal
.
ZERO
,
BigDecimal:
:
add
);
BigDecimal
receiveWeightSum
=
queryCG003Bs
.
stream
().
map
(
HGCG003B:
:
getReceiveWeight
)
.
reduce
(
BigDecimal
.
ZERO
,
BigDecimal:
:
add
);
cg003
.
setReceiveWeight
(
receiveWeightSum
);
cg003
.
setReceiveWeight
(
receiveWeightSum
);
DaoUtils
.
update
(
HGSqlConstant
.
HgCg003
.
UPDATE_QTY
,
cg003
);
DaoUtils
.
update
(
HGSqlConstant
.
HgCg003
.
UPDATE_QTY
,
cg003
);
}
}
/**
/**
* 删除操作.
* 删除操作.
*
*
...
@@ -227,9 +252,9 @@ public class ServiceHGCG003B extends ServiceBase {
...
@@ -227,9 +252,9 @@ public class ServiceHGCG003B extends ServiceBase {
Map
<
Long
,
HGCG002B
>
dbCg002BMap
=
HGCGUtils
.
HgCg002B
.
lockGetData
(
Map
<
Long
,
HGCG002B
>
dbCg002BMap
=
HGCGUtils
.
HgCg002B
.
lockGetData
(
ObjectUtils
.
listEpKey
(
fCg003Bs
,
HGCG003B
.
FIELD_CONTRACT_DETAIL_ID
));
ObjectUtils
.
listEpKey
(
fCg003Bs
,
HGCG003B
.
FIELD_CONTRACT_DETAIL_ID
));
// 数据校验
// 数据校验
this
.
checkRemoveData
(
fCg003Bs
,
dbCg003BMap
,
cg003
);
this
.
checkRemoveData
(
fCg003Bs
,
dbCg003BMap
,
cg003
);
// 保存数据
// 保存数据
this
.
removeData
(
fCg003Bs
,
dbCg003BMap
,
dbCg002AMap
,
cg003
,
dbCg002BMap
);
this
.
removeData
(
fCg003Bs
,
dbCg003BMap
,
dbCg002AMap
,
cg003
,
dbCg002BMap
);
inInfo
=
this
.
query
(
inInfo
);
inInfo
=
this
.
query
(
inInfo
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
fCg003Bs
.
size
()
+
"]条数据删除成功!"
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
fCg003Bs
.
size
()
+
"]条数据删除成功!"
);
...
@@ -238,10 +263,11 @@ public class ServiceHGCG003B extends ServiceBase {
...
@@ -238,10 +263,11 @@ public class ServiceHGCG003B extends ServiceBase {
}
}
return
inInfo
;
return
inInfo
;
}
}
/**
/**
* 数据校验
* 数据校验
* @param fCg003Bs
*
* @param fCg003Bs
* @param dbCg003BMap
* @param dbCg003BMap
* @param cg003
* @param cg003
*/
*/
...
@@ -254,9 +280,10 @@ public class ServiceHGCG003B extends ServiceBase {
...
@@ -254,9 +280,10 @@ public class ServiceHGCG003B extends ServiceBase {
String
.
format
(
"收货单[%s]状态不是\"待确认\",不允许操作"
,
receiveNo
));
String
.
format
(
"收货单[%s]状态不是\"待确认\",不允许操作"
,
receiveNo
));
}
}
}
}
/**
/**
* 数据保存
* 数据保存
*
* @param fCg003Bs
* @param fCg003Bs
* @param dbCg003bMap
* @param dbCg003bMap
* @param dbCg002AMap
* @param dbCg002AMap
...
@@ -276,12 +303,12 @@ public class ServiceHGCG003B extends ServiceBase {
...
@@ -276,12 +303,12 @@ public class ServiceHGCG003B extends ServiceBase {
dbCg003B
.
getReceiveQty
().
negate
());
dbCg003B
.
getReceiveQty
().
negate
());
}
}
List
<
HGCG002
>
hgcg002List
=
new
LinkedList
<>();
List
<
HGCG002
>
hgcg002List
=
new
LinkedList
<>();
dbCg002AMap
.
forEach
((
k
,
v
)
->
{
dbCg002AMap
.
forEach
((
k
,
v
)
->
{
hgcg002List
.
add
(
v
);
hgcg002List
.
add
(
v
);
});
});
//根据子表明细刷新合同主表信息
//根据子表明细刷新合同主表信息
HGCGTools
.
HgCg002
.
updateContractPrimary
(
hgcg002List
);
HGCGTools
.
HgCg002
.
updateContractPrimary
(
hgcg002List
);
}
else
{
}
else
{
//手工录入的
//手工录入的
for
(
HGCG003B
fCg003B
:
fCg003Bs
)
{
for
(
HGCG003B
fCg003B
:
fCg003Bs
)
{
HGCG003B
dbCg003B
=
dbCg003bMap
.
get
(
fCg003B
.
getId
());
HGCG003B
dbCg003B
=
dbCg003bMap
.
get
(
fCg003B
.
getId
());
...
@@ -292,5 +319,5 @@ public class ServiceHGCG003B extends ServiceBase {
...
@@ -292,5 +319,5 @@ public class ServiceHGCG003B extends ServiceBase {
//修改主表信息
//修改主表信息
updateCg003Pur
(
cg003
);
updateCg003Pur
(
cg003
);
}
}
}
}
src/main/java/com/baosight/hggp/hg/cg/sql/HGCG001.xml
View file @
cb68d56c
...
@@ -210,6 +210,19 @@
...
@@ -210,6 +210,19 @@
</update>
</update>
<!-- 修改采购信息 -->
<!-- 修改采购信息 -->
<update
id=
"update"
>
UPDATE ${hggpSchema}.HGCG001
SET
COMPANY_CODE = #companyCode#,
COMPANY_NAME = #companyName#,
PROJ_CODE = #projCode#,
PROJ_NAME = #projName#,
PLAN_DATE = #planDate#,
<include
refid=
"updateRevise"
/>
WHERE PLAN_NO = #planNo#
</update>
<!-- 修改采购信息 -->
<update
id=
"updatePur"
>
<update
id=
"updatePur"
>
UPDATE ${hggpSchema}.HGCG001
UPDATE ${hggpSchema}.HGCG001
SET
SET
...
...
src/main/java/com/baosight/hggp/hg/cg/sql/HGCG002A.xml
View file @
cb68d56c
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap
PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org
/dtd/sql-map-2.dtd">
<!DOCTYPE sqlMap
PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com
/dtd/sql-map-2.dtd">
<sqlMap
namespace=
"HGCG002A"
>
<sqlMap
namespace=
"HGCG002A"
>
<sql
id=
"condition"
>
<sql
id=
"condition"
>
AND DELETE_FLAG = 0
AND DELETE_FLAG = 0
<isNotEmpty
prepend=
" AND "
property=
"id"
>
<isNotEmpty
prepend=
" AND "
property=
"id"
>
ID = #id#
ID = #id#
...
@@ -116,6 +116,7 @@
...
@@ -116,6 +116,7 @@
CALCULATION_METHOD = #calculationMethod#
CALCULATION_METHOD = #calculationMethod#
</isNotEmpty>
</isNotEmpty>
</sql>
</sql>
<!-- 公共修改字段 -->
<!-- 公共修改字段 -->
<sql
id=
"updateRevise"
>
<sql
id=
"updateRevise"
>
UPDATED_BY = #updatedBy#,
UPDATED_BY = #updatedBy#,
...
@@ -292,9 +293,8 @@
...
@@ -292,9 +293,8 @@
</update>
</update>
<select
id=
"queryByReceive"
parameterClass=
"java.util.HashMap"
<select
id=
"queryByReceive"
resultClass=
"com.baosight.hggp.hg.cg.domain.HGCG002B"
>
resultClass=
"com.baosight.hggp.hg.cg.domain.HGCG002B"
>
SELECT
SELECT
a.ID as "id",
a.ID as "id",
a.ACCOUNT_CODE as "accountCode",
<!-- 企业编码 -->
a.ACCOUNT_CODE as "accountCode",
<!-- 企业编码 -->
a.DEP_CODE as "depCode",
<!-- 部门编码 -->
a.DEP_CODE as "depCode",
<!-- 部门编码 -->
...
@@ -329,6 +329,7 @@
...
@@ -329,6 +329,7 @@
a.INVENT_TYPE_DETAIL as "inventTypeDetail",
<!-- 存货类型大类 -->
a.INVENT_TYPE_DETAIL as "inventTypeDetail",
<!-- 存货类型大类 -->
a.PRIMARY_ID as "primaryId",
<!-- 主表id -->
a.PRIMARY_ID as "primaryId",
<!-- 主表id -->
(a.PUR_QTY - a.RECEIVE_QTY) as "bcMaxReceiveQty",
(a.PUR_QTY - a.RECEIVE_QTY) as "bcMaxReceiveQty",
(a.PUR_WEIGHT - a.RECEIVE_WEIGHT) as "bcMaxReceiveWeight",
a.PROJ_CODE as "projCode",
<!-- 项目编码 -->
a.PROJ_CODE as "projCode",
<!-- 项目编码 -->
a.PROJ_NAME as "projName",
<!-- 项目名称 -->
a.PROJ_NAME as "projName",
<!-- 项目名称 -->
a.CALCULATION_METHOD as "calculationMethod",
<!-- 计算方式 0-数量乘单价 1-重量乘单价 -->
a.CALCULATION_METHOD as "calculationMethod",
<!-- 计算方式 0-数量乘单价 1-重量乘单价 -->
...
@@ -341,10 +342,11 @@
...
@@ -341,10 +342,11 @@
b.PUR_USER_ID as "purUserId",
<!-- 采购员 -->
b.PUR_USER_ID as "purUserId",
<!-- 采购员 -->
b.PUR_USER_NAME as "purUserName"
<!-- 采购员名称 -->
b.PUR_USER_NAME as "purUserName"
<!-- 采购员名称 -->
FROM ${hggpSchema}.HGCG002A a
FROM ${hggpSchema}.HGCG002A a
LEFT JOIN ${hggpSchema}.HGCG002 b ON a.PRIMARY_ID = b.id
LEFT JOIN ${hggpSchema}.HGCG002 b ON a.PRIMARY_ID = b.id
WHERE 1=1
WHERE 1=1
AND a.DELETE_FLAG = 0
AND a.DELETE_FLAG = 0
AND b.DELETE_FLAG = 0
AND b.DELETE_FLAG = 0
AND (a.PUR_QTY - a.RECEIVE_QTY) > 0
<isNotEmpty
prepend=
" AND "
property=
"id"
>
<isNotEmpty
prepend=
" AND "
property=
"id"
>
a.ID = #id#
a.ID = #id#
</isNotEmpty>
</isNotEmpty>
...
...
src/main/java/com/baosight/hggp/hg/cg/sql/HGCG003A.xml
View file @
cb68d56c
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap
PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org
/dtd/sql-map-2.dtd">
<!DOCTYPE sqlMap
PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com
/dtd/sql-map-2.dtd">
<sqlMap
namespace=
"HGCG003A"
>
<sqlMap
namespace=
"HGCG003A"
>
<sql
id=
"condition"
>
<sql
id=
"condition"
>
AND DELETE_FLAG = 0
AND DELETE_FLAG = 0
<include
refid=
"idCondition"
/>
<include
refid=
"idCondition"
/>
<isNotEmpty
prepend=
" AND "
property=
"accountCode"
>
<isNotEmpty
prepend=
" AND "
property=
"accountCode"
>
...
@@ -259,52 +259,42 @@
...
@@ -259,52 +259,42 @@
ID = #id#
ID = #id#
</delete>
</delete>
<update
id=
"update"
>
<update
id=
"update"
>
UPDATE ${hggpSchema}.HGCG003A
UPDATE ${hggpSchema}.HGCG003A
SET
SET
ACCOUNT_CODE = #accountCode#,
<!-- 企业编码 -->
UPDATED_BY = #updatedBy#,
<!-- 记录修改者 -->
DEP_CODE = #depCode#,
<!-- 部门编码 -->
UPDATED_NAME = #updatedName#,
<!-- 记录修改名称 -->
CREATED_BY = #createdBy#,
<!-- 记录创建者 -->
UPDATED_TIME = #updatedTime#,
<!-- 记录修改时间 -->
CREATED_NAME = #createdName#,
<!-- 记录创建名称 -->
COMPANY_CODE = #companyCode#,
<!-- 公司编码 -->
CREATED_TIME = #createdTime#,
<!-- 记录创建时间 -->
COMPANY_NAME = #companyName#,
<!-- 公司名称 -->
UPDATED_BY = #updatedBy#,
<!-- 记录修改者 -->
RECEIVE_DATE = #receiveDate#,
<!-- 收货日期 -->
UPDATED_NAME = #updatedName#,
<!-- 记录修改名称 -->
RECEIVE_NO = #receiveNo#,
<!-- 收货单号 -->
UPDATED_TIME = #updatedTime#,
<!-- 记录修改时间 -->
CONTRACT_NO = #contractNo#,
<!-- 合同号 -->
DELETE_FLAG = #deleteFlag#,
<!-- 0-未删除,1-已删除 -->
INVENT_TYPE = #inventType#,
<!-- 存货类型 -->
COMPANY_CODE = #companyCode#,
<!-- 公司编码 -->
INVENT_CODE = #inventCode#,
<!-- 存货编码 -->
COMPANY_NAME = #companyName#,
<!-- 公司名称 -->
INVENT_NAME = #inventName#,
<!-- 存货名称 -->
RECEIVE_DATE = #receiveDate#,
<!-- 收货日期 -->
SPEC_ID = #specId#,
<!-- 规格ID -->
RECEIVE_NO = #receiveNo#,
<!-- 收货单号 -->
SPEC = #spec#,
<!-- 规格 -->
PLAN_NO = #planNo#,
<!-- 计划单号 -->
MATERIAL = #material#,
<!-- 材质 -->
CONTRACT_NO = #contractNo#,
<!-- 合同号 -->
UNIT = #unit#,
<!-- 单位 -->
INVENT_TYPE = #inventType#,
<!-- 存货类型 -->
LENGTH = #length#,
<!-- 长度 -->
INVENT_CODE = #inventCode#,
<!-- 存货编码 -->
WIDTH = #width#,
<!-- 宽度 -->
INVENT_NAME = #inventName#,
<!-- 存货名称 -->
THICK = #thick#,
<!-- 厚度 -->
SPEC_ID = #specId#,
<!-- 规格ID -->
RECEIVE_QTY = #receiveQty#,
<!-- 收货数量 -->
SPEC = #spec#,
<!-- 规格 -->
RECEIVE_UNIT_WEIGHT = #receiveUnitWeight#,
<!-- 收货单重 -->
MATERIAL = #material#,
<!-- 材质 -->
RECEIVE_WEIGHT = #receiveWeight#,
<!-- 收货重量 -->
UNIT = #unit#,
<!-- 单位 -->
STATUS = #status#,
<!-- 状态:0-已收货,1-已入库,2-部分入库,3-退货 -->
LENGTH = #length#,
<!-- 长度 -->
PRICE = #price#,
<!-- 单价 -->
WIDTH = #width#,
<!-- 宽度 -->
AMOUNT = #amount#,
<!-- 金额(不含税金额) -->
THICK = #thick#,
<!-- 厚度 -->
INVENT_TYPE_DETAIL = #inventTypeDetail#,
<!-- 存货类型大类 -->
RECEIVE_QTY = #receiveQty#,
<!-- 收货数量 -->
PRIMARY_ID = #primaryId#,
<!-- 主表id -->
DELIVER_QTY = #deliverQty#,
<!-- 退货数量 -->
CONTRACT_DETAIL_ID = #contractDetailId#,
<!-- 合同明细id -->
DEPOSIT_QTY = #depositQty#,
<!-- 入库数量 -->
PROJ_CODE = #projCode#,
<!-- 项目编码 -->
RECEIVE_UNIT_WEIGHT = #receiveUnitWeight#,
<!-- 收货单重 -->
PROJ_NAME = #projName#,
<!-- 项目名称 -->
RECEIVE_WEIGHT = #receiveWeight#,
<!-- 收货重量 -->
CALCULATION_METHOD = #calculationMethod#,
STATUS = #status#,
<!-- 状态:0-已收货,1-已入库,2-部分入库,3-退货 -->
IS_INVOICING = #isInvoicing#
PRICE = #price#,
<!-- 单价 -->
WHERE ID = #id#
AMOUNT = #amount#,
<!-- 金额(不含税金额) -->
</update>
INVENT_TYPE_DETAIL = #inventTypeDetail#,
<!-- 存货类型大类 -->
PRIMARY_ID = #primaryId#,
<!-- 主表id -->
CONTRACT_DETAIL_ID = #contractDetailId#,
<!-- 合同明细id -->
PROJ_CODE = #projCode#,
<!-- 项目编码 -->
PROJ_NAME = #projName#,
<!-- 项目名称 -->
CALCULATION_METHOD = #calculationMethod#,
IS_INVOICING = #isInvoicing#
WHERE
ID = #id#
</update>
<!-- 修改开票 -->
<!-- 修改开票 -->
<update
id=
"updateIsInvoicing"
>
<update
id=
"updateIsInvoicing"
>
...
@@ -355,10 +345,9 @@
...
@@ -355,10 +345,9 @@
WHERE ID = #id#
WHERE ID = #id#
</update>
</update>
<select
id=
"queryByQualityTesting"
parameterClass=
"java.util.HashMap"
<select
id=
"queryByQualityTesting"
resultClass=
"com.baosight.hggp.hg.cg.domain.HGCG003B"
>
resultClass=
"com.baosight.hggp.hg.cg.domain.HGCG003B"
>
SELECT
SELECT
a.ID as "id",
a.ID as "id",
a.ACCOUNT_CODE as "accountCode",
<!-- 企业编码 -->
a.ACCOUNT_CODE as "accountCode",
<!-- 企业编码 -->
a.DEP_CODE as "depCode",
<!-- 部门编码 -->
a.DEP_CODE as "depCode",
<!-- 部门编码 -->
a.CREATED_BY as "createdBy",
<!-- 记录创建者 -->
a.CREATED_BY as "createdBy",
<!-- 记录创建者 -->
...
...
src/main/java/com/baosight/hggp/hg/constant/HGConstant.java
View file @
cb68d56c
...
@@ -373,14 +373,16 @@ public class HGConstant {
...
@@ -373,14 +373,16 @@ public class HGConstant {
//生产报工
//生产报工
public
static
final
String
SCBG
=
"SCBG"
;
public
static
final
String
SCBG
=
"SCBG"
;
}
}
/**
/**
*
* 采购计划数据来源
* 采购计划数据来源
*
* @author:songx
* @author:songx
* @date:2024/5/15,15:18
* @date:2024/5/15,15:18
*/
*/
public
static
class
CgSource
{
public
static
class
CgSource
{
// 合同
public
static
final
Integer
DEFAULT
=
0
;
public
static
final
Integer
DEFAULT
=
0
;
// 手动录入
// 手动录入
public
static
final
Integer
SDLR
=
1
;
public
static
final
Integer
SDLR
=
1
;
...
...
src/main/java/com/baosight/hggp/hg/constant/HGSqlConstant.java
View file @
cb68d56c
...
@@ -108,14 +108,19 @@ public class HGSqlConstant {
...
@@ -108,14 +108,19 @@ public class HGSqlConstant {
// 收货完成
// 收货完成
public
static
final
String
UPDATE_CONFIRM
=
MODULE_NAME
+
"updateConfirm"
;
public
static
final
String
UPDATE_CONFIRM
=
MODULE_NAME
+
"updateConfirm"
;
}
}
/**
* @author:songx
* @date:2024/8/30,16:25
*/
public
class
HgCg003A
{
public
class
HgCg003A
{
/**
* 模块名称:HGCW003A
// 模块名称:HGCW003A
*/
private
static
final
String
MODULE_NAME
=
"HGCG003A."
;
private
static
final
String
MODULE_NAME
=
"HGCG003A."
;
//
public
static
final
String
UPDATE_IS_INVOICING
=
MODULE_NAME
+
"updateIsInvoicing"
;
public
static
final
String
UPDATE_IS_INVOICING
=
MODULE_NAME
+
"updateIsInvoicing"
;
// 修改数量
public
static
final
String
UPDATE_QTY
=
MODULE_NAME
+
"updateQty"
;
}
}
/**
/**
...
...
src/main/java/com/baosight/hggp/hg/dm/tools/HpDmTools.java
View file @
cb68d56c
...
@@ -41,7 +41,7 @@ public class HpDmTools {
...
@@ -41,7 +41,7 @@ public class HpDmTools {
}
}
}
}
public
static
List
<
HGDM099
>
getBy
Biz
Id
(
String
bizType
,
String
docId
)
{
public
static
List
<
HGDM099
>
getBy
Doc
Id
(
String
bizType
,
String
docId
)
{
AssertUtils
.
isEmpty
(
docId
,
"文件ID不能为空"
);
AssertUtils
.
isEmpty
(
docId
,
"文件ID不能为空"
);
Map
<
String
,
Object
>
paramMap
=
new
HashMap
();
Map
<
String
,
Object
>
paramMap
=
new
HashMap
();
paramMap
.
put
(
HGDM099
.
FIELD_BIZ_TYPE
,
bizType
);
paramMap
.
put
(
HGDM099
.
FIELD_BIZ_TYPE
,
bizType
);
...
...
src/main/java/com/baosight/hggp/hg/wd/constant/HgWdSqlConstant.java
View file @
cb68d56c
...
@@ -19,5 +19,21 @@ public class HgWdSqlConstant {
...
@@ -19,5 +19,21 @@ public class HgWdSqlConstant {
// 搜索树节点
// 搜索树节点
public
static
final
String
SEARCH_TREE_NODE
=
"HGWD001.searchTreeNode"
;
public
static
final
String
SEARCH_TREE_NODE
=
"HGWD001.searchTreeNode"
;
}
}
/**
* HGCW999 SQL定义
*
* @author:songx
* @date:2024/2/22,13:57
*/
public
static
class
HgWd099
{
// 预览自增
public
static
final
String
PREVIEW_INCR
=
"HGWD099.previewIncr"
;
// 下载自增
public
static
final
String
DOWNLOAD_INCR
=
"HGWD099.downloadIncr"
;
// 发布
public
static
final
String
RELEASE_DATE
=
"HGWD099.updateReleaseDate"
;
}
}
}
src/main/java/com/baosight/hggp/hg/wd/domain/HGWD001A.java
View file @
cb68d56c
...
@@ -37,7 +37,9 @@ public class HGWD001A extends DaoEPBase {
...
@@ -37,7 +37,9 @@ public class HGWD001A extends DaoEPBase {
public
static
final
String
FIELD_PROJ_NAME
=
"projName"
;
/* 项目名称*/
public
static
final
String
FIELD_PROJ_NAME
=
"projName"
;
/* 项目名称*/
public
static
final
String
FIELD_CHANGE_TYPE
=
"changeType"
;
/* 变更类型*/
public
static
final
String
FIELD_CHANGE_TYPE
=
"changeType"
;
/* 变更类型*/
public
static
final
String
FIELD_CHANGE_CONTENT
=
"changeContent"
;
/* 变更内容*/
public
static
final
String
FIELD_CHANGE_CONTENT
=
"changeContent"
;
/* 变更内容*/
public
static
final
String
FIELD_CHANGE_START_CODE
=
"changeStartCode"
;
/* 变更前编码*/
public
static
final
String
FIELD_CHANGE_START
=
"changeStart"
;
/* 变更前*/
public
static
final
String
FIELD_CHANGE_START
=
"changeStart"
;
/* 变更前*/
public
static
final
String
FIELD_CHANGE_END_CODE
=
"changeEndCode"
;
/* 变更后编码*/
public
static
final
String
FIELD_CHANGE_END
=
"changeEnd"
;
/* 变更后*/
public
static
final
String
FIELD_CHANGE_END
=
"changeEnd"
;
/* 变更后*/
public
static
final
String
FIELD_MAT_ID
=
"matId"
;
/* 上级ID*/
public
static
final
String
FIELD_MAT_ID
=
"matId"
;
/* 上级ID*/
...
@@ -83,7 +85,9 @@ public class HGWD001A extends DaoEPBase {
...
@@ -83,7 +85,9 @@ public class HGWD001A extends DaoEPBase {
private
String
projName
=
" "
;
/* 项目名称*/
private
String
projName
=
" "
;
/* 项目名称*/
private
String
changeType
=
" "
;
/* 变更类型*/
private
String
changeType
=
" "
;
/* 变更类型*/
private
String
changeContent
=
" "
;
/* 变更内容*/
private
String
changeContent
=
" "
;
/* 变更内容*/
private
String
changeStartCode
=
" "
;
/* 变更前编码*/
private
String
changeStart
=
" "
;
/* 变更前*/
private
String
changeStart
=
" "
;
/* 变更前*/
private
String
changeEndCode
=
" "
;
/* 变更后编码*/
private
String
changeEnd
=
" "
;
/* 变更后*/
private
String
changeEnd
=
" "
;
/* 变更后*/
private
Long
matId
=
new
Long
(
0
);
private
Long
matId
=
new
Long
(
0
);
...
@@ -158,10 +162,18 @@ public class HGWD001A extends DaoEPBase {
...
@@ -158,10 +162,18 @@ public class HGWD001A extends DaoEPBase {
eiColumn
.
setDescName
(
"变更内容"
);
eiColumn
.
setDescName
(
"变更内容"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_CHANGE_START_CODE
);
eiColumn
.
setDescName
(
"变更前编码"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_CHANGE_START
);
eiColumn
=
new
EiColumn
(
FIELD_CHANGE_START
);
eiColumn
.
setDescName
(
"变更前"
);
eiColumn
.
setDescName
(
"变更前"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_CHANGE_END_CODE
);
eiColumn
.
setDescName
(
"变更后编码"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_CHANGE_END
);
eiColumn
=
new
EiColumn
(
FIELD_CHANGE_END
);
eiColumn
.
setDescName
(
"变更后"
);
eiColumn
.
setDescName
(
"变更后"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiMetadata
.
addMeta
(
eiColumn
);
...
@@ -477,6 +489,22 @@ public class HGWD001A extends DaoEPBase {
...
@@ -477,6 +489,22 @@ public class HGWD001A extends DaoEPBase {
this
.
matId
=
matId
;
this
.
matId
=
matId
;
}
}
public
String
getChangeStartCode
()
{
return
changeStartCode
;
}
public
void
setChangeStartCode
(
String
changeStartCode
)
{
this
.
changeStartCode
=
changeStartCode
;
}
public
String
getChangeEndCode
()
{
return
changeEndCode
;
}
public
void
setChangeEndCode
(
String
changeEndCode
)
{
this
.
changeEndCode
=
changeEndCode
;
}
/**
/**
* get the value from Map.
* get the value from Map.
*
*
...
@@ -501,7 +529,9 @@ public class HGWD001A extends DaoEPBase {
...
@@ -501,7 +529,9 @@ public class HGWD001A extends DaoEPBase {
setProjName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PROJ_NAME
)),
projName
));
setProjName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PROJ_NAME
)),
projName
));
setChangeType
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_CHANGE_TYPE
)),
changeType
));
setChangeType
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_CHANGE_TYPE
)),
changeType
));
setChangeContent
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_CHANGE_CONTENT
)),
changeContent
));
setChangeContent
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_CHANGE_CONTENT
)),
changeContent
));
setChangeStartCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_CHANGE_START_CODE
)),
changeStartCode
));
setChangeStart
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_CHANGE_START
)),
changeStart
));
setChangeStart
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_CHANGE_START
)),
changeStart
));
setChangeEndCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_CHANGE_END_CODE
)),
changeEndCode
));
setChangeEnd
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_CHANGE_END
)),
changeEnd
));
setChangeEnd
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_CHANGE_END
)),
changeEnd
));
setMatId
(
NumberUtils
.
toLong
(
StringUtils
.
toString
(
map
.
get
(
FIELD_MAT_ID
)),
matId
));
setMatId
(
NumberUtils
.
toLong
(
StringUtils
.
toString
(
map
.
get
(
FIELD_MAT_ID
)),
matId
));
}
}
...
@@ -529,7 +559,9 @@ public class HGWD001A extends DaoEPBase {
...
@@ -529,7 +559,9 @@ public class HGWD001A extends DaoEPBase {
map
.
put
(
FIELD_PROJ_NAME
,
StringUtils
.
toString
(
projName
,
eiMetadata
.
getMeta
(
FIELD_PROJ_NAME
)));
map
.
put
(
FIELD_PROJ_NAME
,
StringUtils
.
toString
(
projName
,
eiMetadata
.
getMeta
(
FIELD_PROJ_NAME
)));
map
.
put
(
FIELD_CHANGE_TYPE
,
StringUtils
.
toString
(
changeType
,
eiMetadata
.
getMeta
(
FIELD_CHANGE_TYPE
)));
map
.
put
(
FIELD_CHANGE_TYPE
,
StringUtils
.
toString
(
changeType
,
eiMetadata
.
getMeta
(
FIELD_CHANGE_TYPE
)));
map
.
put
(
FIELD_CHANGE_CONTENT
,
StringUtils
.
toString
(
changeContent
,
eiMetadata
.
getMeta
(
FIELD_CHANGE_CONTENT
)));
map
.
put
(
FIELD_CHANGE_CONTENT
,
StringUtils
.
toString
(
changeContent
,
eiMetadata
.
getMeta
(
FIELD_CHANGE_CONTENT
)));
map
.
put
(
FIELD_CHANGE_START_CODE
,
StringUtils
.
toString
(
changeStartCode
,
eiMetadata
.
getMeta
(
FIELD_CHANGE_START_CODE
)));
map
.
put
(
FIELD_CHANGE_START
,
StringUtils
.
toString
(
changeStart
,
eiMetadata
.
getMeta
(
FIELD_CHANGE_START
)));
map
.
put
(
FIELD_CHANGE_START
,
StringUtils
.
toString
(
changeStart
,
eiMetadata
.
getMeta
(
FIELD_CHANGE_START
)));
map
.
put
(
FIELD_CHANGE_END_CODE
,
StringUtils
.
toString
(
changeEndCode
,
eiMetadata
.
getMeta
(
FIELD_CHANGE_END_CODE
)));
map
.
put
(
FIELD_CHANGE_END
,
StringUtils
.
toString
(
changeEnd
,
eiMetadata
.
getMeta
(
FIELD_CHANGE_END
)));
map
.
put
(
FIELD_CHANGE_END
,
StringUtils
.
toString
(
changeEnd
,
eiMetadata
.
getMeta
(
FIELD_CHANGE_END
)));
map
.
put
(
FIELD_MAT_ID
,
StringUtils
.
toString
(
matId
,
eiMetadata
.
getMeta
(
FIELD_MAT_ID
)));
map
.
put
(
FIELD_MAT_ID
,
StringUtils
.
toString
(
matId
,
eiMetadata
.
getMeta
(
FIELD_MAT_ID
)));
...
...
src/main/java/com/baosight/hggp/hg/wd/domain/HGWD099.java
0 → 100644
View file @
cb68d56c
This diff is collapsed.
Click to expand it.
src/main/java/com/baosight/hggp/hg/wd/service/ServiceHGWD001.java
View file @
cb68d56c
This diff is collapsed.
Click to expand it.
src/main/java/com/baosight/hggp/hg/wd/service/ServiceHGWD001B.java
View file @
cb68d56c
...
@@ -90,7 +90,7 @@ public class ServiceHGWD001B extends ServiceBase {
...
@@ -90,7 +90,7 @@ public class ServiceHGWD001B extends ServiceBase {
List
<
HGWD001B
>
fWd001bs
=
MapUtils
.
toDaoEPBases
(
inInfo
,
HGWD001B
.
class
);
List
<
HGWD001B
>
fWd001bs
=
MapUtils
.
toDaoEPBases
(
inInfo
,
HGWD001B
.
class
);
for
(
HGWD001B
fWd001b
:
fWd001bs
)
{
for
(
HGWD001B
fWd001b
:
fWd001bs
)
{
// 预览记录+1
// 预览记录+1
HG
CWTools
.
HgCw9
99
.
previewIncr
(
fWd001b
.
getDocId
());
HG
WDTools
.
HgWd0
99
.
previewIncr
(
fWd001b
.
getDocId
());
// 新增
// 新增
DaoUtils
.
insert
(
HGWD001B
.
INSERT
,
fWd001b
);
DaoUtils
.
insert
(
HGWD001B
.
INSERT
,
fWd001b
);
}
}
...
...
src/main/java/com/baosight/hggp/hg/wd/service/ServiceHGWD001C.java
View file @
cb68d56c
...
@@ -90,7 +90,7 @@ public class ServiceHGWD001C extends ServiceBase {
...
@@ -90,7 +90,7 @@ public class ServiceHGWD001C extends ServiceBase {
List
<
HGWD001C
>
fWd001cs
=
MapUtils
.
toDaoEPBases
(
inInfo
,
HGWD001C
.
class
);
List
<
HGWD001C
>
fWd001cs
=
MapUtils
.
toDaoEPBases
(
inInfo
,
HGWD001C
.
class
);
for
(
HGWD001C
fWd001c
:
fWd001cs
)
{
for
(
HGWD001C
fWd001c
:
fWd001cs
)
{
// 下载记录+1
// 下载记录+1
HG
CWTools
.
HgCw9
99
.
downloadIncr
(
fWd001c
.
getDocId
());
HG
WDTools
.
HgWd0
99
.
downloadIncr
(
fWd001c
.
getDocId
());
// 新增
// 新增
DaoUtils
.
insert
(
HGWD001C
.
INSERT
,
fWd001c
);
DaoUtils
.
insert
(
HGWD001C
.
INSERT
,
fWd001c
);
}
}
...
...
src/main/java/com/baosight/hggp/hg/wd/service/ServiceHGWD001D.java
View file @
cb68d56c
...
@@ -37,7 +37,7 @@ public class ServiceHGWD001D extends TreeService {
...
@@ -37,7 +37,7 @@ public class ServiceHGWD001D extends TreeService {
String
accountCode
=
UserSessionUtils
.
getAccountCode
();
String
accountCode
=
UserSessionUtils
.
getAccountCode
();
if
(
StringUtils
.
isEmpty
(
accountCode
)
||
CommonConstant
.
Field
.
ADMIN
.
equals
(
accountCode
))
{
if
(
StringUtils
.
isEmpty
(
accountCode
)
||
CommonConstant
.
Field
.
ADMIN
.
equals
(
accountCode
))
{
map
.
put
(
"label"
,
"root"
);
map
.
put
(
"label"
,
"root"
);
map
.
put
(
"text"
,
"
组织机构
"
);
map
.
put
(
"text"
,
"
文档库
"
);
list
.
add
(
map
);
list
.
add
(
map
);
}
else
{
}
else
{
//Org org = HGXSTools.XsOrg.get(accountCode);
//Org org = HGXSTools.XsOrg.get(accountCode);
...
@@ -50,6 +50,7 @@ public class ServiceHGWD001D extends TreeService {
...
@@ -50,6 +50,7 @@ public class ServiceHGWD001D extends TreeService {
hashMap
.
put
(
"text"
,
hgsc001
.
getProjName
());
hashMap
.
put
(
"text"
,
hgsc001
.
getProjName
());
hashMap
.
put
(
"projCode"
,
hgsc001
.
getProjCode
());
hashMap
.
put
(
"projCode"
,
hgsc001
.
getProjCode
());
hashMap
.
put
(
"projName"
,
hgsc001
.
getProjName
());
hashMap
.
put
(
"projName"
,
hgsc001
.
getProjName
());
hashMap
.
put
(
"ename"
,
hgsc001
.
getProjCode
());
hashMap
.
put
(
"type"
,
"1"
);
hashMap
.
put
(
"type"
,
"1"
);
hashMap
.
put
(
"leaf"
,
"0"
);
hashMap
.
put
(
"leaf"
,
"0"
);
hashMap
.
put
(
"leafLevel"
,
"0"
);
hashMap
.
put
(
"leafLevel"
,
"0"
);
...
@@ -71,8 +72,6 @@ public class ServiceHGWD001D extends TreeService {
...
@@ -71,8 +72,6 @@ public class ServiceHGWD001D extends TreeService {
// 非管理员仅查询所属企业用户 added by songx at 2024-01-16
// 非管理员仅查询所属企业用户 added by songx at 2024-01-16
queryMap
.
put
(
"accountCode"
,
LoginUserDetails
.
isUserAdmin
(
UserSessionUtils
.
getLoginName
())
queryMap
.
put
(
"accountCode"
,
LoginUserDetails
.
isUserAdmin
(
UserSessionUtils
.
getLoginName
())
?
null
:
UserSessionUtils
.
getAccountCode
());
?
null
:
UserSessionUtils
.
getAccountCode
());
queryMap
.
put
(
"userId"
,
LoginUserDetails
.
isUserAdmin
(
UserSessionUtils
.
getLoginName
())
?
null
:
UserSessionUtils
.
getUserId
());
List
<
Map
>
ret
=
this
.
dao
.
query
(
"HGWD001.queryOrganiation"
,
queryMap
,
0
,
-
999999
);
List
<
Map
>
ret
=
this
.
dao
.
query
(
"HGWD001.queryOrganiation"
,
queryMap
,
0
,
-
999999
);
Map
parentOrgMap
=
new
HashMap
();
Map
parentOrgMap
=
new
HashMap
();
...
...
src/main/java/com/baosight/hggp/hg/wd/service/ServiceHGWD001E.java
View file @
cb68d56c
...
@@ -104,7 +104,7 @@ public class ServiceHGWD001E extends ServiceEPBase {
...
@@ -104,7 +104,7 @@ public class ServiceHGWD001E extends ServiceEPBase {
hgwd001a
.
setChangeContent
(
"文件名称"
);
hgwd001a
.
setChangeContent
(
"文件名称"
);
hgwd001a
.
setChangeEnd
(
hgwd001
.
getFileName
());
hgwd001a
.
setChangeEnd
(
hgwd001
.
getFileName
());
hgwd001a
.
setMatId
(
hgwd001
.
getId
());
hgwd001a
.
setMatId
(
hgwd001
.
getId
());
HGWDTools
.
HgWd001
.
add
(
hgwd001a
);
HGWDTools
.
HgWd001
.
add
HGWD001A
(
hgwd001a
);
}
}
/**
/**
...
@@ -123,14 +123,14 @@ public class ServiceHGWD001E extends ServiceEPBase {
...
@@ -123,14 +123,14 @@ public class ServiceHGWD001E extends ServiceEPBase {
hgwd001a
.
setChangeContent
(
"文件名称"
);
hgwd001a
.
setChangeContent
(
"文件名称"
);
hgwd001a
.
setChangeStart
(
wd001
.
getFileName
());
hgwd001a
.
setChangeStart
(
wd001
.
getFileName
());
hgwd001a
.
setChangeEnd
(
hgwd001
.
getFileName
());
hgwd001a
.
setChangeEnd
(
hgwd001
.
getFileName
());
HGWDTools
.
HgWd001
.
add
(
hgwd001a
);
HGWDTools
.
HgWd001
.
add
HGWD001A
(
hgwd001a
);
}
else
if
(
wd001
!=
null
&&
!
wd001
.
getFileType
().
equals
(
hgwd001
.
getFileType
())){
}
else
if
(
wd001
!=
null
&&
!
wd001
.
getFileType
().
equals
(
hgwd001
.
getFileType
())){
List
<
Map
>
fileType1
=
edcm01List
.
stream
().
filter
(
map
->
map
.
get
(
"itemCode"
).
equals
(
wd001
.
getFileType
())).
collect
(
Collectors
.
toList
());
List
<
Map
>
fileType1
=
edcm01List
.
stream
().
filter
(
map
->
map
.
get
(
"itemCode"
).
equals
(
wd001
.
getFileType
())).
collect
(
Collectors
.
toList
());
List
<
Map
>
fileType2
=
edcm01List
.
stream
().
filter
(
map
->
map
.
get
(
"itemCode"
).
equals
(
hgwd001
.
getFileType
())).
collect
(
Collectors
.
toList
());
List
<
Map
>
fileType2
=
edcm01List
.
stream
().
filter
(
map
->
map
.
get
(
"itemCode"
).
equals
(
hgwd001
.
getFileType
())).
collect
(
Collectors
.
toList
());
hgwd001a
.
setChangeContent
(
"文件类型"
);
hgwd001a
.
setChangeContent
(
"文件类型"
);
hgwd001a
.
setChangeStart
(
fileType1
.
get
(
0
).
get
(
"itemCname"
).
toString
());
hgwd001a
.
setChangeStart
(
fileType1
.
get
(
0
).
get
(
"itemCname"
).
toString
());
hgwd001a
.
setChangeEnd
(
fileType2
.
get
(
0
).
get
(
"itemCname"
).
toString
());
hgwd001a
.
setChangeEnd
(
fileType2
.
get
(
0
).
get
(
"itemCname"
).
toString
());
HGWDTools
.
HgWd001
.
add
(
hgwd001a
);
HGWDTools
.
HgWd001
.
add
HGWD001A
(
hgwd001a
);
}
}
DaoUtils
.
update
(
HGWD001
.
UPDATE
,
hgwd001
);
DaoUtils
.
update
(
HGWD001
.
UPDATE
,
hgwd001
);
...
...
src/main/java/com/baosight/hggp/hg/wd/service/ServiceHGWD001F.java
View file @
cb68d56c
...
@@ -98,7 +98,7 @@ public class ServiceHGWD001F extends ServiceEPBase {
...
@@ -98,7 +98,7 @@ public class ServiceHGWD001F extends ServiceEPBase {
hgwd001a
.
setChangeContent
(
"文件名称"
);
hgwd001a
.
setChangeContent
(
"文件名称"
);
hgwd001a
.
setChangeEnd
(
hgwd001
.
getFileName
());
hgwd001a
.
setChangeEnd
(
hgwd001
.
getFileName
());
hgwd001a
.
setMatId
(
hgwd001
.
getId
());
hgwd001a
.
setMatId
(
hgwd001
.
getId
());
HGWDTools
.
HgWd001
.
add
(
hgwd001a
);
HGWDTools
.
HgWd001
.
add
HGWD001A
(
hgwd001a
);
}
}
/**
/**
...
@@ -117,14 +117,14 @@ public class ServiceHGWD001F extends ServiceEPBase {
...
@@ -117,14 +117,14 @@ public class ServiceHGWD001F extends ServiceEPBase {
hgwd001a
.
setChangeContent
(
"文件名称"
);
hgwd001a
.
setChangeContent
(
"文件名称"
);
hgwd001a
.
setChangeStart
(
wd001
.
getFileName
());
hgwd001a
.
setChangeStart
(
wd001
.
getFileName
());
hgwd001a
.
setChangeEnd
(
hgwd001
.
getFileName
());
hgwd001a
.
setChangeEnd
(
hgwd001
.
getFileName
());
HGWDTools
.
HgWd001
.
add
(
hgwd001a
);
HGWDTools
.
HgWd001
.
add
HGWD001A
(
hgwd001a
);
}
else
if
(
wd001
!=
null
&&
!
wd001
.
getFileType
().
equals
(
hgwd001
.
getFileType
())){
}
else
if
(
wd001
!=
null
&&
!
wd001
.
getFileType
().
equals
(
hgwd001
.
getFileType
())){
List
<
Map
>
fileType1
=
edcm01List
.
stream
().
filter
(
map
->
map
.
get
(
"itemCode"
).
equals
(
wd001
.
getFileType
())).
collect
(
Collectors
.
toList
());
List
<
Map
>
fileType1
=
edcm01List
.
stream
().
filter
(
map
->
map
.
get
(
"itemCode"
).
equals
(
wd001
.
getFileType
())).
collect
(
Collectors
.
toList
());
List
<
Map
>
fileType2
=
edcm01List
.
stream
().
filter
(
map
->
map
.
get
(
"itemCode"
).
equals
(
hgwd001
.
getFileType
())).
collect
(
Collectors
.
toList
());
List
<
Map
>
fileType2
=
edcm01List
.
stream
().
filter
(
map
->
map
.
get
(
"itemCode"
).
equals
(
hgwd001
.
getFileType
())).
collect
(
Collectors
.
toList
());
hgwd001a
.
setChangeContent
(
"文件类型"
);
hgwd001a
.
setChangeContent
(
"文件类型"
);
hgwd001a
.
setChangeStart
(
fileType1
.
get
(
0
).
get
(
"itemCname"
).
toString
());
hgwd001a
.
setChangeStart
(
fileType1
.
get
(
0
).
get
(
"itemCname"
).
toString
());
hgwd001a
.
setChangeEnd
(
fileType2
.
get
(
0
).
get
(
"itemCname"
).
toString
());
hgwd001a
.
setChangeEnd
(
fileType2
.
get
(
0
).
get
(
"itemCname"
).
toString
());
HGWDTools
.
HgWd001
.
add
(
hgwd001a
);
HGWDTools
.
HgWd001
.
add
HGWD001A
(
hgwd001a
);
}
}
DaoUtils
.
update
(
HGWD001
.
UPDATE
,
hgwd001
);
DaoUtils
.
update
(
HGWD001
.
UPDATE
,
hgwd001
);
...
...
src/main/java/com/baosight/hggp/hg/wd/service/ServiceHGWD001G.java
View file @
cb68d56c
...
@@ -97,7 +97,7 @@ public class ServiceHGWD001G extends ServiceEPBase {
...
@@ -97,7 +97,7 @@ public class ServiceHGWD001G extends ServiceEPBase {
hgwd001a
.
setChangeContent
(
"项目名称"
);
hgwd001a
.
setChangeContent
(
"项目名称"
);
hgwd001a
.
setChangeEnd
(
hgwd001
.
getFileName
());
hgwd001a
.
setChangeEnd
(
hgwd001
.
getFileName
());
hgwd001a
.
setMatId
(
hgwd001
.
getId
());
hgwd001a
.
setMatId
(
hgwd001
.
getId
());
HGWDTools
.
HgWd001
.
add
(
hgwd001a
);
HGWDTools
.
HgWd001
.
add
HGWD001A
(
hgwd001a
);
}
}
/**
/**
...
@@ -116,14 +116,14 @@ public class ServiceHGWD001G extends ServiceEPBase {
...
@@ -116,14 +116,14 @@ public class ServiceHGWD001G extends ServiceEPBase {
hgwd001a
.
setChangeContent
(
"项目名称"
);
hgwd001a
.
setChangeContent
(
"项目名称"
);
hgwd001a
.
setChangeStart
(
wd001
.
getFileName
());
hgwd001a
.
setChangeStart
(
wd001
.
getFileName
());
hgwd001a
.
setChangeEnd
(
hgwd001
.
getFileName
());
hgwd001a
.
setChangeEnd
(
hgwd001
.
getFileName
());
HGWDTools
.
HgWd001
.
add
(
hgwd001a
);
HGWDTools
.
HgWd001
.
add
HGWD001A
(
hgwd001a
);
}
else
if
(
wd001
!=
null
&&
!
wd001
.
getFileType
().
equals
(
hgwd001
.
getFileType
())){
}
else
if
(
wd001
!=
null
&&
!
wd001
.
getFileType
().
equals
(
hgwd001
.
getFileType
())){
List
<
Map
>
fileType1
=
edcm01List
.
stream
().
filter
(
map
->
map
.
get
(
"itemCode"
).
equals
(
wd001
.
getFileType
())).
collect
(
Collectors
.
toList
());
List
<
Map
>
fileType1
=
edcm01List
.
stream
().
filter
(
map
->
map
.
get
(
"itemCode"
).
equals
(
wd001
.
getFileType
())).
collect
(
Collectors
.
toList
());
List
<
Map
>
fileType2
=
edcm01List
.
stream
().
filter
(
map
->
map
.
get
(
"itemCode"
).
equals
(
hgwd001
.
getFileType
())).
collect
(
Collectors
.
toList
());
List
<
Map
>
fileType2
=
edcm01List
.
stream
().
filter
(
map
->
map
.
get
(
"itemCode"
).
equals
(
hgwd001
.
getFileType
())).
collect
(
Collectors
.
toList
());
hgwd001a
.
setChangeContent
(
"文件类型"
);
hgwd001a
.
setChangeContent
(
"文件类型"
);
hgwd001a
.
setChangeStart
(
fileType1
.
get
(
0
).
get
(
"itemCname"
).
toString
());
hgwd001a
.
setChangeStart
(
fileType1
.
get
(
0
).
get
(
"itemCname"
).
toString
());
hgwd001a
.
setChangeEnd
(
fileType2
.
get
(
0
).
get
(
"itemCname"
).
toString
());
hgwd001a
.
setChangeEnd
(
fileType2
.
get
(
0
).
get
(
"itemCname"
).
toString
());
HGWDTools
.
HgWd001
.
add
(
hgwd001a
);
HGWDTools
.
HgWd001
.
add
HGWD001A
(
hgwd001a
);
}
}
DaoUtils
.
update
(
HGWD001
.
UPDATE
,
hgwd001
);
DaoUtils
.
update
(
HGWD001
.
UPDATE
,
hgwd001
);
...
...
src/main/java/com/baosight/hggp/hg/wd/service/ServiceHGWD099.java
View file @
cb68d56c
...
@@ -3,24 +3,21 @@ package com.baosight.hggp.hg.wd.service;
...
@@ -3,24 +3,21 @@ package com.baosight.hggp.hg.wd.service;
import
com.baosight.hggp.aspect.annotation.OperationLogAnnotation
;
import
com.baosight.hggp.aspect.annotation.OperationLogAnnotation
;
import
com.baosight.hggp.common.ChangeTypeEnum
;
import
com.baosight.hggp.common.ChangeTypeEnum
;
import
com.baosight.hggp.core.constant.CommonConstant
;
import
com.baosight.hggp.core.constant.CommonConstant
;
import
com.baosight.hggp.core.constant.S3Constant
;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.hg.cw.domain.HGCW999
;
import
com.baosight.hggp.core.security.UserSessionUtils
;
import
com.baosight.hggp.hg.cw.tools.HGCWTools
;
import
com.baosight.hggp.hg.cw.vo.UserVO
;
import
com.baosight.hggp.hg.dm.domain.HGDM099
;
import
com.baosight.hggp.hg.ds.domain.HGDS002
;
import
com.baosight.hggp.hg.wd.constant.HgWdConstant
;
import
com.baosight.hggp.hg.wd.constant.HgWdConstant
;
import
com.baosight.hggp.hg.wd.domain.HGWD001
;
import
com.baosight.hggp.hg.wd.domain.HGWD001
;
import
com.baosight.hggp.hg.wd.domain.HGWD001A
;
import
com.baosight.hggp.hg.wd.domain.HGWD001A
;
import
com.baosight.hggp.hg.wd.domain.HGWD099
;
import
com.baosight.hggp.hg.wd.tools.HGWDTools
;
import
com.baosight.hggp.hg.wd.tools.HGWDTools
;
import
com.baosight.hggp.hg.xs.domain.User
;
import
com.baosight.hggp.util.*
;
import
com.baosight.hggp.util.*
;
import
com.baosight.
iplat4j.core.ProjectInfo
;
import
com.baosight.
hggp.util.contants.ACConstants
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
import
com.baosight.iplat4j.core.ei.EiInfo
;
import
com.baosight.iplat4j.core.ei.EiInfo
;
import
com.baosight.iplat4j.core.exception.PlatException
;
import
com.baosight.iplat4j.core.exception.PlatException
;
import
com.baosight.iplat4j.core.service.impl.ServiceEPBase
;
import
com.baosight.iplat4j.core.service.impl.ServiceEPBase
;
import
com.baosight.iplat4j.core.service.soa.XServiceManager
;
import
org.apache.commons.collections.CollectionUtils
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.HashMap
;
...
@@ -44,7 +41,7 @@ public class ServiceHGWD099 extends ServiceEPBase {
...
@@ -44,7 +41,7 @@ public class ServiceHGWD099 extends ServiceEPBase {
@Override
@Override
public
EiInfo
initLoad
(
EiInfo
inInfo
)
{
public
EiInfo
initLoad
(
EiInfo
inInfo
)
{
try
{
try
{
inInfo
.
addBlock
(
EiConstant
.
resultBlock
).
addBlockMeta
(
new
HG
DM
099
().
eiMetadata
);
inInfo
.
addBlock
(
EiConstant
.
resultBlock
).
addBlockMeta
(
new
HG
WD
099
().
eiMetadata
);
}
catch
(
PlatException
e
)
{
}
catch
(
PlatException
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"初始化失败"
);
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"初始化失败"
);
}
}
...
@@ -62,8 +59,9 @@ public class ServiceHGWD099 extends ServiceEPBase {
...
@@ -62,8 +59,9 @@ public class ServiceHGWD099 extends ServiceEPBase {
public
EiInfo
query
(
EiInfo
inInfo
)
{
public
EiInfo
query
(
EiInfo
inInfo
)
{
try
{
try
{
Map
queryRow
=
EiInfoUtils
.
getFirstRow
(
inInfo
);
Map
queryRow
=
EiInfoUtils
.
getFirstRow
(
inInfo
);
if
(
StringUtils
.
isNotEmpty
(
queryRow
.
get
(
HGDM099
.
FIELD_BIZ_ID
).
toString
())){
if
(
StringUtils
.
isNotEmpty
(
queryRow
.
get
(
HGWD001
.
FIELD_FILE_ID
).
toString
())){
inInfo
=
super
.
query
(
inInfo
,
HGDM099
.
QUERY
,
new
HGDM099
());
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
User
.
FIELD_USER_ID
,
UserSessionUtils
.
getUserId
());
inInfo
=
super
.
query
(
inInfo
,
HGWD099
.
QUERY
,
new
HGWD099
());
}
}
}
catch
(
Throwable
e
)
{
}
catch
(
Throwable
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"查询失败"
);
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"查询失败"
);
...
@@ -83,10 +81,10 @@ public class ServiceHGWD099 extends ServiceEPBase {
...
@@ -83,10 +81,10 @@ public class ServiceHGWD099 extends ServiceEPBase {
try
{
try
{
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
();
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
();
for
(
Map
resultRow
:
resultRows
)
{
for
(
Map
resultRow
:
resultRows
)
{
HG
DM099
hgdm099
=
new
HGDM
099
();
HG
WD099
hgdm099
=
new
HGWD
099
();
hgdm099
.
fromMap
(
resultRow
);
hgdm099
.
fromMap
(
resultRow
);
hgdm099
.
setDeleteFlag
(
CommonConstant
.
YesNo
.
NO_0
);
hgdm099
.
setDeleteFlag
(
CommonConstant
.
YesNo
.
NO_0
);
DaoUtils
.
insert
(
HG
DM
099
.
INSERT
,
hgdm099
);
DaoUtils
.
insert
(
HG
WD
099
.
INSERT
,
hgdm099
);
HGWD001
hgwd001
=
HGWDTools
.
HgWd001
.
get
(
hgdm099
.
getBizId
());
HGWD001
hgwd001
=
HGWDTools
.
HgWd001
.
get
(
hgdm099
.
getBizId
());
if
(
hgwd001
!=
null
)
{
if
(
hgwd001
!=
null
)
{
HGWD001A
hgwd001a
=
new
HGWD001A
();
HGWD001A
hgwd001a
=
new
HGWD001A
();
...
@@ -95,11 +93,12 @@ public class ServiceHGWD099 extends ServiceEPBase {
...
@@ -95,11 +93,12 @@ public class ServiceHGWD099 extends ServiceEPBase {
hgwd001a
.
setProjCode
(
hgwd001
.
getProjCode
());
hgwd001a
.
setProjCode
(
hgwd001
.
getProjCode
());
hgwd001a
.
setProjName
(
hgwd001
.
getProjName
());
hgwd001a
.
setProjName
(
hgwd001
.
getProjName
());
hgwd001a
.
setChangeType
(
ChangeTypeEnum
.
UPLOAD_ADD
.
getCode
());
hgwd001a
.
setChangeType
(
ChangeTypeEnum
.
UPLOAD_ADD
.
getCode
());
hgwd001a
.
setChangeContent
(
"上传附件"
);
hgwd001a
.
setChangeContent
(
hgwd001
.
getFileName
()
);
hgwd001a
.
setChangeEnd
(
hgdm099
.
getDocName
());
hgwd001a
.
setChangeEnd
(
hgdm099
.
getDocName
());
hgwd001a
.
setChange
Start
(
hgdm099
.
getDocId
());
hgwd001a
.
setChange
EndCode
(
hgdm099
.
getDocId
());
hgwd001a
.
setMatId
(
hgwd001
.
getId
());
hgwd001a
.
setMatId
(
hgwd001
.
getId
());
HGWDTools
.
HgWd001
.
add
(
hgwd001a
);
HGWDTools
.
HgWd001
.
addHGWD001A
(
hgwd001a
);
hgwd001
.
setStatus
(
HgWdConstant
.
FileStatus
.
S_0
);
hgwd001
.
setStatus
(
HgWdConstant
.
FileStatus
.
S_0
);
HGWDTools
.
HgWd001
.
updateStatus
(
hgwd001
);
HGWDTools
.
HgWd001
.
updateStatus
(
hgwd001
);
}
}
...
@@ -124,9 +123,9 @@ public class ServiceHGWD099 extends ServiceEPBase {
...
@@ -124,9 +123,9 @@ public class ServiceHGWD099 extends ServiceEPBase {
try
{
try
{
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
();
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
();
for
(
Map
resultRow
:
resultRows
)
{
for
(
Map
resultRow
:
resultRows
)
{
HG
DM099
hgdm099
=
new
HGDM
099
();
HG
WD099
hgdm099
=
new
HGWD
099
();
hgdm099
.
fromMap
(
resultRow
);
hgdm099
.
fromMap
(
resultRow
);
DaoUtils
.
update
(
HG
DM
099
.
DELETE
,
hgdm099
);
DaoUtils
.
update
(
HG
WD
099
.
DELETE
,
hgdm099
);
HGWD001
hgwd001
=
HGWDTools
.
HgWd001
.
get
(
hgdm099
.
getBizId
());
HGWD001
hgwd001
=
HGWDTools
.
HgWd001
.
get
(
hgdm099
.
getBizId
());
if
(
hgwd001
!=
null
)
{
if
(
hgwd001
!=
null
)
{
HGWD001A
hgwd001a
=
new
HGWD001A
();
HGWD001A
hgwd001a
=
new
HGWD001A
();
...
@@ -135,11 +134,12 @@ public class ServiceHGWD099 extends ServiceEPBase {
...
@@ -135,11 +134,12 @@ public class ServiceHGWD099 extends ServiceEPBase {
hgwd001a
.
setProjCode
(
hgwd001
.
getProjCode
());
hgwd001a
.
setProjCode
(
hgwd001
.
getProjCode
());
hgwd001a
.
setProjName
(
hgwd001
.
getProjName
());
hgwd001a
.
setProjName
(
hgwd001
.
getProjName
());
hgwd001a
.
setChangeType
(
ChangeTypeEnum
.
UPLOAD_DELETE
.
getCode
());
hgwd001a
.
setChangeType
(
ChangeTypeEnum
.
UPLOAD_DELETE
.
getCode
());
hgwd001a
.
setChangeContent
(
"删除附件"
);
hgwd001a
.
setChangeContent
(
hgwd001
.
getFileName
()
);
hgwd001a
.
setChangeEnd
(
hgdm099
.
getDocName
());
hgwd001a
.
setChangeEnd
(
hgdm099
.
getDocName
());
hgwd001a
.
setChange
Start
(
hgdm099
.
getDocId
());
hgwd001a
.
setChange
EndCode
(
hgdm099
.
getDocId
());
hgwd001a
.
setMatId
(
hgwd001
.
getId
());
hgwd001a
.
setMatId
(
hgwd001
.
getId
());
HGWDTools
.
HgWd001
.
add
(
hgwd001a
);
HGWDTools
.
HgWd001
.
addHGWD001A
(
hgwd001a
);
hgwd001
.
setStatus
(
HgWdConstant
.
FileStatus
.
S_0
);
hgwd001
.
setStatus
(
HgWdConstant
.
FileStatus
.
S_0
);
HGWDTools
.
HgWd001
.
updateStatus
(
hgwd001
);
HGWDTools
.
HgWd001
.
updateStatus
(
hgwd001
);
}
}
...
@@ -151,45 +151,4 @@ public class ServiceHGWD099 extends ServiceEPBase {
...
@@ -151,45 +151,4 @@ public class ServiceHGWD099 extends ServiceEPBase {
}
}
return
inInfo
;
return
inInfo
;
}
}
/**
* 删除文件
* @param docId 文件ID
*/
@OperationLogAnnotation
(
operModul
=
"附件清单"
,
operType
=
"删除"
,
operDesc
=
"删除附件文件"
)
public
void
delectDoc
(
String
docId
){
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"docId"
,
docId
);
List
<
HGDS002
>
list
=
this
.
dao
.
query
(
HGDS002
.
QUERY
,
map
);
if
(
list
.
size
()
>
0
)
{
String
realPath
=
list
.
get
(
0
).
getRealPath
();
// 项目环境
String
projectEnv
=
ProjectInfo
.
getProjectEnv
();
if
(
projectEnv
.
equals
(
CommonConstant
.
projectEnv
.
RUN
))
{
EiInfo
queryInfo
=
new
EiInfo
();
queryInfo
.
set
(
HGCW999
.
FIELD_DOC_ID
,
list
.
get
(
0
).
getDocId
());
//获取文档信息
queryInfo
.
set
(
EiConstant
.
serviceId
,
"S_EU_0102"
);
EiInfo
docInfo
=
XServiceManager
.
call
(
queryInfo
);
//数据库
Map
docInfoMap
=
docInfo
.
getMap
(
"docMap"
);
if
(
docInfoMap
.
size
()
>
0
)
{
EiInfo
eiInfo
=
new
EiInfo
();
eiInfo
.
set
(
"data"
,
docInfoMap
.
get
(
"url"
)+
"-"
+
0
);
eiInfo
.
set
(
EiConstant
.
serviceId
,
"S_EU_0105"
);
//调用接口
EiInfo
outInfo
=
XServiceManager
.
call
(
eiInfo
);
if
(
outInfo
.
getStatus
()
==
EiConstant
.
STATUS_FAILURE
){
LogUtils
.
setDetailMsg
(
outInfo
,
new
Throwable
(),
"查询部件类型失败"
);
outInfo
.
setMsg
(
"失败"
);
}
}
}
else
{
FileUtils
.
deleteFile
(
realPath
);
}
this
.
dao
.
delete
(
HGDS002
.
DELETE
,
map
);
}
}
}
}
src/main/java/com/baosight/hggp/hg/wd/sql/HGWD001.xml
View file @
cb68d56c
...
@@ -272,37 +272,32 @@
...
@@ -272,37 +272,32 @@
<!-- 文档库子节点树查询 -->
<!-- 文档库子节点树查询 -->
<select
id=
"queryOrganiation"
resultClass=
"java.util.HashMap"
>
<select
id=
"queryOrganiation"
resultClass=
"java.util.HashMap"
>
SELECT
SELECT
A.COMPANY_CODE as "companyCode",
<!-- 公司编码 -->
COMPANY_CODE as "companyCode",
<!-- 公司编码 -->
A.COMPANY_NAME as "companyName",
<!-- 公司名称 -->
PROJ_CODE as "projCode",
<!-- 项目编码 -->
A.PROJ_CODE as "projCode",
<!-- 项目编码 -->
FILE_ID as "label",
A.PROJ_NAME as "projName",
<!-- 项目名称 -->
FILE_ID as "ename",
A.FILE_ID as "label",
FILE_NAME as "text",
A.FILE_ID as "ename",
FILE_TYPE as "leaf",
A.FILE_NAME as "text",
FILE_TYPE as "type",
A.FILE_TYPE as "leaf",
PARENT_ID as "parentId",
A.FILE_TYPE as "type",
DELETE_FLAG as "isDeleted",
A.PARENT_ID as "parentId",
LEAF_LEVEL as "leafLevel"
A.DELETE_FLAG as "isDeleted",
FROM ${hggpSchema}.HGWD001
A.LEAF_LEVEL as "leafLevel"
FROM ${hggpSchema}.HGWD001 A INNER JOIN ${hggpSchema}.HGWD003 B ON A.FILE_ID = B.FILE_ID
WHERE 1=1
WHERE 1=1
<isEmpty
prepend=
" AND "
property=
"deletedQuery"
>
<isEmpty
prepend=
" AND "
property=
"deletedQuery"
>
A.
DELETE_FLAG = '0'
DELETE_FLAG = '0'
</isEmpty>
</isEmpty>
<isNotEmpty
prepend=
" AND "
property=
"node"
>
<isNotEmpty
prepend=
" AND "
property=
"node"
>
A.
PARENT_ID = #node#
PARENT_ID = #node#
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"companyCode"
>
<isNotEmpty
prepend=
" AND "
property=
"companyCode"
>
A.
COMPANY_CODE = #companyCode#
COMPANY_CODE = #companyCode#
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"accountCode"
>
<isNotEmpty
prepend=
" AND "
property=
"accountCode"
>
A.ACCOUNT_CODE = #accountCode#
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"userId"
>
B.USER_ID = #userId#
</isNotEmpty>
</isNotEmpty>
group by A.COMPANY_CODE,A.PROJ_CODE,A.FILE_ID,A.FILE_NAME,A.FILE_TYPE,A.PARENT_ID,A.DELETE_FLAG
<!--group by COMPANY_CODE, PROJ_CODE, FILE_ID, FILE_NAME, FILE_TYPE, PARENT_ID, DELETE_FLAG-->
order by
A.
CREATED_TIME asc
order by CREATED_TIME asc
</select>
</select>
<!--档库所有子节点树查询-->
<!--档库所有子节点树查询-->
...
...
src/main/java/com/baosight/hggp/hg/wd/sql/HGWD001A.xml
View file @
cb68d56c
...
@@ -74,9 +74,15 @@
...
@@ -74,9 +74,15 @@
<isNotEmpty
prepend=
" AND "
property=
"changeContent"
>
<isNotEmpty
prepend=
" AND "
property=
"changeContent"
>
CHANGE_CONTENT = #changeContent#
CHANGE_CONTENT = #changeContent#
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"changeStartCode"
>
CHANGE_START_CODE = #changeStartCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"changeStart"
>
<isNotEmpty
prepend=
" AND "
property=
"changeStart"
>
CHANGE_START = #changeStart#
CHANGE_START = #changeStart#
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"changeEndCode"
>
CHANGE_END_CODE = #changeEndCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"changeEnd"
>
<isNotEmpty
prepend=
" AND "
property=
"changeEnd"
>
CHANGE_END = #changeEnd#
CHANGE_END = #changeEnd#
</isNotEmpty>
</isNotEmpty>
...
@@ -104,7 +110,9 @@
...
@@ -104,7 +110,9 @@
PROJ_NAME as "projName",
<!-- 项目名称 -->
PROJ_NAME as "projName",
<!-- 项目名称 -->
CHANGE_TYPE as "changeType",
<!-- 变更类型 -->
CHANGE_TYPE as "changeType",
<!-- 变更类型 -->
CHANGE_CONTENT as "changeContent",
<!-- 变更内容 -->
CHANGE_CONTENT as "changeContent",
<!-- 变更内容 -->
CHANGE_START_CODE as "changeStartCode",
CHANGE_START as "changeStart",
<!-- 变更前 -->
CHANGE_START as "changeStart",
<!-- 变更前 -->
CHANGE_END_CODE as "changeEndCode",
CHANGE_END as "changeEnd",
<!-- 变更后 -->
CHANGE_END as "changeEnd",
<!-- 变更后 -->
MAT_ID as "matId"
MAT_ID as "matId"
FROM ${hggpSchema}.HGWD001A WHERE 1=1
FROM ${hggpSchema}.HGWD001A WHERE 1=1
...
@@ -184,26 +192,30 @@
...
@@ -184,26 +192,30 @@
<insert
id=
"insert"
>
<insert
id=
"insert"
>
INSERT INTO ${hggpSchema}.HGWD001A (ID,
INSERT INTO ${hggpSchema}.HGWD001A (ID,
ACCOUNT_CODE,
<!-- 企业编码 -->
ACCOUNT_CODE,
<!-- 企业编码 -->
DEP_CODE,
<!-- 部门编码 -->
DEP_CODE,
<!-- 部门编码 -->
CREATED_BY,
<!-- 记录创建者 -->
CREATED_BY,
<!-- 记录创建者 -->
CREATED_NAME,
<!-- 记录创建名称 -->
CREATED_NAME,
<!-- 记录创建名称 -->
CREATED_TIME,
<!-- 记录创建时间 -->
CREATED_TIME,
<!-- 记录创建时间 -->
UPDATED_BY,
<!-- 记录修改者 -->
UPDATED_BY,
<!-- 记录修改者 -->
UPDATED_NAME,
<!-- 记录修改名称 -->
UPDATED_NAME,
<!-- 记录修改名称 -->
UPDATED_TIME,
<!-- 记录修改时间 -->
UPDATED_TIME,
<!-- 记录修改时间 -->
DELETE_FLAG,
<!-- 0-未删除,1-已删除 -->
DELETE_FLAG,
<!-- 0-未删除,1-已删除 -->
COMPANY_CODE,
<!-- 公司编码 -->
COMPANY_CODE,
<!-- 公司编码 -->
COMPANY_NAME,
<!-- 公司名称 -->
COMPANY_NAME,
<!-- 公司名称 -->
PROJ_CODE,
<!-- 项目编码 -->
PROJ_CODE,
<!-- 项目编码 -->
PROJ_NAME,
<!-- 项目名称 -->
PROJ_NAME,
<!-- 项目名称 -->
CHANGE_TYPE,
<!-- 变更类型 -->
CHANGE_TYPE,
<!-- 变更类型 -->
CHANGE_CONTENT,
<!-- 变更内容 -->
CHANGE_CONTENT,
<!-- 变更内容 -->
CHANGE_START,
<!-- 变更前 -->
CHANGE_START_CODE,
CHANGE_END,
<!-- 变更后 -->
CHANGE_START,
<!-- 变更前 -->
MAT_ID
CHANGE_END_CODE,
)
CHANGE_END,
<!-- 变更后 -->
VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #companyCode#, #companyName#, #projCode#, #projName#, #changeType#, #changeContent#, #changeStart#, #changeEnd#,#matId#)
MAT_ID
)
VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#,
#updatedTime#, #deleteFlag#, #companyCode#, #companyName#, #projCode#, #projName#, #changeType#,
#changeContent#, #changeStartCode#, #changeStart#, #changeEndCode#, #changeEnd#,#matId#)
</insert>
</insert>
<delete
id=
"delete"
>
<delete
id=
"delete"
>
...
@@ -234,7 +246,9 @@
...
@@ -234,7 +246,9 @@
PROJ_NAME = #projName#,
<!-- 项目名称 -->
PROJ_NAME = #projName#,
<!-- 项目名称 -->
CHANGE_TYPE = #changeType#,
<!-- 变更类型 -->
CHANGE_TYPE = #changeType#,
<!-- 变更类型 -->
CHANGE_CONTENT = #changeContent#,
<!-- 变更内容 -->
CHANGE_CONTENT = #changeContent#,
<!-- 变更内容 -->
CHANGE_START_CODE = #changeStartCode#,
CHANGE_START = #changeStart#,
<!-- 变更前 -->
CHANGE_START = #changeStart#,
<!-- 变更前 -->
CHANGE_END_CODE as #changeEndCode#,
CHANGE_END = #changeEnd#,
<!-- 变更后 -->
CHANGE_END = #changeEnd#,
<!-- 变更后 -->
MAT_ID = #matId#
MAT_ID = #matId#
WHERE
WHERE
...
...
src/main/java/com/baosight/hggp/hg/wd/sql/HGWD099.xml
0 → 100644
View file @
cb68d56c
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd">
<sqlMap
namespace=
"HGWD099"
>
<sql
id=
"column"
>
ID as "id",
ACCOUNT_CODE as "accountCode",
<!-- 企业编码 -->
DEP_CODE as "depCode",
<!-- 部门编码 预留 -->
CREATED_BY as "createdBy",
<!-- 创建人 -->
CREATED_NAME as "createdName",
<!-- 创建人名称 -->
CREATED_TIME as "createdTime",
<!-- 创建时间 -->
UPDATED_BY as "updatedBy",
<!-- 修改人 -->
UPDATED_NAME as "updatedName",
<!-- 修改人名称 -->
UPDATED_TIME as "updatedTime",
<!-- 修改时间 -->
BIZ_TYPE as "bizType",
<!-- 业务类型 -->
BIZ_ID as "bizId",
<!-- 业务ID -->
DOC_ID as "docId",
<!-- 文件ID -->
DOC_NAME as "docName",
<!-- 文件名称 -->
STATUS as "status",
PREVIEW_NUM as "previewNum",
<!-- 预览次数 -->
DOWNLOAD_NUM as "downloadNum",
<!-- 下载次数 -->
DOC_VERSION as "docVersion",
<!-- 文件版本号 -->
RELEASE_DATE as "releaseDate"
<!-- 发布时间 -->
</sql>
<sql
id=
"condition"
>
AND DELETE_FLAG = '0'
<include
refid=
"HGXSDataAuth.authCondition"
/>
<isNotEmpty
prepend=
" AND "
property=
"id"
>
ID = #id#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"bizType"
>
BIZ_TYPE = #bizType#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"bizId"
>
BIZ_ID = #bizId#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"fileId"
>
BIZ_ID IN (select FILE_ID from ${hggpSchema}.hgwd003 where USER_ID = #userId# and FILE_ID = #fileId# )
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"docId"
>
DOC_ID = #docId#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"status"
>
STATUS = #status#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"docVersion"
>
DOC_VERSION = #docVersion#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"releaseDate"
>
RELEASE_DATE = #releaseDate#
</isNotEmpty>
</sql>
<sql
id=
"customCondition"
>
<include
refid=
"condition"
/>
<isNotEmpty
prepend=
" AND "
property=
"docName"
>
DOC_NAME LIKE CONCAT('%', #docName#, '%')
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"createdDateFrom"
>
CREATED_TIME
>
= CONCAT(REPLACE(#createdDateFrom#, '-', ''), '000000')
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"createdDateTo"
>
CREATED_TIME
<
= CONCAT(REPLACE(#createdDateTo#, '-', ''), '235959')
</isNotEmpty>
</sql>
<sql
id=
"orderBy"
>
<dynamic
prepend=
"ORDER BY"
>
<isNotEmpty
property=
"orderBy"
>
$orderBy$
</isNotEmpty>
<isEmpty
property=
"orderBy"
>
ID DESC
</isEmpty>
</dynamic>
</sql>
<select
id=
"query"
resultClass=
"com.baosight.hggp.hg.wd.domain.HGWD099"
>
SELECT
<include
refid=
"column"
/>
FROM ${hggpSchema}.HGWD099
WHERE 1=1
<include
refid=
"customCondition"
/>
<include
refid=
"orderBy"
/>
</select>
<select
id=
"count"
resultClass=
"int"
>
SELECT COUNT(*)
FROM ${hggpSchema}.HGWD099
WHERE 1=1
<include
refid=
"customCondition"
/>
</select>
<insert
id=
"insert"
>
INSERT INTO ${hggpSchema}.HGWD099 (
ACCOUNT_CODE,
<!-- 企业编码 -->
DEP_CODE,
<!-- 部门编码 -->
CREATED_BY,
<!-- 创建人 -->
CREATED_NAME,
<!-- 创建人名称 -->
CREATED_TIME,
<!-- 创建时间 -->
DELETE_FLAG,
<!-- 是否删除 -->
BIZ_TYPE,
<!-- 业务类型 -->
BIZ_ID,
<!-- 业务ID -->
DOC_ID,
<!-- 文件ID -->
DOC_NAME,
<!-- 文件名称 -->
STATUS,
DOC_VERSION,
RELEASE_DATE
) VALUES (
#accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#,
#deleteFlag#, #bizType#, #bizId#, #docId#, #docName#, #status#, #docVersion#, #releaseDate#
)
</insert>
<delete
id=
"deleteBizId"
>
UPDATE ${hggpSchema}.HGWD099
SET DELETE_FLAG = 1
WHERE BIZ_ID = #bizId#
</delete>
<delete
id=
"delete"
>
UPDATE ${hggpSchema}.HGWD099
SET DELETE_FLAG = 1
WHERE ID = #id#
</delete>
<update
id=
"update"
>
UPDATE ${hggpSchema}.HGWD099
SET
DOC_ID = #docId#,
<!-- 文件ID -->
DOC_NAME = #docName#,
<!-- 文件名称 -->
STATUS = #status#,
DOC_VERSION = DOC_VERSION + 1,
<!--版本号-->
RELEASE_DATE = #releaseDate#,
<!--发布时间-->
UPDATED_BY = #updatedBy#,
<!-- 修改人 -->
UPDATED_NAME = #updatedName#,
<!-- 修改人名称 -->
UPDATED_TIME = #updatedTime#
<!-- 修改时间 -->
WHERE ID = #id#
</update>
<update
id=
"updateStatus"
>
UPDATE ${hggpSchema}.HGWD099
SET
STATUS = #status#,
<!-- 状态 -->
UPDATED_BY = #updatedBy#,
<!-- 修改人 -->
UPDATED_NAME = #updatedName#,
<!-- 修改人名称 -->
UPDATED_TIME = #updatedTime#
<!-- 修改时间 -->
WHERE ID = #id#
</update>
<update
id=
"updateReleaseDate"
>
UPDATE ${hggpSchema}.HGWD099
SET
RELEASE_DATE = #releaseDate#,
<!--发布时间-->
DOC_VERSION = DOC_VERSION + 1,
<!--版本号-->
STATUS = #status#,
<!-- 状态 -->
<include
refid=
"SqlBase.updateRevise"
/>
WHERE ID = #id#
</update>
<update
id=
"batchUpdate"
>
UPDATE ${hggpSchema}.HGWD099
SET
BIZ_ID = #bizId#,
<!-- 物料ID -->
UPDATED_BY = #updatedBy#,
<!-- 修改人 -->
UPDATED_NAME = #updatedName#,
<!-- 修改人名称 -->
UPDATED_TIME = #updatedTime#
<!-- 修改时间 -->
WHERE DOC_ID IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"docIds"
>
#docIds[]#
</iterate>
</update>
<!-- 预览自增 -->
<update
id=
"previewIncr"
>
UPDATE ${hggpSchema}.HGWD099
SET
PREVIEW_NUM = PREVIEW_NUM + 1,
<include
refid=
"SqlBase.updateRevise"
/>
WHERE DOC_ID = #docId#
</update>
<!-- 下载自增 -->
<update
id=
"downloadIncr"
>
UPDATE ${hggpSchema}.HGWD099
SET
DOWNLOAD_NUM = DOWNLOAD_NUM + 1,
<include
refid=
"SqlBase.updateRevise"
/>
WHERE DOC_ID = #docId#
</update>
</sqlMap>
\ No newline at end of file
src/main/java/com/baosight/hggp/hg/wd/tools/HGWDTools.java
View file @
cb68d56c
package
com
.
baosight
.
hggp
.
hg
.
wd
.
tools
;
package
com
.
baosight
.
hggp
.
hg
.
wd
.
tools
;
import
com.baosight.hggp.core.constant.CommonConstant
;
import
com.baosight.hggp.core.constant.S3Constant
;
import
com.baosight.hggp.core.dao.DaoBase
;
import
com.baosight.hggp.core.dao.DaoBase
;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.hg.cw.constant.HgCwSqlConstant
;
import
com.baosight.hggp.hg.cw.domain.HGCW999
;
import
com.baosight.hggp.hg.dm.domain.HGDM099
;
import
com.baosight.hggp.hg.wd.constant.HgWdSqlConstant
;
import
com.baosight.hggp.hg.wd.constant.HgWdSqlConstant
;
import
com.baosight.hggp.hg.wd.domain.HGWD001
;
import
com.baosight.hggp.hg.wd.domain.HGWD001
;
import
com.baosight.hggp.hg.wd.domain.HGWD001A
;
import
com.baosight.hggp.hg.wd.domain.HGWD001A
;
import
com.baosight.hggp.hg.wd.domain.HGWD002
;
import
com.baosight.hggp.hg.wd.domain.HGWD002
;
import
com.baosight.hggp.hg.wd.domain.HGWD099
;
import
com.baosight.hggp.util.AssertUtils
;
import
com.baosight.hggp.util.AssertUtils
;
import
com.baosight.hggp.util.MapUtils
;
import
com.baosight.hggp.util.MapUtils
;
import
com.baosight.iplat4j.core.ProjectInfo
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.CollectionUtils
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -84,7 +92,7 @@ public class HGWDTools {
...
@@ -84,7 +92,7 @@ public class HGWDTools {
return
DaoBase
.
getInstance
().
query
(
HgWdSqlConstant
.
HgWd001
.
SEARCH_TREE_NODE
,
queryMap
);
return
DaoBase
.
getInstance
().
query
(
HgWdSqlConstant
.
HgWd001
.
SEARCH_TREE_NODE
,
queryMap
);
}
}
public
static
void
add
(
HGWD001A
hgwd001a
)
{
public
static
void
add
HGWD001A
(
HGWD001A
hgwd001a
)
{
AssertUtils
.
isNull
(
hgwd001a
,
"文档对象不能为空"
);
AssertUtils
.
isNull
(
hgwd001a
,
"文档对象不能为空"
);
DaoUtils
.
insert
(
HGWD001A
.
INSERT
,
hgwd001a
);
DaoUtils
.
insert
(
HGWD001A
.
INSERT
,
hgwd001a
);
}
}
...
@@ -127,4 +135,50 @@ public class HGWDTools {
...
@@ -127,4 +135,50 @@ public class HGWDTools {
return
CollectionUtils
.
isEmpty
(
results
)
?
null
:
results
.
get
(
0
);
return
CollectionUtils
.
isEmpty
(
results
)
?
null
:
results
.
get
(
0
);
}
}
}
}
public
static
class
HgWd099
{
public
static
List
<
HGWD099
>
getByDocId
(
String
bizType
,
String
docId
)
{
AssertUtils
.
isEmpty
(
docId
,
"文件ID不能为空"
);
Map
<
String
,
Object
>
paramMap
=
new
HashMap
();
paramMap
.
put
(
HGWD099
.
FIELD_BIZ_TYPE
,
bizType
);
paramMap
.
put
(
HGWD099
.
FIELD_DOC_ID
,
docId
);
return
DaoBase
.
getInstance
().
query
(
HGWD099
.
QUERY
,
paramMap
);
}
/**
* 预览记录自增
*
* @param docId
*/
public
static
void
previewIncr
(
String
docId
)
{
AssertUtils
.
isEmpty
(
docId
,
"文件ID不能为空"
);
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
HGCW999
.
FIELD_DOC_ID
,
docId
);
DaoUtils
.
update
(
HgWdSqlConstant
.
HgWd099
.
PREVIEW_INCR
,
queryMap
);
}
/**
* 下载记录自增
*
* @param docId
*/
public
static
void
downloadIncr
(
String
docId
)
{
AssertUtils
.
isEmpty
(
docId
,
"文件ID不能为空"
);
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
HGCW999
.
FIELD_DOC_ID
,
docId
);
DaoUtils
.
update
(
HgWdSqlConstant
.
HgWd099
.
DOWNLOAD_INCR
,
queryMap
);
}
public
static
List
<
HGWD099
>
queryByBiz
(
String
bizType
)
{
AssertUtils
.
isNull
(
bizType
,
"业务类型不能为空!"
);
List
<
HGWD099
>
results
=
DaoBase
.
getInstance
().
query
(
HGWD099
.
QUERY
,
new
HashMap
<
String
,
Object
>(){{
put
(
"bizType"
,
bizType
);}}
);
return
results
;
}
}
}
}
src/main/java/com/baosight/hggp/hg/yx/domain/HGYX001.java
View file @
cb68d56c
...
@@ -53,6 +53,8 @@ public class HGYX001 extends DaoEPBase {
...
@@ -53,6 +53,8 @@ public class HGYX001 extends DaoEPBase {
public
static
final
String
FIELD_CONS_QUANTITY
=
"consQuantity"
;
/* 发货数量*/
public
static
final
String
FIELD_CONS_QUANTITY
=
"consQuantity"
;
/* 发货数量*/
public
static
final
String
FIELD_CONS_WEIGHT
=
"consWeight"
;
/* 发货重量*/
public
static
final
String
FIELD_CONS_WEIGHT
=
"consWeight"
;
/* 发货重量*/
public
static
final
String
FIELD_STATUS
=
"status"
;
/* 审批状态 0-未审核,1-已审核*/
public
static
final
String
FIELD_STATUS
=
"status"
;
/* 审批状态 0-未审核,1-已审核*/
public
static
final
String
FIELD_IS_CONTRACT
=
"isContract"
;
/*是否扣款*/
public
static
final
String
FIELD_CONTRACT_NAME
=
"contractName"
;
/*扣款方*/
public
static
final
String
COL_ID
=
"ID"
;
public
static
final
String
COL_ID
=
"ID"
;
public
static
final
String
COL_ACCOUNT_CODE
=
"ACCOUNT_CODE"
;
/* 企业编码*/
public
static
final
String
COL_ACCOUNT_CODE
=
"ACCOUNT_CODE"
;
/* 企业编码*/
...
@@ -124,6 +126,8 @@ public class HGYX001 extends DaoEPBase {
...
@@ -124,6 +126,8 @@ public class HGYX001 extends DaoEPBase {
private
BigDecimal
consQuantity
=
new
BigDecimal
(
"0"
);
/* 发货数量*/
private
BigDecimal
consQuantity
=
new
BigDecimal
(
"0"
);
/* 发货数量*/
private
BigDecimal
consWeight
=
new
BigDecimal
(
"0"
);
/* 发货重量*/
private
BigDecimal
consWeight
=
new
BigDecimal
(
"0"
);
/* 发货重量*/
private
Integer
status
=
0
;
/* 审批状态 0-未审核,1-已审核*/
private
Integer
status
=
0
;
/* 审批状态 0-未审核,1-已审核*/
private
Integer
isContract
=
0
;
private
String
contractName
=
" "
;
/**
/**
* initialize the metadata.
* initialize the metadata.
...
@@ -258,6 +262,13 @@ public class HGYX001 extends DaoEPBase {
...
@@ -258,6 +262,13 @@ public class HGYX001 extends DaoEPBase {
eiColumn
.
setDescName
(
"审批状态 0-未审核,1-已审核"
);
eiColumn
.
setDescName
(
"审批状态 0-未审核,1-已审核"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_IS_CONTRACT
);
eiColumn
.
setDescName
(
"是否扣款"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_CONTRACT_NAME
);
eiColumn
.
setDescName
(
"扣款方"
);
eiMetadata
.
addMeta
(
eiColumn
);
}
}
...
@@ -748,6 +759,23 @@ public class HGYX001 extends DaoEPBase {
...
@@ -748,6 +759,23 @@ public class HGYX001 extends DaoEPBase {
public
void
setStatus
(
Integer
status
)
{
public
void
setStatus
(
Integer
status
)
{
this
.
status
=
status
;
this
.
status
=
status
;
}
}
public
Integer
getIsContract
()
{
return
isContract
;
}
public
void
setIsContract
(
Integer
isContract
)
{
this
.
isContract
=
isContract
;
}
public
String
getContractName
()
{
return
contractName
;
}
public
void
setContractName
(
String
contractName
)
{
this
.
contractName
=
contractName
;
}
/**
/**
* get the value from Map.
* get the value from Map.
*
*
...
@@ -786,6 +814,8 @@ public class HGYX001 extends DaoEPBase {
...
@@ -786,6 +814,8 @@ public class HGYX001 extends DaoEPBase {
setConsQuantity
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_CONS_QUANTITY
)),
consQuantity
));
setConsQuantity
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_CONS_QUANTITY
)),
consQuantity
));
setConsWeight
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_CONS_WEIGHT
)),
consWeight
));
setConsWeight
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_CONS_WEIGHT
)),
consWeight
));
setStatus
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_STATUS
)),
status
));
setStatus
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_STATUS
)),
status
));
setIsContract
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_IS_CONTRACT
)),
isContract
));
setContractName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_CONTRACT_NAME
)),
contractName
));
}
}
/**
/**
...
@@ -825,6 +855,8 @@ public class HGYX001 extends DaoEPBase {
...
@@ -825,6 +855,8 @@ public class HGYX001 extends DaoEPBase {
map
.
put
(
FIELD_CONS_QUANTITY
,
StringUtils
.
toString
(
consQuantity
,
eiMetadata
.
getMeta
(
FIELD_CONS_QUANTITY
)));
map
.
put
(
FIELD_CONS_QUANTITY
,
StringUtils
.
toString
(
consQuantity
,
eiMetadata
.
getMeta
(
FIELD_CONS_QUANTITY
)));
map
.
put
(
FIELD_CONS_WEIGHT
,
StringUtils
.
toString
(
consWeight
,
eiMetadata
.
getMeta
(
FIELD_CONS_WEIGHT
)));
map
.
put
(
FIELD_CONS_WEIGHT
,
StringUtils
.
toString
(
consWeight
,
eiMetadata
.
getMeta
(
FIELD_CONS_WEIGHT
)));
map
.
put
(
FIELD_STATUS
,
StringUtils
.
toString
(
status
,
eiMetadata
.
getMeta
(
FIELD_STATUS
)));
map
.
put
(
FIELD_STATUS
,
StringUtils
.
toString
(
status
,
eiMetadata
.
getMeta
(
FIELD_STATUS
)));
map
.
put
(
FIELD_IS_CONTRACT
,
StringUtils
.
toString
(
isContract
,
eiMetadata
.
getMeta
(
FIELD_IS_CONTRACT
)));
map
.
put
(
FIELD_CONTRACT_NAME
,
StringUtils
.
toString
(
contractName
,
eiMetadata
.
getMeta
(
FIELD_CONTRACT_NAME
)));
return
map
;
return
map
;
}
}
...
...
src/main/java/com/baosight/hggp/hg/yx/service/ServiceHGYX001A.java
View file @
cb68d56c
...
@@ -48,6 +48,7 @@ public class ServiceHGYX001A extends ServiceEPBase {
...
@@ -48,6 +48,7 @@ public class ServiceHGYX001A extends ServiceEPBase {
outInfo
=
super
.
query
(
inInfo
,
HGYX001A
.
QUERY
,
new
HGYX001A
());
outInfo
=
super
.
query
(
inInfo
,
HGYX001A
.
QUERY
,
new
HGYX001A
());
outInfo
.
getBlock
(
EiConstant
.
queryBlock
).
setRows
(
Collections
.
singletonList
(
hgYx001
));
outInfo
.
getBlock
(
EiConstant
.
queryBlock
).
setRows
(
Collections
.
singletonList
(
hgYx001
));
outInfo
.
getBlock
(
EiConstant
.
queryBlock
).
setBlockMeta
(
new
HGYX001
().
eiMetadata
);
}
}
outInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
"type"
,
type
);
outInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
"type"
,
type
);
List
<
String
>
roleCompanyCode
=
HGSBTools
.
getRoleCompanyCode
();
List
<
String
>
roleCompanyCode
=
HGSBTools
.
getRoleCompanyCode
();
...
...
src/main/java/com/baosight/hggp/hg/yx/service/ServiceHGYX001B.java
View file @
cb68d56c
...
@@ -43,6 +43,7 @@ public class ServiceHGYX001B extends ServiceEPBase {
...
@@ -43,6 +43,7 @@ public class ServiceHGYX001B extends ServiceEPBase {
outInfo
=
super
.
query
(
inInfo
,
HGYX001A
.
QUERY
,
new
HGYX001A
());
outInfo
=
super
.
query
(
inInfo
,
HGYX001A
.
QUERY
,
new
HGYX001A
());
outInfo
.
getBlock
(
EiConstant
.
queryBlock
).
setRows
(
Collections
.
singletonList
(
hgYx001
));
outInfo
.
getBlock
(
EiConstant
.
queryBlock
).
setRows
(
Collections
.
singletonList
(
hgYx001
));
outInfo
.
getBlock
(
EiConstant
.
queryBlock
).
setBlockMeta
(
new
HGYX001
().
eiMetadata
);
}
}
//UserVO userVO = HGCWTools.HgCw002.getUserCompany();
//UserVO userVO = HGCWTools.HgCw002.getUserCompany();
List
<
String
>
roleCompanyCode
=
HGSBTools
.
getRoleCompanyCode
();
List
<
String
>
roleCompanyCode
=
HGSBTools
.
getRoleCompanyCode
();
...
...
src/main/java/com/baosight/hggp/hg/yx/sql/HGYX001.xml
View file @
cb68d56c
...
@@ -69,7 +69,9 @@
...
@@ -69,7 +69,9 @@
NUM_PLATE as "numPlate",
<!-- 车号 -->
NUM_PLATE as "numPlate",
<!-- 车号 -->
CONS_QUANTITY as "consQuantity",
<!-- 发货数量 -->
CONS_QUANTITY as "consQuantity",
<!-- 发货数量 -->
CONS_WEIGHT as "consWeight",
<!-- 发货重量 -->
CONS_WEIGHT as "consWeight",
<!-- 发货重量 -->
STATUS as "status"
<!-- 审批状态 0-未审核,1-已审核 -->
STATUS as "status",
<!-- 审批状态 0-未审核,1-已审核 -->
IS_CONTRACT as "isContract",
<!-- 是否完成 -->
CONTRACT_NAME as "contractName"
</sql>
</sql>
<sql
id=
"condition"
>
<sql
id=
"condition"
>
<include
refid=
"HGXSDataAuth.authCondition"
/>
<include
refid=
"HGXSDataAuth.authCondition"
/>
...
@@ -166,6 +168,9 @@
...
@@ -166,6 +168,9 @@
<isNotEmpty
prepend=
" AND "
property=
"companyCodes"
>
<isNotEmpty
prepend=
" AND "
property=
"companyCodes"
>
COMPANY_CODE IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"companyCodes"
>
#companyCodes[]#
</iterate>
COMPANY_CODE IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"companyCodes"
>
#companyCodes[]#
</iterate>
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"isContract"
>
IS_CONTRACT = #isContract#
</isNotEmpty>
</sql>
</sql>
<select
id=
"query"
parameterClass=
"java.util.HashMap"
resultClass=
"HGYX001"
>
<select
id=
"query"
parameterClass=
"java.util.HashMap"
resultClass=
"HGYX001"
>
...
@@ -311,12 +316,14 @@
...
@@ -311,12 +316,14 @@
NUM_PLATE,
<!-- 车号 -->
NUM_PLATE,
<!-- 车号 -->
CONS_QUANTITY,
<!-- 发货数量 -->
CONS_QUANTITY,
<!-- 发货数量 -->
CONS_WEIGHT,
<!-- 发货重量 -->
CONS_WEIGHT,
<!-- 发货重量 -->
STATUS
<!-- 审批状态 0-未审核,1-已审核 -->
STATUS,
<!-- 审批状态 0-未审核,1-已审核 -->
IS_CONTRACT,
CONTRACT_NAME
)
)
VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#,
VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#,
#updatedTime#, #deleteFlag#, #companyCode#, #companyName#, #projCode#, #projName#, #deliveryCode#,
#updatedTime#, #deleteFlag#, #companyCode#, #companyName#, #projCode#, #projName#, #deliveryCode#,
#outboundCode#, #consCode#, #consName#, #consWhCode#, #consWhName#, #consAddr#, #receCode#, #receName#,
#outboundCode#, #consCode#, #consName#, #consWhCode#, #consWhName#, #consAddr#, #receCode#, #receName#,
#receAddr#, #receUserPhone#, #tranType#, #numPlate#, #consQuantity#, #consWeight#, #status#)
#receAddr#, #receUserPhone#, #tranType#, #numPlate#, #consQuantity#, #consWeight#, #status#
, #isContract#, #contractName#
)
<selectKey
resultClass=
"long"
keyProperty=
"id"
>
<selectKey
resultClass=
"long"
keyProperty=
"id"
>
SELECT MAX(ID) AS "id" FROM ${hggpSchema}.HGYX001
SELECT MAX(ID) AS "id" FROM ${hggpSchema}.HGYX001
</selectKey>
</selectKey>
...
@@ -364,7 +371,9 @@
...
@@ -364,7 +371,9 @@
NUM_PLATE = #numPlate#,
<!-- 车号 -->
NUM_PLATE = #numPlate#,
<!-- 车号 -->
CONS_QUANTITY = #consQuantity#,
<!-- 发货数量 -->
CONS_QUANTITY = #consQuantity#,
<!-- 发货数量 -->
CONS_WEIGHT = #consWeight#,
<!-- 发货重量 -->
CONS_WEIGHT = #consWeight#,
<!-- 发货重量 -->
STATUS = #status#
<!-- 审批状态 0-未审核,1-已审核 -->
STATUS = #status#,
<!-- 审批状态 0-未审核,1-已审核 -->
IS_CONTRACT = #isContract#,
CONTRACT_NAME = #contractName#
WHERE
WHERE
ID = #id#
ID = #id#
</update>
</update>
...
...
src/main/java/com/baosight/hggp/hg/zl/service/ServiceHGZL001B.java
View file @
cb68d56c
...
@@ -68,6 +68,7 @@ public class ServiceHGZL001B extends ServiceEPBase {
...
@@ -68,6 +68,7 @@ public class ServiceHGZL001B extends ServiceEPBase {
try
{
try
{
Map
queryMap
=
EiInfoUtils
.
getFirstRow
(
inInfo
);
Map
queryMap
=
EiInfoUtils
.
getFirstRow
(
inInfo
);
queryMap
.
put
(
HGCG003B
.
FIELD_SOURCE
,
HGConstant
.
CgSource
.
DEFAULT
);
queryMap
.
put
(
HGCG003B
.
FIELD_SOURCE
,
HGConstant
.
CgSource
.
DEFAULT
);
queryMap
.
put
(
HGCG003B
.
FIELD_STATUS
,
HGConstant
.
CgReceiveStatus
.
S_0
);
inInfo
=
super
.
query
(
inInfo
,
HGCG003B
.
QUERY_BY_QUALITY_TESTING
,
new
HGCG003B
());
inInfo
=
super
.
query
(
inInfo
,
HGCG003B
.
QUERY_BY_QUALITY_TESTING
,
new
HGCG003B
());
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"查询失败"
);
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"查询失败"
);
...
...
src/main/java/com/baosight/xservices/xs/service/ServiceXSUserJwt.java
View file @
cb68d56c
package
com
.
baosight
.
xservices
.
xs
.
service
;
package
com
.
baosight
.
xservices
.
xs
.
service
;
import
com.baosight.iplat4j.core.FrameworkInfo
;
import
com.baosight.iplat4j.core.FrameworkInfo
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
import
com.baosight.iplat4j.core.ei.EiInfo
;
import
com.baosight.iplat4j.core.ei.EiInfo
;
import
com.baosight.iplat4j.core.log.Logger
;
import
com.baosight.iplat4j.core.log.Logger
;
import
com.baosight.iplat4j.core.log.LoggerFactory
;
import
com.baosight.iplat4j.core.log.LoggerFactory
;
...
@@ -11,11 +12,12 @@ import com.baosight.iplat4j.core.service.impl.ServiceBase;
...
@@ -11,11 +12,12 @@ import com.baosight.iplat4j.core.service.impl.ServiceBase;
import
com.baosight.iplat4j.core.util.StringUtils
;
import
com.baosight.iplat4j.core.util.StringUtils
;
import
com.baosight.iplat4j.core.web.threadlocal.UserSession
;
import
com.baosight.iplat4j.core.web.threadlocal.UserSession
;
import
com.baosight.xservices.xs.jwt.JwtTokenValidator
;
import
com.baosight.xservices.xs.jwt.JwtTokenValidator
;
import
java.util.HashMap
;
import
java.util.Map
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.security.core.userdetails.UsernameNotFoundException
;
import
org.springframework.security.core.userdetails.UsernameNotFoundException
;
import
java.util.HashMap
;
import
java.util.Map
;
/**
/**
* 重写
* 重写
*
*
...
@@ -76,6 +78,49 @@ public class ServiceXSUserJwt extends ServiceBase {
...
@@ -76,6 +78,49 @@ public class ServiceXSUserJwt extends ServiceBase {
return
outInfo
;
return
outInfo
;
}
}
/**
* 德诚系统对接专用
*
* @param inInfo
* @return
*/
public
EiInfo
generateJwtDc
(
EiInfo
inInfo
)
{
String
username
=
inInfo
.
getString
(
"loginName"
);
String
password
=
inInfo
.
getString
(
"password"
);
String
audience
=
inInfo
.
getString
(
"audience"
);
EiInfo
outInfo
=
new
EiInfo
();
try
{
if
(!
StringUtils
.
isNotEmpty
(
audience
))
{
audience
=
FrameworkInfo
.
getProjectEname
().
toUpperCase
();
}
IUserManager
um
=
SecurityFactory
.
getUserManager
();
User
user
=
um
.
getUser
(
"DC"
+
username
);
if
(
user
==
null
)
{
throw
new
UsernameNotFoundException
(
"Can't find user!"
);
}
Map
tokenMap
=
new
HashMap
();
tokenMap
.
put
(
"sub"
,
user
.
getLoginName
());
tokenMap
.
put
(
"uid"
,
user
.
getUserId
());
Object
userCname
=
user
.
get
(
"userName"
);
if
(
userCname
!=
null
)
{
tokenMap
.
put
(
"ucn"
,
userCname
.
toString
());
}
if
(!
StringUtils
.
isNotEmpty
(
audience
))
{
audience
=
FrameworkInfo
.
getProjectEname
().
toUpperCase
();
}
String
token
=
this
.
jwtTokenValidator
.
generateToken
(
tokenMap
,
audience
);
outInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
outInfo
.
setMsg
(
"登录成功!"
);
outInfo
.
set
(
"token"
,
token
);
}
catch
(
Exception
var11
)
{
this
.
logger
.
error
(
var11
.
getMessage
(),
var11
);
outInfo
.
setStatus
(
EiConstant
.
STATUS_FAILURE
);
outInfo
.
setMsg
(
var11
.
getMessage
());
}
return
outInfo
;
}
public
EiInfo
validateTest
(
EiInfo
inInfo
)
{
public
EiInfo
validateTest
(
EiInfo
inInfo
)
{
new
HashMap
();
new
HashMap
();
inInfo
.
set
(
"userSessionData"
,
new
HashMap
(
UserSession
.
getData
()));
inInfo
.
set
(
"userSessionData"
,
new
HashMap
(
UserSession
.
getData
()));
...
...
src/main/resources/application.properties
View file @
cb68d56c
...
@@ -18,7 +18,7 @@ spring.servlet.multipart.file-size-threshold=0
...
@@ -18,7 +18,7 @@ spring.servlet.multipart.file-size-threshold=0
componentEname
=
hggp
componentEname
=
hggp
projectName
=
hggp
projectName
=
hggp
moduleName
=
ep
moduleName
=
ep
projectEnv
=
run
projectEnv
=
dev
platSchema
=
iplat_hggp
platSchema
=
iplat_hggp
eplatSchema
=
EPLAT_HGGP
eplatSchema
=
EPLAT_HGGP
lowcodedbSchema
=
lowcodedb_hggp
lowcodedbSchema
=
lowcodedb_hggp
...
@@ -33,12 +33,12 @@ customerName=\u6B66\u6C49\u5B9D\u4FE1\u5927\u6570\u636E\u4E8B\u4E1A\u90E8
...
@@ -33,12 +33,12 @@ customerName=\u6B66\u6C49\u5B9D\u4FE1\u5927\u6570\u636E\u4E8B\u4E1A\u90E8
enterpriseName
=
\u
6B66
\u
6C49
\u
5B9D
\u
4FE1
\u5927\u6570\u
636E
\u
4E8B
\u
4E1A
\u
90E8
enterpriseName
=
\u
6B66
\u
6C49
\u
5B9D
\u
4FE1
\u5927\u6570\u
636E
\u
4E8B
\u
4E1A
\u
90E8
datasource.type
=
dbcp
datasource.type
=
dbcp
jdbc.driverClassName
=
com.mysql.cj.jdbc.Driver
jdbc.driverClassName
=
com.mysql.cj.jdbc.Driver
jdbc.url
=
jdbc:mysql://rm-uf60e9vbmanleydq4.mysql.rds.aliyuncs.com:3306/iplat_hggp?useSSL=false&useUnicode=true&characterEncoding=utf-8
#
jdbc.url=jdbc:mysql://rm-uf60e9vbmanleydq4.mysql.rds.aliyuncs.com:3306/iplat_hggp?useSSL=false&useUnicode=true&characterEncoding=utf-8
#
jdbc.url=jdbc:mysql://129.211.46.84:3306/iplat_hggp?useSSL=false&useUnicode=true&characterEncoding=utf-8
jdbc.url
=
jdbc:mysql://129.211.46.84:3306/iplat_hggp?useSSL=false&useUnicode=true&characterEncoding=utf-8
jdbc.username
=
hggp
#
jdbc.username=hggp
#
jdbc.username=root
jdbc.username
=
root
jdbc.password
=
hggp_Twhxz2024Aly
#
jdbc.password=hggp_Twhxz2024Aly
#
jdbc.password=Whxz@2019
jdbc.password
=
Whxz@2019
jdbc.maxActive
=
20
jdbc.maxActive
=
20
jdbc.validationQuery
=
SELECT 1 FROM ${platSchema}.TEDFA00
jdbc.validationQuery
=
SELECT 1 FROM ${platSchema}.TEDFA00
...
...
src/main/resources/quartz.properties
View file @
cb68d56c
...
@@ -22,12 +22,12 @@ org.quartz.jobStore.isClustered = true
...
@@ -22,12 +22,12 @@ org.quartz.jobStore.isClustered = true
#\u6570\u636E\u5E93\u8FDE\u63A5\u914D\u7F6E\u4FE1\u606F
#\u6570\u636E\u5E93\u8FDE\u63A5\u914D\u7F6E\u4FE1\u606F
org.quartz.jobStore.clusterCheckinInterval
=
20000
org.quartz.jobStore.clusterCheckinInterval
=
20000
org.quartz.dataSource.appDS.driver
=
com.mysql.cj.jdbc.Driver
org.quartz.dataSource.appDS.driver
=
com.mysql.cj.jdbc.Driver
org.quartz.dataSource.appDS.URL
=
jdbc:mysql://rm-uf60e9vbmanleydq4.mysql.rds.aliyuncs.com:3306/iplat_hggp?useSSL=false&useUnicode=true&characterEncoding=utf-8
#
org.quartz.dataSource.appDS.URL = jdbc:mysql://rm-uf60e9vbmanleydq4.mysql.rds.aliyuncs.com:3306/iplat_hggp?useSSL=false&useUnicode=true&characterEncoding=utf-8
#
org.quartz.dataSource.appDS.URL = jdbc:mysql://129.211.46.84:3306/iplat_hggp?useSSL=false&useUnicode=true&characterEncoding=utf-8
org.quartz.dataSource.appDS.URL
=
jdbc:mysql://129.211.46.84:3306/iplat_hggp?useSSL=false&useUnicode=true&characterEncoding=utf-8
org.quartz.dataSource.appDS.user
=
hggp
#
org.quartz.dataSource.appDS.user = hggp
#
org.quartz.dataSource.appDS.user = root
org.quartz.dataSource.appDS.user
=
root
org.quartz.dataSource.appDS.password
=
hggp_Twhxz2024Aly
#
org.quartz.dataSource.appDS.password = hggp_Twhxz2024Aly
#
org.quartz.dataSource.appDS.password = Whxz@2019
org.quartz.dataSource.appDS.password
=
Whxz@2019
org.quartz.dataSource.appDS.maxConnections
=
30
org.quartz.dataSource.appDS.maxConnections
=
30
org.quartz.plugin.logging.class
=
com.baosight.xservices.ej.job.quartz.JobLoggingPluginWithPartition
org.quartz.plugin.logging.class
=
com.baosight.xservices.ej.job.quartz.JobLoggingPluginWithPartition
...
...
src/main/resources/resources/ibatis/sqlmap-config.xml
View file @
cb68d56c
...
@@ -98,5 +98,6 @@
...
@@ -98,5 +98,6 @@
<sqlMap
resource=
"com/baosight/hggp/hg/wd/sql/HGWD001.xml"
/>
<sqlMap
resource=
"com/baosight/hggp/hg/wd/sql/HGWD001.xml"
/>
<sqlMap
resource=
"com/baosight/hggp/hg/wd/sql/HGWD002.xml"
/>
<sqlMap
resource=
"com/baosight/hggp/hg/wd/sql/HGWD002.xml"
/>
<sqlMap
resource=
"com/baosight/hggp/hg/wd/sql/HGWD003.xml"
/>
<sqlMap
resource=
"com/baosight/hggp/hg/wd/sql/HGWD003.xml"
/>
<sqlMap
resource=
"com/baosight/hggp/hg/wd/sql/HGWD099.xml"
/>
</sqlMapConfig>
</sqlMapConfig>
src/main/webapp/HG/CG/HGCG001.js
View file @
cb68d56c
...
@@ -8,22 +8,22 @@ $(function () {
...
@@ -8,22 +8,22 @@ $(function () {
pageSize
:
20
,
pageSize
:
20
,
pageSizes
:
[
20
,
50
,
70
,
100
],
pageSizes
:
[
20
,
50
,
70
,
100
],
},
},
columns
:
[
columns
:
[{
{
field
:
"operator"
,
field
:
"operator"
,
title
:
"操作"
,
title
:
"操作"
,
template
:
function
(
item
)
{
template
:
function
(
item
)
{
let
template
=
''
;
let
template
=
''
;
if
(
!
isBlank
(
item
.
id
))
{
if
(
!
isBlank
(
item
.
id
)){
template
+=
'<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
template
+=
'<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+
'onclick="showDetail('
+
item
.
id
+
', '
+
item
.
status
+
', '
+
item
.
source
+
'onclick="showDetail('
+
item
.
id
+
', '
+
item
.
status
+
', '
+
item
.
source
+
')" >详情</a>'
;
+
')" >详情</a>'
;
}
return
template
;
}
}
},
{
return
template
;
field
:
"companyCode"
,
}
title
:
"公司编码"
,
},
{
template
:
function
(
dataItem
)
{
field
:
"companyCode"
,
title
:
"公司编码"
,
template
:
function
(
dataItem
)
{
for
(
let
i
=
0
;
i
<
companyCodeBox
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
companyCodeBox
.
length
;
i
++
)
{
if
(
companyCodeBox
[
i
][
'companyCode'
]
===
dataItem
[
'companyCode'
])
{
if
(
companyCodeBox
[
i
][
'companyCode'
]
===
dataItem
[
'companyCode'
])
{
return
companyCodeBox
[
i
][
'companyCode'
];
return
companyCodeBox
[
i
][
'companyCode'
];
...
@@ -41,9 +41,9 @@ $(function () {
...
@@ -41,9 +41,9 @@ $(function () {
return
projCodeBox
[
i
][
'valueField'
];
return
projCodeBox
[
i
][
'valueField'
];
}
}
}
}
return
dataItem
[
"projCode"
];
return
dataItem
[
"projCode"
]
==
null
?
""
:
dataItem
[
"projCode"
]
;
},
},
editor
:
function
(
container
,
options
)
{
editor
:
function
(
container
,
options
)
{
let
inInfo
=
new
EiInfo
();
let
inInfo
=
new
EiInfo
();
inInfo
.
set
(
"inqu_status-0-companyCode"
,
options
.
model
[
"companyCode"
]);
inInfo
.
set
(
"inqu_status-0-companyCode"
,
options
.
model
[
"companyCode"
]);
inInfo
.
set
(
"inqu_status-0-approvalStatus"
,
2
);
inInfo
.
set
(
"inqu_status-0-approvalStatus"
,
2
);
...
...
src/main/webapp/HG/CG/HGCG001.jsp
View file @
cb68d56c
...
@@ -45,11 +45,11 @@
...
@@ -45,11 +45,11 @@
align=
"center"
filter=
"contains"
sort=
"true"
>
align=
"center"
filter=
"contains"
sort=
"true"
>
<EF:EFOptions
blockId=
"roleCompany"
textField=
"companyName"
valueField=
"companyCode"
/>
<EF:EFOptions
blockId=
"roleCompany"
textField=
"companyName"
valueField=
"companyCode"
/>
</EF:EFComboColumn>
</EF:EFComboColumn>
<EF:EFColumn
ename=
"companyName"
cname=
"公司名称"
width=
"
120"
enable=
"false"
readonly=
"true"
align=
"center
"
/>
<EF:EFColumn
ename=
"companyName"
cname=
"公司名称"
width=
"
220"
enable=
"false"
readonly=
"true"
align=
"left
"
/>
<EF:EFColumn
ename=
"projCode"
cname=
"项目编码"
enable=
"true"
width=
"1
20"
align=
"center"
required=
"true"
/>
<EF:EFColumn
ename=
"projCode"
cname=
"项目编码"
enable=
"true"
width=
"1
40"
align=
"center"
required=
"true"
/>
<EF:EFColumn
ename=
"projName"
cname=
"项目名称"
width=
"120"
align=
"
center
"
enable=
"false"
/>
<EF:EFColumn
ename=
"projName"
cname=
"项目名称"
width=
"120"
align=
"
left
"
enable=
"false"
/>
<EF:EFColumn
ename=
"planDate"
cname=
"计划日期"
width=
"100"
align=
"center"
editType=
"date"
<EF:EFColumn
ename=
"planDate"
cname=
"计划日期"
width=
"100"
align=
"center"
editType=
"date"
dateFormat=
"yyyy-MM-dd"
parseFormats=
"['yyyyMMdd']"
required=
"true"
/>
dateFormat=
"yyyy-MM-dd"
parseFormats=
"['yyyyMMdd']"
required=
"true"
/>
<EF:EFColumn
ename=
"planNo"
cname=
"计划单号"
enable=
"false"
width=
"120"
align=
"center"
/>
<EF:EFColumn
ename=
"planNo"
cname=
"计划单号"
enable=
"false"
width=
"120"
align=
"center"
/>
<EF:EFComboColumn
ename=
"status"
cname=
"状态"
enable=
"false"
width=
"80"
align=
"center"
>
<EF:EFComboColumn
ename=
"status"
cname=
"状态"
enable=
"false"
width=
"80"
align=
"center"
>
<EF:EFCodeOption
codeName=
"hggp.hgcg.planStatus"
/>
<EF:EFCodeOption
codeName=
"hggp.hgcg.planStatus"
/>
...
...
src/main/webapp/HG/CG/HGCG002A.js
View file @
cb68d56c
...
@@ -10,10 +10,8 @@ $(function () {
...
@@ -10,10 +10,8 @@ $(function () {
loadComplete
:
function
(
grid
)
{
loadComplete
:
function
(
grid
)
{
grid
.
dataSource
.
bind
(
"change"
,
function
(
e
)
{
grid
.
dataSource
.
bind
(
"change"
,
function
(
e
)
{
var
item
=
e
.
items
[
0
];
var
item
=
e
.
items
[
0
];
if
(
e
.
field
==
"price"
)
{
if
(
e
.
field
==
"purQty"
||
e
.
field
==
"purWeight"
||
e
.
field
==
"price"
calAmount
(
item
);
||
e
.
field
==
"taxRate"
||
e
.
field
==
"calculationMethod"
)
{
}
if
(
e
.
field
==
"taxRate"
)
{
calAmount
(
item
);
calAmount
(
item
);
}
}
});
});
...
@@ -94,13 +92,16 @@ let confirm = function () {
...
@@ -94,13 +92,16 @@ let confirm = function () {
* @param coefficient
* @param coefficient
*/
*/
let
calAmount
=
function
(
item
)
{
let
calAmount
=
function
(
item
)
{
//原材料
let
price
=
item
.
price
;
if
(
item
.
inventTypeDetail
===
'3'
){
let
taxRate
=
item
.
taxRate
;
if
(
item
.
purWeight
&&
item
.
price
&&
item
.
taxRate
){
// 计算方式为重量乘单价
if
(
item
.
calculationMethod
==
1
)
{
let
purWeight
=
item
.
purWeight
;
if
(
!
isBlank
(
purWeight
)
&&
!
isBlank
(
price
)
&&
!
isBlank
(
taxRate
))
{
// 重量*单价金额
// 重量*单价金额
let
totalAmount
=
item
.
purWeight
*
item
.
price
;
let
totalAmount
=
purWeight
*
price
;
//不含税金额
//
不含税金额
let
amount
=
totalAmount
/
(
1
+
item
.
taxRate
/
100
);
let
amount
=
totalAmount
/
(
1
+
taxRate
/
100
);
//税额
//税额
let
taxAmount
=
totalAmount
-
amount
;
let
taxAmount
=
totalAmount
-
amount
;
//含税金额
//含税金额
...
@@ -109,12 +110,13 @@ let calAmount = function (item) {
...
@@ -109,12 +110,13 @@ let calAmount = function (item) {
resultGrid
.
setCellValue
(
item
,
'amount'
,
amount
)
resultGrid
.
setCellValue
(
item
,
'amount'
,
amount
)
resultGrid
.
setCellValue
(
item
,
'taxIncludeAmount'
,
taxIncludeAmount
)
resultGrid
.
setCellValue
(
item
,
'taxIncludeAmount'
,
taxIncludeAmount
)
}
}
}
else
{
}
else
{
if
(
item
.
purQty
&&
item
.
price
&&
item
.
taxRate
){
let
purQty
=
item
.
purQty
;
if
(
!
isBlank
(
purQty
)
&&
!
isBlank
(
price
)
&&
!
isBlank
(
taxRate
))
{
// 数量*单价金额
// 数量*单价金额
let
totalAmount
=
item
.
purQty
*
item
.
price
;
let
totalAmount
=
purQty
*
price
;
//不含税金额
//不含税金额
let
amount
=
totalAmount
/
(
1
+
item
.
taxRate
/
100
);
let
amount
=
totalAmount
/
(
1
+
taxRate
/
100
);
//税额
//税额
let
taxAmount
=
totalAmount
-
amount
;
let
taxAmount
=
totalAmount
-
amount
;
//含税金额
//含税金额
...
...
src/main/webapp/HG/CG/HGCG002A.jsp
View file @
cb68d56c
...
@@ -42,6 +42,10 @@
...
@@ -42,6 +42,10 @@
required=
"true"
/>
required=
"true"
/>
<EF:EFColumn
ename=
"purWeight"
cname=
"采购重量"
width=
"120"
align=
"right"
format=
"{0:N3}"
sumType=
"page"
<EF:EFColumn
ename=
"purWeight"
cname=
"采购重量"
width=
"120"
align=
"right"
format=
"{0:N3}"
sumType=
"page"
required=
"true"
/>
required=
"true"
/>
<EF:EFComboColumn
ename=
"calculationMethod"
cname=
"计算方式"
enable=
"true"
width=
"100"
align=
"center"
required=
"true"
>
<EF:EFCodeOption
codeName=
"hggp.cg.calculationMethod"
/>
</EF:EFComboColumn>
<EF:EFColumn
ename=
"price"
cname=
"单价"
width=
"80"
align=
"right"
format=
"{0:N3}"
required=
"true"
/>
<EF:EFColumn
ename=
"price"
cname=
"单价"
width=
"80"
align=
"right"
format=
"{0:N3}"
required=
"true"
/>
<EF:EFComboColumn
ename=
"taxRate"
cname=
"税率(%)"
enable=
"true"
width=
"100"
align=
"center"
required=
"true"
<EF:EFComboColumn
ename=
"taxRate"
cname=
"税率(%)"
enable=
"true"
width=
"100"
align=
"center"
required=
"true"
copy=
"true"
>
copy=
"true"
>
...
...
src/main/webapp/HG/CG/HGCG003A.js
View file @
cb68d56c
...
@@ -106,6 +106,8 @@ let confirm = function () {
...
@@ -106,6 +106,8 @@ let confirm = function () {
for
(
let
i
=
0
;
i
<
rows
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
rows
.
length
;
i
++
)
{
let
bcReceiveQty
=
rows
[
i
][
'bcReceiveQty'
];
let
bcReceiveQty
=
rows
[
i
][
'bcReceiveQty'
];
let
bcMaxReceiveQty
=
rows
[
i
][
'bcMaxReceiveQty'
];
let
bcMaxReceiveQty
=
rows
[
i
][
'bcMaxReceiveQty'
];
let
bcReceiveWeight
=
rows
[
i
][
'bcReceiveWeight'
];
let
bcMaxReceiveWeight
=
rows
[
i
][
'bcMaxReceiveWeight'
];
if
(
!
isPositiveNumber
(
bcReceiveQty
))
{
if
(
!
isPositiveNumber
(
bcReceiveQty
))
{
message
(
"勾选的第"
+
(
i
+
1
)
+
"行本次收货数量必须大于0"
);
message
(
"勾选的第"
+
(
i
+
1
)
+
"行本次收货数量必须大于0"
);
return
;
return
;
...
@@ -114,6 +116,10 @@ let confirm = function () {
...
@@ -114,6 +116,10 @@ let confirm = function () {
message
(
"勾选的第"
+
(
i
+
1
)
+
"行本次收货数量不能大于本次最大收货数量"
);
message
(
"勾选的第"
+
(
i
+
1
)
+
"行本次收货数量不能大于本次最大收货数量"
);
return
;
return
;
}
}
if
(
!
isBlank
(
bcReceiveWeight
)
&&
parseFloat
(
bcReceiveWeight
)
>
parseFloat
(
bcMaxReceiveWeight
))
{
message
(
"勾选的第"
+
(
i
+
1
)
+
"行本次收货重量不能大于本次最大收货重量"
);
return
;
}
}
}
JSUtils
.
confirm
(
"确定对勾选的["
+
rows
.
length
+
"]条数据生成
\"
采购收货
\"
吗? "
,
{
JSUtils
.
confirm
(
"确定对勾选的["
+
rows
.
length
+
"]条数据生成
\"
采购收货
\"
吗? "
,
{
ok
:
function
()
{
ok
:
function
()
{
...
...
src/main/webapp/HG/CG/HGCG003A.jsp
View file @
cb68d56c
...
@@ -59,7 +59,12 @@
...
@@ -59,7 +59,12 @@
required=
"true"
/>
required=
"true"
/>
<EF:EFColumn
ename=
"bcMaxReceiveQty"
cname=
"本次最大</br>收货数量"
enable=
"false"
width=
"100"
align=
"right"
<EF:EFColumn
ename=
"bcMaxReceiveQty"
cname=
"本次最大</br>收货数量"
enable=
"false"
width=
"100"
align=
"right"
format=
"{0:N3}"
/>
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"bcReceiveWeight"
cname=
"本次</br>收货重量"
width=
"100"
align=
"right"
format=
"{0:N3}"
required=
"true"
/>
<EF:EFColumn
ename=
"bcMaxReceiveWeight"
cname=
"本次最大</br>收货重量"
enable=
"false"
width=
"100"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"receiveQty"
cname=
"已收货数量"
enable=
"false"
width=
"100"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"receiveQty"
cname=
"已收货数量"
enable=
"false"
width=
"100"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"receiveWeight"
cname=
"已收货重量"
enable=
"false"
width=
"100"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"purQty"
cname=
"采购数量"
enable=
"false"
width=
"100"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"purQty"
cname=
"采购数量"
enable=
"false"
width=
"100"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"purUnitWeight"
cname=
"采购单重"
enable=
"false"
width=
"100"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"purUnitWeight"
cname=
"采购单重"
enable=
"false"
width=
"100"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"purWeight"
cname=
"采购重量"
enable=
"false"
width=
"100"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"purWeight"
cname=
"采购重量"
enable=
"false"
width=
"100"
align=
"right"
format=
"{0:N3}"
/>
...
@@ -68,6 +73,9 @@
...
@@ -68,6 +73,9 @@
<EF:EFOptions
blockId=
"sup_record_block_id"
valueField=
"valueField"
textField=
"textField"
/>
<EF:EFOptions
blockId=
"sup_record_block_id"
valueField=
"valueField"
textField=
"textField"
/>
</EF:EFComboColumn>
</EF:EFComboColumn>
<EF:EFColumn
ename=
"purUserName"
cname=
"采购员"
enable=
"false"
width=
"100"
align=
"center"
/>
<EF:EFColumn
ename=
"purUserName"
cname=
"采购员"
enable=
"false"
width=
"100"
align=
"center"
/>
<EF:EFComboColumn
ename=
"calculationMethod"
cname=
"计算方式"
enable=
"true"
width=
"100"
align=
"center"
>
<EF:EFCodeOption
codeName=
"hggp.cg.calculationMethod"
/>
</EF:EFComboColumn>
<EF:EFColumn
ename=
"price"
cname=
"单价"
width=
"80"
align=
"right"
format=
"{0:N3}"
enable=
"false"
/>
<EF:EFColumn
ename=
"price"
cname=
"单价"
width=
"80"
align=
"right"
format=
"{0:N3}"
enable=
"false"
/>
<EF:EFColumn
ename=
"taxRate"
cname=
"税率(%)"
width=
"80"
align=
"right"
format=
"{0:N3}"
enable=
"false"
/>
<EF:EFColumn
ename=
"taxRate"
cname=
"税率(%)"
width=
"80"
align=
"right"
format=
"{0:N3}"
enable=
"false"
/>
<EF:EFColumn
ename=
"amount"
cname=
"不含税金额"
enable=
"false"
width=
"120"
align=
"right"
format=
"{0:C3}"
<EF:EFColumn
ename=
"amount"
cname=
"不含税金额"
enable=
"false"
width=
"120"
align=
"right"
format=
"{0:C3}"
...
...
src/main/webapp/HG/CG/HGCG003B.js
View file @
cb68d56c
...
@@ -153,13 +153,17 @@ $(window).load(function () {
...
@@ -153,13 +153,17 @@ $(window).load(function () {
//合同选择的存货不让新增、删除
//合同选择的存货不让新增、删除
var
source
=
$
(
"#source"
).
val
();
var
source
=
$
(
"#source"
).
val
();
if
(
source
===
'0'
){
if
(
source
===
'0'
){
$
(
".k-grid-add"
).
hide
();
$
(
".k-grid-save-changes"
).
hide
();
$
(
".k-grid-save-changes"
).
hide
();
$
(
".k-grid-cancel-changes"
).
hide
();
$
(
".k-grid-delete"
).
hide
();
}
}
}
}
});
});
/**
/**
* 计算金额
* 计算金额
*
* @param item
* @param item
* @param length
* @param length
* @param width
* @param width
...
...
src/main/webapp/HG/CG/HGCG003B.jsp
View file @
cb68d56c
...
@@ -41,20 +41,20 @@
...
@@ -41,20 +41,20 @@
<EF:EFColumn
ename=
"length"
cname=
"长(MM)"
enable=
"false"
width=
"80"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"length"
cname=
"长(MM)"
enable=
"false"
width=
"80"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"width"
cname=
"宽(MM)"
enable=
"false"
width=
"80"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"width"
cname=
"宽(MM)"
enable=
"false"
width=
"80"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"thick"
cname=
"厚(MM)"
enable=
"false"
width=
"80"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"thick"
cname=
"厚(MM)"
enable=
"false"
width=
"80"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"receiveQty"
cname=
"收货数量"
width=
"120"
align=
"right"
format=
"{0:N3}"
required=
"tru
e"
<EF:EFColumn
ename=
"receiveQty"
cname=
"收货数量"
width=
"120"
align=
"right"
format=
"{0:N3}"
sumType=
"pag
e"
sumType=
"pag
e"
/>
required=
"tru
e"
/>
<EF:EFColumn
ename=
"deliverQty"
cname=
"退货数量"
enable=
"false"
width=
"120"
align=
"right"
format=
"{0:N3}"
<EF:EFColumn
ename=
"deliverQty"
cname=
"退货数量"
enable=
"false"
width=
"120"
align=
"right"
format=
"{0:N3}"
sumType=
"page"
/>
sumType=
"page"
/>
<EF:EFColumn
ename=
"depositQty"
cname=
"入库数量"
enable=
"false"
width=
"120"
align=
"right"
format=
"{0:N3}"
<EF:EFColumn
ename=
"depositQty"
cname=
"入库数量"
enable=
"false"
width=
"120"
align=
"right"
format=
"{0:N3}"
sumType=
"page"
/>
sumType=
"page"
/>
<EF:EFColumn
ename=
"receiveWeight"
cname=
"收货重量"
enable=
"false"
width=
"120"
align=
"right"
format=
"{0:N3}
"
<EF:EFColumn
ename=
"receiveWeight"
cname=
"收货重量"
width=
"120"
align=
"right"
format=
"{0:N3}"
sumType=
"page
"
sumType=
"pag
e"
/>
required=
"tru
e"
/>
<EF:EFColumn
ename=
"receiveUnitWeight"
cname=
"收货单重"
enable=
"false"
width=
"120"
align=
"right"
format=
"{0:N3}"
<EF:EFColumn
ename=
"receiveUnitWeight"
cname=
"收货单重"
enable=
"false"
width=
"120"
align=
"right"
hidden=
"true
"
/>
format=
"{0:N3}
"
/>
<EF:EFComboColumn
ename=
"calculationMethod"
cname=
"计算方式"
enable=
"
true"
width=
"120"
align=
"center"
required=
"true
"
>
<EF:EFComboColumn
ename=
"calculationMethod"
cname=
"计算方式"
enable=
"
false"
width=
"120"
align=
"center
"
>
<EF:EFCodeOption
codeName=
"hggp.cg.calculationMethod"
/>
<EF:EFCodeOption
codeName=
"hggp.cg.calculationMethod"
/>
</EF:EFComboColumn>
</EF:EFComboColumn>
<EF:EFColumn
ename=
"price"
cname=
"单价"
width=
"120"
align=
"right"
format=
"{0:C3}"
required=
"true
"
/>
<EF:EFColumn
ename=
"price"
cname=
"单价"
enable=
"false"
width=
"120"
align=
"right"
format=
"{0:C3}
"
/>
<EF:EFColumn
ename=
"amount"
cname=
"金额"
enable=
"false"
width=
"120"
align=
"right"
format=
"{0:C3}"
<EF:EFColumn
ename=
"amount"
cname=
"金额"
enable=
"false"
width=
"120"
align=
"right"
format=
"{0:C3}"
sumType=
"page"
/>
sumType=
"page"
/>
<EF:EFComboColumn
ename=
"status"
cname=
"状态"
enable=
"false"
width=
"80"
align=
"center"
>
<EF:EFComboColumn
ename=
"status"
cname=
"状态"
enable=
"false"
width=
"80"
align=
"center"
>
...
...
src/main/webapp/HG/WD/HGWD001.js
View file @
cb68d56c
...
@@ -6,15 +6,15 @@ $(function () {
...
@@ -6,15 +6,15 @@ $(function () {
const
init
=
()
=>
{
const
init
=
()
=>
{
$
(
"#HGWD001"
).
css
(
"padding-bottom"
,
"8px"
)
$
(
"#HGWD001"
).
css
(
"padding-bottom"
,
"8px"
)
sessionStorage
.
removeItem
(
"__user_id__"
)
sessionStorage
.
removeItem
(
"__user_id__"
)
setTimeout
(()
=>
{
setTimeout
(()
=>
{
resultGrid
.
dataSource
.
page
(
1
);
resultGrid
.
dataSource
.
page
(
1
);
// 显示授权按钮
showAuthButton
();
},
1000
);
},
1000
);
// 查询
// 查询
$
(
"#QUERY"
).
on
(
"click"
,
function
(
e
)
{
$
(
"#QUERY"
).
on
(
"click"
,
function
(
e
)
{
resultGrid
.
dataSource
.
page
(
1
);
resultGrid
.
dataSource
.
page
(
1
);
});
});
// 分割线组件
// 分割线组件
(
function
()
{
(
function
()
{
splitter
=
$
(
"#splitter"
).
kendoSplitter
({
splitter
=
$
(
"#splitter"
).
kendoSplitter
({
...
@@ -94,21 +94,22 @@ $(function () {
...
@@ -94,21 +94,22 @@ $(function () {
"categoryTree"
:
{
"categoryTree"
:
{
select
:
function
(
e
)
{
select
:
function
(
e
)
{
var
_data
=
this
.
dataItem
(
e
.
node
);
var
_data
=
this
.
dataItem
(
e
.
node
);
var
nodeData
=
IPLATUI
.
EFTree
.
categoryTree
.
selectTreeNode
;
var
labelValue
=
_data
.
label
;
var
labelValue
=
_data
.
label
;
var
typeValue
=
_data
.
type
;
var
typeValue
=
_data
.
type
;
const
eNameValue
=
_data
.
ename
;
const
eNameValue
=
_data
.
ename
;
setTreeNodeValue
(
_data
);
$
(
"[name = 'inqu_status-0-parentId']"
).
val
(
labelValue
);
$
(
"[name = 'inqu_status-0-parentId']"
).
val
(
labelValue
);
$
(
"[name = 'inqu_status-0-bizId']"
).
val
(
labelValue
);
$
(
"[name = 'inqu_status-0-fileId']"
).
val
(
eNameValue
);
$
(
"[name = 'inqu_status-0-fileId']"
).
val
(
eNameValue
);
$
(
"[name = 'inqu_status-0-leafLevel']"
).
val
(
_data
.
leafLevel
==
null
?
0
:
_data
.
leafLevel
);
$
(
"[name = 'inqu_status-0-leafLevel']"
).
val
(
_data
.
leafLevel
==
null
?
0
:
_data
.
leafLevel
);
$
(
"[name = 'inqu_status-0-projCode']"
).
val
(
_data
.
projCode
);
$
(
"[name = 'inqu_status-0-projCode']"
).
val
(
_data
.
projCode
);
$
(
"[name = 'inqu_status-0-companyCode']"
).
val
(
_data
.
companyCode
);
$
(
"[name = 'inqu_status-0-companyCode']"
).
val
(
_data
.
companyCode
);
$
(
"[name = 'inqu_status-0-type']"
).
val
(
_data
.
typ
e
);
$
(
"[name = 'inqu_status-0-type']"
).
val
(
typeValu
e
);
$
(
"[name = 'inqu_status-0-fileName']"
).
val
(
_data
.
text
);
$
(
"[name = 'inqu_status-0-fileName']"
).
val
(
_data
.
text
);
resultGrid
.
dataSource
.
page
(
1
);
resultGrid
.
dataSource
.
page
(
1
);
// 编辑、删除树节点时,需要刷新的树节点
// 编辑、删除树节点时,需要刷新的树节点
$
(
"[name = 'inqu_status-0-orgParentId']"
).
val
(
_data
.
parentId
);
$
(
"[name = 'inqu_status-0-orgParentId']"
).
val
(
_data
.
parentId
);
// 显示授权按钮
showAuthButton
();
},
},
/*ROOT:{label: 'root',text: '组织机构'},*/
/*ROOT:{label: 'root',text: '组织机构'},*/
template
:
function
(
node
)
{
template
:
function
(
node
)
{
...
@@ -351,7 +352,6 @@ $(function () {
...
@@ -351,7 +352,6 @@ $(function () {
selectTreeNode
(
tree
,
orgId
);
selectTreeNode
(
tree
,
orgId
);
// 设置当前选中的节点信息
// 设置当前选中的节点信息
$
(
"[name = 'inqu_status-0-parentId']"
).
val
(
orgId
);
$
(
"[name = 'inqu_status-0-parentId']"
).
val
(
orgId
);
$
(
"[name = 'inqu_status-0-bizId']"
).
val
(
orgId
);
$
(
"[name = 'inqu_status-0-projCode']"
).
val
(
data
.
projCode
);
$
(
"[name = 'inqu_status-0-projCode']"
).
val
(
data
.
projCode
);
$
(
"[name = 'inqu_status-0-companyCode']"
).
val
(
data
.
companyCode
);
$
(
"[name = 'inqu_status-0-companyCode']"
).
val
(
data
.
companyCode
);
$
(
"[name = 'inqu_status-0-type']"
).
val
(
data
.
type
);
$
(
"[name = 'inqu_status-0-type']"
).
val
(
data
.
type
);
...
@@ -378,7 +378,14 @@ $(function () {
...
@@ -378,7 +378,14 @@ $(function () {
this
.
expandPath
([
'root'
]);
this
.
expandPath
([
'root'
]);
},
1000
);
},
1000
);
},
},
selectTreeNode
:
{},
selectTreeNode
:
{
fileId
:
''
,
parentId
:
''
,
projCode
:
''
,
companyCode
:
''
,
leafLevel
:
''
,
type
:
''
,
},
// expandLevel:1,
// expandLevel:1,
/**
/**
* 开启结点拖拽功能,默认dragAndDrop = false不开启,
* 开启结点拖拽功能,默认dragAndDrop = false不开启,
...
@@ -465,6 +472,8 @@ $(function () {
...
@@ -465,6 +472,8 @@ $(function () {
// 附件上传
// 附件上传
$
(
"#UPLOAD_FILE"
).
on
(
"click"
,
uploadFile
);
$
(
"#UPLOAD_FILE"
).
on
(
"click"
,
uploadFile
);
$
(
"#RELEASE"
).
click
(
"click"
,
updateRelease
)
},
},
onDelete
:
function
(
e
)
{
onDelete
:
function
(
e
)
{
// 阻止默认请求,使用自定义删除
// 阻止默认请求,使用自定义删除
...
@@ -816,7 +825,7 @@ function uploadFile() {
...
@@ -816,7 +825,7 @@ function uploadFile() {
}
}
JSColorbox
.
open
({
JSColorbox
.
open
({
href
:
"HGWD099A?methodName=initLoad&inqu_status-0-bizType=WD"
+
href
:
"HGWD099A?methodName=initLoad&inqu_status-0-bizType=WD"
+
"&inqu_status-0-bizId="
+
$
(
"#inqu_status-0-
biz
Id"
).
val
()
+
""
+
"&inqu_status-0-bizId="
+
$
(
"#inqu_status-0-
parent
Id"
).
val
()
+
""
+
"&inqu_status-0-operType=add"
+
"&inqu_status-0-operType=add"
+
"&efParentFormEname=HGWD001"
,
"&efParentFormEname=HGWD001"
,
title
:
"<div style='text-align: center;'>附件上传</div>"
,
title
:
"<div style='text-align: center;'>附件上传</div>"
,
...
@@ -888,3 +897,48 @@ function deleteFunc() {
...
@@ -888,3 +897,48 @@ function deleteFunc() {
}
}
})
})
}
}
/**
* 发布
*/
function
updateRelease
()
{
let
rows
=
resultGrid
.
getCheckedRows
();
if
(
rows
.
length
<
1
)
{
message
(
"请选择数据"
);
return
;
}
let
inEiInfo
=
new
EiInfo
();
inEiInfo
.
addBlock
(
JSUtils
.
checkedRows2Block
(
"result"
))
EiCommunicator
.
send
(
'HGWD001'
,
'updateRelease'
,
inEiInfo
,
{
onSuccess
(
response
)
{
if
(
response
.
status
!=
-
1
)
{
NotificationUtil
(
response
.
msg
);
query
();
}
else
{
NotificationUtil
(
response
.
msg
,
"error"
);
}
},
onFail
(
errorMessage
,
status
,
e
)
{
NotificationUtil
(
"执行失败!"
,
"error"
);
}
},
{
async
:
false
}
);
}
/**
* 显示授权按钮
*/
let
showAuthButton
=
function
()
{
let
leafType
=
IPLATUI
.
EFTree
.
categoryTree
.
selectTreeNode
.
leafLevel
;
// C:目录
if
(
leafType
&&
leafType
>
0
)
{
$
(
"#RELEASE"
).
attr
(
"disabled"
,
false
);
$
(
"#UPLOAD_FILE"
).
attr
(
"disabled"
,
false
);
}
else
{
$
(
"#RELEASE"
).
attr
(
"disabled"
,
true
);
$
(
"#UPLOAD_FILE"
).
attr
(
"disabled"
,
true
);
}
}
\ No newline at end of file
src/main/webapp/HG/WD/HGWD001.jsp
View file @
cb68d56c
...
@@ -54,7 +54,6 @@
...
@@ -54,7 +54,6 @@
<EF:EFInput
cname=
"公司代码"
ename=
"companyCode"
blockId=
"inqu_status"
row=
"0"
type=
"hidden"
/>
<EF:EFInput
cname=
"公司代码"
ename=
"companyCode"
blockId=
"inqu_status"
row=
"0"
type=
"hidden"
/>
<EF:EFInput
cname=
"项目代码"
ename=
"projCode"
blockId=
"inqu_status"
row=
"0"
type=
"hidden"
/>
<EF:EFInput
cname=
"项目代码"
ename=
"projCode"
blockId=
"inqu_status"
row=
"0"
type=
"hidden"
/>
<EF:EFInput
cname=
"文档库id"
ename=
"parentId"
blockId=
"inqu_status"
row=
"0"
type=
"hidden"
/>
<EF:EFInput
cname=
"文档库id"
ename=
"parentId"
blockId=
"inqu_status"
row=
"0"
type=
"hidden"
/>
<EF:EFInput
cname=
"文档库id"
ename=
"bizId"
blockId=
"inqu_status"
row=
"0"
type=
"hidden"
/>
<EF:EFInput
cname=
"文档库id"
ename=
"fileId"
blockId=
"inqu_status"
row=
"0"
type=
"hidden"
/>
<EF:EFInput
cname=
"文档库id"
ename=
"fileId"
blockId=
"inqu_status"
row=
"0"
type=
"hidden"
/>
<EF:EFInput
cname=
"类型"
ename=
"type"
blockId=
"inqu_status"
row=
"0"
type=
"hidden"
/>
<EF:EFInput
cname=
"类型"
ename=
"type"
blockId=
"inqu_status"
row=
"0"
type=
"hidden"
/>
<EF:EFInput
cname=
"层级"
ename=
"leafLevel"
blockId=
"inqu_status"
row=
"0"
type=
"hidden"
/>
<EF:EFInput
cname=
"层级"
ename=
"leafLevel"
blockId=
"inqu_status"
row=
"0"
type=
"hidden"
/>
...
@@ -69,6 +68,9 @@
...
@@ -69,6 +68,9 @@
<EF:EFColumn
ename=
"id"
cname=
"ID"
hidden=
"true"
/>
<EF:EFColumn
ename=
"id"
cname=
"ID"
hidden=
"true"
/>
<EF:EFColumn
ename=
"docId"
cname=
"文件ID"
enable=
"false"
width=
"150"
/>
<EF:EFColumn
ename=
"docId"
cname=
"文件ID"
enable=
"false"
width=
"150"
/>
<EF:EFColumn
ename=
"docName"
cname=
"文件名称"
enable=
"false"
width=
"150"
/>
<EF:EFColumn
ename=
"docName"
cname=
"文件名称"
enable=
"false"
width=
"150"
/>
<EF:EFComboColumn
ename=
"status"
cname=
"状态"
enable=
"false"
width=
"120"
align=
"center"
defaultValue=
"0"
hidden=
"false"
>
<EF:EFCodeOption
codeName=
"hggp.hgwd.status"
/>
</EF:EFComboColumn>
<EF:EFColumn
ename=
"createdTime"
cname=
"创建时间"
enable=
"false"
width=
"140"
align=
"center"
<EF:EFColumn
ename=
"createdTime"
cname=
"创建时间"
enable=
"false"
width=
"140"
align=
"center"
parseFormats=
"['yyyyMMddHHmmss']"
editType=
"datetime"
dateFormat=
"yyyy-MM-dd HH:mm:ss"
/>
parseFormats=
"['yyyyMMddHHmmss']"
editType=
"datetime"
dateFormat=
"yyyy-MM-dd HH:mm:ss"
/>
<EF:EFColumn
ename=
"operator"
cname=
"操作"
enable=
"false"
width=
"200"
align=
"center"
/>
<EF:EFColumn
ename=
"operator"
cname=
"操作"
enable=
"false"
width=
"200"
align=
"center"
/>
...
...
src/main/webapp/HG/WD/HGWD001E.js
View file @
cb68d56c
...
@@ -78,7 +78,6 @@ $(function () {
...
@@ -78,7 +78,6 @@ $(function () {
//console.log(dayjs,"dayjs")
//console.log(dayjs,"dayjs")
// 此 grid 对象
// 此 grid 对象
// 处理父子级联动,通过监听 change 事件,判断父级节点是否发生变化
// 处理父子级联动,通过监听 change 事件,判断父级节点是否发生变化
$
(
"#RELEASE"
).
click
(
"click"
,
updateRelease
)
grid
.
dataSource
.
bind
(
"change"
,
function
(
e
)
{
grid
.
dataSource
.
bind
(
"change"
,
function
(
e
)
{
// 判断父级节点是否发生变化
// 判断父级节点是否发生变化
if
(
e
.
field
===
"projCode"
)
{
if
(
e
.
field
===
"projCode"
)
{
...
@@ -185,34 +184,6 @@ let save = function (btnNode) {
...
@@ -185,34 +184,6 @@ let save = function (btnNode) {
}
}
}
}
/**
* 发布
*/
function
updateRelease
()
{
let
rows
=
resultGrid
.
getCheckedRows
();
if
(
rows
.
length
<
1
)
{
message
(
"请选择数据"
);
return
;
}
let
inEiInfo
=
new
EiInfo
();
inEiInfo
.
addBlock
(
JSUtils
.
checkedRows2Block
(
"result"
))
EiCommunicator
.
send
(
'HGWD001'
,
'updateRelease'
,
inEiInfo
,
{
onSuccess
(
response
)
{
if
(
response
.
status
!=
-
1
)
{
NotificationUtil
(
response
.
msg
);
query
();
}
else
{
NotificationUtil
(
response
.
msg
,
"error"
);
}
},
onFail
(
errorMessage
,
status
,
e
)
{
NotificationUtil
(
"执行失败!"
,
"error"
);
}
},
{
async
:
false
}
);
}
/**
/**
* 显示详情
* 显示详情
...
...
src/main/webapp/HG/YX/HGYX001.jsp
View file @
cb68d56c
...
@@ -38,6 +38,10 @@
...
@@ -38,6 +38,10 @@
<EF:EFOption label="全部" value=""/>
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hggp.hgyx.status" condition="ITEM_CODE IN ('0','1')"/>
<EF:EFCodeOption codeName="hggp.hgyx.status" condition="ITEM_CODE IN ('0','1')"/>
</EF:EFSelect>
</EF:EFSelect>
<EF:EFSelect blockId="inqu_status" row="0" ename="isContract" cname="是否扣款" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hggp.common.yesNo"/>
</EF:EFSelect>
</div>
</div>
</EF:EFRegion>
</EF:EFRegion>
...
@@ -76,6 +80,10 @@
...
@@ -76,6 +80,10 @@
<EF:EFColumn ename="consAddr" cname="发货地址" hidden="true" width="120" align="center"/>
<EF:EFColumn ename="consAddr" cname="发货地址" hidden="true" width="120" align="center"/>
<EF:EFColumn ename="consQuantity" cname="发货数量" enable="true" readonly="true" width="120" align="center" format="{0:N3}" data-rules="number"/>
<EF:EFColumn ename="consQuantity" cname="发货数量" enable="true" readonly="true" width="120" align="center" format="{0:N3}" data-rules="number"/>
<EF:EFColumn ename="consWeight" cname="发货重量" width="120" align="center" format="{0:N3}" data-rules="number"/>
<EF:EFColumn ename="consWeight" cname="发货重量" width="120" align="center" format="{0:N3}" data-rules="number"/>
<EF:EFComboColumn ename="isContract" cname="是否扣款" width="80" align="center" enable="false" defaultValue="0" required="true">
<EF:EFCodeOption codeName="hggp.common.yesNo"/>
</EF:EFComboColumn>
<EF:EFColumn ename="contractName" cname="扣款方" width="120" align="center"/>
<EF:EFComboColumn ename="status" cname="审核状态" width="80" align="center" enable="false" defaultValue="0" required="true">
<EF:EFComboColumn ename="status" cname="审核状态" width="80" align="center" enable="false" defaultValue="0" required="true">
<EF:EFCodeOption codeName="hggp.hgyx.status" condition="ITEM_CODE IN ('0','1')"/>
<EF:EFCodeOption codeName="hggp.hgyx.status" condition="ITEM_CODE IN ('0','1')"/>
</EF:EFComboColumn>
</EF:EFComboColumn>
...
...
src/main/webapp/HG/YX/HGYX001A.js
View file @
cb68d56c
...
@@ -221,6 +221,13 @@ $(function() {
...
@@ -221,6 +221,13 @@ $(function() {
});
});
return
false
;
return
false
;
}
}
let
isContract
=
$
(
"#inqu_status-0-isContract"
).
val
();
let
contractName
=
$
(
"#inqu_status-0-contractName"
).
val
();
if
(
isContract
==
"1"
&&
isBlank
(
contractName
)){
message
(
"是扣款,扣款方不能为空"
);
flag
=
false
;
return
false
;
}
let
rows
=
resultGrid
.
getDataItems
();
let
rows
=
resultGrid
.
getDataItems
();
if
(
rows
.
length
<
1
)
{
if
(
rows
.
length
<
1
)
{
message
(
"明细信息不能为空,请选择数据"
);
message
(
"明细信息不能为空,请选择数据"
);
...
@@ -259,6 +266,13 @@ $(function() {
...
@@ -259,6 +266,13 @@ $(function() {
});
});
return
false
;
return
false
;
}
}
let
isContract
=
$
(
"#inqu_status-0-isContract"
).
val
();
let
contractName
=
$
(
"#inqu_status-0-contractName"
).
val
();
if
(
isContract
==
"1"
&&
isBlank
(
contractName
)){
message
(
"是扣款,扣款方不能为空"
);
flag
=
false
;
return
false
;
}
let
rows
=
resultGrid
.
getDataItems
();
let
rows
=
resultGrid
.
getDataItems
();
if
(
rows
.
length
<
1
)
{
if
(
rows
.
length
<
1
)
{
message
(
"明细信息不能为空,请选择数据"
);
message
(
"明细信息不能为空,请选择数据"
);
...
...
src/main/webapp/HG/YX/HGYX001A.jsp
View file @
cb68d56c
...
@@ -66,6 +66,10 @@
...
@@ -66,6 +66,10 @@
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFInput blockId="inqu_status" row="0" ename="type" cname="type" type="hidden" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="type" cname="type" type="hidden" colWidth="3"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="isContract" cname="是否扣款" colWidth="3" filter="contains">
<EF:EFCodeOption codeName="hggp.common.yesNo"/>
</EF:EFSelect>
<EF:EFInput blockId="inqu_status" row="0" ename="contractName" cname="扣款方" required="false" colWidth="3"/>
</div>
</div>
</EF:EFRegion>
</EF:EFRegion>
...
...
src/main/webapp/HG/YX/HGYX001B.jsp
View file @
cb68d56c
...
@@ -65,6 +65,10 @@
...
@@ -65,6 +65,10 @@
required="true" colWidth="3" disabled="true"
required="true" colWidth="3" disabled="true"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="isContract" cname="是否扣款" colWidth="3" filter="contains">
<EF:EFCodeOption codeName="hggp.common.yesNo"/>
</EF:EFSelect>
<EF:EFInput blockId="inqu_status" row="0" ename="contractName" cname="扣款方" required="true" colWidth="3"/>
</div>
</div>
</EF:EFRegion>
</EF:EFRegion>
...
...
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