Commit 8374a3d3 by 宋祥

1.计划明细增加计划行号

parent cb9ba8d3
...@@ -36,6 +36,7 @@ public class HGCG001A extends DaoEPBase { ...@@ -36,6 +36,7 @@ public class HGCG001A extends DaoEPBase {
public static final String FIELD_COMPANY_NAME = "companyName"; /* 公司名称*/ public static final String FIELD_COMPANY_NAME = "companyName"; /* 公司名称*/
public static final String FIELD_PLAN_DATE = "planDate"; /* 计划日期*/ public static final String FIELD_PLAN_DATE = "planDate"; /* 计划日期*/
public static final String FIELD_PLAN_NO = "planNo"; /* 计划单号*/ 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_TYPE = "inventType"; /* 存货类型*/
public static final String FIELD_INVENT_CODE = "inventCode"; /* 存货编码*/ public static final String FIELD_INVENT_CODE = "inventCode"; /* 存货编码*/
public static final String FIELD_INVENT_NAME = "inventName"; /* 存货名称*/ public static final String FIELD_INVENT_NAME = "inventName"; /* 存货名称*/
...@@ -122,6 +123,7 @@ public class HGCG001A extends DaoEPBase { ...@@ -122,6 +123,7 @@ public class HGCG001A extends DaoEPBase {
private String companyName = " "; /* 公司名称*/ private String companyName = " "; /* 公司名称*/
private String planDate = " "; /* 计划日期*/ private String planDate = " "; /* 计划日期*/
private String planNo = " "; /* 计划单号*/ private String planNo = " "; /* 计划单号*/
private String planLineNo = " "; /* 计划单行号*/
private String inventType = " "; /* 存货类型*/ private String inventType = " "; /* 存货类型*/
private String inventCode = " "; /* 存货编码*/ private String inventCode = " "; /* 存货编码*/
private String inventName = " "; /* 存货名称*/ private String inventName = " "; /* 存货名称*/
...@@ -217,6 +219,10 @@ public class HGCG001A extends DaoEPBase { ...@@ -217,6 +219,10 @@ public class HGCG001A extends DaoEPBase {
eiColumn.setDescName("计划单号"); eiColumn.setDescName("计划单号");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PLAN_LINE_NO);
eiColumn.setDescName("计划单行号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INVENT_TYPE); eiColumn = new EiColumn(FIELD_INVENT_TYPE);
eiColumn.setDescName("存货类型"); eiColumn.setDescName("存货类型");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
...@@ -984,6 +990,14 @@ public class HGCG001A extends DaoEPBase { ...@@ -984,6 +990,14 @@ public class HGCG001A extends DaoEPBase {
this.calculationMethod = calculationMethod; this.calculationMethod = calculationMethod;
} }
public String getPlanLineNo() {
return planLineNo;
}
public void setPlanLineNo(String planLineNo) {
this.planLineNo = planLineNo;
}
/** /**
* get the value from Map. * get the value from Map.
* *
...@@ -1006,6 +1020,7 @@ public class HGCG001A extends DaoEPBase { ...@@ -1006,6 +1020,7 @@ public class HGCG001A extends DaoEPBase {
setCompanyName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_COMPANY_NAME)), companyName)); setCompanyName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_COMPANY_NAME)), companyName));
setPlanDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PLAN_DATE)), planDate)); setPlanDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PLAN_DATE)), planDate));
setPlanNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PLAN_NO)), planNo)); 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)); setInventType(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INVENT_TYPE)), inventType));
setInventCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INVENT_CODE)), inventCode)); setInventCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INVENT_CODE)), inventCode));
setInventName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INVENT_NAME)), inventName)); setInventName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INVENT_NAME)), inventName));
...@@ -1059,6 +1074,7 @@ public class HGCG001A extends DaoEPBase { ...@@ -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_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_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_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_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_CODE, StringUtils.toString(inventCode, eiMetadata.getMeta(FIELD_INVENT_CODE)));
map.put(FIELD_INVENT_NAME, StringUtils.toString(inventName, eiMetadata.getMeta(FIELD_INVENT_NAME))); map.put(FIELD_INVENT_NAME, StringUtils.toString(inventName, eiMetadata.getMeta(FIELD_INVENT_NAME)));
......
...@@ -22,6 +22,7 @@ import com.baosight.hggp.util.contants.ACConstants; ...@@ -22,6 +22,7 @@ import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiConstant; import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo; import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceBase; import com.baosight.iplat4j.core.service.impl.ServiceBase;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.math.RoundingMode; import java.math.RoundingMode;
...@@ -127,19 +128,27 @@ public class ServiceHGCG001A extends ServiceBase { ...@@ -127,19 +128,27 @@ public class ServiceHGCG001A extends ServiceBase {
* *
* @param fCg001s * @param fCg001s
*/ */
private void saveData(List<HGCG001A> fCg001s,HGCG001 cg001) { private void saveData(List<HGCG001A> fCg001s, HGCG001 dbCg001) {
for (HGCG001A fCg001a : fCg001s) { for (HGCG001A fCg001a : fCg001s) {
fCg001a.setPurUnitWeight(fCg001a.getPurWeight().divide(fCg001a.getPurQty(), 3, RoundingMode.HALF_UP)); fCg001a.setPurUnitWeight(fCg001a.getPurWeight().divide(fCg001a.getPurQty(), 3, RoundingMode.HALF_UP));
if(fCg001a.getId() == null || fCg001a.getId() == 0){ if (fCg001a.getId() == null || fCg001a.getId() == 0) {
BeanUtils.copyProperties(cg001,fCg001a,"id","createdBy","createdName","createdTime","updatedBy","updatedName","updatedTime", fCg001a.setPlanDate(dbCg001.getPlanDate());
"inventType","inventTypeDetail","inventCode","inventName","spec","material","unit","length","width","thick","purQty","purUnitWeight","purWeight"); 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); DaoUtils.insert(HGCG001A.INSERT, fCg001a);
}else{ } else {
DaoUtils.update(HGCG001A.UPDATE, fCg001a); DaoUtils.update(HGCG001A.UPDATE, fCg001a);
} }
} }
//修改主表数量 //修改主表数量
updateCg001Pur(cg001); updateCg001Pur(dbCg001);
} }
private void updateCg001Pur(HGCG001 cg001) { private void updateCg001Pur(HGCG001 cg001) {
......
...@@ -2,11 +2,51 @@ ...@@ -2,11 +2,51 @@
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd"> <!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
<sqlMap namespace="HGCG001A"> <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"> <sql id="condition">
AND DELETE_FLAG = 0 AND DELETE_FLAG = 0
<isNotEmpty prepend=" AND " property="id"> <include refid="idCondition"/>
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountCode"> <isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode# ACCOUNT_CODE = #accountCode#
</isNotEmpty> </isNotEmpty>
...@@ -121,6 +161,12 @@ ...@@ -121,6 +161,12 @@
<isNotEmpty prepend=" AND " property="ids"> <isNotEmpty prepend=" AND " property="ids">
ID IN <iterate open="(" close=")" conjunction="," property="ids">#ids[]#</iterate> ID IN <iterate open="(" close=")" conjunction="," property="ids">#ids[]#</iterate>
</isNotEmpty> </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>
<sql id="conditionByContract"> <sql id="conditionByContract">
...@@ -245,57 +291,7 @@ ...@@ -245,57 +291,7 @@
</isNotEmpty> </isNotEmpty>
</sql> </sql>
<!-- 公共修改字段 --> <sql id="orderBy">
<sql id="updateRevise">
UPDATED_BY = #updatedBy#,
UPDATED_NAME = #updatedName#,
UPDATED_TIME = #updatedTime#
</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"> <dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy"> <isNotEmpty property="orderBy">
$orderBy$ $orderBy$
...@@ -304,12 +300,19 @@ ...@@ -304,12 +300,19 @@
ID desc ID desc
</isEmpty> </isEmpty>
</dynamic> </dynamic>
</sql>
<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>
<select id="count" resultClass="int"> <select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hggpSchema}.HGCG001A WHERE 1=1 SELECT COUNT(*) FROM ${hggpSchema}.HGCG001A WHERE 1=1
<include refid="condition" /> <include refid="condition"/>
</select> </select>
<select id="queryByContract" resultClass="com.baosight.hggp.hg.cg.domain.HGCG001A"> <select id="queryByContract" resultClass="com.baosight.hggp.hg.cg.domain.HGCG001A">
...@@ -366,20 +369,18 @@ ...@@ -366,20 +369,18 @@
</select> </select>
<insert id="insert"> <insert id="insert">
INSERT INTO ${hggpSchema}.HGCG001A (ID, INSERT INTO ${hggpSchema}.HGCG001A (
ACCOUNT_CODE, <!-- 企业编码 --> ACCOUNT_CODE, <!-- 企业编码 -->
DEP_CODE, <!-- 部门编码 --> DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 记录创建者 --> CREATED_BY, <!-- 记录创建者 -->
CREATED_NAME, <!-- 记录创建名称 --> CREATED_NAME, <!-- 记录创建名称 -->
CREATED_TIME, <!-- 记录创建时间 --> CREATED_TIME, <!-- 记录创建时间 -->
UPDATED_BY, <!-- 记录修改者 -->
UPDATED_NAME, <!-- 记录修改名称 -->
UPDATED_TIME, <!-- 记录修改时间 -->
DELETE_FLAG, <!-- 0-未删除,1-已删除 --> DELETE_FLAG, <!-- 0-未删除,1-已删除 -->
COMPANY_CODE, <!-- 公司编码 --> COMPANY_CODE, <!-- 公司编码 -->
COMPANY_NAME, <!-- 公司名称 --> COMPANY_NAME, <!-- 公司名称 -->
PLAN_DATE, <!-- 计划日期 --> PLAN_DATE, <!-- 计划日期 -->
PLAN_NO, <!-- 计划单号 --> PLAN_NO, <!-- 计划单号 -->
PLAN_LINE_NO, <!-- 计划单行号 -->
INVENT_TYPE, <!-- 存货类型 --> INVENT_TYPE, <!-- 存货类型 -->
INVENT_CODE, <!-- 存货编码 --> INVENT_CODE, <!-- 存货编码 -->
INVENT_NAME, <!-- 存货名称 --> INVENT_NAME, <!-- 存货名称 -->
...@@ -402,31 +403,24 @@ ...@@ -402,31 +403,24 @@
PROJ_CODE, <!-- 项目编码 --> PROJ_CODE, <!-- 项目编码 -->
PROJ_NAME, <!-- 项目名称 --> PROJ_NAME, <!-- 项目名称 -->
REMARKS REMARKS
) ) VALUES (
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#) #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> </insert>
<delete id="delete"> <delete id="delete">
DELETE FROM ${hggpSchema}.HGCG001A WHERE DELETE FROM ${hggpSchema}.HGCG001A WHERE ID = #id#
ID = #id#
</delete> </delete>
<update id="update"> <update id="update">
UPDATE ${hggpSchema}.HGCG001A UPDATE ${hggpSchema}.HGCG001A
SET 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_CODE = #companyCode#, <!-- 公司编码 -->
COMPANY_NAME = #companyName#, <!-- 公司名称 --> COMPANY_NAME = #companyName#, <!-- 公司名称 -->
PLAN_DATE = #planDate#, <!-- 计划日期 --> PLAN_DATE = #planDate#, <!-- 计划日期 -->
PLAN_NO = #planNo#, <!-- 计划单号 -->
INVENT_TYPE = #inventType#, <!-- 存货类型 --> INVENT_TYPE = #inventType#, <!-- 存货类型 -->
INVENT_CODE = #inventCode#, <!-- 存货编码 --> INVENT_CODE = #inventCode#, <!-- 存货编码 -->
INVENT_NAME = #inventName#, <!-- 存货名称 --> INVENT_NAME = #inventName#, <!-- 存货名称 -->
...@@ -448,9 +442,8 @@ ...@@ -448,9 +442,8 @@
REMARKS = #remarks#, REMARKS = #remarks#,
PROJ_CODE = #projCode#, <!-- 项目编码 --> PROJ_CODE = #projCode#, <!-- 项目编码 -->
PROJ_NAME = #projName#, <!-- 项目名称 --> PROJ_NAME = #projName#, <!-- 项目名称 -->
PRIMARY_ID = #primaryId# <!-- 主表id --> <include refid="SqlBase.updateRevise"/>
WHERE WHERE ID = #id#
ID = #id#
</update> </update>
<!-- 行锁 --> <!-- 行锁 -->
...@@ -466,15 +459,17 @@ ...@@ -466,15 +459,17 @@
UPDATE ${hggpSchema}.HGCG001A UPDATE ${hggpSchema}.HGCG001A
SET SET
STATUS = #status#, <!-- 状态:0-未审批,1-审核通过,2-审核未通过 --> STATUS = #status#, <!-- 状态:0-未审批,1-审核通过,2-审核未通过 -->
<include refid="updateRevise"/> <include refid="SqlBase.updateRevise"/>
WHERE PLAN_NO = #planNo# WHERE PLAN_NO = #planNo#
</update> </update>
<!-- 修改状态信息 --> <!-- 修改状态信息 -->
<update id="updateStatusById"> <update id="updateStatusById">
UPDATE ${hggpSchema}.HGCG001A UPDATE ${hggpSchema}.HGCG001A
SET SET
STATUS = #status#, <!-- 状态:0-未审批,1-审核通过,2-审核未通过 --> STATUS = #status#, <!-- 状态:0-未审批,1-审核通过,2-审核未通过 -->
<include refid="updateRevise"/> <include refid="SqlBase.updateRevise"/>
WHERE ID = #id# WHERE ID = #id#
</update> </update>
</sqlMap> </sqlMap>
...@@ -99,6 +99,8 @@ public class HGConstant { ...@@ -99,6 +99,8 @@ public class HGConstant {
public static final String APPLY_CODE = "APPLY_CODE"; public static final String APPLY_CODE = "APPLY_CODE";
// 采购计划号 // 采购计划号
public static final String CG_PLAN_NO = "CG_PLAN_NO"; 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"; public static final String CG_CONTRACT_NO = "CG_CONTRACT_NO";
// 采购合同行号 // 采购合同行号
......
...@@ -268,6 +268,8 @@ public class ServiceHGSC009A extends ServiceBase { ...@@ -268,6 +268,8 @@ public class ServiceHGSC009A extends ServiceBase {
cg001A.setPlanWeight(hgsc009A.getGrossAmount()); cg001A.setPlanWeight(hgsc009A.getGrossAmount());
cg001A.setPlanQty(hgsc009A.getQuantity()); cg001A.setPlanQty(hgsc009A.getQuantity());
cg001A.setPlanNo(hgcg001.getPlanNo()); 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.setUnit(finalPz005Map.get(hgsc009A.getInventCode()).getUnit());
cg001A.setInventType(finalPz005Map.get(hgsc009A.getInventCode()).getInventType()); cg001A.setInventType(finalPz005Map.get(hgsc009A.getInventCode()).getInventType());
DaoUtils.insert(HGCG001A.INSERT, cg001A); DaoUtils.insert(HGCG001A.INSERT, cg001A);
......
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