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
591b0662
Commit
591b0662
authored
Jun 28, 2024
by
江和松
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
材料计划生成采购计划重复校验添加
parent
e8f1be20
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
202 additions
and
129 deletions
+202
-129
HGCG001.java
src/main/java/com/baosight/hggp/hg/cg/domain/HGCG001.java
+115
-84
HGCG001.xml
src/main/java/com/baosight/hggp/hg/cg/sql/HGCG001.xml
+16
-3
HGCGTools.java
src/main/java/com/baosight/hggp/hg/cg/tools/HGCGTools.java
+35
-22
ServiceHGSC009A.java
...java/com/baosight/hggp/hg/sc/service/ServiceHGSC009A.java
+23
-10
HGSC009.js
src/main/webapp/HG/SC/HGSC009.js
+9
-6
HGSC009.jsp
src/main/webapp/HG/SC/HGSC009.jsp
+4
-4
No files found.
src/main/java/com/baosight/hggp/hg/cg/domain/HGCG001.java
View file @
591b0662
...
...
@@ -19,9 +19,9 @@ import com.baosight.iplat4j.core.util.StringUtils;
* @history 2024-05-11 17:25:48 create
*/
public
class
HGCG001
extends
DaoEPBase
{
private
static
final
long
serialVersionUID
=
1L
;
public
static
final
String
FIELD_ID
=
"id"
;
public
static
final
String
FIELD_ACCOUNT_CODE
=
"accountCode"
;
/* 企业编码*/
public
static
final
String
FIELD_DEP_CODE
=
"depCode"
;
/* 部门编码*/
...
...
@@ -57,7 +57,10 @@ public class HGCG001 extends DaoEPBase {
public
static
final
String
FIELD_AUDIT_USER_ID
=
"auditUserId"
;
/* 审核人ID*/
public
static
final
String
FIELD_AUDIT_USER_NAME
=
"auditUserName"
;
/* 审核人名称*/
public
static
final
String
FIELD_AUDIT_REASON
=
"auditReason"
;
/* 审核原因*/
public
static
final
String
FIELD_INVENT_TYPE_DETAIL
=
"inventTypeDetail"
;
/*存货类型明细*/
public
static
final
String
FIELD_MATERIAL_PLAN_ID
=
"materialPlanId"
;
/*材料计划id*/
public
static
final
String
COL_ID
=
"ID"
;
public
static
final
String
COL_ACCOUNT_CODE
=
"ACCOUNT_CODE"
;
/* 企业编码*/
public
static
final
String
COL_DEP_CODE
=
"DEP_CODE"
;
/* 部门编码*/
...
...
@@ -93,13 +96,13 @@ public class HGCG001 extends DaoEPBase {
public
static
final
String
COL_AUDIT_USER_ID
=
"AUDIT_USER_ID"
;
/* 审核人ID*/
public
static
final
String
COL_AUDIT_USER_NAME
=
"AUDIT_USER_NAME"
;
/* 审核人名称*/
public
static
final
String
COL_AUDIT_REASON
=
"AUDIT_REASON"
;
/* 审核原因*/
public
static
final
String
QUERY
=
"HGCG001.query"
;
public
static
final
String
COUNT
=
"HGCG001.count"
;
public
static
final
String
INSERT
=
"HGCG001.insert"
;
public
static
final
String
UPDATE
=
"HGCG001.update"
;
public
static
final
String
DELETE
=
"HGCG001.delete"
;
private
Long
id
=
new
Long
(
0
);
private
String
accountCode
=
" "
;
/* 企业编码*/
private
String
depCode
=
" "
;
/* 部门编码*/
...
...
@@ -135,191 +138,199 @@ public class HGCG001 extends DaoEPBase {
private
String
auditUserId
=
" "
;
/* 审核人ID*/
private
String
auditUserName
=
" "
;
/* 审核人名称*/
private
String
auditReason
=
" "
;
/* 审核原因*/
private
Integer
inventTypeDetail
;
/*存货类型明细 1:构建 2:零件*/
private
Long
materialPlanId
=
new
Long
(
0
);
/*材料计划id*/
/**
* initialize the metadata.
*/
public
void
initMetaData
()
{
EiColumn
eiColumn
;
eiColumn
=
new
EiColumn
(
FIELD_ID
);
eiColumn
.
setPrimaryKey
(
true
);
eiColumn
.
setDescName
(
" "
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_ACCOUNT_CODE
);
eiColumn
.
setDescName
(
"企业编码"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_DEP_CODE
);
eiColumn
.
setDescName
(
"部门编码"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_CREATED_BY
);
eiColumn
.
setDescName
(
"记录创建者"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_CREATED_NAME
);
eiColumn
.
setDescName
(
"记录创建名称"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_CREATED_TIME
);
eiColumn
.
setDescName
(
"记录创建时间"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_UPDATED_BY
);
eiColumn
.
setDescName
(
"记录修改者"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_UPDATED_NAME
);
eiColumn
.
setDescName
(
"记录修改名称"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_UPDATED_TIME
);
eiColumn
.
setDescName
(
"记录修改时间"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_DELETE_FLAG
);
eiColumn
.
setDescName
(
"0-未删除,1-已删除"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_COMPANY_CODE
);
eiColumn
.
setDescName
(
"公司编码"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_COMPANY_NAME
);
eiColumn
.
setDescName
(
"公司名称"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_PLAN_DATE
);
eiColumn
.
setDescName
(
"计划日期"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_PLAN_NO
);
eiColumn
.
setDescName
(
"计划单号"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_INVENT_TYPE
);
eiColumn
.
setDescName
(
"存货类型"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_INVENT_CODE
);
eiColumn
.
setDescName
(
"存货编码"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_INVENT_NAME
);
eiColumn
.
setDescName
(
"存货名称"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_SPEC_ID
);
eiColumn
.
setDescName
(
"规格ID"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_SPEC
);
eiColumn
.
setDescName
(
"规格"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_MATERIAL
);
eiColumn
.
setDescName
(
"材质"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_UNIT
);
eiColumn
.
setDescName
(
"单位"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_LENGTH
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
3
);
eiColumn
.
setFieldLength
(
20
);
eiColumn
.
setDescName
(
"长度"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_WIDTH
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
3
);
eiColumn
.
setFieldLength
(
20
);
eiColumn
.
setDescName
(
"宽度"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_THICK
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
3
);
eiColumn
.
setFieldLength
(
20
);
eiColumn
.
setDescName
(
"厚度"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_PLAN_QTY
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
3
);
eiColumn
.
setFieldLength
(
20
);
eiColumn
.
setDescName
(
"计划数量"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_PLAN_UNIT_WEIGHT
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
3
);
eiColumn
.
setFieldLength
(
20
);
eiColumn
.
setDescName
(
"计划单重"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_PLAN_WEIGHT
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
3
);
eiColumn
.
setFieldLength
(
20
);
eiColumn
.
setDescName
(
"计划重量"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_PUR_QTY
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
3
);
eiColumn
.
setFieldLength
(
20
);
eiColumn
.
setDescName
(
"采购数量"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_PUR_UNIT_WEIGHT
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
3
);
eiColumn
.
setFieldLength
(
20
);
eiColumn
.
setDescName
(
"采购单重"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_PUR_WEIGHT
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
3
);
eiColumn
.
setFieldLength
(
20
);
eiColumn
.
setDescName
(
"采购重量"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_STATUS
);
eiColumn
.
setDescName
(
"状态:0-未审批,1-审核通过,2-审核未通过"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_AUDIT_TIME
);
eiColumn
.
setDescName
(
"审核时间"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_AUDIT_USER_ID
);
eiColumn
.
setDescName
(
"审核人ID"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_AUDIT_USER_NAME
);
eiColumn
.
setDescName
(
"审核人名称"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_AUDIT_REASON
);
eiColumn
.
setDescName
(
"审核原因"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_INVENT_TYPE_DETAIL
);
eiColumn
.
setDescName
(
"存货类型明细"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_MATERIAL_PLAN_ID
);
eiColumn
.
setDescName
(
"存货类型明细"
);
eiMetadata
.
addMeta
(
eiColumn
);
}
/**
* the constructor.
*/
public
HGCG001
()
{
initMetaData
();
}
/**
* get the id .
* @return the id
...
...
@@ -327,7 +338,7 @@ public class HGCG001 extends DaoEPBase {
public
Long
getId
()
{
return
this
.
id
;
}
/**
* set the id .
*
...
...
@@ -343,7 +354,7 @@ public class HGCG001 extends DaoEPBase {
public
String
getAccountCode
()
{
return
this
.
accountCode
;
}
/**
* set the accountCode - 企业编码.
*
...
...
@@ -359,7 +370,7 @@ public class HGCG001 extends DaoEPBase {
public
String
getDepCode
()
{
return
this
.
depCode
;
}
/**
* set the depCode - 部门编码.
*
...
...
@@ -375,7 +386,7 @@ public class HGCG001 extends DaoEPBase {
public
String
getCreatedBy
()
{
return
this
.
createdBy
;
}
/**
* set the createdBy - 记录创建者.
*
...
...
@@ -391,7 +402,7 @@ public class HGCG001 extends DaoEPBase {
public
String
getCreatedName
()
{
return
this
.
createdName
;
}
/**
* set the createdName - 记录创建名称.
*
...
...
@@ -407,7 +418,7 @@ public class HGCG001 extends DaoEPBase {
public
String
getCreatedTime
()
{
return
this
.
createdTime
;
}
/**
* set the createdTime - 记录创建时间.
*
...
...
@@ -423,7 +434,7 @@ public class HGCG001 extends DaoEPBase {
public
String
getUpdatedBy
()
{
return
this
.
updatedBy
;
}
/**
* set the updatedBy - 记录修改者.
*
...
...
@@ -439,7 +450,7 @@ public class HGCG001 extends DaoEPBase {
public
String
getUpdatedName
()
{
return
this
.
updatedName
;
}
/**
* set the updatedName - 记录修改名称.
*
...
...
@@ -455,7 +466,7 @@ public class HGCG001 extends DaoEPBase {
public
String
getUpdatedTime
()
{
return
this
.
updatedTime
;
}
/**
* set the updatedTime - 记录修改时间.
*
...
...
@@ -471,7 +482,7 @@ public class HGCG001 extends DaoEPBase {
public
Integer
getDeleteFlag
()
{
return
this
.
deleteFlag
;
}
/**
* set the deleteFlag - 0-未删除,1-已删除.
*
...
...
@@ -487,7 +498,7 @@ public class HGCG001 extends DaoEPBase {
public
String
getCompanyCode
()
{
return
this
.
companyCode
;
}
/**
* set the companyCode - 公司编码.
*
...
...
@@ -503,7 +514,7 @@ public class HGCG001 extends DaoEPBase {
public
String
getCompanyName
()
{
return
this
.
companyName
;
}
/**
* set the companyName - 公司名称.
*
...
...
@@ -519,7 +530,7 @@ public class HGCG001 extends DaoEPBase {
public
String
getPlanDate
()
{
return
this
.
planDate
;
}
/**
* set the planDate - 计划日期.
*
...
...
@@ -535,7 +546,7 @@ public class HGCG001 extends DaoEPBase {
public
String
getPlanNo
()
{
return
this
.
planNo
;
}
/**
* set the planNo - 计划单号.
*
...
...
@@ -551,7 +562,7 @@ public class HGCG001 extends DaoEPBase {
public
String
getInventType
()
{
return
this
.
inventType
;
}
/**
* set the inventType - 存货类型.
*
...
...
@@ -567,7 +578,7 @@ public class HGCG001 extends DaoEPBase {
public
String
getInventCode
()
{
return
this
.
inventCode
;
}
/**
* set the inventCode - 存货编码.
*
...
...
@@ -583,7 +594,7 @@ public class HGCG001 extends DaoEPBase {
public
String
getInventName
()
{
return
this
.
inventName
;
}
/**
* set the inventName - 存货名称.
*
...
...
@@ -599,7 +610,7 @@ public class HGCG001 extends DaoEPBase {
public
Long
getSpecId
()
{
return
this
.
specId
;
}
/**
* set the specId - 规格ID.
*
...
...
@@ -615,7 +626,7 @@ public class HGCG001 extends DaoEPBase {
public
String
getSpec
()
{
return
this
.
spec
;
}
/**
* set the spec - 规格.
*
...
...
@@ -631,7 +642,7 @@ public class HGCG001 extends DaoEPBase {
public
String
getMaterial
()
{
return
this
.
material
;
}
/**
* set the material - 材质.
*
...
...
@@ -647,7 +658,7 @@ public class HGCG001 extends DaoEPBase {
public
String
getUnit
()
{
return
this
.
unit
;
}
/**
* set the unit - 单位.
*
...
...
@@ -663,7 +674,7 @@ public class HGCG001 extends DaoEPBase {
public
BigDecimal
getLength
()
{
return
this
.
length
;
}
/**
* set the length - 长度.
*
...
...
@@ -679,7 +690,7 @@ public class HGCG001 extends DaoEPBase {
public
BigDecimal
getWidth
()
{
return
this
.
width
;
}
/**
* set the width - 宽度.
*
...
...
@@ -695,7 +706,7 @@ public class HGCG001 extends DaoEPBase {
public
BigDecimal
getThick
()
{
return
this
.
thick
;
}
/**
* set the thick - 厚度.
*
...
...
@@ -711,7 +722,7 @@ public class HGCG001 extends DaoEPBase {
public
BigDecimal
getPlanQty
()
{
return
this
.
planQty
;
}
/**
* set the planQty - 计划数量.
*
...
...
@@ -727,7 +738,7 @@ public class HGCG001 extends DaoEPBase {
public
BigDecimal
getPlanUnitWeight
()
{
return
this
.
planUnitWeight
;
}
/**
* set the planUnitWeight - 计划单重.
*
...
...
@@ -743,7 +754,7 @@ public class HGCG001 extends DaoEPBase {
public
BigDecimal
getPlanWeight
()
{
return
this
.
planWeight
;
}
/**
* set the planWeight - 计划重量.
*
...
...
@@ -759,7 +770,7 @@ public class HGCG001 extends DaoEPBase {
public
BigDecimal
getPurQty
()
{
return
this
.
purQty
;
}
/**
* set the purQty - 采购数量.
*
...
...
@@ -775,7 +786,7 @@ public class HGCG001 extends DaoEPBase {
public
BigDecimal
getPurUnitWeight
()
{
return
this
.
purUnitWeight
;
}
/**
* set the purUnitWeight - 采购单重.
*
...
...
@@ -791,7 +802,7 @@ public class HGCG001 extends DaoEPBase {
public
BigDecimal
getPurWeight
()
{
return
this
.
purWeight
;
}
/**
* set the purWeight - 采购重量.
*
...
...
@@ -807,7 +818,7 @@ public class HGCG001 extends DaoEPBase {
public
Integer
getStatus
()
{
return
this
.
status
;
}
/**
* set the status - 状态:0-未审批,1-审核通过,2-审核未通过.
*
...
...
@@ -823,7 +834,7 @@ public class HGCG001 extends DaoEPBase {
public
String
getAuditTime
()
{
return
this
.
auditTime
;
}
/**
* set the auditTime - 审核时间.
*
...
...
@@ -839,7 +850,7 @@ public class HGCG001 extends DaoEPBase {
public
String
getAuditUserId
()
{
return
this
.
auditUserId
;
}
/**
* set the auditUserId - 审核人ID.
*
...
...
@@ -855,7 +866,7 @@ public class HGCG001 extends DaoEPBase {
public
String
getAuditUserName
()
{
return
this
.
auditUserName
;
}
/**
* set the auditUserName - 审核人名称.
*
...
...
@@ -871,7 +882,7 @@ public class HGCG001 extends DaoEPBase {
public
String
getAuditReason
()
{
return
this
.
auditReason
;
}
/**
* set the auditReason - 审核原因.
*
...
...
@@ -880,6 +891,23 @@ public class HGCG001 extends DaoEPBase {
public
void
setAuditReason
(
String
auditReason
)
{
this
.
auditReason
=
auditReason
;
}
public
Integer
getInventTypeDetail
()
{
return
inventTypeDetail
;
}
public
void
setInventTypeDetail
(
Integer
inventTypeDetail
)
{
this
.
inventTypeDetail
=
inventTypeDetail
;
}
public
Long
getMaterialPlanId
()
{
return
materialPlanId
;
}
public
void
setMaterialPlanId
(
Long
materialPlanId
)
{
this
.
materialPlanId
=
materialPlanId
;
}
/**
* get the value from Map.
*
...
...
@@ -887,7 +915,7 @@ public class HGCG001 extends DaoEPBase {
*/
@Override
public
void
fromMap
(
Map
map
)
{
setId
(
NumberUtils
.
toLong
(
StringUtils
.
toString
(
map
.
get
(
FIELD_ID
)),
id
));
setAccountCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_ACCOUNT_CODE
)),
accountCode
));
setDepCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_DEP_CODE
)),
depCode
));
...
...
@@ -923,14 +951,16 @@ public class HGCG001 extends DaoEPBase {
setAuditUserId
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_AUDIT_USER_ID
)),
auditUserId
));
setAuditUserName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_AUDIT_USER_NAME
)),
auditUserName
));
setAuditReason
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_AUDIT_REASON
)),
auditReason
));
setMaterialPlanId
(
NumberUtils
.
toLong
(
StringUtils
.
toString
(
map
.
get
(
FIELD_MATERIAL_PLAN_ID
)),
materialPlanId
));
setInventTypeDetail
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INVENT_TYPE_DETAIL
)),
inventTypeDetail
));
}
/**
* set the value to Map.
*/
@Override
public
Map
toMap
()
{
Map
map
=
new
HashMap
();
map
.
put
(
FIELD_ID
,
StringUtils
.
toString
(
id
,
eiMetadata
.
getMeta
(
FIELD_ID
)));
map
.
put
(
FIELD_ACCOUNT_CODE
,
StringUtils
.
toString
(
accountCode
,
eiMetadata
.
getMeta
(
FIELD_ACCOUNT_CODE
)));
...
...
@@ -967,7 +997,8 @@ public class HGCG001 extends DaoEPBase {
map
.
put
(
FIELD_AUDIT_USER_ID
,
StringUtils
.
toString
(
auditUserId
,
eiMetadata
.
getMeta
(
FIELD_AUDIT_USER_ID
)));
map
.
put
(
FIELD_AUDIT_USER_NAME
,
StringUtils
.
toString
(
auditUserName
,
eiMetadata
.
getMeta
(
FIELD_AUDIT_USER_NAME
)));
map
.
put
(
FIELD_AUDIT_REASON
,
StringUtils
.
toString
(
auditReason
,
eiMetadata
.
getMeta
(
FIELD_AUDIT_REASON
)));
map
.
put
(
FIELD_MATERIAL_PLAN_ID
,
StringUtils
.
toString
(
materialPlanId
,
eiMetadata
.
getMeta
(
FIELD_MATERIAL_PLAN_ID
)));
map
.
put
(
FIELD_INVENT_TYPE_DETAIL
,
StringUtils
.
toString
(
inventTypeDetail
,
eiMetadata
.
getMeta
(
FIELD_INVENT_TYPE_DETAIL
)));
return
map
;
}
}
src/main/java/com/baosight/hggp/hg/cg/sql/HGCG001.xml
View file @
591b0662
...
...
@@ -37,7 +37,9 @@
AUDIT_TIME as "auditTime",
<!-- 审核时间 -->
AUDIT_USER_ID as "auditUserId",
<!-- 审核人ID -->
AUDIT_USER_NAME as "auditUserName",
<!-- 审核人名称 -->
AUDIT_REASON as "auditReason"
<!-- 审核原因 -->
AUDIT_REASON as "auditReason",
<!-- 审核原因 -->
INVENT_TYPE_DETAIL as "inventTypeDetail",
<!-- 存货类型明细 -->
MATERIAL_PLAN_ID as "materialPlanId"
<!-- 材料计划id -->
</sql>
<sql
id=
"condition"
>
...
...
@@ -78,6 +80,12 @@
<isNotEmpty
prepend=
" AND "
property=
"auditUserName"
>
AUDIT_USER_NAME = #auditUserName#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"inventTypeDetail"
>
INVENT_TYPE_DETAIL = #inventTypeDetail#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"materialPlanId"
>
MATERIAL_PLAN_ID = #materialPlanId#
</isNotEmpty>
</sql>
<sql
id=
"idCondition"
>
...
...
@@ -90,6 +98,9 @@
<isNotEmpty
prepend=
" AND "
property=
"planNos"
>
PLAN_NO IN
<iterate
open=
"("
close=
")"
conjunction=
","
property=
"planNos"
>
#planNos[]#
</iterate>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"materialPlanIds"
>
MATERIAL_PLAN_ID IN
<iterate
open=
"("
close=
")"
conjunction=
","
property=
"materialPlanIds"
>
#materialPlanIds[]#
</iterate>
</isNotEmpty>
</sql>
<sql
id=
"customCondition"
>
...
...
@@ -152,12 +163,14 @@
PLAN_QTY,
<!-- 计划数量 -->
PLAN_UNIT_WEIGHT,
<!-- 计划单重 -->
PLAN_WEIGHT,
<!-- 计划重量 -->
STATUS
<!-- 状态:0-未审批,1-审核通过,2-审核未通过 -->
STATUS,
<!-- 状态:0-未审批,1-审核通过,2-审核未通过 -->
INVENT_TYPE_DETAIL,
<!-- 存货类型明细 -->
MATERIAL_PLAN_ID
<!-- 材料计划id -->
) VALUES (
#accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#,
#companyCode#, #companyName#, #planDate#, #planNo#, #inventCode#, #inventName#,
#specId#, #spec#, #material#, #unit#, #length#, #width#, #thick#,
#planQty#, #planUnitWeight#, #planWeight#, #status#
#planQty#, #planUnitWeight#, #planWeight#, #status#
, #inventTypeDetail#, #materialPlanId#
)
</insert>
...
...
src/main/java/com/baosight/hggp/hg/cg/tools/HGCGTools.java
View file @
591b0662
...
...
@@ -23,7 +23,7 @@ import java.util.stream.Collectors;
* @date:2024/5/9,14:33
*/
public
class
HGCGTools
{
/**
* HGCG001 工具类
*
...
...
@@ -31,7 +31,7 @@ public class HGCGTools {
* @date:2024/5/9,14:33
*/
public
static
class
HgCg001
{
/**
* 锁
*
...
...
@@ -46,7 +46,7 @@ public class HGCGTools {
paramMap
.
put
(
"planNos"
,
planNos
);
DaoBase
.
getInstance
().
update
(
HGSqlConstant
.
HgCg001
.
LOCK
,
paramMap
);
}
/**
* 查询
*
...
...
@@ -69,7 +69,20 @@ public class HGCGTools {
Map
<
String
,
Object
>
paramMap
=
new
HashMap
();
return
DaoBase
.
getInstance
().
query
(
HGCG001
.
QUERY
,
paramMap
);
}
/**
* 查询
*
* @param materialPlanIds
* @return
*/
public
static
List
<
HGCG001
>
listByMaterialPlanIds
(
List
<
Long
>
materialPlanIds
)
{
AssertUtils
.
isEmpty
(
materialPlanIds
,
"材料计划id不能为空"
);
Map
<
String
,
Object
>
paramMap
=
new
HashMap
();
paramMap
.
put
(
"materialPlanIds"
,
materialPlanIds
);
return
DaoBase
.
getInstance
().
query
(
HGCG001
.
QUERY
,
paramMap
);
}
/**
* 查询
*
...
...
@@ -80,7 +93,7 @@ public class HGCGTools {
List
<
HGCG001
>
results
=
list
(
planNos
);
return
results
.
stream
().
collect
(
Collectors
.
toMap
(
HGCG001:
:
getPlanNo
,
item
->
item
));
}
/**
* 修改状态
*
...
...
@@ -95,9 +108,9 @@ public class HGCGTools {
paramMap
.
put
(
"status"
,
status
);
DaoUtils
.
update
(
HGSqlConstant
.
HgCg001
.
UPDATE_STATUS
,
paramMap
);
}
}
/**
* HGCG002 工具类
*
...
...
@@ -105,7 +118,7 @@ public class HGCGTools {
* @date:2024/5/9,14:33
*/
public
static
class
HgCg002
{
/**
* 锁
*
...
...
@@ -120,7 +133,7 @@ public class HGCGTools {
paramMap
.
put
(
"contractNos"
,
contractNos
);
DaoBase
.
getInstance
().
update
(
HGSqlConstant
.
HgCg002
.
LOCK
,
paramMap
);
}
/**
* 修改状态
*
...
...
@@ -135,7 +148,7 @@ public class HGCGTools {
paramMap
.
put
(
"status"
,
status
);
DaoUtils
.
update
(
HGSqlConstant
.
HgCg002
.
UPDATE_STATUS
,
paramMap
);
}
/**
* 修改状态
*
...
...
@@ -156,7 +169,7 @@ public class HGCGTools {
paramMap
.
put
(
HGCG002
.
FIELD_RECEIVE_WEIGHT
,
newReceiveQty
.
multiply
(
dbCg002
.
getPurUnitWeight
()));
DaoUtils
.
update
(
HGSqlConstant
.
HgCg002
.
UPDATE_RECEIVE
,
paramMap
);
}
/**
* 查询
*
...
...
@@ -169,7 +182,7 @@ public class HGCGTools {
paramMap
.
put
(
"contractNos"
,
contractNos
);
return
DaoBase
.
getInstance
().
query
(
HGCG002
.
QUERY
,
paramMap
);
}
/**
* 查询
*
...
...
@@ -180,9 +193,9 @@ public class HGCGTools {
List
<
HGCG002A
>
results
=
list
(
contractNos
);
return
results
.
stream
().
collect
(
Collectors
.
toMap
(
HGCG002A:
:
getContractNo
,
item
->
item
));
}
}
/**
* HGCG003 工具类
*
...
...
@@ -190,7 +203,7 @@ public class HGCGTools {
* @date:2024/5/9,14:33
*/
public
static
class
HgCg003
{
/**
* 锁
*
...
...
@@ -205,7 +218,7 @@ public class HGCGTools {
paramMap
.
put
(
"receiveNos"
,
receiveNos
);
DaoBase
.
getInstance
().
update
(
HGSqlConstant
.
HgCg003
.
LOCK
,
paramMap
);
}
/**
* 查询
*
...
...
@@ -218,7 +231,7 @@ public class HGCGTools {
paramMap
.
put
(
"receiveNos"
,
receiveNos
);
return
DaoBase
.
getInstance
().
query
(
HGCG003
.
QUERY
,
paramMap
);
}
/**
* 查询
*
...
...
@@ -229,7 +242,7 @@ public class HGCGTools {
List
<
HGCG003
>
results
=
list
(
receiveNos
);
return
results
.
stream
().
collect
(
Collectors
.
toMap
(
HGCG003:
:
getReceiveNo
,
item
->
item
));
}
/**
* 修改状态
*
...
...
@@ -244,7 +257,7 @@ public class HGCGTools {
paramMap
.
put
(
"status"
,
status
);
DaoUtils
.
update
(
HGSqlConstant
.
HgCg003
.
UPDATE_STATUS
,
paramMap
);
}
/**
* 修改状态
*
...
...
@@ -258,8 +271,8 @@ public class HGCGTools {
paramMap
.
put
(
HGCG003
.
FIELD_DEPOSIT_QTY
,
zl001
.
getQualifyQty
());
DaoUtils
.
update
(
HGSqlConstant
.
HgCg003
.
UPDATE_CONFIRM
,
paramMap
);
}
}
}
src/main/java/com/baosight/hggp/hg/sc/service/ServiceHGSC009A.java
View file @
591b0662
...
...
@@ -5,6 +5,7 @@ import com.baosight.hggp.common.AssignStatusEnum;
import
com.baosight.hggp.common.DdynamicEnum
;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.hg.cg.domain.HGCG001
;
import
com.baosight.hggp.hg.cg.tools.HGCGTools
;
import
com.baosight.hggp.hg.constant.HGConstant
;
import
com.baosight.hggp.hg.pz.domain.HGPZ005
;
import
com.baosight.hggp.hg.pz.tools.HGPZTools
;
...
...
@@ -31,7 +32,7 @@ import java.util.stream.Collectors;
* @date:2024/1/15,11:20
*/
public
class
ServiceHGSC009A
extends
ServiceBase
{
/**
* 画面初始化
*
...
...
@@ -50,7 +51,7 @@ public class ServiceHGSC009A extends ServiceBase {
}
return
inInfo
;
}
/**
* 查询数据列表
*
...
...
@@ -67,7 +68,7 @@ public class ServiceHGSC009A extends ServiceBase {
}
return
inInfo
;
}
/**
* 保存操作.
*
...
...
@@ -107,7 +108,7 @@ public class ServiceHGSC009A extends ServiceBase {
}
return
inInfo
;
}
/**
* 校验保存的数据
*
...
...
@@ -121,7 +122,7 @@ public class ServiceHGSC009A extends ServiceBase {
//AssertUtils.isNull(hgsc009A.s(), "是否启用不能为空");
}
}
/**
* 新增
*
...
...
@@ -133,7 +134,7 @@ public class ServiceHGSC009A extends ServiceBase {
DaoUtils
.
insert
(
HGSC009A
.
INSERT
,
hgsc009A
);
}
/**
* 修改数据
*
...
...
@@ -142,9 +143,9 @@ public class ServiceHGSC009A extends ServiceBase {
private
void
modify
(
HGSC009A
hgsc009A
)
{
DaoUtils
.
update
(
HGSC009A
.
UPDATE
,
hgsc009A
);
}
/**
* 修改操作
*
...
...
@@ -170,7 +171,7 @@ public class ServiceHGSC009A extends ServiceBase {
}
return
inInfo
;
}
/**
* 删除操作
*
...
...
@@ -219,11 +220,14 @@ public class ServiceHGSC009A extends ServiceBase {
inventUnitMap
=
hgpz005List
.
stream
().
collect
(
Collectors
.
toMap
(
HGPZ005:
:
getInventCode
,
HGPZ005:
:
getUnit
,(
v1
,
v2
)->
v1
));
}
}
// 数据校验
this
.
checkInsertcgData
(
hgsc009AList
);
for
(
HGSC009A
hgsc009
:
hgsc009AList
)
{
// 写入子表数据
HGCG001
hgcg001
=
new
HGCG001
();
BeanUtils
.
copyProperties
(
hgsc009
,
hgcg001
);
hgcg001
.
setMaterialPlanId
(
hgsc009
.
getId
());
hgcg001
.
setCompanyCode
(
hgsc009
.
getCompanyCode
());
hgcg001
.
setCompanyName
(
hgsc009
.
getCompanyName
());
hgcg001
.
setInventCode
(
hgsc009
.
getInventCode
());
...
...
@@ -250,5 +254,14 @@ public class ServiceHGSC009A extends ServiceBase {
}
return
inInfo
;
}
private
void
checkInsertcgData
(
List
<
HGSC009A
>
hgsc009AList
)
{
List
<
Long
>
materialPlanIds
=
hgsc009AList
.
stream
().
map
(
HGSC009A:
:
getId
).
collect
(
Collectors
.
toList
());
List
<
HGCG001
>
hgcg001List
=
HGCGTools
.
HgCg001
.
listByMaterialPlanIds
(
materialPlanIds
);
hgsc009AList
.
forEach
(
o
->{
HGCG001
hgcg001
=
hgcg001List
.
stream
().
filter
(
c
->
c
.
getMaterialPlanId
().
intValue
()
==
o
.
getId
()).
findAny
().
orElse
(
null
);
AssertUtils
.
isTrue
(
Objects
.
nonNull
(
hgcg001
),
String
.
format
(
"材料计划[%s]已生成采购计划"
,
o
.
getPlanMaterialCode
()));
});
}
}
src/main/webapp/HG/SC/HGSC009.js
View file @
591b0662
...
...
@@ -107,7 +107,6 @@ $(function () {
resultGrid
.
setCellValue
(
e
.
items
[
0
],
"companyName"
,
companyCodeBox
[
i
][
'companyName'
]);
}
}
loadChange
(
grid
,
e
,
"projCode"
);
}
// 判断父级节点是否发生变化
if
(
e
.
field
==
"projCode"
)
{
...
...
@@ -136,9 +135,6 @@ $(function () {
}
let
query
=
function
()
{
resultGrid
.
dataSource
.
page
(
1
);
}
let
save
=
function
(
btnNode
)
{
let
rows
=
resultGrid
.
getCheckedRows
();
if
(
rows
.
length
<
1
)
{
...
...
@@ -174,6 +170,9 @@ $(function () {
});
let
query
=
function
()
{
resultGrid
.
dataSource
.
page
(
1
);
}
/**
* 显示附件详情
*
...
...
@@ -237,8 +236,12 @@ function INSERTCG() {
ok
:
function
()
{
EiCommunicator
.
send
(
'HGSC009A'
,
'insertcg'
,
inEiInfo
,
{
onSuccess
(
response
)
{
NotificationUtil
(
response
.
msg
);
query
();
if
(
response
.
status
==
1
){
NotificationUtil
(
response
.
msg
);
query
();
}
else
{
NotificationUtil
(
response
.
msg
,
"error"
);
}
},
onFail
(
errorMessage
,
status
,
e
)
{
NotificationUtil
(
"执行失败!"
,
"error"
);
...
...
src/main/webapp/HG/SC/HGSC009.jsp
View file @
591b0662
...
...
@@ -29,13 +29,13 @@
<EF:EFColumn ename="id" primaryKey="true" cname="内码" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="150" align="center"/>
<EF:EFComboColumn ename="companyCode" cname="公司名称"
columnTemplate="#=
textField#" itemTemplate="#=textField
#"
textField="
textField" valueField="valueField
"
maxLength="16" readonly="false" width="
2
00" required="true"
columnTemplate="#=
companyName#" itemTemplate="#=companyName
#"
textField="
companyName" valueField="companyCode
"
maxLength="16" readonly="false" width="
1
00" required="true"
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="roleCompany" textField="companyName" valueField="companyCode"/>
</EF:EFComboColumn>
<EF:EFColumn ename="companyName" cname="公司名称" width="120" enable="false" readonly="true" align="center"
hidden="true"
/>
<EF:EFColumn ename="companyName" cname="公司名称" width="120" enable="false" readonly="true" align="center"/>
<%-- <EF:EFComboColumn ename="projCode" cname="项目编码"--%>
<%-- columnTemplate="#=textField#" itemTemplate="#=textField#"--%>
<%-- textField="textField" valueField="valueField"--%>
...
...
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