Commit 81ffd72caaccd93acc988728062b7b863b3407cf
1 parent
3301e251
修改任务界面, 更新库位时,需要先判断状态
Showing
9 changed files
with
24 additions
and
67 deletions
ant-design-vue-jeecg/src/views/system/inventory/InventoryTransactionList.vue
@@ -58,7 +58,7 @@ | @@ -58,7 +58,7 @@ | ||
58 | </a-col> | 58 | </a-col> |
59 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> | 59 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
60 | <a-form-item label="库存状态"> | 60 | <a-form-item label="库存状态"> |
61 | - <a-input placeholder="请输入库存状态" v-model="queryParam.inventoryStatus"></a-input> | 61 | + <j-dict-select-tag placeholder="请选择库存状态" v-model="queryParam.inventoryStatus" dictCode="inventory_status"/> |
62 | </a-form-item> | 62 | </a-form-item> |
63 | </a-col> | 63 | </a-col> |
64 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> | 64 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
ant-design-vue-jeecg/src/views/system/task/CircleTaskHeaderList.vue
@@ -40,11 +40,6 @@ | @@ -40,11 +40,6 @@ | ||
40 | </a-form-item> | 40 | </a-form-item> |
41 | </a-col> | 41 | </a-col> |
42 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> | 42 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
43 | - <a-form-item label="是否空出"> | ||
44 | - <j-dict-select-tag placeholder="请选择是否空出" v-model="queryParam.isEmptyOut" dictCode="is_or_not"/> | ||
45 | - </a-form-item> | ||
46 | - </a-col> | ||
47 | - <a-col :xl="6" :lg="7" :md="8" :sm="24"> | ||
48 | <a-form-item label="起始出入口"> | 43 | <a-form-item label="起始出入口"> |
49 | <a-input placeholder="请输入起始出入口" v-model="queryParam.fromPortCode"></a-input> | 44 | <a-input placeholder="请输入起始出入口" v-model="queryParam.fromPortCode"></a-input> |
50 | </a-form-item> | 45 | </a-form-item> |
@@ -59,16 +54,6 @@ | @@ -59,16 +54,6 @@ | ||
59 | <j-dict-select-tag placeholder="请选择任务状态" v-model="queryParam.status" dictCode="task_header_status"/> | 54 | <j-dict-select-tag placeholder="请选择任务状态" v-model="queryParam.status" dictCode="task_header_status"/> |
60 | </a-form-item> | 55 | </a-form-item> |
61 | </a-col> | 56 | </a-col> |
62 | - <a-col :xl="6" :lg="7" :md="8" :sm="24"> | ||
63 | - <a-form-item label="是否重入"> | ||
64 | - <j-dict-select-tag placeholder="请选择是否重入" v-model="queryParam.isDoubleIn" dictCode="is_or_not"/> | ||
65 | - </a-form-item> | ||
66 | - </a-col> | ||
67 | - <a-col :xl="6" :lg="7" :md="8" :sm="24"> | ||
68 | - <a-form-item label="重入库位号"> | ||
69 | - <a-input placeholder="请输入重入库位号" v-model="queryParam.originLocationCode"></a-input> | ||
70 | - </a-form-item> | ||
71 | - </a-col> | ||
72 | <a-col :xl="12" :lg="14" :md="16" :sm="24"> | 57 | <a-col :xl="12" :lg="14" :md="16" :sm="24"> |
73 | <a-form-item label="创建日期"> | 58 | <a-form-item label="创建日期"> |
74 | <j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择开始时间" | 59 | <j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择开始时间" |
ant-design-vue-jeecg/src/views/system/task/ReceiptTaskHeaderList.vue
@@ -40,11 +40,6 @@ | @@ -40,11 +40,6 @@ | ||
40 | </a-form-item> | 40 | </a-form-item> |
41 | </a-col> | 41 | </a-col> |
42 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> | 42 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
43 | - <a-form-item label="是否空出"> | ||
44 | - <j-dict-select-tag placeholder="请选择是否空出" v-model="queryParam.isEmptyOut" dictCode="is_or_not"/> | ||
45 | - </a-form-item> | ||
46 | - </a-col> | ||
47 | - <a-col :xl="6" :lg="7" :md="8" :sm="24"> | ||
48 | <a-form-item label="起始出入口"> | 43 | <a-form-item label="起始出入口"> |
49 | <a-input placeholder="请输入起始出入口" v-model="queryParam.fromPortCode"></a-input> | 44 | <a-input placeholder="请输入起始出入口" v-model="queryParam.fromPortCode"></a-input> |
50 | </a-form-item> | 45 | </a-form-item> |
@@ -59,16 +54,6 @@ | @@ -59,16 +54,6 @@ | ||
59 | <j-dict-select-tag placeholder="请选择任务状态" v-model="queryParam.status" dictCode="task_header_status"/> | 54 | <j-dict-select-tag placeholder="请选择任务状态" v-model="queryParam.status" dictCode="task_header_status"/> |
60 | </a-form-item> | 55 | </a-form-item> |
61 | </a-col> | 56 | </a-col> |
62 | - <a-col :xl="6" :lg="7" :md="8" :sm="24"> | ||
63 | - <a-form-item label="是否重入"> | ||
64 | - <j-dict-select-tag placeholder="请选择是否重入" v-model="queryParam.isDoubleIn" dictCode="is_or_not"/> | ||
65 | - </a-form-item> | ||
66 | - </a-col> | ||
67 | - <a-col :xl="6" :lg="7" :md="8" :sm="24"> | ||
68 | - <a-form-item label="重入库位号"> | ||
69 | - <a-input placeholder="请输入重入库位号" v-model="queryParam.originLocationCode"></a-input> | ||
70 | - </a-form-item> | ||
71 | - </a-col> | ||
72 | <a-col :xl="12" :lg="14" :md="16" :sm="24"> | 57 | <a-col :xl="12" :lg="14" :md="16" :sm="24"> |
73 | <a-form-item label="创建日期"> | 58 | <a-form-item label="创建日期"> |
74 | <j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择开始时间" | 59 | <j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择开始时间" |
ant-design-vue-jeecg/src/views/system/task/ShipmentTaskHeaderList.vue
@@ -40,21 +40,6 @@ | @@ -40,21 +40,6 @@ | ||
40 | </a-form-item> | 40 | </a-form-item> |
41 | </a-col> | 41 | </a-col> |
42 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> | 42 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
43 | - <a-form-item label="是否空出"> | ||
44 | - <j-dict-select-tag placeholder="请选择是否空出" v-model="queryParam.isEmptyOut" dictCode="is_or_not"/> | ||
45 | - </a-form-item> | ||
46 | - </a-col> | ||
47 | - <a-col :xl="6" :lg="7" :md="8" :sm="24"> | ||
48 | - <a-form-item label="是否重入"> | ||
49 | - <j-dict-select-tag placeholder="请选择是否重入" v-model="queryParam.isDoubleIn" dictCode="is_or_not"/> | ||
50 | - </a-form-item> | ||
51 | - </a-col> | ||
52 | - <a-col :xl="6" :lg="7" :md="8" :sm="24"> | ||
53 | - <a-form-item label="重入库位号"> | ||
54 | - <a-input placeholder="请输入重入库位号" v-model="queryParam.originLocationCode"></a-input> | ||
55 | - </a-form-item> | ||
56 | - </a-col> | ||
57 | - <a-col :xl="6" :lg="7" :md="8" :sm="24"> | ||
58 | <a-form-item label="任务状态"> | 43 | <a-form-item label="任务状态"> |
59 | <j-dict-select-tag placeholder="请选择任务状态" v-model="queryParam.status" dictCode="task_header_status"/> | 44 | <j-dict-select-tag placeholder="请选择任务状态" v-model="queryParam.status" dictCode="task_header_status"/> |
60 | </a-form-item> | 45 | </a-form-item> |
ant-design-vue-jeecg/src/views/system/task/TransferTaskHeaderList.vue
@@ -40,11 +40,6 @@ | @@ -40,11 +40,6 @@ | ||
40 | </a-form-item> | 40 | </a-form-item> |
41 | </a-col> | 41 | </a-col> |
42 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> | 42 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
43 | - <a-form-item label="是否空出"> | ||
44 | - <j-dict-select-tag placeholder="请选择是否空出" v-model="queryParam.isEmptyOut" dictCode="is_or_not"/> | ||
45 | - </a-form-item> | ||
46 | - </a-col> | ||
47 | - <a-col :xl="6" :lg="7" :md="8" :sm="24"> | ||
48 | <a-form-item label="起始出入口"> | 43 | <a-form-item label="起始出入口"> |
49 | <a-input placeholder="请输入起始出入口" v-model="queryParam.fromPortCode"></a-input> | 44 | <a-input placeholder="请输入起始出入口" v-model="queryParam.fromPortCode"></a-input> |
50 | </a-form-item> | 45 | </a-form-item> |
@@ -59,16 +54,6 @@ | @@ -59,16 +54,6 @@ | ||
59 | <j-dict-select-tag placeholder="请选择任务状态" v-model="queryParam.status" dictCode="task_header_status"/> | 54 | <j-dict-select-tag placeholder="请选择任务状态" v-model="queryParam.status" dictCode="task_header_status"/> |
60 | </a-form-item> | 55 | </a-form-item> |
61 | </a-col> | 56 | </a-col> |
62 | - <a-col :xl="6" :lg="7" :md="8" :sm="24"> | ||
63 | - <a-form-item label="是否重入"> | ||
64 | - <j-dict-select-tag placeholder="请选择是否重入" v-model="queryParam.isDoubleIn" dictCode="is_or_not"/> | ||
65 | - </a-form-item> | ||
66 | - </a-col> | ||
67 | - <a-col :xl="6" :lg="7" :md="8" :sm="24"> | ||
68 | - <a-form-item label="重入库位号"> | ||
69 | - <a-input placeholder="请输入重入库位号" v-model="queryParam.originLocationCode"></a-input> | ||
70 | - </a-form-item> | ||
71 | - </a-col> | ||
72 | <a-col :xl="12" :lg="14" :md="16" :sm="24"> | 57 | <a-col :xl="12" :lg="14" :md="16" :sm="24"> |
73 | <a-form-item label="创建日期"> | 58 | <a-form-item label="创建日期"> |
74 | <j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择开始时间" | 59 | <j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择开始时间" |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/wcs/service/WcsServiceImpl.java
@@ -166,8 +166,8 @@ public class WcsServiceImpl implements WcsService { | @@ -166,8 +166,8 @@ public class WcsServiceImpl implements WcsService { | ||
166 | if (StringUtils.isEmpty(locationCode)) { | 166 | if (StringUtils.isEmpty(locationCode)) { |
167 | return Result.error("分配库位时,没有库位可分配"); | 167 | return Result.error("分配库位时,没有库位可分配"); |
168 | } | 168 | } |
169 | - | ||
170 | - boolean success = locationService.updateStatus(locationCode, QuantityConstant.STATUS_LOCATION_LOCK, warehouseCode); | 169 | + boolean success = |
170 | + locationService.updateStatusByOldStatus(locationCode, QuantityConstant.STATUS_LOCATION_LOCK, QuantityConstant.STATUS_LOCATION_EMPTY, warehouseCode); | ||
171 | if (!success) { | 171 | if (!success) { |
172 | throw new JeecgBootException("分配库位时,更新库位状态失败"); | 172 | throw new JeecgBootException("分配库位时,更新库位状态失败"); |
173 | } | 173 | } |
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> { | @@ -27,6 +27,8 @@ public interface ILocationService extends IService<Location> { | ||
27 | 27 | ||
28 | boolean updateStatus(String locationCode, String status, String warehouseCode); | 28 | boolean updateStatus(String locationCode, String status, String warehouseCode); |
29 | 29 | ||
30 | + boolean updateStatusByOldStatus(String locationCode, String status, String oldStatus, String warehouseCode); | ||
31 | + | ||
30 | boolean updateContainerCodeAndStatus(String locationCode, String containerCode, String status, String warehouseCode); | 32 | boolean updateContainerCodeAndStatus(String locationCode, String containerCode, String status, String warehouseCode); |
31 | 33 | ||
32 | Location getNear(Location location); | 34 | Location getNear(Location location); |
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 | @@ -93,6 +93,19 @@ public class LocationServiceImpl extends ServiceImpl<LocationMapper, Location> i | ||
93 | } | 93 | } |
94 | 94 | ||
95 | @Override | 95 | @Override |
96 | + public boolean updateStatusByOldStatus(String locationCode, String status, String oldStatus, String warehouseCode) { | ||
97 | + Location location = getLocationByCode(locationCode, warehouseCode); | ||
98 | + if (location == null) { | ||
99 | + return false; | ||
100 | + } | ||
101 | + LambdaQueryWrapper<Location> locationLambdaQueryWrapper = Wrappers.lambdaQuery(); | ||
102 | + locationLambdaQueryWrapper.eq(Location::getStatus, oldStatus).eq(Location::getCode, locationCode).eq(Location::getWarehouseCode, warehouseCode); | ||
103 | + location.setStatus(status); | ||
104 | + boolean result = update(location, locationLambdaQueryWrapper); | ||
105 | + return result; | ||
106 | + } | ||
107 | + | ||
108 | + @Override | ||
96 | public boolean updateContainerCodeAndStatus(String locationCode, String containerCode, String status, String warehouseCode) { | 109 | public boolean updateContainerCodeAndStatus(String locationCode, String containerCode, String status, String warehouseCode) { |
97 | Location location = getLocationByCode(locationCode, warehouseCode); | 110 | Location location = getLocationByCode(locationCode, warehouseCode); |
98 | if (location == null) { | 111 | if (location == null) { |
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 | @@ -289,13 +289,15 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | ||
289 | throw new JeecgBootException("创建移库任务时,创建任务失败"); | 289 | throw new JeecgBootException("创建移库任务时,创建任务失败"); |
290 | } | 290 | } |
291 | 291 | ||
292 | - success = locationService.updateStatus(fromLocationCode, QuantityConstant.STATUS_LOCATION_LOCK, warehouseCode); | 292 | + success = |
293 | + locationService.updateStatusByOldStatus(fromLocationCode, QuantityConstant.STATUS_LOCATION_LOCK, QuantityConstant.STATUS_LOCATION_EMPTY, warehouseCode); | ||
293 | if (!success) { | 294 | if (!success) { |
294 | - throw new JeecgBootException("创建移库任务时, 库位" + fromLocationCode + "更新失败"); | 295 | + throw new JeecgBootException("创建移库任务时, 起始库位" + fromLocationCode + "更新失败"); |
295 | } | 296 | } |
296 | - success = locationService.updateStatus(toLocationCode, QuantityConstant.STATUS_LOCATION_LOCK, warehouseCode); | 297 | + success = |
298 | + locationService.updateStatusByOldStatus(toLocationCode, QuantityConstant.STATUS_LOCATION_LOCK, QuantityConstant.STATUS_LOCATION_EMPTY, warehouseCode); | ||
297 | if (!success) { | 299 | if (!success) { |
298 | - throw new JeecgBootException("创建移库任务时, 库位" + toLocationCode + "更新失败"); | 300 | + throw new JeecgBootException("创建移库任务时, 终点库位" + toLocationCode + "更新失败"); |
299 | } | 301 | } |
300 | success = containerService.updateStatus(fromLocation.getContainerCode(), QuantityConstant.STATUS_CONTAINER_LOCK, warehouseCode); | 302 | success = containerService.updateStatus(fromLocation.getContainerCode(), QuantityConstant.STATUS_CONTAINER_LOCK, warehouseCode); |
301 | if (!success) { | 303 | if (!success) { |