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
d4241aa5
Commit
d4241aa5
authored
May 29, 2024
by
yukang
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
c6d36a31
6d02b731
Show whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
140 additions
and
46 deletions
+140
-46
DdynamicEnum.java
src/main/java/com/baosight/hggp/common/DdynamicEnum.java
+1
-1
DaoUtils.java
src/main/java/com/baosight/hggp/core/dao/DaoUtils.java
+18
-1
HGKC003.java
src/main/java/com/baosight/hggp/hg/kc/domain/HGKC003.java
+1
-0
HGKC003A.java
src/main/java/com/baosight/hggp/hg/kc/domain/HGKC003A.java
+18
-0
HGKC003.xml
src/main/java/com/baosight/hggp/hg/kc/sql/HGKC003.xml
+4
-0
HGKC003A.xml
src/main/java/com/baosight/hggp/hg/kc/sql/HGKC003A.xml
+8
-2
HGKCTools.java
src/main/java/com/baosight/hggp/hg/kc/tools/HGKCTools.java
+30
-6
HGPZ005.xml
src/main/java/com/baosight/hggp/hg/pz/sql/HGPZ005.xml
+5
-4
ServiceHGSC004.java
.../java/com/baosight/hggp/hg/sc/service/ServiceHGSC004.java
+0
-7
ServiceHGSC004A.java
...java/com/baosight/hggp/hg/sc/service/ServiceHGSC004A.java
+11
-2
ServiceHGSC007A.java
...java/com/baosight/hggp/hg/sc/service/ServiceHGSC007A.java
+2
-1
HGSCTools.java
src/main/java/com/baosight/hggp/hg/sc/tools/HGSCTools.java
+4
-1
HGZL002.java
src/main/java/com/baosight/hggp/hg/zl/domain/HGZL002.java
+2
-0
HGZL002.xml
src/main/java/com/baosight/hggp/hg/zl/sql/HGZL002.xml
+6
-0
HGZLTools.java
src/main/java/com/baosight/hggp/hg/zl/tools/HGZLTools.java
+5
-0
HGSC001.jsp
src/main/webapp/HG/SC/HGSC001.jsp
+4
-4
HGSC002.jsp
src/main/webapp/HG/SC/HGSC002.jsp
+5
-5
HGSC004A.js
src/main/webapp/HG/SC/HGSC004A.js
+7
-3
HGSC004A.jsp
src/main/webapp/HG/SC/HGSC004A.jsp
+1
-1
HGSC005.jsp
src/main/webapp/HG/SC/HGSC005.jsp
+2
-2
HGSC005A.jsp
src/main/webapp/HG/SC/HGSC005A.jsp
+1
-1
HGSC006.jsp
src/main/webapp/HG/SC/HGSC006.jsp
+2
-2
HGSC006A.jsp
src/main/webapp/HG/SC/HGSC006A.jsp
+2
-2
HGSC007A.js
src/main/webapp/HG/SC/HGSC007A.js
+1
-1
No files found.
src/main/java/com/baosight/hggp/common/DdynamicEnum.java
View file @
d4241aa5
...
...
@@ -91,7 +91,7 @@ public enum DdynamicEnum {
* 用途:存货档案下拉框,带id名称等信息
* 编写:
*/
PRODUCT_BLOCK_ID
(
"product_block_id"
,
"inventCode"
,
"inventName"
,
"id"
,
"inventType"
,
"length"
,
"width"
,
"thick"
,
"HGPZ005.queryProductComboBox"
),
PRODUCT_BLOCK_ID
(
"product_block_id"
,
"inventCode"
,
"inventName"
,
"id"
,
"inventType"
,
"length"
,
"width"
,
"thick"
,
"
inventTypeDetail"
,
"
HGPZ005.queryProductComboBox"
),
/**
* 模块:存货档案(ALL)
* 用途:存货档案下拉框
...
...
src/main/java/com/baosight/hggp/core/dao/DaoUtils.java
View file @
d4241aa5
...
...
@@ -74,7 +74,7 @@ public class DaoUtils {
}
/**
* update method.
* update
Batch
method.
*
* @param sql
* @param parameters
...
...
@@ -91,6 +91,23 @@ public class DaoUtils {
}
/**
* insertBatch method.
*
* @param sql
* @param parameters
*/
public
static
int
insertBatch
(
String
sql
,
Collection
parameters
)
{
parameters
.
forEach
(
obj
->{
if
(
obj
instanceof
DaoEPBase
)
{
setRevisor
((
DaoEPBase
)
obj
,
true
);
}
else
if
(
obj
instanceof
Map
)
{
setRevisor
((
Map
)
obj
,
true
);
}
});
return
DaoBase
.
getInstance
().
insertBatch
(
sql
,
parameters
);
}
/**
* 创建人工号 创建人姓名 创建人岗号 创建时刻
*
* @param bean
...
...
src/main/java/com/baosight/hggp/hg/kc/domain/HGKC003.java
View file @
d4241aa5
...
...
@@ -115,6 +115,7 @@ public class HGKC003 extends DaoEPBase {
public
static
final
String
UPDATE
=
"HGKC003.update"
;
public
static
final
String
DELETE
=
"HGKC003.delete"
;
public
static
final
String
UPDATE_SUBMIT_STATUS
=
"HGKC003.updateSubmitStatus"
;
public
static
final
String
MAX_ID
=
"HGKC003.maxId"
;
private
Long
id
=
new
Long
(
0
);
private
Long
qualityId
=
new
Long
(
0
);
/* 质检单id*/
...
...
src/main/java/com/baosight/hggp/hg/kc/domain/HGKC003A.java
View file @
d4241aa5
...
...
@@ -23,6 +23,7 @@ public class HGKC003A extends DaoEPBase {
private
static
final
long
serialVersionUID
=
1L
;
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_DEP_CODE
=
"depCode"
;
/* 部门编码*/
public
static
final
String
FIELD_CREATED_BY
=
"createdBy"
;
/* 记录创建者*/
...
...
@@ -68,6 +69,7 @@ public class HGKC003A extends DaoEPBase {
public
static
final
String
FIELD_STORAGE_TYPE
=
"storageType"
;
/* 入库类型:0:入库 1:退回*/
public
static
final
String
COL_ID
=
"ID"
;
public
static
final
String
COL_QUALITY_DETAIL_ID
=
"QUALITY_DETAIL_ID"
;
/* 质检单明细ID*/
public
static
final
String
COL_ACCOUNT_CODE
=
"ACCOUNT_CODE"
;
/* 企业编码*/
public
static
final
String
COL_DEP_CODE
=
"DEP_CODE"
;
/* 部门编码*/
public
static
final
String
COL_CREATED_BY
=
"CREATED_BY"
;
/* 记录创建者*/
...
...
@@ -120,6 +122,7 @@ public class HGKC003A extends DaoEPBase {
public
static
final
String
BATCH_DELETE
=
"HGKC003A.batchDelete"
;
private
Long
id
=
new
Long
(
0
);
private
Long
qualityDetailId
=
new
Long
(
0
);
/* 质检单明细ID*/
private
String
accountCode
=
" "
;
/* 企业编码*/
private
String
depCode
=
" "
;
/* 部门编码*/
private
String
createdBy
=
" "
;
/* 记录创建者*/
...
...
@@ -175,6 +178,10 @@ public class HGKC003A extends DaoEPBase {
eiColumn
.
setDescName
(
" "
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_QUALITY_DETAIL_ID
);
eiColumn
.
setDescName
(
"质检单明细ID"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_ACCOUNT_CODE
);
eiColumn
.
setDescName
(
"企业编码"
);
eiMetadata
.
addMeta
(
eiColumn
);
...
...
@@ -1094,6 +1101,15 @@ public class HGKC003A extends DaoEPBase {
public
void
setStorageType
(
Boolean
storageType
)
{
this
.
storageType
=
storageType
;
}
public
Long
getQualityDetailId
()
{
return
qualityDetailId
;
}
public
void
setQualityDetailId
(
Long
qualityDetailId
)
{
this
.
qualityDetailId
=
qualityDetailId
;
}
/**
* get the value from Map.
*
...
...
@@ -1103,6 +1119,7 @@ public class HGKC003A extends DaoEPBase {
public
void
fromMap
(
Map
map
)
{
setId
(
NumberUtils
.
toLong
(
StringUtils
.
toString
(
map
.
get
(
FIELD_ID
)),
id
));
setQualityDetailId
(
NumberUtils
.
toLong
(
StringUtils
.
toString
(
map
.
get
(
FIELD_QUALITY_DETAIL_ID
)),
qualityDetailId
));
setAccountCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_ACCOUNT_CODE
)),
accountCode
));
setDepCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_DEP_CODE
)),
depCode
));
setCreatedBy
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_CREATED_BY
)),
createdBy
));
...
...
@@ -1156,6 +1173,7 @@ public class HGKC003A extends DaoEPBase {
Map
map
=
new
HashMap
();
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_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_CREATED_BY
,
StringUtils
.
toString
(
createdBy
,
eiMetadata
.
getMeta
(
FIELD_CREATED_BY
)));
...
...
src/main/java/com/baosight/hggp/hg/kc/sql/HGKC003.xml
View file @
d4241aa5
...
...
@@ -308,4 +308,8 @@
ID = #id#
</update>
<select
id=
"maxId"
resultClass=
"long"
>
SELECT MAX(ID) AS "id" FROM ${hggpSchema}.HGKC003
</select>
</sqlMap>
src/main/java/com/baosight/hggp/hg/kc/sql/HGKC003A.xml
View file @
d4241aa5
...
...
@@ -135,12 +135,16 @@
<isNotEmpty
prepend=
" AND "
property=
"storageType"
>
STORAGE_TYPE = #storageType#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"qualityDetailId"
>
QUALITY_DETAIL_ID = #qualityDetailId#
</isNotEmpty>
</sql>
<select
id=
"query"
parameterClass=
"java.util.HashMap"
resultClass=
"com.baosight.hggp.hg.kc.domain.HGKC003A"
>
SELECT
ID as "id",
QUALITY_DETAIL_ID as "qualityDetailId",
<!-- 企业编码 -->
ACCOUNT_CODE as "accountCode",
<!-- 企业编码 -->
DEP_CODE as "depCode",
<!-- 部门编码 -->
CREATED_BY as "createdBy",
<!-- 记录创建者 -->
...
...
@@ -204,7 +208,8 @@
<insert
id=
"insert"
>
INSERT INTO ${hggpSchema}.HGKC003A (ID,
INSERT INTO ${hggpSchema}.HGKC003A (
QUALITY_DETAIL_ID,
<!-- 企业编码 -->
ACCOUNT_CODE,
<!-- 企业编码 -->
DEP_CODE,
<!-- 部门编码 -->
CREATED_BY,
<!-- 记录创建者 -->
...
...
@@ -249,7 +254,7 @@
AMOUNT,
<!-- 金额 -->
STORAGE_TYPE
<!-- 入库类型:0:入库 1:退回 -->
)
VALUES (#
id#, #accountCode
#, #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 (#
qualityDetailId
#, #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>
<delete
id=
"delete"
>
...
...
@@ -265,6 +270,7 @@
<update
id=
"update"
>
UPDATE ${hggpSchema}.HGKC003A
SET
QUALITY_DETAIL_ID = #qualityDetailId#,
<!-- 企业编码 -->
ACCOUNT_CODE = #accountCode#,
<!-- 企业编码 -->
DEP_CODE = #depCode#,
<!-- 部门编码 -->
CREATED_BY = #createdBy#,
<!-- 记录创建者 -->
...
...
src/main/java/com/baosight/hggp/hg/kc/tools/HGKCTools.java
View file @
d4241aa5
...
...
@@ -5,6 +5,7 @@ import com.baosight.hggp.core.dao.DaoUtils;
import
com.baosight.hggp.hg.constant.HGConstant
;
import
com.baosight.hggp.hg.constant.HGSqlConstant
;
import
com.baosight.hggp.hg.kc.domain.*
;
import
com.baosight.hggp.hg.sc.domain.HGSC004
;
import
com.baosight.hggp.hg.sc.domain.HGSC005
;
import
com.baosight.hggp.util.AssertUtils
;
import
com.baosight.hggp.util.StringUtils
;
...
...
@@ -131,21 +132,39 @@ public class HGKCTools {
public
static
class
HgKc003
{
public
static
HGKC003
save
(
HGKC003
hgkc003
){
checkSaveData
(
hgkc003
);
public
static
HGKC003
save
(
HGKC003
hgkc003
,
List
<
HGKC003A
>
hgkc003aList
){
checkSaveData
(
hgkc003
,
hgkc003aList
);
hgkc003
.
setDepositNo
(
SequenceGenerator
.
getNextSequence
(
HGConstant
.
SequenceId
.
PROD_DEPOSIT_NO
));
Long
maxId
=
(
Long
)
DaoBase
.
getInstance
().
get
(
HGKC003
.
MAX_ID
,
null
,
null
);
Long
setId
=
maxId
+
1
;
hgkc003
.
setId
(
setId
);
DaoUtils
.
insert
(
HGKC003
.
INSERT
,
hgkc003
);
hgkc003aList
.
forEach
(
o
->{
o
.
setPrimaryId
(
setId
);
});
DaoUtils
.
insertBatch
(
HGKC003A
.
INSERT
,
hgkc003aList
);
return
hgkc003
;
}
private
static
void
checkSaveData
(
HGKC003
hgkc003
)
{
private
static
void
checkSaveData
(
HGKC003
hgkc003
,
List
<
HGKC003A
>
hgkc003aList
)
{
AssertUtils
.
isEmpty
(
hgkc003
.
getCompanyCode
(),
"公司编码不能为空!"
);
AssertUtils
.
isEmpty
(
hgkc003
.
getCompanyName
(),
"公司名称不能为空!"
);
AssertUtils
.
isEmpty
(
hgkc003
.
getWhCode
(),
"仓库编码不能为空!"
);
AssertUtils
.
isEmpty
(
hgkc003
.
getWhName
(),
"仓库名称不能为空!"
);
AssertUtils
.
isEmpty
(
hgkc003
.
getProjCode
(),
"项目编号不能为空!"
);
AssertUtils
.
isEmpty
(
hgkc003
.
getProjName
(),
"项目名称不能为空!"
);
AssertUtils
.
isTrue
(
Objects
.
isNull
(
hgkc003
.
getQualityId
())||
hgkc003
.
getQualityId
()<=
0
,
"质检单idID不能为空!"
);
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
(),
"项目名称不能为空!"
);
AssertUtils
.
isEmpty
(
hgkc003a
.
getWhCode
(),
"仓库编码不能为空!"
);
AssertUtils
.
isEmpty
(
hgkc003a
.
getWhName
(),
"仓库名称不能为空!"
);
AssertUtils
.
isEmpty
(
hgkc003a
.
getPrdtCode
(),
"存货编码不能为空!"
);
AssertUtils
.
isEmpty
(
hgkc003a
.
getPrdtName
(),
"存货名称不能为空!"
);
AssertUtils
.
isTrue
(
Objects
.
isNull
(
hgkc003a
.
getQualityDetailId
())||
hgkc003a
.
getQualityDetailId
()<=
0
,
"质检单明细ID不能为空!"
);
}
}
/**
...
...
@@ -207,8 +226,13 @@ public class HGKCTools {
private
static
void
checkSaveData
(
HGKC003A
hgkc003a
)
{
AssertUtils
.
isEmpty
(
hgkc003a
.
getCompanyCode
(),
"公司编码不能为空!"
);
AssertUtils
.
isEmpty
(
hgkc003a
.
getCompanyName
(),
"公司名称不能为空!"
);
// AssertUtils.isTrue(Objects.isNull(hgkc003.getQualityId())||hgkc003.getQualityId()<=0, "质检单idID不能为空!");
AssertUtils
.
isEmpty
(
hgkc003a
.
getProjCode
(),
"项目编号不能为空!"
);
AssertUtils
.
isEmpty
(
hgkc003a
.
getProjName
(),
"项目名称不能为空!"
);
AssertUtils
.
isEmpty
(
hgkc003a
.
getWhCode
(),
"仓库编码不能为空!"
);
AssertUtils
.
isEmpty
(
hgkc003a
.
getWhName
(),
"仓库名称不能为空!"
);
AssertUtils
.
isEmpty
(
hgkc003a
.
getPrdtCode
(),
"存货编码不能为空!"
);
AssertUtils
.
isEmpty
(
hgkc003a
.
getPrdtName
(),
"存货名称不能为空!"
);
AssertUtils
.
isTrue
(
Objects
.
isNull
(
hgkc003a
.
getQualityDetailId
())||
hgkc003a
.
getQualityDetailId
()<=
0
,
"质检单明细ID不能为空!"
);
}
}
...
...
src/main/java/com/baosight/hggp/hg/pz/sql/HGPZ005.xml
View file @
d4241aa5
...
...
@@ -345,10 +345,11 @@
a.INVENT_TYPE as "inventType",
a.INVENT_CODE as "inventCode",
a.INVENT_NAME as "inventName",
LENGTH as "length",
<!-- 长 -->
WIDTH as "width",
<!-- 宽 -->
THICK as "thick",
<!-- 厚 -->
b.PAR_INVENT_TYPE as "parInventType"
a.LENGTH as "length",
<!-- 长 -->
a.WIDTH as "width",
<!-- 宽 -->
a.THICK as "thick",
<!-- 厚 -->
b.PAR_INVENT_TYPE as "parInventType",
b.INVENT_TYPE_DETAIL as "inventTypeDetail"
FROM ${hggpSchema}.HGPZ005 a
left join ${hggpSchema}.hgpz004 b on a.INVENT_TYPE = b.INVENT_TYPE and b.STATUS=1 and b.DELETE_FLAG = 0
WHERE a.DELETE_FLAG = 0
...
...
src/main/java/com/baosight/hggp/hg/sc/service/ServiceHGSC004.java
View file @
d4241aa5
...
...
@@ -165,12 +165,6 @@ public class ServiceHGSC004 extends ServiceBase {
* @param hgsc004
*/
private
void
insertTree
(
HGSC004
hgsc004
)
{
//变更清单里面的公司、项目信息
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"companyCode"
,
hgsc004
.
getCompanyCode
());
map
.
put
(
"projCode"
,
hgsc004
.
getProjCode
());
List
<
HGSC004A
>
hgsc004AList
=
dao
.
query
(
HGSC004A
.
QUERY_ALL
,
map
,
0
,
-
999999
);
if
(
CollectionUtils
.
isEmpty
(
hgsc004AList
)){
//录入树结构,公司
HGSC004A
rootHgsc004A
=
new
HGSC004A
();
BeanUtil
.
copyProperties
(
hgsc004
,
rootHgsc004A
,
"id"
);
...
...
@@ -197,7 +191,6 @@ public class ServiceHGSC004 extends ServiceBase {
projectHgsc004A
.
setProductName
(
hgsc004
.
getProjName
());
DaoUtils
.
insert
(
HGSC004A
.
INSERT
,
projectHgsc004A
);
}
}
}
...
...
src/main/java/com/baosight/hggp/hg/sc/service/ServiceHGSC004A.java
View file @
d4241aa5
...
...
@@ -122,7 +122,7 @@ public class ServiceHGSC004A extends ServiceBase {
hgsc004a
.
setMaterialId
(
hgsc004
.
getId
());
hgsc004a
.
setLv
(
hgsc004a
.
getLv
()
+
1
);
//不为4级都有叶子节点
if
(
hgsc004a
.
getLv
().
intValue
()
<
=
4
){
if
(
hgsc004a
.
getLv
().
intValue
()
<
4
){
hgsc004a
.
setLeaf
(
2
);
}
else
{
hgsc004a
.
setLeaf
(
1
);
...
...
@@ -177,9 +177,18 @@ public class ServiceHGSC004A extends ServiceBase {
private
void
checkSaveData
(
HGSC004A
hgsc004a
,
HGSC004
hgsc004
)
{
if
(
Objects
.
nonNull
(
hgsc004a
.
getId
())&&
hgsc004a
.
getId
()>
0
){
//蓝图信息,用于蓝图状态校验
HGSC003
hgsc003
=
(
HGSC003
)
super
.
dao
.
get
(
HGSC003
.
QUERY
,
HGSC00
4A
.
FIELD_id
,
hgsc004
.
getBlueprintId
());
HGSC003
hgsc003
=
(
HGSC003
)
super
.
dao
.
get
(
HGSC003
.
QUERY
,
HGSC00
3
.
FIELD_id
,
hgsc004
.
getBlueprintId
());
AssertUtils
.
isTrue
(
hgsc003
.
getBlueprintStatus
().
compareTo
(
HGConstant
.
EnablingStatus
.
TY
)
==
0
,
"蓝图已停用不可修改!"
);
}
//为构件的需要验证是否已经存在了,不能重复添加
if
(
hgsc004a
.
getLv
().
intValue
()
==
3
){
Map
<
String
,
Object
>
mapA
=
new
HashMap
<>();
mapA
.
put
(
"materialId"
,
hgsc004a
.
getMaterialId
());
mapA
.
put
(
"productId"
,
hgsc004a
.
getProductId
());
mapA
.
put
(
"notId"
,
hgsc004a
.
getId
());
List
<
HGSC004A
>
hgsc004AList
=
dao
.
query
(
HGSC004A
.
QUERY
,
mapA
,
0
,
-
999999
);
AssertUtils
.
isTrue
(!
CollectionUtils
.
isEmpty
(
hgsc004AList
),
"已存在构建"
+
hgsc004a
.
getProductName
());
}
AssertUtils
.
isEmpty
(
UserSessionUtils
.
getAccountCode
(),
"当前用户未绑定公司,无法操作数据,请联系管理员!"
);
AssertUtils
.
isEmpty
(
UserSessionUtils
.
getOrgId
(),
"当前用户未绑定部门,无法操作数据,请联系管理员!"
);
AssertUtils
.
isEmpty
(
hgsc004a
.
getCompanyCode
(),
"请选择公司!"
);
...
...
src/main/java/com/baosight/hggp/hg/sc/service/ServiceHGSC007A.java
View file @
d4241aa5
...
...
@@ -41,7 +41,7 @@ public class ServiceHGSC007A extends ServiceEPBase {
List
<
HGSC008
>
old008List
=
HGSCTools
.
THGSC008
.
getByTaskId
(
Long
.
valueOf
(
taskId
));
hgsc008
.
setTaskId
(
hgsc007
.
getId
());
hgsc008
.
setTaskQuantity
(
hgsc007
.
getQuantity
());
hgsc008
.
setTaskWeight
(
hgsc007
.
getTotalWeight
());
hgsc008
.
setRegisteredQuantity
(
Optional
.
ofNullable
(
old008List
).
orElse
(
new
ArrayList
<>()).
stream
().
mapToInt
(
HGSC008:
:
getQuantity
).
sum
());
...
...
@@ -51,6 +51,7 @@ public class ServiceHGSC007A extends ServiceEPBase {
hgsc008
.
setRegisterDate
(
DateUtil
.
toDateStr
(
new
Date
(),
DateUtil
.
DATE10_PATTERN
));
hgsc008
.
setQuantity
(
null
);
hgsc008
.
setTotalWeight
(
null
);
hgsc008
.
setId
(
null
);
inInfo
.
addBlock
(
EiConstant
.
resultBlock
).
addRow
(
hgsc008
);
}
catch
(
PlatException
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"初始化失败"
);
...
...
src/main/java/com/baosight/hggp/hg/sc/tools/HGSCTools.java
View file @
d4241aa5
...
...
@@ -768,12 +768,14 @@ public class HGSCTools {
public
static
HGSC008
add
(
EiInfo
info
){
Map
resultMap
=
EiInfoUtils
.
getFirstRow
(
info
,
EiConstant
.
resultBlock
);
String
taskId
=
com
.
baosight
.
hggp
.
util
.
MapUtils
.
getString
(
resultMap
,
HGSC008
.
FIELD_task_id
);
String
taskId
=
MapUtils
.
getString
(
resultMap
,
HGSC008
.
FIELD_task_id
);
HGSC007
hgsc007
=
HGSCTools
.
THGSC007
.
getById
(
Long
.
valueOf
(
taskId
));
HGSC008
hgsc008
=
new
HGSC008
();
BeanUtils
.
copyProperties
(
hgsc007
,
hgsc008
);
cleanBaseInfo
(
hgsc008
);
hgsc008
.
setTaskId
(
hgsc007
.
getId
());
hgsc008
.
setQuantity
(
NumberUtils
.
toInteger
(
resultMap
.
get
(
HGSC008
.
FIELD_quantity
)));
hgsc008
.
setRegisterDate
(
String
.
valueOf
(
resultMap
.
get
(
HGSC008
.
FIELD_register_date
)));
hgsc008
.
setTotalWeight
(
hgsc007
.
getSingleWeight
().
multiply
(
new
BigDecimal
(
hgsc008
.
getQuantity
())));
checkAddDate
(
hgsc008
);
hgsc008
.
setWorkCode
(
SequenceGenerator
.
getNextSequence
(
HGConstant
.
SequenceId
.
HGSC008_WORK_CODE
));
...
...
@@ -806,6 +808,7 @@ public class HGSCTools {
public
static
void
delete
(
List
<
Long
>
ids
)
{
checkDeleteDate
(
ids
);
DaoUtils
.
update
(
HGSC008
.
BATCH_DELETE
,
new
HashMap
<
String
,
Object
>(){{
put
(
"ids"
,
ids
);}});
HGZLTools
.
THGZL002
.
deleteByWorkIds
(
ids
);
}
private
static
void
checkDeleteDate
(
List
<
Long
>
ids
){
...
...
src/main/java/com/baosight/hggp/hg/zl/domain/HGZL002.java
View file @
d4241aa5
...
...
@@ -118,6 +118,8 @@ public class HGZL002 extends DaoEPBase {
public
static
final
String
INSERT
=
"HGZL002.insert"
;
public
static
final
String
UPDATE
=
"HGZL002.update"
;
public
static
final
String
DELETE
=
"HGZL002.delete"
;
public
static
final
String
DELETE_BY_WORKS
=
"HGZL002.delete_by_works"
;
private
Long
id
=
new
Long
(
0
);
private
Long
matId
=
new
Long
(
0
);
/* 物料清单ID*/
...
...
src/main/java/com/baosight/hggp/hg/zl/sql/HGZL002.xml
View file @
d4241aa5
...
...
@@ -443,6 +443,12 @@
id = #id#
</delete>
<delete
id=
"delete_by_works"
>
DELETE FROM ${hggpSchema}.HGZL002 WHERE
work_id IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"workIds"
>
#workIds[]#
</iterate>
</delete>
<update
id=
"update"
>
UPDATE ${hggpSchema}.HGZL002
SET
...
...
src/main/java/com/baosight/hggp/hg/zl/tools/HGZLTools.java
View file @
d4241aa5
...
...
@@ -117,5 +117,9 @@ public class HGZLTools {
queryMap
.
put
(
"workIds"
,
workIds
);
return
DaoBase
.
getInstance
().
query
(
HGZL002
.
QUERY
,
queryMap
);
}
public
static
void
deleteByWorkIds
(
List
<
Long
>
workIds
)
{
DaoUtils
.
update
(
HGZL002
.
DELETE_BY_WORKS
,
new
HashMap
<
String
,
Object
>(){{
put
(
"workIds"
,
workIds
);}});
}
}
}
\ No newline at end of file
src/main/webapp/HG/SC/HGSC001.jsp
View file @
d4241aa5
...
...
@@ -13,10 +13,10 @@
<EF:EFPage
title=
"项目立项"
>
<EF:EFRegion
id=
"inqu"
title=
"查询条件"
>
<div
class=
"row"
>
<EF:EFInput
ename=
"inqu_status-0-companyName"
cname=
"公司名称"
colWidth=
"3"
/>
<EF:EFInput
ename=
"inqu_status-0-subcontractName"
cname=
"分包方"
colWidth=
"3"
/>
<EF:EFInput
ename=
"inqu_status-0-genralContractName"
cname=
"总包方"
colWidth=
"3"
/>
<EF:EFInput
ename=
"inqu_status-0-projName"
cname=
"项目名称"
colWidth=
"3"
/>
<EF:EFInput
ename=
"inqu_status-0-companyName"
cname=
"公司名称"
placeholder=
"模糊查询"
colWidth=
"3"
/>
<EF:EFInput
ename=
"inqu_status-0-subcontractName"
cname=
"分包方"
placeholder=
"模糊查询"
colWidth=
"3"
/>
<EF:EFInput
ename=
"inqu_status-0-genralContractName"
cname=
"总包方"
placeholder=
"模糊查询"
colWidth=
"3"
/>
<EF:EFInput
ename=
"inqu_status-0-projName"
cname=
"项目名称"
placeholder=
"模糊查询"
colWidth=
"3"
/>
<EF:EFSelect
cname=
"项目性质"
ename=
"inqu_status-0-projType"
colWidth=
"3"
filter=
"contains"
>
<EF:EFOption
label=
"全部"
value=
""
/>
<EF:EFOptions
blockId=
"proj_type_block_id"
valueField=
"valueField"
textField=
"textField"
/>
...
...
src/main/webapp/HG/SC/HGSC002.jsp
View file @
d4241aa5
...
...
@@ -13,11 +13,11 @@
<EF:EFPage
title=
"项目人员"
>
<EF:EFRegion
id=
"inqu"
title=
"查询条件"
>
<div
class=
"row"
>
<EF:EFInput
ename=
"inqu_status-0-companyName"
cname=
"公司名称"
colWidth=
"3"
/>
<EF:EFInput
ename=
"inqu_status-0-projName"
cname=
"项目名称"
colWidth=
"3"
/>
<EF:EFInput
ename=
"inqu_status-0-personName"
cname=
"姓名"
colWidth=
"3"
/>
<EF:EFInput
ename=
"inqu_status-0-personIdCard"
cname=
"身份证号"
colWidth=
"3"
/>
<EF:EFInput
ename=
"inqu_status-0-personPhone"
cname=
"电话"
colWidth=
"3"
/>
<EF:EFInput
ename=
"inqu_status-0-companyName"
cname=
"公司名称"
placeholder=
"模糊查询"
colWidth=
"3"
/>
<EF:EFInput
ename=
"inqu_status-0-projName"
cname=
"项目名称"
placeholder=
"模糊查询"
colWidth=
"3"
/>
<EF:EFInput
ename=
"inqu_status-0-personName"
cname=
"姓名"
placeholder=
"模糊查询"
colWidth=
"3"
/>
<EF:EFInput
ename=
"inqu_status-0-personIdCard"
cname=
"身份证号"
placeholder=
"模糊查询"
colWidth=
"3"
/>
<EF:EFInput
ename=
"inqu_status-0-personPhone"
cname=
"电话"
placeholder=
"模糊查询"
colWidth=
"3"
/>
</div>
</EF:EFRegion>
<EF:EFRegion
id=
"result"
title=
"记录集"
>
...
...
src/main/webapp/HG/SC/HGSC004A.js
View file @
d4241aa5
...
...
@@ -189,6 +189,7 @@ $(function () {
item
[
'length'
]
=
productCodeBox
[
i
][
'param3Field'
];
item
[
'width'
]
=
productCodeBox
[
i
][
'param4Field'
];
item
[
'thick'
]
=
productCodeBox
[
i
][
'param5Field'
];
item
[
'productType'
]
=
productCodeBox
[
i
][
'param6Field'
];
console
.
log
(
item
)
template
=
productCodeBox
[
i
][
'valueField'
];
}
else
{
...
...
@@ -261,17 +262,20 @@ $(function () {
// 判断父级节点是否发生变化
if
(
e
.
field
==
"productCode"
)
{
loadChange
(
grid
,
e
,
"productId"
);
loadChange
(
grid
,
e
,
"inventType"
);
loadChange
(
grid
,
e
,
"productName"
);
loadChange
(
grid
,
e
,
"quantity"
);
loadChange
(
grid
,
e
,
"inventType"
);
loadChange
(
grid
,
e
,
"length"
);
loadChange
(
grid
,
e
,
"width"
);
loadChange
(
grid
,
e
,
"thick"
);
loadChange
(
grid
,
e
,
"productType"
);
}
if
(
e
.
field
==
"quantity"
)
{
loadChange
(
grid
,
e
,
"singleWeight"
);
loadChange
(
grid
,
e
,
"totalWeight"
);
}
if
(
e
.
field
==
"singleWeight"
)
{
loadChange
(
grid
,
e
,
"totalWeight"
);
}
loadChange
(
grid
,
e
,
"id"
);
});
},
onSuccess
:
function
(
e
)
{
...
...
src/main/webapp/HG/SC/HGSC004A.jsp
View file @
d4241aa5
...
...
@@ -59,7 +59,7 @@
<EF:EFColumn
ename=
"thick"
cname=
"厚(MM)"
width=
"100"
align=
"right"
format=
"{0:N2}"
maxLength=
"10"
enable=
"false"
/>
<EF:EFColumn
ename=
"quantity"
required=
"true"
cname=
"数量"
/>
<EF:EFColumn
ename=
"singleWeight"
required=
"true"
format=
"{0:N3}"
cname=
"单重(kg)"
/>
<EF:EFColumn
ename=
"totalWeight"
cname=
"总重(kg)"
required=
"true"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"totalWeight"
cname=
"总重(kg)"
required=
"true"
format=
"{0:N3}"
enable=
"false"
/>
<EF:EFComboColumn
cname=
"提交状态"
ename=
"productStatus"
width=
"90"
align=
"center"
required=
"false"
enable=
"false"
>
<EF:EFCodeOption
codeName=
"hggp.sc.productStatus"
/>
</EF:EFComboColumn>
...
...
src/main/webapp/HG/SC/HGSC005.jsp
View file @
d4241aa5
...
...
@@ -13,8 +13,8 @@
<EF:EFPage
title=
"生产计划"
>
<EF:EFRegion
id=
"inqu"
title=
"查询条件"
>
<div
class=
"row"
>
<EF:EFInput
ename=
"inqu_status-0-companyName"
cname=
"公司名称"
colWidth=
"3"
/>
<EF:EFInput
ename=
"inqu_status-0-projName"
cname=
"项目名称"
colWidth=
"3"
/>
<EF:EFInput
ename=
"inqu_status-0-companyName"
cname=
"公司名称"
placeholder=
"模糊查询"
colWidth=
"3"
/>
<EF:EFInput
ename=
"inqu_status-0-projName"
cname=
"项目名称"
placeholder=
"模糊查询"
colWidth=
"3"
/>
<EF:EFDatePicker
cname=
"生产计划日期"
ename=
"inqu_status-0-createdTime"
colWidth=
"3"
format=
"yyyy-MM-dd"
readonly=
"false"
/>
<EF:EFInput
ename=
"inqu_status-0-planCode"
cname=
"生产计划单号"
colWidth=
"3"
/>
...
...
src/main/webapp/HG/SC/HGSC005A.jsp
View file @
d4241aa5
...
...
@@ -14,7 +14,7 @@
<EF:EFRegion
id=
"inqu"
title=
"查询条件"
>
<div
class=
"row"
>
<EF:EFInput
ename=
"inqu_status-0-planCode"
cname=
"计划编码"
type=
"hidden"
/>
<EF:EFInput
ename=
"inqu_status-0-productName"
cname=
"产品名称"
colWidth=
"3"
/>
<EF:EFInput
ename=
"inqu_status-0-productName"
cname=
"产品名称"
placeholder=
"模糊查询"
colWidth=
"3"
/>
<EF:EFSelect
cname=
"工序"
ename=
"inqu_status-0-processName"
colWidth=
"3"
filter=
"contains"
>
<EF:EFOptions
blockId=
"plan_process_block_id"
valueField=
"valueField"
textField=
"textField"
/>
</EF:EFSelect>
...
...
src/main/webapp/HG/SC/HGSC006.jsp
View file @
d4241aa5
...
...
@@ -13,8 +13,8 @@
<EF:EFPage
title=
"生产订单"
>
<EF:EFRegion
id=
"inqu"
title=
"查询条件"
>
<div
class=
"row"
>
<EF:EFInput
ename=
"inqu_status-0-companyName"
cname=
"公司名称"
colWidth=
"3"
/>
<EF:EFInput
ename=
"inqu_status-0-projName"
cname=
"项目名称"
colWidth=
"3"
/>
<EF:EFInput
ename=
"inqu_status-0-companyName"
cname=
"公司名称"
placeholder=
"模糊查询"
colWidth=
"3"
/>
<EF:EFInput
ename=
"inqu_status-0-projName"
cname=
"项目名称"
placeholder=
"模糊查询"
colWidth=
"3"
/>
<EF:EFDatePicker
cname=
"生产订单日期"
ename=
"inqu_status-0-createdTime"
colWidth=
"3"
format=
"yyyy-MM-dd"
readonly=
"false"
/>
<EF:EFInput
ename=
"inqu_status-0-orderCode"
cname=
"生产订单单号"
colWidth=
"3"
/>
...
...
src/main/webapp/HG/SC/HGSC006A.jsp
View file @
d4241aa5
...
...
@@ -14,8 +14,8 @@
<EF:EFRegion
id=
"inqu"
title=
"查询条件"
>
<div
class=
"row"
>
<EF:EFInput
ename=
"inqu_status-0-orderCode"
cname=
"订单编码"
type=
"hidden"
/>
<EF:EFInput
ename=
"inqu_status-0-productName"
cname=
"产品名称"
colWidth=
"3"
/>
<EF:EFInput
ename=
"inqu_status-0-projName"
cname=
"项目名称"
colWidth=
"3"
/>
<EF:EFInput
ename=
"inqu_status-0-productName"
cname=
"产品名称"
placeholder=
"模糊查询"
colWidth=
"3"
/>
<EF:EFInput
ename=
"inqu_status-0-projName"
cname=
"项目名称"
placeholder=
"模糊查询"
colWidth=
"3"
/>
<EF:EFDatePicker
cname=
"生产订单"
ename=
"inqu_status-0-createdTime"
colWidth=
"3"
format=
"yyyy-MM-dd"
readonly=
"false"
/>
</div>
...
...
src/main/webapp/HG/SC/HGSC007A.js
View file @
d4241aa5
...
...
@@ -37,7 +37,7 @@ $(function () {
}
JSUtils
.
confirm
(
"确定对数据做
\"
保存
\"
操作? "
,
{
ok
:
function
()
{
JSUtils
.
submitGrid
(
"
result
"
,
"HGSC007A"
,
"save"
,
{
isAlldata
:
true
,
onSuccessCallback
:
parent
.
registerWorkCallback
});
JSUtils
.
submitGrid
(
""
,
"HGSC007A"
,
"save"
,
{
isAlldata
:
true
,
onSuccessCallback
:
parent
.
registerWorkCallback
});
}
});
});
...
...
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