diff --git a/ant-design-vue-jeecg/src/views/system/inventory/InventoryDetailList.vue b/ant-design-vue-jeecg/src/views/system/inventory/InventoryDetailList.vue index 8ea82ed..ac5bef9 100644 --- a/ant-design-vue-jeecg/src/views/system/inventory/InventoryDetailList.vue +++ b/ant-design-vue-jeecg/src/views/system/inventory/InventoryDetailList.vue @@ -135,6 +135,12 @@ export default { dataIndex: 'containerCode' }, { + title: '容器状态', + align: "center", + dataIndex: 'containerStatus_dictText', + scopedSlots: {customRender: 'containerStatus_dictText'} + }, + { title: '库位编码', align: 'center', dataIndex: 'locationCode' diff --git a/ant-design-vue-jeecg/src/views/system/task/CircleTaskHeaderList.vue b/ant-design-vue-jeecg/src/views/system/task/CircleTaskHeaderList.vue index aeb5b9e..e50095f 100644 --- a/ant-design-vue-jeecg/src/views/system/task/CircleTaskHeaderList.vue +++ b/ant-design-vue-jeecg/src/views/system/task/CircleTaskHeaderList.vue @@ -10,7 +10,7 @@ <j-multi-select-tag v-model="queryParam.zoneCode" :options="zoneOptions" - placeholder="请选择"> + placeholder="请选择库区"> </j-multi-select-tag> </a-form-model-item> </a-form-item> diff --git a/ant-design-vue-jeecg/src/views/system/task/ReceiptTaskHeaderList.vue b/ant-design-vue-jeecg/src/views/system/task/ReceiptTaskHeaderList.vue index 6d28782..a1713fa 100644 --- a/ant-design-vue-jeecg/src/views/system/task/ReceiptTaskHeaderList.vue +++ b/ant-design-vue-jeecg/src/views/system/task/ReceiptTaskHeaderList.vue @@ -10,7 +10,7 @@ <j-multi-select-tag v-model="queryParam.zoneCode" :options="zoneOptions" - placeholder="请选择"> + placeholder="请选择库区"> </j-multi-select-tag> </a-form-model-item> </a-form-item> diff --git a/ant-design-vue-jeecg/src/views/system/task/ShipmentTaskHeaderList.vue b/ant-design-vue-jeecg/src/views/system/task/ShipmentTaskHeaderList.vue index 5dffaa3..8610188 100644 --- a/ant-design-vue-jeecg/src/views/system/task/ShipmentTaskHeaderList.vue +++ b/ant-design-vue-jeecg/src/views/system/task/ShipmentTaskHeaderList.vue @@ -10,7 +10,7 @@ <j-multi-select-tag v-model="queryParam.zoneCode" :options="zoneOptions" - placeholder="请选择"> + placeholder="请选择库区"> </j-multi-select-tag> </a-form-model-item> </a-form-item> diff --git a/ant-design-vue-jeecg/src/views/system/task/TransferTaskHeaderList.vue b/ant-design-vue-jeecg/src/views/system/task/TransferTaskHeaderList.vue index 945bc51..266f535 100644 --- a/ant-design-vue-jeecg/src/views/system/task/TransferTaskHeaderList.vue +++ b/ant-design-vue-jeecg/src/views/system/task/TransferTaskHeaderList.vue @@ -10,7 +10,7 @@ <j-multi-select-tag v-model="queryParam.zoneCode" :options="zoneOptions" - placeholder="请选择"> + placeholder="请选择库区"> </j-multi-select-tag> </a-form-model-item> </a-form-item> diff --git a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/wcs/service/WcsServiceImpl.java b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/wcs/service/WcsServiceImpl.java index 190089e..209ec74 100644 --- a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/wcs/service/WcsServiceImpl.java +++ b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/wcs/service/WcsServiceImpl.java @@ -139,6 +139,10 @@ public class WcsServiceImpl implements WcsService { return Result.error("分配库位时,任务已经完成不能再分库位"); } int taskType = taskHeader.getTaskType(); + if (taskType == QuantityConstant.TASK_TYPE_WHOLESHIPMENT || taskType == QuantityConstant.TASK_TYPE_EMPTYSHIPMENT + || taskType == QuantityConstant.TASK_TYPE_MANY_EMPTYSHIPMENT) { + return Result.error("分配库位时,整出类型的任务不需要分配库位"); + } String containerCode = taskHeader.getContainerCode(); String toLocationCode = taskHeader.getToLocationCode(); if (StringUtils.isNotEmpty(toLocationCode)) { diff --git a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/inventory/inventoryHeader/service/impl/InventoryHeaderServiceImpl.java b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/inventory/inventoryHeader/service/impl/InventoryHeaderServiceImpl.java index 37da9a3..7ed5964 100644 --- a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/inventory/inventoryHeader/service/impl/InventoryHeaderServiceImpl.java +++ b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/inventory/inventoryHeader/service/impl/InventoryHeaderServiceImpl.java @@ -93,7 +93,7 @@ public class InventoryHeaderServiceImpl extends ServiceImpl<InventoryHeaderMappe } return success; } - return false; + return true; } @Override diff --git a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiptContainerHeader/service/impl/ReceiptContainerHeaderServiceImpl.java b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiptContainerHeader/service/impl/ReceiptContainerHeaderServiceImpl.java index be0f943..5bb4d0b 100644 --- a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiptContainerHeader/service/impl/ReceiptContainerHeaderServiceImpl.java +++ b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiptContainerHeader/service/impl/ReceiptContainerHeaderServiceImpl.java @@ -33,6 +33,7 @@ import org.jeecg.utils.StringUtils; import org.jeecg.utils.constant.QuantityConstant; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; import com.alibaba.fastjson.JSON; @@ -105,7 +106,7 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl<ReceiptContai } @Override - @Transactional(rollbackFor = JeecgBootException.class) + @Transactional(rollbackFor = JeecgBootException.class, propagation = Propagation.REQUIRES_NEW) @OperationLog(bizId = "''", bizType = "'入库单追踪'", tag = "'入库任务生成'", extra = "#extraJsonString1", msg = "'任务ID:' + #taskHeader.getId()", condition = "#receiptContainerDetailList.size() > 0", recordReturnValue = true) @OperationLog(bizId = "''", bizType = "'任务追踪'", tag = "'入库任务生成'", extra = "#extraJsonString2", @@ -199,15 +200,15 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl<ReceiptContai if (!success) { throw new JeecgBootException("创建入库任务, 任务详情生成失败"); } - if (receiptContainerHeader.getTaskType() == QuantityConstant.TASK_TYPE_SUPPLEMENTRECEIPT) { - // 如果是空托盘,那么不需要更新库存 - if (!containerFillStatus.equals(QuantityConstant.STATUS_CONTAINER_FILL_EMPTY)) { - success = inventoryHeaderService.updateInventoryContainerStatusByContainerCode(containerCode, warehouseCode); - if (!success) { - throw new JeecgBootException("创建入库任务, 更新库存头失败"); - } - } - } +// if (receiptContainerHeader.getTaskType() == QuantityConstant.TASK_TYPE_SUPPLEMENTRECEIPT) { +// // 如果是空托盘,那么不需要更新库存 +// if (!containerFillStatus.equals(QuantityConstant.STATUS_CONTAINER_FILL_EMPTY)) { +// success = inventoryHeaderService.updateInventoryContainerStatusByContainerCode(containerCode, warehouseCode); +// if (!success) { +// throw new JeecgBootException("创建入库任务, 更新库存头失败"); +// } +// } +// } success = receiptContainerHeaderService.updateToPortAndStatus(receiptContainerHeader.getToPort(), QuantityConstant.RECEIPT_CONTAINER_TASK, receiptContainerHeader.getId()); if (!success) { diff --git a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/shipment/shipmentCombination/service/impl/ShipmentCombinationServiceImpl.java b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/shipment/shipmentCombination/service/impl/ShipmentCombinationServiceImpl.java index c85c392..937e008 100644 --- a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/shipment/shipmentCombination/service/impl/ShipmentCombinationServiceImpl.java +++ b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/shipment/shipmentCombination/service/impl/ShipmentCombinationServiceImpl.java @@ -580,10 +580,6 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi if (!success) { throw new JeecgBootException("生成出库任务时, 更新出库组盘头失败"); } - success = inventoryHeaderService.updateInventoryContainerStatusByContainerCode(containerCode, warehouseCode); - if (!success) { - throw new JeecgBootException("生成出库任务时, 更新库存头失败"); - } LogRecordContext.putVariable("taskHeader", taskHeader);// 操作日志收集 LogRecordContext.putVariable("shipmentContainerDetailList", shipmentContainerDetailList);// 操作日志收集 LogRecordContext.putVariable("extraJsonString1", JSON.toJSONString(shipmentContainerDetailList));// 操作日志收集 diff --git a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/taskHeader/service/impl/TaskHeaderServiceImpl.java b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/taskHeader/service/impl/TaskHeaderServiceImpl.java index ff54d1a..eb28076 100644 --- a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/taskHeader/service/impl/TaskHeaderServiceImpl.java +++ b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/taskHeader/service/impl/TaskHeaderServiceImpl.java @@ -1170,9 +1170,6 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea throw new JeecgBootException("完成入库任务时,更新入库单头失败"); } } - if (!inventoryHeaderService.updateInventoryContainerStatusByContainerCode(containerCode, warehouseCode)) { - throw new JeecgBootException("完成入库任务时,更新托盘状态失败"); - } Result result = taskHeaderService.completeTaskUnLockContainerAndLocation(taskHeader.getContainerFillStatus(), taskType, containerCode, fromLocationCode, toLocationCode, warehouseCode); if (!result.isSuccess()) { @@ -1383,11 +1380,6 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea throw new JeecgBootException("完成出库任务,更新出库单头失败"); } } - if (taskType != QuantityConstant.TASK_TYPE_WHOLESHIPMENT) { - if (!inventoryHeaderService.updateInventoryContainerStatusByContainerCode(containerCode, warehouseCode)) { - throw new JeecgBootException("完成出库任务,更新库存状态失败"); - } - } Result result = taskHeaderService.completeTaskUnLockContainerAndLocation(taskHeader.getContainerFillStatus(), taskType, containerCode, fromLocationCode, toLocationCode, warehouseCode); if (!result.isSuccess()) { @@ -1498,6 +1490,9 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea default: throw new JeecgBootException("创建任务时,没有匹配到这种任务类型" + taskType); } + if (!inventoryHeaderService.updateInventoryContainerStatusByContainerCode(containerCode, warehouseCode)) { + throw new JeecgBootException("任务类型" + taskType + "创建任务时,更新库存状态失败"); + } return result; } @@ -1772,6 +1767,9 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea throw new JeecgBootException("任务类型" + taskType + "完成任务时,更新库位失败"); } } + if (!inventoryHeaderService.updateInventoryContainerStatusByContainerCode(containerCode, warehouseCode)) { + throw new JeecgBootException("任务类型" + taskType + "完成任务时,更新托盘状态失败"); + } return Result.OK("任务类型" + taskType + "完成任务成功"); } @@ -2222,7 +2220,6 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea if (!result.isSuccess()) { throw new JeecgBootException(result.getMessage()); } - taskHeader.setStatus(QuantityConstant.TASK_STATUS_COMPLETED); success = taskHeaderService.updateStatusById(QuantityConstant.TASK_STATUS_COMPLETED, taskHeader.getId()); if (!success) { throw new JeecgBootException("完成移库任务时, 更新任务失败"); diff --git a/huaheng-wms-core/src/main/resources/application.yml b/huaheng-wms-core/src/main/resources/application.yml index 99fe877..d4baada 100644 --- a/huaheng-wms-core/src/main/resources/application.yml +++ b/huaheng-wms-core/src/main/resources/application.yml @@ -2,8 +2,8 @@ spring: application: name: huaheng-wms-core profiles: - active: dev - + active: test + huaheng: system: