diff --git a/ktg-mes/src/main/java/com/ktg/mes/md/controller/BaseKnifeController.java b/ktg-mes/src/main/java/com/ktg/mes/md/controller/BaseKnifeController.java index 2d9716a..8fb0307 100644 --- a/ktg-mes/src/main/java/com/ktg/mes/md/controller/BaseKnifeController.java +++ b/ktg-mes/src/main/java/com/ktg/mes/md/controller/BaseKnifeController.java @@ -596,7 +596,7 @@ public class BaseKnifeController extends BaseController { productionArrangements.setCreateTime(DateUtils.getNowDate()); productionArrangementsMapper.insertProductionArrangements(productionArrangements); - if (!msg.contains("缺少物料已生成组装任务!")){ + if (!msg.contains("缺少物料已生成组装任务!")) { // 生成出库计划单 WmsOutPlan outPlan = new WmsOutPlan(); outPlan.setPlanCode(productionArrangements.getPlanSheet()); @@ -905,7 +905,8 @@ public class BaseKnifeController extends BaseController { wmsInPlanTemp.setCellCode(zdTask.getAttr3()); wmsInPlanTemp.setPlanCode(zdTask.getAttr4() == null ? zdTask.getCode() : zdTask.getAttr4()); wmsInPlanTemp.setRelBillCode("组装单据"); - wmsInPlanTemp.setPlanTypeId("13"); + wmsInPlanTemp.setPlanTypeId(13L); + wmsInPlanTemp.setPlanTypeCode("ZDRK"); wmsInPlanTemp.setCreateBy(getUsername()); wmsInPlanTemp.setCreateTime(DateUtils.getNowDate()); diff --git a/ktg-mes/src/main/java/com/ktg/mes/wm/domain/WmsInPlan.java b/ktg-mes/src/main/java/com/ktg/mes/wm/domain/WmsInPlan.java index f167e5c..ae5253b 100644 --- a/ktg-mes/src/main/java/com/ktg/mes/wm/domain/WmsInPlan.java +++ b/ktg-mes/src/main/java/com/ktg/mes/wm/domain/WmsInPlan.java @@ -150,8 +150,13 @@ public class WmsInPlan extends BaseEntity { /** * 入库类型 */ - @Excel(name = "入库类型") - private String planTypeId; + @Excel(name = "入库类型ID") + private Long planTypeId; + + /** + * 入库类型编码 + */ + private String planTypeCode; /** * 入库计划明细信息 @@ -334,14 +339,22 @@ public class WmsInPlan extends BaseEntity { return planCode; } - public void setPlanTypeId(String planTypeId) { + public void setPlanTypeId(Long planTypeId) { this.planTypeId = planTypeId; } - public String getPlanTypeId() { + public Long getPlanTypeId() { return planTypeId; } + public String getPlanTypeCode() { + return planTypeCode; + } + + public void setPlanTypeCode(String planTypeCode) { + this.planTypeCode = planTypeCode; + } + public List getWmsInPlanDetailsList() { return wmsInPlanDetailsList; } @@ -381,6 +394,7 @@ public class WmsInPlan extends BaseEntity { .append("isDelete", getIsDelete()) .append("planCode", getPlanCode()) .append("planTypeId", getPlanTypeId()) + .append("planTypeCode", getPlanTypeCode()) .append("wmsInPlanDetailsList", getWmsInPlanDetailsList()) .toString(); } diff --git a/ktg-mes/src/main/java/com/ktg/mes/wm/domain/WmsInTask.java b/ktg-mes/src/main/java/com/ktg/mes/wm/domain/WmsInTask.java index 00eeafe..249a693 100644 --- a/ktg-mes/src/main/java/com/ktg/mes/wm/domain/WmsInTask.java +++ b/ktg-mes/src/main/java/com/ktg/mes/wm/domain/WmsInTask.java @@ -134,6 +134,11 @@ public class WmsInTask extends BaseEntity { @Excel(name = "入库明细ID") private Long detailInId; + /** + * 计划类型编码 + */ + private String planTypeCode; + private List wmsInPlanDetailEntityList; public void setId(Long id) { @@ -328,6 +333,14 @@ public class WmsInTask extends BaseEntity { this.wmsInPlanDetailEntityList = wmsInPlanDetailEntityList; } + public String getPlanTypeCode() { + return planTypeCode; + } + + public void setPlanTypeCode(String planTypeCode) { + this.planTypeCode = planTypeCode; + } + @Override public String toString() { return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) @@ -353,6 +366,7 @@ public class WmsInTask extends BaseEntity { .append("batch", getBatch()) .append("materialId", getMaterialId()) .append("planTypeId", getPlanTypeId()) + .append("planTypeCode", getPlanTypeCode()) .append("planInStatus", getPlanInStatus()) .append("planInCode", getPlanInCode()) .append("materialCode", getMaterialCode()) diff --git a/ktg-mes/src/main/java/com/ktg/mes/wm/service/impl/WmsInPlanDetailEntityServiceImpl.java b/ktg-mes/src/main/java/com/ktg/mes/wm/service/impl/WmsInPlanDetailEntityServiceImpl.java index 9182d82..bdf379c 100644 --- a/ktg-mes/src/main/java/com/ktg/mes/wm/service/impl/WmsInPlanDetailEntityServiceImpl.java +++ b/ktg-mes/src/main/java/com/ktg/mes/wm/service/impl/WmsInPlanDetailEntityServiceImpl.java @@ -68,7 +68,7 @@ public class WmsInPlanDetailEntityServiceImpl implements IWmsInPlanDetailEntityS // 获取入库计划信息 WmsInPlan wmsInPlan = wmsInPlanMapper.selectWmsInPlanByPlanId(entity.getPlanId().toString()); // 获取入库计划 - WmsBusinessType wmsBusinessType = wmsBusinessTypeMapper.selectWmsBusinessTypeByTypeId(wmsInPlan.getPlanTypeId()); + WmsBusinessType wmsBusinessType = wmsBusinessTypeMapper.selectWmsBusinessTypeByTypeId(wmsInPlan.getPlanTypeId().toString()); for (WmsInPlanDetails detail : wmsInPlan.getWmsInPlanDetailsList()) { // 匹配入库明细 diff --git a/ktg-mes/src/main/java/com/ktg/mes/wm/service/impl/WmsZdTaskServiceImpl.java b/ktg-mes/src/main/java/com/ktg/mes/wm/service/impl/WmsZdTaskServiceImpl.java index 07f8142..151b1c4 100644 --- a/ktg-mes/src/main/java/com/ktg/mes/wm/service/impl/WmsZdTaskServiceImpl.java +++ b/ktg-mes/src/main/java/com/ktg/mes/wm/service/impl/WmsZdTaskServiceImpl.java @@ -386,7 +386,7 @@ public class WmsZdTaskServiceImpl implements IWmsZdTaskService wmsInPlanTemp.setCellCode(wmStorageArea.getAreaCode()); wmsInPlanTemp.setPlanCode(zdTask.getPlanSheet() != null ? zdTask.getPlanSheet() : zdTask.getCode()); wmsInPlanTemp.setRelBillCode("组装单据"); - wmsInPlanTemp.setPlanTypeId("13"); + wmsInPlanTemp.setPlanTypeId(13L); wmsInPlanTemp.setCreateBy(getUsername()); wmsInPlanTemp.setCreateTime(DateUtils.getNowDate()); diff --git a/ktg-mes/src/main/resources/mapper/wm/WmsInPlanMapper.xml b/ktg-mes/src/main/resources/mapper/wm/WmsInPlanMapper.xml index 663c528..70789ed 100644 --- a/ktg-mes/src/main/resources/mapper/wm/WmsInPlanMapper.xml +++ b/ktg-mes/src/main/resources/mapper/wm/WmsInPlanMapper.xml @@ -33,6 +33,7 @@ + @@ -105,6 +106,7 @@ IS_DELETE, PLAN_CODE, PLAN_TYPE_ID + PLAN_TYPE_CODE from WMS_IN_PLAN @@ -140,6 +142,7 @@ and IS_DELETE = #{isDelete} and PLAN_CODE = #{planCode} and PLAN_TYPE_ID = #{planTypeId} + and PLAN_TYPE_CODE = #{planTypeCode} order by CREATE_TIME desc @@ -173,6 +176,7 @@ a.IS_DELETE, a.PLAN_CODE, a.PLAN_TYPE_ID, + a.PLAN_TYPE_CODE, b.DETAILS_ID as sub_DETAILS_ID, b.PLAN_ID as sub_PLAN_ID, b.MATERIAL_ID as sub_MATERIAL_ID, @@ -222,6 +226,7 @@ a.IS_DELETE, a.PLAN_CODE, a.PLAN_TYPE_ID, + a.PLAN_TYPE_CODE, b.DETAILS_ID as sub_DETAILS_ID, b.PLAN_ID as sub_PLAN_ID, b.MATERIAL_ID as sub_MATERIAL_ID, @@ -272,6 +277,7 @@ IS_DELETE, PLAN_CODE, PLAN_TYPE_ID, + PLAN_TYPE_CODE, #{state}, @@ -301,6 +307,7 @@ #{isDelete}, #{planCode}, #{planTypeId}, + #{planTypeCode}, @@ -334,6 +341,7 @@ IS_DELETE = #{isDelete}, PLAN_CODE = #{planCode}, PLAN_TYPE_ID = #{planTypeId}, + PLAN_TYPE_CODE = #{planTypeCode}, where PLAN_ID = #{planId} diff --git a/ktg-mes/src/main/resources/mapper/wm/WmsInTaskMapper.xml b/ktg-mes/src/main/resources/mapper/wm/WmsInTaskMapper.xml index 25319a7..8dc5dc1 100644 --- a/ktg-mes/src/main/resources/mapper/wm/WmsInTaskMapper.xml +++ b/ktg-mes/src/main/resources/mapper/wm/WmsInTaskMapper.xml @@ -24,6 +24,7 @@ + @@ -50,6 +51,7 @@ a.BATCH, a.MATERIAL_ID, a.PLAN_TYPE_ID, + a.PLAN_TYPE_CODE, a.PLAN_IN_STATUS, a.PLAN_IN_CODE, a.MATERIAL_CODE, @@ -84,6 +86,7 @@ and BATCH like concat('%', #{batch}, '%') and MATERIAL_ID = #{materialId} and PLAN_TYPE_ID = #{planTypeId} + and PLAN_TYPE_CODE = #{planTypeCode} and PLAN_IN_STATUS = #{planInStatus} and PLAN_IN_CODE = #{planInCode} and MATERIAL_CODE like concat('%', #{materialCode}, '%') @@ -116,6 +119,7 @@ BATCH, MATERIAL_ID, PLAN_TYPE_ID, + PLAN_TYPE_CODE, PLAN_IN_STATUS, PLAN_IN_CODE, MATERIAL_CODE, @@ -138,6 +142,7 @@ #{batch}, #{materialId}, #{planTypeId}, + #{planTypeCode}, #{planInStatus}, #{planInCode}, #{materialCode}, @@ -164,6 +169,7 @@ BATCH = #{batch}, MATERIAL_ID = #{materialId}, PLAN_TYPE_ID = #{planTypeId}, + PLAN_TYPE_CODE = #{planTypeCode}, PLAN_IN_STATUS = #{planInStatus}, PLAN_IN_CODE = #{planInCode}, MATERIAL_CODE = #{materialCode},