diff --git a/ktg-mes/src/main/java/com/ktg/mes/wm/controller/WmsInTaskController.java b/ktg-mes/src/main/java/com/ktg/mes/wm/controller/WmsInTaskController.java index 86ae899..3f50ac4 100644 --- a/ktg-mes/src/main/java/com/ktg/mes/wm/controller/WmsInTaskController.java +++ b/ktg-mes/src/main/java/com/ktg/mes/wm/controller/WmsInTaskController.java @@ -58,6 +58,16 @@ public class WmsInTaskController extends BaseController { return getDataTable(list); } + /** + * 查询入库任务列表 + */ + @GetMapping("/open/list") + public TableDataInfo openList(WmsInTask wmsInTask) { + startPage(); + List list = wmsInTaskService.selectWmsInTaskList(wmsInTask); + return getDataTable(list); + } + /** * 导出入库任务列表 */ 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 2f43ad7..25188a2 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 @@ -5,6 +5,8 @@ import org.apache.commons.lang3.builder.ToStringStyle; import com.ktg.common.annotation.Excel; import com.ktg.common.core.domain.BaseEntity; +import java.util.List; + /** * 入库任务对象 WMS_IN_TASK * @@ -129,6 +131,8 @@ public class WmsInTask extends BaseEntity { @Excel(name = "入库明细ID") private Long detailInId; + private List wmsInPlanDetailEntityList; + public void setId(Long id) { this.id = id; } @@ -289,6 +293,14 @@ public class WmsInTask extends BaseEntity { this.materialUnit = materialUnit; } + 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) @@ -316,6 +328,7 @@ public class WmsInTask extends BaseEntity { .append("materialCode", getMaterialCode()) .append("materialName", getMaterialName()) .append("detailInId", getDetailInId()) + .append("wmsInPlanDetailEntityList", getWmsInPlanDetailEntityList()) .toString(); } } diff --git a/ktg-mes/src/main/java/com/ktg/mes/wm/service/impl/WmsInTaskServiceImpl.java b/ktg-mes/src/main/java/com/ktg/mes/wm/service/impl/WmsInTaskServiceImpl.java index e2c2005..b9a2da4 100644 --- a/ktg-mes/src/main/java/com/ktg/mes/wm/service/impl/WmsInTaskServiceImpl.java +++ b/ktg-mes/src/main/java/com/ktg/mes/wm/service/impl/WmsInTaskServiceImpl.java @@ -1,6 +1,7 @@ package com.ktg.mes.wm.service.impl; import java.util.ArrayList; +import java.util.Collections; import java.util.List; import com.ktg.common.utils.DateUtils; @@ -8,6 +9,8 @@ import com.ktg.generator.util.MultiModuleCodeGenerator; import com.ktg.mes.md.domain.MdItem; import com.ktg.mes.md.mapper.MdItemMapper; import com.ktg.mes.md.service.IMdItemService; +import com.ktg.mes.wm.domain.WmsInPlanDetailEntity; +import com.ktg.mes.wm.service.IWmsInPlanDetailEntityService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.ktg.mes.wm.mapper.WmsInTaskMapper; @@ -24,9 +27,10 @@ import com.ktg.mes.wm.service.IWmsInTaskService; public class WmsInTaskServiceImpl implements IWmsInTaskService { @Autowired private WmsInTaskMapper wmsInTaskMapper; - @Autowired private MdItemMapper mdItemMapper; + @Autowired + private IWmsInPlanDetailEntityService wmsInPlanDetailEntityService; /** * 查询入库任务 @@ -51,6 +55,11 @@ public class WmsInTaskServiceImpl implements IWmsInTaskService { wmsInTaskMapper.selectWmsInTaskList(wmsInTask).forEach(task -> { MdItem mdItem = mdItemMapper.selectMdItemByCode(task.getMaterialCode()); task.setMaterialName(mdItem.getItemName()); + + WmsInPlanDetailEntity wmsInPlanDetailEntityQuery = new WmsInPlanDetailEntity(); + wmsInPlanDetailEntityQuery.setPlanDetailsId(task.getDetailInId()); + List wmsInPlanDetailEntityList = wmsInPlanDetailEntityService.selectWmsInPlanDetailEntityList(wmsInPlanDetailEntityQuery); + task.setWmsInPlanDetailEntityList(wmsInPlanDetailEntityList); wmsInTaskList.add(task); }); return wmsInTaskList;