Commit 2baec6f81e7a2c1ce0c8bc1b26b58c298cf40dae
1 parent
80c78307
出库任务
Showing
5 changed files
with
187 additions
and
36 deletions
src/main/java/com/huaheng/pc/task/taskDetail/domain/TaskDetail.java
... | ... | @@ -162,12 +162,6 @@ public class TaskDetail implements Serializable { |
162 | 162 | @ApiModelProperty(value="参考单号") |
163 | 163 | private String referenceCode; |
164 | 164 | |
165 | - /** | |
166 | - * 参考内部号 | |
167 | - */ | |
168 | - @TableField(value = "referenceId") | |
169 | - @ApiModelProperty(value="参考内部号") | |
170 | - private Integer referenceId; | |
171 | 165 | |
172 | 166 | /** |
173 | 167 | * 参考内部行号 |
... | ... |
src/main/java/com/huaheng/pc/task/taskHeader/service/TaskHeaderService.java
... | ... | @@ -30,4 +30,6 @@ public interface TaskHeaderService extends IService<TaskHeader>{ |
30 | 30 | AjaxResult completeCycleCountOrSeeOutTask(TaskHeader taskHeader); |
31 | 31 | |
32 | 32 | AjaxResult createReceiptTask(List<Integer> ids); |
33 | + | |
34 | + void completeShipmentTask(TaskHeader task) ; | |
33 | 35 | } |
... | ... |
src/main/java/com/huaheng/pc/task/taskHeader/service/TaskHeaderServiceImpl.java
... | ... | @@ -9,8 +9,10 @@ import com.huaheng.common.utils.StringUtils; |
9 | 9 | import com.huaheng.common.utils.security.ShiroUtils; |
10 | 10 | import com.huaheng.framework.web.domain.AjaxResult; |
11 | 11 | import com.huaheng.pc.config.container.domain.Container; |
12 | +import com.huaheng.pc.config.container.service.ContainerService; | |
12 | 13 | import com.huaheng.pc.config.location.domain.Location; |
13 | 14 | import com.huaheng.pc.config.location.service.LocationService; |
15 | +import com.huaheng.pc.config.warehouse.domain.Warehouse; | |
14 | 16 | import com.huaheng.pc.inventory.inventoryDetail.domain.InventoryDetail; |
15 | 17 | import com.huaheng.pc.inventory.inventoryDetail.service.InventoryDetailService; |
16 | 18 | import com.huaheng.pc.inventory.inventoryHeader.domain.InventoryHeader; |
... | ... | @@ -29,6 +31,7 @@ import com.huaheng.pc.shipment.shipmentContainerDetail.domain.ShipmentContainerD |
29 | 31 | import com.huaheng.pc.shipment.shipmentContainerDetail.service.ShipmentContainerDetailService; |
30 | 32 | import com.huaheng.pc.shipment.shipmentContainerHeader.domain.ShipmentContainerHeader; |
31 | 33 | import com.huaheng.pc.shipment.shipmentContainerHeader.service.ShipmentContainerHeaderService; |
34 | +import com.huaheng.pc.shipment.shipmentDetail.domain.ShipmentDetail; | |
32 | 35 | import com.huaheng.pc.task.taskDetail.domain.TaskDetail; |
33 | 36 | import com.huaheng.pc.task.taskDetail.service.TaskDetailService; |
34 | 37 | import com.huaheng.pc.task.taskHeader.domain.ShipmentTaskCreateModel; |
... | ... | @@ -36,6 +39,8 @@ import com.huaheng.pc.task.taskHeader.domain.ShipmentTaskCreateModel; |
36 | 39 | import org.springframework.beans.factory.annotation.Autowired; |
37 | 40 | import org.springframework.stereotype.Service; |
38 | 41 | import java.math.BigDecimal; |
42 | +import java.text.SimpleDateFormat; | |
43 | +import java.util.ArrayList; | |
39 | 44 | import java.util.Date; |
40 | 45 | import java.util.List; |
41 | 46 | import java.util.Map; |
... | ... | @@ -77,6 +82,11 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
77 | 82 | @Autowired |
78 | 83 | private ReceiptContainerDetailService receiptContainerDetailService; |
79 | 84 | |
85 | + | |
86 | + @Autowired | |
87 | + private ContainerService containerService; | |
88 | + | |
89 | + | |
80 | 90 | @Resource |
81 | 91 | private ReceiptContainerHeaderService receiptContainerHeaderService; |
82 | 92 | |
... | ... | @@ -197,6 +207,10 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
197 | 207 | |
198 | 208 | } |
199 | 209 | |
210 | + /** | |
211 | + * | |
212 | + * 执行任务 | |
213 | + * */ | |
200 | 214 | @Override |
201 | 215 | public AjaxResult<TaskHeader> sendTaskToWcs(Integer[] taskIds) { |
202 | 216 | TaskHeader task = null; |
... | ... | @@ -221,8 +235,6 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
221 | 235 | LambdaUpdateWrapper<TaskDetail> lambdaUpdateWrapper = Wrappers.lambdaUpdate(); |
222 | 236 | lambdaUpdateWrapper.eq(TaskDetail::getTaskId, task.getId()); |
223 | 237 | taskDetailService.update(record, lambdaUpdateWrapper); |
224 | - | |
225 | - | |
226 | 238 | // if (task.getInternalTaskType().equals("100")) |
227 | 239 | // { |
228 | 240 | // List<Map<String, Object>> maps = taskDetailService.selectListMapByEqual("billId, billDetailId", condition); |
... | ... | @@ -290,7 +302,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
290 | 302 | completeReceiptTask(task); |
291 | 303 | } |
292 | 304 | if (task.getInternalTaskType() == 300 || task.getInternalTaskType() == 400) { |
293 | -// //出库任务 | |
305 | + //出库任务 | |
294 | 306 | // completeShipmentTask(task); |
295 | 307 | } |
296 | 308 | //...其他任务类型暂时不处理 // 700 盘点 800 移库 900 出库查看 |
... | ... | @@ -312,6 +324,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
312 | 324 | } |
313 | 325 | |
314 | 326 | @Override |
327 | + @Transactional | |
315 | 328 | public AjaxResult completeReceiptTask(TaskHeader task) throws Exception { |
316 | 329 | List<Map<String, Object>> taskReceiptContainerDetail =taskHeaderMapper.getReceiptTask(task.getId()); |
317 | 330 | if (taskReceiptContainerDetail.size()<1){ |
... | ... | @@ -333,13 +346,16 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
333 | 346 | header.setWarehouseCode(DataUtils.getString(map.get("warehouseCode")));//仓库 |
334 | 347 | header.setCompanyCode(task.getCompanyCode());//货主 |
335 | 348 | header.setContainerCode(DataUtils.getString(map.get("containerCode")));//容器号 |
349 | + header.setLocationCode(task.getToLocation()); | |
336 | 350 | header.setTotalQty(DataUtils.getInteger(map.get("totalQty")));//总数量 |
337 | 351 | header.setLocking(1); |
338 | 352 | header.setEnable(1); |
339 | 353 | header.setCreatedBy(ShiroUtils.getLoginName()); |
340 | 354 | header.setCreated(new Date()); |
341 | 355 | header.setLastUpdated(new Date()); |
342 | - inventoryHeaderService.save(header); | |
356 | + if (!inventoryHeaderService.save(header)) | |
357 | + throw new ServiceException("添加库存单失败"); | |
358 | + | |
343 | 359 | //库存明细添加 |
344 | 360 | detail = new InventoryDetail(); |
345 | 361 | detail.setInventoryHeaderId(header.getId());//库存头ID |
... | ... | @@ -355,13 +371,14 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
355 | 371 | detail.setBatch(DataUtils.getString(map.get("batch")));//批次 |
356 | 372 | detail.setLot(DataUtils.getString(map.get("lot")));//批号 |
357 | 373 | detail.setInventorySts(DataUtils.getString(map.get("inventorySts")));//库存状态 |
358 | - detail.setManufactureDate(DataUtils.getDateTime(map.get("manufactureDate")));//生产日期 | |
359 | - detail.setExpirationDate(DataUtils.getDateTime(map.get("expirationDate")));//失效日期 | |
374 | + detail.setManufactureDate(new SimpleDateFormat("yyyy-MM-dd").parse(map.get("manufactureDate").toString()));//生产日期 | |
375 | + detail.setExpirationDate(new SimpleDateFormat("yyyy-MM-dd").parse(map.get("expirationDate").toString()));//失效日期 | |
360 | 376 | detail.setQty(DataUtils.getBigDecimal(map.get("qty")));//数量 |
361 | 377 | detail.setTaskQty(DataUtils.getBigDecimal(map.get("qty"))); |
362 | 378 | detail.setCreatedBy(ShiroUtils.getLoginName());//创建人 |
363 | 379 | detail.setLastUpdatedBy(ShiroUtils.getLoginName());//创建时间 |
364 | - inventoryDetailService.save(detail); | |
380 | + if (!inventoryDetailService.save(detail)) | |
381 | + throw new ServiceException("添加库存明细失败"); | |
365 | 382 | } |
366 | 383 | else |
367 | 384 | { |
... | ... | @@ -369,7 +386,9 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
369 | 386 | detail.setLastUpdatedBy(ShiroUtils.getLoginName()); |
370 | 387 | LambdaUpdateWrapper<InventoryDetail> lambdaUpdateWrapper = Wrappers.lambdaUpdate(); |
371 | 388 | lambdaUpdateWrapper.eq(InventoryDetail::getId,DataUtils.getInteger(map.get("receiptDetailId"))); |
372 | - inventoryDetailService.update(detail, lambdaUpdateWrapper); | |
389 | + if (!inventoryDetailService.update(detail, lambdaUpdateWrapper)){ | |
390 | + throw new ServiceException("更新入库单明细失败"); | |
391 | + } | |
373 | 392 | } |
374 | 393 | //记录库存交易记录 |
375 | 394 | InventoryTransaction inventoryTransaction = new InventoryTransaction(); |
... | ... | @@ -390,22 +409,23 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
390 | 409 | inventoryTransaction.setTaskQty(DataUtils.getInteger(map.get("qty"))); |
391 | 410 | inventoryTransaction.setCreated(new Date()); |
392 | 411 | inventoryTransaction.setCreatedBy(ShiroUtils.getLoginName()); |
393 | - inventoryTransactionService.save(inventoryTransaction); | |
394 | - //修改任务明细的状态为完成 | |
395 | - TaskDetail taskDetail = new TaskDetail(); | |
396 | - taskDetail.setStatus(100); | |
397 | - taskDetail.setLastUpdatedBy(ShiroUtils.getLoginName()); | |
398 | - taskDetail.setAgingDate(new Date()); //入库时间 | |
399 | - LambdaUpdateWrapper<TaskDetail> lambdaUpdateWrapper = Wrappers.lambdaUpdate(); | |
400 | - lambdaUpdateWrapper.eq(TaskDetail::getTaskId, DataUtils.getInteger(map.get("taskDetailId"))); | |
401 | - taskDetailService.update(taskDetail, lambdaUpdateWrapper); | |
402 | - //修改入库单的状态 | |
403 | - ReceiptHeader receiptHeader =new ReceiptHeader(); | |
404 | - receiptHeader.setFirstStatus(100); | |
405 | - receiptHeader.setLastStatus(100); | |
406 | - LambdaUpdateWrapper<ReceiptHeader> receiptHeaderLambdaUpdateWrapper = Wrappers.lambdaUpdate(); | |
407 | - receiptHeaderLambdaUpdateWrapper.eq(ReceiptHeader::getId, DataUtils.getInteger(map.get("receiptId"))); | |
408 | - receiptHeaderService.update(receiptHeader, receiptHeaderLambdaUpdateWrapper); | |
412 | + if (!inventoryTransactionService.save(inventoryTransaction)) | |
413 | + throw new ServiceException("新增库存记录失败"); | |
414 | +// //修改任务明细的状态为完成 | |
415 | +// TaskDetail taskDetail = new TaskDetail(); | |
416 | +// taskDetail.setStatus(100); | |
417 | +// taskDetail.setLastUpdatedBy(ShiroUtils.getLoginName()); | |
418 | +// taskDetail.setAgingDate(new Date()); //入库时间 | |
419 | +// LambdaUpdateWrapper<TaskDetail> lambdaUpdateWrapper = Wrappers.lambdaUpdate(); | |
420 | +// lambdaUpdateWrapper.eq(TaskDetail::getTaskId, DataUtils.getInteger(map.get("taskDetailId"))); | |
421 | +// taskDetailService.update(taskDetail, lambdaUpdateWrapper); | |
422 | +// //修改入库单的状态 | |
423 | +// ReceiptHeader receiptHeader =new ReceiptHeader(); | |
424 | +// receiptHeader.setFirstStatus(100); | |
425 | +// receiptHeader.setLastStatus(100); | |
426 | +// LambdaUpdateWrapper<ReceiptHeader> receiptHeaderLambdaUpdateWrapper = Wrappers.lambdaUpdate(); | |
427 | +// receiptHeaderLambdaUpdateWrapper.eq(ReceiptHeader::getId, DataUtils.getInteger(map.get("receiptId"))); | |
428 | +// receiptHeaderService.update(receiptHeader, receiptHeaderLambdaUpdateWrapper); | |
409 | 429 | |
410 | 430 | //修改任务主表状态,因为立库任务表单头只对应一个货箱,表单详情的任务会同时完成 |
411 | 431 | task.setStatus(100); |
... | ... | @@ -413,24 +433,39 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
413 | 433 | task.setLastUpdated(new Date()); |
414 | 434 | LambdaUpdateWrapper<TaskHeader> taskHeaderLambdaUpdateWrapper = Wrappers.lambdaUpdate(); |
415 | 435 | taskHeaderLambdaUpdateWrapper.eq(TaskHeader::getId, task.getId()); |
416 | - taskHeaderService.update(task, taskHeaderLambdaUpdateWrapper); | |
436 | + if (!taskHeaderService.update(task, taskHeaderLambdaUpdateWrapper)) | |
437 | + throw new ServiceException("更新任务主表失败"); | |
417 | 438 | //修改库位状态和对应的容器 |
418 | 439 | Location location =new Location(); |
419 | 440 | location.setContainerCode(task.getContainerCode()); |
420 | 441 | location.setStatus("empty"); |
421 | 442 | LambdaUpdateWrapper<Location> locationLambdaUpdateWrapper = Wrappers.lambdaUpdate(); |
422 | 443 | locationLambdaUpdateWrapper.eq(Location::getCode, task.getToLocation()); |
423 | - locationService.update(location, locationLambdaUpdateWrapper); | |
444 | + if (!locationService.update(location, locationLambdaUpdateWrapper)) | |
445 | + throw new ServiceException("更新库位失败"); | |
424 | 446 | //修改容器状态和对应的库位 |
425 | 447 | Container container =new Container(); |
426 | 448 | container.setLocationCode(task.getToLocation()); |
427 | 449 | container.setStatus("some"); |
450 | + LambdaUpdateWrapper<Container> containerLambdaUpdateWrapper = Wrappers.lambdaUpdate(); | |
451 | + containerLambdaUpdateWrapper.eq(Container::getCode,task.getContainerCode()); | |
452 | + if (!containerService.update(container, containerLambdaUpdateWrapper)) | |
453 | + throw new ServiceException("更新容器失败"); | |
454 | + | |
428 | 455 | //修改组盘表状态为20 |
429 | 456 | ReceiptContainerDetail receiptContainerDetail = new ReceiptContainerDetail(); |
430 | 457 | receiptContainerDetail.setStatus(20); |
431 | 458 | LambdaUpdateWrapper<ReceiptContainerDetail> receiptContainerDetailLambdaUpdateWrapper = Wrappers.lambdaUpdate(); |
432 | 459 | receiptContainerDetailLambdaUpdateWrapper.eq(ReceiptContainerDetail::getReceiptId,DataUtils.getInteger(map.get("receiptId"))); |
433 | 460 | receiptContainerDetailService.update(receiptContainerDetail, receiptContainerDetailLambdaUpdateWrapper); |
461 | + if (! receiptContainerDetailService.update(receiptContainerDetail, receiptContainerDetailLambdaUpdateWrapper)) | |
462 | + throw new ServiceException("更新组盘状态失败"); | |
463 | + //修改入库明细 | |
464 | + ReceiptDetail receiptDetail = receiptDetailService.queryflow(receiptDetailService.getById(receiptContainerDetail.getReceiptDetailId())); | |
465 | + if (!receiptDetailService.updateById(receiptDetail)){ | |
466 | + throw new ServiceException("更新状态失败"); | |
467 | + } | |
468 | + receiptDetailService.updateReceiptHeaderLastStatus(receiptDetail.getReceiptId()); | |
434 | 469 | } |
435 | 470 | } |
436 | 471 | return AjaxResult.success("完成入库任务"); |
... | ... | @@ -606,5 +641,125 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
606 | 641 | return AjaxResult.success("生成任务成功!"); |
607 | 642 | } |
608 | 643 | |
644 | + /** | |
645 | + * | |
646 | + * 完成出库任务 | |
647 | + * */ | |
648 | + @Override | |
649 | + public void completeShipmentTask(TaskHeader task) { | |
650 | + //获取所有子任务 | |
651 | + TaskDetail condition = new TaskDetail(); | |
652 | + condition.setTaskId(task.getId()); | |
653 | + LambdaQueryWrapper<TaskDetail> lambdaQueryWrapper = Wrappers.lambdaQuery(condition); | |
654 | + List<TaskDetail> taskDetails = taskDetailService.list(lambdaQueryWrapper); | |
655 | + List<Integer> shipmentHeadIds = new ArrayList<>(); | |
656 | +// for(TaskDetail taskDetail : taskDetails){ | |
657 | +// if(taskDetail.getStatus()<20){ | |
658 | +// //获取出库子货箱 | |
659 | +// ShipmentContainerDetail shipmentContainerDetail = shipmentContainerDetailService.selectEntityById(taskDetail.getAllocationId()); | |
660 | +// //取出子单据 | |
661 | +// ShipmentDetail shipmentDetail = shipmentDetailService.selectEntityById(taskDetail.getBillDetailId()); | |
662 | +//// //取出主单据 | |
663 | +//// ShipmentHeader shipmentHeader = shipmentHeaderService.selectEntityById(shipmentContainerDetail.getShipmentHeaderId()); | |
664 | +// //暂存id,为更新单据状态准备 | |
665 | +// shipmentHeadIds.add(taskDetail.getBillId()); | |
666 | +// //获取对应库存记录 | |
667 | +// Inventory inventory = inventoryService.selectEntityById(taskDetail.getInventoryId()); | |
668 | +// if (inventory == null) { | |
669 | +// throw new ServiceException("任务明细对应的库存ID【" + taskDetail.getInventoryId().toString() + "】不存在!"); | |
670 | +// } | |
671 | +// BigDecimal orignalQty = inventory.getQty(); | |
672 | +// //扣减库存 | |
673 | +// inventory.setTaskQty(inventory.getTaskQty().subtract(taskDetail.getQty())); | |
674 | +// inventory.setQty(inventory.getQty().subtract(taskDetail.getQty())); | |
675 | +// if(inventory.getQty().compareTo(new BigDecimal("0"))==0 && inventory.getTaskQty().compareTo(new BigDecimal("0"))==0){ | |
676 | +// //如果库存没有了,就删除这个库存 | |
677 | +// inventoryService.deleteById(inventory.getId()); | |
678 | +// }else { | |
679 | +// //否则更新这个库存 | |
680 | +// inventoryService.updateByModel(inventory); | |
681 | +// } | |
682 | +// //设置子任务状态为已执行 | |
683 | +// taskDetail.setStatus((short)100); | |
684 | +// taskDetail.setEndTime(new Date()); //完成时间 | |
685 | +// taskDetailService.updateByModel(taskDetail); | |
686 | +// //记录库存交易记录 | |
687 | +// InventoryTransaction inventoryTransaction = new InventoryTransaction(); | |
688 | +// inventoryTransaction.setWarehouseId(task.getWarehouseId()); | |
689 | +// inventoryTransaction.setWarehouseCode(task.getWarehouseCode()); | |
690 | +// inventoryTransaction.setCompanyId(shipmentDetail.getCompanyId()); | |
691 | +// inventoryTransaction.setCompanyCode(shipmentDetail.getCompanyCode()); | |
692 | +// inventoryTransaction.setLocationId(inventory.getLocationId()); | |
693 | +// inventoryTransaction.setLocationCode(inventory.getLocationCode()); | |
694 | +// inventoryTransaction.setContainerCode(inventory.getContainerCode()); | |
695 | +// inventoryTransaction.setSourceCode(shipmentDetail.getSourceCode()); | |
696 | +// inventoryTransaction.setSourceLine(shipmentDetail.getSourceLine()); | |
697 | +// inventoryTransaction.setType("shipment"); | |
698 | +// inventoryTransaction.setCompanyId(task.getCompanyId()); | |
699 | +// inventoryTransaction.setMaterialId(shipmentDetail.getMaterialId()); | |
700 | +// inventoryTransaction.setMaterialCode(shipmentDetail.getMaterialCode()); | |
701 | +// //inventory.setMaterialName(DataUtils.getString(taskDetail.getMaterialName()));//物料名称 | |
702 | +// inventoryTransaction.setBillId(taskDetail.getBillId()); | |
703 | +// inventoryTransaction.setBillCode(taskDetail.getBillCode()); | |
704 | +// inventoryTransaction.setBillDetailId(shipmentDetail.getId()); | |
705 | +// inventoryTransaction.setBatch(shipmentDetail.getBatch()); | |
706 | +// inventoryTransaction.setLot(shipmentDetail.getLot()); | |
707 | +// inventoryTransaction.setProject(shipmentDetail.getProject()); | |
708 | +// inventoryTransaction.setManufactureDate(shipmentDetail.getManufactureDate()); | |
709 | +// inventoryTransaction.setExpirationDate(shipmentDetail.getExpirationDate()); | |
710 | +// inventoryTransaction.setStatus(inventory.getStatus()); | |
711 | +// //这里取反,更符合出库的语义,同时方便对记录进行统计 | |
712 | +// inventoryTransaction.setQty(orignalQty); | |
713 | +// inventoryTransaction.setTaskQty(taskDetail.getQty().negate()); | |
714 | +//// inventoryTransaction.setCostPrice(shipmentDetail.); | |
715 | +// inventoryTransaction.setCreated(null); | |
716 | +// inventoryTransaction.setCreatedBy(ShiroUtils.getLoginName()); | |
717 | +// inventoryTransaction.setLastUpdated(null); | |
718 | +// inventoryTransaction.setLastUpdatedBy(ShiroUtils.getLoginName()); | |
719 | +// inventoryTransactionService.insert(inventoryTransaction); | |
720 | +//// //更新单据状态 | |
721 | +//// shipmentHeaderService.updateShipmentStatus(shipmentHeader.getId()); | |
722 | +// } | |
723 | +// } | |
724 | +// //设置主任务为已执行 | |
725 | +// task.setFirstStatus((short)100); | |
726 | +// task.setLastStatus((short)100); | |
727 | +// task.setLastUpdatedBy(ShiroUtils.getLoginName()); | |
728 | +// task.setEndTime(new Date()); | |
729 | +// taskService.updateByModel(task); | |
730 | +// //将库位状态改为空闲,如果是整出的对应的容器也清空 | |
731 | +// Location locationRecord = new Location(); | |
732 | +// locationRecord.setStatus("empty"); | |
733 | +// if(task.getType()==300) { | |
734 | +// locationRecord.setContainerCode(""); | |
735 | +// locationRecord.setContainerId(null); | |
736 | +// } | |
737 | +// Location locationCondition = new Location(); | |
738 | +// locationCondition.setCode(task.getSourceLocation()); | |
739 | +// locationCondition.setWarehouseId(ShiroUtils.getWarehouseId()); | |
740 | +// locationService.updateByCondition(locationRecord, locationCondition); | |
741 | +// //如果是整出,删掉这个库位上的这个托盘,否则更改托盘状态 | |
742 | +// Container containerRecord = new Container(); | |
743 | +// if(task.getType()==300) { | |
744 | +// containerService.updateLocationCodeAndStatus(task.getContainerCode(),"","empty"); | |
745 | +// } | |
746 | +// else { | |
747 | +// //查询是否存在关联的库存,入如果没有就修改容器状态为empty | |
748 | +// Inventory inventoryCondition = new Inventory(); | |
749 | +// inventoryCondition.setLocationCode(task.getSourceLocation()); | |
750 | +// inventoryCondition.setWarehouseId(ShiroUtils.getWarehouseId()); | |
751 | +// Map<String, Object> map = inventoryService.selectFirstMap("id", inventoryCondition); | |
752 | +// if (map == null) { | |
753 | +// //如果没有库存就设置为empty | |
754 | +// containerService.updateStatus(task.getContainerCode(), "empty"); | |
755 | +// } | |
756 | +// } | |
757 | +// //设置出库货箱状态为拣货任务完成 | |
758 | +// shipmentContainerHeaderService.resetStatusShipmentContainer(task.getAllocationHeadId(),(short)20); | |
759 | +// //最后更新单据状态 | |
760 | +// shipmentHeadIds.stream().distinct().forEach(t->shipmentHeaderService.updateShipmentStatus(t)); | |
761 | + | |
762 | + } | |
763 | + | |
609 | 764 | |
610 | 765 | } |
... | ... |
src/main/resources/templates/task/taskDetail/taskDetail.html
... | ... | @@ -72,12 +72,12 @@ |
72 | 72 | sortable:true |
73 | 73 | }, |
74 | 74 | { |
75 | - field : 'sourceLocation', | |
75 | + field : 'fromLocation', | |
76 | 76 | title : '源库位', |
77 | 77 | sortable:true |
78 | 78 | }, |
79 | 79 | { |
80 | - field : 'destinationLocation', | |
80 | + field : 'toLocation', | |
81 | 81 | title : '目的库位', |
82 | 82 | sortable:true |
83 | 83 | }, |
... | ... |
src/main/resources/templates/task/taskHeader/taskHeader.html
... | ... | @@ -32,7 +32,7 @@ |
32 | 32 | </li> |
33 | 33 | |
34 | 34 | <li> |
35 | - 库位编号:<input type="text" name="locationCode"/> | |
35 | + 库位编号:<input type="text" name="toLocation"/> | |
36 | 36 | </li> |
37 | 37 | <li class="time" style="height: 30px"> |
38 | 38 | <label>创建时间: </label> |
... | ... | @@ -171,7 +171,7 @@ |
171 | 171 | |
172 | 172 | }, |
173 | 173 | { |
174 | - field : 'locationCode', | |
174 | + field : 'toLocation', | |
175 | 175 | title : '库位号', |
176 | 176 | visible:true |
177 | 177 | }, |
... | ... |