diff --git a/ant-design-vue-jeecg/src/views/system/inventory/InventoryTransactionList.vue b/ant-design-vue-jeecg/src/views/system/inventory/InventoryTransactionList.vue index 78dc092..0aa0281 100644 --- a/ant-design-vue-jeecg/src/views/system/inventory/InventoryTransactionList.vue +++ b/ant-design-vue-jeecg/src/views/system/inventory/InventoryTransactionList.vue @@ -58,7 +58,7 @@ </a-col> <a-col :xl="6" :lg="7" :md="8" :sm="24"> <a-form-item label="库存状态"> - <a-input placeholder="请输入库存状态" v-model="queryParam.inventoryStatus"></a-input> + <j-dict-select-tag placeholder="请选择库存状态" v-model="queryParam.inventoryStatus" dictCode="inventory_status"/> </a-form-item> </a-col> <a-col :xl="6" :lg="7" :md="8" :sm="24"> 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 54deb16..c04dc61 100644 --- a/ant-design-vue-jeecg/src/views/system/task/CircleTaskHeaderList.vue +++ b/ant-design-vue-jeecg/src/views/system/task/CircleTaskHeaderList.vue @@ -40,11 +40,6 @@ </a-form-item> </a-col> <a-col :xl="6" :lg="7" :md="8" :sm="24"> - <a-form-item label="是否空出"> - <j-dict-select-tag placeholder="请选择是否空出" v-model="queryParam.isEmptyOut" dictCode="is_or_not"/> - </a-form-item> - </a-col> - <a-col :xl="6" :lg="7" :md="8" :sm="24"> <a-form-item label="起始出入口"> <a-input placeholder="请输入起始出入口" v-model="queryParam.fromPortCode"></a-input> </a-form-item> @@ -59,16 +54,6 @@ <j-dict-select-tag placeholder="请选择任务状态" v-model="queryParam.status" dictCode="task_header_status"/> </a-form-item> </a-col> - <a-col :xl="6" :lg="7" :md="8" :sm="24"> - <a-form-item label="是否重入"> - <j-dict-select-tag placeholder="请选择是否重入" v-model="queryParam.isDoubleIn" dictCode="is_or_not"/> - </a-form-item> - </a-col> - <a-col :xl="6" :lg="7" :md="8" :sm="24"> - <a-form-item label="重入库位号"> - <a-input placeholder="请输入重入库位号" v-model="queryParam.originLocationCode"></a-input> - </a-form-item> - </a-col> <a-col :xl="12" :lg="14" :md="16" :sm="24"> <a-form-item label="创建日期"> <j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择开始时间" 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 fed31f1..e34ad2e 100644 --- a/ant-design-vue-jeecg/src/views/system/task/ReceiptTaskHeaderList.vue +++ b/ant-design-vue-jeecg/src/views/system/task/ReceiptTaskHeaderList.vue @@ -40,11 +40,6 @@ </a-form-item> </a-col> <a-col :xl="6" :lg="7" :md="8" :sm="24"> - <a-form-item label="是否空出"> - <j-dict-select-tag placeholder="请选择是否空出" v-model="queryParam.isEmptyOut" dictCode="is_or_not"/> - </a-form-item> - </a-col> - <a-col :xl="6" :lg="7" :md="8" :sm="24"> <a-form-item label="起始出入口"> <a-input placeholder="请输入起始出入口" v-model="queryParam.fromPortCode"></a-input> </a-form-item> @@ -59,16 +54,6 @@ <j-dict-select-tag placeholder="请选择任务状态" v-model="queryParam.status" dictCode="task_header_status"/> </a-form-item> </a-col> - <a-col :xl="6" :lg="7" :md="8" :sm="24"> - <a-form-item label="是否重入"> - <j-dict-select-tag placeholder="请选择是否重入" v-model="queryParam.isDoubleIn" dictCode="is_or_not"/> - </a-form-item> - </a-col> - <a-col :xl="6" :lg="7" :md="8" :sm="24"> - <a-form-item label="重入库位号"> - <a-input placeholder="请输入重入库位号" v-model="queryParam.originLocationCode"></a-input> - </a-form-item> - </a-col> <a-col :xl="12" :lg="14" :md="16" :sm="24"> <a-form-item label="创建日期"> <j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择开始时间" 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 87fdd6c..7e70d32 100644 --- a/ant-design-vue-jeecg/src/views/system/task/ShipmentTaskHeaderList.vue +++ b/ant-design-vue-jeecg/src/views/system/task/ShipmentTaskHeaderList.vue @@ -39,21 +39,6 @@ </a-form-item> </a-col> <a-col :xl="6" :lg="7" :md="8" :sm="24"> - <a-form-item label="是否空出"> - <j-dict-select-tag placeholder="请选择是否空出" v-model="queryParam.isEmptyOut" dictCode="is_or_not"/> - </a-form-item> - </a-col> - <a-col :xl="6" :lg="7" :md="8" :sm="24"> - <a-form-item label="是否重入"> - <j-dict-select-tag placeholder="请选择是否重入" v-model="queryParam.isDoubleIn" dictCode="is_or_not"/> - </a-form-item> - </a-col> - <a-col :xl="6" :lg="7" :md="8" :sm="24"> - <a-form-item label="重入库位号"> - <a-input placeholder="请输入重入库位号" v-model="queryParam.originLocationCode"></a-input> - </a-form-item> - </a-col> - <a-col :xl="6" :lg="7" :md="8" :sm="24"> <a-form-item label="任务状态"> <j-dict-select-tag placeholder="请选择任务状态" v-model="queryParam.status" dictCode="task_header_status"/> </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 8aee3a3..5aca552 100644 --- a/ant-design-vue-jeecg/src/views/system/task/TransferTaskHeaderList.vue +++ b/ant-design-vue-jeecg/src/views/system/task/TransferTaskHeaderList.vue @@ -39,11 +39,6 @@ </a-form-item> </a-col> <a-col :xl="6" :lg="7" :md="8" :sm="24"> - <a-form-item label="是否空出"> - <j-dict-select-tag placeholder="请选择是否空出" v-model="queryParam.isEmptyOut" dictCode="is_or_not"/> - </a-form-item> - </a-col> - <a-col :xl="6" :lg="7" :md="8" :sm="24"> <a-form-item label="起始出入口"> <a-input placeholder="请输入起始出入口" v-model="queryParam.fromPortCode"></a-input> </a-form-item> @@ -58,16 +53,6 @@ <j-dict-select-tag placeholder="请选择任务状态" v-model="queryParam.status" dictCode="task_header_status"/> </a-form-item> </a-col> - <a-col :xl="6" :lg="7" :md="8" :sm="24"> - <a-form-item label="是否重入"> - <j-dict-select-tag placeholder="请选择是否重入" v-model="queryParam.isDoubleIn" dictCode="is_or_not"/> - </a-form-item> - </a-col> - <a-col :xl="6" :lg="7" :md="8" :sm="24"> - <a-form-item label="重入库位号"> - <a-input placeholder="请输入重入库位号" v-model="queryParam.originLocationCode"></a-input> - </a-form-item> - </a-col> <a-col :xl="12" :lg="14" :md="16" :sm="24"> <a-form-item label="创建日期"> <j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择开始时间" 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 b9a6cf3..c394d8c 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 @@ -166,8 +166,8 @@ public class WcsServiceImpl implements WcsService { if (StringUtils.isEmpty(locationCode)) { return Result.error("分配库位时,没有库位可分配"); } - - boolean success = locationService.updateStatus(locationCode, QuantityConstant.STATUS_LOCATION_LOCK, warehouseCode); + boolean success = + locationService.updateStatusByOldStatus(locationCode, QuantityConstant.STATUS_LOCATION_LOCK, QuantityConstant.STATUS_LOCATION_EMPTY, warehouseCode); if (!success) { throw new JeecgBootException("分配库位时,更新库位状态失败"); } diff --git a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/location/service/ILocationService.java b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/location/service/ILocationService.java index ba8b2d8..e7d5f56 100644 --- a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/location/service/ILocationService.java +++ b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/location/service/ILocationService.java @@ -27,6 +27,8 @@ public interface ILocationService extends IService<Location> { boolean updateStatus(String locationCode, String status, String warehouseCode); + boolean updateStatusByOldStatus(String locationCode, String status, String oldStatus, String warehouseCode); + boolean updateContainerCodeAndStatus(String locationCode, String containerCode, String status, String warehouseCode); Location getNear(Location location); diff --git a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/location/service/impl/LocationServiceImpl.java b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/location/service/impl/LocationServiceImpl.java index ae0082b..ea786fd 100644 --- a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/location/service/impl/LocationServiceImpl.java +++ b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/location/service/impl/LocationServiceImpl.java @@ -93,6 +93,19 @@ public class LocationServiceImpl extends ServiceImpl<LocationMapper, Location> i } @Override + public boolean updateStatusByOldStatus(String locationCode, String status, String oldStatus, String warehouseCode) { + Location location = getLocationByCode(locationCode, warehouseCode); + if (location == null) { + return false; + } + LambdaQueryWrapper<Location> locationLambdaQueryWrapper = Wrappers.lambdaQuery(); + locationLambdaQueryWrapper.eq(Location::getStatus, oldStatus).eq(Location::getCode, locationCode).eq(Location::getWarehouseCode, warehouseCode); + location.setStatus(status); + boolean result = update(location, locationLambdaQueryWrapper); + return result; + } + + @Override public boolean updateContainerCodeAndStatus(String locationCode, String containerCode, String status, String warehouseCode) { Location location = getLocationByCode(locationCode, warehouseCode); if (location == null) { 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 72b0b30..32865be 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 @@ -289,13 +289,15 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea throw new JeecgBootException("创建移库任务时,创建任务失败"); } - success = locationService.updateStatus(fromLocationCode, QuantityConstant.STATUS_LOCATION_LOCK, warehouseCode); + success = + locationService.updateStatusByOldStatus(fromLocationCode, QuantityConstant.STATUS_LOCATION_LOCK, QuantityConstant.STATUS_LOCATION_EMPTY, warehouseCode); if (!success) { - throw new JeecgBootException("创建移库任务时, 库位" + fromLocationCode + "更新失败"); + throw new JeecgBootException("创建移库任务时, 起始库位" + fromLocationCode + "更新失败"); } - success = locationService.updateStatus(toLocationCode, QuantityConstant.STATUS_LOCATION_LOCK, warehouseCode); + success = + locationService.updateStatusByOldStatus(toLocationCode, QuantityConstant.STATUS_LOCATION_LOCK, QuantityConstant.STATUS_LOCATION_EMPTY, warehouseCode); if (!success) { - throw new JeecgBootException("创建移库任务时, 库位" + toLocationCode + "更新失败"); + throw new JeecgBootException("创建移库任务时, 终点库位" + toLocationCode + "更新失败"); } success = containerService.updateStatus(fromLocation.getContainerCode(), QuantityConstant.STATUS_CONTAINER_LOCK, warehouseCode); if (!success) {