Commit 450c66a917185cd6a396183c2561ae7928ea11af
Merge branch 'develop' of http://www.huahengrobot.com:90/wms/wms4.git into develop
Showing
15 changed files
with
107 additions
and
47 deletions
ant-design-vue-jeecg/src/views/system/receipt/ReceiptContainerHeaderList.vue
... | ... | @@ -126,10 +126,10 @@ |
126 | 126 | </a-button> |
127 | 127 | </template>selectPort |
128 | 128 | <span slot="action" slot-scope="text, record"> |
129 | -<!-- <a v-if="record.status == 0 && record.taskType == 200" @click="selectFillPort(record)" v-has="'receiptContainerHeader:createTask'"><a-button type="primary">生成任务</a-button><a-divider type="vertical"/></a>--> | |
130 | -<!-- <a v-else-if="record.status == 0" @click="selectContainerStatus(record)" v-has="'receiptContainerHeader:createTask'"><a-button type="primary">生成任务</a-button><a-divider type="vertical"/></a>--> | |
131 | - <a v-if="record.status == 0 && record.taskType == 200" @click="selectPort(record)" v-has="'receiptContainerHeader:createTask'"><a-button type="primary">生成任务</a-button><a-divider type="vertical"/></a> | |
132 | - <a v-else-if="record.status == 0" @click="createTask(record)" v-has="'receiptContainerHeader:createTask'"><a-button type="primary">生成任务</a-button><a-divider type="vertical"/></a> | |
129 | + <a v-if="record.status == 0 && record.taskType == 200" @click="selectFillPort(record)" v-has="'receiptContainerHeader:createTask'"><a-button type="primary">生成任务</a-button><a-divider type="vertical"/></a> | |
130 | + <a v-else-if="record.status == 0" @click="selectContainerStatus(record)" v-has="'receiptContainerHeader:createTask'"><a-button type="primary">生成任务</a-button><a-divider type="vertical"/></a> | |
131 | +<!-- <a v-if="record.status == 0 && record.taskType == 200" @click="selectPort(record)" v-has="'receiptContainerHeader:createTask'"><a-button type="primary">生成任务</a-button><a-divider type="vertical"/></a>--> | |
132 | +<!-- <a v-else-if="record.status == 0" @click="createTask(record)" v-has="'receiptContainerHeader:createTask'"><a-button type="primary">生成任务</a-button><a-divider type="vertical"/></a>--> | |
133 | 133 | <a-popconfirm v-if="record.status == 0" v-has="'receiptContainerHeader:delete'" title="确定取消配盘吗?" @confirm="() => handleDelete(record.id)"> |
134 | 134 | <a><a-button type="danger">取消配盘</a-button> <a-divider type="vertical"/></a> |
135 | 135 | </a-popconfirm> |
... | ... |
ant-design-vue-jeecg/src/views/system/receipt/ReceiveHeaderList.vue
... | ... | @@ -158,10 +158,11 @@ |
158 | 158 | |
159 | 159 | <span slot="action" slot-scope="text, record"> |
160 | 160 | <a @click="receive(record)"> |
161 | - <a-button type="primary">收货</a-button><a-divider type="vertical"/> | |
161 | + <a-button v-if="(record.lastStatus < 200)" type="primary">收货</a-button><a-divider type="vertical"/> | |
162 | + </a> | |
163 | + <a @click="handleEdit(record)"> | |
164 | + <a-button type="primary">编辑</a-button><a-divider type="vertical"/> | |
162 | 165 | </a> |
163 | - <a @click="handleEdit(record)">编辑</a> | |
164 | - | |
165 | 166 | <a-divider type="vertical" /> |
166 | 167 | <a-dropdown> |
167 | 168 | <a class="ant-dropdown-link">更多 <a-icon type="down" /></a> |
... | ... |
ant-design-vue-jeecg/src/views/user/LoginAccount.vue
... | ... | @@ -7,8 +7,8 @@ |
7 | 7 | </a-input> |
8 | 8 | </a-form-model-item> |
9 | 9 | <a-form-model-item required prop="password"> |
10 | - <a-input v-model="model.password" size="large" type="password" autocomplete="false" | |
11 | - placeholder="请输入密码 / 123456"> | |
10 | + <a-input v-model="model.password" size="large" type="password" autocomplete="off" | |
11 | + placeholder="请输入密码 / 123456" > | |
12 | 12 | <a-icon slot="prefix" type="lock" :style="{ color: 'rgba(0,0,0,.25)' }"/> |
13 | 13 | </a-input> |
14 | 14 | </a-form-model-item> |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/container/service/IContainerService.java
... | ... | @@ -21,6 +21,8 @@ public interface IContainerService extends IService<Container> { |
21 | 21 | |
22 | 22 | boolean updateStatus(String containerCode, String status, String warehouseCode); |
23 | 23 | |
24 | + boolean updateFillStatus(String containerCode, String fillStatus, String warehouseCode); | |
25 | + | |
24 | 26 | boolean updateLocationCodeAndStatus(String containerCode, String locationCode, String status, String warehouseCode); |
25 | 27 | |
26 | 28 | boolean updateLocationCodeAndStatus(String containerCode, String locationCode, String status, String fillStatus, String warehouseCode); |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/container/service/impl/ContainerServiceImpl.java
... | ... | @@ -88,6 +88,13 @@ public class ContainerServiceImpl extends ServiceImpl<ContainerMapper, Container |
88 | 88 | } |
89 | 89 | |
90 | 90 | @Override |
91 | + public boolean updateFillStatus(String containerCode, String fillStatus, String warehouseCode) { | |
92 | + LambdaUpdateWrapper<Container> updateWrapper = Wrappers.lambdaUpdate(); | |
93 | + updateWrapper.eq(Container::getCode, containerCode).eq(Container::getWarehouseCode, warehouseCode).set(Container::getFillStatus, fillStatus); | |
94 | + return containerService.update(updateWrapper); | |
95 | + } | |
96 | + | |
97 | + @Override | |
91 | 98 | @Transactional |
92 | 99 | public boolean updateLocationCodeAndStatus(String containerCode, String locationCode, String status, String warehouseCode) { |
93 | 100 | if (StringUtils.isNotEmpty(locationCode)) { |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/inventory/inventoryHeader/service/IInventoryDetailService.java
... | ... | @@ -82,9 +82,9 @@ public interface IInventoryDetailService extends IService<InventoryDetail> { |
82 | 82 | |
83 | 83 | /** |
84 | 84 | * 根据物料编码查询库内符合条件的托盘 |
85 | - * @param materiacode 物料编码 | |
85 | + * @param materiacode 物料编码 | |
86 | 86 | * @param warehouseCode 仓库 |
87 | 87 | * @return |
88 | 88 | */ |
89 | - List<String>containerCodeList(String warehouseCode,String materiacode); | |
89 | + List<String> containerCodeList(String warehouseCode, String materiacode); | |
90 | 90 | } |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiptContainerHeader/service/impl/ReceiptContainerHeaderServiceImpl.java
... | ... | @@ -373,10 +373,21 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl<ReceiptContai |
373 | 373 | for (Integer receiptId : receiptIdList) { |
374 | 374 | success = receiptHeaderService.updateReceiptHeaderStatus(receiptId); |
375 | 375 | if (!success) { |
376 | - throw new JeecgBootException("更新入库单明细失败"); | |
376 | + throw new JeecgBootException("取消入库任务时, 更新入库单明细失败"); | |
377 | 377 | } |
378 | 378 | } |
379 | 379 | } |
380 | + value = parameterConfigurationService.getValueByCode(QuantityConstant.RULE_CANCEL_TASK); | |
381 | + if (StringUtils.isEmpty(value)) { | |
382 | + throw new JeecgBootException("取消入库任务时, 未绑定取消规则"); | |
383 | + } | |
384 | + int cancelTaskRule = Integer.parseInt(value); | |
385 | + if (cancelTaskRule == QuantityConstant.RULE_TASK_CANCEL_CONTAINER) { | |
386 | + Result result = receiptContainerHeaderService.cancelReceiving(receiptContainerHeader.getId()); | |
387 | + if (!result.isSuccess()) { | |
388 | + throw new JeecgBootException("取消入库任务时, 取消组盘失败"); | |
389 | + } | |
390 | + } | |
380 | 391 | LogRecordContext.putVariable("receiptContainerDetailList", receiptContainerDetailList);// 操作日志收集 |
381 | 392 | LogRecordContext.putVariable("extraJsonString", JSON.toJSONString(receiptContainerDetailList));// 操作日志收集 |
382 | 393 | return true; |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiptHeader/service/impl/ReceiptHeaderServiceImpl.java
... | ... | @@ -118,7 +118,7 @@ public class ReceiptHeaderServiceImpl extends ServiceImpl<ReceiptHeaderMapper, R |
118 | 118 | receiptHeader.setLastStatus(QuantityConstant.RECEIPT_HEADER_BUILD); |
119 | 119 | boolean success = save(receiptHeader); |
120 | 120 | if (!success) { |
121 | - return Result.OK("添加失败!"); | |
121 | + return Result.error("添加失败!"); | |
122 | 122 | } |
123 | 123 | return Result.OK("添加成功!", receiptHeader); |
124 | 124 | } |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiveHeader/controller/ReceiveHeaderController.java
... | ... | @@ -15,6 +15,7 @@ import org.apache.shiro.SecurityUtils; |
15 | 15 | import org.apache.shiro.authz.annotation.RequiresPermissions; |
16 | 16 | import org.jeecg.common.api.vo.Result; |
17 | 17 | import org.jeecg.common.aspect.annotation.AutoLog; |
18 | +import org.jeecg.common.exception.JeecgBootException; | |
18 | 19 | import org.jeecg.common.system.base.controller.JeecgController; |
19 | 20 | import org.jeecg.common.system.query.QueryGenerator; |
20 | 21 | import org.jeecg.common.system.vo.LoginUser; |
... | ... | @@ -25,6 +26,7 @@ import org.jeecg.modules.wms.receipt.receiveHeader.service.IReceiveDetailService |
25 | 26 | import org.jeecg.modules.wms.receipt.receiveHeader.service.IReceiveHeaderService; |
26 | 27 | import org.jeecg.modules.wms.receipt.receiving.domain.Receive; |
27 | 28 | import org.jeecg.utils.HuahengJwtUtil; |
29 | +import org.jeecg.utils.constant.QuantityConstant; | |
28 | 30 | import org.jeecgframework.poi.excel.ExcelImportUtil; |
29 | 31 | import org.jeecgframework.poi.excel.def.NormalExcelConstants; |
30 | 32 | import org.jeecgframework.poi.excel.entity.ExportParams; |
... | ... | @@ -77,6 +79,7 @@ public class ReceiveHeaderController extends JeecgController<ReceiveHeader, IRec |
77 | 79 | @GetMapping(value = "/list") |
78 | 80 | public Result<IPage<ReceiveHeader>> queryPageList(ReceiveHeader receiveHeader, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, |
79 | 81 | @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest req) { |
82 | + receiveHeader.setDelFlag(0); | |
80 | 83 | QueryWrapper<ReceiveHeader> queryWrapper = QueryGenerator.initQueryWrapper(receiveHeader, req.getParameterMap()); |
81 | 84 | Page<ReceiveHeader> page = new Page<ReceiveHeader>(pageNo, pageSize); |
82 | 85 | IPage<ReceiveHeader> pageList = receiveHeaderService.page(page, queryWrapper); |
... | ... | @@ -119,7 +122,18 @@ public class ReceiveHeaderController extends JeecgController<ReceiveHeader, IRec |
119 | 122 | @ApiOperation(value = "收货单表头-通过id删除", notes = "收货单表头-通过id删除") |
120 | 123 | @DeleteMapping(value = "/delete") |
121 | 124 | public Result<String> delete(@RequestParam(name = "id", required = true) String id) { |
122 | - receiveHeaderService.delMain(id); | |
125 | +// receiveHeaderService.delMain(id); | |
126 | + ReceiveHeader receiveHeader = receiveHeaderService.getById(id); | |
127 | + if (receiveHeader.getFirstStatus().intValue() > QuantityConstant.RECEIVE_HEADER_BUILD) { | |
128 | + throw new JeecgBootException("不能删除非新建状态单据"); | |
129 | + } | |
130 | + receiveHeader = new ReceiveHeader(); | |
131 | + receiveHeader.setId(Integer.parseInt(id)); | |
132 | + receiveHeader.setDelFlag(1); | |
133 | + boolean success = receiveHeaderService.updateById(receiveHeader); | |
134 | + if (!success) { | |
135 | + return Result.error("删除失败!"); | |
136 | + } | |
123 | 137 | return Result.OK("删除成功!"); |
124 | 138 | } |
125 | 139 | |
... | ... | @@ -207,6 +221,10 @@ public class ReceiveHeaderController extends JeecgController<ReceiveHeader, IRec |
207 | 221 | @ApiOperation(value = "收货单详情-通过id删除", notes = "收货单详情-通过id删除") |
208 | 222 | @DeleteMapping(value = "/deleteReceiveDetail") |
209 | 223 | public Result<String> deleteReceiveDetail(@RequestParam(name = "id", required = true) String id) { |
224 | + ReceiveDetail receiveDetail = receiveDetailService.getById(id); | |
225 | + if (receiveDetail.getStatus().intValue() > QuantityConstant.RECEIVE_HEADER_BUILD) { | |
226 | + throw new JeecgBootException("不能删除非新建状态单据"); | |
227 | + } | |
210 | 228 | receiveDetailService.removeById(id); |
211 | 229 | return Result.OK("删除成功!"); |
212 | 230 | } |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiveHeader/entity/ReceiveHeader.java
... | ... | @@ -88,4 +88,8 @@ public class ReceiveHeader implements Serializable { |
88 | 88 | /** 更新日期 */ |
89 | 89 | @ApiModelProperty(value = "更新日期") |
90 | 90 | private Date updateTime; |
91 | + /** 逻辑删除 */ | |
92 | + @ApiModelProperty(value = "逻辑删除") | |
93 | + @Excel(name = "删除状态", width = 15, dicCode = "del_flag") | |
94 | + private Integer delFlag; // 逻辑删除 | |
91 | 95 | } |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiveHeader/service/impl/ReceiveHeaderServiceImpl.java
... | ... | @@ -48,6 +48,10 @@ public class ReceiveHeaderServiceImpl extends ServiceImpl<ReceiveHeaderMapper, R |
48 | 48 | @Override |
49 | 49 | @Transactional |
50 | 50 | public void delMain(String id) { |
51 | + ReceiveHeader receiveHeader = getById(id); | |
52 | + if (receiveHeader.getFirstStatus().intValue() > QuantityConstant.RECEIVE_HEADER_BUILD) { | |
53 | + throw new JeecgBootException("不能删除非新建状态单据"); | |
54 | + } | |
51 | 55 | receiveDetailMapper.deleteByMainId(id); |
52 | 56 | receiveHeaderMapper.deleteById(id); |
53 | 57 | } |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiving/domain/Receive.java
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/shipment/shipmentContainerHeader/service/impl/ShipmentContainerHeaderServiceImpl.java
... | ... | @@ -11,6 +11,7 @@ import javax.annotation.Resource; |
11 | 11 | |
12 | 12 | import org.jeecg.common.api.vo.Result; |
13 | 13 | import org.jeecg.common.exception.JeecgBootException; |
14 | +import org.jeecg.modules.wms.config.parameterConfiguration.service.IParameterConfigurationService; | |
14 | 15 | import org.jeecg.modules.wms.framework.service.IHuahengMultiHandlerService; |
15 | 16 | import org.jeecg.modules.wms.inventory.inventoryHeader.entity.InventoryDetail; |
16 | 17 | import org.jeecg.modules.wms.inventory.inventoryHeader.service.IInventoryDetailService; |
... | ... | @@ -24,6 +25,7 @@ import org.jeecg.modules.wms.shipment.shipmentHeader.entity.ShipmentDetail; |
24 | 25 | import org.jeecg.modules.wms.shipment.shipmentHeader.service.IShipmentDetailService; |
25 | 26 | import org.jeecg.modules.wms.shipment.shipmentHeader.service.IShipmentHeaderService; |
26 | 27 | import org.jeecg.modules.wms.task.taskHeader.entity.TaskHeader; |
28 | +import org.jeecg.utils.StringUtils; | |
27 | 29 | import org.jeecg.utils.constant.QuantityConstant; |
28 | 30 | import org.springframework.beans.factory.annotation.Autowired; |
29 | 31 | import org.springframework.stereotype.Service; |
... | ... | @@ -60,9 +62,13 @@ public class ShipmentContainerHeaderServiceImpl extends ServiceImpl<ShipmentCont |
60 | 62 | @Resource |
61 | 63 | private IShipmentContainerDetailService shipmentContainerDetailService; |
62 | 64 | @Resource |
65 | + private IShipmentContainerHeaderService shipmentContainerHeaderService; | |
66 | + @Resource | |
63 | 67 | private IInventoryDetailService inventoryDetailService; |
64 | 68 | @Resource |
65 | 69 | private IHuahengMultiHandlerService huahengMultiHandlerService; |
70 | + @Resource | |
71 | + private IParameterConfigurationService parameterConfigurationService; | |
66 | 72 | |
67 | 73 | @Override |
68 | 74 | @Transactional |
... | ... | @@ -182,6 +188,17 @@ public class ShipmentContainerHeaderServiceImpl extends ServiceImpl<ShipmentCont |
182 | 188 | } |
183 | 189 | } |
184 | 190 | } |
191 | + String value = parameterConfigurationService.getValueByCode(QuantityConstant.RULE_CANCEL_TASK); | |
192 | + if (StringUtils.isEmpty(value)) { | |
193 | + throw new JeecgBootException("取消出库任务时, 未绑定取消规则"); | |
194 | + } | |
195 | + int cancelTaskRule = Integer.parseInt(value); | |
196 | + if (cancelTaskRule == QuantityConstant.RULE_TASK_CANCEL_CONTAINER) { | |
197 | + Result result = shipmentContainerHeaderService.cancelCombine(shipmentContainerHeader.getId()); | |
198 | + if (!result.isSuccess()) { | |
199 | + throw new JeecgBootException("取消出库任务时, 取消配盘失败"); | |
200 | + } | |
201 | + } | |
185 | 202 | log.info("完成取消出库任务,任务id" + taskHeader.getId()); |
186 | 203 | LogRecordContext.putVariable("shipmentContainerHeader", shipmentContainerHeader);// 操作日志收集 |
187 | 204 | LogRecordContext.putVariable("shipmentContainerDetailList", shipmentContainerDetailList);// 操作日志收集 |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/taskHeader/service/impl/TaskHeaderServiceImpl.java
... | ... | @@ -897,7 +897,6 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
897 | 897 | if (!success) { |
898 | 898 | throw new JeecgBootException("下发wcs任务时, 更新任务状态失败"); |
899 | 899 | } |
900 | - | |
901 | 900 | return Result.ok("下发wcs任务成功"); |
902 | 901 | } |
903 | 902 | |
... | ... | @@ -1036,7 +1035,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
1036 | 1035 | } |
1037 | 1036 | return Result.ok("完成入库任务"); |
1038 | 1037 | } else { |
1039 | - return Result.error("完成入库任务时, 入库任务明细为空"); | |
1038 | + throw new JeecgBootException("完成入库任务时, 入库任务明细为空"); | |
1040 | 1039 | } |
1041 | 1040 | } |
1042 | 1041 | Location toLocation = locationService.getLocationByCode(toLocationCode, warehouseCode); |
... | ... | @@ -1668,25 +1667,12 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
1668 | 1667 | switch (taskType) { |
1669 | 1668 | case QuantityConstant.TASK_TYPE_WHOLERECEIPT: |
1670 | 1669 | case QuantityConstant.TASK_TYPE_SUPPLEMENTRECEIPT: |
1671 | - if (StringUtils.isEmpty(toLocationCode)) { | |
1672 | - return Result.error("任务类型" + taskType + "完成任务时, 目标库位编码为空"); | |
1673 | - } | |
1674 | - success = containerService.updateLocationCodeAndStatus(containerCode, toLocationCode, QuantityConstant.STATUS_CONTAINER_EMPTY, containerFillStatus, | |
1675 | - warehouseCode); | |
1676 | - break; | |
1677 | 1670 | case QuantityConstant.TASK_TYPE_EMPTYRECEIPT: |
1678 | - if (StringUtils.isEmpty(toLocationCode)) { | |
1679 | - return Result.error("任务类型" + taskType + "完成任务时, 目标库位编码为空"); | |
1680 | - } | |
1681 | - success = containerService.updateLocationCodeAndStatus(containerCode, toLocationCode, QuantityConstant.STATUS_CONTAINER_EMPTY, | |
1682 | - QuantityConstant.STATUS_CONTAINER_FILL_EMPTY, warehouseCode); | |
1683 | - break; | |
1684 | 1671 | case QuantityConstant.TASK_TYPE_MANY_EMPTYRECEIPT: |
1685 | 1672 | if (StringUtils.isEmpty(toLocationCode)) { |
1686 | 1673 | return Result.error("任务类型" + taskType + "完成任务时, 目标库位编码为空"); |
1687 | 1674 | } |
1688 | - success = containerService.updateLocationCodeAndStatus(containerCode, toLocationCode, QuantityConstant.STATUS_CONTAINER_EMPTY, | |
1689 | - QuantityConstant.STATUS_CONTAINER_FILL_MANY, warehouseCode); | |
1675 | + success = containerService.updateLocationCodeAndStatus(containerCode, toLocationCode, QuantityConstant.STATUS_CONTAINER_EMPTY, warehouseCode); | |
1690 | 1676 | break; |
1691 | 1677 | case QuantityConstant.TASK_TYPE_WHOLESHIPMENT: |
1692 | 1678 | case QuantityConstant.TASK_TYPE_EMPTYSHIPMENT: |
... | ... | @@ -1694,8 +1680,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
1694 | 1680 | if (StringUtils.isEmpty(fromLocationCode)) { |
1695 | 1681 | return Result.error("任务类型" + taskType + "完成任务时, 起始库位编码为空"); |
1696 | 1682 | } |
1697 | - success = containerService.updateLocationCodeAndStatus(containerCode, toLocationCode, QuantityConstant.STATUS_CONTAINER_EMPTY, | |
1698 | - QuantityConstant.STATUS_CONTAINER_FILL_EMPTY, warehouseCode); | |
1683 | + success = containerService.updateLocationCodeAndStatus(containerCode, toLocationCode, QuantityConstant.STATUS_CONTAINER_EMPTY, warehouseCode); | |
1699 | 1684 | break; |
1700 | 1685 | case QuantityConstant.TASK_TYPE_SORTINGSHIPMENT: |
1701 | 1686 | case QuantityConstant.TASK_TYPE_CYCLECOUNT: |
... | ... | @@ -1707,21 +1692,10 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
1707 | 1692 | if (StringUtils.isEmpty(toLocationCode)) { |
1708 | 1693 | return Result.error("任务类型" + taskType + "完成任务时, 目标库位编码为空"); |
1709 | 1694 | } |
1710 | - InventoryHeader inventoryHeader = inventoryHeaderService.getInventoryHeaderByContainerCode(containerCode, warehouseCode); | |
1711 | - if (inventoryHeader != null) { | |
1712 | - if (fromLocationCode.equals(toLocationCode)) { | |
1713 | - success = containerService.updateStatus(containerCode, QuantityConstant.STATUS_CONTAINER_EMPTY, warehouseCode); | |
1714 | - } else { | |
1715 | - success = containerService.updateLocationCodeAndStatus(containerCode, toLocationCode, QuantityConstant.STATUS_CONTAINER_EMPTY, | |
1716 | - QuantityConstant.STATUS_CONTAINER_FILL_SOME, warehouseCode); | |
1717 | - } | |
1695 | + if (fromLocationCode.equals(toLocationCode)) { | |
1696 | + success = containerService.updateStatus(containerCode, QuantityConstant.STATUS_CONTAINER_EMPTY, warehouseCode); | |
1718 | 1697 | } else { |
1719 | - if (fromLocationCode.equals(toLocationCode)) { | |
1720 | - success = containerService.updateStatus(containerCode, QuantityConstant.STATUS_CONTAINER_EMPTY, warehouseCode); | |
1721 | - } else { | |
1722 | - success = containerService.updateLocationCodeAndStatus(containerCode, toLocationCode, QuantityConstant.STATUS_CONTAINER_EMPTY, | |
1723 | - QuantityConstant.STATUS_CONTAINER_FILL_EMPTY, warehouseCode); | |
1724 | - } | |
1698 | + success = containerService.updateLocationCodeAndStatus(containerCode, toLocationCode, QuantityConstant.STATUS_CONTAINER_EMPTY, warehouseCode); | |
1725 | 1699 | } |
1726 | 1700 | break; |
1727 | 1701 | case QuantityConstant.TASK_TYPE_OVER_STATION: |
... | ... | @@ -1753,6 +1727,22 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
1753 | 1727 | throw new JeecgBootException("任务类型" + taskType + "完成任务时,更新库位失败"); |
1754 | 1728 | } |
1755 | 1729 | } |
1730 | + if (StringUtils.isEmpty(containerFillStatus)) { | |
1731 | + List<InventoryDetail> inventoryDetailList = inventoryDetailService.getInventoryDetailListByContainerCode(containerCode, warehouseCode); | |
1732 | + if (inventoryDetailList.size() > 0) { | |
1733 | + if (!containerService.updateFillStatus(containerCode, QuantityConstant.STATUS_CONTAINER_FILL_SOME, warehouseCode)) { | |
1734 | + throw new JeecgBootException("任务类型" + taskType + "完成任务时,更新容器填充状态失败"); | |
1735 | + } | |
1736 | + } else { | |
1737 | + if (!containerService.updateFillStatus(containerCode, QuantityConstant.STATUS_CONTAINER_FILL_EMPTY, warehouseCode)) { | |
1738 | + throw new JeecgBootException("任务类型" + taskType + "完成任务时,更新容器填充状态失败"); | |
1739 | + } | |
1740 | + } | |
1741 | + } else { | |
1742 | + if (!containerService.updateFillStatus(containerCode, containerFillStatus, warehouseCode)) { | |
1743 | + throw new JeecgBootException("任务类型" + taskType + "完成任务时,更新容器填充状态失败"); | |
1744 | + } | |
1745 | + } | |
1756 | 1746 | if (!inventoryHeaderService.updateInventoryContainerStatusByContainerCode(containerCode, warehouseCode)) { |
1757 | 1747 | throw new JeecgBootException("任务类型" + taskType + "完成任务时,更新托盘状态失败"); |
1758 | 1748 | } |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/utils/constant/QuantityConstant.java
... | ... | @@ -489,12 +489,17 @@ public class QuantityConstant { |
489 | 489 | public static final String CONTAINER_SPEC = "containerSpec"; |
490 | 490 | public static final String LOCAL_SERVER_IP = "localServerIP"; |
491 | 491 | public static final String RULE_DOCUMEMT_AUDIT_FLOW = "documentAduitFlow"; |
492 | - | |
493 | 492 | public static final String EMPTY_ROADWAY_DEFAULT = "emptyRoadWayDefault"; |
493 | + public static final String RULE_CANCEL_TASK = "cancelTask"; | |
494 | 494 | |
495 | 495 | public static final int DOUBLE_FORK = 1; |
496 | 496 | public static final int SINGLE_FORK = 0; |
497 | 497 | |
498 | + // 取消任务,不取消配盘 | |
499 | + public static final int RULE_TASK_CANCEL_NORMAL = 0; | |
500 | + // 取消任务,顺便取消配盘 | |
501 | + public static final int RULE_TASK_CANCEL_CONTAINER = 1; | |
502 | + | |
498 | 503 | public static final int RULE_TASK_SET_LOCATION = 1; |
499 | 504 | public static final int RULE_TASK_NOT_LOCATION = 0; |
500 | 505 | |
... | ... |