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 09452f5..42911f5 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 @@ -122,13 +122,15 @@ public class WmsInTaskController extends BaseController { } // 自动分配非临时库位 - WmStorageArea wmStorageArea = this.wmStorageLocationService.queryOneAreaByLocationCode("DDJ01", ucmCtBaseByCode.getAttr3() != null && ucmCtBaseByCode.getAttr3() == 1); - wmsInTask.setCellTgt(wmStorageArea.getAreaId()); - wmsInTask.setCellName(wmStorageArea.getAreaName()); - wmsInTask.setCellCode(wmStorageArea.getAreaCode()); - wmsInTask.setCellX(wmStorageArea.getPositionX().toString()); - wmsInTask.setCellY(wmStorageArea.getPositionY().toString()); - wmsInTask.setCellZ(wmStorageArea.getPositionZ().toString()); + if (wmsInTask.getCellCode().equals("TEMP")) { + WmStorageArea wmStorageArea = this.wmStorageLocationService.queryOneAreaByLocationCode("DDJ01", ucmCtBaseByCode.getAttr3() != null && ucmCtBaseByCode.getAttr3() == 1); + wmsInTask.setCellTgt(wmStorageArea.getAreaId()); + wmsInTask.setCellName(wmStorageArea.getAreaName()); + wmsInTask.setCellCode(wmStorageArea.getAreaCode()); + wmsInTask.setCellX(wmStorageArea.getPositionX().toString()); + wmsInTask.setCellY(wmStorageArea.getPositionY().toString()); + wmsInTask.setCellZ(wmStorageArea.getPositionZ().toString()); + } // 将料箱rfid绑定至任务 wmsInTask.setBoxRfid(rfid);