From f52b014aa0974393c158737ae7149e1c70660ae3 Mon Sep 17 00:00:00 2001 From: Kelvin Date: Sat, 4 Jan 2025 10:09:09 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E5=85=A5=E5=BA=93=E8=AE=A1=E5=88=92?= =?UTF-8?q?=E8=AF=A6=E6=83=85):=20=E5=AE=9E=E4=BD=93=E7=B1=BB=E9=87=8D?= =?UTF-8?q?=E5=91=BD=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../md/controller/BaseKnifeController.java | 41 ++++--- .../java/com/ktg/mes/wm/domain/WmsInPlan.java | 10 +- ...nPlanDetails.java => WmsInPlanDetail.java} | 103 +----------------- .../ktg/mes/wm/mapper/WmsInPlanMapper.java | 8 +- .../WmsInPlanDetailEntityServiceImpl.java | 2 +- .../wm/service/impl/WmsInPlanServiceImpl.java | 51 +++++---- .../wm/service/impl/WmsZdTaskServiceImpl.java | 54 ++++----- .../resources/mapper/wm/WmsInPlanMapper.xml | 2 +- 8 files changed, 82 insertions(+), 189 deletions(-) rename ktg-mes/src/main/java/com/ktg/mes/wm/domain/{WmsInPlanDetails.java => WmsInPlanDetail.java} (54%) 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 455bbe6..0e9345f 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 @@ -38,7 +38,6 @@ import com.ktg.common.enums.BusinessType; import com.ktg.common.utils.poi.ExcelUtil; import com.ktg.common.core.page.TableDataInfo; -import static com.ktg.common.utils.SecurityUtils.getUsername; import static com.ktg.generator.util.MultiModuleCodeGenerator.generateTaskCode; /** @@ -1094,30 +1093,30 @@ public class BaseKnifeController extends BaseController { wmsInPlanTemp.setCreateTime(DateUtils.getNowDate()); // 入库任务明细 - List wmsInPlanDetailsList = new ArrayList<>(); - WmsInPlanDetails wmsInPlanDetails = new WmsInPlanDetails(); - wmsInPlanDetails.setMaterialId(zdTask.getmProductId().toString()); - wmsInPlanDetails.setBatch(batchNum); - wmsInPlanDetails.setCellId(1L); - wmsInPlanDetails.setQuantity(zdTask.getProductIdQty().toString()); - wmsInPlanDetails.setQuantityIn(zdTask.getProductIdQty().toString()); - wmsInPlanDetails.setPlanInStatus("0"); - wmsInPlanDetailsList.add(wmsInPlanDetails); - wmsInPlanTemp.setWmsInPlanDetailsList(wmsInPlanDetailsList); + List wmsInPlanDetailList = new ArrayList<>(); + WmsInPlanDetail wmsInPlanDetail = new WmsInPlanDetail(); + wmsInPlanDetail.setMaterialId(zdTask.getmProductId().toString()); + wmsInPlanDetail.setBatch(batchNum); + wmsInPlanDetail.setCellId(1L); + wmsInPlanDetail.setQuantity(zdTask.getProductIdQty().toString()); + wmsInPlanDetail.setQuantityIn(zdTask.getProductIdQty().toString()); + wmsInPlanDetail.setPlanInStatus("0"); + wmsInPlanDetailList.add(wmsInPlanDetail); + wmsInPlanTemp.setWmsInPlanDetailsList(wmsInPlanDetailList); wmsInPlanService.insertWmsInPlan(wmsInPlanTemp); wmsInPlan = wmsInPlanTemp; } else { // 入库任务明细 - List wmsInPlanDetailsList = wmsInPlan.getWmsInPlanDetailsList(); - WmsInPlanDetails wmsInPlanDetails = new WmsInPlanDetails(); - wmsInPlanDetails.setMaterialId(zdTask.getmProductId().toString()); - wmsInPlanDetails.setBatch(batchNum); - wmsInPlanDetails.setCellId(1L); - wmsInPlanDetails.setQuantity(zdTask.getProductIdQty().toString()); - wmsInPlanDetails.setQuantityIn(zdTask.getProductIdQty().toString()); - wmsInPlanDetails.setPlanInStatus("0"); - wmsInPlanDetailsList.add(wmsInPlanDetails); - wmsInPlan.setWmsInPlanDetailsList(wmsInPlanDetailsList); + List wmsInPlanDetailList = wmsInPlan.getWmsInPlanDetailsList(); + WmsInPlanDetail wmsInPlanDetail = new WmsInPlanDetail(); + wmsInPlanDetail.setMaterialId(zdTask.getmProductId().toString()); + wmsInPlanDetail.setBatch(batchNum); + wmsInPlanDetail.setCellId(1L); + wmsInPlanDetail.setQuantity(zdTask.getProductIdQty().toString()); + wmsInPlanDetail.setQuantityIn(zdTask.getProductIdQty().toString()); + wmsInPlanDetail.setPlanInStatus("0"); + wmsInPlanDetailList.add(wmsInPlanDetail); + wmsInPlan.setWmsInPlanDetailsList(wmsInPlanDetailList); wmsInPlanService.updateWmsInPlan(wmsInPlan); } 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 69a6ac1..547e364 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 @@ -167,7 +167,7 @@ public class WmsInPlan extends BaseEntity { /** * 入库计划明细信息 */ - private List wmsInPlanDetailsList; + private List wmsInPlanDetailList; public void setPlanId(Long planId) { this.planId = planId; @@ -361,12 +361,12 @@ public class WmsInPlan extends BaseEntity { this.planTypeCode = planTypeCode; } - public List getWmsInPlanDetailsList() { - return wmsInPlanDetailsList; + public List getWmsInPlanDetailsList() { + return wmsInPlanDetailList; } - public void setWmsInPlanDetailsList(List wmsInPlanDetailsList) { - this.wmsInPlanDetailsList = wmsInPlanDetailsList; + public void setWmsInPlanDetailsList(List wmsInPlanDetailList) { + this.wmsInPlanDetailList = wmsInPlanDetailList; } public String getLocationCode() { diff --git a/ktg-mes/src/main/java/com/ktg/mes/wm/domain/WmsInPlanDetails.java b/ktg-mes/src/main/java/com/ktg/mes/wm/domain/WmsInPlanDetail.java similarity index 54% rename from ktg-mes/src/main/java/com/ktg/mes/wm/domain/WmsInPlanDetails.java rename to ktg-mes/src/main/java/com/ktg/mes/wm/domain/WmsInPlanDetail.java index b06ed62..b0777fa 100644 --- a/ktg-mes/src/main/java/com/ktg/mes/wm/domain/WmsInPlanDetails.java +++ b/ktg-mes/src/main/java/com/ktg/mes/wm/domain/WmsInPlanDetail.java @@ -1,5 +1,7 @@ package com.ktg.mes.wm.domain; +import lombok.Getter; +import lombok.Setter; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import com.ktg.common.annotation.Excel; @@ -13,7 +15,9 @@ import java.util.List; * @author yinjinlu * @date 2024-10-31 */ -public class WmsInPlanDetails extends BaseEntity +@Setter +@Getter +public class WmsInPlanDetail extends BaseEntity { private static final long serialVersionUID = 1L; @@ -60,103 +64,6 @@ public class WmsInPlanDetails extends BaseEntity private List wmsInPlanDetailEntityList; - public void setDetailsId(Long detailsId) { - this.detailsId = detailsId; - } - - public Long getDetailsId() - { - return detailsId; - } - - public void setPlanId(Long planId) { - this.planId = planId; - } - - public Long getPlanId() { - return planId; - } - public void setMaterialId(String materialId) - { - this.materialId = materialId; - } - - public String getMaterialId() - { - return materialId; - } - public void setBatch(String batch) - { - this.batch = batch; - } - - public String getBatch() - { - return batch; - } - public void setCellId(Long cellId) - { - this.cellId = cellId; - } - - public Long getCellId() - { - return cellId; - } - public void setQuantity(String quantity) - { - this.quantity = quantity; - } - - public String getQuantity() - { - return quantity; - } - public void setQuantityIn(String quantityIn) - { - this.quantityIn = quantityIn; - } - - public String getQuantityIn() - { - return quantityIn; - } - public void setPlanInStatus(String planInStatus) - { - this.planInStatus = planInStatus; - } - - public String getPlanInStatus() - { - return planInStatus; - } - public void setIsActivy(String isActivy) - { - this.isActivy = isActivy; - } - - public String getIsActivy() - { - return isActivy; - } - public void setIsDelete(String isDelete) - { - this.isDelete = isDelete; - } - - public String getIsDelete() - { - return isDelete; - } - - public List getWmsInPlanDetailEntityList() { - return wmsInPlanDetailEntityList; - } - - public void setWmsInPlanDetailEntityList(List wmsInPlanDetailEntityList) { - this.wmsInPlanDetailEntityList = wmsInPlanDetailEntityList; - } - @Override public String toString() { return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) diff --git a/ktg-mes/src/main/java/com/ktg/mes/wm/mapper/WmsInPlanMapper.java b/ktg-mes/src/main/java/com/ktg/mes/wm/mapper/WmsInPlanMapper.java index e7bc4d5..e415c8c 100644 --- a/ktg-mes/src/main/java/com/ktg/mes/wm/mapper/WmsInPlanMapper.java +++ b/ktg-mes/src/main/java/com/ktg/mes/wm/mapper/WmsInPlanMapper.java @@ -2,7 +2,7 @@ package com.ktg.mes.wm.mapper; import java.util.List; import com.ktg.mes.wm.domain.WmsInPlan; -import com.ktg.mes.wm.domain.WmsInPlanDetails; +import com.ktg.mes.wm.domain.WmsInPlanDetail; import org.apache.ibatis.annotations.Mapper; /** @@ -73,10 +73,10 @@ public interface WmsInPlanMapper /** * 批量新增入库计划明细 * - * @param wmsInPlanDetailsList 入库计划明细列表 + * @param wmsInPlanDetailList 入库计划明细列表 * @return 结果 */ - public int batchWmsInPlanDetails(List wmsInPlanDetailsList); + public int batchWmsInPlanDetails(List wmsInPlanDetailList); /** @@ -96,5 +96,5 @@ public interface WmsInPlanMapper */ public Boolean isDuplicatePlanCode(String planCode); - WmsInPlanDetails selectWmsInPlanDetailById(Long planDetailsId); + WmsInPlanDetail selectWmsInPlanDetailById(Long planDetailsId); } 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 1374126..5dabc3c 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 @@ -70,7 +70,7 @@ public class WmsInPlanDetailEntityServiceImpl implements IWmsInPlanDetailEntityS // 获取入库计划 WmsBusinessType wmsBusinessType = wmsBusinessTypeMapper.selectWmsBusinessTypeByTypeId(wmsInPlan.getPlanTypeId().toString()); - for (WmsInPlanDetails detail : wmsInPlan.getWmsInPlanDetailsList()) { + for (WmsInPlanDetail detail : wmsInPlan.getWmsInPlanDetailsList()) { // 匹配入库明细 if (detail.getDetailsId().equals(entity.getPlanDetailsId())) { System.out.println("---" + detail.getDetailsId() + "+测试+" + entity.getPlanDetailsId()); diff --git a/ktg-mes/src/main/java/com/ktg/mes/wm/service/impl/WmsInPlanServiceImpl.java b/ktg-mes/src/main/java/com/ktg/mes/wm/service/impl/WmsInPlanServiceImpl.java index 117083c..29366cb 100644 --- a/ktg-mes/src/main/java/com/ktg/mes/wm/service/impl/WmsInPlanServiceImpl.java +++ b/ktg-mes/src/main/java/com/ktg/mes/wm/service/impl/WmsInPlanServiceImpl.java @@ -52,15 +52,15 @@ public class WmsInPlanServiceImpl implements IWmsInPlanService { @Override public WmsInPlan selectWmsInPlanByPlanId(Long planId) { WmsInPlan wmsInPlan = wmsInPlanMapper.selectWmsInPlanByPlanId(planId); - List wmsInPlanDetailsList = new ArrayList<>(); + List wmsInPlanDetailList = new ArrayList<>(); wmsInPlan.getWmsInPlanDetailsList().forEach(detail -> { WmsInPlanDetailEntity wmsInPlanDetailEntityQuery = new WmsInPlanDetailEntity(); wmsInPlanDetailEntityQuery.setPlanDetailsId(detail.getDetailsId()); List wmsInPlanDetailEntityList = wmsInPlanDetailEntityMapper.selectWmsInPlanDetailEntityList(wmsInPlanDetailEntityQuery); detail.setWmsInPlanDetailEntityList(wmsInPlanDetailEntityList); - wmsInPlanDetailsList.add(detail); + wmsInPlanDetailList.add(detail); }); - wmsInPlan.setWmsInPlanDetailsList(wmsInPlanDetailsList); + wmsInPlan.setWmsInPlanDetailsList(wmsInPlanDetailList); return wmsInPlan; } @@ -109,16 +109,16 @@ public class WmsInPlanServiceImpl implements IWmsInPlanService { MdItem mdItem = mdItemService.selectMdItemByCode(ap0ae.getProductNumber()); //-- 入库计划详情 - WmsInPlanDetails wmsInPlanDetails = new WmsInPlanDetails(); + WmsInPlanDetail wmsInPlanDetail = new WmsInPlanDetail(); // 状态-待执行 - wmsInPlanDetails.setPlanInStatus("0"); + wmsInPlanDetail.setPlanInStatus("0"); // 库位ID - wmsInPlanDetails.setCellId(wmStorageArea.getAreaId()); - wmsInPlanDetails.setQuantity(ap0ae.getQuantity().toString()); - wmsInPlanDetails.setQuantityIn(ap0ae.getQuantity().toString()); - wmsInPlanDetails.setMaterialId(mdItem.getItemId().toString()); + wmsInPlanDetail.setCellId(wmStorageArea.getAreaId()); + wmsInPlanDetail.setQuantity(ap0ae.getQuantity().toString()); + wmsInPlanDetail.setQuantityIn(ap0ae.getQuantity().toString()); + wmsInPlanDetail.setMaterialId(mdItem.getItemId().toString()); - wmsInPlan.setWmsInPlanDetailsList(Collections.singletonList(wmsInPlanDetails)); + wmsInPlan.setWmsInPlanDetailsList(Collections.singletonList(wmsInPlanDetail)); this.insertWmsInPlan(wmsInPlan); // 执行入库计划 @@ -206,24 +206,24 @@ public class WmsInPlanServiceImpl implements IWmsInPlanService { * @param wmsInPlan 入库计划对象 */ public void insertWmsInPlanDetails(WmsInPlan wmsInPlan) { - List wmsInPlanDetailsList = wmsInPlan.getWmsInPlanDetailsList(); + List wmsInPlanDetailList = wmsInPlan.getWmsInPlanDetailsList(); Long planId = wmsInPlan.getPlanId(); - if (StringUtils.isNotNull(wmsInPlanDetailsList)) { - List list = new ArrayList<>(); - for (WmsInPlanDetails wmsInPlanDetails : wmsInPlanDetailsList) { - wmsInPlanDetails.setPlanId(planId); - list.add(wmsInPlanDetails); + if (StringUtils.isNotNull(wmsInPlanDetailList)) { + List list = new ArrayList<>(); + for (WmsInPlanDetail wmsInPlanDetail : wmsInPlanDetailList) { + wmsInPlanDetail.setPlanId(planId); + list.add(wmsInPlanDetail); } if (!list.isEmpty()) { wmsInPlanMapper.batchWmsInPlanDetails(list); WmsInPlan wmsInPlan1 = selectWmsInPlanByPlanId(planId); - List wmsInPlanDetailsList1 = wmsInPlan1.getWmsInPlanDetailsList(); + List wmsInPlanDetailList1 = wmsInPlan1.getWmsInPlanDetailsList(); for (int i = 0; i < list.size(); i++) { List wmsInPlanDetailEntityList = list.get(i).getWmsInPlanDetailEntityList(); - wmsInPlanDetailsList1.get(i).setWmsInPlanDetailEntityList(wmsInPlanDetailEntityList); - wmsInPlanDetailEntityMapper.deleteWmsInPlanDetailEntityByPlanDetailsId(wmsInPlanDetailsList1.get(i).getDetailsId()); + wmsInPlanDetailList1.get(i).setWmsInPlanDetailEntityList(wmsInPlanDetailEntityList); + wmsInPlanDetailEntityMapper.deleteWmsInPlanDetailEntityByPlanDetailsId(wmsInPlanDetailList1.get(i).getDetailsId()); // 插入实例 - insertWmsInPlanDetailEntity(wmsInPlanDetailsList1.get(i)); + insertWmsInPlanDetailEntity(wmsInPlanDetailList1.get(i)); } } } @@ -232,12 +232,12 @@ public class WmsInPlanServiceImpl implements IWmsInPlanService { /** * 新增入库计划明细实例 * - * @param wmsInPlanDetails 入库计划明细对象 + * @param wmsInPlanDetail 入库计划明细对象 */ - public void insertWmsInPlanDetailEntity(WmsInPlanDetails wmsInPlanDetails) { - List wmsInPlanDetailEntityList = wmsInPlanDetails.getWmsInPlanDetailEntityList(); - Long planId = wmsInPlanDetails.getPlanId(); - Long planDetailsId = wmsInPlanDetails.getDetailsId(); + public void insertWmsInPlanDetailEntity(WmsInPlanDetail wmsInPlanDetail) { + List wmsInPlanDetailEntityList = wmsInPlanDetail.getWmsInPlanDetailEntityList(); + Long planId = wmsInPlanDetail.getPlanId(); + Long planDetailsId = wmsInPlanDetail.getDetailsId(); if (StringUtils.isNotNull(wmsInPlanDetailEntityList)) { ArrayList list = new ArrayList<>(); for (WmsInPlanDetailEntity wmsInPlanDetailEntity : wmsInPlanDetailEntityList) { @@ -268,7 +268,6 @@ public class WmsInPlanServiceImpl implements IWmsInPlanService { * 执行入库计划 * * @param planId 入库计划ID - * @return 结果 */ @Override public int issueWmsInPlan(Long planId) { 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 d6a5bc4..775ae97 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 @@ -1,29 +1,17 @@ package com.ktg.mes.wm.service.impl; -import java.io.IOException; import java.util.*; -import com.alibaba.fastjson.JSON; import com.ktg.common.constant.UserConstants; import com.ktg.common.core.domain.AjaxResult; import com.ktg.common.utils.DateUtils; import com.ktg.common.utils.StringUtils; import com.ktg.generator.util.MultiModuleCodeGenerator; -import com.ktg.mes.cal.utils.CalendarUtil; import com.ktg.mes.md.domain.*; import com.ktg.mes.md.mapper.*; -import com.ktg.mes.md.service.IBaseKnifeService; -import com.ktg.mes.md.service.IBaseTechnologyBomService; -import com.ktg.mes.md.service.IBomRouteService; -import com.ktg.mes.md.service.IMdItemService; import com.ktg.mes.wm.domain.*; import com.ktg.mes.wm.mapper.*; -import com.ktg.mes.wm.service.IWmStorageAreaService; import com.ktg.mes.wm.service.IWmsInPlanService; -import com.ktg.mes.wm.service.IWmsInTaskService; -import com.ktg.system.mapper.SysOperLogMapper; -import com.ktg.system.service.ISysOperLogService; -import okhttp3.*; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.ktg.mes.wm.service.IWmsZdTaskService; @@ -436,14 +424,14 @@ public class WmsZdTaskServiceImpl implements IWmsZdTaskService wmsInPlanTemp.setCreateTime(DateUtils.getNowDate()); // 入库任务明细 - List wmsInPlanDetailsList = new ArrayList<>(); - WmsInPlanDetails wmsInPlanDetails = new WmsInPlanDetails(); - wmsInPlanDetails.setMaterialId(zdTask.getmProductId().toString()); - wmsInPlanDetails.setBatch(batchNum); - wmsInPlanDetails.setCellId(wmStorageArea.getAreaId()); - wmsInPlanDetails.setQuantity(zdTask.getProductIdQty().toString()); - wmsInPlanDetails.setQuantityIn(zdTask.getProductIdQty().toString()); - wmsInPlanDetails.setPlanInStatus("0"); + List wmsInPlanDetailList = new ArrayList<>(); + WmsInPlanDetail wmsInPlanDetail = new WmsInPlanDetail(); + wmsInPlanDetail.setMaterialId(zdTask.getmProductId().toString()); + wmsInPlanDetail.setBatch(batchNum); + wmsInPlanDetail.setCellId(wmStorageArea.getAreaId()); + wmsInPlanDetail.setQuantity(zdTask.getProductIdQty().toString()); + wmsInPlanDetail.setQuantityIn(zdTask.getProductIdQty().toString()); + wmsInPlanDetail.setPlanInStatus("0"); // 构建入库明细实体 List wmsInPlanDetailEntityList = new ArrayList<>(); baseKnifeList.forEach(baseKnife -> { @@ -451,23 +439,23 @@ public class WmsZdTaskServiceImpl implements IWmsZdTaskService wmsInPlanDetailEntity.setKnifeId(baseKnife.getBaseKnifeId()); wmsInPlanDetailEntityList.add(wmsInPlanDetailEntity); }); - wmsInPlanDetails.setWmsInPlanDetailEntityList(wmsInPlanDetailEntityList); - wmsInPlanDetailsList.add(wmsInPlanDetails); - wmsInPlanTemp.setWmsInPlanDetailsList(wmsInPlanDetailsList); + wmsInPlanDetail.setWmsInPlanDetailEntityList(wmsInPlanDetailEntityList); + wmsInPlanDetailList.add(wmsInPlanDetail); + wmsInPlanTemp.setWmsInPlanDetailsList(wmsInPlanDetailList); wmsInPlanService.insertWmsInPlan(wmsInPlanTemp); wmsInPlan = wmsInPlanTemp; } else { // 入库任务明细 - List wmsInPlanDetailsList = wmsInPlan.getWmsInPlanDetailsList(); - WmsInPlanDetails wmsInPlanDetails = new WmsInPlanDetails(); - wmsInPlanDetails.setMaterialId(zdTask.getmProductId().toString()); - wmsInPlanDetails.setBatch(batchNum); - wmsInPlanDetails.setCellId(wmStorageArea.getAreaId()); - wmsInPlanDetails.setQuantity(zdTask.getProductIdQty().toString()); - wmsInPlanDetails.setQuantityIn(zdTask.getProductIdQty().toString()); - wmsInPlanDetails.setPlanInStatus("0"); - wmsInPlanDetailsList.add(wmsInPlanDetails); - wmsInPlan.setWmsInPlanDetailsList(wmsInPlanDetailsList); + List wmsInPlanDetailList = wmsInPlan.getWmsInPlanDetailsList(); + WmsInPlanDetail wmsInPlanDetail = new WmsInPlanDetail(); + wmsInPlanDetail.setMaterialId(zdTask.getmProductId().toString()); + wmsInPlanDetail.setBatch(batchNum); + wmsInPlanDetail.setCellId(wmStorageArea.getAreaId()); + wmsInPlanDetail.setQuantity(zdTask.getProductIdQty().toString()); + wmsInPlanDetail.setQuantityIn(zdTask.getProductIdQty().toString()); + wmsInPlanDetail.setPlanInStatus("0"); + wmsInPlanDetailList.add(wmsInPlanDetail); + wmsInPlan.setWmsInPlanDetailsList(wmsInPlanDetailList); wmsInPlanService.updateWmsInPlan(wmsInPlan); } diff --git a/ktg-mes/src/main/resources/mapper/wm/WmsInPlanMapper.xml b/ktg-mes/src/main/resources/mapper/wm/WmsInPlanMapper.xml index 72d2672..9c42d05 100644 --- a/ktg-mes/src/main/resources/mapper/wm/WmsInPlanMapper.xml +++ b/ktg-mes/src/main/resources/mapper/wm/WmsInPlanMapper.xml @@ -37,7 +37,7 @@ -