Commit 56257c6d by wuwenlong

Merge remote-tracking branch 'origin/dev' into dev

parents 8a798188 18f496ee
......@@ -14,4 +14,14 @@
</isNotEmpty>
</sql>
<!-- 创建时间 -->
<sql id="createdTimeCondition">
<isNotEmpty prepend=" AND " property="createdTimeFrom">
CREATED_TIME &gt;= #createdTimeFrom#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTimeTo">
CREATED_TIME &lt;= #createdTimeTo#
</isNotEmpty>
</sql>
</sqlMap>
......@@ -230,7 +230,7 @@ public class ServiceHGCG001 extends ServiceBase {
*/
private void submitData(List<HGCG001> fCg001s) {
for (HGCG001 fCg001 : fCg001s) {
fCg001.setStatus(HGConstant.CgPlanStatus.S_1);
fCg001.setStatus(HGConstant.CgPlanStatus.S_2);
fCg001.setAuditTime(DateUtils.shortDateTime());
fCg001.setAuditUserId(UserSessionUtils.getLoginName());
fCg001.setAuditUserName(UserSessionUtils.getLoginCName());
......
......@@ -178,7 +178,7 @@ public class ServiceHGCG002 extends ServiceBase {
dbCg002.setDeleteFlag(DeleteFlagEnum.REMOVE.getCode());
DaoUtils.update(HGCG002.DELETE, dbCg002);
// 更新计划状态
HGCGTools.HgCg001.updateStatus(dbCg002.getPlanNo(), HGConstant.CgPlanStatus.S_1);
HGCGTools.HgCg001.updateStatus(dbCg002.getPlanNo(), HGConstant.CgPlanStatus.S_2);
}
}
......@@ -231,7 +231,7 @@ public class ServiceHGCG002 extends ServiceBase {
*/
private void submitData(List<HGCG002> fCg002s) {
for (HGCG002 fCg002 : fCg002s) {
fCg002.setStatus(HGConstant.CgContractStatus.S_1);
fCg002.setStatus(HGConstant.CgContractStatus.S_2);
fCg002.setAuditTime(DateUtils.shortDateTime());
fCg002.setAuditUserId(UserSessionUtils.getLoginName());
fCg002.setAuditUserName(UserSessionUtils.getLoginCName());
......
......@@ -67,7 +67,7 @@ public class ServiceHGCG002A extends ServiceBase {
Map queryRow = EiInfoUtils.getFirstRow(inInfo);
HgCgUtils.HgCg001.setCondition(queryRow);
// 仅审核通过
queryRow.put(HGCG001.FIELD_STATUS, HGConstant.CgPlanStatus.S_1);
queryRow.put(HGCG001.FIELD_STATUS, HGConstant.CgPlanStatus.S_2);
inInfo = super.query(inInfo, HGCG001.QUERY, new HGCG001());
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
......@@ -112,7 +112,7 @@ public class ServiceHGCG002A extends ServiceBase {
String planNo = fCg001.getPlanNo();
HGCG001 dbCg001 = dbCg001Map.get(planNo);
AssertUtils.isNull(dbCg001, String.format("计划[%s]不存在", planNo));
AssertUtils.isNotEquals(HGConstant.CgPlanStatus.S_1, dbCg001.getStatus(),
AssertUtils.isNotEquals(HGConstant.CgPlanStatus.S_2, dbCg001.getStatus(),
String.format("计划[%s]状态不是\"审核通过\",不允许操作", planNo));
}
}
......@@ -136,7 +136,7 @@ public class ServiceHGCG002A extends ServiceBase {
newCg002.setDeleteFlag(DeleteFlagEnum.UN_REMOVE.getCode());
DaoUtils.insert(HGCG002.INSERT, newCg002);
// 更新计划状态
HGCGTools.HgCg001.updateStatus(planNo, HGConstant.CgPlanStatus.S_3);
HGCGTools.HgCg001.updateStatus(planNo, HGConstant.CgPlanStatus.S_4);
}
}
......
......@@ -259,7 +259,7 @@ public class ServiceHGCG003 extends ServiceBase {
*/
private void confirmData(List<HGCG003> fCg003s) {
for (HGCG003 fCg003 : fCg003s) {
fCg003.setStatus(HGConstant.CgReceiveStatus.S_1);
fCg003.setStatus(HGConstant.CgReceiveStatus.S_2);
DaoUtils.update(HGSqlConstant.HgCg003.UPDATE_STATUS, fCg003);
}
}
......
......@@ -24,7 +24,6 @@ import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceBase;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import java.math.BigDecimal;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
......@@ -69,7 +68,7 @@ public class ServiceHGCG003A extends ServiceBase {
Map queryRow = EiInfoUtils.getFirstRow(inInfo);
HgCgUtils.HgCg001.setCondition(queryRow);
// 仅审核通过和收货中
queryRow.put("statuses", new Integer[]{HGConstant.CgContractStatus.S_1, HGConstant.CgContractStatus.S_3});
queryRow.put("statuses", new Integer[]{HGConstant.CgContractStatus.S_2, HGConstant.CgContractStatus.S_4});
inInfo = super.query(inInfo, HGCG002.QUERY, new HGCG002A());
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
......@@ -114,8 +113,8 @@ public class ServiceHGCG003A extends ServiceBase {
String contractNo = fCg002A.getContractNo();
HGCG002A dbCg002A = dbCg002AMap.get(contractNo);
AssertUtils.isNull(dbCg002A, String.format("合同[%s]不存在", contractNo));
AssertUtils.isTrue(!(HGConstant.CgContractStatus.S_1.equals(dbCg002A.getStatus())
|| HGConstant.CgContractStatus.S_3.equals(dbCg002A.getStatus())),
AssertUtils.isTrue(!(HGConstant.CgContractStatus.S_2.equals(dbCg002A.getStatus())
|| HGConstant.CgContractStatus.S_4.equals(dbCg002A.getStatus())),
String.format("合同[%s]状态不是\"审核通过\"或\"收货中\",不允许操作", contractNo));
AssertUtils.isGt(fCg002A.getBcReceiveQty(), dbCg002A.getBcMaxReceiveQty(),
String.format("合同[%s]本次收货数量(%s)不能大于本次最大收货数量(%s)", contractNo,
......@@ -137,6 +136,7 @@ public class ServiceHGCG003A extends ServiceBase {
newCg003.setReceiveDate(DateUtils.shortDate());
newCg003.setReceiveNo(SequenceGenerator.getNextSequence(HGConstant.SequenceId.CG_RECEIVE_NO));
newCg003.setReceiveQty(fCg002A.getBcReceiveQty());
newCg003.setReceiveWeight(fCg002A.getPurWeight());
newCg003.setStatus(HGConstant.CgReceiveStatus.S_0);
newCg003.setDeleteFlag(DeleteFlagEnum.UN_REMOVE.getCode());
DaoUtils.insert(HGCG003.INSERT, newCg003);
......
......@@ -12,15 +12,22 @@
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_ID as "specId", <!-- 规格ID -->
SPEC as "spec", <!-- 规格 -->
MATERIAL as "material", <!-- 材质 -->
UNIT as "unit", <!-- 单位 -->
LENGTH as "length", <!-- 长度 -->
WIDTH as "width", <!-- 宽度 -->
THICK as "thick", <!-- 厚度 -->
PLAN_QTY as "planQty", <!-- 计划数量 -->
PLAN_WEIGHT as "planWeight", <!-- 计划重量 -->
PUR_QTY as "purQty", <!-- 采购数量 -->
PUR_WEIGHT as "purWeight", <!-- 采购重量 -->
......@@ -28,39 +35,20 @@
AUDIT_TIME as "auditTime", <!-- 审核时间 -->
AUDIT_USER_ID as "auditUserId", <!-- 审核人ID -->
AUDIT_USER_NAME as "auditUserName", <!-- 审核人名称 -->
AUDIT_REASON as "auditReason", <!-- 审核原因 -->
SPEC_ID as "specId", <!-- 规格ID -->
WIDTH as "width", <!-- 宽度 -->
THICK as "thick" <!-- 厚度 -->
AUDIT_REASON as "auditReason" <!-- 审核原因 -->
</sql>
<sql id="condition">
AND DELETE_FLAG = 0
<include refid="HGXSDataAuth.authCondition"/>
<include refid="BaseCondition.specCondition"/>
<include refid="idCondition"/>
<include refid="customCondition"/>
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
CREATED_NAME = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
......@@ -76,12 +64,6 @@
<isNotEmpty prepend=" AND " property="inventName">
INVENT_NAME = #inventName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="spec">
SPEC = #spec#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="material">
MATERIAL = #material#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
......@@ -94,6 +76,9 @@
</sql>
<sql id="idCondition">
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="planNo">
PLAN_NO = #planNo#
</isNotEmpty>
......@@ -103,12 +88,8 @@
</sql>
<sql id="customCondition">
<isNotEmpty prepend=" AND " property="createdTimeFrom">
CREATED_TIME &gt;= #createdTimeFrom#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTimeTo">
CREATED_TIME &lt;= #createdTimeTo#
</isNotEmpty>
<include refid="BaseCondition.specCondition"/>
<include refid="BaseCondition.createdTimeCondition"/>
</sql>
<!-- 公共修改字段 -->
......@@ -156,15 +137,21 @@
PLAN_NO, <!-- 计划单号 -->
INVENT_CODE, <!-- 存货编码 -->
INVENT_NAME, <!-- 存货名称 -->
SPEC_ID, <!-- 规格ID -->
SPEC, <!-- 规格 -->
MATERIAL, <!-- 材质 -->
UNIT, <!-- 单位 -->
LENGTH, <!-- 长度 -->
WIDTH, <!-- 宽度 -->
THICK, <!-- 厚度 -->
PLAN_QTY, <!-- 计划数量 -->
PLAN_WEIGHT, <!-- 计划重量 -->
STATUS <!-- 状态:0-未审批,1-审核通过,2-审核未通过 -->
) VALUES (
#accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#,
#companyCode#, #companyName#, #planDate#, #planNo#, #inventCode#, #inventName#,
#spec#, #material#, #length#, #planWeight#, #status#
#specId#, #spec#, #material#, #unit#, #length#, #width#, #thick#,
#planQty#, #planWeight#, #status#
)
</insert>
......
......@@ -22,11 +22,16 @@
SUP_NAME as "supName", <!-- 供应商名称 -->
PUR_USER_ID as "purUserId", <!-- 采购员 -->
PUR_USER_NAME as "purUserName", <!-- 采购员名称 -->
INVENT_TYPE as "inventType", <!-- 存货类型 -->
INVENT_CODE as "inventCode", <!-- 存货编码 -->
INVENT_NAME as "inventName", <!-- 存货名称 -->
SPEC_ID as "specId", <!-- 规格ID -->
SPEC as "spec", <!-- 规格 -->
MATERIAL as "material", <!-- 材质 -->
UNIT as "unit", <!-- 单位 -->
LENGTH as "length", <!-- 长度 -->
WIDTH as "width", <!-- 宽度 -->
THICK as "thick", <!-- 厚度 -->
PUR_QTY as "purQty", <!-- 采购数量 -->
PUR_WEIGHT as "purWeight", <!-- 采购重量 -->
RECEIVE_QTY as "receiveQty", <!-- 收货数量 -->
......@@ -34,10 +39,7 @@
AUDIT_TIME as "auditTime", <!-- 审核时间 -->
AUDIT_USER_ID as "auditUserId", <!-- 审核人ID -->
AUDIT_USER_NAME as "auditUserName", <!-- 审核人名称 -->
AUDIT_REASON as "auditReason", <!-- 审核原因 -->
SPEC_ID as "specId", <!-- 规格ID -->
WIDTH as "width", <!-- 宽度 -->
THICK as "thick" <!-- 厚度 -->
AUDIT_REASON as "auditReason" <!-- 审核原因 -->
</sql>
<sql id="qtyColumn">
......@@ -47,36 +49,14 @@
<sql id="condition">
AND DELETE_FLAG = 0
<include refid="HGXSDataAuth.authCondition"/>
<include refid="BaseCondition.specCondition"/>
<include refid="idCondition"/>
<include refid="customCondition"/>
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
CREATED_NAME = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
......@@ -107,21 +87,9 @@
<isNotEmpty prepend=" AND " property="inventName">
INVENT_NAME = #inventName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="spec">
SPEC = #spec#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="material">
MATERIAL = #material#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="length">
LENGTH = #length#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="purQty">
PUR_QTY = #purQty#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="purWeight">
PUR_WEIGHT = #purWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
......@@ -134,12 +102,12 @@
<isNotEmpty prepend=" AND " property="auditUserName">
AUDIT_USER_NAME = #auditUserName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="auditReason">
AUDIT_REASON = #auditReason#
</isNotEmpty>
</sql>
<sql id="idCondition">
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractNo">
CONTRACT_NO = #contractNo#
</isNotEmpty>
......@@ -149,11 +117,10 @@
</sql>
<sql id="customCondition">
<isNotEmpty prepend=" AND " property="createdTimeFrom">
CREATED_TIME &gt;= #createdTimeFrom#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTimeTo">
CREATED_TIME &lt;= #createdTimeTo#
<include refid="BaseCondition.specCondition"/>
<include refid="BaseCondition.createdTimeCondition"/>
<isNotEmpty prepend=" AND " property="statuses">
STATUS IN <iterate open="(" close=")" conjunction="," property="statuses">#statuses[]#</iterate>
</isNotEmpty>
</sql>
......@@ -204,16 +171,20 @@
PLAN_NO, <!-- 计划单号 -->
INVENT_CODE, <!-- 存货编码 -->
INVENT_NAME, <!-- 存货名称 -->
SPEC, <!-- 规格 -->
MATERIAL, <!-- 材质 -->
LENGTH, <!-- 长度 -->
SPEC_ID as "specId", <!-- 规格ID -->
SPEC as "spec", <!-- 规格 -->
MATERIAL as "material", <!-- 材质 -->
UNIT as "unit", <!-- 单位 -->
LENGTH as "length", <!-- 长度 -->
WIDTH as "width", <!-- 宽度 -->
THICK as "thick", <!-- 厚度 -->
PUR_QTY, <!-- 采购数量 -->
PUR_WEIGHT, <!-- 采购重量 -->
STATUS <!-- 状态:0-未审批,1-审核通过,2-审核未通过 -->
) VALUES (
#accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#,
#deleteFlag#, #companyCode#, #companyName#, #contractDate#, #contractNo#, #planNo#,
#inventCode#, #inventName#, #spec#, #material#, #length#,
#inventCode#, #inventName#, #specId#, #spec#, #material#, #unit#, #length#, #width#, #thick#,
#purQty#, #purWeight#, #status#
)
</insert>
......
......@@ -23,54 +23,34 @@
SUP_NAME as "supName", <!-- 供应商名称 -->
PUR_USER_ID as "purUserId", <!-- 采购员 -->
PUR_USER_NAME as "purUserName", <!-- 采购员名称 -->
INVENT_TYPE as "inventType", <!-- 存货类型 -->
INVENT_CODE as "inventCode", <!-- 存货编码 -->
INVENT_NAME as "inventName", <!-- 存货名称 -->
SPEC_ID as "specId", <!-- 规格ID -->
SPEC as "spec", <!-- 规格 -->
MATERIAL as "material", <!-- 材质 -->
UNIT as "unit", <!-- 单位 -->
LENGTH as "length", <!-- 长度 -->
WIDTH as "width", <!-- 宽度 -->
THICK as "thick", <!-- 厚度 -->
RECEIVE_QTY as "receiveQty", <!-- 收货数量 -->
DELIVER_QTY as "deliverQty", <!-- 退货数量 -->
DEPOSIT_QTY as "depositQty", <!-- 入库数量 -->
RECEIVE_WEIGHT as "receiveWeight", <!-- 收货重量 -->
STATUS as "status", <!-- 状态:0-已收货,1-已入库,2-部分入库,3-退货 -->
SPEC_ID as "specId", <!-- 规格ID -->
WIDTH as "width", <!-- 宽度 -->
THICK as "thick" <!-- 厚度 -->
STATUS as "status" <!-- 状态:0-已收货,1-已入库,2-部分入库,3-退货 -->
</sql>
<sql id="condition">
AND DELETE_FLAG = 0
<include refid="HGXSDataAuth.authCondition"/>
<include refid="BaseCondition.specCondition"/>
<include refid="idCondition"/>
<include refid="customCondition"/>
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
CREATED_NAME = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
......@@ -107,33 +87,18 @@
<isNotEmpty prepend=" AND " property="inventName">
INVENT_NAME = #inventName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="spec">
SPEC = #spec#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="material">
MATERIAL = #material#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="length">
LENGTH = #length#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="receiveQty">
RECEIVE_QTY = #receiveQty#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deliverQty">
DELIVER_QTY = #deliverQty#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depositQty">
DEPOSIT_QTY = #depositQty#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="receiveWeight">
RECEIVE_WEIGHT = #receiveWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
</sql>
<sql id="idCondition">
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="receiveNo">
RECEIVE_NO = #receiveNo#
</isNotEmpty>
......@@ -143,12 +108,8 @@
</sql>
<sql id="customCondition">
<isNotEmpty prepend=" AND " property="createdTimeFrom">
CREATED_TIME &gt;= #createdTimeFrom#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTimeTo">
CREATED_TIME &lt;= #createdTimeTo#
</isNotEmpty>
<include refid="BaseCondition.specCondition"/>
<include refid="BaseCondition.createdTimeCondition"/>
</sql>
<!-- 公共修改字段 -->
......@@ -200,11 +161,16 @@
SUP_NAME, <!-- 供应商名称 -->
PUR_USER_ID, <!-- 采购员 -->
PUR_USER_NAME, <!-- 采购员名称 -->
INVENT_TYPE, <!-- 存货类型 -->
INVENT_CODE, <!-- 存货编码 -->
INVENT_NAME, <!-- 存货名称 -->
SPEC_ID, <!-- 规格ID -->
SPEC, <!-- 规格 -->
MATERIAL, <!-- 材质 -->
UNIT, <!-- 单位 -->
LENGTH, <!-- 长度 -->
WIDTH, <!-- 宽度 -->
THICK, <!-- 厚度 -->
RECEIVE_QTY, <!-- 收货数量 -->
RECEIVE_WEIGHT, <!-- 收货重量 -->
STATUS <!-- 状态:0-已收货,1-已入库,2-部分入库,3-退货 -->
......@@ -212,8 +178,8 @@
#accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#,
#deleteFlag#, #companyCode#, #companyName#, #receiveDate#, #receiveNo#,
#planNo#, #contractNo#, #supCode#, #supName#, #purUserId#, #purUserName#,
#inventCode#, #inventName#, #spec#, #material#, #length#,
#receiveQty#, #receiveWeight#, #status#
#inventType#, #inventCode#, #inventName#, #specId#, #spec#, #material#,
#unit#, #length#, #width#, #thick#, #receiveQty#, #receiveWeight#, #status#
)
</insert>
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
<sqlMap namespace="HGCG004">
<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", <!-- 公司名称 -->
DEPOSIT_DATE as "depositDate", <!-- 入库日期 -->
DEPOSIT_NO as "depositNo", <!-- 入库单号 -->
RECEIVE_NO as "receiveNo", <!-- 收货单号 -->
PLAN_NO as "planNo", <!-- 计划单号 -->
CONTRACT_NO as "contractNo", <!-- 合同号 -->
WH_CODE as "whCode", <!-- 仓库编码 -->
WH_NAME as "whName", <!-- 仓库名称 -->
INVENT_TYPE as "inventType", <!-- 存货类型 -->
INVENT_CODE as "inventCode", <!-- 存货编码 -->
INVENT_NAME as "inventName", <!-- 存货名称 -->
SPEC_ID as "specId", <!-- 规格ID -->
SPEC as "spec", <!-- 规格 -->
MATERIAL as "material", <!-- 材质 -->
UNIT as "unit", <!-- 单位 -->
LENGTH as "length", <!-- 长度 -->
WIDTH as "width", <!-- 宽度 -->
THICK as "thick", <!-- 厚度 -->
DEPOSIT_QTY as "depositQty", <!-- 入库数量 -->
DEPOSIT_WEIGHT as "depositWeight" <!-- 入库重量 -->
</sql>
<sql id="condition">
AND DELETE_FLAG = 0
<include refid="HGXSDataAuth.authCondition"/>
<include refid="idCondition"/>
<include refid="customCondition"/>
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
COMPANY_NAME = #companyName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depositDate">
DEPOSIT_DATE = #depositDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="receiveNo">
RECEIVE_NO = #receiveNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="planNo">
PLAN_NO = #planNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractNo">
CONTRACT_NO = #contractNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="whCode">
WH_CODE = #whCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="whName">
WH_NAME = #whName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventType">
INVENT_TYPE = #inventType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventCode">
INVENT_CODE = #inventCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventName">
INVENT_NAME = #inventName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="specId">
SPEC_ID = #specId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="material">
MATERIAL = #material#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="unit">
UNIT = #unit#
</isNotEmpty>
</sql>
<sql id="idCondition">
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depositNo">
DEPOSIT_NO = #depositNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depositNos">
DEPOSIT_NO IN <iterate open="(" close=")" conjunction="," property="depositNos">#depositNos[]#</iterate>
</isNotEmpty>
</sql>
<sql id="customCondition">
<include refid="BaseCondition.specCondition"/>
<include refid="BaseCondition.createdTimeCondition"/>
</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 asc
</isEmpty>
</dynamic>
</sql>
<select id="query" resultClass="com.baosight.hggp.hg.cg.domain.HGCG004">
SELECT
<include refid="column"/>
FROM ${hggpSchema}.HGCG004
WHERE 1=1
<include refid="condition"/>
<include refid="orderBy"/>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hggpSchema}.HGCG004 WHERE 1=1
<include refid="condition"/>
</select>
<insert id="insert">
INSERT INTO ${hggpSchema}.HGCG004 (
ACCOUNT_CODE, <!-- 企业编码 -->
DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 记录创建者 -->
CREATED_NAME, <!-- 记录创建名称 -->
CREATED_TIME, <!-- 记录创建时间 -->
DELETE_FLAG, <!-- 0-未删除,1-已删除 -->
COMPANY_CODE, <!-- 公司编码 -->
COMPANY_NAME, <!-- 公司名称 -->
DEPOSIT_DATE, <!-- 入库日期 -->
DEPOSIT_NO, <!-- 入库单号 -->
RECEIVE_NO, <!-- 收货单号 -->
PLAN_NO, <!-- 计划单号 -->
CONTRACT_NO, <!-- 合同号 -->
WH_CODE, <!-- 仓库编码 -->
WH_NAME, <!-- 仓库名称 -->
INVENT_TYPE, <!-- 存货类型 -->
INVENT_CODE, <!-- 存货编码 -->
INVENT_NAME, <!-- 存货名称 -->
SPEC_ID, <!-- 规格ID -->
SPEC, <!-- 规格 -->
MATERIAL, <!-- 材质 -->
UNIT, <!-- 单位 -->
LENGTH, <!-- 长度 -->
WIDTH, <!-- 宽度 -->
THICK, <!-- 厚度 -->
DEPOSIT_QTY, <!-- 入库数量 -->
DEPOSIT_WEIGHT <!-- 入库重量 -->
) VALUES (
#accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#,
#deleteFlag#, #companyCode#, #companyName#, #depositDate#, #depositNo#,
#receiveNo#, #planNo#, #contractNo#, #whCode#, #whName#, #inventType#,
#inventCode#, #inventName#, #specId#, #spec#, #material#,
#unit#, #length#, #width#, #thick#, #depositQty#, #depositWeight#
)
</insert>
<delete id="delete">
UPDATE ${hggpSchema}.HGCG004
SET
DELETE_FLAG = #deleteFlag#,
<include refid="updateRevise"/>
WHERE DEPOSIT_NO = #depositNo#
</delete>
</sqlMap>
......@@ -135,8 +135,8 @@ public class HGCGTools {
AssertUtils.isNull(dbCg002, "合同号不能为空!");
AssertUtils.isNull(receiveQty, "收货数量不能为空!");
BigDecimal diffQty = dbCg002.getPurQty().subtract(receiveQty.add(dbCg002.getReceiveQty()));
Integer status = diffQty.compareTo(BigDecimal.ZERO) == 0 ? HGConstant.CgContractStatus.S_4
: HGConstant.CgContractStatus.S_3;
Integer status = diffQty.compareTo(BigDecimal.ZERO) == 0 ? HGConstant.CgContractStatus.S_5
: HGConstant.CgContractStatus.S_4;
Map<String, Object> paramMap = new HashMap<>();
paramMap.put(HGCG002.FIELD_CONTRACT_NO, dbCg002.getContractNo());
paramMap.put(HGCG002.FIELD_STATUS, status);
......
......@@ -107,12 +107,14 @@ public class HGConstant {
// 待审核
public static final Integer S_0 = 0;
// 审核通过
// 审核
public static final Integer S_1 = 1;
// 审核拒绝
// 审核通过
public static final Integer S_2 = 2;
// 生成合同
// 审核拒绝
public static final Integer S_3 = 3;
// 生成合同
public static final Integer S_4 = 4;
}
/**
......@@ -125,14 +127,16 @@ public class HGConstant {
// 待审核
public static final Integer S_0 = 0;
// 审核通过
// 审核
public static final Integer S_1 = 1;
// 审核拒绝
// 审核通过
public static final Integer S_2 = 2;
// 收货中
// 审核拒绝
public static final Integer S_3 = 3;
// 收货完成
// 收货
public static final Integer S_4 = 4;
// 收货完成
public static final Integer S_5 = 5;
}
/**
......@@ -146,13 +150,13 @@ public class HGConstant {
// 待确认
public static final Integer S_0 = 0;
// 已收货
public static final Integer S_1 = 1;
// 质检中
public static final Integer S_2 = 2;
// 质检完成
// 质检
public static final Integer S_3 = 3;
// 已入库
// 质检完成
public static final Integer S_4 = 4;
// 已入库
public static final Integer S_5 = 5;
}
/**
......
......@@ -55,6 +55,7 @@
<EF:EFColumn ename="purWeight" cname="采购重量" width="120" align="right" format="{0:N3}" required="true"/>
<EF:EFColumn ename="planWeight" cname="计划重量" enable="false" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="material" cname="材质" enable="false" width="80" align="center"/>
<EF:EFColumn ename="unit" cname="单位" enable="false" width="80" align="center"/>
<EF:EFColumn ename="length" cname="长(M)" enable="false" width="80" align="right" format="{0:N3}"/>
<EF:EFColumn ename="width" cname="宽(M)" enable="false" width="80" align="right" format="{0:N3}"/>
<EF:EFColumn ename="thick" cname="厚(M)" enable="false" width="80" align="right" format="{0:N3}"/>
......
......@@ -68,6 +68,7 @@
<EF:EFColumn ename="purWeight" cname="采购重量" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="receiveQty" cname="已收货数量" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="material" cname="材质" enable="false" width="80" align="center"/>
<EF:EFColumn ename="unit" cname="单位" enable="false" width="80" align="center"/>
<EF:EFColumn ename="length" cname="长(M)" enable="false" width="80" align="right" format="{0:N3}"/>
<EF:EFColumn ename="width" cname="宽(M)" enable="false" width="80" align="right" format="{0:N3}"/>
<EF:EFColumn ename="thick" cname="厚(M)" enable="false" width="80" align="right" format="{0:N3}"/>
......
......@@ -67,6 +67,7 @@
<EF:EFColumn ename="depositQty" cname="入库数量" enable="false" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="receiveWeight" cname="收货重量" enable="false" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="material" cname="材质" enable="false" width="80" align="center"/>
<EF:EFColumn ename="unit" cname="单位" enable="false" width="80" align="center"/>
<EF:EFColumn ename="length" cname="长(M)" enable="false" width="80" align="right" format="{0:N3}"/>
<EF:EFColumn ename="width" cname="宽(M)" enable="false" width="80" align="right" format="{0:N3}"/>
<EF:EFColumn ename="thick" cname="厚(M)" enable="false" width="80" align="right" format="{0:N3}"/>
......
......@@ -14,7 +14,7 @@
<EF:EFInput cname="计划单号" blockId="inqu_status" ename="planNo" row="0" colWidth="3"/>
<EF:EFSelect cname="状态" blockId="inqu_status" ename="status" row="0" colWidth="3" optionLabel="全部"
defultValue="">
<EF:EFCodeOption codeName="hggp.hgcg.contractStatus" condition="ITEM_CODE IN ('1', '3')"/>
<EF:EFCodeOption codeName="hggp.hgcg.contractStatus" condition="ITEM_CODE IN ('2', '4')"/>
</EF:EFSelect>
</div>
<div class="row">
......@@ -69,7 +69,7 @@
filter="contains">
<EF:EFOptions blockId="sup_record_block_id" valueField="valueField" textField="textField"/>
</EF:EFComboColumn>
<EF:EFColumn ename="purUserName" cname="采购员" enable="false" width="100" align="center" required="true"/>
<EF:EFColumn ename="purUserName" cname="采购员" enable="false" width="100" align="center"/>
<EF:EFColumn ename="material" cname="材质" enable="false" width="80" align="center"/>
<EF:EFColumn ename="length" cname="长(M)" enable="false" width="80" align="right" format="{0:N3}"/>
<EF:EFColumn ename="width" cname="宽(M)" enable="false" width="80" align="right" format="{0:N3}"/>
......
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