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
8374a3d3
Commit
8374a3d3
authored
Sep 14, 2024
by
宋祥
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.计划明细增加计划行号
parent
cb9ba8d3
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
185 additions
and
161 deletions
+185
-161
HGCG001A.java
src/main/java/com/baosight/hggp/hg/cg/domain/HGCG001A.java
+17
-1
ServiceHGCG001A.java
...java/com/baosight/hggp/hg/cg/service/ServiceHGCG001A.java
+16
-7
HGCG001A.xml
src/main/java/com/baosight/hggp/hg/cg/sql/HGCG001A.xml
+148
-153
HGConstant.java
src/main/java/com/baosight/hggp/hg/constant/HGConstant.java
+2
-0
ServiceHGSC009A.java
...java/com/baosight/hggp/hg/sc/service/ServiceHGSC009A.java
+2
-0
No files found.
src/main/java/com/baosight/hggp/hg/cg/domain/HGCG001A.java
View file @
8374a3d3
...
...
@@ -36,6 +36,7 @@ public class HGCG001A extends DaoEPBase {
public
static
final
String
FIELD_COMPANY_NAME
=
"companyName"
;
/* 公司名称*/
public
static
final
String
FIELD_PLAN_DATE
=
"planDate"
;
/* 计划日期*/
public
static
final
String
FIELD_PLAN_NO
=
"planNo"
;
/* 计划单号*/
public
static
final
String
FIELD_PLAN_LINE_NO
=
"planLineNo"
;
/* 计划单行号*/
public
static
final
String
FIELD_INVENT_TYPE
=
"inventType"
;
/* 存货类型*/
public
static
final
String
FIELD_INVENT_CODE
=
"inventCode"
;
/* 存货编码*/
public
static
final
String
FIELD_INVENT_NAME
=
"inventName"
;
/* 存货名称*/
...
...
@@ -122,6 +123,7 @@ public class HGCG001A extends DaoEPBase {
private
String
companyName
=
" "
;
/* 公司名称*/
private
String
planDate
=
" "
;
/* 计划日期*/
private
String
planNo
=
" "
;
/* 计划单号*/
private
String
planLineNo
=
" "
;
/* 计划单行号*/
private
String
inventType
=
" "
;
/* 存货类型*/
private
String
inventCode
=
" "
;
/* 存货编码*/
private
String
inventName
=
" "
;
/* 存货名称*/
...
...
@@ -216,7 +218,11 @@ public class HGCG001A extends DaoEPBase {
eiColumn
=
new
EiColumn
(
FIELD_PLAN_NO
);
eiColumn
.
setDescName
(
"计划单号"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_PLAN_LINE_NO
);
eiColumn
.
setDescName
(
"计划单行号"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_INVENT_TYPE
);
eiColumn
.
setDescName
(
"存货类型"
);
eiMetadata
.
addMeta
(
eiColumn
);
...
...
@@ -984,6 +990,14 @@ public class HGCG001A extends DaoEPBase {
this
.
calculationMethod
=
calculationMethod
;
}
public
String
getPlanLineNo
()
{
return
planLineNo
;
}
public
void
setPlanLineNo
(
String
planLineNo
)
{
this
.
planLineNo
=
planLineNo
;
}
/**
* get the value from Map.
*
...
...
@@ -1006,6 +1020,7 @@ public class HGCG001A extends DaoEPBase {
setCompanyName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_COMPANY_NAME
)),
companyName
));
setPlanDate
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PLAN_DATE
)),
planDate
));
setPlanNo
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PLAN_NO
)),
planNo
));
setPlanLineNo
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PLAN_LINE_NO
)),
planLineNo
));
setInventType
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INVENT_TYPE
)),
inventType
));
setInventCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INVENT_CODE
)),
inventCode
));
setInventName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INVENT_NAME
)),
inventName
));
...
...
@@ -1059,6 +1074,7 @@ public class HGCG001A extends DaoEPBase {
map
.
put
(
FIELD_COMPANY_NAME
,
StringUtils
.
toString
(
companyName
,
eiMetadata
.
getMeta
(
FIELD_COMPANY_NAME
)));
map
.
put
(
FIELD_PLAN_DATE
,
StringUtils
.
toString
(
planDate
,
eiMetadata
.
getMeta
(
FIELD_PLAN_DATE
)));
map
.
put
(
FIELD_PLAN_NO
,
StringUtils
.
toString
(
planNo
,
eiMetadata
.
getMeta
(
FIELD_PLAN_NO
)));
map
.
put
(
FIELD_PLAN_LINE_NO
,
StringUtils
.
toString
(
planLineNo
,
eiMetadata
.
getMeta
(
FIELD_PLAN_LINE_NO
)));
map
.
put
(
FIELD_INVENT_TYPE
,
StringUtils
.
toString
(
inventType
,
eiMetadata
.
getMeta
(
FIELD_INVENT_TYPE
)));
map
.
put
(
FIELD_INVENT_CODE
,
StringUtils
.
toString
(
inventCode
,
eiMetadata
.
getMeta
(
FIELD_INVENT_CODE
)));
map
.
put
(
FIELD_INVENT_NAME
,
StringUtils
.
toString
(
inventName
,
eiMetadata
.
getMeta
(
FIELD_INVENT_NAME
)));
...
...
src/main/java/com/baosight/hggp/hg/cg/service/ServiceHGCG001A.java
View file @
8374a3d3
...
...
@@ -22,6 +22,7 @@ import com.baosight.hggp.util.contants.ACConstants;
import
com.baosight.iplat4j.core.ei.EiConstant
;
import
com.baosight.iplat4j.core.ei.EiInfo
;
import
com.baosight.iplat4j.core.service.impl.ServiceBase
;
import
com.baosight.iplat4j.ed.util.SequenceGenerator
;
import
java.math.BigDecimal
;
import
java.math.RoundingMode
;
...
...
@@ -121,25 +122,33 @@ public class ServiceHGCG001A extends ServiceBase {
AssertUtils
.
isGe
(
BigDecimal
.
ZERO
,
fCg001a
.
getPurWeight
(),
String
.
format
(
"计划明细[%s]采购重量必须大于0"
,
fCg001a
.
getInventCode
()));
}
}
/**
* 数据保存
*
* @param fCg001s
*/
private
void
saveData
(
List
<
HGCG001A
>
fCg001s
,
HGCG001
c
g001
)
{
private
void
saveData
(
List
<
HGCG001A
>
fCg001s
,
HGCG001
dbC
g001
)
{
for
(
HGCG001A
fCg001a
:
fCg001s
)
{
fCg001a
.
setPurUnitWeight
(
fCg001a
.
getPurWeight
().
divide
(
fCg001a
.
getPurQty
(),
3
,
RoundingMode
.
HALF_UP
));
if
(
fCg001a
.
getId
()
==
null
||
fCg001a
.
getId
()
==
0
){
BeanUtils
.
copyProperties
(
cg001
,
fCg001a
,
"id"
,
"createdBy"
,
"createdName"
,
"createdTime"
,
"updatedBy"
,
"updatedName"
,
"updatedTime"
,
"inventType"
,
"inventTypeDetail"
,
"inventCode"
,
"inventName"
,
"spec"
,
"material"
,
"unit"
,
"length"
,
"width"
,
"thick"
,
"purQty"
,
"purUnitWeight"
,
"purWeight"
);
if
(
fCg001a
.
getId
()
==
null
||
fCg001a
.
getId
()
==
0
)
{
fCg001a
.
setPlanDate
(
dbCg001
.
getPlanDate
());
fCg001a
.
setPlanNo
(
dbCg001
.
getPlanNo
());
fCg001a
.
setPlanLineNo
(
SequenceGenerator
.
getNextSequence
(
HGConstant
.
SequenceId
.
CG_PLAN_LINE_NO
,
new
String
[]{
dbCg001
.
getPlanNo
()}));
fCg001a
.
setCompanyCode
(
dbCg001
.
getCompanyCode
());
fCg001a
.
setCompanyName
(
dbCg001
.
getCompanyName
());
fCg001a
.
setProjCode
(
dbCg001
.
getProjCode
());
fCg001a
.
setProjName
(
dbCg001
.
getProjName
());
fCg001a
.
setStatus
(
HGConstant
.
CgPlanStatus
.
S_0
);
fCg001a
.
setDeleteFlag
(
DeleteFlagEnum
.
UN_REMOVE
.
getCode
());
DaoUtils
.
insert
(
HGCG001A
.
INSERT
,
fCg001a
);
}
else
{
}
else
{
DaoUtils
.
update
(
HGCG001A
.
UPDATE
,
fCg001a
);
}
}
//修改主表数量
updateCg001Pur
(
c
g001
);
updateCg001Pur
(
dbC
g001
);
}
private
void
updateCg001Pur
(
HGCG001
cg001
)
{
...
...
src/main/java/com/baosight/hggp/hg/cg/sql/HGCG001A.xml
View file @
8374a3d3
...
...
@@ -2,11 +2,51 @@
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
<sqlMap
namespace=
"HGCG001A"
>
<sql
id=
"column"
>
ID as "id",
ACCOUNT_CODE as "accountCode",
<!-- 企业编码 -->
DEP_CODE as "depCode",
<!-- 部门编码 -->
CREATED_BY as "createdBy",
<!-- 记录创建者 -->
CREATED_NAME as "createdName",
<!-- 记录创建名称 -->
CREATED_TIME as "createdTime",
<!-- 记录创建时间 -->
UPDATED_BY as "updatedBy",
<!-- 记录修改者 -->
UPDATED_NAME as "updatedName",
<!-- 记录修改名称 -->
UPDATED_TIME as "updatedTime",
<!-- 记录修改时间 -->
DELETE_FLAG as "deleteFlag",
<!-- 0-未删除,1-已删除 -->
COMPANY_CODE as "companyCode",
<!-- 公司编码 -->
COMPANY_NAME as "companyName",
<!-- 公司名称 -->
PLAN_DATE as "planDate",
<!-- 计划日期 -->
PLAN_NO as "planNo",
<!-- 计划单号 -->
PLAN_LINE_NO as "planLineNo",
<!-- 计划单号 -->
INVENT_TYPE as "inventType",
<!-- 存货类型 -->
INVENT_CODE as "inventCode",
<!-- 存货编码 -->
INVENT_NAME as "inventName",
<!-- 存货名称 -->
SPEC as "spec",
<!-- 规格 -->
MATERIAL as "material",
<!-- 材质 -->
UNIT as "unit",
<!-- 单位 -->
LENGTH as "length",
<!-- 长度 -->
WIDTH as "width",
<!-- 宽度 -->
THICK as "thick",
<!-- 厚度 -->
PLAN_QTY as "planQty",
<!-- 计划数量 -->
PLAN_UNIT_WEIGHT as "planUnitWeight",
<!-- 计划单重 -->
PLAN_WEIGHT as "planWeight",
<!-- 计划重量 -->
PUR_QTY as "purQty",
<!-- 采购数量 -->
PUR_UNIT_WEIGHT as "purUnitWeight",
<!-- 采购单重 -->
PUR_WEIGHT as "purWeight",
<!-- 采购重量 -->
MATERIAL_PLAN_ID as "materialPlanId",
<!-- 材料计划id -->
INVENT_TYPE_DETAIL as "inventTypeDetail",
<!-- 存货类型大类 -->
STATUS as "status",
<!-- 状态:0-未审批,1-审核通过,2-审核未通过 -->
REMARKS as "remarks",
<!-- 备注 -->
PROJ_CODE as "projCode",
PROJ_NAME as "projName",
PROJ_CODE as "projCode",
<!-- 项目编码 -->
PROJ_NAME as "projName",
<!-- 项目名称 -->
PRIMARY_ID as "primaryId"
<!-- 主表id -->
</sql>
<sql
id=
"condition"
>
AND DELETE_FLAG = 0
<isNotEmpty
prepend=
" AND "
property=
"id"
>
ID = #id#
</isNotEmpty>
<include
refid=
"idCondition"
/>
<isNotEmpty
prepend=
" AND "
property=
"accountCode"
>
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
...
...
@@ -121,6 +161,12 @@
<isNotEmpty
prepend=
" AND "
property=
"ids"
>
ID IN
<iterate
open=
"("
close=
")"
conjunction=
","
property=
"ids"
>
#ids[]#
</iterate>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"planLineNo"
>
PLAN_LINE_NO = #planLineNo#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"planLineNos"
>
PLAN_LINE_NO IN
<iterate
open=
"("
close=
")"
conjunction=
","
property=
"planLineNos"
>
#planLineNos[]#
</iterate>
</isNotEmpty>
</sql>
<sql
id=
"conditionByContract"
>
...
...
@@ -245,72 +291,29 @@
</isNotEmpty>
</sql>
<!-- 公共修改字段 -->
<sql
id=
"updateRevise"
>
UPDATED_BY = #updatedBy#,
UPDATED_NAME = #updatedName#,
UPDATED_TIME = #updatedTime#
</sql>
<sql
id=
"orderBy"
>
<dynamic
prepend=
"ORDER BY"
>
<isNotEmpty
property=
"orderBy"
>
$orderBy$
</isNotEmpty>
<isEmpty
property=
"orderBy"
>
ID desc
</isEmpty>
</dynamic>
</sql>
<select
id=
"query"
parameterClass=
"java.util.HashMap"
resultClass=
"com.baosight.hggp.hg.cg.domain.HGCG001A"
>
SELECT
ID as "id",
ACCOUNT_CODE as "accountCode",
<!-- 企业编码 -->
DEP_CODE as "depCode",
<!-- 部门编码 -->
CREATED_BY as "createdBy",
<!-- 记录创建者 -->
CREATED_NAME as "createdName",
<!-- 记录创建名称 -->
CREATED_TIME as "createdTime",
<!-- 记录创建时间 -->
UPDATED_BY as "updatedBy",
<!-- 记录修改者 -->
UPDATED_NAME as "updatedName",
<!-- 记录修改名称 -->
UPDATED_TIME as "updatedTime",
<!-- 记录修改时间 -->
DELETE_FLAG as "deleteFlag",
<!-- 0-未删除,1-已删除 -->
COMPANY_CODE as "companyCode",
<!-- 公司编码 -->
COMPANY_NAME as "companyName",
<!-- 公司名称 -->
PLAN_DATE as "planDate",
<!-- 计划日期 -->
PLAN_NO as "planNo",
<!-- 计划单号 -->
INVENT_TYPE as "inventType",
<!-- 存货类型 -->
INVENT_CODE as "inventCode",
<!-- 存货编码 -->
INVENT_NAME as "inventName",
<!-- 存货名称 -->
SPEC as "spec",
<!-- 规格 -->
MATERIAL as "material",
<!-- 材质 -->
UNIT as "unit",
<!-- 单位 -->
LENGTH as "length",
<!-- 长度 -->
WIDTH as "width",
<!-- 宽度 -->
THICK as "thick",
<!-- 厚度 -->
PLAN_QTY as "planQty",
<!-- 计划数量 -->
PLAN_UNIT_WEIGHT as "planUnitWeight",
<!-- 计划单重 -->
PLAN_WEIGHT as "planWeight",
<!-- 计划重量 -->
PUR_QTY as "purQty",
<!-- 采购数量 -->
PUR_UNIT_WEIGHT as "purUnitWeight",
<!-- 采购单重 -->
PUR_WEIGHT as "purWeight",
<!-- 采购重量 -->
MATERIAL_PLAN_ID as "materialPlanId",
<!-- 材料计划id -->
INVENT_TYPE_DETAIL as "inventTypeDetail",
<!-- 存货类型大类 -->
STATUS as "status",
<!-- 状态:0-未审批,1-审核通过,2-审核未通过 -->
REMARKS as "remarks",
<!-- 备注 -->
PROJ_CODE as "projCode",
PROJ_NAME as "projName",
PROJ_CODE as "projCode",
<!-- 项目编码 -->
PROJ_NAME as "projName",
<!-- 项目名称 -->
PRIMARY_ID as "primaryId"
<!-- 主表id -->
FROM ${hggpSchema}.HGCG001A WHERE 1=1
<include
refid=
"condition"
/>
<include
refid=
"idCondition"
/>
<dynamic
prepend=
"ORDER BY"
>
<isNotEmpty
property=
"orderBy"
>
$orderBy$
</isNotEmpty>
<isEmpty
property=
"orderBy"
>
ID desc
</isEmpty>
</dynamic>
</select>
<select
id=
"query"
resultClass=
"com.baosight.hggp.hg.cg.domain.HGCG001A"
>
SELECT
<include
refid=
"column"
/>
FROM ${hggpSchema}.HGCG001A WHERE 1=1
<include
refid=
"condition"
/>
<include
refid=
"orderBy"
/>
</select>
<select
id=
"count"
resultClass=
"int"
>
SELECT COUNT(*) FROM ${hggpSchema}.HGCG001A WHERE 1=1
<include
refid=
"condition"
/>
</select>
<select
id=
"count"
resultClass=
"int"
>
SELECT COUNT(*) FROM ${hggpSchema}.HGCG001A WHERE 1=1
<include
refid=
"condition"
/>
</select>
<select
id=
"queryByContract"
resultClass=
"com.baosight.hggp.hg.cg.domain.HGCG001A"
>
SELECT
...
...
@@ -365,93 +368,83 @@
</dynamic>
</select>
<insert
id=
"insert"
>
INSERT INTO ${hggpSchema}.HGCG001A (ID,
ACCOUNT_CODE,
<!-- 企业编码 -->
DEP_CODE,
<!-- 部门编码 -->
CREATED_BY,
<!-- 记录创建者 -->
CREATED_NAME,
<!-- 记录创建名称 -->
CREATED_TIME,
<!-- 记录创建时间 -->
UPDATED_BY,
<!-- 记录修改者 -->
UPDATED_NAME,
<!-- 记录修改名称 -->
UPDATED_TIME,
<!-- 记录修改时间 -->
DELETE_FLAG,
<!-- 0-未删除,1-已删除 -->
COMPANY_CODE,
<!-- 公司编码 -->
COMPANY_NAME,
<!-- 公司名称 -->
PLAN_DATE,
<!-- 计划日期 -->
PLAN_NO,
<!-- 计划单号 -->
INVENT_TYPE,
<!-- 存货类型 -->
INVENT_CODE,
<!-- 存货编码 -->
INVENT_NAME,
<!-- 存货名称 -->
SPEC,
<!-- 规格 -->
MATERIAL,
<!-- 材质 -->
UNIT,
<!-- 单位 -->
LENGTH,
<!-- 长度 -->
WIDTH,
<!-- 宽度 -->
THICK,
<!-- 厚度 -->
PLAN_QTY,
<!-- 计划数量 -->
PLAN_UNIT_WEIGHT,
<!-- 计划单重 -->
PLAN_WEIGHT,
<!-- 计划重量 -->
PUR_QTY,
<!-- 采购数量 -->
PUR_UNIT_WEIGHT,
<!-- 采购单重 -->
PUR_WEIGHT,
<!-- 采购重量 -->
MATERIAL_PLAN_ID,
<!-- 材料计划id -->
INVENT_TYPE_DETAIL,
<!-- 存货类型大类 -->
STATUS,
PRIMARY_ID,
<!-- 主表id -->
PROJ_CODE,
<!-- 项目编码 -->
PROJ_NAME,
<!-- 项目名称 -->
REMARKS
)
VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #companyCode#, #companyName#, #planDate#, #planNo#, #inventType#, #inventCode#, #inventName#, #spec#, #material#, #unit#, #length#, #width#, #thick#, #planQty#, #planUnitWeight#, #planWeight#, #purQty#, #purUnitWeight#, #purWeight#, #materialPlanId#, #inventTypeDetail#,#status#, #primaryId#,#projCode#,#projName#, #remarks#)
</insert>
<insert
id=
"insert"
>
INSERT INTO ${hggpSchema}.HGCG001A (
ACCOUNT_CODE,
<!-- 企业编码 -->
DEP_CODE,
<!-- 部门编码 -->
CREATED_BY,
<!-- 记录创建者 -->
CREATED_NAME,
<!-- 记录创建名称 -->
CREATED_TIME,
<!-- 记录创建时间 -->
DELETE_FLAG,
<!-- 0-未删除,1-已删除 -->
COMPANY_CODE,
<!-- 公司编码 -->
COMPANY_NAME,
<!-- 公司名称 -->
PLAN_DATE,
<!-- 计划日期 -->
PLAN_NO,
<!-- 计划单号 -->
PLAN_LINE_NO,
<!-- 计划单行号 -->
INVENT_TYPE,
<!-- 存货类型 -->
INVENT_CODE,
<!-- 存货编码 -->
INVENT_NAME,
<!-- 存货名称 -->
SPEC,
<!-- 规格 -->
MATERIAL,
<!-- 材质 -->
UNIT,
<!-- 单位 -->
LENGTH,
<!-- 长度 -->
WIDTH,
<!-- 宽度 -->
THICK,
<!-- 厚度 -->
PLAN_QTY,
<!-- 计划数量 -->
PLAN_UNIT_WEIGHT,
<!-- 计划单重 -->
PLAN_WEIGHT,
<!-- 计划重量 -->
PUR_QTY,
<!-- 采购数量 -->
PUR_UNIT_WEIGHT,
<!-- 采购单重 -->
PUR_WEIGHT,
<!-- 采购重量 -->
MATERIAL_PLAN_ID,
<!-- 材料计划id -->
INVENT_TYPE_DETAIL,
<!-- 存货类型大类 -->
STATUS,
PRIMARY_ID,
<!-- 主表id -->
PROJ_CODE,
<!-- 项目编码 -->
PROJ_NAME,
<!-- 项目名称 -->
REMARKS
) VALUES (
#accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#,
#deleteFlag#, #companyCode#, #companyName#, #planDate#, #planNo#, #planLineNo#, #inventType#, #inventCode#,
#inventName#, #spec#, #material#, #unit#, #length#, #width#, #thick#, #planQty#, #planUnitWeight#, #planWeight#,
#purQty#, #purUnitWeight#, #purWeight#, #materialPlanId#, #inventTypeDetail#,#status#,
#primaryId#,#projCode#,#projName#, #remarks#)
</insert>
<delete
id=
"delete"
>
DELETE FROM ${hggpSchema}.HGCG001A WHERE
ID = #id#
</delete>
<delete
id=
"delete"
>
DELETE FROM ${hggpSchema}.HGCG001A WHERE ID = #id#
</delete>
<update
id=
"update"
>
UPDATE ${hggpSchema}.HGCG001A
SET
ACCOUNT_CODE = #accountCode#,
<!-- 企业编码 -->
DEP_CODE = #depCode#,
<!-- 部门编码 -->
CREATED_BY = #createdBy#,
<!-- 记录创建者 -->
CREATED_NAME = #createdName#,
<!-- 记录创建名称 -->
CREATED_TIME = #createdTime#,
<!-- 记录创建时间 -->
UPDATED_BY = #updatedBy#,
<!-- 记录修改者 -->
UPDATED_NAME = #updatedName#,
<!-- 记录修改名称 -->
UPDATED_TIME = #updatedTime#,
<!-- 记录修改时间 -->
DELETE_FLAG = #deleteFlag#,
<!-- 0-未删除,1-已删除 -->
COMPANY_CODE = #companyCode#,
<!-- 公司编码 -->
COMPANY_NAME = #companyName#,
<!-- 公司名称 -->
PLAN_DATE = #planDate#,
<!-- 计划日期 -->
PLAN_NO = #planNo#,
<!-- 计划单号 -->
INVENT_TYPE = #inventType#,
<!-- 存货类型 -->
INVENT_CODE = #inventCode#,
<!-- 存货编码 -->
INVENT_NAME = #inventName#,
<!-- 存货名称 -->
SPEC = #spec#,
<!-- 规格 -->
MATERIAL = #material#,
<!-- 材质 -->
UNIT = #unit#,
<!-- 单位 -->
LENGTH = #length#,
<!-- 长度 -->
WIDTH = #width#,
<!-- 宽度 -->
THICK = #thick#,
<!-- 厚度 -->
PLAN_QTY = #planQty#,
<!-- 计划数量 -->
PLAN_UNIT_WEIGHT = #planUnitWeight#,
<!-- 计划单重 -->
PLAN_WEIGHT = #planWeight#,
<!-- 计划重量 -->
PUR_QTY = #purQty#,
<!-- 采购数量 -->
PUR_UNIT_WEIGHT = #purUnitWeight#,
<!-- 采购单重 -->
PUR_WEIGHT = #purWeight#,
<!-- 采购重量 -->
MATERIAL_PLAN_ID = #materialPlanId#,
<!-- 材料计划id -->
INVENT_TYPE_DETAIL = #inventTypeDetail#,
<!-- 存货类型大类 -->
STATUS = #status#,
REMARKS = #remarks#,
PROJ_CODE = #projCode#,
<!-- 项目编码 -->
PROJ_NAME = #projName#,
<!-- 项目名称 -->
PRIMARY_ID = #primaryId#
<!-- 主表id -->
WHERE
ID = #id#
</update>
UPDATE ${hggpSchema}.HGCG001A
SET
COMPANY_CODE = #companyCode#,
<!-- 公司编码 -->
COMPANY_NAME = #companyName#,
<!-- 公司名称 -->
PLAN_DATE = #planDate#,
<!-- 计划日期 -->
INVENT_TYPE = #inventType#,
<!-- 存货类型 -->
INVENT_CODE = #inventCode#,
<!-- 存货编码 -->
INVENT_NAME = #inventName#,
<!-- 存货名称 -->
SPEC = #spec#,
<!-- 规格 -->
MATERIAL = #material#,
<!-- 材质 -->
UNIT = #unit#,
<!-- 单位 -->
LENGTH = #length#,
<!-- 长度 -->
WIDTH = #width#,
<!-- 宽度 -->
THICK = #thick#,
<!-- 厚度 -->
PLAN_QTY = #planQty#,
<!-- 计划数量 -->
PLAN_UNIT_WEIGHT = #planUnitWeight#,
<!-- 计划单重 -->
PLAN_WEIGHT = #planWeight#,
<!-- 计划重量 -->
PUR_QTY = #purQty#,
<!-- 采购数量 -->
PUR_UNIT_WEIGHT = #purUnitWeight#,
<!-- 采购单重 -->
PUR_WEIGHT = #purWeight#,
<!-- 采购重量 -->
MATERIAL_PLAN_ID = #materialPlanId#,
<!-- 材料计划id -->
INVENT_TYPE_DETAIL = #inventTypeDetail#,
<!-- 存货类型大类 -->
STATUS = #status#,
REMARKS = #remarks#,
PROJ_CODE = #projCode#,
<!-- 项目编码 -->
PROJ_NAME = #projName#,
<!-- 项目名称 -->
<include
refid=
"SqlBase.updateRevise"
/>
WHERE ID = #id#
</update>
<!-- 行锁 -->
<update
id=
"lock"
>
...
...
@@ -466,15 +459,17 @@
UPDATE ${hggpSchema}.HGCG001A
SET
STATUS = #status#,
<!-- 状态:0-未审批,1-审核通过,2-审核未通过 -->
<include
refid=
"
updateRevise"
/>
<include
refid=
"SqlBase.
updateRevise"
/>
WHERE PLAN_NO = #planNo#
</update>
<!-- 修改状态信息 -->
<update
id=
"updateStatusById"
>
UPDATE ${hggpSchema}.HGCG001A
SET
STATUS = #status#,
<!-- 状态:0-未审批,1-审核通过,2-审核未通过 -->
<include
refid=
"
updateRevise"
/>
<include
refid=
"SqlBase.
updateRevise"
/>
WHERE ID = #id#
</update>
</sqlMap>
src/main/java/com/baosight/hggp/hg/constant/HGConstant.java
View file @
8374a3d3
...
...
@@ -99,6 +99,8 @@ public class HGConstant {
public
static
final
String
APPLY_CODE
=
"APPLY_CODE"
;
// 采购计划号
public
static
final
String
CG_PLAN_NO
=
"CG_PLAN_NO"
;
// 采购计划行号
public
static
final
String
CG_PLAN_LINE_NO
=
"CG_PLAN_LINE_NO"
;
// 采购合同号
public
static
final
String
CG_CONTRACT_NO
=
"CG_CONTRACT_NO"
;
// 采购合同行号
...
...
src/main/java/com/baosight/hggp/hg/sc/service/ServiceHGSC009A.java
View file @
8374a3d3
...
...
@@ -268,6 +268,8 @@ public class ServiceHGSC009A extends ServiceBase {
cg001A
.
setPlanWeight
(
hgsc009A
.
getGrossAmount
());
cg001A
.
setPlanQty
(
hgsc009A
.
getQuantity
());
cg001A
.
setPlanNo
(
hgcg001
.
getPlanNo
());
cg001A
.
setPlanLineNo
(
SequenceGenerator
.
getNextSequence
(
HGConstant
.
SequenceId
.
CG_PLAN_LINE_NO
,
new
String
[]{
hgcg001
.
getPlanNo
()}));
cg001A
.
setUnit
(
finalPz005Map
.
get
(
hgsc009A
.
getInventCode
()).
getUnit
());
cg001A
.
setInventType
(
finalPz005Map
.
get
(
hgsc009A
.
getInventCode
()).
getInventType
());
DaoUtils
.
insert
(
HGCG001A
.
INSERT
,
cg001A
);
...
...
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