Commit 9ff7e1e3cc3c85da0e5fa96724df682243469f49

Authored by 肖超群
1 parent f4c5f733

1. 修复pda 呼叫料盒 没有锁库位的问题

2. 一些接口加上并发限制
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/erp/service/impl/ErpServiceImpl.java
@@ -10,6 +10,7 @@ import java.util.stream.Collectors; @@ -10,6 +10,7 @@ import java.util.stream.Collectors;
10 import javax.annotation.Resource; 10 import javax.annotation.Resource;
11 11
12 import org.jeecg.common.api.vo.Result; 12 import org.jeecg.common.api.vo.Result;
  13 +import org.jeecg.common.exception.JeecgBootException;
13 import org.jeecg.modules.wms.api.erp.entity.*; 14 import org.jeecg.modules.wms.api.erp.entity.*;
14 import org.jeecg.modules.wms.api.erp.service.IErpService; 15 import org.jeecg.modules.wms.api.erp.service.IErpService;
15 import org.jeecg.modules.wms.config.address.service.IAddressService; 16 import org.jeecg.modules.wms.config.address.service.IAddressService;
@@ -38,7 +39,6 @@ import org.springframework.stereotype.Service; @@ -38,7 +39,6 @@ import org.springframework.stereotype.Service;
38 import org.springframework.transaction.annotation.Transactional; 39 import org.springframework.transaction.annotation.Transactional;
39 40
40 import com.alibaba.fastjson.JSON; 41 import com.alibaba.fastjson.JSON;
41 -import org.jeecg.common.exception.JeecgBootException;  
42 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; 42 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
43 import com.baomidou.mybatisplus.core.toolkit.Wrappers; 43 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
44 44
@@ -399,6 +399,7 @@ public class ErpServiceImpl implements IErpService { @@ -399,6 +399,7 @@ public class ErpServiceImpl implements IErpService {
399 } 399 }
400 400
401 @Override 401 @Override
  402 + @Transactional(rollbackFor = Exception.class)
402 public Result backReceipt(ReceiptHeader receiptHeader) { 403 public Result backReceipt(ReceiptHeader receiptHeader) {
403 if (receiptHeader == null) { 404 if (receiptHeader == null) {
404 return Result.error("回传入库单, 入库单为空!!"); 405 return Result.error("回传入库单, 入库单为空!!");
@@ -436,6 +437,7 @@ public class ErpServiceImpl implements IErpService { @@ -436,6 +437,7 @@ public class ErpServiceImpl implements IErpService {
436 } 437 }
437 438
438 @Override 439 @Override
  440 + @Transactional(rollbackFor = Exception.class)
439 public Result backShipment(ShipmentHeader shipmentHeader) { 441 public Result backShipment(ShipmentHeader shipmentHeader) {
440 if (shipmentHeader == null) { 442 if (shipmentHeader == null) {
441 return Result.error("回传出库单, 出库单为空!!"); 443 return Result.error("回传出库单, 出库单为空!!");
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/mobile/service/IMobileService.java
@@ -8,5 +8,6 @@ import org.jeecg.modules.wms.task.taskHeader.entity.TaskHeader; @@ -8,5 +8,6 @@ import org.jeecg.modules.wms.task.taskHeader.entity.TaskHeader;
8 public interface IMobileService { 8 public interface IMobileService {
9 9
10 Result<TaskHeader> callBox(CallBoxBean bean, String warehouseCode); 10 Result<TaskHeader> callBox(CallBoxBean bean, String warehouseCode);
  11 +
11 Result<TaskHeader> quickReceipt(QuickReceiptBean bean, String warehouseCode); 12 Result<TaskHeader> quickReceipt(QuickReceiptBean bean, String warehouseCode);
12 } 13 }
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/mobile/service/impl/MobileService.java
1 package org.jeecg.modules.wms.api.mobile.service.impl; 1 package org.jeecg.modules.wms.api.mobile.service.impl;
2 2
  3 +import java.util.ArrayList;
  4 +import java.util.List;
  5 +
3 import javax.annotation.Resource; 6 import javax.annotation.Resource;
4 7
5 import org.apache.commons.lang3.StringUtils; 8 import org.apache.commons.lang3.StringUtils;
6 import org.jeecg.common.api.vo.Result; 9 import org.jeecg.common.api.vo.Result;
  10 +import org.jeecg.common.exception.JeecgBootException;
7 import org.jeecg.modules.wms.api.mobile.entity.CallBoxBean; 11 import org.jeecg.modules.wms.api.mobile.entity.CallBoxBean;
8 import org.jeecg.modules.wms.api.mobile.entity.QuickReceiptBean; 12 import org.jeecg.modules.wms.api.mobile.entity.QuickReceiptBean;
9 import org.jeecg.modules.wms.api.mobile.service.IMobileService; 13 import org.jeecg.modules.wms.api.mobile.service.IMobileService;
10 import org.jeecg.modules.wms.config.container.entity.Container; 14 import org.jeecg.modules.wms.config.container.entity.Container;
11 import org.jeecg.modules.wms.config.container.service.IContainerService; 15 import org.jeecg.modules.wms.config.container.service.IContainerService;
12 -import org.jeecg.modules.wms.config.location.entity.Location;  
13 import org.jeecg.modules.wms.config.location.service.ILocationService; 16 import org.jeecg.modules.wms.config.location.service.ILocationService;
  17 +import org.jeecg.modules.wms.config.parameterConfiguration.service.IParameterConfigurationService;
14 import org.jeecg.modules.wms.receipt.receiptHeader.entity.ReceiptDetail; 18 import org.jeecg.modules.wms.receipt.receiptHeader.entity.ReceiptDetail;
15 import org.jeecg.modules.wms.receipt.receiptHeader.entity.ReceiptHeader; 19 import org.jeecg.modules.wms.receipt.receiptHeader.entity.ReceiptHeader;
16 import org.jeecg.modules.wms.receipt.receiptHeader.service.IReceiptDetailService; 20 import org.jeecg.modules.wms.receipt.receiptHeader.service.IReceiptDetailService;
@@ -24,11 +28,6 @@ import org.springframework.beans.factory.annotation.Autowired; @@ -24,11 +28,6 @@ import org.springframework.beans.factory.annotation.Autowired;
24 import org.springframework.stereotype.Service; 28 import org.springframework.stereotype.Service;
25 import org.springframework.transaction.annotation.Transactional; 29 import org.springframework.transaction.annotation.Transactional;
26 30
27 -import org.jeecg.common.exception.JeecgBootException;  
28 -  
29 -import java.util.ArrayList;  
30 -import java.util.List;  
31 -  
32 /** 31 /**
33 */ 32 */
34 @Service 33 @Service
@@ -51,56 +50,47 @@ public class MobileService implements IMobileService { @@ -51,56 +50,47 @@ public class MobileService implements IMobileService {
51 50
52 @Resource 51 @Resource
53 private IReceiveService receiveService; 52 private IReceiveService receiveService;
  53 + @Resource
  54 + private IParameterConfigurationService parameterConfigurationService;
54 55
55 @Override 56 @Override
56 @Transactional(rollbackFor = Exception.class) 57 @Transactional(rollbackFor = Exception.class)
57 public Result<TaskHeader> callBox(CallBoxBean bean, String warehouseCode) { 58 public Result<TaskHeader> callBox(CallBoxBean bean, String warehouseCode) {
  59 + String containerCode = bean.getContainerCode();
58 if (StringUtils.isEmpty(bean.getContainerCode())) { 60 if (StringUtils.isEmpty(bean.getContainerCode())) {
59 - return Result.error("托盘号containerCode不能为空"); 61 + return Result.error("呼叫料盒,托盘号containerCode不能为空");
60 } 62 }
61 63
62 if (StringUtils.isEmpty(bean.getLocationCode())) { 64 if (StringUtils.isEmpty(bean.getLocationCode())) {
63 - return Result.error("库位locationCode不能为空"); 65 + return Result.error("呼叫料盒, 库位locationCode不能为空");
64 } 66 }
65 67
66 if (StringUtils.isEmpty(bean.getCompanyCode())) { 68 if (StringUtils.isEmpty(bean.getCompanyCode())) {
67 - return Result.error("货主companyCode不能为空"); 69 + return Result.error("呼叫料盒, 货主companyCode不能为空");
68 } 70 }
69 71
70 - if(StringUtils.isEmpty(bean.getPort())){  
71 - return Result.error("出库口不能为空"); 72 + if (StringUtils.isEmpty(bean.getPort())) {
  73 + return Result.error("呼叫料盒, 出库口不能为空");
72 } 74 }
73 -  
74 - Container container = containerService.getContainerByCode(bean.getContainerCode(), warehouseCode); 75 + Container container = containerService.getContainerByCode(containerCode, warehouseCode);
75 if (container == null) { 76 if (container == null) {
76 - return Result.error(bean.getContainerCode() + " " + warehouseCode + "容器不存在"); 77 + return Result.error("呼叫料盒,容器为空");
77 } 78 }
78 -  
79 - if (StringUtils.isEmpty(container.getLocationCode())) {  
80 - return Result.error(bean.getContainerCode() + "容器不在库位上"); 79 + String fromLocationCode = container.getLocationCode();
  80 + String toLocationCode = QuantityConstant.EMPTY_STRING;
  81 + String value = parameterConfigurationService.getValueByCode(QuantityConstant.RULE_TASK_LOCATION);
  82 + int taskLocationRule = Integer.parseInt(value);
  83 + if (taskLocationRule == QuantityConstant.RULE_TASK_SET_LOCATION) {
  84 + toLocationCode = fromLocationCode;
81 } 85 }
82 -  
83 - if (!container.getLocationCode().equals(bean.getLocationCode())) {  
84 - return Result.error(bean.getContainerCode() + "容器不在库位[" + bean.getLocationCode() + "]上");  
85 - }  
86 -  
87 - Location loc = locationService.getLocationByCode(bean.getLocationCode(), warehouseCode);  
88 - // 校验目标地址  
89 - if (loc == null) {  
90 - return Result.error("目标库位不存在");  
91 - }  
92 - if (!QuantityConstant.STATUS_LOCATION_EMPTY.equals(loc.getStatus())) {  
93 - return Result.error("目标库位非空闲");  
94 - }  
95 - // 判断托盘是否已经存在任务  
96 - TaskHeader taskHeader = taskHeaderService.getUnCompleteTaskByContainerCode(bean.getContainerCode(), warehouseCode);  
97 - if (taskHeader != null) {  
98 - return Result.error("容器已存在任务"); 86 + Result result = taskHeaderService.createTaskLockContainerAndLocation(bean.getType(), containerCode, fromLocationCode, toLocationCode, warehouseCode);
  87 + if (!result.isSuccess()) {
  88 + throw new JeecgBootException(result.getMessage());
99 } 89 }
100 90
101 // 创建主任务 91 // 创建主任务
102 - taskHeader = new TaskHeader();  
103 - taskHeader.setWarehouseCode(loc.getWarehouseCode()); 92 + TaskHeader taskHeader = new TaskHeader();
  93 + taskHeader.setWarehouseCode(warehouseCode);
104 taskHeader.setCompanyCode(bean.getCompanyCode()); 94 taskHeader.setCompanyCode(bean.getCompanyCode());
105 taskHeader.setToPortCode(bean.getPort()); 95 taskHeader.setToPortCode(bean.getPort());
106 if (bean.getType() == QuantityConstant.TASK_TYPE_SUPPLEMENTRECEIPT) { 96 if (bean.getType() == QuantityConstant.TASK_TYPE_SUPPLEMENTRECEIPT) {
@@ -112,14 +102,12 @@ public class MobileService implements IMobileService { @@ -112,14 +102,12 @@ public class MobileService implements IMobileService {
112 taskHeader.setInnernalTaskType(QuantityConstant.TASK_INTENERTYPE_SHIPMENT); 102 taskHeader.setInnernalTaskType(QuantityConstant.TASK_INTENERTYPE_SHIPMENT);
113 taskHeader.setTaskType(QuantityConstant.TASK_TYPE_SORTINGSHIPMENT); 103 taskHeader.setTaskType(QuantityConstant.TASK_TYPE_SORTINGSHIPMENT);
114 } 104 }
115 - taskHeader.setContainerCode(container.getCode()); 105 + taskHeader.setContainerCode(containerCode);
116 taskHeader.setStatus(QuantityConstant.TASK_STATUS_BUILD); 106 taskHeader.setStatus(QuantityConstant.TASK_STATUS_BUILD);
117 - taskHeader.setFromLocationCode(loc.getCode());  
118 - if (taskHeaderService.save(taskHeader)) {  
119 - // 锁定库位状态  
120 - locationService.updateStatus(loc.getCode(), QuantityConstant.STATUS_LOCATION_LOCK, warehouseCode);  
121 - } else {  
122 - throw new JeecgBootException("补充入库主表生成失败!"); 107 + taskHeader.setFromLocationCode(fromLocationCode);
  108 + taskHeader.setToLocationCode(toLocationCode);
  109 + if (!taskHeaderService.save(taskHeader)) {
  110 + throw new JeecgBootException("呼叫料盒, 保存任务失败");
123 } 111 }
124 112
125 return Result.OK("呼叫料盒成功", taskHeader); 113 return Result.OK("呼叫料盒成功", taskHeader);
@@ -141,7 +129,7 @@ public class MobileService implements IMobileService { @@ -141,7 +129,7 @@ public class MobileService implements IMobileService {
141 return Result.error("收货明细不能为空"); 129 return Result.error("收货明细不能为空");
142 } 130 }
143 131
144 - //创建入库单 132 + // 创建入库单
145 ReceiptHeader receiptHeader = new ReceiptHeader(); 133 ReceiptHeader receiptHeader = new ReceiptHeader();
146 receiptHeader.setType(bean.getReceiptType()); 134 receiptHeader.setType(bean.getReceiptType());
147 receiptHeader.setCompanyCode(bean.getCompanyCode()); 135 receiptHeader.setCompanyCode(bean.getCompanyCode());
@@ -153,32 +141,32 @@ public class MobileService implements IMobileService { @@ -153,32 +141,32 @@ public class MobileService implements IMobileService {
153 } else { 141 } else {
154 throw new JeecgBootException(rs1.getMessage()); 142 throw new JeecgBootException(rs1.getMessage());
155 } 143 }
156 - 144 + List<ReceiptDetail> receiptDetailList = bean.getReceiptDetails();
157 List<Receive> receiveList = new ArrayList<>(); 145 List<Receive> receiveList = new ArrayList<>();
158 - for (ReceiptDetail d : bean.getReceiptDetails()) {  
159 - d.setReceiptId(receiptHeader.getId());  
160 - Result rs2 = receiptDetailService.saveReceiptDetail(d);  
161 - if(!rs2.isSuccess()) { 146 + for (ReceiptDetail receiptDetail : receiptDetailList) {
  147 + receiptDetail.setReceiptId(receiptHeader.getId());
  148 + Result rs2 = receiptDetailService.saveReceiptDetail(receiptDetail);
  149 + if (!rs2.isSuccess()) {
162 throw new JeecgBootException(rs2.getMessage()); 150 throw new JeecgBootException(rs2.getMessage());
163 } 151 }
164 - Receive v = new Receive();  
165 - v.setId(d.getId());  
166 - v.setQty(d.getQty());  
167 - v.setTaskQty(d.getQty());  
168 - v.setInventoryStatus(d.getInventoryStatus());  
169 - v.setMaterialCode(d.getMaterialCode());  
170 - v.setMaterialName(d.getMaterialName());  
171 - v.setBatch(d.getBatch());  
172 - v.setMaterialSpec(d.getMaterialSpec());  
173 - v.setMaterialUnit(d.getMaterialUnit());  
174 - v.setContainerCode(bean.getContainerCode());  
175 - receiveList.add(v); 152 + Receive receive = new Receive();
  153 + receive.setId(receiptDetail.getId());
  154 + receive.setQty(receiptDetail.getQty());
  155 + receive.setTaskQty(receiptDetail.getQty());
  156 + receive.setInventoryStatus(receiptDetail.getInventoryStatus());
  157 + receive.setMaterialCode(receiptDetail.getMaterialCode());
  158 + receive.setMaterialName(receiptDetail.getMaterialName());
  159 + receive.setBatch(receiptDetail.getBatch());
  160 + receive.setMaterialSpec(receiptDetail.getMaterialSpec());
  161 + receive.setMaterialUnit(receiptDetail.getMaterialUnit());
  162 + receive.setContainerCode(bean.getContainerCode());
  163 + receiveList.add(receive);
176 } 164 }
177 165
178 Result<TaskHeader> rs3 = receiveService.receivingAndCreateTask(receiveList, warehouseCode); 166 Result<TaskHeader> rs3 = receiveService.receivingAndCreateTask(receiveList, warehouseCode);
179 - if(rs3.isSuccess()) { 167 + if (rs3.isSuccess()) {
180 return rs3; 168 return rs3;
181 - }else{ 169 + } else {
182 throw new JeecgBootException(rs3.getMessage()); 170 throw new JeecgBootException(rs3.getMessage());
183 } 171 }
184 } 172 }
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/framework/service/IHuahengMultiHandlerService.java
1 package org.jeecg.modules.wms.framework.service; 1 package org.jeecg.modules.wms.framework.service;
2 2
3 import org.jeecg.common.api.vo.Result; 3 import org.jeecg.common.api.vo.Result;
  4 +import org.jeecg.modules.wms.api.mobile.entity.CallBoxBean;
  5 +import org.jeecg.modules.wms.api.mobile.entity.QuickReceiptBean;
4 import org.jeecg.modules.wms.receipt.receiptContainerHeader.entity.ReceiptContainerHeader; 6 import org.jeecg.modules.wms.receipt.receiptContainerHeader.entity.ReceiptContainerHeader;
  7 +import org.jeecg.modules.wms.receipt.receiptHeader.entity.ReceiptHeader;
5 import org.jeecg.modules.wms.shipment.shipmentCombination.entity.CombinationModel; 8 import org.jeecg.modules.wms.shipment.shipmentCombination.entity.CombinationModel;
6 import org.jeecg.modules.wms.shipment.shipmentContainerHeader.entity.ShipmentContainerHeader; 9 import org.jeecg.modules.wms.shipment.shipmentContainerHeader.entity.ShipmentContainerHeader;
7 import org.jeecg.modules.wms.shipment.shipmentHeader.entity.CombinationParam; 10 import org.jeecg.modules.wms.shipment.shipmentHeader.entity.CombinationParam;
  11 +import org.jeecg.modules.wms.shipment.shipmentHeader.entity.ShipmentHeader;
8 import org.jeecg.modules.wms.task.taskHeader.entity.TaskHeader; 12 import org.jeecg.modules.wms.task.taskHeader.entity.TaskHeader;
9 13
10 /** 14 /**
@@ -25,4 +29,12 @@ public interface IHuahengMultiHandlerService { @@ -25,4 +29,12 @@ public interface IHuahengMultiHandlerService {
25 Result autoCombination(String shipmentCode, String warehouseCode); 29 Result autoCombination(String shipmentCode, String warehouseCode);
26 30
27 Result createShipmentTask(ShipmentContainerHeader shipmentContainerHeader, String warehouseCode, long shipmentOrder, int sequence, int sequenceNumber); 31 Result createShipmentTask(ShipmentContainerHeader shipmentContainerHeader, String warehouseCode, long shipmentOrder, int sequence, int sequenceNumber);
  32 +
  33 + Result callBox(CallBoxBean bean, String warehouseCode);
  34 +
  35 + Result quickReceipt(QuickReceiptBean bean, String warehouseCode);
  36 +
  37 + Result backReceipt(ReceiptHeader receiptHeader);
  38 +
  39 + Result backShipment(ShipmentHeader shipmentHeader);
28 } 40 }
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/framework/service/impl/HuahengMultiHandlerServiceImpl.java
@@ -5,18 +5,24 @@ import java.math.BigDecimal; @@ -5,18 +5,24 @@ import java.math.BigDecimal;
5 import javax.annotation.Resource; 5 import javax.annotation.Resource;
6 6
7 import org.jeecg.common.api.vo.Result; 7 import org.jeecg.common.api.vo.Result;
  8 +import org.jeecg.modules.wms.api.erp.service.IErpService;
  9 +import org.jeecg.modules.wms.api.mobile.entity.CallBoxBean;
  10 +import org.jeecg.modules.wms.api.mobile.entity.QuickReceiptBean;
  11 +import org.jeecg.modules.wms.api.mobile.service.IMobileService;
8 import org.jeecg.modules.wms.framework.controller.HuahengBaseController; 12 import org.jeecg.modules.wms.framework.controller.HuahengBaseController;
9 import org.jeecg.modules.wms.framework.service.IHuahengMultiHandlerService; 13 import org.jeecg.modules.wms.framework.service.IHuahengMultiHandlerService;
10 import org.jeecg.modules.wms.inventory.inventoryHeader.entity.InventoryDetail; 14 import org.jeecg.modules.wms.inventory.inventoryHeader.entity.InventoryDetail;
11 import org.jeecg.modules.wms.inventory.inventoryHeader.service.IInventoryDetailService; 15 import org.jeecg.modules.wms.inventory.inventoryHeader.service.IInventoryDetailService;
12 import org.jeecg.modules.wms.receipt.receiptContainerHeader.entity.ReceiptContainerHeader; 16 import org.jeecg.modules.wms.receipt.receiptContainerHeader.entity.ReceiptContainerHeader;
13 import org.jeecg.modules.wms.receipt.receiptContainerHeader.service.IReceiptContainerHeaderService; 17 import org.jeecg.modules.wms.receipt.receiptContainerHeader.service.IReceiptContainerHeaderService;
  18 +import org.jeecg.modules.wms.receipt.receiptHeader.entity.ReceiptHeader;
14 import org.jeecg.modules.wms.shipment.shipmentCombination.entity.CombinationModel; 19 import org.jeecg.modules.wms.shipment.shipmentCombination.entity.CombinationModel;
15 import org.jeecg.modules.wms.shipment.shipmentCombination.service.IShipmentCombinationService; 20 import org.jeecg.modules.wms.shipment.shipmentCombination.service.IShipmentCombinationService;
16 import org.jeecg.modules.wms.shipment.shipmentContainerHeader.entity.ShipmentContainerHeader; 21 import org.jeecg.modules.wms.shipment.shipmentContainerHeader.entity.ShipmentContainerHeader;
17 import org.jeecg.modules.wms.shipment.shipmentContainerHeader.service.IShipmentContainerHeaderService; 22 import org.jeecg.modules.wms.shipment.shipmentContainerHeader.service.IShipmentContainerHeaderService;
18 import org.jeecg.modules.wms.shipment.shipmentHeader.entity.CombinationParam; 23 import org.jeecg.modules.wms.shipment.shipmentHeader.entity.CombinationParam;
19 import org.jeecg.modules.wms.shipment.shipmentHeader.entity.ShipmentDetail; 24 import org.jeecg.modules.wms.shipment.shipmentHeader.entity.ShipmentDetail;
  25 +import org.jeecg.modules.wms.shipment.shipmentHeader.entity.ShipmentHeader;
20 import org.jeecg.modules.wms.shipment.shipmentHeader.service.IShipmentDetailService; 26 import org.jeecg.modules.wms.shipment.shipmentHeader.service.IShipmentDetailService;
21 import org.jeecg.modules.wms.task.taskHeader.entity.TaskHeader; 27 import org.jeecg.modules.wms.task.taskHeader.entity.TaskHeader;
22 import org.jeecg.modules.wms.task.taskHeader.service.ITaskHeaderService; 28 import org.jeecg.modules.wms.task.taskHeader.service.ITaskHeaderService;
@@ -41,6 +47,10 @@ public class HuahengMultiHandlerServiceImpl extends HuahengBaseController implem @@ -41,6 +47,10 @@ public class HuahengMultiHandlerServiceImpl extends HuahengBaseController implem
41 private IInventoryDetailService inventoryDetailService; 47 private IInventoryDetailService inventoryDetailService;
42 @Resource 48 @Resource
43 private IShipmentContainerHeaderService shipmentContainerHeaderService; 49 private IShipmentContainerHeaderService shipmentContainerHeaderService;
  50 + @Resource
  51 + private IMobileService mobileService;
  52 + @Resource
  53 + private IErpService erpService;
44 54
45 @Override 55 @Override
46 @Transactional(rollbackFor = Exception.class) 56 @Transactional(rollbackFor = Exception.class)
@@ -119,6 +129,7 @@ public class HuahengMultiHandlerServiceImpl extends HuahengBaseController implem @@ -119,6 +129,7 @@ public class HuahengMultiHandlerServiceImpl extends HuahengBaseController implem
119 } 129 }
120 130
121 @Override 131 @Override
  132 + @Transactional(rollbackFor = Exception.class)
122 public Result autoCombination(String shipmentCode, String warehouseCode) { 133 public Result autoCombination(String shipmentCode, String warehouseCode) {
123 Result result = handleMultiProcess("combination", new MultiProcessListener() { 134 Result result = handleMultiProcess("combination", new MultiProcessListener() {
124 @Override 135 @Override
@@ -131,6 +142,7 @@ public class HuahengMultiHandlerServiceImpl extends HuahengBaseController implem @@ -131,6 +142,7 @@ public class HuahengMultiHandlerServiceImpl extends HuahengBaseController implem
131 } 142 }
132 143
133 @Override 144 @Override
  145 + @Transactional(rollbackFor = Exception.class)
134 public Result createShipmentTask(ShipmentContainerHeader shipmentContainerHeader, String warehouseCode, long shipmentOrder, int sequence, int sequenceNumber) { 146 public Result createShipmentTask(ShipmentContainerHeader shipmentContainerHeader, String warehouseCode, long shipmentOrder, int sequence, int sequenceNumber) {
135 Result result = handleMultiProcess("createShipmentTask", new MultiProcessListener() { 147 Result result = handleMultiProcess("createShipmentTask", new MultiProcessListener() {
136 @Override 148 @Override
@@ -142,4 +154,58 @@ public class HuahengMultiHandlerServiceImpl extends HuahengBaseController implem @@ -142,4 +154,58 @@ public class HuahengMultiHandlerServiceImpl extends HuahengBaseController implem
142 return result; 154 return result;
143 } 155 }
144 156
  157 + @Override
  158 + @Transactional(rollbackFor = Exception.class)
  159 + public Result callBox(CallBoxBean bean, String warehouseCode) {
  160 + String lockKey = warehouseCode;
  161 + Result result = handleMultiProcess("callBox", lockKey, new MultiProcessListener() {
  162 + @Override
  163 + public Result<?> doProcess() {
  164 + Result result = mobileService.callBox(bean, warehouseCode);
  165 + return result;
  166 + }
  167 + });
  168 + return result;
  169 + }
  170 +
  171 + @Override
  172 + @Transactional(rollbackFor = Exception.class)
  173 + public Result quickReceipt(QuickReceiptBean bean, String warehouseCode) {
  174 + String lockKey = warehouseCode;
  175 + Result result = handleMultiProcess("quickReceipt", lockKey, new MultiProcessListener() {
  176 + @Override
  177 + public Result<?> doProcess() {
  178 + Result result = mobileService.quickReceipt(bean, warehouseCode);
  179 + return result;
  180 + }
  181 + });
  182 + return result;
  183 + }
  184 +
  185 + @Override
  186 + @Transactional(rollbackFor = Exception.class)
  187 + public Result backReceipt(ReceiptHeader receiptHeader) {
  188 + Result result = handleMultiProcess("backReceipt", new MultiProcessListener() {
  189 + @Override
  190 + public Result<?> doProcess() {
  191 + Result result = erpService.backReceipt(receiptHeader);
  192 + return result;
  193 + }
  194 + });
  195 + return result;
  196 + }
  197 +
  198 + @Override
  199 + @Transactional(rollbackFor = Exception.class)
  200 + public Result backShipment(ShipmentHeader shipmentHeader) {
  201 + Result result = handleMultiProcess("backShipment", new MultiProcessListener() {
  202 + @Override
  203 + public Result<?> doProcess() {
  204 + Result result = erpService.backShipment(shipmentHeader);
  205 + return result;
  206 + }
  207 + });
  208 + return result;
  209 + }
  210 +
145 } 211 }
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/monitor/job/ErpTask.java
1 package org.jeecg.modules.wms.monitor.job; 1 package org.jeecg.modules.wms.monitor.job;
2 2
3 -import java.util.HashMap;  
4 import java.util.List; 3 import java.util.List;
5 -import java.util.Map;  
6 4
7 import javax.annotation.Resource; 5 import javax.annotation.Resource;
8 6
9 -import org.apache.commons.collections.MapUtils;  
10 import org.jeecg.modules.wms.api.erp.service.IErpService; 7 import org.jeecg.modules.wms.api.erp.service.IErpService;
  8 +import org.jeecg.modules.wms.framework.service.IHuahengMultiHandlerService;
11 import org.jeecg.modules.wms.receipt.receiptHeader.entity.ReceiptHeader; 9 import org.jeecg.modules.wms.receipt.receiptHeader.entity.ReceiptHeader;
12 import org.jeecg.modules.wms.receipt.receiptHeader.service.IReceiptHeaderService; 10 import org.jeecg.modules.wms.receipt.receiptHeader.service.IReceiptHeaderService;
13 import org.jeecg.modules.wms.shipment.shipmentHeader.entity.ShipmentHeader; 11 import org.jeecg.modules.wms.shipment.shipmentHeader.entity.ShipmentHeader;
14 import org.jeecg.modules.wms.shipment.shipmentHeader.service.IShipmentHeaderService; 12 import org.jeecg.modules.wms.shipment.shipmentHeader.service.IShipmentHeaderService;
15 import org.jeecg.utils.constant.QuantityConstant; 13 import org.jeecg.utils.constant.QuantityConstant;
16 -import org.quartz.DisallowConcurrentExecution;  
17 -import org.quartz.Job;  
18 -import org.quartz.JobExecutionContext;  
19 -import org.quartz.JobExecutionException;  
20 -import org.quartz.PersistJobDataAfterExecution; 14 +import org.quartz.*;
21 15
22 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; 16 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
23 import com.baomidou.mybatisplus.core.toolkit.Wrappers; 17 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
@@ -42,6 +36,8 @@ public class ErpTask implements Job { @@ -42,6 +36,8 @@ public class ErpTask implements Job {
42 36
43 @Resource 37 @Resource
44 private IErpService erpService; 38 private IErpService erpService;
  39 + @Resource
  40 + private IHuahengMultiHandlerService huahengMultiHandlerService;
45 41
46 @Override 42 @Override
47 public void execute(JobExecutionContext context) throws JobExecutionException { 43 public void execute(JobExecutionContext context) throws JobExecutionException {
@@ -51,7 +47,7 @@ public class ErpTask implements Job { @@ -51,7 +47,7 @@ public class ErpTask implements Job {
51 List<ReceiptHeader> receiptHeaderList = receiptHeaderService.list(receiptHeaderLambdaQueryWrapper); 47 List<ReceiptHeader> receiptHeaderList = receiptHeaderService.list(receiptHeaderLambdaQueryWrapper);
52 for (ReceiptHeader receiptHeader : receiptHeaderList) { 48 for (ReceiptHeader receiptHeader : receiptHeaderList) {
53 try { 49 try {
54 - erpService.backReceipt(receiptHeader); 50 + huahengMultiHandlerService.backReceipt(receiptHeader);
55 } catch (Exception e) { 51 } catch (Exception e) {
56 e.printStackTrace(); 52 e.printStackTrace();
57 } 53 }
@@ -63,7 +59,7 @@ public class ErpTask implements Job { @@ -63,7 +59,7 @@ public class ErpTask implements Job {
63 List<ShipmentHeader> shipmentHeaderList = shipmentHeaderService.list(shipmentHeaderLambdaQueryWrapper); 59 List<ShipmentHeader> shipmentHeaderList = shipmentHeaderService.list(shipmentHeaderLambdaQueryWrapper);
64 for (ShipmentHeader shipmentHeader : shipmentHeaderList) { 60 for (ShipmentHeader shipmentHeader : shipmentHeaderList) {
65 try { 61 try {
66 - erpService.backShipment(shipmentHeader); 62 + huahengMultiHandlerService.backShipment(shipmentHeader);
67 } catch (Exception e) { 63 } catch (Exception e) {
68 e.printStackTrace(); 64 e.printStackTrace();
69 } 65 }
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiptContainerHeader/service/impl/ReceiptContainerHeaderServiceImpl.java
@@ -137,7 +137,7 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl&lt;ReceiptContai @@ -137,7 +137,7 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl&lt;ReceiptContai
137 // 锁定容器和库位 137 // 锁定容器和库位
138 Result result = taskHeaderService.createTaskLockContainerAndLocation(taskType, containerCode, fromLocationCode, toLocationCode, warehouseCode); 138 Result result = taskHeaderService.createTaskLockContainerAndLocation(taskType, containerCode, fromLocationCode, toLocationCode, warehouseCode);
139 if (!result.isSuccess()) { 139 if (!result.isSuccess()) {
140 - return result; 140 + throw new JeecgBootException(result.getMessage());
141 } 141 }
142 TaskLockEntity taskLockEntity = (TaskLockEntity)result.getResult(); 142 TaskLockEntity taskLockEntity = (TaskLockEntity)result.getResult();
143 String zoneCode = taskLockEntity.getZoneCode(); 143 String zoneCode = taskLockEntity.getZoneCode();
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiptHeader/controller/ReceiptHeaderController.java
@@ -24,6 +24,7 @@ import org.jeecg.modules.wms.api.mobile.entity.CallBoxBean; @@ -24,6 +24,7 @@ import org.jeecg.modules.wms.api.mobile.entity.CallBoxBean;
24 import org.jeecg.modules.wms.api.mobile.entity.QuickReceiptBean; 24 import org.jeecg.modules.wms.api.mobile.entity.QuickReceiptBean;
25 import org.jeecg.modules.wms.api.mobile.service.IMobileService; 25 import org.jeecg.modules.wms.api.mobile.service.IMobileService;
26 import org.jeecg.modules.wms.config.material.service.IMaterialService; 26 import org.jeecg.modules.wms.config.material.service.IMaterialService;
  27 +import org.jeecg.modules.wms.framework.service.IHuahengMultiHandlerService;
27 import org.jeecg.modules.wms.receipt.receiptHeader.entity.ReceiptDetail; 28 import org.jeecg.modules.wms.receipt.receiptHeader.entity.ReceiptDetail;
28 import org.jeecg.modules.wms.receipt.receiptHeader.entity.ReceiptHeader; 29 import org.jeecg.modules.wms.receipt.receiptHeader.entity.ReceiptHeader;
29 import org.jeecg.modules.wms.receipt.receiptHeader.service.IReceiptDetailService; 30 import org.jeecg.modules.wms.receipt.receiptHeader.service.IReceiptDetailService;
@@ -80,6 +81,8 @@ public class ReceiptHeaderController extends JeecgController&lt;ReceiptHeader, IRec @@ -80,6 +81,8 @@ public class ReceiptHeaderController extends JeecgController&lt;ReceiptHeader, IRec
80 private IMaterialService materialService; 81 private IMaterialService materialService;
81 @Resource 82 @Resource
82 private IErpService erpService; 83 private IErpService erpService;
  84 + @Resource
  85 + private IHuahengMultiHandlerService huahengMultiHandlerService;
83 86
84 /*---------------------------------主表处理-begin-------------------------------------*/ 87 /*---------------------------------主表处理-begin-------------------------------------*/
85 88
@@ -357,7 +360,7 @@ public class ReceiptHeaderController extends JeecgController&lt;ReceiptHeader, IRec @@ -357,7 +360,7 @@ public class ReceiptHeaderController extends JeecgController&lt;ReceiptHeader, IRec
357 @RequiresPermissions("receiptHeader:back") 360 @RequiresPermissions("receiptHeader:back")
358 @RequestMapping(value = "/backErpReceipt", method = {RequestMethod.PUT, RequestMethod.POST}) 361 @RequestMapping(value = "/backErpReceipt", method = {RequestMethod.PUT, RequestMethod.POST})
359 public Result<?> backErpReceipt(@RequestBody ReceiptHeader receiptHeader) { 362 public Result<?> backErpReceipt(@RequestBody ReceiptHeader receiptHeader) {
360 - return erpService.backReceipt(receiptHeader); 363 + return huahengMultiHandlerService.backReceipt(receiptHeader);
361 } 364 }
362 365
363 @AutoLog(value = "PDA入库-快速入库") 366 @AutoLog(value = "PDA入库-快速入库")
@@ -368,9 +371,8 @@ public class ReceiptHeaderController extends JeecgController&lt;ReceiptHeader, IRec @@ -368,9 +371,8 @@ public class ReceiptHeaderController extends JeecgController&lt;ReceiptHeader, IRec
368 public Result<?> quickReceipt(@RequestBody QuickReceiptBean bean, HttpServletRequest req) { 371 public Result<?> quickReceipt(@RequestBody QuickReceiptBean bean, HttpServletRequest req) {
369 String warehouseCode = HuahengJwtUtil.getWarehouseCodeByToken(req); 372 String warehouseCode = HuahengJwtUtil.getWarehouseCodeByToken(req);
370 bean.setWarehouseCode(warehouseCode); 373 bean.setWarehouseCode(warehouseCode);
371 -  
372 - return mobileService.quickReceipt(bean, warehouseCode);  
373 - 374 + Result result = huahengMultiHandlerService.quickReceipt(bean, warehouseCode);
  375 + return result;
374 } 376 }
375 377
376 @AutoLog(value = "PDA入库-呼叫料盒") 378 @AutoLog(value = "PDA入库-呼叫料盒")
@@ -382,6 +384,7 @@ public class ReceiptHeaderController extends JeecgController&lt;ReceiptHeader, IRec @@ -382,6 +384,7 @@ public class ReceiptHeaderController extends JeecgController&lt;ReceiptHeader, IRec
382 String warehouseCode = HuahengJwtUtil.getWarehouseCodeByToken(req); 384 String warehouseCode = HuahengJwtUtil.getWarehouseCodeByToken(req);
383 // 补充入库类型 385 // 补充入库类型
384 bean.setType(QuantityConstant.TASK_TYPE_SUPPLEMENTRECEIPT); 386 bean.setType(QuantityConstant.TASK_TYPE_SUPPLEMENTRECEIPT);
385 - return mobileService.callBox(bean, warehouseCode); 387 + Result result = huahengMultiHandlerService.callBox(bean, warehouseCode);
  388 + return result;
386 } 389 }
387 } 390 }
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/shipment/shipmentCombination/service/impl/ShipmentCombinationServiceImpl.java
@@ -512,7 +512,7 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi @@ -512,7 +512,7 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi
512 // 锁定容器、库位 512 // 锁定容器、库位
513 Result result = taskHeaderService.createTaskLockContainerAndLocation(taskType, containerCode, fromLocationCode, toLocationCode, warehouseCode); 513 Result result = taskHeaderService.createTaskLockContainerAndLocation(taskType, containerCode, fromLocationCode, toLocationCode, warehouseCode);
514 if (!result.isSuccess()) { 514 if (!result.isSuccess()) {
515 - return result; 515 + throw new JeecgBootException(result.getMessage());
516 } 516 }
517 TaskLockEntity taskLockEntity = (TaskLockEntity)result.getResult(); 517 TaskLockEntity taskLockEntity = (TaskLockEntity)result.getResult();
518 String zoneCode = taskLockEntity.getZoneCode(); 518 String zoneCode = taskLockEntity.getZoneCode();
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/shipment/shipmentHeader/controller/ShipmentHeaderController.java
@@ -24,6 +24,7 @@ import org.jeecg.common.util.oConvertUtils; @@ -24,6 +24,7 @@ import org.jeecg.common.util.oConvertUtils;
24 import org.jeecg.modules.wms.api.erp.service.IErpService; 24 import org.jeecg.modules.wms.api.erp.service.IErpService;
25 import org.jeecg.modules.wms.api.mobile.entity.CallBoxBean; 25 import org.jeecg.modules.wms.api.mobile.entity.CallBoxBean;
26 import org.jeecg.modules.wms.api.mobile.service.IMobileService; 26 import org.jeecg.modules.wms.api.mobile.service.IMobileService;
  27 +import org.jeecg.modules.wms.framework.service.IHuahengMultiHandlerService;
27 import org.jeecg.modules.wms.inventory.inventoryHeader.entity.InventoryDetail; 28 import org.jeecg.modules.wms.inventory.inventoryHeader.entity.InventoryDetail;
28 import org.jeecg.modules.wms.inventory.inventoryHeader.service.IInventoryDetailService; 29 import org.jeecg.modules.wms.inventory.inventoryHeader.service.IInventoryDetailService;
29 import org.jeecg.modules.wms.shipment.shipmentHeader.entity.ShipmentDetail; 30 import org.jeecg.modules.wms.shipment.shipmentHeader.entity.ShipmentDetail;
@@ -40,16 +41,7 @@ import org.jeecgframework.poi.excel.entity.ExportParams; @@ -40,16 +41,7 @@ import org.jeecgframework.poi.excel.entity.ExportParams;
40 import org.jeecgframework.poi.excel.entity.ImportParams; 41 import org.jeecgframework.poi.excel.entity.ImportParams;
41 import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; 42 import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
42 import org.springframework.beans.factory.annotation.Autowired; 43 import org.springframework.beans.factory.annotation.Autowired;
43 -import org.springframework.web.bind.annotation.DeleteMapping;  
44 -import org.springframework.web.bind.annotation.GetMapping;  
45 -import org.springframework.web.bind.annotation.PathVariable;  
46 -import org.springframework.web.bind.annotation.PostMapping;  
47 -import org.springframework.web.bind.annotation.RequestBody;  
48 -import org.springframework.web.bind.annotation.RequestMapping;  
49 -import org.springframework.web.bind.annotation.RequestMethod;  
50 -import org.springframework.web.bind.annotation.RequestParam;  
51 -import org.springframework.web.bind.annotation.ResponseBody;  
52 -import org.springframework.web.bind.annotation.RestController; 44 +import org.springframework.web.bind.annotation.*;
53 import org.springframework.web.multipart.MultipartFile; 45 import org.springframework.web.multipart.MultipartFile;
54 import org.springframework.web.multipart.MultipartHttpServletRequest; 46 import org.springframework.web.multipart.MultipartHttpServletRequest;
55 import org.springframework.web.servlet.ModelAndView; 47 import org.springframework.web.servlet.ModelAndView;
@@ -89,6 +81,8 @@ public class ShipmentHeaderController extends JeecgController&lt;ShipmentHeader, IS @@ -89,6 +81,8 @@ public class ShipmentHeaderController extends JeecgController&lt;ShipmentHeader, IS
89 private IErpService erpService; 81 private IErpService erpService;
90 @Resource 82 @Resource
91 private IInventoryDetailService inventoryDetailService; 83 private IInventoryDetailService inventoryDetailService;
  84 + @Resource
  85 + private IHuahengMultiHandlerService huahengMultiHandlerService;
92 86
93 /*---------------------------------主表处理-begin-------------------------------------*/ 87 /*---------------------------------主表处理-begin-------------------------------------*/
94 88
@@ -378,7 +372,7 @@ public class ShipmentHeaderController extends JeecgController&lt;ShipmentHeader, IS @@ -378,7 +372,7 @@ public class ShipmentHeaderController extends JeecgController&lt;ShipmentHeader, IS
378 @RequiresPermissions("shipmentHeader:back") 372 @RequiresPermissions("shipmentHeader:back")
379 @RequestMapping(value = "/backErpShipment", method = {RequestMethod.PUT, RequestMethod.POST}) 373 @RequestMapping(value = "/backErpShipment", method = {RequestMethod.PUT, RequestMethod.POST})
380 public Result<?> backErpShipment(@RequestBody ShipmentHeader shipmentHeader) { 374 public Result<?> backErpShipment(@RequestBody ShipmentHeader shipmentHeader) {
381 - return erpService.backShipment(shipmentHeader); 375 + return huahengMultiHandlerService.backShipment(shipmentHeader);
382 } 376 }
383 377
384 @AutoLog(value = "PDA出库-呼叫料盒") 378 @AutoLog(value = "PDA出库-呼叫料盒")
@@ -390,6 +384,7 @@ public class ShipmentHeaderController extends JeecgController&lt;ShipmentHeader, IS @@ -390,6 +384,7 @@ public class ShipmentHeaderController extends JeecgController&lt;ShipmentHeader, IS
390 String warehouseCode = HuahengJwtUtil.getWarehouseCodeByToken(req); 384 String warehouseCode = HuahengJwtUtil.getWarehouseCodeByToken(req);
391 // 补充入库类型 385 // 补充入库类型
392 bean.setType(QuantityConstant.TASK_TYPE_SORTINGSHIPMENT); 386 bean.setType(QuantityConstant.TASK_TYPE_SORTINGSHIPMENT);
393 - return mobileService.callBox(bean, warehouseCode); 387 + Result result = huahengMultiHandlerService.callBox(bean, warehouseCode);
  388 + return result;
394 } 389 }
395 } 390 }
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/stocktaking/cycleCountDetail/service/impl/CycleCountDetailServiceImpl.java
@@ -227,7 +227,7 @@ public class CycleCountDetailServiceImpl extends ServiceImpl&lt;CycleCountDetailMap @@ -227,7 +227,7 @@ public class CycleCountDetailServiceImpl extends ServiceImpl&lt;CycleCountDetailMap
227 Result result = taskHeaderService.createTaskLockContainerAndLocation(QuantityConstant.TASK_TYPE_CYCLECOUNT, containerCode, fromLocationCode, toLocationCode, 227 Result result = taskHeaderService.createTaskLockContainerAndLocation(QuantityConstant.TASK_TYPE_CYCLECOUNT, containerCode, fromLocationCode, toLocationCode,
228 warehouseCode); 228 warehouseCode);
229 if (!result.isSuccess()) { 229 if (!result.isSuccess()) {
230 - return result; 230 + throw new JeecgBootException(result.getMessage());
231 } 231 }
232 TaskLockEntity taskLockEntity = (TaskLockEntity)result.getResult(); 232 TaskLockEntity taskLockEntity = (TaskLockEntity)result.getResult();
233 String zoneCode = taskLockEntity.getZoneCode(); 233 String zoneCode = taskLockEntity.getZoneCode();
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/taskHeader/service/impl/TaskHeaderServiceImpl.java
@@ -257,7 +257,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea @@ -257,7 +257,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
257 Result result = taskHeaderService.createTaskLockContainerAndLocation(QuantityConstant.TASK_TYPE_TRANSFER, containerCode, fromLocationCode, toLocationCode, 257 Result result = taskHeaderService.createTaskLockContainerAndLocation(QuantityConstant.TASK_TYPE_TRANSFER, containerCode, fromLocationCode, toLocationCode,
258 warehouseCode); 258 warehouseCode);
259 if (!result.isSuccess()) { 259 if (!result.isSuccess()) {
260 - return result; 260 + throw new JeecgBootException(result.getMessage());
261 } 261 }
262 TaskLockEntity taskLockEntity = (TaskLockEntity)result.getResult(); 262 TaskLockEntity taskLockEntity = (TaskLockEntity)result.getResult();
263 String zoneCode = taskLockEntity.getZoneCode(); 263 String zoneCode = taskLockEntity.getZoneCode();
@@ -308,7 +308,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea @@ -308,7 +308,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
308 Result result = taskHeaderService.createTaskLockContainerAndLocation(QuantityConstant.TASK_TYPE_CHECK_OUT, containerCode, fromLocationCode, toLocationCode, 308 Result result = taskHeaderService.createTaskLockContainerAndLocation(QuantityConstant.TASK_TYPE_CHECK_OUT, containerCode, fromLocationCode, toLocationCode,
309 warehouseCode); 309 warehouseCode);
310 if (!result.isSuccess()) { 310 if (!result.isSuccess()) {
311 - return result; 311 + throw new JeecgBootException(result.getMessage());
312 } 312 }
313 TaskLockEntity taskLockEntity = (TaskLockEntity)result.getResult(); 313 TaskLockEntity taskLockEntity = (TaskLockEntity)result.getResult();
314 String zoneCode = taskLockEntity.getZoneCode(); 314 String zoneCode = taskLockEntity.getZoneCode();
@@ -380,7 +380,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea @@ -380,7 +380,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
380 Result result = taskHeaderService.createTaskLockContainerAndLocation(QuantityConstant.TASK_TYPE_OVER_STATION, containerCode, QuantityConstant.EMPTY_STRING, 380 Result result = taskHeaderService.createTaskLockContainerAndLocation(QuantityConstant.TASK_TYPE_OVER_STATION, containerCode, QuantityConstant.EMPTY_STRING,
381 QuantityConstant.EMPTY_STRING, warehouseCode); 381 QuantityConstant.EMPTY_STRING, warehouseCode);
382 if (!result.isSuccess()) { 382 if (!result.isSuccess()) {
383 - return result; 383 + throw new JeecgBootException(result.getMessage());
384 } 384 }
385 TaskHeader taskHeader = new TaskHeader(); 385 TaskHeader taskHeader = new TaskHeader();
386 taskHeader.setWarehouseCode(warehouseCode); 386 taskHeader.setWarehouseCode(warehouseCode);
@@ -476,7 +476,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea @@ -476,7 +476,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
476 Result result = taskHeaderService.createTaskLockContainerAndLocation(QuantityConstant.TASK_TYPE_MANY_EMPTYRECEIPT, containerCode, 476 Result result = taskHeaderService.createTaskLockContainerAndLocation(QuantityConstant.TASK_TYPE_MANY_EMPTYRECEIPT, containerCode,
477 QuantityConstant.EMPTY_STRING, toLocationCode, warehouseCode); 477 QuantityConstant.EMPTY_STRING, toLocationCode, warehouseCode);
478 if (!result.isSuccess()) { 478 if (!result.isSuccess()) {
479 - return result; 479 + throw new JeecgBootException(result.getMessage());
480 } 480 }
481 TaskLockEntity taskLockEntity = (TaskLockEntity)result.getResult(); 481 TaskLockEntity taskLockEntity = (TaskLockEntity)result.getResult();
482 String zoneCode = taskLockEntity.getZoneCode(); 482 String zoneCode = taskLockEntity.getZoneCode();
@@ -512,7 +512,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea @@ -512,7 +512,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
512 Result result = taskHeaderService.createTaskLockContainerAndLocation(QuantityConstant.TASK_TYPE_MANY_EMPTYSHIPMENT, containerCode, 512 Result result = taskHeaderService.createTaskLockContainerAndLocation(QuantityConstant.TASK_TYPE_MANY_EMPTYSHIPMENT, containerCode,
513 QuantityConstant.EMPTY_STRING, QuantityConstant.EMPTY_STRING, warehouseCode); 513 QuantityConstant.EMPTY_STRING, QuantityConstant.EMPTY_STRING, warehouseCode);
514 if (!result.isSuccess()) { 514 if (!result.isSuccess()) {
515 - return result; 515 + throw new JeecgBootException(result.getMessage());
516 } 516 }
517 TaskLockEntity taskLockEntity = (TaskLockEntity)result.getResult(); 517 TaskLockEntity taskLockEntity = (TaskLockEntity)result.getResult();
518 String zoneCode = taskLockEntity.getZoneCode(); 518 String zoneCode = taskLockEntity.getZoneCode();
@@ -912,7 +912,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea @@ -912,7 +912,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
912 Result result = taskHeaderService.createTaskLockContainerAndLocation(QuantityConstant.TASK_TYPE_EMPTYRECEIPT, containerCode, QuantityConstant.EMPTY_STRING, 912 Result result = taskHeaderService.createTaskLockContainerAndLocation(QuantityConstant.TASK_TYPE_EMPTYRECEIPT, containerCode, QuantityConstant.EMPTY_STRING,
913 toLocationCode, warehouseCode); 913 toLocationCode, warehouseCode);
914 if (!result.isSuccess()) { 914 if (!result.isSuccess()) {
915 - return result; 915 + throw new JeecgBootException(result.getMessage());
916 } 916 }
917 TaskHeader taskHeader = new TaskHeader(); 917 TaskHeader taskHeader = new TaskHeader();
918 taskHeader.setWarehouseCode(warehouseCode); 918 taskHeader.setWarehouseCode(warehouseCode);
@@ -954,7 +954,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea @@ -954,7 +954,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
954 Result result = taskHeaderService.createTaskLockContainerAndLocation(QuantityConstant.TASK_TYPE_EMPTYSHIPMENT, containerCode, QuantityConstant.EMPTY_STRING, 954 Result result = taskHeaderService.createTaskLockContainerAndLocation(QuantityConstant.TASK_TYPE_EMPTYSHIPMENT, containerCode, QuantityConstant.EMPTY_STRING,
955 QuantityConstant.EMPTY_STRING, warehouseCode); 955 QuantityConstant.EMPTY_STRING, warehouseCode);
956 if (!result.isSuccess()) { 956 if (!result.isSuccess()) {
957 - return result; 957 + throw new JeecgBootException(result.getMessage());
958 } 958 }
959 TaskLockEntity taskLockEntity = (TaskLockEntity)result.getResult(); 959 TaskLockEntity taskLockEntity = (TaskLockEntity)result.getResult();
960 String zoneCode = taskLockEntity.getZoneCode(); 960 String zoneCode = taskLockEntity.getZoneCode();
@@ -1011,7 +1011,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea @@ -1011,7 +1011,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
1011 return Result.ok("入库任务(" + taskHeader.getId() + ")已经是完成的!"); 1011 return Result.ok("入库任务(" + taskHeader.getId() + ")已经是完成的!");
1012 } 1012 }
1013 if (taskDetailList.isEmpty()) { 1013 if (taskDetailList.isEmpty()) {
1014 - throw new JeecgBootException("入库任务明细为空"); 1014 + throw new JeecgBootException("完成入库任务时, 入库任务明细为空");
1015 } 1015 }
1016 Location toLocation = locationService.getLocationByCode(toLocationCode, warehouseCode); 1016 Location toLocation = locationService.getLocationByCode(toLocationCode, warehouseCode);
1017 if (toLocation == null) { 1017 if (toLocation == null) {
@@ -1442,6 +1442,8 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea @@ -1442,6 +1442,8 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
1442 case QuantityConstant.TASK_TYPE_OVER_STATION: 1442 case QuantityConstant.TASK_TYPE_OVER_STATION:
1443 result = taskHeaderService.createOverStationTaskLockContainer(containerCode, warehouseCode); 1443 result = taskHeaderService.createOverStationTaskLockContainer(containerCode, warehouseCode);
1444 break; 1444 break;
  1445 + default:
  1446 + throw new JeecgBootException("创建任务时,没有匹配到这种任务类型" + taskType);
1445 } 1447 }
1446 return result; 1448 return result;
1447 } 1449 }