Commit 96ec129a6e06a257d43d1962a62d4ea97aef9296
1 parent
81c85405
绩效考核报表调整:查询历史任务表
Showing
11 changed files
with
184 additions
and
149 deletions
ant-design-vue-jeecg/src/views/system/report/ReportPerformanceAssessmentList.vue
... | ... | @@ -26,7 +26,7 @@ |
26 | 26 | size="middle" |
27 | 27 | :scroll="{x:true}" |
28 | 28 | bordered |
29 | - rowKey="id" | |
29 | + rowKey="userName" | |
30 | 30 | :columns="columns" |
31 | 31 | :dataSource="dataSource" |
32 | 32 | :pagination="ipagination" |
... | ... | @@ -55,12 +55,12 @@ import {JeecgListMixin} from '@/mixins/JeecgListMixin' |
55 | 55 | import {getMaterialTypeList, getZoneList} from '@/api/api' |
56 | 56 | |
57 | 57 | export default { |
58 | - name: 'ReportInventoryClassificationList', | |
58 | + name: 'ReportPerformanceAssessmentList', | |
59 | 59 | mixins: [JeecgListMixin, mixinDevice], |
60 | 60 | components: {}, |
61 | 61 | data() { |
62 | 62 | return { |
63 | - description: '库存分类报表页面', | |
63 | + description: '绩效考核报表页面', | |
64 | 64 | zoneList: [], |
65 | 65 | zoneOptions: [], |
66 | 66 | materialTypeList: [], |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/report/controller/ReportController.java
... | ... | @@ -36,6 +36,7 @@ import org.jeecg.modules.wms.report.dto.ReportInventoryClassificationDto; |
36 | 36 | import org.jeecg.modules.wms.report.dto.ReportPerformanceAssessmentDto; |
37 | 37 | import org.jeecg.modules.wms.stocktaking.cycleCountDetail.service.ICycleCountDetailChildService; |
38 | 38 | import org.jeecg.modules.wms.task.taskHeader.service.ITaskHeaderService; |
39 | +import org.jeecg.modules.wms.task.taskHeaderHistory.service.ITaskHeaderHistoryService; | |
39 | 40 | import org.jeecg.utils.HuahengJwtUtil; |
40 | 41 | import org.jeecg.utils.StringUtils; |
41 | 42 | import org.jeecg.utils.constant.QuantityConstant; |
... | ... | @@ -67,7 +68,7 @@ public class ReportController extends JeecgController<InventoryTransaction, IInv |
67 | 68 | @Resource |
68 | 69 | private IMaterialService materialService; |
69 | 70 | @Resource |
70 | - private ITaskHeaderService taskHeaderService; | |
71 | + private ITaskHeaderHistoryService taskHeaderHistoryService; | |
71 | 72 | @Resource |
72 | 73 | private ILocationService locationService; |
73 | 74 | @Resource |
... | ... | @@ -230,7 +231,7 @@ public class ReportController extends JeecgController<InventoryTransaction, IInv |
230 | 231 | @GetMapping(value = "/listPerformanceAssessment") |
231 | 232 | public Result listPerformanceAssessment(String realName, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, |
232 | 233 | @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) { |
233 | - List<ReportPerformanceAssessmentDto> performanceAssessmentReportList = taskHeaderService.getPerformanceAssessmentReport(realName); | |
234 | + List<ReportPerformanceAssessmentDto> performanceAssessmentReportList = taskHeaderHistoryService.getPerformanceAssessmentReport(realName); | |
234 | 235 | Page<ReportPerformanceAssessmentDto> page = new Page<>(pageNo, pageSize); |
235 | 236 | page.setRecords(performanceAssessmentReportList); |
236 | 237 | return Result.OK(page); |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/report/dto/ReportPerformanceAssessmentDto.java
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/taskHeader/mapper/TaskHeaderMapper.java
... | ... | @@ -15,10 +15,4 @@ import org.jeecg.modules.wms.task.taskHeader.entity.TaskHeader; |
15 | 15 | */ |
16 | 16 | public interface TaskHeaderMapper extends BaseMapper<TaskHeader> { |
17 | 17 | |
18 | - /** | |
19 | - * 绩效考核报表查询 | |
20 | - * @param realName 用户姓名 | |
21 | - * @return 绩效考核报表信息 | |
22 | - */ | |
23 | - List<ReportPerformanceAssessmentDto> selectPerformanceAssessment(@Param("realName") String realName); | |
24 | 18 | } |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/taskHeader/mapper/xml/TaskHeaderMapper.xml
... | ... | @@ -2,18 +2,4 @@ |
2 | 2 | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
3 | 3 | <mapper namespace="org.jeecg.modules.wms.task.taskHeader.mapper.TaskHeaderMapper"> |
4 | 4 | |
5 | - <select id="selectPerformanceAssessment" | |
6 | - resultType="org.jeecg.modules.wms.report.dto.ReportPerformanceAssessmentDto"> | |
7 | - SELECT sys_user.realname, | |
8 | - COUNT(task_header.create_by) AS sumTaskQty, | |
9 | - COUNT(IF((task_header.task_type = 100 OR task_header.task_type = 200 OR task_header.task_type = 500), task_header.create_by, NULL)) AS receiptTaskQty, | |
10 | - COUNT(IF((task_header.task_type = 300 OR task_header.task_type = 400 OR task_header.task_type = 600), task_header.create_by, NULL)) AS shipmentTaskQty | |
11 | - FROM sys_user | |
12 | - LEFT JOIN task_header ON sys_user.realname = task_header.create_by | |
13 | - <if test="realName != null and realName != ''"> | |
14 | - <bind name="realName" value="'%' + realName + '%'"/> | |
15 | - WHERE sys_user.realname LIKE #{realName} | |
16 | - </if> | |
17 | - GROUP BY sys_user.realname | |
18 | - </select> | |
19 | 5 | </mapper> |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/taskHeader/service/ITaskHeaderService.java
... | ... | @@ -454,11 +454,4 @@ public interface ITaskHeaderService extends IService<TaskHeader> { |
454 | 454 | List<String> findCommonData(List<String> dataList1, List<String> dataList2, boolean flag); |
455 | 455 | |
456 | 456 | boolean delMain (Integer id); |
457 | - | |
458 | - /** | |
459 | - * 绩效考核报表查询 | |
460 | - * @param realName 用户姓名 | |
461 | - * @return 绩效考核报表信息 | |
462 | - */ | |
463 | - List<ReportPerformanceAssessmentDto> getPerformanceAssessmentReport(String realName); | |
464 | 457 | } |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/taskHeader/service/impl/TaskHeaderServiceImpl.java
1 | 1 | package org.jeecg.modules.wms.task.taskHeader.service.impl; |
2 | 2 | |
3 | -import java.io.Serializable; | |
4 | -import java.math.BigDecimal; | |
5 | -import java.util.*; | |
6 | -import java.util.stream.Collectors; | |
7 | - | |
8 | -import javax.annotation.Resource; | |
9 | - | |
3 | +import cn.hutool.core.collection.ListUtil; | |
4 | +import cn.monitor4all.logRecord.annotation.OperationLog; | |
5 | +import cn.monitor4all.logRecord.context.LogRecordContext; | |
6 | +import com.alibaba.fastjson.JSON; | |
7 | +import com.aliyun.oss.ServiceException; | |
8 | +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |
9 | +import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; | |
10 | +import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; | |
11 | +import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |
12 | +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | |
13 | +import lombok.extern.slf4j.Slf4j; | |
10 | 14 | import org.jeecg.common.api.vo.Result; |
11 | 15 | import org.jeecg.common.exception.JeecgBootException; |
12 | 16 | import org.jeecg.modules.wms.api.wcs.service.LocationAllocationService; |
... | ... | @@ -75,23 +79,17 @@ import org.springframework.beans.factory.annotation.Autowired; |
75 | 79 | import org.springframework.stereotype.Service; |
76 | 80 | import org.springframework.transaction.annotation.Transactional; |
77 | 81 | |
78 | -import com.alibaba.fastjson.JSON; | |
79 | -import com.aliyun.oss.ServiceException; | |
80 | -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |
81 | -import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; | |
82 | -import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; | |
83 | -import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |
84 | -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | |
85 | - | |
86 | -import cn.monitor4all.logRecord.annotation.OperationLog; | |
87 | -import cn.monitor4all.logRecord.context.LogRecordContext; | |
88 | -import lombok.extern.slf4j.Slf4j; | |
82 | +import javax.annotation.Resource; | |
83 | +import java.io.Serializable; | |
84 | +import java.math.BigDecimal; | |
85 | +import java.util.*; | |
86 | +import java.util.stream.Collectors; | |
89 | 87 | |
90 | 88 | /** |
91 | 89 | * @Description: 任务表 |
92 | - * @Author: jeecg-boot | |
93 | - * @Date: 2022-11-10 | |
94 | - * @Version: V1.0 | |
90 | + * @Author: jeecg-boot | |
91 | + * @Date: 2022-11-10 | |
92 | + * @Version: V1.0 | |
95 | 93 | */ |
96 | 94 | @Slf4j |
97 | 95 | @Service |
... | ... | @@ -217,7 +215,8 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
217 | 215 | |
218 | 216 | /** |
219 | 217 | * 如果库位是锁定的,那么这个库位一定是被某个任务占用。 |
220 | - * @param location | |
218 | + * | |
219 | + * @param location | |
221 | 220 | * @return |
222 | 221 | */ |
223 | 222 | @Override |
... | ... | @@ -324,11 +323,11 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
324 | 323 | } |
325 | 324 | |
326 | 325 | Result result = taskHeaderService.createTaskLockContainerAndLocation(QuantityConstant.TASK_TYPE_TRANSFER, containerCode, fromLocationCode, toLocationCode, |
327 | - warehouseCode); | |
326 | + warehouseCode); | |
328 | 327 | if (!result.isSuccess()) { |
329 | 328 | throw new JeecgBootException(result.getMessage()); |
330 | 329 | } |
331 | - TaskLockEntity taskLockEntity = (TaskLockEntity)result.getResult(); | |
330 | + TaskLockEntity taskLockEntity = (TaskLockEntity) result.getResult(); | |
332 | 331 | String zoneCode = taskLockEntity.getZoneCode(); |
333 | 332 | // 4. 判断源库位旁边有托盘但是没有任务,那么不允许移库 |
334 | 333 | TaskHeader taskHeader = new TaskHeader(); |
... | ... | @@ -396,11 +395,11 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
396 | 395 | toLocationCode = fromLocationCode; |
397 | 396 | } |
398 | 397 | Result result = taskHeaderService.createTaskLockContainerAndLocation(QuantityConstant.TASK_TYPE_CHECK_OUT, containerCode, fromLocationCode, toLocationCode, |
399 | - warehouseCode); | |
398 | + warehouseCode); | |
400 | 399 | if (!result.isSuccess()) { |
401 | 400 | throw new JeecgBootException(result.getMessage()); |
402 | 401 | } |
403 | - TaskLockEntity taskLockEntity = (TaskLockEntity)result.getResult(); | |
402 | + TaskLockEntity taskLockEntity = (TaskLockEntity) result.getResult(); | |
404 | 403 | String zoneCode = taskLockEntity.getZoneCode(); |
405 | 404 | Port port = portService.getPortByCode(toPortCode, zoneCode, warehouseCode); |
406 | 405 | if (port == null) { |
... | ... | @@ -458,11 +457,11 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
458 | 457 | toLocationCode = fromLocationCode; |
459 | 458 | } |
460 | 459 | Result result = |
461 | - taskHeaderService.createTaskLockContainerAndLocation(QuantityConstant.TASK_TYPE_QUALITY, containerCode, fromLocationCode, toLocationCode, warehouseCode); | |
460 | + taskHeaderService.createTaskLockContainerAndLocation(QuantityConstant.TASK_TYPE_QUALITY, containerCode, fromLocationCode, toLocationCode, warehouseCode); | |
462 | 461 | if (!result.isSuccess()) { |
463 | 462 | throw new JeecgBootException(result.getMessage()); |
464 | 463 | } |
465 | - TaskLockEntity taskLockEntity = (TaskLockEntity)result.getResult(); | |
464 | + TaskLockEntity taskLockEntity = (TaskLockEntity) result.getResult(); | |
466 | 465 | String zoneCode = taskLockEntity.getZoneCode(); |
467 | 466 | Port port = portService.getPortByCode(toPortCode, QuantityConstant.PORT_TYPE_PICK, zoneCode, warehouseCode); |
468 | 467 | if (port == null) { |
... | ... | @@ -486,7 +485,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
486 | 485 | } |
487 | 486 | LambdaQueryWrapper<InventoryDetail> inventoryDetailLambdaQueryWrapper = Wrappers.lambdaQuery(); |
488 | 487 | inventoryDetailLambdaQueryWrapper.eq(InventoryDetail::getContainerCode, containerCode).eq(InventoryDetail::getWarehouseCode, warehouseCode) |
489 | - .eq(InventoryDetail::getLocationCode, fromLocationCode); | |
488 | + .eq(InventoryDetail::getLocationCode, fromLocationCode); | |
490 | 489 | List<InventoryDetail> inventoryDetailList = inventoryDetailService.list(inventoryDetailLambdaQueryWrapper); |
491 | 490 | List<TaskDetail> taskDetailList = new ArrayList<>(); |
492 | 491 | if (inventoryDetailList.size() != 0) { |
... | ... | @@ -545,7 +544,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
545 | 544 | return Result.error("创建跨站任务时,起始站台和目标站台不能相同"); |
546 | 545 | } |
547 | 546 | Result result = taskHeaderService.createTaskLockContainerAndLocation(QuantityConstant.TASK_TYPE_OVER_STATION, containerCode, QuantityConstant.EMPTY_STRING, |
548 | - QuantityConstant.EMPTY_STRING, warehouseCode); | |
547 | + QuantityConstant.EMPTY_STRING, warehouseCode); | |
549 | 548 | if (!result.isSuccess()) { |
550 | 549 | throw new JeecgBootException(result.getMessage()); |
551 | 550 | } |
... | ... | @@ -621,7 +620,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
621 | 620 | int high = locationHigh.getHigh(); |
622 | 621 | boolean bypass = false; |
623 | 622 | String toLocationCode = |
624 | - allocationService.allocation(allocationRule, locationTypeCodeList, high, zoneCode, roadWays, warehouseCode, containerCode, null, null, bypass); | |
623 | + allocationService.allocation(allocationRule, locationTypeCodeList, high, zoneCode, roadWays, warehouseCode, containerCode, null, null, bypass); | |
625 | 624 | if (StringUtils.isEmpty(toLocationCode)) { |
626 | 625 | throw new JeecgBootException("创建空托盘组入库任务时,目标库位为空"); |
627 | 626 | } |
... | ... | @@ -643,11 +642,11 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
643 | 642 | } |
644 | 643 | log.info("开始创建空托盘组入库任务,容器编码" + containerCode + ",库位编码" + toLocationCode); |
645 | 644 | Result result = taskHeaderService.createTaskLockContainerAndLocation(QuantityConstant.TASK_TYPE_MANY_EMPTYRECEIPT, containerCode, |
646 | - QuantityConstant.EMPTY_STRING, toLocationCode, warehouseCode); | |
645 | + QuantityConstant.EMPTY_STRING, toLocationCode, warehouseCode); | |
647 | 646 | if (!result.isSuccess()) { |
648 | 647 | throw new JeecgBootException(result.getMessage()); |
649 | 648 | } |
650 | - TaskLockEntity taskLockEntity = (TaskLockEntity)result.getResult(); | |
649 | + TaskLockEntity taskLockEntity = (TaskLockEntity) result.getResult(); | |
651 | 650 | String zoneCode = taskLockEntity.getZoneCode(); |
652 | 651 | TaskHeader taskHeader = new TaskHeader(); |
653 | 652 | taskHeader.setWarehouseCode(warehouseCode); |
... | ... | @@ -680,11 +679,11 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
680 | 679 | return Result.error("创建空托盘组出库任务时,仓库编码为空"); |
681 | 680 | } |
682 | 681 | Result result = taskHeaderService.createTaskLockContainerAndLocation(QuantityConstant.TASK_TYPE_MANY_EMPTYSHIPMENT, containerCode, |
683 | - QuantityConstant.EMPTY_STRING, QuantityConstant.EMPTY_STRING, warehouseCode); | |
682 | + QuantityConstant.EMPTY_STRING, QuantityConstant.EMPTY_STRING, warehouseCode); | |
684 | 683 | if (!result.isSuccess()) { |
685 | 684 | throw new JeecgBootException(result.getMessage()); |
686 | 685 | } |
687 | - TaskLockEntity taskLockEntity = (TaskLockEntity)result.getResult(); | |
686 | + TaskLockEntity taskLockEntity = (TaskLockEntity) result.getResult(); | |
688 | 687 | String zoneCode = taskLockEntity.getZoneCode(); |
689 | 688 | Container container = containerService.getContainerByCode(containerCode, warehouseCode); |
690 | 689 | String fromLocationCode = container.getLocationCode(); |
... | ... | @@ -757,13 +756,13 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
757 | 756 | } |
758 | 757 | // 5、删除容器上的库位编码,并设置状态为空闲,填充度状态为空盘 |
759 | 758 | boolean success = containerService.updateLocationCodeAndStatus(containerCode, QuantityConstant.EMPTY_STRING, QuantityConstant.STATUS_CONTAINER_EMPTY, |
760 | - QuantityConstant.STATUS_CONTAINER_FILL_EMPTY, warehouseCode); | |
759 | + QuantityConstant.STATUS_CONTAINER_FILL_EMPTY, warehouseCode); | |
761 | 760 | if (!success) { |
762 | 761 | throw new JeecgBootException("处理空出失败, 更新容器状态失败"); |
763 | 762 | } |
764 | 763 | // 6、删除库位上的容器编码,并设置状态为空闲 |
765 | 764 | success = |
766 | - locationService.updateContainerCodeAndStatus(fromLocationCode, QuantityConstant.EMPTY_STRING, QuantityConstant.STATUS_LOCATION_EMPTY, warehouseCode); | |
765 | + locationService.updateContainerCodeAndStatus(fromLocationCode, QuantityConstant.EMPTY_STRING, QuantityConstant.STATUS_LOCATION_EMPTY, warehouseCode); | |
767 | 766 | if (!success) { |
768 | 767 | throw new JeecgBootException("处理空出失败, 更新库位状态失败"); |
769 | 768 | } |
... | ... | @@ -778,7 +777,8 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
778 | 777 | // 8、删除库存详情失败 |
779 | 778 | List<InventoryDetail> inventoryDetailList = inventoryDetailService.getInventoryDetailListByContainerCode(containerCode, warehouseCode); |
780 | 779 | if (inventoryDetailList.size() != 0) { |
781 | - List<Integer> idList = inventoryDetailList.stream().map(InventoryDetail::getId).collect(Collectors.toList());; | |
780 | + List<Integer> idList = inventoryDetailList.stream().map(InventoryDetail::getId).collect(Collectors.toList()); | |
781 | + ; | |
782 | 782 | success = inventoryDetailService.removeByIds(idList); |
783 | 783 | if (!success) { |
784 | 784 | throw new JeecgBootException("处理空出失败, 删除库存详情失败"); |
... | ... | @@ -837,7 +837,8 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
837 | 837 | } |
838 | 838 | } |
839 | 839 | } |
840 | - ReceiptContainerHeader receiptContainerHeader = receiptContainerHeaderService.getById(taskHeader.getReceiptContainerHeaderId());; | |
840 | + ReceiptContainerHeader receiptContainerHeader = receiptContainerHeaderService.getById(taskHeader.getReceiptContainerHeaderId()); | |
841 | + ; | |
841 | 842 | if (receiptContainerHeader != null) { |
842 | 843 | success = receiptContainerHeaderService.updateStatusById(QuantityConstant.RECEIPT_CONTAINER_FINISHED, receiptContainerHeader.getId()); |
843 | 844 | if (!success) { |
... | ... | @@ -983,7 +984,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
983 | 984 | public TaskHeader getUnCompleteTaskByFromLocationCode(String fromLocationCode, String warehouseCode) { |
984 | 985 | LambdaQueryWrapper<TaskHeader> taskHeaderLambdaQueryWrapper = Wrappers.lambdaQuery(); |
985 | 986 | taskHeaderLambdaQueryWrapper.eq(TaskHeader::getFromLocationCode, fromLocationCode).eq(TaskHeader::getWarehouseCode, warehouseCode).lt(TaskHeader::getStatus, |
986 | - QuantityConstant.TASK_STATUS_COMPLETED); | |
987 | + QuantityConstant.TASK_STATUS_COMPLETED); | |
987 | 988 | TaskHeader taskHeader = taskHeaderService.getOne(taskHeaderLambdaQueryWrapper); |
988 | 989 | return taskHeader; |
989 | 990 | } |
... | ... | @@ -992,7 +993,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
992 | 993 | public TaskHeader getUnCompleteTaskByToLocationCode(String toLocationCode, String warehouseCode) { |
993 | 994 | LambdaQueryWrapper<TaskHeader> taskHeaderLambdaQueryWrapper = Wrappers.lambdaQuery(); |
994 | 995 | taskHeaderLambdaQueryWrapper.eq(TaskHeader::getToLocationCode, toLocationCode).eq(TaskHeader::getWarehouseCode, warehouseCode).lt(TaskHeader::getStatus, |
995 | - QuantityConstant.TASK_STATUS_COMPLETED); | |
996 | + QuantityConstant.TASK_STATUS_COMPLETED); | |
996 | 997 | TaskHeader taskHeader = taskHeaderService.getOne(taskHeaderLambdaQueryWrapper); |
997 | 998 | return taskHeader; |
998 | 999 | } |
... | ... | @@ -1010,7 +1011,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
1010 | 1011 | public TaskHeader getUnCompleteTaskByContainerCode(String containerCode, String warehouseCode) { |
1011 | 1012 | LambdaQueryWrapper<TaskHeader> taskHeaderLambdaQueryWrapper = Wrappers.lambdaQuery(); |
1012 | 1013 | taskHeaderLambdaQueryWrapper.eq(TaskHeader::getContainerCode, containerCode).eq(TaskHeader::getWarehouseCode, warehouseCode).lt(TaskHeader::getStatus, |
1013 | - QuantityConstant.TASK_STATUS_COMPLETED); | |
1014 | + QuantityConstant.TASK_STATUS_COMPLETED); | |
1014 | 1015 | TaskHeader taskHeader = taskHeaderService.getOne(taskHeaderLambdaQueryWrapper); |
1015 | 1016 | return taskHeader; |
1016 | 1017 | } |
... | ... | @@ -1019,7 +1020,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
1019 | 1020 | public TaskHeader getUnCompleteTaskByPreTaskNo(int preTaskNo, String warehouseCode) { |
1020 | 1021 | LambdaQueryWrapper<TaskHeader> taskHeaderLambdaQueryWrapper = Wrappers.lambdaQuery(); |
1021 | 1022 | taskHeaderLambdaQueryWrapper.eq(TaskHeader::getPreTaskNo, preTaskNo).eq(TaskHeader::getWarehouseCode, warehouseCode).lt(TaskHeader::getStatus, |
1022 | - QuantityConstant.TASK_STATUS_COMPLETED); | |
1023 | + QuantityConstant.TASK_STATUS_COMPLETED); | |
1023 | 1024 | TaskHeader taskHeader = taskHeaderService.getOne(taskHeaderLambdaQueryWrapper); |
1024 | 1025 | return taskHeader; |
1025 | 1026 | } |
... | ... | @@ -1212,9 +1213,10 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
1212 | 1213 | * 创建空托盘入库 |
1213 | 1214 | * 1. 判断托盘号、库位编码是否满足要求 |
1214 | 1215 | * 2. 创建任务,锁定容器、库位 |
1215 | - * @param containerCode | |
1216 | - * @param toLocationCode | |
1217 | - * @param warehouseCode | |
1216 | + * | |
1217 | + * @param containerCode | |
1218 | + * @param toLocationCode | |
1219 | + * @param warehouseCode | |
1218 | 1220 | * @return |
1219 | 1221 | */ |
1220 | 1222 | @Override |
... | ... | @@ -1240,7 +1242,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
1240 | 1242 | } |
1241 | 1243 | |
1242 | 1244 | Result result = taskHeaderService.createTaskLockContainerAndLocation(QuantityConstant.TASK_TYPE_EMPTYRECEIPT, containerCode, QuantityConstant.EMPTY_STRING, |
1243 | - toLocationCode, warehouseCode); | |
1245 | + toLocationCode, warehouseCode); | |
1244 | 1246 | if (!result.isSuccess()) { |
1245 | 1247 | throw new JeecgBootException(result.getMessage()); |
1246 | 1248 | } |
... | ... | @@ -1271,9 +1273,10 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
1271 | 1273 | |
1272 | 1274 | /** |
1273 | 1275 | * 创建空托盘出库 |
1274 | - * @param containerCode | |
1275 | - * @param toPortCode | |
1276 | - * @param warehouseCode | |
1276 | + * | |
1277 | + * @param containerCode | |
1278 | + * @param toPortCode | |
1279 | + * @param warehouseCode | |
1277 | 1280 | * @return |
1278 | 1281 | */ |
1279 | 1282 | @Override |
... | ... | @@ -1292,11 +1295,11 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
1292 | 1295 | Container container = containerService.getContainerByCode(containerCode, warehouseCode); |
1293 | 1296 | String fromLocationCode = container.getLocationCode(); |
1294 | 1297 | Result result = taskHeaderService.createTaskLockContainerAndLocation(QuantityConstant.TASK_TYPE_EMPTYSHIPMENT, containerCode, QuantityConstant.EMPTY_STRING, |
1295 | - QuantityConstant.EMPTY_STRING, warehouseCode); | |
1298 | + QuantityConstant.EMPTY_STRING, warehouseCode); | |
1296 | 1299 | if (!result.isSuccess()) { |
1297 | 1300 | throw new JeecgBootException(result.getMessage()); |
1298 | 1301 | } |
1299 | - TaskLockEntity taskLockEntity = (TaskLockEntity)result.getResult(); | |
1302 | + TaskLockEntity taskLockEntity = (TaskLockEntity) result.getResult(); | |
1300 | 1303 | String zoneCode = taskLockEntity.getZoneCode(); |
1301 | 1304 | Port port = portService.getPortByCode(toPortCode, zoneCode, warehouseCode); |
1302 | 1305 | if (port == null) { |
... | ... | @@ -1336,8 +1339,8 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
1336 | 1339 | } |
1337 | 1340 | LambdaQueryWrapper<Container> containerLambdaQueryWrapper = Wrappers.lambdaQuery(); |
1338 | 1341 | containerLambdaQueryWrapper.eq(Container::getStatus, QuantityConstant.STATUS_CONTAINER_EMPTY).ne(Container::getLocationCode, QuantityConstant.EMPTY_STRING) |
1339 | - .eq(Container::getFillStatus, QuantityConstant.STATUS_CONTAINER_FILL_EMPTY).eq(Container::getWarehouseCode, warehouseCode) | |
1340 | - .orderByAsc(Container::getUpdateTime); | |
1342 | + .eq(Container::getFillStatus, QuantityConstant.STATUS_CONTAINER_FILL_EMPTY).eq(Container::getWarehouseCode, warehouseCode) | |
1343 | + .orderByAsc(Container::getUpdateTime); | |
1341 | 1344 | List<Container> containerList = containerService.list(containerLambdaQueryWrapper); |
1342 | 1345 | List<Container> removeContainerList = new ArrayList<>(); |
1343 | 1346 | if (CollectionUtils.isNotEmpty(containerList)) { |
... | ... | @@ -1369,16 +1372,17 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
1369 | 1372 | |
1370 | 1373 | /** |
1371 | 1374 | * 完成入库任务 |
1372 | - * @param taskHeader 任务 | |
1373 | - * @return AjaxResult 完成入库任务结果 | |
1375 | + * | |
1376 | + * @param taskHeader 任务 | |
1377 | + * @return AjaxResult 完成入库任务结果 | |
1374 | 1378 | */ |
1375 | 1379 | @Override |
1376 | 1380 | @Transactional(rollbackFor = Exception.class) |
1377 | 1381 | @OperationLog(bizId = "''", bizType = "'任务追踪'", tag = "'入库任务完成'", extra = "#extraJsonString1", |
1378 | - msg = "#taskHeader == null ? '' : '任务类型:' + #taskHeader.getTaskType() + ',起始库位:' + #taskHeader.getFromLocationCode() + ',目标库位:' + #taskHeader.getToLocationCode() + ',容器编码:' + #taskHeader.getContainerCode()", | |
1379 | - recordReturnValue = true) | |
1382 | + msg = "#taskHeader == null ? '' : '任务类型:' + #taskHeader.getTaskType() + ',起始库位:' + #taskHeader.getFromLocationCode() + ',目标库位:' + #taskHeader.getToLocationCode() + ',容器编码:' + #taskHeader.getContainerCode()", | |
1383 | + recordReturnValue = true) | |
1380 | 1384 | @OperationLog(bizId = "''", bizType = "'入库单追踪'", tag = "'入库任务完成'", extra = "#extraJsonString1", |
1381 | - msg = "'任务ID:' + #taskHeader.getId() + ',库位编码:' + #taskHeader.getToLocationCode() + ',容器编码:' + #taskHeader.getContainerCode()", recordReturnValue = true) | |
1385 | + msg = "'任务ID:' + #taskHeader.getId() + ',库位编码:' + #taskHeader.getToLocationCode() + ',容器编码:' + #taskHeader.getContainerCode()", recordReturnValue = true) | |
1382 | 1386 | @OperationLog(bizId = "''", bizType = "'入库单追踪'", tag = "'详情入库完成'", extra = "#extraJsonString2", msg = "''", recordReturnValue = true) |
1383 | 1387 | public Result completeReceiptTask(TaskHeader taskHeader) { |
1384 | 1388 | if (taskHeader == null) { |
... | ... | @@ -1400,7 +1404,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
1400 | 1404 | int allow = parameterConfigurationService.getValueIntByCode(QuantityConstant.RULE_CALL_BOX_ALLOW_EMPTY); |
1401 | 1405 | if (allow == QuantityConstant.RULE_ALLOW_EMPTY) { |
1402 | 1406 | Result result = taskHeaderService.completeTaskUnLockContainerAndLocation(taskHeader.getContainerFillStatus(), taskType, containerCode, |
1403 | - fromLocationCode, toLocationCode, warehouseCode); | |
1407 | + fromLocationCode, toLocationCode, warehouseCode); | |
1404 | 1408 | if (!result.isSuccess()) { |
1405 | 1409 | throw new JeecgBootException(result.getMessage()); |
1406 | 1410 | } |
... | ... | @@ -1545,7 +1549,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
1545 | 1549 | } |
1546 | 1550 | } |
1547 | 1551 | Result result = taskHeaderService.completeTaskUnLockContainerAndLocation(taskHeader.getContainerFillStatus(), taskType, containerCode, fromLocationCode, |
1548 | - toLocationCode, warehouseCode); | |
1552 | + toLocationCode, warehouseCode); | |
1549 | 1553 | if (!result.isSuccess()) { |
1550 | 1554 | throw new JeecgBootException(result.getMessage()); |
1551 | 1555 | } |
... | ... | @@ -1563,17 +1567,18 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
1563 | 1567 | |
1564 | 1568 | /** |
1565 | 1569 | * 完成出库任务 |
1566 | - * @param taskHeader 任务 | |
1567 | - * @return result 完成出库任务 | |
1570 | + * | |
1571 | + * @param taskHeader 任务 | |
1572 | + * @return result 完成出库任务 | |
1568 | 1573 | */ |
1569 | 1574 | @Override |
1570 | 1575 | @Transactional(rollbackFor = Exception.class) |
1571 | 1576 | @OperationLog(bizId = "''", bizType = "'任务追踪'", tag = "'出库任务完成'", extra = "#extraJsonString1", |
1572 | - msg = "#taskHeader == null ? '' : '任务类型:' + #taskHeader.getTaskType() + ',起始库位:' + #taskHeader.getFromLocationCode() + ',目标库位:' + #taskHeader.getToLocationCode() + ',容器编码:' + #taskHeader.getContainerCode()", | |
1573 | - recordReturnValue = true) | |
1577 | + msg = "#taskHeader == null ? '' : '任务类型:' + #taskHeader.getTaskType() + ',起始库位:' + #taskHeader.getFromLocationCode() + ',目标库位:' + #taskHeader.getToLocationCode() + ',容器编码:' + #taskHeader.getContainerCode()", | |
1578 | + recordReturnValue = true) | |
1574 | 1579 | @OperationLog(bizId = "''", bizType = "'出库单追踪'", tag = "'出库任务完成'", extra = "#extraJsonString1", |
1575 | - msg = "'任务ID:' + #taskHeader.getId() + ',库位编码:' + #taskHeader.getFromLocationCode() + ',容器编码:' + #taskHeader.getContainerCode() + ',目标出入口:' + #taskHeader.getToPortCode()", | |
1576 | - recordReturnValue = true) | |
1580 | + msg = "'任务ID:' + #taskHeader.getId() + ',库位编码:' + #taskHeader.getFromLocationCode() + ',容器编码:' + #taskHeader.getContainerCode() + ',目标出入口:' + #taskHeader.getToPortCode()", | |
1581 | + recordReturnValue = true) | |
1577 | 1582 | @OperationLog(bizId = "''", bizType = "'出库单追踪'", tag = "'详情出库完成'", extra = "#extraJsonString2", msg = "''", recordReturnValue = true) |
1578 | 1583 | public Result completeShipmentTask(TaskHeader taskHeader) { |
1579 | 1584 | if (taskHeader == null) { |
... | ... | @@ -1611,7 +1616,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
1611 | 1616 | throw new JeecgBootException("完成出库任务,更新出库组盘头失败"); |
1612 | 1617 | } |
1613 | 1618 | List<ShipmentContainerAdvice> shipmentContainerAdviceList = |
1614 | - shipmentContainerAdviceService.getShipmentContainerAdviceListByShipmentContainerId(shipmentContainerHeader.getId()); | |
1619 | + shipmentContainerAdviceService.getShipmentContainerAdviceListByShipmentContainerId(shipmentContainerHeader.getId()); | |
1615 | 1620 | for (ShipmentContainerAdvice shipmentContainerAdvice : shipmentContainerAdviceList) { |
1616 | 1621 | if (!shipmentContainerAdviceService.updateStatusById(QuantityConstant.SHIPMENT_CONTAINER_FINISHED, shipmentContainerAdvice.getId())) { |
1617 | 1622 | throw new JeecgBootException("完成出库任务,更新出库预配盘失败"); |
... | ... | @@ -1635,7 +1640,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
1635 | 1640 | } |
1636 | 1641 | } |
1637 | 1642 | Result result = taskHeaderService.completeTaskUnLockContainerAndLocation(taskHeader.getContainerFillStatus(), taskType, containerCode, |
1638 | - fromLocationCode, toLocationCode, warehouseCode); | |
1643 | + fromLocationCode, toLocationCode, warehouseCode); | |
1639 | 1644 | if (!result.isSuccess()) { |
1640 | 1645 | throw new JeecgBootException(result.getMessage()); |
1641 | 1646 | } |
... | ... | @@ -1806,7 +1811,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
1806 | 1811 | } |
1807 | 1812 | } |
1808 | 1813 | Result result = taskHeaderService.completeTaskUnLockContainerAndLocation(taskHeader.getContainerFillStatus(), taskType, containerCode, fromLocationCode, |
1809 | - toLocationCode, warehouseCode); | |
1814 | + toLocationCode, warehouseCode); | |
1810 | 1815 | if (!result.isSuccess()) { |
1811 | 1816 | throw new JeecgBootException(result.getMessage()); |
1812 | 1817 | } |
... | ... | @@ -1882,8 +1887,8 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
1882 | 1887 | InventoryDetail inventoryDetail1 = inventoryDetailList.get(i); |
1883 | 1888 | InventoryDetail inventoryDetail2 = inventoryDetailList.get(j); |
1884 | 1889 | if (inventoryDetail1.getMaterialCode().equals(inventoryDetail2.getMaterialCode()) && inventoryDetail1.getBatch().equals(inventoryDetail2.getBatch()) |
1885 | - && inventoryDetail1.getLot().equals(inventoryDetail2.getLot()) && inventoryDetail1.getProject().equals(inventoryDetail2.getProject()) | |
1886 | - && inventoryDetail1.getInventoryStatus().equals(inventoryDetail2.getInventoryStatus())) { | |
1890 | + && inventoryDetail1.getLot().equals(inventoryDetail2.getLot()) && inventoryDetail1.getProject().equals(inventoryDetail2.getProject()) | |
1891 | + && inventoryDetail1.getInventoryStatus().equals(inventoryDetail2.getInventoryStatus())) { | |
1887 | 1892 | // 属性一样的库存,相加合并。 |
1888 | 1893 | if (StringUtils.isNotEmpty(inventoryDetail1.getSn())) { |
1889 | 1894 | if (!inventoryDetail1.getSn().equals(inventoryDetail2.getSn())) { |
... | ... | @@ -1928,6 +1933,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
1928 | 1933 | |
1929 | 1934 | /** |
1930 | 1935 | * 锁定容器和库位分4种情况,入库任务、出库任务、分拣任务、换站任务 |
1936 | + * | |
1931 | 1937 | * @param |
1932 | 1938 | */ |
1933 | 1939 | @Override |
... | ... | @@ -2144,7 +2150,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
2144 | 2150 | @Override |
2145 | 2151 | @Transactional(rollbackFor = Exception.class) |
2146 | 2152 | public Result completeTaskUnLockContainerAndLocation(String containerFillStatus, int taskType, String containerCode, String fromLocationCode, |
2147 | - String toLocationCode, String warehouseCode) { | |
2153 | + String toLocationCode, String warehouseCode) { | |
2148 | 2154 | boolean success = false; |
2149 | 2155 | if (StringUtils.isEmpty(containerCode)) { |
2150 | 2156 | return Result.error("任务类型" + taskType + "完成任务时, 容器编码为空"); |
... | ... | @@ -2190,7 +2196,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
2190 | 2196 | break; |
2191 | 2197 | case QuantityConstant.TASK_TYPE_OVER_STATION: |
2192 | 2198 | success = containerService.updateLocationCodeAndStatus(containerCode, QuantityConstant.EMPTY_STRING, QuantityConstant.STATUS_CONTAINER_EMPTY, |
2193 | - warehouseCode); | |
2199 | + warehouseCode); | |
2194 | 2200 | break; |
2195 | 2201 | } |
2196 | 2202 | if (!success) { |
... | ... | @@ -2202,7 +2208,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
2202 | 2208 | return Result.error("任务类型" + taskType + "完成任务时," + toLocationCode + "目标库位不存在"); |
2203 | 2209 | } |
2204 | 2210 | success = |
2205 | - locationService.updateContainerCodeAndStatus(fromLocationCode, QuantityConstant.EMPTY_STRING, QuantityConstant.STATUS_LOCATION_EMPTY, warehouseCode); | |
2211 | + locationService.updateContainerCodeAndStatus(fromLocationCode, QuantityConstant.EMPTY_STRING, QuantityConstant.STATUS_LOCATION_EMPTY, warehouseCode); | |
2206 | 2212 | if (!success) { |
2207 | 2213 | throw new JeecgBootException("任务类型" + taskType + "完成任务时,更新源库位失败"); |
2208 | 2214 | } |
... | ... | @@ -2353,7 +2359,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
2353 | 2359 | if (!result.isSuccess()) { |
2354 | 2360 | throw new JeecgBootException(result.getMessage()); |
2355 | 2361 | } |
2356 | - TaskHeader taskHeader = (TaskHeader)result.getResult(); | |
2362 | + TaskHeader taskHeader = (TaskHeader) result.getResult(); | |
2357 | 2363 | if (taskHeader.getTaskType() == QuantityConstant.TASK_TYPE_SUPPLEMENTRECEIPT) { |
2358 | 2364 | if (port == null) { |
2359 | 2365 | throw new JeecgBootException("快速入库, 生成补充任务时必须有入库口"); |
... | ... | @@ -2423,7 +2429,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
2423 | 2429 | shipmentDetailList.add(shipmentDetail); |
2424 | 2430 | shipmentQtyList.add(qty); |
2425 | 2431 | List<InventoryDetail> inventoryDetailList = |
2426 | - inventoryDetailService.getInventoryDetailListByMaterialCodeToShipment(materialCode, zoneCode, qty, warehouseCode); | |
2432 | + inventoryDetailService.getInventoryDetailListByMaterialCodeToShipment(materialCode, zoneCode, qty, warehouseCode); | |
2427 | 2433 | List<InventoryDetail> removeInventoryDetailList = new ArrayList<>(); |
2428 | 2434 | for (InventoryDetail inventoryDetail : inventoryDetailList) { |
2429 | 2435 | if (roadWay.intValue() == inventoryDetail.getRoadWay().intValue()) { |
... | ... | @@ -2459,7 +2465,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
2459 | 2465 | ShipmentDetail shipmentDetail = shipmentDetailService.getById(shipmentDetailId); |
2460 | 2466 | BigDecimal shipQty = shipmentQtyList.get(i); |
2461 | 2467 | InventoryDetail inventoryDetail = |
2462 | - inventoryDetailService.getInventoryDetailByMaterialCodeToShipment(switchContainerCode, shipmentDetail.getMaterialCode(), shipQty, warehouseCode); | |
2468 | + inventoryDetailService.getInventoryDetailByMaterialCodeToShipment(switchContainerCode, shipmentDetail.getMaterialCode(), shipQty, warehouseCode); | |
2463 | 2469 | CombinationModel combinationModel = new CombinationModel(); |
2464 | 2470 | combinationModel.setShipmentDetail(shipmentDetail); |
2465 | 2471 | combinationModel.setInventoryDetail(inventoryDetail); |
... | ... | @@ -2552,8 +2558,9 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
2552 | 2558 | |
2553 | 2559 | /** |
2554 | 2560 | * 完成空托盘入库任务 |
2555 | - * @param taskHeader 任务 | |
2556 | - * @return Result 完成入库任务结果 | |
2561 | + * | |
2562 | + * @param taskHeader 任务 | |
2563 | + * @return Result 完成入库任务结果 | |
2557 | 2564 | */ |
2558 | 2565 | @Override |
2559 | 2566 | @Transactional(rollbackFor = Exception.class) |
... | ... | @@ -2572,7 +2579,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
2572 | 2579 | return Result.error("完成空托盘入库任务时, 目标库位编码为空"); |
2573 | 2580 | } |
2574 | 2581 | Result result = taskHeaderService.completeTaskUnLockContainerAndLocation(taskHeader.getContainerFillStatus(), QuantityConstant.TASK_TYPE_EMPTYRECEIPT, |
2575 | - containerCode, QuantityConstant.EMPTY_STRING, toLocationCode, warehouseCode); | |
2582 | + containerCode, QuantityConstant.EMPTY_STRING, toLocationCode, warehouseCode); | |
2576 | 2583 | if (!result.isSuccess()) { |
2577 | 2584 | throw new JeecgBootException(result.getMessage()); |
2578 | 2585 | } |
... | ... | @@ -2587,7 +2594,8 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
2587 | 2594 | /** |
2588 | 2595 | * 盘点完成 |
2589 | 2596 | * 盘点有差异完成时状态为105 |
2590 | - * @param taskHeader | |
2597 | + * | |
2598 | + * @param taskHeader | |
2591 | 2599 | * @return |
2592 | 2600 | */ |
2593 | 2601 | @Override |
... | ... | @@ -2867,7 +2875,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
2867 | 2875 | cycleCountHeaderService.updataHeaderStatus(cycleCountDetail.getCycleCountHeadCode()); |
2868 | 2876 | |
2869 | 2877 | Result result = taskHeaderService.completeTaskUnLockContainerAndLocation(taskHeader.getContainerFillStatus(), QuantityConstant.TASK_TYPE_CHECK_OUT, |
2870 | - containerCode, fromLocationCode, toLocationCode, warehouseCode); | |
2878 | + containerCode, fromLocationCode, toLocationCode, warehouseCode); | |
2871 | 2879 | if (!result.isSuccess()) { |
2872 | 2880 | throw new JeecgBootException(result.getMessage()); |
2873 | 2881 | } |
... | ... | @@ -2881,8 +2889,9 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
2881 | 2889 | |
2882 | 2890 | /** |
2883 | 2891 | * 完成空托盘出库任务 |
2884 | - * @param taskHeader 任务 | |
2885 | - * @return Result 完成出库任务结果 | |
2892 | + * | |
2893 | + * @param taskHeader 任务 | |
2894 | + * @return Result 完成出库任务结果 | |
2886 | 2895 | */ |
2887 | 2896 | @Override |
2888 | 2897 | @Transactional(rollbackFor = Exception.class) |
... | ... | @@ -2918,7 +2927,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
2918 | 2927 | return Result.error("完成空托盘出库任务时," + toPortCode + "目标出库口不存在"); |
2919 | 2928 | } |
2920 | 2929 | Result result = taskHeaderService.completeTaskUnLockContainerAndLocation(taskHeader.getContainerFillStatus(), QuantityConstant.TASK_TYPE_EMPTYSHIPMENT, |
2921 | - containerCode, fromLocationCode, QuantityConstant.EMPTY_STRING, warehouseCode); | |
2930 | + containerCode, fromLocationCode, QuantityConstant.EMPTY_STRING, warehouseCode); | |
2922 | 2931 | if (!result.isSuccess()) { |
2923 | 2932 | throw new JeecgBootException(result.getMessage()); |
2924 | 2933 | } |
... | ... | @@ -2932,8 +2941,9 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
2932 | 2941 | |
2933 | 2942 | /** |
2934 | 2943 | * 完成移库任务 |
2935 | - * @param taskHeader 任务 | |
2936 | - * @return Result 完成移库任务结果 | |
2944 | + * | |
2945 | + * @param taskHeader 任务 | |
2946 | + * @return Result 完成移库任务结果 | |
2937 | 2947 | */ |
2938 | 2948 | @Override |
2939 | 2949 | @Transactional(rollbackFor = Exception.class) |
... | ... | @@ -2960,7 +2970,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
2960 | 2970 | List<InventoryTransaction> inventoryTransactionList = new ArrayList<>(); |
2961 | 2971 | LambdaUpdateWrapper<InventoryDetail> inventoryDetailLambdaUpdateWrapper = Wrappers.lambdaUpdate(); |
2962 | 2972 | inventoryDetailLambdaUpdateWrapper.eq(InventoryDetail::getWarehouseCode, warehouseCode).eq(InventoryDetail::getContainerCode, containerCode) |
2963 | - .eq(InventoryDetail::getLocationCode, fromLocationCode); | |
2973 | + .eq(InventoryDetail::getLocationCode, fromLocationCode); | |
2964 | 2974 | List<InventoryDetail> inventoryDetailList = inventoryDetailService.list(inventoryDetailLambdaUpdateWrapper); |
2965 | 2975 | for (InventoryDetail inventoryDetail : inventoryDetailList) { |
2966 | 2976 | inventoryDetail.setLocationCode(toLocationCode); |
... | ... | @@ -2991,7 +3001,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
2991 | 3001 | } |
2992 | 3002 | } |
2993 | 3003 | Result result = taskHeaderService.completeTaskUnLockContainerAndLocation(taskHeader.getContainerFillStatus(), QuantityConstant.TASK_TYPE_TRANSFER, |
2994 | - containerCode, fromLocationCode, toLocationCode, warehouseCode); | |
3004 | + containerCode, fromLocationCode, toLocationCode, warehouseCode); | |
2995 | 3005 | if (!result.isSuccess()) { |
2996 | 3006 | throw new JeecgBootException(result.getMessage()); |
2997 | 3007 | } |
... | ... | @@ -3005,8 +3015,9 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
3005 | 3015 | |
3006 | 3016 | /** |
3007 | 3017 | * 完成出库查看任务 |
3008 | - * @param taskHeader 任务 | |
3009 | - * @return Result 完成出库查看任务结果 | |
3018 | + * | |
3019 | + * @param taskHeader 任务 | |
3020 | + * @return Result 完成出库查看任务结果 | |
3010 | 3021 | */ |
3011 | 3022 | @Override |
3012 | 3023 | @Transactional(rollbackFor = Exception.class) |
... | ... | @@ -3037,7 +3048,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
3037 | 3048 | boolean success = false; |
3038 | 3049 | LambdaUpdateWrapper<InventoryDetail> inventoryDetailLambdaQueryWrapper = Wrappers.lambdaUpdate(); |
3039 | 3050 | inventoryDetailLambdaQueryWrapper.eq(InventoryDetail::getWarehouseCode, warehouseCode).eq(InventoryDetail::getContainerCode, containerCode) |
3040 | - .eq(InventoryDetail::getLocationCode, fromLocationCode); | |
3051 | + .eq(InventoryDetail::getLocationCode, fromLocationCode); | |
3041 | 3052 | List<InventoryDetail> inventoryDetailList = inventoryDetailService.list(inventoryDetailLambdaQueryWrapper); |
3042 | 3053 | if (inventoryDetailList.size() != 0) { |
3043 | 3054 | List<InventoryDetail> inventoryDetailList1 = new ArrayList<>(); |
... | ... | @@ -3064,7 +3075,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
3064 | 3075 | } |
3065 | 3076 | |
3066 | 3077 | Result result = taskHeaderService.completeTaskUnLockContainerAndLocation(taskHeader.getContainerFillStatus(), QuantityConstant.TASK_TYPE_CHECK_OUT, |
3067 | - containerCode, fromLocationCode, toLocationCode, warehouseCode); | |
3078 | + containerCode, fromLocationCode, toLocationCode, warehouseCode); | |
3068 | 3079 | if (!result.isSuccess()) { |
3069 | 3080 | throw new JeecgBootException(result.getMessage()); |
3070 | 3081 | } |
... | ... | @@ -3079,8 +3090,9 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
3079 | 3090 | |
3080 | 3091 | /** |
3081 | 3092 | * 完成跨站任务 |
3082 | - * @param taskHeader 任务 | |
3083 | - * @return Result 完成跨站任务结果 | |
3093 | + * | |
3094 | + * @param taskHeader 任务 | |
3095 | + * @return Result 完成跨站任务结果 | |
3084 | 3096 | */ |
3085 | 3097 | @Override |
3086 | 3098 | @Transactional(rollbackFor = Exception.class) |
... | ... | @@ -3115,7 +3127,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
3115 | 3127 | return Result.error("创建跨站任务时,目标站台为空"); |
3116 | 3128 | } |
3117 | 3129 | Result result = taskHeaderService.completeTaskUnLockContainerAndLocation(taskHeader.getContainerFillStatus(), QuantityConstant.TASK_TYPE_OVER_STATION, |
3118 | - containerCode, QuantityConstant.EMPTY_STRING, QuantityConstant.EMPTY_STRING, warehouseCode); | |
3130 | + containerCode, QuantityConstant.EMPTY_STRING, QuantityConstant.EMPTY_STRING, warehouseCode); | |
3119 | 3131 | if (!result.isSuccess()) { |
3120 | 3132 | throw new JeecgBootException(result.getMessage()); |
3121 | 3133 | } |
... | ... | @@ -3130,8 +3142,9 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
3130 | 3142 | |
3131 | 3143 | /** |
3132 | 3144 | * 完成空托盘组入库任务 |
3133 | - * @param taskHeader 任务 | |
3134 | - * @return Result 完成空托盘组入库任务结果 | |
3145 | + * | |
3146 | + * @param taskHeader 任务 | |
3147 | + * @return Result 完成空托盘组入库任务结果 | |
3135 | 3148 | */ |
3136 | 3149 | @Override |
3137 | 3150 | @Transactional(rollbackFor = Exception.class) |
... | ... | @@ -3158,7 +3171,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
3158 | 3171 | return Result.error("完成空托盘组入库任务时,没有找到库位" + toLocationCode); |
3159 | 3172 | } |
3160 | 3173 | Result result = taskHeaderService.completeTaskUnLockContainerAndLocation(taskHeader.getContainerFillStatus(), QuantityConstant.TASK_TYPE_MANY_EMPTYRECEIPT, |
3161 | - containerCode, QuantityConstant.EMPTY_STRING, toLocationCode, warehouseCode); | |
3174 | + containerCode, QuantityConstant.EMPTY_STRING, toLocationCode, warehouseCode); | |
3162 | 3175 | if (!result.isSuccess()) { |
3163 | 3176 | throw new JeecgBootException(result.getMessage()); |
3164 | 3177 | } |
... | ... | @@ -3173,8 +3186,9 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
3173 | 3186 | |
3174 | 3187 | /** |
3175 | 3188 | * 完成空托盘组出库任务 |
3176 | - * @param taskHeader 任务 | |
3177 | - * @return Result 完成空托盘组出库任务结果 | |
3189 | + * | |
3190 | + * @param taskHeader 任务 | |
3191 | + * @return Result 完成空托盘组出库任务结果 | |
3178 | 3192 | */ |
3179 | 3193 | @Override |
3180 | 3194 | @Transactional(rollbackFor = Exception.class) |
... | ... | @@ -3219,7 +3233,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
3219 | 3233 | throw new JeecgBootException("完成空托盘组出库任务时, 更新任务失败"); |
3220 | 3234 | } |
3221 | 3235 | Result result = taskHeaderService.completeTaskUnLockContainerAndLocation(taskHeader.getContainerFillStatus(), QuantityConstant.TASK_TYPE_MANY_EMPTYSHIPMENT, |
3222 | - containerCode, fromLocationCode, QuantityConstant.EMPTY_STRING, warehouseCode); | |
3236 | + containerCode, fromLocationCode, QuantityConstant.EMPTY_STRING, warehouseCode); | |
3223 | 3237 | if (!result.isSuccess()) { |
3224 | 3238 | throw new JeecgBootException(result.getMessage()); |
3225 | 3239 | } |
... | ... | @@ -3358,7 +3372,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
3358 | 3372 | } |
3359 | 3373 | } |
3360 | 3374 | Result result = taskHeaderService.completeTaskUnLockContainerAndLocation(taskHeader.getContainerFillStatus(), QuantityConstant.TASK_TYPE_QUALITY, |
3361 | - containerCode, fromLocationCode, toLocationCode, warehouseCode); | |
3375 | + containerCode, fromLocationCode, toLocationCode, warehouseCode); | |
3362 | 3376 | if (!result.isSuccess()) { |
3363 | 3377 | throw new JeecgBootException(result.getMessage()); |
3364 | 3378 | } |
... | ... | @@ -3372,8 +3386,9 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
3372 | 3386 | |
3373 | 3387 | /** |
3374 | 3388 | * 取消入库任务 |
3375 | - * @param taskHeader 任务 | |
3376 | - * @return Result 取消入库任务结果 | |
3389 | + * | |
3390 | + * @param taskHeader 任务 | |
3391 | + * @return Result 取消入库任务结果 | |
3377 | 3392 | */ |
3378 | 3393 | @Override |
3379 | 3394 | @Transactional(rollbackFor = Exception.class) |
... | ... | @@ -3392,8 +3407,9 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
3392 | 3407 | |
3393 | 3408 | /** |
3394 | 3409 | * 取消出库任务 |
3395 | - * @param taskHeader 任务 | |
3396 | - * @return Result 取消出库任务结果 | |
3410 | + * | |
3411 | + * @param taskHeader 任务 | |
3412 | + * @return Result 取消出库任务结果 | |
3397 | 3413 | */ |
3398 | 3414 | @Override |
3399 | 3415 | @Transactional(rollbackFor = Exception.class) |
... | ... | @@ -3415,7 +3431,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
3415 | 3431 | log.info("开始取消盘点任务"); |
3416 | 3432 | LambdaQueryWrapper<CycleCountDetail> cycleCountDetailLambdaQueryWrapper = Wrappers.lambdaQuery(); |
3417 | 3433 | cycleCountDetailLambdaQueryWrapper.eq(CycleCountDetail::getContainerCode, taskHeader.getContainerCode()).ne(CycleCountDetail::getEnableStatus, |
3418 | - QuantityConstant.SHIPMENT_RECEIVE_SUCCESS); | |
3434 | + QuantityConstant.SHIPMENT_RECEIVE_SUCCESS); | |
3419 | 3435 | CycleCountDetail cycleCountDetail = cycleCountDetailService.getOne(cycleCountDetailLambdaQueryWrapper); |
3420 | 3436 | if (cycleCountDetail == null) { |
3421 | 3437 | throw new JeecgBootException("取消盘点任务,没有找到盘点明细"); |
... | ... | @@ -3471,7 +3487,8 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
3471 | 3487 | |
3472 | 3488 | /** |
3473 | 3489 | * 取消任务,恢复容器和库位状态 |
3474 | - * @param taskHeader | |
3490 | + * | |
3491 | + * @param taskHeader | |
3475 | 3492 | * @return |
3476 | 3493 | */ |
3477 | 3494 | @Override |
... | ... | @@ -3523,12 +3540,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
3523 | 3540 | public boolean updateById(TaskHeader taskHeader) { |
3524 | 3541 | LambdaQueryWrapper<TaskHeader> taskHeaderLambdaQueryWrapper = Wrappers.lambdaQuery(); |
3525 | 3542 | taskHeaderLambdaQueryWrapper.eq(TaskHeader::getId, taskHeader.getId()).lt(taskHeader.getStatus() != null, TaskHeader::getStatus, |
3526 | - QuantityConstant.TASK_STATUS_COMPLETED); | |
3543 | + QuantityConstant.TASK_STATUS_COMPLETED); | |
3527 | 3544 | return super.update(taskHeader, taskHeaderLambdaQueryWrapper); |
3528 | 3545 | } |
3529 | - | |
3530 | - @Override | |
3531 | - public List<ReportPerformanceAssessmentDto> getPerformanceAssessmentReport(String realName) { | |
3532 | - return super.baseMapper.selectPerformanceAssessment(realName); | |
3533 | - } | |
3534 | 3546 | } |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/taskHeaderHistory/mapper/TaskHeaderHistoryMapper.java
1 | 1 | package org.jeecg.modules.wms.task.taskHeaderHistory.mapper; |
2 | 2 | |
3 | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
4 | +import org.apache.ibatis.annotations.Param; | |
5 | +import org.jeecg.modules.wms.report.dto.ReportPerformanceAssessmentDto; | |
4 | 6 | import org.jeecg.modules.wms.task.taskHeaderHistory.entity.TaskHeaderHistory; |
5 | 7 | |
8 | +import java.util.List; | |
9 | + | |
6 | 10 | /** |
7 | 11 | * @Description: task_header_history |
8 | 12 | * @Author: jeecg-boot |
... | ... | @@ -11,4 +15,13 @@ import org.jeecg.modules.wms.task.taskHeaderHistory.entity.TaskHeaderHistory; |
11 | 15 | */ |
12 | 16 | public interface TaskHeaderHistoryMapper extends BaseMapper<TaskHeaderHistory> { |
13 | 17 | |
18 | + /** | |
19 | + * 绩效考核报表查询 | |
20 | + * @param realName 用户姓名 | |
21 | + * @param taskTypeList 任务类型 | |
22 | + * @return 绩效考核报表信息 | |
23 | + */ | |
24 | + List<ReportPerformanceAssessmentDto> selectPerformanceAssessment(@Param("realName") String realName, | |
25 | + @Param("receiptTaskInternalType") Integer receiptTaskInternalType, | |
26 | + @Param("shipmentTaskInternalType") Integer shipmentTaskInternalType); | |
14 | 27 | } |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/taskHeaderHistory/mapper/xml/TaskHeaderHistoryMapper.xml
... | ... | @@ -2,4 +2,24 @@ |
2 | 2 | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
3 | 3 | <mapper namespace="org.jeecg.modules.wms.task.taskHeaderHistory.mapper.TaskHeaderHistoryMapper"> |
4 | 4 | |
5 | + <select id="selectPerformanceAssessment" | |
6 | + resultType="org.jeecg.modules.wms.report.dto.ReportPerformanceAssessmentDto"> | |
7 | + SELECT sys_user.realname, | |
8 | + COUNT(task_header_history.create_by) AS sumTaskQty, | |
9 | + COUNT(IF((task_header_history.innernal_task_type = #{receiptTaskInternalType}), | |
10 | + task_header_history.create_by, NULL)) AS receiptTaskQty, | |
11 | + COUNT(IF((task_header_history.innernal_task_type = #{shipmentTaskInternalType}), | |
12 | + task_header_history.create_by, NULL)) AS shipmentTaskQty | |
13 | + FROM sys_user | |
14 | + LEFT JOIN task_header_history ON sys_user.realname = task_header_history.create_by | |
15 | + and task_header_history.innernal_task_type IN | |
16 | + (#{receiptTaskInternalType}, #{shipmentTaskInternalType}) | |
17 | + <where> | |
18 | + <if test="realName != null and realName != ''"> | |
19 | + <bind name="realName" value="'%' + realName + '%'"/> | |
20 | + and sys_user.realname LIKE #{realName} | |
21 | + </if> | |
22 | + </where> | |
23 | + GROUP BY sys_user.realname | |
24 | + </select> | |
5 | 25 | </mapper> |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/taskHeaderHistory/service/ITaskHeaderHistoryService.java
1 | 1 | package org.jeecg.modules.wms.task.taskHeaderHistory.service; |
2 | 2 | import com.baomidou.mybatisplus.extension.service.IService; |
3 | +import org.jeecg.modules.wms.report.dto.ReportPerformanceAssessmentDto; | |
3 | 4 | import org.jeecg.modules.wms.task.taskHeaderHistory.entity.TaskDetailHistory; |
4 | 5 | import org.jeecg.modules.wms.task.taskHeaderHistory.entity.TaskHeaderHistory; |
5 | 6 | |
... | ... | @@ -39,4 +40,10 @@ public interface ITaskHeaderHistoryService extends IService<TaskHeaderHistory> { |
39 | 40 | |
40 | 41 | void saveById(Integer id); |
41 | 42 | |
43 | + /** | |
44 | + * 绩效考核报表查询:只包含入库(整盘入库、补充入库、空容器入库)与出库(整盘出库、分拣出库、空容器出库)类型的 | |
45 | + * @param realName 用户姓名 | |
46 | + * @return 绩效考核报表信息 | |
47 | + */ | |
48 | + List<ReportPerformanceAssessmentDto> getPerformanceAssessmentReport(String realName); | |
42 | 49 | } |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/taskHeaderHistory/service/impl/TaskHeaderHistoryServiceImpl.java
1 | 1 | package org.jeecg.modules.wms.task.taskHeaderHistory.service.impl; |
2 | 2 | |
3 | 3 | import java.io.Serializable; |
4 | +import java.util.ArrayList; | |
4 | 5 | import java.util.Collection; |
5 | 6 | import java.util.List; |
6 | 7 | |
7 | 8 | import javax.annotation.Resource; |
8 | 9 | |
10 | +import cn.hutool.core.collection.ListUtil; | |
9 | 11 | import org.jeecg.common.exception.JeecgBootException; |
12 | +import org.jeecg.modules.wms.report.dto.ReportPerformanceAssessmentDto; | |
10 | 13 | import org.jeecg.modules.wms.task.taskHeader.entity.TaskDetail; |
11 | 14 | import org.jeecg.modules.wms.task.taskHeader.entity.TaskHeader; |
12 | 15 | import org.jeecg.modules.wms.task.taskHeader.service.ITaskDetailService; |
... | ... | @@ -17,6 +20,7 @@ import org.jeecg.modules.wms.task.taskHeaderHistory.mapper.TaskDetailHistoryMapp |
17 | 20 | import org.jeecg.modules.wms.task.taskHeaderHistory.mapper.TaskHeaderHistoryMapper; |
18 | 21 | import org.jeecg.modules.wms.task.taskHeaderHistory.service.ITaskDetailHistoryService; |
19 | 22 | import org.jeecg.modules.wms.task.taskHeaderHistory.service.ITaskHeaderHistoryService; |
23 | +import org.jeecg.utils.constant.QuantityConstant; | |
20 | 24 | import org.springframework.beans.BeanUtils; |
21 | 25 | import org.springframework.beans.factory.annotation.Autowired; |
22 | 26 | import org.springframework.stereotype.Service; |
... | ... | @@ -112,4 +116,9 @@ public class TaskHeaderHistoryServiceImpl extends ServiceImpl<TaskHeaderHistoryM |
112 | 116 | } |
113 | 117 | |
114 | 118 | } |
119 | + | |
120 | + @Override | |
121 | + public List<ReportPerformanceAssessmentDto> getPerformanceAssessmentReport(String realName) { | |
122 | + return super.baseMapper.selectPerformanceAssessment(realName, QuantityConstant.TASK_INTENERTYPE_RECEIPT, QuantityConstant.TASK_INTENERTYPE_SHIPMENT); | |
123 | + } | |
115 | 124 | } |
... | ... |