diff --git a/ktg-mes/src/main/java/com/ktg/mes/wm/controller/WmsInPlanController.java b/ktg-mes/src/main/java/com/ktg/mes/wm/controller/WmsInPlanController.java index 27232f3..f56a830 100644 --- a/ktg-mes/src/main/java/com/ktg/mes/wm/controller/WmsInPlanController.java +++ b/ktg-mes/src/main/java/com/ktg/mes/wm/controller/WmsInPlanController.java @@ -6,17 +6,8 @@ import com.ktg.common.core.domain.AjaxResult; import com.ktg.common.core.page.TableDataInfo; import com.ktg.common.enums.BusinessType; import com.ktg.common.utils.poi.ExcelUtil; -import com.ktg.mes.md.domain.MdItem; -import com.ktg.mes.md.domain.WmsBusinessType; -import com.ktg.mes.md.mapper.MdItemMapper; -import com.ktg.mes.md.service.IAP0AEService; -import com.ktg.mes.md.service.IMdItemService; -import com.ktg.mes.md.service.IWmsBusinessTypeService; -import com.ktg.mes.wm.domain.WmStorageArea; import com.ktg.mes.wm.domain.WmsInPlan; -import com.ktg.mes.wm.domain.WmsInPlanDetail; import com.ktg.mes.wm.domain.dto.WmsInboundOrderDto; -import com.ktg.mes.wm.service.IWmStorageLocationService; import com.ktg.mes.wm.service.IWmsInPlanService; import lombok.RequiredArgsConstructor; import org.springframework.security.access.prepost.PreAuthorize; @@ -24,7 +15,6 @@ import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletResponse; import javax.validation.Valid; -import java.util.Collections; import java.util.List; /** @@ -38,10 +28,6 @@ import java.util.List; @RequiredArgsConstructor public class WmsInPlanController extends BaseController { private final IWmsInPlanService wmsInPlanService; - private final IWmStorageLocationService wmStorageLocationService; - private final MdItemMapper mdItemMapper; - private final IWmsBusinessTypeService wmsBusinessTypeService; - private final IMdItemService mdItemService; /** * 查询入库计划列表 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 547e364..e47d7b2 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 @@ -3,6 +3,8 @@ package com.ktg.mes.wm.domain; import java.util.Date; import java.util.List; +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; @@ -14,6 +16,8 @@ import com.ktg.common.core.domain.BaseEntity; * @author yinjinlu * @date 2024-10-31 */ +@Getter +@Setter public class WmsInPlan extends BaseEntity { private static final long serialVersionUID = 1L; @@ -169,214 +173,6 @@ public class WmsInPlan extends BaseEntity { */ private List wmsInPlanDetailList; - public void setPlanId(Long planId) { - this.planId = planId; - } - - public Long getPlanId() { - return planId; - } - - public void setState(String state) { - this.state = state; - } - - public String getState() { - return state; - } - - public void setSourceType(String sourceType) { - this.sourceType = sourceType; - } - - public String getSourceType() { - return sourceType; - } - - public void setWareId(String wareId) { - this.wareId = wareId; - } - - public String getWareId() { - return wareId; - } - - public void setCellCode(String cellCode) { - this.cellCode = cellCode; - } - - public String getCellCode() { - return cellCode; - } - - public void setWorkOrderCode(String workOrderCode) { - this.workOrderCode = workOrderCode; - } - - public String getWorkOrderCode() { - return workOrderCode; - } - - public void setExpectDate(Date expectDate) { - this.expectDate = expectDate; - } - - public Date getExpectDate() { - return expectDate; - } - - public void setPublishName(String publishName) { - this.publishName = publishName; - } - - public String getPublishName() { - return publishName; - } - - public void setPublishTime(String publishTime) { - this.publishTime = publishTime; - } - - public String getPublishTime() { - return publishTime; - } - - public void setCloserId(String closerId) { - this.closerId = closerId; - } - - public String getCloserId() { - return closerId; - } - - public void setCloseTime(String closeTime) { - this.closeTime = closeTime; - } - - public String getCloseTime() { - return closeTime; - } - - public void setRelBillCode(String relBillCode) { - this.relBillCode = relBillCode; - } - - public String getRelBillCode() { - return relBillCode; - } - - public void setCustomerId(String customerId) { - this.customerId = customerId; - } - - public String getCustomerId() { - return customerId; - } - - public void setPoCode(String poCode) { - this.poCode = poCode; - } - - public String getPoCode() { - return poCode; - } - - public void setDepartmentId(String departmentId) { - this.departmentId = departmentId; - } - - public String getDepartmentId() { - return departmentId; - } - - public void setContractNo(String contractNo) { - this.contractNo = contractNo; - } - - public String getContractNo() { - return contractNo; - } - - public void setSupplierId(String supplierId) { - this.supplierId = supplierId; - } - - public String getSupplierId() { - return supplierId; - } - - public void setBusinessTypeId(String businessTypeId) { - this.businessTypeId = businessTypeId; - } - - public String getBusinessTypeId() { - return businessTypeId; - } - - public void setSrcOutTaskId(String srcOutTaskId) { - this.srcOutTaskId = srcOutTaskId; - } - - public String getSrcOutTaskId() { - return srcOutTaskId; - } - - public void setIsActive(String isActive) { - this.isActive = isActive; - } - - public String getIsActive() { - return isActive; - } - - public void setIsDelete(String isDelete) { - this.isDelete = isDelete; - } - - public String getIsDelete() { - return isDelete; - } - - public void setPlanCode(String planCode) { - this.planCode = planCode; - } - - public String getPlanCode() { - return planCode; - } - - public void setPlanTypeId(Long planTypeId) { - this.planTypeId = planTypeId; - } - - public Long getPlanTypeId() { - return planTypeId; - } - - public String getPlanTypeCode() { - return planTypeCode; - } - - public void setPlanTypeCode(String planTypeCode) { - this.planTypeCode = planTypeCode; - } - - public List getWmsInPlanDetailsList() { - return wmsInPlanDetailList; - } - - public void setWmsInPlanDetailsList(List wmsInPlanDetailList) { - this.wmsInPlanDetailList = wmsInPlanDetailList; - } - - public String getLocationCode() { - return locationCode; - } - - public void setLocationCode(String locationCode) { - this.locationCode = locationCode; - } - @Override public String toString() { return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) @@ -409,7 +205,7 @@ public class WmsInPlan extends BaseEntity { .append("planCode", getPlanCode()) .append("planTypeId", getPlanTypeId()) .append("planTypeCode", getPlanTypeCode()) - .append("wmsInPlanDetailsList", getWmsInPlanDetailsList()) + .append("wmsInPlanDetailsList", getWmsInPlanDetailList()) .toString(); } } 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 4fd0ac4..f67205c 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 @@ -62,14 +62,14 @@ public class WmsInPlanServiceImpl implements IWmsInPlanService { public WmsInPlan selectWmsInPlanByPlanId(Long planId) { WmsInPlan wmsInPlan = wmsInPlanMapper.selectWmsInPlanByPlanId(planId); List wmsInPlanDetailList = new ArrayList<>(); - wmsInPlan.getWmsInPlanDetailsList().forEach(detail -> { + wmsInPlan.getWmsInPlanDetailList().forEach(detail -> { WmsInPlanDetailEntity wmsInPlanDetailEntityQuery = new WmsInPlanDetailEntity(); wmsInPlanDetailEntityQuery.setPlanDetailsId(detail.getDetailsId()); List wmsInPlanDetailEntityList = wmsInPlanDetailEntityMapper.selectWmsInPlanDetailEntityList(wmsInPlanDetailEntityQuery); detail.setWmsInPlanDetailEntityList(wmsInPlanDetailEntityList); wmsInPlanDetailList.add(detail); }); - wmsInPlan.setWmsInPlanDetailsList(wmsInPlanDetailList); + wmsInPlan.setWmsInPlanDetailList(wmsInPlanDetailList); return wmsInPlan; } @@ -127,7 +127,7 @@ public class WmsInPlanServiceImpl implements IWmsInPlanService { wmsInPlanDetail.setQuantityIn(ap0ae.getQuantity().toString()); wmsInPlanDetail.setMaterialId(mdItem.getItemId().toString()); - wmsInPlan.setWmsInPlanDetailsList(Collections.singletonList(wmsInPlanDetail)); + wmsInPlan.setWmsInPlanDetailList(Collections.singletonList(wmsInPlanDetail)); this.insertWmsInPlan(wmsInPlan); // 执行入库计划 @@ -215,7 +215,7 @@ public class WmsInPlanServiceImpl implements IWmsInPlanService { * @param wmsInPlan 入库计划对象 */ public void insertWmsInPlanDetails(WmsInPlan wmsInPlan) { - List wmsInPlanDetailList = wmsInPlan.getWmsInPlanDetailsList(); + List wmsInPlanDetailList = wmsInPlan.getWmsInPlanDetailList(); Long planId = wmsInPlan.getPlanId(); if (StringUtils.isNotNull(wmsInPlanDetailList)) { List list = new ArrayList<>(); @@ -226,7 +226,7 @@ public class WmsInPlanServiceImpl implements IWmsInPlanService { if (!list.isEmpty()) { wmsInPlanMapper.batchWmsInPlanDetails(list); WmsInPlan wmsInPlan1 = selectWmsInPlanByPlanId(planId); - List wmsInPlanDetailList1 = wmsInPlan1.getWmsInPlanDetailsList(); + List wmsInPlanDetailList1 = wmsInPlan1.getWmsInPlanDetailList(); for (int i = 0; i < list.size(); i++) { List wmsInPlanDetailEntityList = list.get(i).getWmsInPlanDetailEntityList(); wmsInPlanDetailList1.get(i).setWmsInPlanDetailEntityList(wmsInPlanDetailEntityList); @@ -285,7 +285,7 @@ public class WmsInPlanServiceImpl implements IWmsInPlanService { WmsInTask wmsInTask = new WmsInTask(); AtomicInteger atomicInteger = new AtomicInteger(); - wmsInPlan.getWmsInPlanDetailsList().forEach(detail -> { + wmsInPlan.getWmsInPlanDetailList().forEach(detail -> { int index = atomicInteger.getAndIncrement(); wmsInTask.setPlanInId(wmsInPlan.getPlanId()); @@ -332,7 +332,7 @@ public class WmsInPlanServiceImpl implements IWmsInPlanService { public void autoCell(WmsInPlan wmsInPlan) { // 校验是否指定了库区 if (StringUtils.isNotEmpty(wmsInPlan.getLocationCode())) { - wmsInPlan.getWmsInPlanDetailsList().forEach(wmsInPlanDetails -> { + wmsInPlan.getWmsInPlanDetailList().forEach(wmsInPlanDetails -> { // 获得物料ID MdItem mdItemById = mdItemService.selectMdItemById(Long.parseLong(wmsInPlanDetails.getMaterialId())); if (mdItemById == null) throw new RuntimeException("操作失败,该物料不存在"); @@ -378,7 +378,7 @@ public class WmsInPlanServiceImpl implements IWmsInPlanService { wmsInPlanDetail.setQuantity(wmsInboundOrderDto.getQuantity().toString()); wmsInPlanDetail.setQuantityIn(wmsInboundOrderDto.getQuantity().toString()); wmsInPlanDetail.setMaterialId(mdItem.getItemId().toString()); - wmsInPlan.setWmsInPlanDetailsList(Collections.singletonList(wmsInPlanDetail)); + wmsInPlan.setWmsInPlanDetailList(Collections.singletonList(wmsInPlanDetail)); // 整刀回库 if (StringUtils.equals(wmsInboundOrderDto.getTypeCode(), "ZDHK")) { // 如果是整刀回库,入库数量限制为 1