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 3f50ac4..9aae9a9 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 @@ -124,11 +124,10 @@ public class WmsInTaskController extends BaseController { */ // @PreAuthorize("@ss.hasPermi('wm:wmsInTask:issueBatch')") // @Log(title = "入库任务", businessType = BusinessType.UPDATE) - @PostMapping("/open/issueBatch") + @PostMapping("/open/issueBatch/{ids}") @ResponseBody - public AjaxResult issueBatch(@RequestBody List wmsInTaskIdList) { - - wmsInTaskIdList.forEach(taskId -> { + public AjaxResult issueBatch(@PathVariable String[] ids) { + for (String taskId : ids) { // 获取任务信息 WmsInTask wmsInTask = wmsInTaskService.selectWmsInTaskById(taskId); // 更新任务状态 @@ -230,7 +229,7 @@ public class WmsInTaskController extends BaseController { } mdItemService.updateMdItem(mbbBdMrlMitm); } - }); + } return toAjax(1); } } 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 25188a2..00eeafe 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 @@ -60,6 +60,9 @@ public class WmsInTask extends BaseEntity { * 库位编码 */ private String cellCode; + private String cellX; + private String cellY; + private String cellZ; /** * 起始库位 @@ -205,6 +208,30 @@ public class WmsInTask extends BaseEntity { this.cellCode = cellCode; } + public String getCellX() { + return cellX; + } + + public void setCellX(String cellX) { + this.cellX = cellX; + } + + public String getCellY() { + return cellY; + } + + public void setCellY(String cellY) { + this.cellY = cellY; + } + + public String getCellZ() { + return cellZ; + } + + public void setCellZ(String cellZ) { + this.cellZ = cellZ; + } + public void setIsActive(String isActive) { this.isActive = isActive; } @@ -313,6 +340,9 @@ public class WmsInTask extends BaseEntity { .append("cellName", getCellName()) .append("cellCode", getCellCode()) .append("cellOrig", getCellOrig()) + .append("cellX", getCellX()) + .append("cellY", getCellY()) + .append("cellZ", getCellZ()) .append("remark", getRemark()) .append("createBy", getCreateBy()) .append("createTime", getCreateTime()) 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 b9a2da4..183de07 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 @@ -9,7 +9,9 @@ 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.WmStorageArea; import com.ktg.mes.wm.domain.WmsInPlanDetailEntity; +import com.ktg.mes.wm.mapper.WmStorageAreaMapper; import com.ktg.mes.wm.service.IWmsInPlanDetailEntityService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -31,6 +33,8 @@ public class WmsInTaskServiceImpl implements IWmsInTaskService { private MdItemMapper mdItemMapper; @Autowired private IWmsInPlanDetailEntityService wmsInPlanDetailEntityService; + @Autowired + private WmStorageAreaMapper wmStorageAreaMapper; /** * 查询入库任务 @@ -58,6 +62,12 @@ public class WmsInTaskServiceImpl implements IWmsInTaskService { WmsInPlanDetailEntity wmsInPlanDetailEntityQuery = new WmsInPlanDetailEntity(); wmsInPlanDetailEntityQuery.setPlanDetailsId(task.getDetailInId()); + // 库位信息 + WmStorageArea wmStorageArea = wmStorageAreaMapper.selectWmStorageAreaByAreaCode(task.getCellCode()); + task.setCellX(wmStorageArea.getPositionX().toString()); + task.setCellY(wmStorageArea.getPositionY().toString()); + task.setCellZ(wmStorageArea.getPositionZ().toString()); + List wmsInPlanDetailEntityList = wmsInPlanDetailEntityService.selectWmsInPlanDetailEntityList(wmsInPlanDetailEntityQuery); task.setWmsInPlanDetailEntityList(wmsInPlanDetailEntityList); wmsInTaskList.add(task);