Commit c07e5e2fd354e52513e2e2ece610cb15b705396c

Authored by 肖超群
1 parent 4300d309

修复双伸位库位 入库分配时 生成移库任务就返回 没有把库位号写到任务里的问题

huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/wcs/service/WcsServiceImpl.java
... ... @@ -253,11 +253,16 @@ public class WcsServiceImpl implements WcsService {
253 253 if (destinationLocation == null) {
254 254 throw new JeecgBootException("创建移库任务失败, 目标库位为空");
255 255 }
256   - Result result = taskHeaderService.createTransferTask(insideLocation.getCode(), destinationLocation.getCode(), warehouseCode);
  256 + Result<TaskHeader> result = taskHeaderService.createTransferTask(insideLocation.getCode(), destinationLocation.getCode(), warehouseCode);
257 257 if (!result.isSuccess()) {
258 258 throw new JeecgBootException("创建移库任务失败");
259 259 }
260   - return Result.ok("移库任务先执行");
  260 + preTaskNo = result.getResult().getId();
  261 + taskHeader.setPreTaskNo(preTaskNo);
  262 + success = taskHeaderService.updatePreTaskNoById(preTaskNo, taskHeader.getId());
  263 + if (!success) {
  264 + throw new JeecgBootException("更新任务状态失败");
  265 + }
261 266 }
262 267 } else {
263 268 Location outSideLocation = locationService.getOutSideNear(location);
... ...