Commit 8d88e3de by liuyang

2024-05-20 优化库存档案

parent e2a30dfe
......@@ -42,6 +42,7 @@ public class HGPZ005A extends DaoEPBase {
public static final String FIELD_UNIT_COEFF = "unitCoeff"; /* 单价系数*/
public static final String FIELD_PROCESS_CLASS = "processClass"; /* 工序类别*/
public static final String FIELD_PARENT_ID = "parentId"; /* 上级ID*/
public static final String FIELD_PROCESS_ORDER = "processOrder"; /* 加工顺序*/
public static final String COL_ID = "ID";
public static final String COL_ACCOUNT_CODE = "ACCOUNT_CODE"; /* 帐套编码*/
......@@ -87,6 +88,7 @@ public class HGPZ005A extends DaoEPBase {
private BigDecimal unitCoeff = new BigDecimal(0); /* 单价系数*/
private String processClass = " "; /* 工序分类*/
private Long parentId = new Long(0); /* 上级ID*/
private Long processOrder = new Long(0); /* 加工顺序*/
/**
* initialize the metadata.
......@@ -177,6 +179,11 @@ public class HGPZ005A extends DaoEPBase {
eiColumn.setDescName("上级ID");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PROCESS_ORDER);
eiColumn.setDescName("加工顺序");
eiMetadata.addMeta(eiColumn);
}
......@@ -468,6 +475,15 @@ public class HGPZ005A extends DaoEPBase {
public void setParentId(Long parentId) {
this.parentId = parentId;
}
public Long getProcessOrder() {
return processOrder;
}
public void setProcessOrder(Long processOrder) {
this.processOrder = processOrder;
}
/**
* get the value from Map.
*
......@@ -495,6 +511,7 @@ public class HGPZ005A extends DaoEPBase {
setUnitCoeff(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_UNIT_COEFF)), unitCoeff));
setProcessClass(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROCESS_CLASS)), processClass));
setParentId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_PARENT_ID)), parentId));
setProcessOrder(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_PROCESS_ORDER)), processOrder));
}
/**
......@@ -523,6 +540,7 @@ public class HGPZ005A extends DaoEPBase {
map.put(FIELD_UNIT_COEFF, StringUtils.toString(unitCoeff, eiMetadata.getMeta(FIELD_UNIT_COEFF)));
map.put(FIELD_PROCESS_CLASS, StringUtils.toString(processClass, eiMetadata.getMeta(FIELD_PROCESS_CLASS)));
map.put(FIELD_PARENT_ID, StringUtils.toString(parentId, eiMetadata.getMeta(FIELD_PARENT_ID)));
map.put(FIELD_PROCESS_ORDER, StringUtils.toString(processOrder, eiMetadata.getMeta(FIELD_PROCESS_ORDER)));
return map;
}
......
......@@ -320,6 +320,7 @@ public class ServiceHGPZ005 extends ServiceBase {
hgpz005A.setUnitCoeff(BigDecimal.ONE);
hgpz005A.setComposingCoeff(BigDecimal.ONE);
hgpz005A.setParentId(hppz005.getId());
hgpz005A.setProcessOrder(hgsj002a.getProcessOrder());
DaoUtils.insert(HGPZ005A.INSERT,hgpz005A.toMap());
}
}
......
......@@ -104,7 +104,8 @@
COMPOSING_COEFF as "composingCoeff", <!-- 排产系数 -->
UNIT_COEFF as "unitCoeff", <!-- 单价系数 -->
PROCESS_CLASS as "processClass", <!-- 工序类别 -->
PARENT_ID as "parentId" <!-- 上级ID -->
PARENT_ID as "parentId", <!-- 上级ID -->
PROCESS_ORDER as "processOrder"
FROM ${hggpSchema}.HGPZ005A WHERE 1=1
<include refid="condition" />
<dynamic prepend="ORDER BY">
......@@ -112,7 +113,7 @@
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
CREATED_TIME asc, ID asc
PROCESS_CLASS asc ,CREATED_TIME asc, ID asc
</isEmpty>
</dynamic>
......@@ -193,9 +194,10 @@
COMPOSING_COEFF, <!-- 排产系数 -->
UNIT_COEFF, <!-- 单价系数 -->
PROCESS_CLASS, <!-- 工序类别 -->
PARENT_ID <!-- 上级ID -->
PARENT_ID, <!-- 上级ID -->
PROCESS_ORDER
)
VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #companyCode#, #companyName#, #inventCode#, #processCode#, #processName#, #composingCoeff#, #unitCoeff#, #processClass#, #parentId#)
VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #companyCode#, #companyName#, #inventCode#, #processCode#, #processName#, #composingCoeff#, #unitCoeff#, #processClass#, #parentId#,#processOrder#)
</insert>
<delete id="delete">
......@@ -227,7 +229,8 @@
COMPOSING_COEFF = #composingCoeff#, <!-- 排产系数 -->
UNIT_COEFF = #unitCoeff#, <!-- 单价系数 -->
PROCESS_CLASS = #processClass#, <!-- 工序类别 -->
PARENT_ID = #parentId# <!-- 上级ID -->
PARENT_ID = #parentId#, <!-- 上级ID -->
PROCESS_ORDER = #processOrder#
WHERE
ID = #id#
</update>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment