Commit 2d81e3e6f69b868f90f5b3bbdcb38515161b6a45
Merge branch 'develop' of http://www.huahengrobot.com:90/wms/wms4.git into develop
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 | 58 | </a-col> |
59 | 59 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
60 | 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 | 62 | </a-form-item> |
63 | 63 | </a-col> |
64 | 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 | 40 | </a-form-item> |
41 | 41 | </a-col> |
42 | 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 | 43 | <a-form-item label="起始出入口"> |
49 | 44 | <a-input placeholder="请输入起始出入口" v-model="queryParam.fromPortCode"></a-input> |
50 | 45 | </a-form-item> |
... | ... | @@ -59,16 +54,6 @@ |
59 | 54 | <j-dict-select-tag placeholder="请选择任务状态" v-model="queryParam.status" dictCode="task_header_status"/> |
60 | 55 | </a-form-item> |
61 | 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 | 57 | <a-col :xl="12" :lg="14" :md="16" :sm="24"> |
73 | 58 | <a-form-item label="创建日期"> |
74 | 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 | 40 | </a-form-item> |
41 | 41 | </a-col> |
42 | 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 | 43 | <a-form-item label="起始出入口"> |
49 | 44 | <a-input placeholder="请输入起始出入口" v-model="queryParam.fromPortCode"></a-input> |
50 | 45 | </a-form-item> |
... | ... | @@ -59,16 +54,6 @@ |
59 | 54 | <j-dict-select-tag placeholder="请选择任务状态" v-model="queryParam.status" dictCode="task_header_status"/> |
60 | 55 | </a-form-item> |
61 | 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 | 57 | <a-col :xl="12" :lg="14" :md="16" :sm="24"> |
73 | 58 | <a-form-item label="创建日期"> |
74 | 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
... | ... | @@ -39,21 +39,6 @@ |
39 | 39 | </a-form-item> |
40 | 40 | </a-col> |
41 | 41 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
42 | - <a-form-item label="是否空出"> | |
43 | - <j-dict-select-tag placeholder="请选择是否空出" v-model="queryParam.isEmptyOut" dictCode="is_or_not"/> | |
44 | - </a-form-item> | |
45 | - </a-col> | |
46 | - <a-col :xl="6" :lg="7" :md="8" :sm="24"> | |
47 | - <a-form-item label="是否重入"> | |
48 | - <j-dict-select-tag placeholder="请选择是否重入" v-model="queryParam.isDoubleIn" dictCode="is_or_not"/> | |
49 | - </a-form-item> | |
50 | - </a-col> | |
51 | - <a-col :xl="6" :lg="7" :md="8" :sm="24"> | |
52 | - <a-form-item label="重入库位号"> | |
53 | - <a-input placeholder="请输入重入库位号" v-model="queryParam.originLocationCode"></a-input> | |
54 | - </a-form-item> | |
55 | - </a-col> | |
56 | - <a-col :xl="6" :lg="7" :md="8" :sm="24"> | |
57 | 42 | <a-form-item label="任务状态"> |
58 | 43 | <j-dict-select-tag placeholder="请选择任务状态" v-model="queryParam.status" dictCode="task_header_status"/> |
59 | 44 | </a-form-item> |
... | ... |
ant-design-vue-jeecg/src/views/system/task/TransferTaskHeaderList.vue
... | ... | @@ -39,11 +39,6 @@ |
39 | 39 | </a-form-item> |
40 | 40 | </a-col> |
41 | 41 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
42 | - <a-form-item label="是否空出"> | |
43 | - <j-dict-select-tag placeholder="请选择是否空出" v-model="queryParam.isEmptyOut" dictCode="is_or_not"/> | |
44 | - </a-form-item> | |
45 | - </a-col> | |
46 | - <a-col :xl="6" :lg="7" :md="8" :sm="24"> | |
47 | 42 | <a-form-item label="起始出入口"> |
48 | 43 | <a-input placeholder="请输入起始出入口" v-model="queryParam.fromPortCode"></a-input> |
49 | 44 | </a-form-item> |
... | ... | @@ -58,16 +53,6 @@ |
58 | 53 | <j-dict-select-tag placeholder="请选择任务状态" v-model="queryParam.status" dictCode="task_header_status"/> |
59 | 54 | </a-form-item> |
60 | 55 | </a-col> |
61 | - <a-col :xl="6" :lg="7" :md="8" :sm="24"> | |
62 | - <a-form-item label="是否重入"> | |
63 | - <j-dict-select-tag placeholder="请选择是否重入" v-model="queryParam.isDoubleIn" dictCode="is_or_not"/> | |
64 | - </a-form-item> | |
65 | - </a-col> | |
66 | - <a-col :xl="6" :lg="7" :md="8" :sm="24"> | |
67 | - <a-form-item label="重入库位号"> | |
68 | - <a-input placeholder="请输入重入库位号" v-model="queryParam.originLocationCode"></a-input> | |
69 | - </a-form-item> | |
70 | - </a-col> | |
71 | 56 | <a-col :xl="12" :lg="14" :md="16" :sm="24"> |
72 | 57 | <a-form-item label="创建日期"> |
73 | 58 | <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 | 166 | if (StringUtils.isEmpty(locationCode)) { |
167 | 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 | 171 | if (!success) { |
172 | 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 | 27 | |
28 | 28 | boolean updateStatus(String locationCode, String status, String warehouseCode); |
29 | 29 | |
30 | + boolean updateStatusByOldStatus(String locationCode, String status, String oldStatus, String warehouseCode); | |
31 | + | |
30 | 32 | boolean updateContainerCodeAndStatus(String locationCode, String containerCode, String status, String warehouseCode); |
31 | 33 | |
32 | 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 | 93 | } |
94 | 94 | |
95 | 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 | 109 | public boolean updateContainerCodeAndStatus(String locationCode, String containerCode, String status, String warehouseCode) { |
97 | 110 | Location location = getLocationByCode(locationCode, warehouseCode); |
98 | 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 | 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 | 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 | 299 | if (!success) { |
298 | - throw new JeecgBootException("创建移库任务时, 库位" + toLocationCode + "更新失败"); | |
300 | + throw new JeecgBootException("创建移库任务时, 终点库位" + toLocationCode + "更新失败"); | |
299 | 301 | } |
300 | 302 | success = containerService.updateStatus(fromLocation.getContainerCode(), QuantityConstant.STATUS_CONTAINER_LOCK, warehouseCode); |
301 | 303 | if (!success) { |
... | ... |