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
91991e86
Commit
91991e86
authored
Oct 08, 2024
by
宋祥
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.委外入库质检
parent
c73161c2
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
427 additions
and
349 deletions
+427
-349
HgKcSqlConst.java
...n/java/com/baosight/hggp/hg/kc/constant/HgKcSqlConst.java
+2
-0
HGKC014A.java
src/main/java/com/baosight/hggp/hg/kc/domain/HGKC014A.java
+19
-2
ServiceHGKC014.java
.../java/com/baosight/hggp/hg/kc/service/ServiceHGKC014.java
+3
-3
ServiceHGKC014A.java
...java/com/baosight/hggp/hg/kc/service/ServiceHGKC014A.java
+1
-1
ServiceHGKC014B.java
...java/com/baosight/hggp/hg/kc/service/ServiceHGKC014B.java
+1
-1
HGKC014.xml
src/main/java/com/baosight/hggp/hg/kc/sql/HGKC014.xml
+38
-91
HGKC014A.xml
src/main/java/com/baosight/hggp/hg/kc/sql/HGKC014A.xml
+81
-129
HGKCTools.java
src/main/java/com/baosight/hggp/hg/kc/tools/HGKCTools.java
+96
-6
HGKCUtils.java
src/main/java/com/baosight/hggp/hg/kc/utils/HGKCUtils.java
+98
-39
ServiceHGZL012.java
.../java/com/baosight/hggp/hg/zl/service/ServiceHGZL012.java
+8
-15
ServiceHGZL012A.java
...java/com/baosight/hggp/hg/zl/service/ServiceHGZL012A.java
+3
-2
ServiceHGZL012B.java
...java/com/baosight/hggp/hg/zl/service/ServiceHGZL012B.java
+38
-39
HGZL012.xml
src/main/java/com/baosight/hggp/hg/zl/sql/HGZL012.xml
+19
-0
sqlmap-config.xml
src/main/resources/resources/ibatis/sqlmap-config.xml
+1
-0
HGZL012.js
src/main/webapp/HG/ZL/HGZL012.js
+7
-7
HGZL012.jsp
src/main/webapp/HG/ZL/HGZL012.jsp
+4
-6
HGZL012B.jsp
src/main/webapp/HG/ZL/HGZL012B.jsp
+8
-8
No files found.
src/main/java/com/baosight/hggp/hg/kc/constant/HgKcSqlConst.java
View file @
91991e86
...
@@ -72,6 +72,8 @@ public class HgKcSqlConst {
...
@@ -72,6 +72,8 @@ public class HgKcSqlConst {
public
static
final
String
UPDATE_STATUS
=
"HGKC014A.updateStatus"
;
public
static
final
String
UPDATE_STATUS
=
"HGKC014A.updateStatus"
;
// 批量删除
// 批量删除
public
static
final
String
BATCH_DELETE
=
"HGKC014A.batchDelete"
;
public
static
final
String
BATCH_DELETE
=
"HGKC014A.batchDelete"
;
// 实际入库数量
public
static
final
String
UPDATE_ACTUAL_QTY
=
"HGKC014A.updateActualQty"
;
}
}
}
}
src/main/java/com/baosight/hggp/hg/kc/domain/HGKC014A.java
View file @
91991e86
...
@@ -33,6 +33,7 @@ public class HGKC014A extends DaoEPBase {
...
@@ -33,6 +33,7 @@ public class HGKC014A extends DaoEPBase {
public
static
final
String
FIELD_UPDATED_NAME
=
"updatedName"
;
/* 修改人名称*/
public
static
final
String
FIELD_UPDATED_NAME
=
"updatedName"
;
/* 修改人名称*/
public
static
final
String
FIELD_UPDATED_TIME
=
"updatedTime"
;
/* 修改时间*/
public
static
final
String
FIELD_UPDATED_TIME
=
"updatedTime"
;
/* 修改时间*/
public
static
final
String
FIELD_DELETE_FLAG
=
"deleteFlag"
;
/* 是否删除 0-否1-是*/
public
static
final
String
FIELD_DELETE_FLAG
=
"deleteFlag"
;
/* 是否删除 0-否1-是*/
public
static
final
String
FIELD_STATUS
=
"status"
;
/* 状态*/
public
static
final
String
FIELD_COMPANY_CODE
=
"companyCode"
;
/* 公司编码*/
public
static
final
String
FIELD_COMPANY_CODE
=
"companyCode"
;
/* 公司编码*/
public
static
final
String
FIELD_COMPANY_NAME
=
"companyName"
;
/* 公司名称*/
public
static
final
String
FIELD_COMPANY_NAME
=
"companyName"
;
/* 公司名称*/
public
static
final
String
FIELD_WH_CODE
=
"whCode"
;
/* 仓库编码*/
public
static
final
String
FIELD_WH_CODE
=
"whCode"
;
/* 仓库编码*/
...
@@ -62,6 +63,7 @@ public class HGKC014A extends DaoEPBase {
...
@@ -62,6 +63,7 @@ public class HGKC014A extends DaoEPBase {
public
static
final
String
COL_UPDATED_NAME
=
"UPDATED_NAME"
;
/* 修改人名称*/
public
static
final
String
COL_UPDATED_NAME
=
"UPDATED_NAME"
;
/* 修改人名称*/
public
static
final
String
COL_UPDATED_TIME
=
"UPDATED_TIME"
;
/* 修改时间*/
public
static
final
String
COL_UPDATED_TIME
=
"UPDATED_TIME"
;
/* 修改时间*/
public
static
final
String
COL_DELETE_FLAG
=
"DELETE_FLAG"
;
/* 是否删除 0-否1-是*/
public
static
final
String
COL_DELETE_FLAG
=
"DELETE_FLAG"
;
/* 是否删除 0-否1-是*/
public
static
final
String
COL_STATUS
=
"STATUS"
;
/* 状态*/
public
static
final
String
COL_COMPANY_CODE
=
"COMPANY_CODE"
;
/* 公司编码*/
public
static
final
String
COL_COMPANY_CODE
=
"COMPANY_CODE"
;
/* 公司编码*/
public
static
final
String
COL_COMPANY_NAME
=
"COMPANY_NAME"
;
/* 公司名称*/
public
static
final
String
COL_COMPANY_NAME
=
"COMPANY_NAME"
;
/* 公司名称*/
public
static
final
String
COL_PARENT_ID
=
"PARENT_ID"
;
/* 委托ID*/
public
static
final
String
COL_PARENT_ID
=
"PARENT_ID"
;
/* 委托ID*/
...
@@ -89,7 +91,8 @@ public class HGKC014A extends DaoEPBase {
...
@@ -89,7 +91,8 @@ public class HGKC014A extends DaoEPBase {
private
String
updatedBy
=
" "
;
/* 修改人*/
private
String
updatedBy
=
" "
;
/* 修改人*/
private
String
updatedName
=
" "
;
/* 修改人名称*/
private
String
updatedName
=
" "
;
/* 修改人名称*/
private
String
updatedTime
=
" "
;
/* 修改时间*/
private
String
updatedTime
=
" "
;
/* 修改时间*/
private
Integer
deleteFlag
=
0
;
/* 是否删除 0-否1-是*/
private
Integer
deleteFlag
=
new
Integer
(
0
);
/* 是否删除 0-否1-是*/
private
Integer
status
=
new
Integer
(
0
);
/* 状态*/
private
String
companyCode
=
" "
;
/* 公司编码*/
private
String
companyCode
=
" "
;
/* 公司编码*/
private
String
companyName
=
" "
;
/* 公司名称*/
private
String
companyName
=
" "
;
/* 公司名称*/
private
String
whCode
=
" "
;
/* 仓库编码*/
private
String
whCode
=
" "
;
/* 仓库编码*/
...
@@ -155,6 +158,10 @@ public class HGKC014A extends DaoEPBase {
...
@@ -155,6 +158,10 @@ public class HGKC014A extends DaoEPBase {
eiColumn
=
new
EiColumn
(
FIELD_DELETE_FLAG
);
eiColumn
=
new
EiColumn
(
FIELD_DELETE_FLAG
);
eiColumn
.
setDescName
(
"是否删除 0-否1-是"
);
eiColumn
.
setDescName
(
"是否删除 0-否1-是"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_STATUS
);
eiColumn
.
setDescName
(
"状态"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_COMPANY_CODE
);
eiColumn
=
new
EiColumn
(
FIELD_COMPANY_CODE
);
eiColumn
.
setDescName
(
"公司编码"
);
eiColumn
.
setDescName
(
"公司编码"
);
...
@@ -643,7 +650,15 @@ public class HGKC014A extends DaoEPBase {
...
@@ -643,7 +650,15 @@ public class HGKC014A extends DaoEPBase {
public
void
setActualQty
(
BigDecimal
actualQty
)
{
public
void
setActualQty
(
BigDecimal
actualQty
)
{
this
.
actualQty
=
actualQty
;
this
.
actualQty
=
actualQty
;
}
}
public
Integer
getStatus
()
{
return
status
;
}
public
void
setStatus
(
Integer
status
)
{
this
.
status
=
status
;
}
/**
/**
* get the value from Map.
* get the value from Map.
*
*
...
@@ -680,6 +695,7 @@ public class HGKC014A extends DaoEPBase {
...
@@ -680,6 +695,7 @@ public class HGKC014A extends DaoEPBase {
setDepositWeight
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_DEPOSIT_WEIGHT
)),
depositWeight
));
setDepositWeight
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_DEPOSIT_WEIGHT
)),
depositWeight
));
setDeliverQty
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_DELIVER_QTY
)),
deliverQty
));
setDeliverQty
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_DELIVER_QTY
)),
deliverQty
));
setActualQty
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_ACTUAL_QTY
)),
actualQty
));
setActualQty
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_ACTUAL_QTY
)),
actualQty
));
setStatus
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_STATUS
)),
status
));
}
}
/**
/**
...
@@ -717,6 +733,7 @@ public class HGKC014A extends DaoEPBase {
...
@@ -717,6 +733,7 @@ public class HGKC014A extends DaoEPBase {
map
.
put
(
FIELD_DEPOSIT_WEIGHT
,
StringUtils
.
toString
(
depositWeight
,
eiMetadata
.
getMeta
(
FIELD_DEPOSIT_WEIGHT
)));
map
.
put
(
FIELD_DEPOSIT_WEIGHT
,
StringUtils
.
toString
(
depositWeight
,
eiMetadata
.
getMeta
(
FIELD_DEPOSIT_WEIGHT
)));
map
.
put
(
FIELD_DELIVER_QTY
,
StringUtils
.
toString
(
deliverQty
,
eiMetadata
.
getMeta
(
FIELD_DELIVER_QTY
)));
map
.
put
(
FIELD_DELIVER_QTY
,
StringUtils
.
toString
(
deliverQty
,
eiMetadata
.
getMeta
(
FIELD_DELIVER_QTY
)));
map
.
put
(
FIELD_ACTUAL_QTY
,
StringUtils
.
toString
(
actualQty
,
eiMetadata
.
getMeta
(
FIELD_ACTUAL_QTY
)));
map
.
put
(
FIELD_ACTUAL_QTY
,
StringUtils
.
toString
(
actualQty
,
eiMetadata
.
getMeta
(
FIELD_ACTUAL_QTY
)));
map
.
put
(
FIELD_STATUS
,
StringUtils
.
toString
(
status
,
eiMetadata
.
getMeta
(
FIELD_STATUS
)));
return
map
;
return
map
;
}
}
...
...
src/main/java/com/baosight/hggp/hg/kc/service/ServiceHGKC014.java
View file @
91991e86
...
@@ -73,14 +73,14 @@ public class ServiceHGKC014 extends ServiceEPBase {
...
@@ -73,14 +73,14 @@ public class ServiceHGKC014 extends ServiceEPBase {
try
{
try
{
List
<
HGKC014
>
hgkc014List
=
MapUtils
.
toDaoEPBases
(
inInfo
,
HGKC014
.
class
);
List
<
HGKC014
>
hgkc014List
=
MapUtils
.
toDaoEPBases
(
inInfo
,
HGKC014
.
class
);
List
<
Long
>
ids
=
ObjectUtils
.
listEpKey
(
hgkc014List
,
HGKC014
.
FIELD_ID
);
List
<
Long
>
ids
=
ObjectUtils
.
listEpKey
(
hgkc014List
,
HGKC014
.
FIELD_ID
);
List
<
HGKC014A
>
hgkc014As
=
HGKCTools
.
HgKc014
a
.
getByParentId
(
ids
);
List
<
HGKC014A
>
hgkc014As
=
HGKCTools
.
HgKc014
A
.
getByParentId
(
ids
);
List
<
String
>
contractCodes
=
ObjectUtils
.
listEpKey
(
hgkc014As
,
HGKC014A
.
FIELD_CONTRACT_CODE
);
List
<
String
>
contractCodes
=
ObjectUtils
.
listEpKey
(
hgkc014As
,
HGKC014A
.
FIELD_CONTRACT_CODE
);
List
<
HGSC010A
>
hgsc010As
=
HGSCTools
.
Hgsc010a
.
getByContractCode
(
contractCodes
);
List
<
HGSC010A
>
hgsc010As
=
HGSCTools
.
Hgsc010a
.
getByContractCode
(
contractCodes
);
for
(
HGKC014
hgkc014:
hgkc014List
)
{
for
(
HGKC014
hgkc014:
hgkc014List
)
{
AssertUtils
.
isTrue
(
hgkc014
.
getStatus
().
equals
(
CommonConstant
.
YesNo
.
YES_1
),
"当前委外任务已提交,不允许删除!"
);
AssertUtils
.
isTrue
(
hgkc014
.
getStatus
().
equals
(
CommonConstant
.
YesNo
.
YES_1
),
"当前委外任务已提交,不允许删除!"
);
if
(
Objects
.
nonNull
(
hgkc014As
)){
if
(
Objects
.
nonNull
(
hgkc014As
)){
List
<
HGKC014A
>
hgkc014AList
=
hgkc014As
.
stream
().
filter
(
hgkc014A
->
hgkc014A
.
getParentId
().
equals
(
hgkc014
.
getId
())).
collect
(
Collectors
.
toList
());
List
<
HGKC014A
>
hgkc014AList
=
hgkc014As
.
stream
().
filter
(
hgkc014A
->
hgkc014A
.
getParentId
().
equals
(
hgkc014
.
getId
())).
collect
(
Collectors
.
toList
());
HGKCTools
.
HgKc014
a
.
deleteByParentId
(
hgkc014AList
,
hgsc010As
);
HGKCTools
.
HgKc014
A
.
deleteByParentId
(
hgkc014AList
,
hgsc010As
);
}
}
DaoUtils
.
update
(
HGKC014
.
DELETE
,
hgkc014
);
DaoUtils
.
update
(
HGKC014
.
DELETE
,
hgkc014
);
}
}
...
@@ -173,7 +173,7 @@ public class ServiceHGKC014 extends ServiceEPBase {
...
@@ -173,7 +173,7 @@ public class ServiceHGKC014 extends ServiceEPBase {
try
{
try
{
List
<
HGKC014
>
resultMaps
=
MapUtils
.
toDaoEPBases
(
inInfo
,
HGKC014
.
class
);
List
<
HGKC014
>
resultMaps
=
MapUtils
.
toDaoEPBases
(
inInfo
,
HGKC014
.
class
);
List
<
Long
>
ids
=
ObjectUtils
.
listEpKey
(
resultMaps
,
HGKC014
.
FIELD_ID
);
List
<
Long
>
ids
=
ObjectUtils
.
listEpKey
(
resultMaps
,
HGKC014
.
FIELD_ID
);
List
<
HGKC014A
>
hgkc014AList
=
HGKCTools
.
HgKc014
a
.
getByParentId
(
ids
);
List
<
HGKC014A
>
hgkc014AList
=
HGKCTools
.
HgKc014
A
.
getByParentId
(
ids
);
AssertUtils
.
isTrue
(
Objects
.
isNull
(
hgkc014AList
),
"请先添加入库明细"
);
AssertUtils
.
isTrue
(
Objects
.
isNull
(
hgkc014AList
),
"请先添加入库明细"
);
for
(
HGKC014
hgkc014:
resultMaps
)
{
for
(
HGKC014
hgkc014:
resultMaps
)
{
List
<
HGKC014A
>
hgkc14As
=
hgkc014AList
.
stream
().
filter
(
item
->
item
.
getParentId
().
equals
(
hgkc014
.
getId
())).
collect
(
Collectors
.
toList
());
List
<
HGKC014A
>
hgkc14As
=
hgkc014AList
.
stream
().
filter
(
item
->
item
.
getParentId
().
equals
(
hgkc014
.
getId
())).
collect
(
Collectors
.
toList
());
...
...
src/main/java/com/baosight/hggp/hg/kc/service/ServiceHGKC014A.java
View file @
91991e86
...
@@ -116,7 +116,7 @@ public class ServiceHGKC014A extends ServiceEPBase {
...
@@ -116,7 +116,7 @@ public class ServiceHGKC014A extends ServiceEPBase {
List
<
String
>
contractCodes
=
ObjectUtils
.
listEpKey
(
hgkc014List
,
HGKC014A
.
FIELD_CONTRACT_CODE
);
List
<
String
>
contractCodes
=
ObjectUtils
.
listEpKey
(
hgkc014List
,
HGKC014A
.
FIELD_CONTRACT_CODE
);
List
<
HGSC010A
>
hgsc010As
=
HGSCTools
.
Hgsc010a
.
getByContractCode
(
contractCodes
);
List
<
HGSC010A
>
hgsc010As
=
HGSCTools
.
Hgsc010a
.
getByContractCode
(
contractCodes
);
HGKCTools
.
HgKc014
a
.
deleteByParentId
(
hgkc014List
,
hgsc010As
);
HGKCTools
.
HgKc014
A
.
deleteByParentId
(
hgkc014List
,
hgsc010As
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
inInfo
.
setMsgByKey
(
"ep.1000"
,
new
String
[]{
String
.
valueOf
(
i
),
I18nMessages
.
getText
(
"label.delete"
,
"删除"
)});
inInfo
.
setMsgByKey
(
"ep.1000"
,
new
String
[]{
String
.
valueOf
(
i
),
I18nMessages
.
getText
(
"label.delete"
,
"删除"
)});
...
...
src/main/java/com/baosight/hggp/hg/kc/service/ServiceHGKC014B.java
View file @
91991e86
...
@@ -74,7 +74,7 @@ public class ServiceHGKC014B extends ServiceEPBase {
...
@@ -74,7 +74,7 @@ public class ServiceHGKC014B extends ServiceEPBase {
Map
paramMap
=
EiInfoUtils
.
getFirstRow
(
inInfo
);
Map
paramMap
=
EiInfoUtils
.
getFirstRow
(
inInfo
);
List
<
Map
>
resultMaps
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
();
List
<
Map
>
resultMaps
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
();
//List<String> contractCodes = ObjectUtils.listKey(resultMaps, HGKC014A.FIELD_CONTRACT_CODE);
//List<String> contractCodes = ObjectUtils.listKey(resultMaps, HGKC014A.FIELD_CONTRACT_CODE);
List
<
HGKC014A
>
hgkc014AList
=
HGKCTools
.
HgKc014
a
.
getByParentId
((
Arrays
.
asList
(
Long
.
parseLong
(
paramMap
.
get
(
"parentId"
).
toString
()))));
List
<
HGKC014A
>
hgkc014AList
=
HGKCTools
.
HgKc014
A
.
getByParentId
((
Arrays
.
asList
(
Long
.
parseLong
(
paramMap
.
get
(
"parentId"
).
toString
()))));
for
(
Map
resultMap:
resultMaps
)
{
for
(
Map
resultMap:
resultMaps
)
{
HGSC010A
hgsc010a
=
new
HGSC010A
();
HGSC010A
hgsc010a
=
new
HGSC010A
();
hgsc010a
.
fromMap
(
resultMap
);
hgsc010a
.
fromMap
(
resultMap
);
...
...
src/main/java/com/baosight/hggp/hg/kc/sql/HGKC014.xml
View file @
91991e86
<?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">
<!-- table information
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
Generate time : 2024-09-29 14:12:44
Version : 1.0
schema : hggp
tableName : HGKC014
ID BIGINT NOT NULL primarykey,
ACCOUNT_CODE VARCHAR,
DEP_CODE VARCHAR,
CREATED_BY VARCHAR,
CREATED_NAME VARCHAR,
CREATED_TIME VARCHAR,
UPDATED_BY VARCHAR,
UPDATED_NAME VARCHAR,
UPDATED_TIME VARCHAR,
DELETE_FLAG TINYINT,
COMPANY_CODE VARCHAR,
COMPANY_NAME VARCHAR,
DEPOSIT_DATE VARCHAR,
DEPOSIT_CODE VARCHAR,
WH_CODE VARCHAR,
WH_NAME VARCHAR,
USER_ID VARCHAR,
STATUS TINYINT
-->
<sqlMap
namespace=
"HGKC014"
>
<sqlMap
namespace=
"HGKC014"
>
<sql
id=
"condition"
>
<sql
id=
"condition"
>
<include
refid=
"idCondition"
/>
<include
refid=
"HGXSDataAuth.authCondition"
/>
<include
refid=
"HGXSDataAuth.authCondition"
/>
<isNotEmpty
prepend=
" AND "
property=
"id"
>
<isNotEmpty
prepend=
" AND "
property=
"id"
>
ID = #id#
ID = #id#
...
@@ -66,9 +44,6 @@
...
@@ -66,9 +44,6 @@
<isNotEmpty
prepend=
" AND "
property=
"depositDate"
>
<isNotEmpty
prepend=
" AND "
property=
"depositDate"
>
DEPOSIT_DATE = #depositDate#
DEPOSIT_DATE = #depositDate#
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"depositCode"
>
DEPOSIT_CODE LIKE CONCAT('%',#depositCode#,'%')
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"whCode"
>
<isNotEmpty
prepend=
" AND "
property=
"whCode"
>
WH_CODE = #whCode#
WH_CODE = #whCode#
</isNotEmpty>
</isNotEmpty>
...
@@ -81,14 +56,25 @@
...
@@ -81,14 +56,25 @@
<isNotEmpty
prepend=
" AND "
property=
"status"
>
<isNotEmpty
prepend=
" AND "
property=
"status"
>
STATUS = #status#
STATUS = #status#
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"ids"
>
ID IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"ids"
>
#ids[]#
</iterate>
</isNotEmpty>
</sql>
</sql>
<select
id=
"query"
parameterClass=
"java.util.HashMap"
<sql
id=
"idCondition"
>
resultClass=
"com.baosight.hggp.hg.kc.domain.HGKC014"
>
<isNotEmpty
prepend=
" AND "
property=
"id"
>
SELECT
ID = #id#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"ids"
>
ID IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"ids"
>
#ids[]#
</iterate>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"depositCode"
>
DEPOSIT_CODE = #depositCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"depositCodes"
>
DEPOSIT_CODE IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"depositCodes"
>
#depositCodes[]#
</iterate>
</isNotEmpty>
</sql>
<select
id=
"query"
resultClass=
"com.baosight.hggp.hg.kc.domain.HGKC014"
>
SELECT
ID as "id",
<!-- ID -->
ID as "id",
<!-- ID -->
ACCOUNT_CODE as "accountCode",
<!-- 账套 -->
ACCOUNT_CODE as "accountCode",
<!-- 账套 -->
DEP_CODE as "depCode",
<!-- 部门编码 -->
DEP_CODE as "depCode",
<!-- 部门编码 -->
...
@@ -125,63 +111,6 @@
...
@@ -125,63 +111,6 @@
<include
refid=
"condition"
/>
<include
refid=
"condition"
/>
</select>
</select>
<!--
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
CREATED_NAME = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
COMPANY_NAME = #companyName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depositDate">
DEPOSIT_DATE = #depositDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depositCode">
DEPOSIT_CODE = #depositCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="whCode">
WH_CODE = #whCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="whName">
WH_NAME = #whName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="userId">
USER_ID = #userId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
-->
<insert
id=
"insert"
>
<insert
id=
"insert"
>
INSERT INTO ${hggpSchema}.HGKC014 (ID,
<!-- ID -->
INSERT INTO ${hggpSchema}.HGKC014 (ID,
<!-- ID -->
ACCOUNT_CODE,
<!-- 账套 -->
ACCOUNT_CODE,
<!-- 账套 -->
...
@@ -251,4 +180,22 @@
...
@@ -251,4 +180,22 @@
ID = #id#
ID = #id#
</update>
</update>
<!-- 行锁 -->
<update
id=
"lock"
>
UPDATE ${hggpSchema}.HGKC014
SET CREATED_TIME = CREATED_TIME
WHERE 1=1
<include
refid=
"idCondition"
/>
</update>
<!-- 修改状态 -->
<update
id=
"updateStatus"
>
UPDATE ${hggpSchema}.HGKC014
SET
STATUS = #status#,
<include
refid=
"SqlBase.updateRevise"
/>
WHERE 1=1
<include
refid=
"idCondition"
/>
</update>
</sqlMap>
</sqlMap>
src/main/java/com/baosight/hggp/hg/kc/sql/HGKC014A.xml
View file @
91991e86
<?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">
<!-- table information
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
Generate time : 2024-09-29 14:12:44
Version : 1.0
schema : hggp
tableName : HGKC014A
ID BIGINT NOT NULL primarykey,
ACCOUNT_CODE VARCHAR,
DEP_CODE VARCHAR,
CREATED_BY VARCHAR,
CREATED_NAME VARCHAR,
CREATED_TIME VARCHAR,
UPDATED_BY VARCHAR,
UPDATED_NAME VARCHAR,
UPDATED_TIME VARCHAR,
DELETE_FLAG TINYINT,
COMPANY_CODE VARCHAR,
COMPANY_NAME VARCHAR,
PARENT_ID BIGINT NOT NULL,
CONTRACT_CODE VARCHAR,
INVENT_TYPE TINYINT,
PRODUCT_CODE VARCHAR,
PRODUCT_NAME VARCHAR,
SPEC VARCHAR,
UNIT VARCHAR,
DEPOSIT_QTY DECIMAL,
DEPOSIT_WEIGHT DECIMAL
-->
<sqlMap
namespace=
"HGKC014A"
>
<sqlMap
namespace=
"HGKC014A"
>
<sql
id=
"condition"
>
<sql
id=
"column"
>
<isNotEmpty
prepend=
" AND "
property=
"id"
>
ID as "id",
<!-- ID -->
ID = #id#
ACCOUNT_CODE as "accountCode",
<!-- 账套 -->
</isNotEmpty>
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",
<!-- 修改时间 -->
DELETE_FLAG as "deleteFlag",
<!-- 是否删除 0-否1-是 -->
STATUS as "status",
<!-- 状态 -->
COMPANY_CODE as "companyCode",
<!-- 公司编码 -->
COMPANY_NAME as "companyName",
<!-- 公司名称 -->
WH_CODE as "whCode",
<!-- 仓库编码 -->
WH_NAME as "whName",
<!-- 仓库名称 -->
PARENT_ID as "parentId",
<!-- 委托ID -->
CONTRACT_CODE as "contractCode",
<!-- 委托单号 -->
DEPOSIT_CODE as "depositCode",
<!-- 委托入库单号 -->
INVENT_TYPE as "inventType",
<!-- 存货类型 -->
PRODUCT_CODE as "productCode",
<!-- 成品编码 -->
PRODUCT_NAME as "productName",
<!-- 成品名称 -->
SPEC_ID as "specId",
SPEC as "spec",
<!-- 规格 -->
UNIT as "unit",
<!-- 单位 -->
DEPOSIT_QTY as "depositQty",
<!-- 入库数量 -->
DEPOSIT_UNIT_WEIGHT as "depositUnitWeight",
<!-- 入库单重 -->
DEPOSIT_WEIGHT as "depositWeight",
<!-- 入库重量 -->
DELIVER_QTY as "deliverQty",
ACTUAL_QTY as "actualQty"
</sql>
<sql
id=
"condition"
>
<include
refid=
"idCondition"
/>
<isNotEmpty
prepend=
" AND "
property=
"accountCode"
>
<isNotEmpty
prepend=
" AND "
property=
"accountCode"
>
ACCOUNT_CODE = #accountCode#
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
</isNotEmpty>
...
@@ -59,6 +63,9 @@
...
@@ -59,6 +63,9 @@
<isNotEmpty
prepend=
" AND "
property=
"deleteFlag"
>
<isNotEmpty
prepend=
" AND "
property=
"deleteFlag"
>
DELETE_FLAG = #deleteFlag#
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"status"
>
STATUS = #status#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"companyCode"
>
<isNotEmpty
prepend=
" AND "
property=
"companyCode"
>
COMPANY_CODE = #companyCode#
COMPANY_CODE = #companyCode#
</isNotEmpty>
</isNotEmpty>
...
@@ -87,7 +94,7 @@
...
@@ -87,7 +94,7 @@
PRODUCT_CODE = #productCode#
PRODUCT_CODE = #productCode#
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"productName"
>
<isNotEmpty
prepend=
" AND "
property=
"productName"
>
PRODUCT_NAME
= #productName#
PRODUCT_NAME
LIKE CONCAT('%', #productName#, '%')
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"specId"
>
<isNotEmpty
prepend=
" AND "
property=
"specId"
>
SPEC_ID = #specId#
SPEC_ID = #specId#
...
@@ -112,37 +119,18 @@
...
@@ -112,37 +119,18 @@
</isNotEmpty>
</isNotEmpty>
</sql>
</sql>
<select
id=
"query"
parameterClass=
"java.util.HashMap"
<sql
id=
"idCondition"
>
resultClass=
"com.baosight.hggp.hg.kc.domain.HGKC014A"
>
<isNotEmpty
prepend=
" AND "
property=
"id"
>
SELECT
ID = #id#
ID as "id",
<!-- ID -->
</isNotEmpty>
ACCOUNT_CODE as "accountCode",
<!-- 账套 -->
<isNotEmpty
prepend=
" AND "
property=
"ids"
>
DEP_CODE as "depCode",
<!-- 部门编码 -->
ID IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"ids"
>
#ids[]#
</iterate>
CREATED_BY as "createdBy",
<!-- 创建人 -->
</isNotEmpty>
CREATED_NAME as "createdName",
<!-- 创建人名称 -->
</sql>
CREATED_TIME as "createdTime",
<!-- 创建时间 -->
UPDATED_BY as "updatedBy",
<!-- 修改人 -->
<select
id=
"query"
resultClass=
"com.baosight.hggp.hg.kc.domain.HGKC014A"
>
UPDATED_NAME as "updatedName",
<!-- 修改人名称 -->
SELECT
UPDATED_TIME as "updatedTime",
<!-- 修改时间 -->
<include
refid=
"column"
/>
DELETE_FLAG as "deleteFlag",
<!-- 是否删除 0-否1-是 -->
COMPANY_CODE as "companyCode",
<!-- 公司编码 -->
COMPANY_NAME as "companyName",
<!-- 公司名称 -->
WH_CODE as "whCode",
<!-- 仓库编码 -->
WH_NAME as "whName",
<!-- 仓库名称 -->
PARENT_ID as "parentId",
<!-- 委托ID -->
CONTRACT_CODE as "contractCode",
<!-- 委托单号 -->
DEPOSIT_CODE as "depositCode",
<!-- 委托入库单号 -->
INVENT_TYPE as "inventType",
<!-- 存货类型 -->
PRODUCT_CODE as "productCode",
<!-- 成品编码 -->
PRODUCT_NAME as "productName",
<!-- 成品名称 -->
SPEC_ID as "specId",
SPEC as "spec",
<!-- 规格 -->
UNIT as "unit",
<!-- 单位 -->
DEPOSIT_QTY as "depositQty",
<!-- 入库数量 -->
DEPOSIT_UNIT_WEIGHT as "depositUnitWeight",
<!-- 入库单重 -->
DEPOSIT_WEIGHT as "depositWeight",
<!-- 入库重量 -->
DELIVER_QTY as "deliverQty",
ACTUAL_QTY as "actualQty"
FROM ${hggpSchema}.HGKC014A WHERE 1=1
FROM ${hggpSchema}.HGKC014A WHERE 1=1
<include
refid=
"condition"
/>
<include
refid=
"condition"
/>
<dynamic
prepend=
"ORDER BY"
>
<dynamic
prepend=
"ORDER BY"
>
...
@@ -161,72 +149,6 @@
...
@@ -161,72 +149,6 @@
<include
refid=
"condition"
/>
<include
refid=
"condition"
/>
</select>
</select>
<!--
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
CREATED_NAME = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
COMPANY_NAME = #companyName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="parentId">
PARENT_ID = #parentId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractCode">
CONTRACT_CODE = #contractCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventType">
INVENT_TYPE = #inventType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productCode">
PRODUCT_CODE = #productCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productName">
PRODUCT_NAME = #productName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="spec">
SPEC = #spec#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="unit">
UNIT = #unit#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depositQty">
DEPOSIT_QTY = #depositQty#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depositWeight">
DEPOSIT_WEIGHT = #depositWeight#
</isNotEmpty>
-->
<insert
id=
"insert"
>
<insert
id=
"insert"
>
INSERT INTO ${hggpSchema}.HGKC014A (ID,
<!-- ID -->
INSERT INTO ${hggpSchema}.HGKC014A (ID,
<!-- ID -->
ACCOUNT_CODE,
<!-- 账套 -->
ACCOUNT_CODE,
<!-- 账套 -->
...
@@ -303,4 +225,34 @@
...
@@ -303,4 +225,34 @@
ID = #id#
ID = #id#
</update>
</update>
<!-- 行锁 -->
<update
id=
"lock"
>
UPDATE ${hggpSchema}.HGKC014A
SET CREATED_TIME = CREATED_TIME
WHERE 1=1
<include
refid=
"idCondition"
/>
</update>
<!-- 修改状态 -->
<update
id=
"updateStatus"
>
UPDATE ${hggpSchema}.HGKC014A
SET
STATUS = #status#,
<include
refid=
"SqlBase.updateRevise"
/>
WHERE 1=1
<include
refid=
"idCondition"
/>
</update>
<!-- 实际入库数量 -->
<update
id=
"updateActualQty"
>
UPDATE ${hggpSchema}.HGKC014A
SET
STATUS = #status#,
ACTUAL_QTY = #actualQty#
DELIVER_QTY = #deliverQty#
<include
refid=
"SqlBase.updateRevise"
/>
WHERE ID = #id#
</update>
</sqlMap>
</sqlMap>
src/main/java/com/baosight/hggp/hg/kc/tools/HGKCTools.java
View file @
91991e86
...
@@ -10,6 +10,7 @@ import com.baosight.hggp.hg.cg.utils.HGCGUtils;
...
@@ -10,6 +10,7 @@ import com.baosight.hggp.hg.cg.utils.HGCGUtils;
import
com.baosight.hggp.hg.constant.HGConstant
;
import
com.baosight.hggp.hg.constant.HGConstant
;
import
com.baosight.hggp.hg.constant.HGSqlConstant
;
import
com.baosight.hggp.hg.constant.HGSqlConstant
;
import
com.baosight.hggp.hg.kc.constant.HgKcSqlConst
;
import
com.baosight.hggp.hg.kc.constant.HgKcSqlConst
;
import
com.baosight.hggp.hg.kc.constant.HgKcSqlConstant
;
import
com.baosight.hggp.hg.kc.domain.HGKC001
;
import
com.baosight.hggp.hg.kc.domain.HGKC001
;
import
com.baosight.hggp.hg.kc.domain.HGKC002
;
import
com.baosight.hggp.hg.kc.domain.HGKC002
;
import
com.baosight.hggp.hg.kc.domain.HGKC003
;
import
com.baosight.hggp.hg.kc.domain.HGKC003
;
...
@@ -29,13 +30,14 @@ import com.baosight.hggp.hg.kc.domain.HGKC013;
...
@@ -29,13 +30,14 @@ import com.baosight.hggp.hg.kc.domain.HGKC013;
import
com.baosight.hggp.hg.kc.domain.HGKC013A
;
import
com.baosight.hggp.hg.kc.domain.HGKC013A
;
import
com.baosight.hggp.hg.kc.domain.HGKC014
;
import
com.baosight.hggp.hg.kc.domain.HGKC014
;
import
com.baosight.hggp.hg.kc.domain.HGKC014A
;
import
com.baosight.hggp.hg.kc.domain.HGKC014A
;
import
com.baosight.hggp.hg.kc.domain.HGKC015
;
import
com.baosight.hggp.hg.kc.domain.HGKC015A
;
import
com.baosight.hggp.hg.kc.utils.HGKCUtils
;
import
com.baosight.hggp.hg.kc.utils.HGKCUtils
;
import
com.baosight.hggp.hg.pz.domain.HGPZ005
;
import
com.baosight.hggp.hg.pz.domain.HGPZ005
;
import
com.baosight.hggp.hg.pz.domain.HGPZ005A
;
import
com.baosight.hggp.hg.pz.domain.HGPZ005A
;
import
com.baosight.hggp.hg.pz.domain.HGPZ007
;
import
com.baosight.hggp.hg.pz.domain.HGPZ007
;
import
com.baosight.hggp.hg.pz.tools.HGPZTools
;
import
com.baosight.hggp.hg.pz.tools.HGPZTools
;
import
com.baosight.hggp.hg.sc.domain.HGSC008
;
import
com.baosight.hggp.hg.sc.domain.HGSC008
;
import
com.baosight.hggp.hg.sc.domain.HGSC010
;
import
com.baosight.hggp.hg.sc.domain.HGSC010A
;
import
com.baosight.hggp.hg.sc.domain.HGSC010A
;
import
com.baosight.hggp.hg.sc.domain.HGSC010B
;
import
com.baosight.hggp.hg.sc.domain.HGSC010B
;
import
com.baosight.hggp.hg.sc.tools.HGSCTools
;
import
com.baosight.hggp.hg.sc.tools.HGSCTools
;
...
@@ -1499,6 +1501,21 @@ public class HGKCTools {
...
@@ -1499,6 +1501,21 @@ public class HGKCTools {
public
static
class
HgKc014
{
public
static
class
HgKc014
{
/**
/**
* 锁
*
* @param depositCodes
* @return
*/
public
static
void
lock
(
List
<
String
>
depositCodes
)
{
if
(
CollectionUtils
.
isEmpty
(
depositCodes
))
{
return
;
}
Map
paramMap
=
new
HashMap
();
paramMap
.
put
(
"depositCodes"
,
depositCodes
);
DaoBase
.
getInstance
().
update
(
HgKcSqlConst
.
HgKc014
.
LOCK
,
paramMap
);
}
/**
* 修改状态
* 修改状态
*
*
* @param depositCode
* @param depositCode
...
@@ -1509,20 +1526,44 @@ public class HGKCTools {
...
@@ -1509,20 +1526,44 @@ public class HGKCTools {
AssertUtils
.
isEmpty
(
depositCode
,
"入库单号不能为空"
);
AssertUtils
.
isEmpty
(
depositCode
,
"入库单号不能为空"
);
AssertUtils
.
isNull
(
status
,
"状态不能为空"
);
AssertUtils
.
isNull
(
status
,
"状态不能为空"
);
Map
paramMap
=
new
HashMap
();
Map
paramMap
=
new
HashMap
();
paramMap
.
put
(
HGKC0
08
.
FIELD_APPLY
_CODE
,
depositCode
);
paramMap
.
put
(
HGKC0
14
.
FIELD_DEPOSIT
_CODE
,
depositCode
);
paramMap
.
put
(
HGKC0
08
.
FIELD_STATUS
,
status
);
paramMap
.
put
(
HGKC0
14
.
FIELD_STATUS
,
status
);
DaoBase
.
getInstance
().
update
(
HgKcSqlConst
.
HgKc014
.
UPDATE_STATUS
,
paramMap
);
DaoBase
.
getInstance
().
update
(
HgKcSqlConst
.
HgKc014
.
UPDATE_STATUS
,
paramMap
);
}
}
public
static
List
<
HGKC014
>
getByParentId
(
List
<
Long
>
ids
)
{
public
static
List
<
HGKC014
>
getByParentId
(
List
<
Long
>
ids
)
{
if
(
Objects
.
isNull
(
ids
)){
if
(
Objects
.
isNull
(
ids
))
{
return
new
ArrayList
<>();
return
new
ArrayList
<>();
}
}
Map
<
String
,
Object
>
paramMap
=
new
HashMap
();
Map
<
String
,
Object
>
paramMap
=
new
HashMap
();
paramMap
.
put
(
"ids"
,
ids
);
paramMap
.
put
(
"ids"
,
ids
);
paramMap
.
put
(
"deleteFlag"
,
0
);
paramMap
.
put
(
"deleteFlag"
,
0
);
List
<
HGKC014
>
list
=
DaoBase
.
getInstance
().
query
(
HGKC014
.
QUERY
,
paramMap
);
List
<
HGKC014
>
list
=
DaoBase
.
getInstance
().
query
(
HGKC014
.
QUERY
,
paramMap
);
return
CollectionUtils
.
isEmpty
(
list
)?
null
:
list
;
return
CollectionUtils
.
isEmpty
(
list
)
?
null
:
list
;
}
/**
* 查询
*
* @param depositCodes
* @return
*/
public
static
List
<
HGKC014
>
list
(
List
<
String
>
depositCodes
)
{
AssertUtils
.
isEmpty
(
depositCodes
,
"库存ID不能为空"
);
Map
<
String
,
Object
>
paramMap
=
new
HashMap
();
paramMap
.
put
(
"depositCodes"
,
depositCodes
);
return
DaoBase
.
getInstance
().
query
(
HGKC014
.
QUERY
,
paramMap
);
}
/**
* 查询
*
* @param depositCodes
* @return
*/
public
static
Map
<
String
,
HGKC014
>
map
(
List
<
String
>
depositCodes
)
{
List
<
HGKC014
>
results
=
list
(
depositCodes
);
return
results
.
stream
().
collect
(
Collectors
.
toMap
(
HGKC014:
:
getDepositCode
,
item
->
item
));
}
}
}
}
...
@@ -1536,6 +1577,21 @@ public class HGKCTools {
...
@@ -1536,6 +1577,21 @@ public class HGKCTools {
public
static
class
HgKc014A
{
public
static
class
HgKc014A
{
/**
/**
* 锁
*
* @param ids
* @return
*/
public
static
void
lock
(
List
<
Long
>
ids
)
{
if
(
CollectionUtils
.
isEmpty
(
ids
))
{
return
;
}
Map
paramMap
=
new
HashMap
();
paramMap
.
put
(
"ids"
,
ids
);
DaoBase
.
getInstance
().
update
(
HgKcSqlConst
.
HgKc014A
.
LOCK
,
paramMap
);
}
/**
* 修改状态
* 修改状态
*
*
* @param id
* @param id
...
@@ -1552,6 +1608,26 @@ public class HGKCTools {
...
@@ -1552,6 +1608,26 @@ public class HGKCTools {
}
}
/**
/**
* 实际入库数量
*
* @param id
* @param status
* @param actualQty
* @param deliverQty
* @return
*/
public
static
void
updateActualQty
(
Long
id
,
Integer
status
,
BigDecimal
actualQty
,
BigDecimal
deliverQty
)
{
AssertUtils
.
isNull
(
id
,
"入库单行ID不能为空"
);
AssertUtils
.
isNull
(
status
,
"状态不能为空"
);
Map
paramMap
=
new
HashMap
();
paramMap
.
put
(
HGKC014A
.
FIELD_ID
,
id
);
paramMap
.
put
(
HGKC014A
.
FIELD_STATUS
,
status
);
paramMap
.
put
(
HGKC014A
.
FIELD_ACTUAL_QTY
,
actualQty
);
paramMap
.
put
(
HGKC014A
.
FIELD_DELIVER_QTY
,
deliverQty
);
DaoBase
.
getInstance
().
update
(
HgKcSqlConst
.
HgKc014A
.
UPDATE_STATUS
,
paramMap
);
}
/**
* 查询
* 查询
*
*
* @param ids
* @param ids
...
@@ -1618,10 +1694,24 @@ public class HGKCTools {
...
@@ -1618,10 +1694,24 @@ public class HGKCTools {
}
}
public
static
class
HgKc015
{
public
static
List
<
HGKC015
>
getByParentId
(
List
<
Long
>
parentIds
)
{
if
(
Objects
.
isNull
(
parentIds
))
{
return
new
ArrayList
<>();
}
Map
<
String
,
Object
>
paramMap
=
new
HashMap
();
paramMap
.
put
(
"ids"
,
parentIds
);
paramMap
.
put
(
"deleteFlag"
,
0
);
List
<
HGKC015
>
list
=
DaoBase
.
getInstance
().
query
(
HGKC015
.
QUERY
,
paramMap
);
return
CollectionUtils
.
isEmpty
(
list
)
?
null
:
list
;
}
}
public
static
class
HgKc015a
{
public
static
class
HgKc015a
{
public
static
List
<
HGKC015A
>
getByParentId
(
List
<
Long
>
parentIds
)
{
public
static
List
<
HGKC015A
>
getByParentId
(
List
<
Long
>
parentIds
)
{
if
(
Objects
.
isNull
(
parentIds
)){
if
(
Objects
.
isNull
(
parentIds
))
{
return
new
ArrayList
<>();
return
new
ArrayList
<>();
}
}
Map
<
String
,
Object
>
paramMap
=
new
HashMap
();
Map
<
String
,
Object
>
paramMap
=
new
HashMap
();
...
...
src/main/java/com/baosight/hggp/hg/kc/utils/HGKCUtils.java
View file @
91991e86
...
@@ -15,6 +15,8 @@ import com.baosight.hggp.hg.kc.domain.HGKC008A;
...
@@ -15,6 +15,8 @@ import com.baosight.hggp.hg.kc.domain.HGKC008A;
import
com.baosight.hggp.hg.kc.domain.HGKC010
;
import
com.baosight.hggp.hg.kc.domain.HGKC010
;
import
com.baosight.hggp.hg.kc.domain.HGKC010A
;
import
com.baosight.hggp.hg.kc.domain.HGKC010A
;
import
com.baosight.hggp.hg.kc.domain.HGKC011
;
import
com.baosight.hggp.hg.kc.domain.HGKC011
;
import
com.baosight.hggp.hg.kc.domain.HGKC014
;
import
com.baosight.hggp.hg.kc.domain.HGKC014A
;
import
com.baosight.hggp.hg.kc.tools.HGKCTools
;
import
com.baosight.hggp.hg.kc.tools.HGKCTools
;
import
com.baosight.hggp.hg.pz.domain.HGPZ005
;
import
com.baosight.hggp.hg.pz.domain.HGPZ005
;
import
com.baosight.hggp.hg.pz.tools.HGPZTools
;
import
com.baosight.hggp.hg.pz.tools.HGPZTools
;
...
@@ -38,7 +40,7 @@ import java.util.Map;
...
@@ -38,7 +40,7 @@ import java.util.Map;
* @date:2024/5/13,14:57
* @date:2024/5/13,14:57
*/
*/
public
class
HGKCUtils
{
public
class
HGKCUtils
{
/**
/**
* HGKC001 工具类
* HGKC001 工具类
*
*
...
@@ -46,7 +48,7 @@ public class HGKCUtils {
...
@@ -46,7 +48,7 @@ public class HGKCUtils {
* @date:2024/5/9,16:58
* @date:2024/5/9,16:58
*/
*/
public
static
class
HgKc001
{
public
static
class
HgKc001
{
/**
/**
* 设置查询条件
* 设置查询条件
*
*
...
@@ -61,7 +63,7 @@ public class HGKCUtils {
...
@@ -61,7 +63,7 @@ public class HGKCUtils {
queryRow
.
put
(
HGKC001
.
FIELD_DEPOSIT_DATE
,
DateUtils
.
formatShort
(
depositDate
));
queryRow
.
put
(
HGKC001
.
FIELD_DEPOSIT_DATE
,
DateUtils
.
formatShort
(
depositDate
));
}
}
}
}
/**
/**
* 锁并且获取数据
* 锁并且获取数据
*
*
...
@@ -71,7 +73,7 @@ public class HGKCUtils {
...
@@ -71,7 +73,7 @@ public class HGKCUtils {
public
static
Map
<
String
,
HGKC001
>
lockGetDataEp
(
List
<?
extends
HGKC001
>
kc001s
)
{
public
static
Map
<
String
,
HGKC001
>
lockGetDataEp
(
List
<?
extends
HGKC001
>
kc001s
)
{
return
lockGetData
(
ObjectUtils
.
listEpKey
(
kc001s
,
HGKC001
.
FIELD_DEPOSIT_NO
));
return
lockGetData
(
ObjectUtils
.
listEpKey
(
kc001s
,
HGKC001
.
FIELD_DEPOSIT_NO
));
}
}
/**
/**
* 锁并且获取数据
* 锁并且获取数据
*
*
...
@@ -85,7 +87,7 @@ public class HGKCUtils {
...
@@ -85,7 +87,7 @@ public class HGKCUtils {
return
HGKCTools
.
HgKc001
.
map
(
depositNos
);
return
HGKCTools
.
HgKc001
.
map
(
depositNos
);
}
}
}
}
/**
/**
* HGKC002 工具类
* HGKC002 工具类
*
*
...
@@ -93,7 +95,7 @@ public class HGKCUtils {
...
@@ -93,7 +95,7 @@ public class HGKCUtils {
* @date:2024/5/9,16:58
* @date:2024/5/9,16:58
*/
*/
public
static
class
HgKc002
{
public
static
class
HgKc002
{
/**
/**
* 设置查询条件
* 设置查询条件
*
*
...
@@ -108,7 +110,7 @@ public class HGKCUtils {
...
@@ -108,7 +110,7 @@ public class HGKCUtils {
queryRow
.
put
(
HGKC002
.
FIELD_RECEIPT_DATE
,
DateUtils
.
formatShort
(
receiptDate
));
queryRow
.
put
(
HGKC002
.
FIELD_RECEIPT_DATE
,
DateUtils
.
formatShort
(
receiptDate
));
}
}
}
}
/**
/**
* 锁并且获取数据
* 锁并且获取数据
*
*
...
@@ -118,7 +120,7 @@ public class HGKCUtils {
...
@@ -118,7 +120,7 @@ public class HGKCUtils {
public
static
Map
<
String
,
HGKC002
>
lockGetDataEp
(
List
<?
extends
HGKC002
>
kc002s
)
{
public
static
Map
<
String
,
HGKC002
>
lockGetDataEp
(
List
<?
extends
HGKC002
>
kc002s
)
{
return
lockGetData
(
ObjectUtils
.
listEpKey
(
kc002s
,
HGKC002
.
FIELD_REQ_NO
));
return
lockGetData
(
ObjectUtils
.
listEpKey
(
kc002s
,
HGKC002
.
FIELD_REQ_NO
));
}
}
/**
/**
* 锁并且获取数据
* 锁并且获取数据
*
*
...
@@ -132,7 +134,7 @@ public class HGKCUtils {
...
@@ -132,7 +134,7 @@ public class HGKCUtils {
return
HGKCTools
.
HgKc002
.
map
(
reqNos
);
return
HGKCTools
.
HgKc002
.
map
(
reqNos
);
}
}
}
}
/**
/**
* HGKC003 工具类
* HGKC003 工具类
*
*
...
@@ -140,7 +142,7 @@ public class HGKCUtils {
...
@@ -140,7 +142,7 @@ public class HGKCUtils {
* @date:2024/5/9,16:58
* @date:2024/5/9,16:58
*/
*/
public
static
class
HgKc003
{
public
static
class
HgKc003
{
/**
/**
* 设置查询条件
* 设置查询条件
*
*
...
@@ -155,7 +157,7 @@ public class HGKCUtils {
...
@@ -155,7 +157,7 @@ public class HGKCUtils {
queryRow
.
put
(
HGKC003
.
FIELD_DEPOSIT_DATE
,
DateUtils
.
formatShort
(
depositDate
));
queryRow
.
put
(
HGKC003
.
FIELD_DEPOSIT_DATE
,
DateUtils
.
formatShort
(
depositDate
));
}
}
}
}
/**
/**
* 锁并且获取数据
* 锁并且获取数据
*
*
...
@@ -165,7 +167,7 @@ public class HGKCUtils {
...
@@ -165,7 +167,7 @@ public class HGKCUtils {
public
static
Map
<
String
,
HGKC003
>
lockGetDataEp
(
List
<?
extends
HGKC003
>
kc003s
)
{
public
static
Map
<
String
,
HGKC003
>
lockGetDataEp
(
List
<?
extends
HGKC003
>
kc003s
)
{
return
lockGetData
(
ObjectUtils
.
listEpKey
(
kc003s
,
HGKC003
.
FIELD_DEPOSIT_NO
));
return
lockGetData
(
ObjectUtils
.
listEpKey
(
kc003s
,
HGKC003
.
FIELD_DEPOSIT_NO
));
}
}
/**
/**
* 锁并且获取数据
* 锁并且获取数据
*
*
...
@@ -178,11 +180,11 @@ public class HGKCUtils {
...
@@ -178,11 +180,11 @@ public class HGKCUtils {
// db数据
// db数据
return
HGKCTools
.
HgKc003
.
map
(
depositNos
);
return
HGKCTools
.
HgKc003
.
map
(
depositNos
);
}
}
}
}
public
static
class
HgKc006
{
public
static
class
HgKc006
{
/**
/**
* 设置查询条件
* 设置查询条件
*
*
...
@@ -197,9 +199,9 @@ public class HGKCUtils {
...
@@ -197,9 +199,9 @@ public class HGKCUtils {
}
}
}
}
}
}
public
static
class
HgKc007
{
public
static
class
HgKc007
{
/**
/**
* 设置查询条件
* 设置查询条件
*
*
...
@@ -213,7 +215,7 @@ public class HGKCUtils {
...
@@ -213,7 +215,7 @@ public class HGKCUtils {
queryRow
.
put
(
HGKC007
.
FIELD_OTHER_OUT_DATE
,
DateUtils
.
formatShort
(
otherOutDate
));
queryRow
.
put
(
HGKC007
.
FIELD_OTHER_OUT_DATE
,
DateUtils
.
formatShort
(
otherOutDate
));
}
}
}
}
/**
/**
* 查询
* 查询
*
*
...
@@ -287,9 +289,8 @@ public class HGKCUtils {
...
@@ -287,9 +289,8 @@ public class HGKCUtils {
}
}
}
}
/**
/**
*
* @author:songx
* @author:songx
* @date:2024/9/29,10:30
* @date:2024/9/29,10:30
*/
*/
...
@@ -343,7 +344,7 @@ public class HGKCUtils {
...
@@ -343,7 +344,7 @@ public class HGKCUtils {
* @date:2024/5/9,16:58
* @date:2024/5/9,16:58
*/
*/
public
static
class
HgKc010
{
public
static
class
HgKc010
{
/**
/**
* 更新库存
* 更新库存
*
*
...
@@ -357,7 +358,7 @@ public class HGKCUtils {
...
@@ -357,7 +358,7 @@ public class HGKCUtils {
BigDecimal
weight
)
{
BigDecimal
weight
)
{
updateInv
(
companyCode
,
whCode
,
inventCode
,
qty
,
null
,
weight
);
updateInv
(
companyCode
,
whCode
,
inventCode
,
qty
,
null
,
weight
);
}
}
/**
/**
* 更新库存
* 更新库存
*
*
...
@@ -383,7 +384,7 @@ public class HGKCUtils {
...
@@ -383,7 +384,7 @@ public class HGKCUtils {
updateInvData
(
newKc010
,
dbKc010
);
updateInvData
(
newKc010
,
dbKc010
);
}
}
}
}
/**
/**
* 构建对象
* 构建对象
*
*
...
@@ -406,7 +407,7 @@ public class HGKCUtils {
...
@@ -406,7 +407,7 @@ public class HGKCUtils {
newKc010
.
setInvWeight
(
weight
);
newKc010
.
setInvWeight
(
weight
);
return
newKc010
;
return
newKc010
;
}
}
/**
/**
* 参数校验
* 参数校验
*
*
...
@@ -426,7 +427,7 @@ public class HGKCUtils {
...
@@ -426,7 +427,7 @@ public class HGKCUtils {
AssertUtils
.
isTrue
(
qty
.
compareTo
(
BigDecimal
.
ZERO
)
==
0
AssertUtils
.
isTrue
(
qty
.
compareTo
(
BigDecimal
.
ZERO
)
==
0
&&
weight
.
compareTo
(
BigDecimal
.
ZERO
)
==
0
,
"库存变更数量和重量不能为空"
);
&&
weight
.
compareTo
(
BigDecimal
.
ZERO
)
==
0
,
"库存变更数量和重量不能为空"
);
}
}
/**
/**
* 新增库存
* 新增库存
*
*
...
@@ -471,7 +472,7 @@ public class HGKCUtils {
...
@@ -471,7 +472,7 @@ public class HGKCUtils {
dbKc010
.
setInvUnitWeight
(
newUnitWeight
);
dbKc010
.
setInvUnitWeight
(
newUnitWeight
);
DaoUtils
.
update
(
HGKC010
.
UPDATE_INV
,
dbKc010
);
DaoUtils
.
update
(
HGKC010
.
UPDATE_INV
,
dbKc010
);
}
}
/**
/**
* 锁并且获取数据
* 锁并且获取数据
*
*
...
@@ -481,7 +482,7 @@ public class HGKCUtils {
...
@@ -481,7 +482,7 @@ public class HGKCUtils {
public
static
Map
<
Long
,
HGKC010
>
lockGetDataEp
(
List
<?
extends
HGKC010
>
kc010s
)
{
public
static
Map
<
Long
,
HGKC010
>
lockGetDataEp
(
List
<?
extends
HGKC010
>
kc010s
)
{
return
lockGetData
(
ObjectUtils
.
listEpKey
(
kc010s
,
HGKC010
.
FIELD_ID
));
return
lockGetData
(
ObjectUtils
.
listEpKey
(
kc010s
,
HGKC010
.
FIELD_ID
));
}
}
/**
/**
* 锁并且获取数据
* 锁并且获取数据
*
*
...
@@ -494,9 +495,9 @@ public class HGKCUtils {
...
@@ -494,9 +495,9 @@ public class HGKCUtils {
// db数据
// db数据
return
HGKCTools
.
HgKc010
.
map
(
ids
);
return
HGKCTools
.
HgKc010
.
map
(
ids
);
}
}
}
}
/**
/**
* HGKC010 工具类
* HGKC010 工具类
*
*
...
@@ -504,6 +505,7 @@ public class HGKCUtils {
...
@@ -504,6 +505,7 @@ public class HGKCUtils {
* @date:2024/5/9,16:58
* @date:2024/5/9,16:58
*/
*/
public
static
class
HgKc010A
{
public
static
class
HgKc010A
{
/**
/**
* 锁并且获取数据
* 锁并且获取数据
*
*
...
@@ -513,7 +515,7 @@ public class HGKCUtils {
...
@@ -513,7 +515,7 @@ public class HGKCUtils {
public
static
Map
<
Long
,
HGKC010A
>
lockGetDataEp
(
List
<
HGKC010A
>
kc010s
)
{
public
static
Map
<
Long
,
HGKC010A
>
lockGetDataEp
(
List
<
HGKC010A
>
kc010s
)
{
return
lockGetData
(
ObjectUtils
.
listEpKey
(
kc010s
,
HGKC010A
.
FIELD_ID
));
return
lockGetData
(
ObjectUtils
.
listEpKey
(
kc010s
,
HGKC010A
.
FIELD_ID
));
}
}
/**
/**
* 锁并且获取数据
* 锁并且获取数据
*
*
...
@@ -527,6 +529,7 @@ public class HGKCUtils {
...
@@ -527,6 +529,7 @@ public class HGKCUtils {
return
HGKCTools
.
HgKc010A
.
map
(
ids
);
return
HGKCTools
.
HgKc010A
.
map
(
ids
);
}
}
}
}
/**
/**
* HGKC011 工具类
* HGKC011 工具类
*
*
...
@@ -534,7 +537,7 @@ public class HGKCUtils {
...
@@ -534,7 +537,7 @@ public class HGKCUtils {
* @date:2024/5/9,16:58
* @date:2024/5/9,16:58
*/
*/
public
static
class
HgKc011
{
public
static
class
HgKc011
{
/**
/**
* 更新库存
* 更新库存
*
*
...
@@ -548,7 +551,7 @@ public class HGKCUtils {
...
@@ -548,7 +551,7 @@ public class HGKCUtils {
BigDecimal
weight
)
{
BigDecimal
weight
)
{
updateInv
(
companyCode
,
whCode
,
prodOrderNo
,
qty
,
null
,
weight
);
updateInv
(
companyCode
,
whCode
,
prodOrderNo
,
qty
,
null
,
weight
);
}
}
/**
/**
* 更新库存
* 更新库存
*
*
...
@@ -574,7 +577,7 @@ public class HGKCUtils {
...
@@ -574,7 +577,7 @@ public class HGKCUtils {
updateInvData
(
newKc011
,
dbKc011
);
updateInvData
(
newKc011
,
dbKc011
);
}
}
}
}
/**
/**
* 构建对象
* 构建对象
*
*
...
@@ -597,7 +600,7 @@ public class HGKCUtils {
...
@@ -597,7 +600,7 @@ public class HGKCUtils {
newKc011
.
setInvWeight
(
weight
);
newKc011
.
setInvWeight
(
weight
);
return
newKc011
;
return
newKc011
;
}
}
/**
/**
* 参数校验
* 参数校验
*
*
...
@@ -617,7 +620,7 @@ public class HGKCUtils {
...
@@ -617,7 +620,7 @@ public class HGKCUtils {
AssertUtils
.
isTrue
(
qty
.
compareTo
(
BigDecimal
.
ZERO
)
==
0
AssertUtils
.
isTrue
(
qty
.
compareTo
(
BigDecimal
.
ZERO
)
==
0
&&
weight
.
compareTo
(
BigDecimal
.
ZERO
)
==
0
,
"库存变更数量和重量不能为0"
);
&&
weight
.
compareTo
(
BigDecimal
.
ZERO
)
==
0
,
"库存变更数量和重量不能为0"
);
}
}
/**
/**
* 新增库存
* 新增库存
*
*
...
@@ -640,7 +643,7 @@ public class HGKCUtils {
...
@@ -640,7 +643,7 @@ public class HGKCUtils {
newKc011
.
setDeleteFlag
(
DeleteFlagEnum
.
UN_REMOVE
.
getCode
());
newKc011
.
setDeleteFlag
(
DeleteFlagEnum
.
UN_REMOVE
.
getCode
());
DaoUtils
.
insert
(
HGKC011
.
INSERT
,
newKc011
);
DaoUtils
.
insert
(
HGKC011
.
INSERT
,
newKc011
);
}
}
/**
/**
* 修改库存
* 修改库存
*
*
...
@@ -659,7 +662,7 @@ public class HGKCUtils {
...
@@ -659,7 +662,7 @@ public class HGKCUtils {
dbKc011
.
setInvUnitWeight
(
newUnitWeight
);
dbKc011
.
setInvUnitWeight
(
newUnitWeight
);
DaoUtils
.
update
(
HGSqlConstant
.
HgKc011
.
UPDATE_INV
,
dbKc011
);
DaoUtils
.
update
(
HGSqlConstant
.
HgKc011
.
UPDATE_INV
,
dbKc011
);
}
}
/**
/**
* 锁并且获取数据
* 锁并且获取数据
*
*
...
@@ -669,7 +672,7 @@ public class HGKCUtils {
...
@@ -669,7 +672,7 @@ public class HGKCUtils {
public
static
Map
<
Long
,
HGKC010
>
lockGetDataEp
(
List
<?
extends
HGKC010
>
kc010s
)
{
public
static
Map
<
Long
,
HGKC010
>
lockGetDataEp
(
List
<?
extends
HGKC010
>
kc010s
)
{
return
lockGetData
(
ObjectUtils
.
listEpKey
(
kc010s
,
HGKC010
.
FIELD_ID
));
return
lockGetData
(
ObjectUtils
.
listEpKey
(
kc010s
,
HGKC010
.
FIELD_ID
));
}
}
/**
/**
* 锁并且获取数据
* 锁并且获取数据
*
*
...
@@ -682,6 +685,62 @@ public class HGKCUtils {
...
@@ -682,6 +685,62 @@ public class HGKCUtils {
// db数据
// db数据
return
HGKCTools
.
HgKc010
.
map
(
ids
);
return
HGKCTools
.
HgKc010
.
map
(
ids
);
}
}
}
/**
* HGKC014 工具类
*
* @author:songx
* @date:2024/5/9,16:58
*/
public
static
class
HgKc014
{
/**
* 锁并且获取数据
*
* @param depositCodes
* @return
*/
public
static
Map
<
String
,
HGKC014
>
lockGetData
(
List
<
String
>
depositCodes
)
{
// 锁
HGKCTools
.
HgKc014
.
lock
(
depositCodes
);
// db数据
return
HGKCTools
.
HgKc014
.
map
(
depositCodes
);
}
}
/**
* HGKC014 工具类
*
* @author:songx
* @date:2024/5/9,16:58
*/
public
static
class
HgKc014A
{
/**
* 锁并且获取数据
*
* @param kc014As
* @return
*/
public
static
Map
<
Long
,
HGKC014A
>
lockGetDataEp
(
List
<?
extends
HGKC014A
>
kc014As
)
{
return
lockGetData
(
ObjectUtils
.
listEpKey
(
kc014As
,
HGKC014A
.
FIELD_ID
));
}
/**
* 锁并且获取数据
*
* @param ids
* @return
*/
public
static
Map
<
Long
,
HGKC014A
>
lockGetData
(
List
<
Long
>
ids
)
{
// 锁
HGKCTools
.
HgKc014A
.
lock
(
ids
);
// db数据
return
HGKCTools
.
HgKc014A
.
map
(
ids
);
}
}
}
}
}
src/main/java/com/baosight/hggp/hg/zl/service/ServiceHGZL012.java
View file @
91991e86
...
@@ -6,22 +6,16 @@ import com.baosight.hggp.core.constant.CommonConstant;
...
@@ -6,22 +6,16 @@ import com.baosight.hggp.core.constant.CommonConstant;
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.constant.HGConstant
;
import
com.baosight.hggp.hg.kc.constant.HgKcConst
;
import
com.baosight.hggp.hg.kc.constant.HgKcConst
;
import
com.baosight.hggp.hg.kc.domain.HGKC008A
;
import
com.baosight.hggp.hg.kc.domain.HGKC014
;
import
com.baosight.hggp.hg.kc.domain.HGKC014A
;
import
com.baosight.hggp.hg.kc.domain.HGKC014A
;
import
com.baosight.hggp.hg.kc.tools.HGKCTools
;
import
com.baosight.hggp.hg.kc.tools.HGKCTools
;
import
com.baosight.hggp.hg.kc.utils.HGKCUtils
;
import
com.baosight.hggp.hg.kc.utils.HGKCUtils
;
import
com.baosight.hggp.hg.xs.domain.Company
;
import
com.baosight.hggp.hg.xs.domain.Company
;
import
com.baosight.hggp.hg.zl.constant.HgZlConst
;
import
com.baosight.hggp.hg.zl.constant.HgZlConst
;
import
com.baosight.hggp.hg.zl.constant.HgZlSqlConst
;
import
com.baosight.hggp.hg.zl.constant.HgZlSqlConst
;
import
com.baosight.hggp.hg.zl.domain.HGZL001
;
import
com.baosight.hggp.hg.zl.domain.HGZL012
;
import
com.baosight.hggp.hg.zl.domain.HGZL012
;
import
com.baosight.hggp.hg.zl.domain.HGZL012
;
import
com.baosight.hggp.hg.zl.utils.HGZLUtils
;
import
com.baosight.hggp.hg.zl.utils.HGZLUtils
;
import
com.baosight.hggp.util.AssertUtils
;
import
com.baosight.hggp.util.AssertUtils
;
import
com.baosight.hggp.util.BeanUtils
;
import
com.baosight.hggp.util.CommonMethod
;
import
com.baosight.hggp.util.CommonMethod
;
import
com.baosight.hggp.util.DateUtils
;
import
com.baosight.hggp.util.DateUtils
;
import
com.baosight.hggp.util.EiInfoUtils
;
import
com.baosight.hggp.util.EiInfoUtils
;
...
@@ -31,7 +25,6 @@ import com.baosight.hggp.util.ObjectUtils;
...
@@ -31,7 +25,6 @@ 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.Arrays
;
import
java.util.Arrays
;
...
@@ -56,7 +49,7 @@ public class ServiceHGZL012 extends ServiceBase {
...
@@ -56,7 +49,7 @@ public class ServiceHGZL012 extends ServiceBase {
public
EiInfo
initLoad
(
EiInfo
inInfo
)
{
public
EiInfo
initLoad
(
EiInfo
inInfo
)
{
try
{
try
{
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
COMPANY_CODE_BLOCK_ID
));
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
COMPANY_CODE_BLOCK_ID
));
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
INVENT_RECORD_BLOCK_ID
));
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
INVENT_RECORD_BLOCK_ID
)
,
null
,
true
);
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
SPEC_NAME_BLOCK_ID
));
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
SPEC_NAME_BLOCK_ID
));
EiInfoUtils
.
addBlock
(
inInfo
,
"roleCompany"
,
UserSessionUtils
.
getRoleCompany
(),
Company
.
class
);
EiInfoUtils
.
addBlock
(
inInfo
,
"roleCompany"
,
UserSessionUtils
.
getRoleCompany
(),
Company
.
class
);
inInfo
.
addBlock
(
EiConstant
.
resultBlock
).
addBlockMeta
(
new
HGZL012
().
eiMetadata
);
inInfo
.
addBlock
(
EiConstant
.
resultBlock
).
addBlockMeta
(
new
HGZL012
().
eiMetadata
);
...
@@ -204,10 +197,10 @@ public class ServiceHGZL012 extends ServiceBase {
...
@@ -204,10 +197,10 @@ public class ServiceHGZL012 extends ServiceBase {
HGZL012
dbZl012
=
dbZl012Map
.
get
(
qualityNo
);
HGZL012
dbZl012
=
dbZl012Map
.
get
(
qualityNo
);
// 质检校验
// 质检校验
this
.
checkData
(
qualityNo
,
dbZl012
);
this
.
checkData
(
qualityNo
,
dbZl012
);
//
领料
信息
//
入库
信息
HGKC014A
dbKc014A
=
dbKc014AMap
.
get
(
dbZl012
.
get
Id
());
HGKC014A
dbKc014A
=
dbKc014AMap
.
get
(
dbZl012
.
get
DepositLineCode
());
AssertUtils
.
isNull
(
dbKc014A
,
String
.
format
(
"质检单【%s】关联的
领料
单【%s】不存在"
,
qualityNo
,
AssertUtils
.
isNull
(
dbKc014A
,
String
.
format
(
"质检单【%s】关联的
入库
单【%s】不存在"
,
qualityNo
,
dbZl012
.
get
Id
()));
dbZl012
.
get
DepositLineCode
()));
AssertUtils
.
isGt
(
BigDecimal
.
ZERO
,
fZl012
.
getQualityQty
(),
AssertUtils
.
isGt
(
BigDecimal
.
ZERO
,
fZl012
.
getQualityQty
(),
String
.
format
(
"质检单[%s]的合格数量【%s】不能为负数"
,
qualityNo
,
fZl012
.
getQualityQty
()));
String
.
format
(
"质检单[%s]的合格数量【%s】不能为负数"
,
qualityNo
,
fZl012
.
getQualityQty
()));
AssertUtils
.
isGt
(
BigDecimal
.
ZERO
,
fZl012
.
getUnQualityQty
(),
AssertUtils
.
isGt
(
BigDecimal
.
ZERO
,
fZl012
.
getUnQualityQty
(),
...
@@ -247,18 +240,18 @@ public class ServiceHGZL012 extends ServiceBase {
...
@@ -247,18 +240,18 @@ public class ServiceHGZL012 extends ServiceBase {
*/
*/
private
void
updateApplyDetail
(
HGZL012
fZl012
,
Map
<
Long
,
HGKC014A
>
dbKc014AMap
)
{
private
void
updateApplyDetail
(
HGZL012
fZl012
,
Map
<
Long
,
HGKC014A
>
dbKc014AMap
)
{
Long
depositLineCode
=
fZl012
.
getDepositLineCode
();
Long
depositLineCode
=
fZl012
.
getDepositLineCode
();
HGKCTools
.
HgKc014A
.
updateStatus
(
depositLineCode
,
HgKcConst
.
HgKc014
.
Status
.
S3
);
HGKCTools
.
HgKc014A
.
updateActualQty
(
depositLineCode
,
HgKcConst
.
HgKc014
.
Status
.
S3
,
fZl012
.
getQualityQty
(),
fZl012
.
getUnQualityQty
());
String
depositCode
=
fZl012
.
getDepositCode
();
String
depositCode
=
fZl012
.
getDepositCode
();
HGKCTools
.
HgKc014
.
updateStatus
(
depositCode
,
HgKcConst
.
HgKc014
.
Status
.
S3
);
HGKCTools
.
HgKc014
.
updateStatus
(
depositCode
,
HgKcConst
.
HgKc014
.
Status
.
S3
);
HGKC014A
dbKc014A
=
dbKc014AMap
.
get
(
depositLineCode
);
HGKC014A
dbKc014A
=
dbKc014AMap
.
get
(
depositLineCode
);
// 合格数量大于0增加库存
// 合格数量大于0增加库存
if
(
fZl012
.
getQualityQty
().
compareTo
(
BigDecimal
.
ZERO
)
>
0
)
{
if
(
fZl012
.
getQualityQty
().
compareTo
(
BigDecimal
.
ZERO
)
>
0
)
{
BigDecimal
qualityWeight
=
fZl012
.
getQualityQty
().
multiply
(
fZl012
.
getApplyUnitWeight
());
BigDecimal
qualityWeight
=
fZl012
.
getQualityQty
().
multiply
(
fZl012
.
getApplyUnitWeight
());
HGKCUtils
.
HgKc010
.
updateInv
(
dbKc014A
.
getCompanyCode
(),
""
,
HGKCUtils
.
HgKc010
.
updateInv
(
dbKc014A
.
getCompanyCode
(),
dbKc014A
.
getWhCode
()
,
dbKc014A
.
getProductCode
(),
fZl012
.
getQualityQty
(),
fZl012
.
getApplyUnitWeight
(),
dbKc014A
.
getProductCode
(),
fZl012
.
getQualityQty
(),
fZl012
.
getApplyUnitWeight
(),
qualityWeight
);
qualityWeight
);
}
}
}
}
/**
/**
...
...
src/main/java/com/baosight/hggp/hg/zl/service/ServiceHGZL012A.java
View file @
91991e86
...
@@ -5,6 +5,7 @@ import com.baosight.hggp.hg.dm.domain.HGDM099;
...
@@ -5,6 +5,7 @@ import com.baosight.hggp.hg.dm.domain.HGDM099;
import
com.baosight.hggp.hg.dm.utils.HgDmUtils
;
import
com.baosight.hggp.hg.dm.utils.HgDmUtils
;
import
com.baosight.hggp.hg.xs.constant.HgXsConstant
;
import
com.baosight.hggp.hg.xs.constant.HgXsConstant
;
import
com.baosight.hggp.hg.zl.domain.HGZL011
;
import
com.baosight.hggp.hg.zl.domain.HGZL011
;
import
com.baosight.hggp.hg.zl.domain.HGZL012
;
import
com.baosight.hggp.hg.zl.tools.HGZLTools
;
import
com.baosight.hggp.hg.zl.tools.HGZLTools
;
import
com.baosight.hggp.hg.zl.utils.HGZLUtils
;
import
com.baosight.hggp.hg.zl.utils.HGZLUtils
;
import
com.baosight.hggp.util.AssertUtils
;
import
com.baosight.hggp.util.AssertUtils
;
...
@@ -104,8 +105,8 @@ public class ServiceHGZL012A extends ServiceEPBase {
...
@@ -104,8 +105,8 @@ public class ServiceHGZL012A extends ServiceEPBase {
return
;
return
;
}
}
EiBlock
block
=
new
EiBlock
(
CommonConstant
.
Field
.
DETAIL
);
EiBlock
block
=
new
EiBlock
(
CommonConstant
.
Field
.
DETAIL
);
block
.
addRow
(
HGZLTools
.
HgZl01
1
.
get
(
bizId
));
block
.
addRow
(
HGZLTools
.
HgZl01
2
.
get
(
bizId
));
block
.
addBlockMeta
(
new
HGZL01
1
().
eiMetadata
);
block
.
addBlockMeta
(
new
HGZL01
2
().
eiMetadata
);
inInfo
.
setBlock
(
block
);
inInfo
.
setBlock
(
block
);
}
}
...
...
src/main/java/com/baosight/hggp/hg/zl/service/ServiceHGZL012B.java
View file @
91991e86
...
@@ -3,15 +3,13 @@ package com.baosight.hggp.hg.zl.service;
...
@@ -3,15 +3,13 @@ package com.baosight.hggp.hg.zl.service;
import
com.baosight.hggp.common.DdynamicEnum
;
import
com.baosight.hggp.common.DdynamicEnum
;
import
com.baosight.hggp.core.constant.CommonConstant
;
import
com.baosight.hggp.core.constant.CommonConstant
;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.hg.cg.domain.HGCG003B1
;
import
com.baosight.hggp.hg.constant.HGConstant
;
import
com.baosight.hggp.hg.constant.HGConstant
;
import
com.baosight.hggp.hg.kc.constant.HgKcConst
;
import
com.baosight.hggp.hg.kc.constant.HgKcConst
;
import
com.baosight.hggp.hg.kc.domain.HGKC0
08
;
import
com.baosight.hggp.hg.kc.domain.HGKC0
14
;
import
com.baosight.hggp.hg.kc.domain.HGKC0
08
A
;
import
com.baosight.hggp.hg.kc.domain.HGKC0
14
A
;
import
com.baosight.hggp.hg.kc.tools.HGKCTools
;
import
com.baosight.hggp.hg.kc.tools.HGKCTools
;
import
com.baosight.hggp.hg.kc.utils.HGKCUtils
;
import
com.baosight.hggp.hg.kc.utils.HGKCUtils
;
import
com.baosight.hggp.hg.zl.constant.HgZlConst
;
import
com.baosight.hggp.hg.zl.constant.HgZlConst
;
import
com.baosight.hggp.hg.zl.domain.HGZL011
;
import
com.baosight.hggp.hg.zl.domain.HGZL012
;
import
com.baosight.hggp.hg.zl.domain.HGZL012
;
import
com.baosight.hggp.util.AssertUtils
;
import
com.baosight.hggp.util.AssertUtils
;
import
com.baosight.hggp.util.BeanUtils
;
import
com.baosight.hggp.util.BeanUtils
;
...
@@ -31,7 +29,7 @@ import java.util.List;
...
@@ -31,7 +29,7 @@ import java.util.List;
import
java.util.Map
;
import
java.util.Map
;
/**
/**
* 选择
生产领料
单
* 选择
委外入库
单
*
*
* @author:songx
* @author:songx
* @date:2022/7/11,11:08
* @date:2022/7/11,11:08
...
@@ -51,7 +49,7 @@ public class ServiceHGZL012B extends ServiceEPBase {
...
@@ -51,7 +49,7 @@ public class ServiceHGZL012B extends ServiceEPBase {
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
SUP_RECORD_BLOCK_ID
));
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
SUP_RECORD_BLOCK_ID
));
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
INVENT_RECORD_BLOCK_ID
));
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
INVENT_RECORD_BLOCK_ID
));
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
SPEC_NAME_BLOCK_ID
));
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
SPEC_NAME_BLOCK_ID
));
inInfo
.
addBlock
(
EiConstant
.
resultBlock
).
addBlockMeta
(
new
HG
CG003B1
().
eiMetadata
);
inInfo
.
addBlock
(
EiConstant
.
resultBlock
).
addBlockMeta
(
new
HG
KC014A
().
eiMetadata
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"初始化失败"
);
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"初始化失败"
);
}
}
...
@@ -68,9 +66,8 @@ public class ServiceHGZL012B extends ServiceEPBase {
...
@@ -68,9 +66,8 @@ public class ServiceHGZL012B extends ServiceEPBase {
public
EiInfo
query
(
EiInfo
inInfo
)
{
public
EiInfo
query
(
EiInfo
inInfo
)
{
try
{
try
{
Map
queryMap
=
EiInfoUtils
.
getFirstRow
(
inInfo
);
Map
queryMap
=
EiInfoUtils
.
getFirstRow
(
inInfo
);
queryMap
.
put
(
HGKC008A
.
FIELD_STATUS
,
HgKcConst
.
HgKc008
.
Status
.
S1
);
queryMap
.
put
(
HGKC014A
.
FIELD_STATUS
,
HgKcConst
.
HgKc014
.
Status
.
S1
);
queryMap
.
put
(
"isInvQty"
,
CommonConstant
.
YesNo
.
YES_1
);
inInfo
=
super
.
query
(
inInfo
,
HGKC014A
.
QUERY
,
new
HGKC014A
());
inInfo
=
super
.
query
(
inInfo
,
HGKC008A
.
QUERY
,
new
HGKC008A
());
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"查询失败"
);
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"查询失败"
);
}
}
...
@@ -85,15 +82,15 @@ public class ServiceHGZL012B extends ServiceEPBase {
...
@@ -85,15 +82,15 @@ public class ServiceHGZL012B extends ServiceEPBase {
*/
*/
public
EiInfo
confirm
(
EiInfo
inInfo
)
{
public
EiInfo
confirm
(
EiInfo
inInfo
)
{
try
{
try
{
List
<
HGKC0
08A
>
fKc008As
=
MapUtils
.
toDaoEPBases
(
inInfo
,
HGKC008
A
.
class
);
List
<
HGKC0
14A
>
fKc014As
=
MapUtils
.
toDaoEPBases
(
inInfo
,
HGKC014
A
.
class
);
// 锁主信息和明细信息
// 锁主信息和明细信息
List
<
String
>
applyNos
=
ObjectUtils
.
listEpKey
(
fKc008As
,
HGKC008A
.
FIELD_APPLY
_CODE
);
List
<
String
>
depositCodes
=
ObjectUtils
.
listEpKey
(
fKc014As
,
HGKC014A
.
FIELD_DEPOSIT
_CODE
);
Map
<
String
,
HGKC0
08
>
dbKc008Map
=
HGKCUtils
.
HgKc008
.
lockGetData
(
applyNo
s
);
Map
<
String
,
HGKC0
14
>
dbKc014Map
=
HGKCUtils
.
HgKc014
.
lockGetData
(
depositCode
s
);
Map
<
String
,
HGKC008A
>
dbKc008AMap
=
HGKCUtils
.
HgKc008A
.
lockGetDataEp
(
fKc008
As
);
Map
<
Long
,
HGKC014A
>
dbKc014AMap
=
HGKCUtils
.
HgKc014A
.
lockGetDataEp
(
fKc014
As
);
// 数据校验
// 数据校验
this
.
checkConfirmData
(
fKc0
08As
,
dbKc008Map
,
dbKc008
AMap
);
this
.
checkConfirmData
(
fKc0
14As
,
dbKc014Map
,
dbKc014
AMap
);
// 生成巡检单
// 生成巡检单
this
.
saveConfirmData
(
fKc0
08As
,
dbKc008
AMap
);
this
.
saveConfirmData
(
fKc0
14As
,
dbKc014
AMap
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"生成质检单失败"
);
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"生成质检单失败"
);
}
}
...
@@ -103,45 +100,47 @@ public class ServiceHGZL012B extends ServiceEPBase {
...
@@ -103,45 +100,47 @@ public class ServiceHGZL012B extends ServiceEPBase {
/**
/**
* 校验数据
* 校验数据
*
*
* @param fKc0
08
As
* @param fKc0
14
As
* @param dbKc0
08
Map
* @param dbKc0
14
Map
* @param dbKc0
08
AMap
* @param dbKc0
14
AMap
*/
*/
private
void
checkConfirmData
(
List
<
HGKC0
08A
>
fKc008As
,
Map
<
String
,
HGKC008
>
dbKc008
Map
,
private
void
checkConfirmData
(
List
<
HGKC0
14A
>
fKc014As
,
Map
<
String
,
HGKC014
>
dbKc014
Map
,
Map
<
String
,
HGKC008A
>
dbKc008
AMap
)
{
Map
<
Long
,
HGKC014A
>
dbKc014
AMap
)
{
for
(
HGKC0
08A
fKc008A
:
fKc008
As
)
{
for
(
HGKC0
14A
fKc014A
:
fKc014
As
)
{
HGKC0
08
dbKc008
=
dbKc008Map
.
get
(
fKc008A
.
getApply
Code
());
HGKC0
14
dbKc014
=
dbKc014Map
.
get
(
fKc014A
.
getDeposit
Code
());
AssertUtils
.
isNull
(
dbKc0
08
,
String
.
format
(
"领料单【%s】不存在"
,
fKc008A
.
getApplyLineCode
()));
AssertUtils
.
isNull
(
dbKc0
14
,
String
.
format
(
"入库单【%s】不存在"
,
fKc014A
.
getId
()));
HGKC0
08A
dbKc008A
=
dbKc008AMap
.
get
(
fKc008A
.
getApplyLineCode
());
HGKC0
14A
dbKc014A
=
dbKc014AMap
.
get
(
fKc014A
.
getId
());
AssertUtils
.
isNull
(
dbKc0
08A
,
String
.
format
(
"领料单行【%s】不存在"
,
fKc008A
.
getApplyLineCode
()));
AssertUtils
.
isNull
(
dbKc0
14A
,
String
.
format
(
"入库单行【%s】不存在"
,
fKc014A
.
getId
()));
AssertUtils
.
isNotEquals
(
HgKcConst
.
HgKc0
08
.
Status
.
S1
,
dbKc008
A
.
getStatus
(),
AssertUtils
.
isNotEquals
(
HgKcConst
.
HgKc0
14
.
Status
.
S1
,
dbKc014
A
.
getStatus
(),
String
.
format
(
"
领料单行[%s]的状态不是\"已提交\",不允许操作"
,
fKc008A
.
getApplyLineCode
()));
String
.
format
(
"
入库单行[%s]的状态不是\"已提交\",不允许操作"
,
fKc014A
.
getId
()));
}
}
}
}
/**
/**
* 保存数据
* 保存数据
*
*
* @param fKc0
08
As
* @param fKc0
14
As
* @param dbKc0
08
AMap
* @param dbKc0
14
AMap
*/
*/
private
void
saveConfirmData
(
List
<
HGKC0
08A
>
fKc008As
,
Map
<
String
,
HGKC008A
>
dbKc008
AMap
)
{
private
void
saveConfirmData
(
List
<
HGKC0
14A
>
fKc014As
,
Map
<
Long
,
HGKC014A
>
dbKc014
AMap
)
{
for
(
HGKC0
08A
fKc008A
:
fKc008
As
)
{
for
(
HGKC0
14A
fKc014A
:
fKc014
As
)
{
HGKC0
08A
dbKc008A
=
dbKc008AMap
.
get
(
fKc008A
.
getApplyLineCode
());
HGKC0
14A
dbKc014A
=
dbKc014AMap
.
get
(
fKc014A
.
getId
());
HGZL012
newZl012
=
BeanUtils
.
copy
(
dbKc0
08
A
,
HGZL012
.
class
);
HGZL012
newZl012
=
BeanUtils
.
copy
(
dbKc0
14
A
,
HGZL012
.
class
);
newZl012
.
setQualityNo
(
SequenceGenerator
.
getNextSequence
(
HGConstant
.
SequenceId
.
WWRK_QUALITY_NO
));
newZl012
.
setQualityNo
(
SequenceGenerator
.
getNextSequence
(
HGConstant
.
SequenceId
.
WWRK_QUALITY_NO
));
newZl012
.
setQualityDate
(
DateUtils
.
shortDate
());
newZl012
.
setQualityDate
(
DateUtils
.
shortDate
());
newZl012
.
setStatus
(
HgZlConst
.
HgZl011
.
Status
.
S0
);
newZl012
.
setStatus
(
HgZlConst
.
HgZl011
.
Status
.
S0
);
newZl012
.
setDeleteFlag
(
CommonConstant
.
YesNo
.
NO_0
);
newZl012
.
setDeleteFlag
(
CommonConstant
.
YesNo
.
NO_0
);
newZl012
.
setApplyQty
(
dbKc008A
.
getInvQty
());
newZl012
.
setApplyQty
(
dbKc014A
.
getDepositQty
());
newZl012
.
setApplyUnitWeight
(
dbKc008A
.
getInvUnitWeight
());
newZl012
.
setApplyUnitWeight
(
dbKc014A
.
getDepositUnitWeight
());
newZl012
.
setApplyWeight
(
dbKc008A
.
getInvWeight
());
newZl012
.
setApplyWeight
(
dbKc014A
.
getDepositWeight
());
newZl012
.
setSpec
(
dbKc008A
.
getInvSpec
());
newZl012
.
setInventCode
(
dbKc014A
.
getProductCode
());
newZl012
.
setInventName
(
dbKc014A
.
getProductName
());
newZl012
.
setDepositLineCode
(
dbKc014A
.
getId
());
DaoUtils
.
insert
(
HGZL012
.
INSERT
,
newZl012
);
DaoUtils
.
insert
(
HGZL012
.
INSERT
,
newZl012
);
// 更新入库单状态
// 更新入库单状态
HGKCTools
.
HgKc014
.
updateStatus
(
fKc0
08A
.
getApply
Code
(),
HgKcConst
.
HgKc014
.
Status
.
S2
);
HGKCTools
.
HgKc014
.
updateStatus
(
fKc0
14A
.
getDeposit
Code
(),
HgKcConst
.
HgKc014
.
Status
.
S2
);
// 更新入库单明细状态
// 更新入库单明细状态
HGKCTools
.
HgKc014A
.
updateStatus
(
fKc0
08
A
.
getId
(),
HgKcConst
.
HgKc014
.
Status
.
S2
);
HGKCTools
.
HgKc014A
.
updateStatus
(
fKc0
14
A
.
getId
(),
HgKcConst
.
HgKc014
.
Status
.
S2
);
}
}
}
}
...
...
src/main/java/com/baosight/hggp/hg/zl/sql/HGZL012.xml
View file @
91991e86
...
@@ -211,4 +211,23 @@
...
@@ -211,4 +211,23 @@
WHERE ID = #id#
WHERE ID = #id#
</update>
</update>
<!-- 行锁 -->
<update
id=
"lock"
>
UPDATE ${hggpSchema}.HGZL012
SET CREATED_TIME = CREATED_TIME
WHERE 1=1
<include
refid=
"idCondition"
/>
</update>
<!-- 已处理 -->
<update
id=
"process"
>
UPDATE ${hggpSchema}.HGZL012
SET
STATUS = #status#,
QUALITY_QTY = #qualityQty#,
<!-- 合格数量 -->
UN_QUALITY_QTY = #unQualityQty#,
<!-- 不合格数量 -->
<include
refid=
"SqlBase.updateRevise"
/>
WHERE QUALITY_NO = #qualityNo#
</update>
</sqlMap>
</sqlMap>
src/main/resources/resources/ibatis/sqlmap-config.xml
View file @
91991e86
...
@@ -64,6 +64,7 @@
...
@@ -64,6 +64,7 @@
<sqlMap
resource=
"com/baosight/hggp/hg/kc/sql/HGKC013.xml"
/>
<sqlMap
resource=
"com/baosight/hggp/hg/kc/sql/HGKC013.xml"
/>
<sqlMap
resource=
"com/baosight/hggp/hg/kc/sql/HGKC013A.xml"
/>
<sqlMap
resource=
"com/baosight/hggp/hg/kc/sql/HGKC013A.xml"
/>
<sqlMap
resource=
"com/baosight/hggp/hg/kc/sql/HGKC014.xml"
/>
<sqlMap
resource=
"com/baosight/hggp/hg/kc/sql/HGKC014.xml"
/>
<sqlMap
resource=
"com/baosight/hggp/hg/kc/sql/HGKC014A.xml"
/>
<sqlMap
resource=
"com/baosight/hggp/hg/kc/sql/HGKC015.xml"
/>
<sqlMap
resource=
"com/baosight/hggp/hg/kc/sql/HGKC015.xml"
/>
<!-- 质量 -->
<!-- 质量 -->
...
...
src/main/webapp/HG/ZL/HGZL012.js
View file @
91991e86
...
@@ -18,7 +18,7 @@ $(function () {
...
@@ -18,7 +18,7 @@ $(function () {
template
:
function
(
item
)
{
template
:
function
(
item
)
{
if
(
!
isBlank
(
item
.
qualityNo
))
{
if
(
!
isBlank
(
item
.
qualityNo
))
{
return
'<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
return
'<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+
'onclick="showUploadFile(
\'
'
+
item
.
qualityNo
+
'
\'
,
\'
SCLL
_QUALITY_PROBLEM
\'
)" >附件清单</a>'
;
+
'onclick="showUploadFile(
\'
'
+
item
.
qualityNo
+
'
\'
,
\'
WWRK
_QUALITY_PROBLEM
\'
)" >附件清单</a>'
;
}
else
{
}
else
{
return
""
;
return
""
;
}
}
...
@@ -28,7 +28,7 @@ $(function () {
...
@@ -28,7 +28,7 @@ $(function () {
template
:
function
(
item
)
{
template
:
function
(
item
)
{
if
(
!
isBlank
(
item
.
qualityNo
))
{
if
(
!
isBlank
(
item
.
qualityNo
))
{
return
'<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
return
'<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+
'onclick="showUploadFile(
\'
'
+
item
.
qualityNo
+
'
\'
,
\'
SCLL
_QUALITY_PROCESS
\'
)" >附件清单</a>'
;
+
'onclick="showUploadFile(
\'
'
+
item
.
qualityNo
+
'
\'
,
\'
WWRK
_QUALITY_PROCESS
\'
)" >附件清单</a>'
;
}
else
{
}
else
{
return
""
;
return
""
;
}
}
...
@@ -127,7 +127,7 @@ let process = function () {
...
@@ -127,7 +127,7 @@ let process = function () {
return
;
return
;
}
}
if
((
parseFloat
(
qualityQty
)
+
parseFloat
(
unQualityQty
))
!=
parseFloat
(
applyQty
))
{
if
((
parseFloat
(
qualityQty
)
+
parseFloat
(
unQualityQty
))
!=
parseFloat
(
applyQty
))
{
message
(
"第"
+
(
i
+
1
)
+
"行合格数量加不合格数量必须等于
领料
数量"
);
message
(
"第"
+
(
i
+
1
)
+
"行合格数量加不合格数量必须等于
入库
数量"
);
return
;
return
;
}
}
}
}
...
@@ -139,12 +139,12 @@ let process = function () {
...
@@ -139,12 +139,12 @@ let process = function () {
}
}
/**
/**
* 选择
生产领料
* 选择
委外入库
*/
*/
let
select
=
function
()
{
let
select
=
function
()
{
JSColorbox
.
open
({
JSColorbox
.
open
({
href
:
"HGZL01
1
B?methodName=initLoad"
,
href
:
"HGZL01
2
B?methodName=initLoad"
,
title
:
"<div style='text-align: center;'>
生产领料
查询</div>"
,
title
:
"<div style='text-align: center;'>
委外入库
查询</div>"
,
width
:
"80%"
,
width
:
"80%"
,
height
:
"80%"
,
height
:
"80%"
,
callbackName
:
selectCallback
callbackName
:
selectCallback
...
@@ -172,7 +172,7 @@ function remove() {
...
@@ -172,7 +172,7 @@ function remove() {
}
}
JSUtils
.
confirm
(
"确定对勾选中的["
+
rows
.
length
+
"]条数据做
\"
删除
\"
操作? "
,
{
JSUtils
.
confirm
(
"确定对勾选中的["
+
rows
.
length
+
"]条数据做
\"
删除
\"
操作? "
,
{
ok
:
function
()
{
ok
:
function
()
{
JSUtils
.
submitGridsData
(
"result"
,
"HGZL01
1
"
,
"remove"
,
true
);
JSUtils
.
submitGridsData
(
"result"
,
"HGZL01
2
"
,
"remove"
,
true
);
}
}
});
});
}
}
src/main/webapp/HG/ZL/HGZL012.jsp
View file @
91991e86
...
@@ -45,18 +45,16 @@
...
@@ -45,18 +45,16 @@
</EF:EFComboColumn>
</EF:EFComboColumn>
<EF:EFColumn
ename=
"companyCode"
cname=
"公司编码"
enable=
"false"
width=
"100"
align=
"center"
hidden=
"true"
/>
<EF:EFColumn
ename=
"companyCode"
cname=
"公司编码"
enable=
"false"
width=
"100"
align=
"center"
hidden=
"true"
/>
<EF:EFColumn
ename=
"companyName"
cname=
"公司名称"
enable=
"false"
width=
"180"
align=
"center"
/>
<EF:EFColumn
ename=
"companyName"
cname=
"公司名称"
enable=
"false"
width=
"180"
align=
"center"
/>
<EF:EFColumn
ename=
"applyLineCode"
cname=
"领料单行号"
enable=
"false"
width=
"130"
align=
"center"
/>
<EF:EFColumn
ename=
"inventCode"
cname=
"存货编码"
enable=
"false"
width=
"100"
align=
"center"
hidden=
"true"
/>
<EF:EFColumn
ename=
"inventCode"
cname=
"存货编码"
enable=
"false"
width=
"100"
align=
"center"
hidden=
"true"
/>
<EF:EFColumn
ename=
"inventName"
cname=
"存货名称"
enable=
"false"
width=
"100"
align=
"center"
/>
<EF:EFColumn
ename=
"inventName"
cname=
"存货名称"
enable=
"false"
width=
"100"
align=
"center"
/>
<EF:EFColumn
ename=
"specId"
cname=
"规格ID"
enable=
"false"
width=
"100"
align=
"center"
hidden=
"true"
/>
<EF:EFColumn
ename=
"specId"
cname=
"规格ID"
enable=
"false"
width=
"100"
align=
"center"
hidden=
"true"
/>
<EF:EFColumn
ename=
"spec"
cname=
"规格"
enable=
"false"
width=
"120"
align=
"center"
/>
<EF:EFColumn
ename=
"spec"
cname=
"规格"
enable=
"false"
width=
"120"
align=
"center"
/>
<EF:EFColumn
ename=
"qualityQty"
cname=
"合格数量"
width=
"120"
align=
"right"
format=
"{0:N3}"
required=
"true"
/>
<EF:EFColumn
ename=
"qualityQty"
cname=
"合格数量"
width=
"120"
align=
"right"
format=
"{0:N3}"
required=
"true"
/>
<EF:EFColumn
ename=
"unQualityQty"
cname=
"不合格数量"
width=
"120"
align=
"right"
format=
"{0:N3}"
required=
"true"
/>
<EF:EFColumn
ename=
"unQualityQty"
cname=
"不合格数量"
width=
"120"
align=
"right"
format=
"{0:N3}"
required=
"true"
/>
<EF:EFColumn
ename=
"applyQty"
cname=
"领料数量"
enable=
"false"
width=
"120"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"applyQty"
cname=
"入库数量"
enable=
"false"
width=
"120"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"applyWeight"
cname=
"领料重量"
enable=
"false"
width=
"120"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"applyWeight"
cname=
"入库重量"
enable=
"false"
width=
"120"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"length"
cname=
"长(MM)"
enable=
"false"
width=
"80"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"depositCode"
cname=
"入库单号"
enable=
"false"
width=
"130"
align=
"center"
/>
<EF:EFColumn
ename=
"width"
cname=
"宽(MM)"
enable=
"false"
width=
"80"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"depositLineCode"
cname=
"入库单行ID"
enable=
"false"
width=
"130"
align=
"center"
/>
<EF:EFColumn
ename=
"thick"
cname=
"厚(MM)"
enable=
"false"
width=
"80"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"createdName"
cname=
"创建人"
enable=
"false"
width=
"150"
align=
"center"
/>
<EF:EFColumn
ename=
"createdName"
cname=
"创建人"
enable=
"false"
width=
"150"
align=
"center"
/>
<EF:EFColumn
ename=
"createdTime"
cname=
"创建时间"
enable=
"false"
width=
"150"
align=
"center"
<EF:EFColumn
ename=
"createdTime"
cname=
"创建时间"
enable=
"false"
width=
"150"
align=
"center"
editType=
"datetime"
parseFormats=
"['yyyyMMddHHmmss']"
dateFormat=
"yyyy-MM-dd HH:mm:ss"
/>
editType=
"datetime"
parseFormats=
"['yyyyMMddHHmmss']"
dateFormat=
"yyyy-MM-dd HH:mm:ss"
/>
...
...
src/main/webapp/HG/ZL/HGZL012B.jsp
View file @
91991e86
...
@@ -8,12 +8,12 @@
...
@@ -8,12 +8,12 @@
<EF:EFPage
title=
"委外入库查询"
>
<EF:EFPage
title=
"委外入库查询"
>
<EF:EFRegion
id=
"inqu"
title=
"查询区域"
type=
"query"
>
<EF:EFRegion
id=
"inqu"
title=
"查询区域"
type=
"query"
>
<div
class=
"row"
>
<div
class=
"row"
>
<EF:EFInput
ename=
"
depositCode"
cname=
"入库单号
"
blockId=
"inqu_status"
row=
"0"
colWidth=
"3"
/>
<EF:EFInput
ename=
"
id"
cname=
"入库单ID
"
blockId=
"inqu_status"
row=
"0"
colWidth=
"3"
/>
<EF:EFSelect
ename=
"companyCode"
cname=
"公司名称"
blockId=
"inqu_status"
row=
"0"
colWidth=
"3"
<EF:EFSelect
ename=
"companyCode"
cname=
"公司名称"
blockId=
"inqu_status"
row=
"0"
colWidth=
"3"
filter=
"contains"
optionLabel=
"全部"
defultValue=
""
>
filter=
"contains"
optionLabel=
"全部"
defultValue=
""
>
<EF:EFOptions
blockId=
"company_code_block_id"
textField=
"textField"
valueField=
"valueField"
/>
<EF:EFOptions
blockId=
"company_code_block_id"
textField=
"textField"
valueField=
"valueField"
/>
</EF:EFSelect>
</EF:EFSelect>
<EF:EFInput
ename=
"pro
jName"
cname=
"项目
名称"
blockId=
"inqu_status"
row=
"0"
colWidth=
"4"
/>
<EF:EFInput
ename=
"pro
ductName"
cname=
"存货
名称"
blockId=
"inqu_status"
row=
"0"
colWidth=
"4"
/>
</div>
</div>
</EF:EFRegion>
</EF:EFRegion>
...
@@ -26,12 +26,12 @@
...
@@ -26,12 +26,12 @@
<EF:EFCodeOption
codeName=
"hggp.hgkc.ScllStatus"
/>
<EF:EFCodeOption
codeName=
"hggp.hgkc.ScllStatus"
/>
</EF:EFComboColumn>
</EF:EFComboColumn>
<EF:EFColumn
ename=
"whCode"
cname=
"仓库编码"
hidden=
"true"
/>
<EF:EFColumn
ename=
"whCode"
cname=
"仓库编码"
hidden=
"true"
/>
<EF:EFColumn
ename=
"
inven
tCode"
cname=
"存货编码"
enable=
"true"
width=
"120"
align=
"center"
/>
<EF:EFColumn
ename=
"
produc
tCode"
cname=
"存货编码"
enable=
"true"
width=
"120"
align=
"center"
/>
<EF:EFColumn
ename=
"
inven
tName"
cname=
"存货名称"
width=
"120"
align=
"center"
enable=
"false"
/>
<EF:EFColumn
ename=
"
produc
tName"
cname=
"存货名称"
width=
"120"
align=
"center"
enable=
"false"
/>
<EF:EFColumn
ename=
"
invS
pecId"
cname=
"规格id"
hidden=
"true"
/>
<EF:EFColumn
ename=
"
s
pecId"
cname=
"规格id"
hidden=
"true"
/>
<EF:EFColumn
ename=
"
invS
pec"
cname=
"规格"
enable=
"false"
width=
"120"
align=
"center"
/>
<EF:EFColumn
ename=
"
s
pec"
cname=
"规格"
enable=
"false"
width=
"120"
align=
"center"
/>
<EF:EFColumn
ename=
"
inv
Qty"
cname=
"数量"
enable=
"false"
width=
"120"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"
deposit
Qty"
cname=
"数量"
enable=
"false"
width=
"120"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"
inv
Weight"
cname=
"重量"
enable=
"false"
width=
"100"
align=
"right"
format=
"{0:N3}"
<EF:EFColumn
ename=
"
deposit
Weight"
cname=
"重量"
enable=
"false"
width=
"100"
align=
"right"
format=
"{0:N3}"
sort=
"true"
/>
sort=
"true"
/>
</EF:EFGrid>
</EF:EFGrid>
</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