Commit 4f7479a0f3ad1034aaa753be6ac8e851af8ed53d

Authored by 肖超群
1 parent fc1ae277

优化入库代码

ant-design-vue-jeecg/src/views/system/receipt/ReceiptContainerHeaderList.vue
... ... @@ -158,6 +158,10 @@ export default {
158 158 return {
159 159 description: '入库组盘管理页面',
160 160 querySource: {},
  161 + isorter: {
  162 + column: 'status',
  163 + order: 'asc',
  164 + },
161 165 // 表头
162 166 columns: [
163 167 {
... ...
ant-design-vue-jeecg/src/views/system/task/ReceiptTaskHeaderList.vue
... ... @@ -188,8 +188,8 @@ export default {
188 188 description: '任务表管理页面',
189 189 zoneList: [],
190 190 isorter: {
191   - column: 'id',
192   - order: 'desc',
  191 + column: 'status',
  192 + order: 'asc',
193 193 },
194 194 // 表头
195 195 columns: [
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/container/service/IContainerService.java
... ... @@ -30,10 +30,5 @@ public interface IContainerService extends IService<Container> {
30 30  
31 31 List<Container> getContainerListByStatus(String status, String warehouseCode);
32 32  
33   - /**
34   - * 判断系统是否已经有同样的库位号,如果有证明数据混乱了
35   - */
36   - boolean havaLocationCodeByContainer(String locationCode, String containerCode, String warehouseCode);
37   -
38 33 List<Container> getContainerListByCodeList(List<String> containerCodeList, String warehouseCode);
39 34 }
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/container/service/impl/ContainerServiceImpl.java
... ... @@ -13,10 +13,8 @@ import org.jeecg.modules.wms.config.container.entity.Container;
13 13 import org.jeecg.modules.wms.config.container.mapper.ContainerMapper;
14 14 import org.jeecg.modules.wms.config.container.service.IContainerService;
15 15 import org.jeecg.modules.wms.config.containerType.service.IContainerTypeService;
16   -import org.jeecg.utils.StringUtils;
17 16 import org.jeecg.utils.constant.QuantityConstant;
18 17 import org.springframework.stereotype.Service;
19   -import org.springframework.transaction.annotation.Transactional;
20 18  
21 19 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
22 20 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
... ... @@ -38,7 +36,6 @@ public class ContainerServiceImpl extends ServiceImpl&lt;ContainerMapper, Container
38 36 ContainerMapper containerMapper;
39 37  
40 38 @Override
41   - @Transactional
42 39 public Result batchAddContainers(Container container, int number) {
43 40 String containerTypeCode = container.getContainerTypeCode();
44 41 String warehouseCode = container.getWarehouseCode();
... ... @@ -117,18 +114,6 @@ public class ContainerServiceImpl extends ServiceImpl&lt;ContainerMapper, Container
117 114 }
118 115  
119 116 @Override
120   - public boolean havaLocationCodeByContainer(String locationCode, String containerCode, String warehouseCode) {
121   - LambdaQueryWrapper<Container> containerLambdaQueryWrapper = Wrappers.lambdaQuery();
122   - containerLambdaQueryWrapper.eq(Container::getLocationCode, locationCode).ne(Container::getCode, containerCode).eq(Container::getWarehouseCode,
123   - warehouseCode);
124   - Container container = getOne(containerLambdaQueryWrapper);
125   - if (container == null) {
126   - return false;
127   - }
128   - return true;
129   - }
130   -
131   - @Override
132 117 public List<Container> getContainerListByCodeList(List<String> containerCodeList, String warehouseCode) {
133 118 LambdaQueryWrapper<Container> containerLambdaQueryWrapper = Wrappers.lambdaQuery();
134 119 containerLambdaQueryWrapper.in(Container::getCode, containerCodeList).eq(Container::getWarehouseCode, warehouseCode);
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiptContainerHeader/service/impl/ReceiptContainerHeaderServiceImpl.java
... ... @@ -154,11 +154,6 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl&lt;ReceiptContai
154 154 if (receiptContainerStatus != QuantityConstant.RECEIPT_CONTAINER_BUILD) {
155 155 throw new JeecgBootException("入库组盘状态不是创建状态");
156 156 }
157   - receiptContainerHeader.setStatus(QuantityConstant.RECEIPT_CONTAINER_TASK);
158   - success = receiptContainerHeaderService.updateById(receiptContainerHeader);
159   - if (!success) {
160   - throw new JeecgBootException("更新入库组盘头状态失败");
161   - }
162 157 String containerFillStatus = QuantityConstant.STATUS_CONTAINER_FILL_SOME;
163 158 if (!StringUtils.isEmpty(receiptContainerHeader.getContainerFillStatus())) {
164 159 containerFillStatus = receiptContainerHeader.getContainerFillStatus();
... ... @@ -206,6 +201,8 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl&lt;ReceiptContai
206 201 if (receiptDetail == null) {
207 202 throw new JeecgBootException("根据id:" + receiptContainerDetail.getReceiptDetailId() + ",没有找到入库单详情");
208 203 }
  204 + receiptDetail = new ReceiptDetail();
  205 + receiptDetail.setReceiptId(receiptContainerDetail.getReceiptDetailId());
209 206 receiptDetail.setStatus(QuantityConstant.RECEIPT_HEADER_WAIT_SHELF);
210 207 receiptDetailList.add(receiptDetail);
211 208 }
... ... @@ -213,17 +210,19 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl&lt;ReceiptContai
213 210 if (!success) {
214 211 throw new JeecgBootException("任务详情生成失败");
215 212 }
216   - receiptContainerHeader.setStatus(QuantityConstant.RECEIPT_CONTAINER_TASK);
217   - success = this.updateById(receiptContainerHeader);
218   - if (!success) {
219   - throw new JeecgBootException("生成任务时,更新入库组盘头失败");
220   - }
221 213 if (receiptContainerHeader.getTaskType() == QuantityConstant.TASK_TYPE_SUPPLEMENTRECEIPT) {
222 214 success = inventoryHeaderService.updateInventoryContainerStatusByContainerCode(containerCode, warehouseCode);
223 215 if (!success) {
224 216 throw new JeecgBootException("生成任务时, 更新库存头失败");
225 217 }
226 218 }
  219 + ReceiptContainerHeader receiptContainerHeader1 = new ReceiptContainerHeader();
  220 + receiptContainerHeader1.setId(receiptContainerHeader.getId());
  221 + receiptContainerHeader1.setStatus(QuantityConstant.RECEIPT_CONTAINER_TASK);
  222 + success = this.updateById(receiptContainerHeader1);
  223 + if (!success) {
  224 + throw new JeecgBootException("生成任务时,更新入库组盘头失败");
  225 + }
227 226 success = receiptDetailService.updateBatchById(receiptDetailList);
228 227 if (!success) {
229 228 throw new JeecgBootException("更新入库单明细失败");
... ... @@ -249,6 +248,8 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl&lt;ReceiptContai
249 248 if (receiptContainerHeader == null) {
250 249 return false;
251 250 }
  251 + receiptContainerHeader = new ReceiptContainerHeader();
  252 + receiptContainerHeader.setId(id);
252 253 receiptContainerHeader.setStatus(status);
253 254 boolean success = updateById(receiptContainerHeader);
254 255 return success;
... ... @@ -320,6 +321,8 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl&lt;ReceiptContai
320 321 if (receiptContainerStatus != QuantityConstant.RECEIPT_CONTAINER_TASK) {
321 322 throw new JeecgBootException("取消入库任务时, 任务状态不为生成任务状态");
322 323 }
  324 + receiptContainerHeader = new ReceiptContainerHeader();
  325 + receiptContainerHeader.setId(taskHeader.getReceiptContainerHeaderId());
323 326 receiptContainerHeader.setStatus(QuantityConstant.RECEIPT_CONTAINER_BUILD);
324 327 // 取消任务后,不指定组盘库位
325 328 receiptContainerHeader.setToLocationCode(QuantityConstant.EMPTY_STRING);
... ... @@ -336,6 +339,8 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl&lt;ReceiptContai
336 339 if (receiptDetail == null) {
337 340 throw new JeecgBootException("取消入库任务时, 没有找到入库单详情" + receiptContainerDetail.getReceiptDetailId());
338 341 }
  342 + receiptDetail = new ReceiptDetail();
  343 + receiptDetail.setId(receiptContainerDetail.getReceiptDetailId());
339 344 receiptDetail.setStatus(QuantityConstant.RECEIPT_HEADER_RECEIVING);
340 345 receiptDetailList.add(receiptDetail);
341 346 }
... ... @@ -373,10 +378,15 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl&lt;ReceiptContai
373 378 List<ReceiptContainerDetail> receiptContainerDetailList = receiptContainerDetailService.getReceiptContainerDetailListByHeaderId(id);
374 379 List<ReceiptDetail> receiptDetailList = new ArrayList<ReceiptDetail>();
375 380 for (ReceiptContainerDetail receiptContainerDetail : receiptContainerDetailList) {
  381 + if (receiptContainerDetail == null) {
  382 + throw new JeecgBootException("取消组盘失败, 没有找到入库组盘详情");
  383 + }
376 384 ReceiptDetail receiptDetail = receiptDetailService.getById(receiptContainerDetail.getReceiptDetailId());
377 385 if (receiptDetail == null) {
378   - throw new JeecgBootException("取消组盘失败, 没有找到入库组盘详情,入库详情ID:" + receiptContainerDetail.getReceiptDetailId());
  386 + throw new JeecgBootException("取消组盘失败, 没有找到入库详情ID:" + receiptContainerDetail.getReceiptDetailId());
379 387 }
  388 + receiptDetail = new ReceiptDetail();
  389 + receiptDetail.setId(receiptContainerDetail.getReceiptDetailId());
380 390 receiptDetail.setStatus(QuantityConstant.RECEIPT_HEADER_BUILD);
381 391 receiptDetail.setTaskQty(receiptDetail.getTaskQty().subtract(receiptContainerDetail.getQty()));
382 392 if (!receiptDetailService.updateById(receiptDetail)) {
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiptHeader/service/impl/ReceiptHeaderServiceImpl.java
... ... @@ -152,7 +152,7 @@ public class ReceiptHeaderServiceImpl extends ServiceImpl&lt;ReceiptHeaderMapper, R
152 152 * @return
153 153 */
154 154 @Override
155   - @Transactional
  155 + @Transactional(rollbackFor = Exception.class)
156 156 @OperationLog(bizId = "#receiptHeader.getCode()", bizType = "'入库单追踪'", tag = "'入库单完成'",
157 157 msg = "'上游单号:'+ #receiptHeader.getReferCode() + ',仓库编码:' + #receiptHeader.getWarehouseCode()", condition = "#minStatus == 800", recordReturnValue = true)
158 158 public boolean updateReceiptHeaderStatus(Integer id) {
... ... @@ -181,10 +181,12 @@ public class ReceiptHeaderServiceImpl extends ServiceImpl&lt;ReceiptHeaderMapper, R
181 181 }
182 182 }
183 183 }
  184 + receiptHeader = new ReceiptHeader();
  185 + receiptHeader.setId(id);
184 186 receiptHeader.setFirstStatus(maxStatus);
185 187 receiptHeader.setLastStatus(minStatus);
186 188 if (!receiptHeaderService.updateById(receiptHeader)) {
187   - throw new JeecgBootException("更新入库单:" + receiptHeader.getCode() + " 头状态失败");
  189 + throw new JeecgBootException("更新入库单:" + id + " 状态失败");
188 190 }
189 191 LogRecordContext.putVariable("minStatus", minStatus);
190 192 LogRecordContext.putVariable("receiptHeader", receiptHeader);
... ... @@ -206,6 +208,8 @@ public class ReceiptHeaderServiceImpl extends ServiceImpl&lt;ReceiptHeaderMapper, R
206 208 totalLines++;
207 209 totalQty = totalQty.add(receiptDetail.getQty());
208 210 }
  211 + receiptHeader = new ReceiptHeader();
  212 + receiptHeader.setId(id);
209 213 receiptHeader.setTotalqty(totalQty);
210 214 receiptHeader.setTotallines(totalLines);
211 215 if (!receiptHeaderService.updateById(receiptHeader)) {
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiving/service/impl/ReceiveServiceImpl.java
... ... @@ -7,6 +7,7 @@ import java.util.List;
7 7 import javax.annotation.Resource;
8 8  
9 9 import org.jeecg.common.api.vo.Result;
  10 +import org.jeecg.common.exception.JeecgBootException;
10 11 import org.jeecg.modules.wms.config.container.entity.Container;
11 12 import org.jeecg.modules.wms.config.container.service.IContainerService;
12 13 import org.jeecg.modules.wms.config.containerType.entity.ContainerType;
... ... @@ -33,7 +34,6 @@ import org.springframework.transaction.annotation.Transactional;
33 34 import org.springframework.util.CollectionUtils;
34 35  
35 36 import com.alibaba.fastjson.JSON;
36   -import org.jeecg.common.exception.JeecgBootException;
37 37 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
38 38 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
39 39 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
... ... @@ -70,6 +70,8 @@ public class ReceiveServiceImpl extends ServiceImpl&lt;ReceiveMapper, Receive&gt; impl
70 70  
71 71 @Resource
72 72 private IParameterConfigurationService parameterConfigurationService;
  73 + @Resource
  74 + private IReceiveService receiveService;
73 75  
74 76 /**
75 77 * 组盘后自动生成任务,返回任务实体
... ... @@ -80,7 +82,7 @@ public class ReceiveServiceImpl extends ServiceImpl&lt;ReceiveMapper, Receive&gt; impl
80 82 @Override
81 83 @Transactional(rollbackFor = JeecgBootException.class)
82 84 public Result<TaskHeader> receivingAndCreateTask(List<Receive> receiveList, String warehouseCode) {
83   - Result<ReceiptContainerHeader> result = receiving(receiveList, warehouseCode);
  85 + Result<ReceiptContainerHeader> result = receiveService.receiving(receiveList, warehouseCode);
84 86 if (result.isSuccess()) {
85 87 return receiptContainerHeaderService.createReceiptTask(result.getResult(), warehouseCode);
86 88 } else {
... ... @@ -104,31 +106,31 @@ public class ReceiveServiceImpl extends ServiceImpl&lt;ReceiveMapper, Receive&gt; impl
104 106 public Result<ReceiptContainerHeader> receiving(List<Receive> receiveList, String warehouseCode) {
105 107 boolean result = false;
106 108 if (receiveList == null || receiveList.size() == 0) {
107   - return Result.error("收货信息为空");
  109 + return Result.error("入库组盘,收货信息为空");
108 110 }
109 111 String containerCode = receiveList.get(0).getContainerCode();
110 112 if (StringUtils.isEmpty(containerCode)) {
111   - return Result.error("容器编码为空");
  113 + return Result.error("入库组盘,容器编码为空");
112 114 }
113 115 Container container = containerService.getContainerByCode(containerCode, warehouseCode);
114 116 if (container == null) {
115   - return Result.error("根据容器编码 " + containerCode + ", 没有找到容器");
  117 + return Result.error("入库组盘,根据容器编码 " + containerCode + ", 没有找到容器");
116 118 }
117 119 String containerStatus = container.getStatus();
118 120 if (containerStatus.equals(QuantityConstant.STATUS_CONTAINER_LOCK)) {
119   - return Result.error("容器被锁定,不能用于收货");
  121 + return Result.error("入库组盘,容器被锁定不能用于收货" + containerCode);
120 122 }
121 123 String containerFillStatus = container.getFillStatus();
122 124 if (!StringUtils.isEmpty(containerFillStatus) && containerFillStatus.equals(QuantityConstant.STATUS_CONTAINER_FILL_FULL)) {
123   - return Result.error("容器已经是满盘,不能用于收货");
  125 + return Result.error("入库组盘,容器已经是满盘不能用于收货" + containerCode);
124 126 }
125 127 String containerTypeCode = container.getContainerTypeCode();
126 128 if (StringUtils.isEmpty(containerTypeCode)) {
127   - return Result.error("容器类型编码为空");
  129 + return Result.error("入库组盘,容器类型编码为空" + containerCode);
128 130 }
129 131 ContainerType containerType = containerTypeService.getContainerTypeByCode(containerTypeCode, warehouseCode);
130 132 if (containerType == null) {
131   - return Result.error("容器类型为空");
  133 + return Result.error("入库组盘,容器类型为空" + containerCode);
132 134 }
133 135 int taskType = QuantityConstant.TASK_TYPE_WHOLERECEIPT;
134 136 String fromLocationCode = container.getLocationCode();
... ... @@ -138,7 +140,7 @@ public class ReceiveServiceImpl extends ServiceImpl&lt;ReceiveMapper, Receive&gt; impl
138 140 ReceiptContainerHeader receiptContainerHeader = receiptContainerHeaderService.getUnCompleteReceiptContainerByCode(containerCode, warehouseCode);
139 141 if (receiptContainerHeader != null) {
140 142 if (receiptContainerHeader.getStatus() >= QuantityConstant.RECEIPT_CONTAINER_TASK) {
141   - throw new JeecgBootException("容器已经生成任务,不能放物料了!");
  143 + throw new JeecgBootException("入库组盘,容器已经生成任务,不能放物料了!");
142 144 }
143 145 } else {
144 146 receiptContainerHeader = new ReceiptContainerHeader();
... ... @@ -157,7 +159,7 @@ public class ReceiveServiceImpl extends ServiceImpl&lt;ReceiveMapper, Receive&gt; impl
157 159 }
158 160 result = receiptContainerHeaderService.save(receiptContainerHeader);
159 161 if (!result) {
160   - throw new JeecgBootException("保存入库组盘头失败");
  162 + throw new JeecgBootException("入库组盘,保存入库组盘头失败");
161 163 }
162 164 }
163 165 List<ReceiptDetail> receiptDetailList = new ArrayList<>();
... ... @@ -168,10 +170,10 @@ public class ReceiveServiceImpl extends ServiceImpl&lt;ReceiveMapper, Receive&gt; impl
168 170 // 收货数量
169 171 BigDecimal taskQty = receive.getTaskQty();
170 172 if (qty == null || taskQty == null) {
171   - throw new JeecgBootException("物料编码:" + receive.getMaterialCode() + " 收货数量或可收数量为空");
  173 + throw new JeecgBootException("入库组盘,物料编码:" + receive.getMaterialCode() + " 收货数量或可收数量为空");
172 174 }
173 175 if (taskQty.compareTo(qty) > 0) {
174   - throw new JeecgBootException("物料编码:" + receive.getMaterialCode() + " 收货数量不能大于可收数量,收货数量:" + taskQty + "可收数量:" + qty);
  176 + throw new JeecgBootException("入库组盘,物料编码:" + receive.getMaterialCode() + " 收货数量不能大于可收数量,收货数量:" + taskQty + "可收数量:" + qty);
175 177 }
176 178 // 入库单明细为0 跳过组盘
177 179 if (taskQty.compareTo(BigDecimal.ZERO) <= 0) {
... ... @@ -179,31 +181,35 @@ public class ReceiveServiceImpl extends ServiceImpl&lt;ReceiveMapper, Receive&gt; impl
179 181 }
180 182 ReceiptDetail receiptDetail = receiptDetailService.getById(receive.getId());
181 183 if (receiptDetail == null) {
182   - throw new JeecgBootException("没有找到入库单详情ID:" + receive.getId());
  184 + throw new JeecgBootException("入库组盘,没有找到入库单详情ID:" + receive.getId());
183 185 }
184 186 ReceiptHeader receiptHeader = receiptHeaderService.getById(receiptDetail.getReceiptId());
185 187 if (receiptHeader == null) {
186   - throw new JeecgBootException("没有找到入库单ID:" + receiptDetail.getReceiptId());
  188 + throw new JeecgBootException("入库组盘,没有找到入库单ID:" + receiptDetail.getReceiptId());
187 189 }
188 190 if (!receiptHeader.getWarehouseCode().equals(warehouseCode)) {
189   - throw new JeecgBootException("入库单操作仓库错误,请选择 " + receiptHeader.getWarehouseCode() + " 操作");
  191 + throw new JeecgBootException("入库组盘,入库单操作仓库错误,请选择 " + receiptHeader.getWarehouseCode() + " 操作");
190 192 }
191 193 String materialCode = receiptDetail.getMaterialCode();
192 194 if (StringUtils.isEmpty(materialCode)) {
193   - throw new JeecgBootException("物料编码为空");
  195 + throw new JeecgBootException("入库组盘,物料编码为空");
194 196 }
195 197 Material material = materialService.getMaterialByCode(materialCode);
196 198 if (material == null) {
197   - throw new JeecgBootException(materialCode + "物料不存在");
  199 + throw new JeecgBootException("入库组盘," + materialCode + "物料不存在");
198 200 }
199 201 BigDecimal receiptQty = receiptDetail.getQty();
200 202 BigDecimal receiptTaskQty = receiptDetail.getTaskQty();
201 203 receiptTaskQty = receiptTaskQty.add(taskQty);
202 204 if (receiptTaskQty.compareTo(receiptQty) > 0) {
203   - throw new JeecgBootException("收货数量不能大于单据数量");
  205 + throw new JeecgBootException("入库组盘,收货数量不能大于单据数量");
204 206 }
  207 +
205 208 receiptDetail.setTaskQty(receiptTaskQty);
206   - receiptDetailList.add(receiptDetail);
  209 + ReceiptDetail receiptDetail1 = new ReceiptDetail();
  210 + receiptDetail1.setId(receiptDetail.getId());
  211 + receiptDetail1.setTaskQty(receiptTaskQty);
  212 + receiptDetailList.add(receiptDetail1);
207 213  
208 214 LambdaQueryWrapper<ReceiptContainerDetail> receiptContainerDetailLambdaQueryWrapper = Wrappers.lambdaQuery();
209 215 receiptContainerDetailLambdaQueryWrapper.eq(ReceiptContainerDetail::getReceiptId, receiptDetail.getReceiptId())
... ... @@ -212,8 +218,12 @@ public class ReceiveServiceImpl extends ServiceImpl&lt;ReceiveMapper, Receive&gt; impl
212 218 ReceiptContainerDetail receiptContainerDetail = receiptContainerDetailService.getOne(receiptContainerDetailLambdaQueryWrapper);
213 219 if (receiptContainerDetail != null) {
214 220 // 如果是已经组过的详情,那么直接相加收货数量
215   - receiptContainerDetail.setQty(receiptContainerDetail.getQty().add(taskQty));
216   - receiptContainerDetailService.updateById(receiptContainerDetail);
  221 + ReceiptContainerDetail receiptContainerDetail1 = new ReceiptContainerDetail();
  222 + receiptContainerDetail1.setId(receiptContainerDetail.getId());
  223 + receiptContainerDetail1.setQty(receiptContainerDetail.getQty().add(taskQty));
  224 + if (!receiptContainerDetailService.updateById(receiptContainerDetail1)) {
  225 + throw new JeecgBootException("入库组盘, 更新入库组盘明细失败");
  226 + }
217 227 } else {
218 228 receiptContainerDetail = new ReceiptContainerDetail();
219 229 receiptContainerDetail.setCompanyCode(receiptDetail.getCompanyCode());
... ... @@ -238,16 +248,16 @@ public class ReceiveServiceImpl extends ServiceImpl&lt;ReceiveMapper, Receive&gt; impl
238 248 }
239 249 }
240 250 if (CollectionUtils.isEmpty(receiptDetailList)) {
241   - throw new JeecgBootException("请填入收货数量");
  251 + throw new JeecgBootException("入库组盘,请填入收货数量");
242 252 }
243 253 result = receiptDetailService.updateBatchById(receiptDetailList);
244 254 if (!result) {
245   - throw new JeecgBootException("批量更新入库单详情失败");
  255 + throw new JeecgBootException("入库组盘,批量更新入库单详情失败");
246 256 }
247 257 if (receiptContainerDetailList.size() > 0) {
248 258 result = receiptContainerDetailService.saveBatch(receiptContainerDetailList);
249 259 if (!result) {
250   - throw new JeecgBootException("保存入库组盘详情失败");
  260 + throw new JeecgBootException("入库组盘,保存入库组盘详情失败");
251 261 }
252 262 }
253 263 LogRecordContext.putVariable("extraJsonString", JSON.toJSONString(receiptContainerDetailList));
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/taskHeader/service/impl/TaskHeaderServiceImpl.java
... ... @@ -2264,7 +2264,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
2264 2264 }
2265 2265 }
2266 2266 if (StringUtils.isNotEmpty(toLocationCode)) {
2267   - if (StringUtils.isNotEmpty(fromLocationCode) && !toLocationCode.equals(fromLocationCode)) {
  2267 + if (!toLocationCode.equals(fromLocationCode)) {
2268 2268 success = locationService.updateStatus(toLocationCode, QuantityConstant.STATUS_LOCATION_EMPTY, warehouseCode);
2269 2269 if (!success) {
2270 2270 throw new JeecgBootException("取消任务时, 更新目标库位状态失败");
... ... @@ -2283,21 +2283,9 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
2283 2283 throw new JeecgBootException("取消任务时, 更新库存成功");
2284 2284 }
2285 2285 }
2286   -// String lastStatus = container.getLastStatus();
2287   -// if (StringUtils.isNotEmpty(lastStatus)) {
2288   -// container.setStatus(lastStatus); // 解决空托盘组移库问题
2289   -// }
2290   -// if (StringUtils.isNotEmpty(fromLocationCode)) {
2291   -// success = containerService.havaLocationCodeByContainer(fromLocationCode, warehouseCode);
2292   -// if (success) {
2293   -// throw new JeecgBootException("库位表已经存在这个容器编码,不能再写入");
2294   -// }
2295   -// }
2296   -// container.setLastStatus(QuantityConstant.EMPTY_STRING);
2297   -// container.setLocationCode(fromLocationCode);
2298 2286 success = containerService.updateStatus(containerCode, QuantityConstant.STATUS_CONTAINER_EMPTY, warehouseCode);
2299 2287 if (!success) {
2300   - throw new JeecgBootException("取消任务时, 更新容器失败");
  2288 + throw new JeecgBootException("取消任务时, 更新容器失败" + containerCode);
2301 2289 }
2302 2290 return Result.ok("取消任务成功");
2303 2291 }
... ...
huaheng-wms-core/src/main/resources/application.yml
... ... @@ -2,10 +2,10 @@ spring:
2 2 application:
3 3 name: huaheng-wms-core
4 4 profiles:
5   - active: dev
  5 + active: test
6 6  
7 7 huaheng:
8 8 system:
9 9 verson: '@project.version@'
10 10 artifactId: '@project.artifactId@'
11   - checkSystemActivationCode: false
12 11 \ No newline at end of file
  12 + checkSystemActivationCode: false
... ...