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
76369964
Commit
76369964
authored
Jun 06, 2024
by
江和松
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
生产入库工具类提交
parent
af599cb1
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
319 additions
and
32 deletions
+319
-32
HGKC003.java
src/main/java/com/baosight/hggp/hg/kc/domain/HGKC003.java
+111
-0
HGKC003A.java
src/main/java/com/baosight/hggp/hg/kc/domain/HGKC003A.java
+68
-11
HGKC003.xml
src/main/java/com/baosight/hggp/hg/kc/sql/HGKC003.xml
+0
-0
HGKC003A.xml
src/main/java/com/baosight/hggp/hg/kc/sql/HGKC003A.xml
+24
-6
HGKCTools.java
src/main/java/com/baosight/hggp/hg/kc/tools/HGKCTools.java
+103
-15
ServiceHGZL002.java
.../java/com/baosight/hggp/hg/zl/service/ServiceHGZL002.java
+5
-0
ServiceHGZL004.java
.../java/com/baosight/hggp/hg/zl/service/ServiceHGZL004.java
+2
-0
HGZL002.xml
src/main/java/com/baosight/hggp/hg/zl/sql/HGZL002.xml
+3
-0
HGZL004.xml
src/main/java/com/baosight/hggp/hg/zl/sql/HGZL004.xml
+3
-0
No files found.
src/main/java/com/baosight/hggp/hg/kc/domain/HGKC003.java
View file @
76369964
...
@@ -65,6 +65,12 @@ public class HGKC003 extends DaoEPBase {
...
@@ -65,6 +65,12 @@ public class HGKC003 extends DaoEPBase {
public
static
final
String
FIELD_PART_THICK
=
"partThick"
;
/* 零件-厚*/
public
static
final
String
FIELD_PART_THICK
=
"partThick"
;
/* 零件-厚*/
public
static
final
String
FIELD_PART_SPEC
=
"partSpec"
;
/* 零件规格*/
public
static
final
String
FIELD_PART_SPEC
=
"partSpec"
;
/* 零件规格*/
public
static
final
String
FIELD_SUBMIT_STATUS
=
"submitStatus"
;
/* 提交状态 0未提交,1已提交*/
public
static
final
String
FIELD_SUBMIT_STATUS
=
"submitStatus"
;
/* 提交状态 0未提交,1已提交*/
public
static
final
String
FIELD_PART_SPEC_ID
=
"partSpecId"
;
/* 零件规格ID*/
public
static
final
String
FIELD_RECTIFICATION_ID
=
"rectificationId"
;
/* 整改通知单ID*/
public
static
final
String
FIELD_PART_COEFFICIENT
=
"partCoefficient"
;
/* 零件系数*/
public
static
final
String
FIELD_PRICE
=
"price"
;
/* 单价*/
public
static
final
String
FIELD_AMOUNT
=
"amount"
;
/* 金额*/
public
static
final
String
FIELD_STORAGE_TYPE
=
"storageType"
;
/* 入库类型:0:入库 1:退回*/
public
static
final
String
COL_ID
=
"ID"
;
public
static
final
String
COL_ID
=
"ID"
;
public
static
final
String
COL_QUALITY_ID
=
"QUALITY_ID"
;
/* 质检单ID*/
public
static
final
String
COL_QUALITY_ID
=
"QUALITY_ID"
;
/* 质检单ID*/
...
@@ -108,6 +114,12 @@ public class HGKC003 extends DaoEPBase {
...
@@ -108,6 +114,12 @@ public class HGKC003 extends DaoEPBase {
public
static
final
String
COL_PART_THICK
=
"PART_THICK"
;
/* 零件-厚*/
public
static
final
String
COL_PART_THICK
=
"PART_THICK"
;
/* 零件-厚*/
public
static
final
String
COL_PART_SPEC
=
"PART_SPEC"
;
/* 零件规格*/
public
static
final
String
COL_PART_SPEC
=
"PART_SPEC"
;
/* 零件规格*/
public
static
final
String
COL_SUBMIT_STATUS
=
"SUBMIT_STATUS"
;
/* 提交状态 0未提交,1已提交*/
public
static
final
String
COL_SUBMIT_STATUS
=
"SUBMIT_STATUS"
;
/* 提交状态 0未提交,1已提交*/
public
static
final
String
COL_PART_SPEC_ID
=
"PART_SPEC_ID"
;
/* 零件规格ID*/
public
static
final
String
COL_RECTIFICATION_ID
=
"RECTIFICATION_ID"
;
/* 整改通知单ID*/
public
static
final
String
COL_PART_COEFFICIENT
=
"PART_COEFFICIENT"
;
/* 零件系数*/
public
static
final
String
COL_PRICE
=
"PRICE"
;
/* 单价*/
public
static
final
String
COL_AMOUNT
=
"AMOUNT"
;
/* 金额*/
public
static
final
String
COL_STORAGE_TYPE
=
"STORAGE_TYPE"
;
/* 入库类型:0:入库 1:退回*/
public
static
final
String
QUERY
=
"HGKC003.query"
;
public
static
final
String
QUERY
=
"HGKC003.query"
;
public
static
final
String
COUNT
=
"HGKC003.count"
;
public
static
final
String
COUNT
=
"HGKC003.count"
;
...
@@ -159,6 +171,12 @@ public class HGKC003 extends DaoEPBase {
...
@@ -159,6 +171,12 @@ public class HGKC003 extends DaoEPBase {
private
BigDecimal
partThick
=
new
BigDecimal
(
0.000
);
/* 零件-厚*/
private
BigDecimal
partThick
=
new
BigDecimal
(
0.000
);
/* 零件-厚*/
private
String
partSpec
=
" "
;
/* 零件规格*/
private
String
partSpec
=
" "
;
/* 零件规格*/
private
Integer
submitStatus
;
/* 提交状态 0未提交,1已提交*/
private
Integer
submitStatus
;
/* 提交状态 0未提交,1已提交*/
private
Long
partSpecId
=
new
Long
(
0
);
/* 规格id*/
private
Long
rectificationId
=
new
Long
(
0
);
/* 整改通知单id*/
private
BigDecimal
partCoefficient
=
new
BigDecimal
(
0.000
);
/* 零件-系数*/
private
BigDecimal
price
=
new
BigDecimal
(
"0"
);
/* 单价*/
private
BigDecimal
amount
=
new
BigDecimal
(
"0"
);
/* 金额*/
private
Boolean
storageType
;
/* 入库类型:0:入库 1:退回*/
/**
/**
* initialize the metadata.
* initialize the metadata.
...
@@ -362,6 +380,39 @@ public class HGKC003 extends DaoEPBase {
...
@@ -362,6 +380,39 @@ public class HGKC003 extends DaoEPBase {
eiColumn
.
setDescName
(
"提交状态"
);
eiColumn
.
setDescName
(
"提交状态"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_PART_SPEC_ID
);
eiColumn
.
setDescName
(
"零件规格ID"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_RECTIFICATION_ID
);
eiColumn
.
setDescName
(
"整改通知单ID"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_PART_COEFFICIENT
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
3
);
eiColumn
.
setFieldLength
(
12
);
eiColumn
.
setDescName
(
"零件-系数"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_PRICE
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
3
);
eiColumn
.
setFieldLength
(
12
);
eiColumn
.
setDescName
(
"单价"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_AMOUNT
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
3
);
eiColumn
.
setFieldLength
(
12
);
eiColumn
.
setDescName
(
"金额"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_STORAGE_TYPE
);
eiColumn
.
setDescName
(
"入库类型:0:入库 1:退回"
);
eiMetadata
.
addMeta
(
eiColumn
);
}
}
...
@@ -1029,6 +1080,54 @@ public class HGKC003 extends DaoEPBase {
...
@@ -1029,6 +1080,54 @@ public class HGKC003 extends DaoEPBase {
this
.
qualityId
=
qualityId
;
this
.
qualityId
=
qualityId
;
}
}
public
Long
getPartSpecId
()
{
return
partSpecId
;
}
public
void
setPartSpecId
(
Long
partSpecId
)
{
this
.
partSpecId
=
partSpecId
;
}
public
Long
getRectificationId
()
{
return
rectificationId
;
}
public
void
setRectificationId
(
Long
rectificationId
)
{
this
.
rectificationId
=
rectificationId
;
}
public
BigDecimal
getPartCoefficient
()
{
return
partCoefficient
;
}
public
void
setPartCoefficient
(
BigDecimal
partCoefficient
)
{
this
.
partCoefficient
=
partCoefficient
;
}
public
BigDecimal
getPrice
()
{
return
price
;
}
public
void
setPrice
(
BigDecimal
price
)
{
this
.
price
=
price
;
}
public
BigDecimal
getAmount
()
{
return
amount
;
}
public
void
setAmount
(
BigDecimal
amount
)
{
this
.
amount
=
amount
;
}
public
Boolean
getStorageType
()
{
return
storageType
;
}
public
void
setStorageType
(
Boolean
storageType
)
{
this
.
storageType
=
storageType
;
}
/**
/**
* get the value from Map.
* get the value from Map.
*
*
...
@@ -1079,6 +1178,12 @@ public class HGKC003 extends DaoEPBase {
...
@@ -1079,6 +1178,12 @@ public class HGKC003 extends DaoEPBase {
setPartThick
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PART_THICK
)),
partThick
));
setPartThick
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PART_THICK
)),
partThick
));
setPartSpec
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PART_SPEC
)),
partSpec
));
setPartSpec
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PART_SPEC
)),
partSpec
));
setSubmitStatus
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_SUBMIT_STATUS
)),
submitStatus
));
setSubmitStatus
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_SUBMIT_STATUS
)),
submitStatus
));
setPartSpecId
(
NumberUtils
.
toLong
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PART_SPEC_ID
)),
partSpecId
));
setRectificationId
(
NumberUtils
.
toLong
(
StringUtils
.
toString
(
map
.
get
(
FIELD_RECTIFICATION_ID
)),
rectificationId
));
setPartCoefficient
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PART_COEFFICIENT
)),
partCoefficient
));
setPrice
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PRICE
)),
price
));
setAmount
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_AMOUNT
)),
amount
));
setStorageType
(
NumberUtils
.
toBoolean
(
StringUtils
.
toString
(
map
.
get
(
FIELD_STORAGE_TYPE
)),
storageType
));
}
}
/**
/**
...
@@ -1130,6 +1235,12 @@ public class HGKC003 extends DaoEPBase {
...
@@ -1130,6 +1235,12 @@ public class HGKC003 extends DaoEPBase {
map
.
put
(
FIELD_PART_THICK
,
StringUtils
.
toString
(
partThick
,
eiMetadata
.
getMeta
(
FIELD_PART_THICK
)));
map
.
put
(
FIELD_PART_THICK
,
StringUtils
.
toString
(
partThick
,
eiMetadata
.
getMeta
(
FIELD_PART_THICK
)));
map
.
put
(
FIELD_PART_SPEC
,
StringUtils
.
toString
(
partSpec
,
eiMetadata
.
getMeta
(
FIELD_PART_SPEC
)));
map
.
put
(
FIELD_PART_SPEC
,
StringUtils
.
toString
(
partSpec
,
eiMetadata
.
getMeta
(
FIELD_PART_SPEC
)));
map
.
put
(
FIELD_SUBMIT_STATUS
,
StringUtils
.
toString
(
submitStatus
,
eiMetadata
.
getMeta
(
FIELD_SUBMIT_STATUS
)));
map
.
put
(
FIELD_SUBMIT_STATUS
,
StringUtils
.
toString
(
submitStatus
,
eiMetadata
.
getMeta
(
FIELD_SUBMIT_STATUS
)));
map
.
put
(
FIELD_PART_SPEC_ID
,
StringUtils
.
toString
(
partSpecId
,
eiMetadata
.
getMeta
(
FIELD_PART_SPEC_ID
)));
map
.
put
(
FIELD_RECTIFICATION_ID
,
StringUtils
.
toString
(
rectificationId
,
eiMetadata
.
getMeta
(
FIELD_RECTIFICATION_ID
)));
map
.
put
(
FIELD_PART_COEFFICIENT
,
StringUtils
.
toString
(
partCoefficient
,
eiMetadata
.
getMeta
(
FIELD_PART_COEFFICIENT
)));
map
.
put
(
FIELD_PRICE
,
StringUtils
.
toString
(
price
,
eiMetadata
.
getMeta
(
FIELD_PRICE
)));
map
.
put
(
FIELD_AMOUNT
,
StringUtils
.
toString
(
amount
,
eiMetadata
.
getMeta
(
FIELD_AMOUNT
)));
map
.
put
(
FIELD_STORAGE_TYPE
,
StringUtils
.
toString
(
storageType
,
eiMetadata
.
getMeta
(
FIELD_STORAGE_TYPE
)));
return
map
;
return
map
;
}
}
...
...
src/main/java/com/baosight/hggp/hg/kc/domain/HGKC003A.java
View file @
76369964
...
@@ -23,7 +23,6 @@ public class HGKC003A extends DaoEPBase {
...
@@ -23,7 +23,6 @@ public class HGKC003A extends DaoEPBase {
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
public
static
final
String
FIELD_ID
=
"id"
;
public
static
final
String
FIELD_ID
=
"id"
;
public
static
final
String
FIELD_QUALITY_DETAIL_ID
=
"qualityDetailId"
;
/* 质检单明细ID*/
public
static
final
String
FIELD_ACCOUNT_CODE
=
"accountCode"
;
/* 企业编码*/
public
static
final
String
FIELD_ACCOUNT_CODE
=
"accountCode"
;
/* 企业编码*/
public
static
final
String
FIELD_DEP_CODE
=
"depCode"
;
/* 部门编码*/
public
static
final
String
FIELD_DEP_CODE
=
"depCode"
;
/* 部门编码*/
public
static
final
String
FIELD_CREATED_BY
=
"createdBy"
;
/* 记录创建者*/
public
static
final
String
FIELD_CREATED_BY
=
"createdBy"
;
/* 记录创建者*/
...
@@ -67,9 +66,13 @@ public class HGKC003A extends DaoEPBase {
...
@@ -67,9 +66,13 @@ public class HGKC003A extends DaoEPBase {
public
static
final
String
FIELD_PRICE
=
"price"
;
/* 单价*/
public
static
final
String
FIELD_PRICE
=
"price"
;
/* 单价*/
public
static
final
String
FIELD_AMOUNT
=
"amount"
;
/* 金额*/
public
static
final
String
FIELD_AMOUNT
=
"amount"
;
/* 金额*/
public
static
final
String
FIELD_STORAGE_TYPE
=
"storageType"
;
/* 入库类型:0:入库 1:退回*/
public
static
final
String
FIELD_STORAGE_TYPE
=
"storageType"
;
/* 入库类型:0:入库 1:退回*/
public
static
final
String
FIELD_QUALITY_ID
=
"qualityId"
;
/* 质检单ID*/
public
static
final
String
FIELD_PART_SPEC_ID
=
"partSpecId"
;
/* 零件规格ID*/
public
static
final
String
FIELD_RECTIFICATION_ID
=
"rectificationId"
;
/* 整改通知单ID*/
public
static
final
String
FIELD_PART_COEFFICIENT
=
"partCoefficient"
;
/* 零件系数*/
public
static
final
String
COL_ID
=
"ID"
;
public
static
final
String
COL_ID
=
"ID"
;
public
static
final
String
COL_QUALITY_
DETAIL_ID
=
"QUALITY_DETAIL_ID"
;
/* 质检单明细
ID*/
public
static
final
String
COL_QUALITY_
ID
=
"QUALITY_ID"
;
/* 质检单
ID*/
public
static
final
String
COL_ACCOUNT_CODE
=
"ACCOUNT_CODE"
;
/* 企业编码*/
public
static
final
String
COL_ACCOUNT_CODE
=
"ACCOUNT_CODE"
;
/* 企业编码*/
public
static
final
String
COL_DEP_CODE
=
"DEP_CODE"
;
/* 部门编码*/
public
static
final
String
COL_DEP_CODE
=
"DEP_CODE"
;
/* 部门编码*/
public
static
final
String
COL_CREATED_BY
=
"CREATED_BY"
;
/* 记录创建者*/
public
static
final
String
COL_CREATED_BY
=
"CREATED_BY"
;
/* 记录创建者*/
...
@@ -114,6 +117,10 @@ public class HGKC003A extends DaoEPBase {
...
@@ -114,6 +117,10 @@ public class HGKC003A extends DaoEPBase {
public
static
final
String
COL_AMOUNT
=
"AMOUNT"
;
/* 金额*/
public
static
final
String
COL_AMOUNT
=
"AMOUNT"
;
/* 金额*/
public
static
final
String
COL_STORAGE_TYPE
=
"STORAGE_TYPE"
;
/* 入库类型:0:入库 1:退回*/
public
static
final
String
COL_STORAGE_TYPE
=
"STORAGE_TYPE"
;
/* 入库类型:0:入库 1:退回*/
public
static
final
String
COL_PART_SPEC_ID
=
"PART_SPEC_ID"
;
/* 零件规格ID*/
public
static
final
String
COL_RECTIFICATION_ID
=
"RECTIFICATION_ID"
;
/* 整改通知单ID*/
public
static
final
String
COL_PART_COEFFICIENT
=
"PART_COEFFICIENT"
;
/* 零件系数*/
public
static
final
String
QUERY
=
"HGKC003A.query"
;
public
static
final
String
QUERY
=
"HGKC003A.query"
;
public
static
final
String
COUNT
=
"HGKC003A.count"
;
public
static
final
String
COUNT
=
"HGKC003A.count"
;
public
static
final
String
INSERT
=
"HGKC003A.insert"
;
public
static
final
String
INSERT
=
"HGKC003A.insert"
;
...
@@ -122,7 +129,7 @@ public class HGKC003A extends DaoEPBase {
...
@@ -122,7 +129,7 @@ public class HGKC003A extends DaoEPBase {
public
static
final
String
BATCH_DELETE
=
"HGKC003A.batchDelete"
;
public
static
final
String
BATCH_DELETE
=
"HGKC003A.batchDelete"
;
private
Long
id
=
new
Long
(
0
);
private
Long
id
=
new
Long
(
0
);
private
Long
quality
DetailId
=
new
Long
(
0
);
/* 质检单明细
ID*/
private
Long
quality
Id
=
new
Long
(
0
);
/* 质检单
ID*/
private
String
accountCode
=
" "
;
/* 企业编码*/
private
String
accountCode
=
" "
;
/* 企业编码*/
private
String
depCode
=
" "
;
/* 部门编码*/
private
String
depCode
=
" "
;
/* 部门编码*/
private
String
createdBy
=
" "
;
/* 记录创建者*/
private
String
createdBy
=
" "
;
/* 记录创建者*/
...
@@ -167,6 +174,11 @@ public class HGKC003A extends DaoEPBase {
...
@@ -167,6 +174,11 @@ public class HGKC003A extends DaoEPBase {
private
BigDecimal
amount
=
new
BigDecimal
(
"0"
);
/* 金额*/
private
BigDecimal
amount
=
new
BigDecimal
(
"0"
);
/* 金额*/
private
Boolean
storageType
;
/* 入库类型:0:入库 1:退回*/
private
Boolean
storageType
;
/* 入库类型:0:入库 1:退回*/
private
Long
partSpecId
=
new
Long
(
0
);
/* 规格id*/
private
Long
rectificationId
=
new
Long
(
0
);
/* 整改通知单id*/
private
BigDecimal
partCoefficient
=
new
BigDecimal
(
0.000
);
/* 零件-系数*/
/**
/**
* initialize the metadata.
* initialize the metadata.
*/
*/
...
@@ -178,8 +190,8 @@ public class HGKC003A extends DaoEPBase {
...
@@ -178,8 +190,8 @@ public class HGKC003A extends DaoEPBase {
eiColumn
.
setDescName
(
" "
);
eiColumn
.
setDescName
(
" "
);
eiMetadata
.
addMeta
(
eiColumn
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_QUALITY_
DETAIL_
ID
);
eiColumn
=
new
EiColumn
(
FIELD_QUALITY_ID
);
eiColumn
.
setDescName
(
"质检单
明细
ID"
);
eiColumn
.
setDescName
(
"质检单ID"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_ACCOUNT_CODE
);
eiColumn
=
new
EiColumn
(
FIELD_ACCOUNT_CODE
);
...
@@ -387,6 +399,21 @@ public class HGKC003A extends DaoEPBase {
...
@@ -387,6 +399,21 @@ public class HGKC003A extends DaoEPBase {
eiColumn
.
setDescName
(
"入库类型:0:入库 1:退回"
);
eiColumn
.
setDescName
(
"入库类型:0:入库 1:退回"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_PART_SPEC_ID
);
eiColumn
.
setDescName
(
"零件规格ID"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_RECTIFICATION_ID
);
eiColumn
.
setDescName
(
"整改通知单ID"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_PART_COEFFICIENT
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
3
);
eiColumn
.
setFieldLength
(
12
);
eiColumn
.
setDescName
(
"零件-系数"
);
eiMetadata
.
addMeta
(
eiColumn
);
}
}
...
@@ -1102,12 +1129,36 @@ public class HGKC003A extends DaoEPBase {
...
@@ -1102,12 +1129,36 @@ public class HGKC003A extends DaoEPBase {
this
.
storageType
=
storageType
;
this
.
storageType
=
storageType
;
}
}
public
Long
getQualityDetailId
()
{
public
Long
getQualityId
()
{
return
qualityDetailId
;
return
qualityId
;
}
public
void
setQualityId
(
Long
qualityId
)
{
this
.
qualityId
=
qualityId
;
}
public
Long
getPartSpecId
()
{
return
partSpecId
;
}
public
void
setPartSpecId
(
Long
partSpecId
)
{
this
.
partSpecId
=
partSpecId
;
}
public
Long
getRectificationId
()
{
return
rectificationId
;
}
public
void
setRectificationId
(
Long
rectificationId
)
{
this
.
rectificationId
=
rectificationId
;
}
public
BigDecimal
getPartCoefficient
()
{
return
partCoefficient
;
}
}
public
void
set
QualityDetailId
(
Long
qualityDetailId
)
{
public
void
set
PartCoefficient
(
BigDecimal
partCoefficient
)
{
this
.
qualityDetailId
=
qualityDetailId
;
this
.
partCoefficient
=
partCoefficient
;
}
}
/**
/**
...
@@ -1119,7 +1170,7 @@ public class HGKC003A extends DaoEPBase {
...
@@ -1119,7 +1170,7 @@ public class HGKC003A extends DaoEPBase {
public
void
fromMap
(
Map
map
)
{
public
void
fromMap
(
Map
map
)
{
setId
(
NumberUtils
.
toLong
(
StringUtils
.
toString
(
map
.
get
(
FIELD_ID
)),
id
));
setId
(
NumberUtils
.
toLong
(
StringUtils
.
toString
(
map
.
get
(
FIELD_ID
)),
id
));
setQuality
DetailId
(
NumberUtils
.
toLong
(
StringUtils
.
toString
(
map
.
get
(
FIELD_QUALITY_DETAIL_ID
)),
qualityDetail
Id
));
setQuality
Id
(
NumberUtils
.
toLong
(
StringUtils
.
toString
(
map
.
get
(
FIELD_QUALITY_ID
)),
quality
Id
));
setAccountCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_ACCOUNT_CODE
)),
accountCode
));
setAccountCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_ACCOUNT_CODE
)),
accountCode
));
setDepCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_DEP_CODE
)),
depCode
));
setDepCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_DEP_CODE
)),
depCode
));
setCreatedBy
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_CREATED_BY
)),
createdBy
));
setCreatedBy
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_CREATED_BY
)),
createdBy
));
...
@@ -1163,6 +1214,9 @@ public class HGKC003A extends DaoEPBase {
...
@@ -1163,6 +1214,9 @@ public class HGKC003A extends DaoEPBase {
setPrice
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PRICE
)),
price
));
setPrice
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PRICE
)),
price
));
setAmount
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_AMOUNT
)),
amount
));
setAmount
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_AMOUNT
)),
amount
));
setStorageType
(
NumberUtils
.
toBoolean
(
StringUtils
.
toString
(
map
.
get
(
FIELD_STORAGE_TYPE
)),
storageType
));
setStorageType
(
NumberUtils
.
toBoolean
(
StringUtils
.
toString
(
map
.
get
(
FIELD_STORAGE_TYPE
)),
storageType
));
setPartSpecId
(
NumberUtils
.
toLong
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PART_SPEC_ID
)),
partSpecId
));
setRectificationId
(
NumberUtils
.
toLong
(
StringUtils
.
toString
(
map
.
get
(
FIELD_RECTIFICATION_ID
)),
rectificationId
));
setPartCoefficient
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PART_COEFFICIENT
)),
partCoefficient
));
}
}
/**
/**
...
@@ -1173,7 +1227,7 @@ public class HGKC003A extends DaoEPBase {
...
@@ -1173,7 +1227,7 @@ public class HGKC003A extends DaoEPBase {
Map
map
=
new
HashMap
();
Map
map
=
new
HashMap
();
map
.
put
(
FIELD_ID
,
StringUtils
.
toString
(
id
,
eiMetadata
.
getMeta
(
FIELD_ID
)));
map
.
put
(
FIELD_ID
,
StringUtils
.
toString
(
id
,
eiMetadata
.
getMeta
(
FIELD_ID
)));
map
.
put
(
FIELD_QUALITY_
DETAIL_ID
,
StringUtils
.
toString
(
qualityDetailId
,
eiMetadata
.
getMeta
(
FIELD_QUALITY_DETAIL
_ID
)));
map
.
put
(
FIELD_QUALITY_
ID
,
StringUtils
.
toString
(
qualityId
,
eiMetadata
.
getMeta
(
FIELD_QUALITY
_ID
)));
map
.
put
(
FIELD_ACCOUNT_CODE
,
StringUtils
.
toString
(
accountCode
,
eiMetadata
.
getMeta
(
FIELD_ACCOUNT_CODE
)));
map
.
put
(
FIELD_ACCOUNT_CODE
,
StringUtils
.
toString
(
accountCode
,
eiMetadata
.
getMeta
(
FIELD_ACCOUNT_CODE
)));
map
.
put
(
FIELD_DEP_CODE
,
StringUtils
.
toString
(
depCode
,
eiMetadata
.
getMeta
(
FIELD_DEP_CODE
)));
map
.
put
(
FIELD_DEP_CODE
,
StringUtils
.
toString
(
depCode
,
eiMetadata
.
getMeta
(
FIELD_DEP_CODE
)));
map
.
put
(
FIELD_CREATED_BY
,
StringUtils
.
toString
(
createdBy
,
eiMetadata
.
getMeta
(
FIELD_CREATED_BY
)));
map
.
put
(
FIELD_CREATED_BY
,
StringUtils
.
toString
(
createdBy
,
eiMetadata
.
getMeta
(
FIELD_CREATED_BY
)));
...
@@ -1217,6 +1271,9 @@ public class HGKC003A extends DaoEPBase {
...
@@ -1217,6 +1271,9 @@ public class HGKC003A extends DaoEPBase {
map
.
put
(
FIELD_PRICE
,
StringUtils
.
toString
(
price
,
eiMetadata
.
getMeta
(
FIELD_PRICE
)));
map
.
put
(
FIELD_PRICE
,
StringUtils
.
toString
(
price
,
eiMetadata
.
getMeta
(
FIELD_PRICE
)));
map
.
put
(
FIELD_AMOUNT
,
StringUtils
.
toString
(
amount
,
eiMetadata
.
getMeta
(
FIELD_AMOUNT
)));
map
.
put
(
FIELD_AMOUNT
,
StringUtils
.
toString
(
amount
,
eiMetadata
.
getMeta
(
FIELD_AMOUNT
)));
map
.
put
(
FIELD_STORAGE_TYPE
,
StringUtils
.
toString
(
storageType
,
eiMetadata
.
getMeta
(
FIELD_STORAGE_TYPE
)));
map
.
put
(
FIELD_STORAGE_TYPE
,
StringUtils
.
toString
(
storageType
,
eiMetadata
.
getMeta
(
FIELD_STORAGE_TYPE
)));
map
.
put
(
FIELD_PART_SPEC_ID
,
StringUtils
.
toString
(
partSpecId
,
eiMetadata
.
getMeta
(
FIELD_PART_SPEC_ID
)));
map
.
put
(
FIELD_RECTIFICATION_ID
,
StringUtils
.
toString
(
rectificationId
,
eiMetadata
.
getMeta
(
FIELD_RECTIFICATION_ID
)));
map
.
put
(
FIELD_PART_COEFFICIENT
,
StringUtils
.
toString
(
partCoefficient
,
eiMetadata
.
getMeta
(
FIELD_PART_COEFFICIENT
)));
return
map
;
return
map
;
}
}
...
...
src/main/java/com/baosight/hggp/hg/kc/sql/HGKC003.xml
View file @
76369964
This diff is collapsed.
Click to expand it.
src/main/java/com/baosight/hggp/hg/kc/sql/HGKC003A.xml
View file @
76369964
...
@@ -135,8 +135,17 @@
...
@@ -135,8 +135,17 @@
<isNotEmpty
prepend=
" AND "
property=
"storageType"
>
<isNotEmpty
prepend=
" AND "
property=
"storageType"
>
STORAGE_TYPE = #storageType#
STORAGE_TYPE = #storageType#
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"qualityDetailId"
>
<isNotEmpty
prepend=
" AND "
property=
"qualityId"
>
QUALITY_DETAIL_ID = #qualityDetailId#
QUALITY_ID = #qualityId#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"partSpecId"
>
PART_SPEC_ID = #partSpecId#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"rectificationId"
>
RECTIFICATION_ID = #rectificationId#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"partCoefficient"
>
PART_COEFFICIENT = #partCoefficient#
</isNotEmpty>
</isNotEmpty>
</sql>
</sql>
...
@@ -144,7 +153,10 @@
...
@@ -144,7 +153,10 @@
resultClass=
"com.baosight.hggp.hg.kc.domain.HGKC003A"
>
resultClass=
"com.baosight.hggp.hg.kc.domain.HGKC003A"
>
SELECT
SELECT
ID as "id",
ID as "id",
QUALITY_DETAIL_ID as "qualityDetailId",
<!-- 质检单明细ID -->
QUALITY_ID as "qualityId",
<!-- 质检单明细ID -->
RECTIFICATION_ID as "rectificationId",
<!-- 整改通知单ID -->
PART_SPEC_ID as "partSpecId",
<!-- 零件规格ID -->
PART_COEFFICIENT as "partCoefficient",
<!-- 零件系数 -->
ACCOUNT_CODE as "accountCode",
<!-- 企业编码 -->
ACCOUNT_CODE as "accountCode",
<!-- 企业编码 -->
DEP_CODE as "depCode",
<!-- 部门编码 -->
DEP_CODE as "depCode",
<!-- 部门编码 -->
CREATED_BY as "createdBy",
<!-- 记录创建者 -->
CREATED_BY as "createdBy",
<!-- 记录创建者 -->
...
@@ -209,7 +221,10 @@
...
@@ -209,7 +221,10 @@
<insert
id=
"insert"
>
<insert
id=
"insert"
>
INSERT INTO ${hggpSchema}.HGKC003A (
INSERT INTO ${hggpSchema}.HGKC003A (
QUALITY_DETAIL_ID,
<!-- 企业编码 -->
QUALITY_ID,
<!-- 质检单ID -->
RECTIFICATION_ID,
<!-- 整改通知单ID -->
PART_SPEC_ID,
<!-- 零件规格ID -->
PART_COEFFICIENT,
<!-- 零件系数 -->
ACCOUNT_CODE,
<!-- 企业编码 -->
ACCOUNT_CODE,
<!-- 企业编码 -->
DEP_CODE,
<!-- 部门编码 -->
DEP_CODE,
<!-- 部门编码 -->
CREATED_BY,
<!-- 记录创建者 -->
CREATED_BY,
<!-- 记录创建者 -->
...
@@ -254,7 +269,7 @@
...
@@ -254,7 +269,7 @@
AMOUNT,
<!-- 金额 -->
AMOUNT,
<!-- 金额 -->
STORAGE_TYPE
<!-- 入库类型:0:入库 1:退回 -->
STORAGE_TYPE
<!-- 入库类型:0:入库 1:退回 -->
)
)
VALUES (#quality
DetailId
#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #companyCode#, #companyName#, #depositDate#, #depositNo#, #whCode#, #whName#, #invQty#, #invUnitWeight#, #invWeight#, #depositNoOld#, #remark#, #factoryCode#, #prodOrderNo#, #prodTaskNo#, #projCode#, #projName#, #prdtType#, #prdtCode#, #prdtName#, #prdtLength#, #prdtWidth#, #prdtThick#, #prdtSpec#, #partType#, #partCode#, #partName#, #partLength#, #partWidth#, #partThick#, #partSpec#, #primaryId#, #price#, #amount#, #storageType#)
VALUES (#quality
Id#,#partSpecId#,#rectificationId#,#partCoefficient
#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #companyCode#, #companyName#, #depositDate#, #depositNo#, #whCode#, #whName#, #invQty#, #invUnitWeight#, #invWeight#, #depositNoOld#, #remark#, #factoryCode#, #prodOrderNo#, #prodTaskNo#, #projCode#, #projName#, #prdtType#, #prdtCode#, #prdtName#, #prdtLength#, #prdtWidth#, #prdtThick#, #prdtSpec#, #partType#, #partCode#, #partName#, #partLength#, #partWidth#, #partThick#, #partSpec#, #primaryId#, #price#, #amount#, #storageType#)
</insert>
</insert>
<delete
id=
"delete"
>
<delete
id=
"delete"
>
...
@@ -270,7 +285,10 @@
...
@@ -270,7 +285,10 @@
<update
id=
"update"
>
<update
id=
"update"
>
UPDATE ${hggpSchema}.HGKC003A
UPDATE ${hggpSchema}.HGKC003A
SET
SET
QUALITY_DETAIL_ID = #qualityDetailId#,
<!-- 企业编码 -->
QUALITY_ID = #qualityId#,
<!-- 质检单ID -->
RECTIFICATION_ID = #rectificationId#,
<!-- 整改通知单ID -->
PART_SPEC_ID = #partSpecId#,
<!-- 零件规格ID -->
PART_COEFFICIENT = #partCoefficient#,
<!-- 零件系数 -->
ACCOUNT_CODE = #accountCode#,
<!-- 企业编码 -->
ACCOUNT_CODE = #accountCode#,
<!-- 企业编码 -->
DEP_CODE = #depCode#,
<!-- 部门编码 -->
DEP_CODE = #depCode#,
<!-- 部门编码 -->
CREATED_BY = #createdBy#,
<!-- 记录创建者 -->
CREATED_BY = #createdBy#,
<!-- 记录创建者 -->
...
...
src/main/java/com/baosight/hggp/hg/kc/tools/HGKCTools.java
View file @
76369964
package
com
.
baosight
.
hggp
.
hg
.
kc
.
tools
;
package
com
.
baosight
.
hggp
.
hg
.
kc
.
tools
;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.core.collection.CollectionUtil
;
import
com.baosight.hggp.common.CheckTypeEnum
;
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.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.domain.*
;
import
com.baosight.hggp.hg.kc.domain.*
;
import
com.baosight.hggp.hg.pz.domain.HGPZ005
;
import
com.baosight.hggp.hg.pz.tools.HGPZTools
;
import
com.baosight.hggp.hg.zl.domain.HGZL002
;
import
com.baosight.hggp.hg.zl.domain.HGZL004
;
import
com.baosight.hggp.util.AssertUtils
;
import
com.baosight.hggp.util.AssertUtils
;
import
com.baosight.hggp.util.StringUtils
;
import
com.baosight.hggp.util.StringUtils
;
import
com.baosight.iplat4j.ed.util.SequenceGenerator
;
import
com.baosight.iplat4j.ed.util.SequenceGenerator
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.CollectionUtils
;
import
java.math.BigDecimal
;
import
java.util.*
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -145,21 +151,103 @@ public class HGKCTools {
...
@@ -145,21 +151,103 @@ public class HGKCTools {
private
static
void
checkSaveData
(
HGKC003
hgkc003
,
List
<
HGKC003A
>
hgkc003aList
)
{
private
static
void
checkSaveData
(
HGKC003
hgkc003
,
List
<
HGKC003A
>
hgkc003aList
)
{
AssertUtils
.
isEmpty
(
hgkc003
.
getCompanyCode
(),
"公司编码不能为空!"
);
AssertUtils
.
isEmpty
(
hgkc003
.
getCompanyCode
(),
"公司编码不能为空!"
);
AssertUtils
.
isEmpty
(
hgkc003
.
getCompanyName
(),
"公司名称不能为空!"
);
AssertUtils
.
isEmpty
(
hgkc003
.
getCompanyName
(),
"公司名称不能为空!"
);
AssertUtils
.
isEmpty
(
hgkc003
.
getWhCode
(),
"仓库编码不能为空!"
);
AssertUtils
.
isEmpty
(
hgkc003
.
getWhName
(),
"仓库名称不能为空!"
);
AssertUtils
.
isEmpty
(
hgkc003
.
getProjCode
(),
"项目编号不能为空!"
);
AssertUtils
.
isEmpty
(
hgkc003
.
getProjCode
(),
"项目编号不能为空!"
);
AssertUtils
.
isEmpty
(
hgkc003
.
getProjName
(),
"项目名称不能为空!"
);
AssertUtils
.
isEmpty
(
hgkc003
.
getProjName
(),
"项目名称不能为空!"
);
AssertUtils
.
isTrue
(
Objects
.
isNull
(
hgkc003
.
getQualityId
())||
hgkc003
.
getQualityId
()<=
0
,
"质检单ID不能为空!"
);
AssertUtils
.
isTrue
(
Objects
.
isNull
(
hgkc003
.
getQualityId
())||
hgkc003
.
getQualityId
()<=
0
,
"质检单ID不能为空!"
);
for
(
HGKC003A
hgkc003a
:
hgkc003aList
){
}
AssertUtils
.
isEmpty
(
hgkc003a
.
getCompanyCode
(),
"公司编码不能为空!"
);
AssertUtils
.
isEmpty
(
hgkc003a
.
getCompanyName
(),
"公司名称不能为空!"
);
/**
AssertUtils
.
isEmpty
(
hgkc003a
.
getProjCode
(),
"项目编号不能为空!"
);
* 校验生产入库信息,整改单就不用校验了
AssertUtils
.
isEmpty
(
hgkc003a
.
getProjName
(),
"项目名称不能为空!"
);
* @param hgzl002List
AssertUtils
.
isEmpty
(
hgkc003a
.
getWhCode
(),
"仓库编码不能为空!"
);
*/
AssertUtils
.
isEmpty
(
hgkc003a
.
getWhName
(),
"仓库名称不能为空!"
);
public
static
void
putInStorageCheckData
(
List
<
HGZL002
>
hgzl002List
)
{
AssertUtils
.
isEmpty
(
hgkc003a
.
getPrdtCode
(),
"存货编码不能为空!"
);
for
(
HGZL002
hgzl002
:
hgzl002List
){
AssertUtils
.
isEmpty
(
hgkc003a
.
getPrdtName
(),
"存货名称不能为空!"
);
AssertUtils
.
isTrue
(
hgzl002
.
getPassQuantity
().
compareTo
(
0
)
<=
0
,
"合格数量小于等于0!"
);
AssertUtils
.
isTrue
(
Objects
.
isNull
(
hgkc003a
.
getQualityDetailId
())||
hgkc003a
.
getQualityDetailId
()<=
0
,
"质检单明细ID不能为空!"
);
AssertUtils
.
isEmpty
(
hgzl002
.
getCompanyCode
(),
"公司编码不能为空!"
);
AssertUtils
.
isEmpty
(
hgzl002
.
getCompanyName
(),
"公司名称不能为空!"
);
AssertUtils
.
isEmpty
(
hgzl002
.
getProjCode
(),
"项目编号不能为空!"
);
AssertUtils
.
isEmpty
(
hgzl002
.
getProjName
(),
"项目名称不能为空!"
);
AssertUtils
.
isEmpty
(
hgzl002
.
getProductCode
(),
"存货编码不能为空!"
);
AssertUtils
.
isEmpty
(
hgzl002
.
getProductName
(),
"存货名称不能为空!"
);
AssertUtils
.
isTrue
(
Objects
.
isNull
(
hgzl002
.
getId
())||
hgzl002
.
getId
()<=
0
,
"质检单明细ID不能为空!"
);
}
}
/**
* 生产入库(工序质检单)
* @param hgzl002List
*/
public
static
void
putInStorageData
(
List
<
HGZL002
>
hgzl002List
)
{
List
<
HGKC003
>
hgkc003List
=
new
LinkedList
<>();
setHgkc003Data
(
hgzl002List
,
hgkc003List
,
null
);
DaoUtils
.
insertBatch
(
HGKC003
.
INSERT
,
hgkc003List
);
}
/**
* 对象赋值(工序质检单)
* @param hgzl002List
* @param code
*/
private
static
void
setHgkc003Data
(
List
<
HGZL002
>
hgzl002List
,
List
<
HGKC003
>
hgkc003List
,
Integer
code
)
{
List
<
String
>
inventCodes
=
hgzl002List
.
stream
().
map
(
HGZL002:
:
getProductCode
).
collect
(
Collectors
.
toList
());
List
<
HGPZ005
>
hgpz005List
=
HGPZTools
.
HgPz005
.
listByInventCodes
(
inventCodes
);
hgzl002List
.
forEach
(
o
->{
HGPZ005
hgpz005
=
hgpz005List
.
stream
().
filter
(
h
->
h
.
getInventCode
().
equals
(
o
.
getProductCode
())).
findAny
().
orElse
(
null
);
if
(
Objects
.
nonNull
(
hgpz005
)){
HGKC003
hgkc003
=
new
HGKC003
();
hgkc003
.
setDepositNo
(
SequenceGenerator
.
getNextSequence
(
HGConstant
.
SequenceId
.
PROD_DEPOSIT_NO
));
hgkc003
.
setQualityId
(
o
.
getId
());
hgkc003
.
setSubmitStatus
(
HGConstant
.
ProductStatus
.
WTJ
);
hgkc003
.
setCompanyCode
(
o
.
getCompanyCode
());
hgkc003
.
setCompanyName
(
o
.
getCompanyName
());
hgkc003
.
setAccountCode
(
o
.
getAccountCode
());
hgkc003
.
setDepCode
(
o
.
getDepCode
());
if
(
Objects
.
nonNull
(
code
)){
//整改通知单
hgkc003
.
setInvQty
(
new
BigDecimal
(
o
.
getUnpassQuantity
()));
}
else
{
//工序质检单
hgkc003
.
setInvQty
(
new
BigDecimal
(
o
.
getPassQuantity
()));
}
//单重
BigDecimal
invUnitWeight
=
HGPZTools
.
HgPz005
.
calcUnitWeight
(
hgpz005
);
hgkc003
.
setInvUnitWeight
(
invUnitWeight
);
//总重
BigDecimal
invWeight
=
invUnitWeight
.
multiply
(
hgkc003
.
getInvQty
());
hgkc003
.
setInvWeight
(
invWeight
);
hgkc003
.
setProjCode
(
o
.
getProjCode
());
hgkc003
.
setProjName
(
o
.
getProjName
());
hgkc003
.
setPartCode
(
o
.
getProductCode
());
hgkc003
.
setPartName
(
o
.
getProductName
());
hgkc003
.
setPartType
(
o
.
getProductType
());
hgkc003
.
setPartSpecId
(
hgpz005
.
getId
());
hgkc003
.
setPartSpec
(
hgpz005
.
getSpec
());
hgkc003
.
setPartCoefficient
(
hgpz005
.
getCoefficient
());
hgkc003
.
setPartLength
(
hgpz005
.
getLength
());
hgkc003
.
setPartWidth
(
hgpz005
.
getWidth
());
hgkc003
.
setPartThick
(
hgpz005
.
getThick
());
hgkc003List
.
add
(
hgkc003
);
}
});
}
/**
* 生产入库(整改通知单)
* @param ids
*/
public
static
void
putInStorageByHgzl004
(
List
<
Long
>
ids
)
{
List
<
HGKC003
>
hgkc003List
=
new
LinkedList
<>();
Map
<
String
,
Object
>
paramMap
=
new
HashMap
();
paramMap
.
put
(
"ids"
,
ids
);
paramMap
.
put
(
"checkType"
,
CheckTypeEnum
.
PROCESS_CHECK
.
getCode
());
List
<
HGZL004
>
hgzl004List
=
DaoBase
.
getInstance
().
query
(
HGZL004
.
QUERY
,
paramMap
);
//获取工序质检单信息,里面包含了不合格数量,在整改单审批通过时就取不合格数量
List
<
Long
>
checkIds
=
hgzl004List
.
stream
().
filter
(
o
->
o
.
getCheckType
().
equals
(
CheckTypeEnum
.
PROCESS_CHECK
.
getCode
())).
map
(
HGZL004:
:
getCheckId
).
collect
(
Collectors
.
toList
());
if
(
CollectionUtil
.
isNotEmpty
(
checkIds
)){
Map
<
String
,
Object
>
checkParamMap
=
new
HashMap
();
checkParamMap
.
put
(
"ids"
,
checkIds
);
List
<
HGZL002
>
hgzl002List
=
DaoBase
.
getInstance
().
query
(
HGZL002
.
QUERY
,
checkParamMap
);
//赋值
setHgkc003Data
(
hgzl002List
,
hgkc003List
,
CheckTypeEnum
.
PROCESS_CHECK
.
getCode
());
DaoUtils
.
insertBatch
(
HGKC003
.
INSERT
,
hgkc003List
);
}
}
}
}
...
@@ -209,7 +297,7 @@ public class HGKCTools {
...
@@ -209,7 +297,7 @@ public class HGKCTools {
* @author:songx
* @author:songx
* @date:2024/5/15,9:49
* @date:2024/5/15,9:49
*/
*/
public
static
class
THGKC003A
{
public
static
class
Hgkc003a
{
public
static
HGKC003A
save
(
HGKC003A
hgkc003a
){
public
static
HGKC003A
save
(
HGKC003A
hgkc003a
){
...
@@ -228,7 +316,8 @@ public class HGKCTools {
...
@@ -228,7 +316,8 @@ public class HGKCTools {
AssertUtils
.
isEmpty
(
hgkc003a
.
getWhName
(),
"仓库名称不能为空!"
);
AssertUtils
.
isEmpty
(
hgkc003a
.
getWhName
(),
"仓库名称不能为空!"
);
AssertUtils
.
isEmpty
(
hgkc003a
.
getPrdtCode
(),
"存货编码不能为空!"
);
AssertUtils
.
isEmpty
(
hgkc003a
.
getPrdtCode
(),
"存货编码不能为空!"
);
AssertUtils
.
isEmpty
(
hgkc003a
.
getPrdtName
(),
"存货名称不能为空!"
);
AssertUtils
.
isEmpty
(
hgkc003a
.
getPrdtName
(),
"存货名称不能为空!"
);
AssertUtils
.
isTrue
(
Objects
.
isNull
(
hgkc003a
.
getQualityDetailId
())||
hgkc003a
.
getQualityDetailId
()<=
0
,
"质检单明细ID不能为空!"
);
AssertUtils
.
isTrue
(
Objects
.
isNull
(
hgkc003a
.
getPartSpecId
())||
hgkc003a
.
getPartSpecId
()<=
0
,
"存货id不能为空"
);
AssertUtils
.
isTrue
(
Objects
.
isNull
(
hgkc003a
.
getQualityId
())||
hgkc003a
.
getQualityId
()<=
0
,
"质检单明细ID不能为空!"
);
}
}
}
}
...
@@ -469,7 +558,6 @@ public class HGKCTools {
...
@@ -469,7 +558,6 @@ public class HGKCTools {
paramMap
.
put
(
"companyCode"
,
companyCode
);
paramMap
.
put
(
"companyCode"
,
companyCode
);
paramMap
.
put
(
"whCode"
,
whCode
);
paramMap
.
put
(
"whCode"
,
whCode
);
paramMap
.
put
(
"specId"
,
specId
);
paramMap
.
put
(
"specId"
,
specId
);
paramMap
.
put
(
"deleteFlag"
,
0
);
List
<
HGKC010
>
results
=
DaoBase
.
getInstance
().
query
(
HGKC010
.
QUERY
,
paramMap
);
List
<
HGKC010
>
results
=
DaoBase
.
getInstance
().
query
(
HGKC010
.
QUERY
,
paramMap
);
return
CollectionUtils
.
isEmpty
(
results
)
?
null
:
results
.
get
(
0
);
return
CollectionUtils
.
isEmpty
(
results
)
?
null
:
results
.
get
(
0
);
}
}
...
...
src/main/java/com/baosight/hggp/hg/zl/service/ServiceHGZL002.java
View file @
76369964
...
@@ -4,6 +4,7 @@ import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
...
@@ -4,6 +4,7 @@ import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import
com.baosight.hggp.common.CheckStatusEnum
;
import
com.baosight.hggp.common.CheckStatusEnum
;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.core.security.UserSessionUtils
;
import
com.baosight.hggp.core.security.UserSessionUtils
;
import
com.baosight.hggp.hg.kc.tools.HGKCTools
;
import
com.baosight.hggp.hg.xs.domain.User
;
import
com.baosight.hggp.hg.xs.domain.User
;
import
com.baosight.hggp.hg.zl.domain.HGZL002
;
import
com.baosight.hggp.hg.zl.domain.HGZL002
;
import
com.baosight.hggp.hg.zl.tools.HGZLTools
;
import
com.baosight.hggp.hg.zl.tools.HGZLTools
;
...
@@ -61,11 +62,15 @@ public class ServiceHGZL002 extends ServiceBase {
...
@@ -61,11 +62,15 @@ public class ServiceHGZL002 extends ServiceBase {
public
EiInfo
save
(
EiInfo
inInfo
)
{
public
EiInfo
save
(
EiInfo
inInfo
)
{
try
{
try
{
List
<
HGZL002
>
hgzl002List
=
MapUtils
.
toDaoEPBase
(
inInfo
,
HGZL002
.
class
);
List
<
HGZL002
>
hgzl002List
=
MapUtils
.
toDaoEPBase
(
inInfo
,
HGZL002
.
class
);
//入库校验
HGKCTools
.
HgKc003
.
putInStorageCheckData
(
hgzl002List
);
hgzl002List
.
forEach
(
o
->
{
hgzl002List
.
forEach
(
o
->
{
o
.
setCheckStatus
(
CheckStatusEnum
.
CHECKED
.
getCode
());
o
.
setCheckStatus
(
CheckStatusEnum
.
CHECKED
.
getCode
());
DaoUtils
.
update
(
HGZL002
.
UPDATE
,
o
);
DaoUtils
.
update
(
HGZL002
.
UPDATE
,
o
);
HGZLTools
.
THGZL004
.
addByHGZL002
(
o
);
HGZLTools
.
THGZL004
.
addByHGZL002
(
o
);
});
});
HGKCTools
.
HgKc003
.
putInStorageData
(
hgzl002List
);
// putInStorage();
inInfo
=
this
.
query
(
inInfo
);
inInfo
=
this
.
query
(
inInfo
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
hgzl002List
.
size
()
+
"]条数据保存成功!"
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
hgzl002List
.
size
()
+
"]条数据保存成功!"
);
...
...
src/main/java/com/baosight/hggp/hg/zl/service/ServiceHGZL004.java
View file @
76369964
...
@@ -4,6 +4,7 @@ import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
...
@@ -4,6 +4,7 @@ import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import
com.baosight.hggp.common.HandleStatusEnum
;
import
com.baosight.hggp.common.HandleStatusEnum
;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.core.security.UserSessionUtils
;
import
com.baosight.hggp.core.security.UserSessionUtils
;
import
com.baosight.hggp.hg.kc.tools.HGKCTools
;
import
com.baosight.hggp.hg.sc.domain.HGSC004
;
import
com.baosight.hggp.hg.sc.domain.HGSC004
;
import
com.baosight.hggp.hg.xs.domain.User
;
import
com.baosight.hggp.hg.xs.domain.User
;
import
com.baosight.hggp.hg.zl.domain.HGZL004
;
import
com.baosight.hggp.hg.zl.domain.HGZL004
;
...
@@ -101,6 +102,7 @@ public class ServiceHGZL004 extends ServiceBase {
...
@@ -101,6 +102,7 @@ public class ServiceHGZL004 extends ServiceBase {
// 销售单号
// 销售单号
List
<
Long
>
ids
=
ObjectUtils
.
listKey
(
resultRows
,
"id"
);
List
<
Long
>
ids
=
ObjectUtils
.
listKey
(
resultRows
,
"id"
);
DaoUtils
.
update
(
HGZL004
.
BATCH_COMPLETE
,
new
HashMap
<
String
,
Object
>(){{
put
(
"ids"
,
ids
);}});
DaoUtils
.
update
(
HGZL004
.
BATCH_COMPLETE
,
new
HashMap
<
String
,
Object
>(){{
put
(
"ids"
,
ids
);}});
HGKCTools
.
HgKc003
.
putInStorageByHgzl004
(
ids
);
inInfo
=
this
.
query
(
inInfo
);
inInfo
=
this
.
query
(
inInfo
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
resultRows
.
size
()
+
"]条数据操作成功!"
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
resultRows
.
size
()
+
"]条数据操作成功!"
);
...
...
src/main/java/com/baosight/hggp/hg/zl/sql/HGZL002.xml
View file @
76369964
...
@@ -195,6 +195,9 @@
...
@@ -195,6 +195,9 @@
<isNotEmpty
prepend=
" AND "
property=
"checkDateTo"
>
<isNotEmpty
prepend=
" AND "
property=
"checkDateTo"
>
check_date
<
= #checkDateTo#
check_date
<
= #checkDateTo#
</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"
<select
id=
"query"
parameterClass=
"java.util.HashMap"
...
...
src/main/java/com/baosight/hggp/hg/zl/sql/HGZL004.xml
View file @
76369964
...
@@ -141,6 +141,9 @@
...
@@ -141,6 +141,9 @@
<isNotEmpty
prepend=
" AND "
property=
"checkIds"
>
<isNotEmpty
prepend=
" AND "
property=
"checkIds"
>
check_id IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"checkIds"
>
#checkIds[]#
</iterate>
check_id IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"checkIds"
>
#checkIds[]#
</iterate>
</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"
<select
id=
"query"
parameterClass=
"java.util.HashMap"
...
...
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