Commit 619c0db3debe54179e277adebca78c1bd1bba080

Authored by 肖超群
2 parents ef72e4cf 65367a75

Merge branch 'develop' of http://172.16.29.40:8010/wms/wms4 into develop

Showing 18 changed files with 451 additions and 164 deletions
ant-design-vue-jeecg/src/views/system/report/InventoryClassificationDetail.vue 0 → 100644
  1 +<template>
  2 + <a-card :bordered="false" :class="'cust-erp-sub-tab'">
  3 + <!-- 操作按钮区域 -->
  4 + <!-- <div class="table-operator" v-if="mainId">
  5 + <a-button type="primary" icon="download" @click="handleExportXls('库存分类报表详情')">导出</a-button>
  6 + </div>-->
  7 +
  8 + <!-- table区域-begin -->
  9 + <div>
  10 + <a-table
  11 + ref="table"
  12 + size="middle"
  13 + bordered
  14 + :rowKey="(record,index) => {return record.zoneCode + '_' + record.materialCode + '_' + record.materialSpec + '_' + record.materialUnit}"
  15 + class="j-table-force-nowrap"
  16 + :scroll="{x:true}"
  17 + :columns="columns"
  18 + :dataSource="dataSource"
  19 + :pagination="ipagination"
  20 + :loading="loading"
  21 + @change="handleTableChange">
  22 +
  23 + <span slot="inventoryStatus_dictText" slot-scope="inventoryStatus_dictText">
  24 + <a-tag :key="inventoryStatus_dictText" :color="getStatusColor(inventoryStatus_dictText)">
  25 + {{ inventoryStatus_dictText }}
  26 + </a-tag>
  27 + </span>
  28 +
  29 + <span slot="companyCode" slot-scope="companyCode">
  30 + <a-tag :key="companyCode" color="blue">
  31 + {{ solutionCompany(companyCode) }}
  32 + </a-tag>
  33 + </span>
  34 +
  35 + <span slot="zoneCode" slot-scope="zoneCode">
  36 + <a-tag :key="zoneCode" color="blue">
  37 + {{ solutionZoneCode(zoneCode) }}
  38 + </a-tag>
  39 + </span>
  40 + </a-table>
  41 + </div>
  42 +
  43 + <inventoryDetail-modal ref="modalForm" @ok="modalFormOk" :mainId="mainId"></inventoryDetail-modal>
  44 + </a-card>
  45 +</template>
  46 +
  47 +<script>
  48 +
  49 +import {JeecgListMixin} from '@/mixins/JeecgListMixin'
  50 +import InventoryDetailModal from '@views/system/inventory/modules/InventoryDetailModal'
  51 +import {getCompanyList} from '@/api/api'
  52 +
  53 +export default {
  54 + name: 'InventoryClassificationDetail',
  55 + mixins: [JeecgListMixin],
  56 + components: {InventoryDetailModal},
  57 + props: {
  58 + mainId: {
  59 + type: String,
  60 + default: '',
  61 + required: false
  62 + }
  63 + },
  64 + watch: {
  65 + mainId: {
  66 + immediate: true,
  67 + handler(val) {
  68 + if (!this.mainId) {
  69 + this.clearList()
  70 + } else {
  71 + this.queryParam['materialTypeCode'] = val.split("_")[0];
  72 + this.loadData(1)
  73 + }
  74 + }
  75 + }
  76 + },
  77 + data() {
  78 + return {
  79 + description: '库存分类报表详情页面',
  80 + disableMixinCreated: true,
  81 + companyList: [],
  82 + zoneList: [],
  83 + // 表头
  84 + columns: [
  85 + {
  86 + title: '物料编码',
  87 + align: "center",
  88 + dataIndex: 'materialCode'
  89 + },
  90 + {
  91 + title: '物料名称',
  92 + align: "center",
  93 + dataIndex: 'materialName'
  94 + },
  95 + {
  96 + title: '物料规格',
  97 + align: "center",
  98 + dataIndex: 'materialSpec'
  99 + },
  100 + {
  101 + title: '物料单位',
  102 + align: "center",
  103 + dataIndex: 'materialUnit'
  104 + },
  105 + {
  106 + title: '库存总数量',
  107 + align: "center",
  108 + dataIndex: 'qty'
  109 + }
  110 + ],
  111 + url: {
  112 + list: '/report/listInventoryClassificationDetail',
  113 + },
  114 + dictOptions: {
  115 + containerStatus: []
  116 + }
  117 + }
  118 + },
  119 + created() {
  120 + this.loadFrom();
  121 + },
  122 + computed: {
  123 + importExcelUrl() {
  124 + return `${window._CONFIG['domianURL']}/${this.url.importUrl}/${this.mainId}`
  125 + }
  126 + },
  127 + methods: {
  128 + getStatusColor(status) {
  129 + const colors = {
  130 + '良品': 'green',
  131 + '报废品': 'purple',
  132 + '待确认 ': 'grey',
  133 + '次品': 'red',
  134 + default: 'blue'
  135 + };
  136 + return colors[status] || colors.default;
  137 + },
  138 + loadFrom() {
  139 + getCompanyList().then(res => {
  140 + if (res.success) {
  141 + this.companyList = res.result
  142 + }
  143 + })
  144 + },
  145 + solutionCompany(value) {
  146 + let actions = []
  147 + Object.keys(this.companyList).some(key => {
  148 + if (this.companyList[key].code === '' + value) {
  149 + actions.push(this.companyList[key].name)
  150 + return true
  151 + }
  152 + })
  153 + return actions.join('')
  154 + },
  155 + clearList() {
  156 + this.dataSource = []
  157 + this.selectedRowKeys = []
  158 + this.ipagination.current = 1
  159 + }
  160 + }
  161 +}
  162 +</script>
  163 +<style scoped>
  164 +@import '~@assets/less/common.less';
  165 +</style>
... ...
ant-design-vue-jeecg/src/views/system/report/ReportInventoryClassificationList.vue
... ... @@ -5,17 +5,17 @@
5 5 <a-form layout="inline" @keyup.enter.native="searchQuery">
6 6 <a-row :gutter="24">
7 7 <a-col :xl="6" :lg="7" :md="8" :sm="24">
8   - <a-form-item label="物料类别">
9   - <a-select
10   - show-search
11   - placeholder="请选择物料类别"
12   - option-filter-prop="children"
13   - v-model="queryParam.materialTypeCode">
14   - <a-select-option v-for="item in materialTypeList" :key="item.code" :value="item.code">
15   - {{ item.code }} {{ item.name }}
16   - </a-select-option>
17   - </a-select>
18   - </a-form-item>
  8 + <a-form-item label="物料类别">
  9 + <a-select
  10 + show-search
  11 + placeholder="请选择物料类别"
  12 + option-filter-prop="children"
  13 + v-model="queryParam.materialTypeCode">
  14 + <a-select-option v-for="item in materialTypeList" :key="item.code" :value="item.code">
  15 + {{ item.code }} {{ item.name }}
  16 + </a-select-option>
  17 + </a-select>
  18 + </a-form-item>
19 19 </a-col>
20 20 <a-col :xl="6" :lg="7" :md="8" :sm="24">
21 21 <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
... ... @@ -34,12 +34,14 @@
34 34 size="middle"
35 35 :scroll="{x:true}"
36 36 bordered
37   - rowKey="id"
  37 + rowKey="materialTypeCode"
38 38 :columns="columns"
39 39 :dataSource="dataSource"
40 40 :pagination="ipagination"
41 41 :loading="loading"
42 42 class="j-table-force-nowrap"
  43 + :customRow="clickThenSelect"
  44 + :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type: 'radio' }"
43 45 @change="handleTableChange">
44 46  
45 47 <span slot="zoneCode" slot-scope="zoneCode">
... ... @@ -52,6 +54,12 @@
52 54 </template>
53 55 </a-table>
54 56 </div>
  57 +
  58 + <a-tabs defaultActiveKey="1">
  59 + <a-tab-pane tab="库存分类详情" key="1">
  60 + <InventoryClassificationDetail :mainId="selectedMainId"/>
  61 + </a-tab-pane>
  62 + </a-tabs>
55 63 </a-card>
56 64 </template>
57 65  
... ... @@ -61,14 +69,16 @@ import &#39;@/assets/less/TableExpand.less&#39;
61 69 import {mixinDevice} from '@/utils/mixin'
62 70 import {JeecgListMixin} from '@/mixins/JeecgListMixin'
63 71 import {getMaterialTypeList, getZoneList} from '@/api/api'
  72 +import InventoryClassificationDetail from "./InventoryClassificationDetail";
64 73  
65 74 export default {
66 75 name: 'ReportInventoryClassificationList',
67 76 mixins: [JeecgListMixin, mixinDevice],
68   - components: {},
  77 + components: {InventoryClassificationDetail},
69 78 data() {
70 79 return {
71 80 description: '库存分类报表页面',
  81 + selectedMainId: '',
72 82 zoneList: [],
73 83 zoneOptions: [],
74 84 materialTypeList: [],
... ... @@ -130,6 +140,15 @@ export default {
130 140 },
131 141 },
132 142 methods: {
  143 + searchQuery() {
  144 + this.loadData(1);
  145 + this.onClearSelected();
  146 + },
  147 + searchReset() {
  148 + this.queryParam = {}
  149 + this.loadData(1);
  150 + this.onClearSelected();
  151 + },
133 152 loadFrom() {
134 153 getMaterialTypeList().then((res) => {
135 154 if (res.success) {
... ... @@ -159,7 +178,26 @@ export default {
159 178 }
160 179 })
161 180 return actions.join('')
162   - }
  181 + },
  182 + clickThenSelect(record) {
  183 + return {
  184 + on: {
  185 + click: () => {
  186 + this.onSelectChange(record.materialTypeCode.split(','), [record])
  187 + }
  188 + }
  189 + }
  190 + },
  191 + onSelectChange(selectedRowKeys, selectionRows) {
  192 + this.selectedMainId = selectionRows[0].materialTypeCode
  193 + this.selectedRowKeys = selectedRowKeys
  194 + this.selectionRows = selectionRows
  195 + },
  196 + onClearSelected() {
  197 + this.selectedMainId = ''
  198 + this.selectedRowKeys = []
  199 + this.selectionRows = []
  200 + },
163 201 }
164 202 }
165 203 </script>
... ...
ant-design-vue-jeecg/src/views/system/report/ReportInventoryDailyList.vue
... ... @@ -71,7 +71,6 @@
71 71 </template>
72 72 </a-table>
73 73 </div>
74   - <inventory-transaction-modal ref="modalForm" @ok="modalFormOk"></inventory-transaction-modal>
75 74 </a-card>
76 75 </template>
77 76  
... ...
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 &#39;@/mixins/JeecgListMixin&#39;
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/inventory/inventoryHeader/mapper/InventoryDetailMapper.java
... ... @@ -25,4 +25,11 @@ public interface InventoryDetailMapper extends BaseMapper&lt;InventoryDetail&gt; {
25 25 * @return 库存分类报表信息
26 26 */
27 27 List<ReportInventoryClassificationDto> selectReportClassification(@Param("materialTypeCode") String materialTypeCode);
  28 +
  29 + /**
  30 + * 根据物料类别查询库存详情
  31 + * @param materialTypeCode 物料类别编码
  32 + * @return 库存详情信息
  33 + */
  34 + List<InventoryDetail> selectByMaterialTypeCode(String materialTypeCode);
28 35 }
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/inventory/inventoryHeader/mapper/xml/InventoryDetailMapper.xml
... ... @@ -29,4 +29,21 @@
29 29 </if>
30 30 GROUP BY type
31 31 </select>
  32 +
  33 + <select id="selectByMaterialTypeCode"
  34 + resultType="org.jeecg.modules.wms.inventory.inventoryHeader.entity.InventoryDetail">
  35 + SELECT
  36 + inventory_detail.material_code,
  37 + inventory_detail.material_name,
  38 + inventory_detail.material_unit,
  39 + inventory_detail.material_spec,
  40 + SUM( qty ) AS qty
  41 + FROM inventory_detail
  42 + INNER JOIN material ON material.code = inventory_detail.material_code
  43 + <if test="materialTypeCode != null and materialTypeCode !=''">
  44 + and material.type = #{materialTypeCode}
  45 + </if>
  46 + INNER JOIN material_type ON material_type.code = material.type
  47 + GROUP BY inventory_detail.material_code
  48 + </select>
32 49 </mapper>
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/inventory/inventoryHeader/service/IInventoryDetailService.java
... ... @@ -140,4 +140,12 @@ public interface IInventoryDetailService extends IService&lt;InventoryDetail&gt; {
140 140 * @return 库存分类报表信息
141 141 */
142 142 List<ReportInventoryClassificationDto> getInventoryClassifyReport(String materialTypeCode);
  143 +
  144 + /**
  145 + * 库存分类详情报表查询
  146 + *
  147 + * @param materialTypeCode 物料类别编码
  148 + * @return 库存分类报表信息
  149 + */
  150 + List<InventoryDetail> getByMaterialTypeCode(String materialTypeCode);
143 151 }
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/inventory/inventoryHeader/service/impl/InventoryDetailServiceImpl.java
... ... @@ -11,6 +11,7 @@ import java.util.stream.Collectors;
11 11  
12 12 import javax.annotation.Resource;
13 13  
  14 +import cn.hutool.core.util.StrUtil;
14 15 import org.jeecg.common.api.vo.Result;
15 16 import org.jeecg.common.exception.JeecgBootException;
16 17 import org.jeecg.modules.wms.config.container.entity.Container;
... ... @@ -495,4 +496,9 @@ public class InventoryDetailServiceImpl extends ServiceImpl&lt;InventoryDetailMappe
495 496 public List<ReportInventoryClassificationDto> getInventoryClassifyReport(String materialTypeCode) {
496 497 return super.baseMapper.selectReportClassification(materialTypeCode);
497 498 }
  499 +
  500 + @Override
  501 + public List<InventoryDetail> getByMaterialTypeCode(String materialTypeCode) {
  502 + return super.baseMapper.selectByMaterialTypeCode(materialTypeCode);
  503 + }
498 504 }
... ...
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&lt;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
... ... @@ -225,12 +226,24 @@ public class ReportController extends JeecgController&lt;InventoryTransaction, IInv
225 226 }
226 227  
227 228 /**
  229 + * 库存分类报表列表详情查询
  230 + */
  231 + @GetMapping(value = "/listInventoryClassificationDetail")
  232 + public Result listInventoryClassificationDetail(String materialTypeCode, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
  233 + @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
  234 + List<InventoryDetail> inventoryClassifyReportList = inventoryDetailService.getByMaterialTypeCode(materialTypeCode);
  235 + Page<InventoryDetail> page = new Page<>(pageNo, pageSize);
  236 + page.setRecords(inventoryClassifyReportList);
  237 + return Result.OK(page);
  238 + }
  239 +
  240 + /**
228 241 * 绩效考核报表列表查询
229 242 */
230 243 @GetMapping(value = "/listPerformanceAssessment")
231 244 public Result listPerformanceAssessment(String realName, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
232 245 @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
233   - List<ReportPerformanceAssessmentDto> performanceAssessmentReportList = taskHeaderService.getPerformanceAssessmentReport(realName);
  246 + List<ReportPerformanceAssessmentDto> performanceAssessmentReportList = taskHeaderHistoryService.getPerformanceAssessmentReport(realName);
234 247 Page<ReportPerformanceAssessmentDto> page = new Page<>(pageNo, pageSize);
235 248 page.setRecords(performanceAssessmentReportList);
236 249 return Result.OK(page);
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/report/dto/ReportPerformanceAssessmentDto.java
... ... @@ -16,7 +16,7 @@ public class ReportPerformanceAssessmentDto implements Serializable {
16 16 private String realName;
17 17  
18 18 /**
19   - * 任务总数
  19 + * 任务总数(只包含入库类型与出库类的)
20 20 */
21 21 private Integer sumTaskQty;
22 22  
... ...
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&lt;TaskHeader&gt; {
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&lt;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&lt;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&lt;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&lt;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&lt;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&lt;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&lt;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&lt;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&lt;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&lt;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&lt;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&lt;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&lt;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&lt;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&lt;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&lt;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 }
... ... @@ -1215,9 +1216,10 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
1215 1216 * 创建空托盘入库
1216 1217 * 1. 判断托盘号、库位编码是否满足要求
1217 1218 * 2. 创建任务,锁定容器、库位
1218   - * @param containerCode
1219   - * @param toLocationCode
1220   - * @param warehouseCode
  1219 + *
  1220 + * @param containerCode
  1221 + * @param toLocationCode
  1222 + * @param warehouseCode
1221 1223 * @return
1222 1224 */
1223 1225 @Override
... ... @@ -1243,7 +1245,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
1243 1245 }
1244 1246  
1245 1247 Result result = taskHeaderService.createTaskLockContainerAndLocation(QuantityConstant.TASK_TYPE_EMPTYRECEIPT, containerCode, QuantityConstant.EMPTY_STRING,
1246   - toLocationCode, warehouseCode);
  1248 + toLocationCode, warehouseCode);
1247 1249 if (!result.isSuccess()) {
1248 1250 throw new JeecgBootException(result.getMessage());
1249 1251 }
... ... @@ -1274,9 +1276,10 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
1274 1276  
1275 1277 /**
1276 1278 * 创建空托盘出库
1277   - * @param containerCode
1278   - * @param toPortCode
1279   - * @param warehouseCode
  1279 + *
  1280 + * @param containerCode
  1281 + * @param toPortCode
  1282 + * @param warehouseCode
1280 1283 * @return
1281 1284 */
1282 1285 @Override
... ... @@ -1295,11 +1298,11 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
1295 1298 Container container = containerService.getContainerByCode(containerCode, warehouseCode);
1296 1299 String fromLocationCode = container.getLocationCode();
1297 1300 Result result = taskHeaderService.createTaskLockContainerAndLocation(QuantityConstant.TASK_TYPE_EMPTYSHIPMENT, containerCode, QuantityConstant.EMPTY_STRING,
1298   - QuantityConstant.EMPTY_STRING, warehouseCode);
  1301 + QuantityConstant.EMPTY_STRING, warehouseCode);
1299 1302 if (!result.isSuccess()) {
1300 1303 throw new JeecgBootException(result.getMessage());
1301 1304 }
1302   - TaskLockEntity taskLockEntity = (TaskLockEntity)result.getResult();
  1305 + TaskLockEntity taskLockEntity = (TaskLockEntity) result.getResult();
1303 1306 String zoneCode = taskLockEntity.getZoneCode();
1304 1307 Port port = portService.getPortByCode(toPortCode, zoneCode, warehouseCode);
1305 1308 if (port == null) {
... ... @@ -1339,8 +1342,8 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
1339 1342 }
1340 1343 LambdaQueryWrapper<Container> containerLambdaQueryWrapper = Wrappers.lambdaQuery();
1341 1344 containerLambdaQueryWrapper.eq(Container::getStatus, QuantityConstant.STATUS_CONTAINER_EMPTY).ne(Container::getLocationCode, QuantityConstant.EMPTY_STRING)
1342   - .eq(Container::getFillStatus, QuantityConstant.STATUS_CONTAINER_FILL_EMPTY).eq(Container::getWarehouseCode, warehouseCode)
1343   - .orderByAsc(Container::getUpdateTime);
  1345 + .eq(Container::getFillStatus, QuantityConstant.STATUS_CONTAINER_FILL_EMPTY).eq(Container::getWarehouseCode, warehouseCode)
  1346 + .orderByAsc(Container::getUpdateTime);
1344 1347 List<Container> containerList = containerService.list(containerLambdaQueryWrapper);
1345 1348 List<Container> removeContainerList = new ArrayList<>();
1346 1349 if (CollectionUtils.isNotEmpty(containerList)) {
... ... @@ -1372,16 +1375,17 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
1372 1375  
1373 1376 /**
1374 1377 * 完成入库任务
1375   - * @param taskHeader 任务
1376   - * @return AjaxResult 完成入库任务结果
  1378 + *
  1379 + * @param taskHeader 任务
  1380 + * @return AjaxResult 完成入库任务结果
1377 1381 */
1378 1382 @Override
1379 1383 @Transactional(rollbackFor = Exception.class)
1380 1384 @OperationLog(bizId = "''", bizType = "'任务追踪'", tag = "'入库任务完成'", extra = "#extraJsonString1",
1381   - msg = "#taskHeader == null ? '' : '任务类型:' + #taskHeader.getTaskType() + ',起始库位:' + #taskHeader.getFromLocationCode() + ',目标库位:' + #taskHeader.getToLocationCode() + ',容器编码:' + #taskHeader.getContainerCode()",
1382   - recordReturnValue = true)
  1385 + msg = "#taskHeader == null ? '' : '任务类型:' + #taskHeader.getTaskType() + ',起始库位:' + #taskHeader.getFromLocationCode() + ',目标库位:' + #taskHeader.getToLocationCode() + ',容器编码:' + #taskHeader.getContainerCode()",
  1386 + recordReturnValue = true)
1383 1387 @OperationLog(bizId = "''", bizType = "'入库单追踪'", tag = "'入库任务完成'", extra = "#extraJsonString1",
1384   - msg = "'任务ID:' + #taskHeader.getId() + ',库位编码:' + #taskHeader.getToLocationCode() + ',容器编码:' + #taskHeader.getContainerCode()", recordReturnValue = true)
  1388 + msg = "'任务ID:' + #taskHeader.getId() + ',库位编码:' + #taskHeader.getToLocationCode() + ',容器编码:' + #taskHeader.getContainerCode()", recordReturnValue = true)
1385 1389 @OperationLog(bizId = "''", bizType = "'入库单追踪'", tag = "'详情入库完成'", extra = "#extraJsonString2", msg = "''", recordReturnValue = true)
1386 1390 public Result completeReceiptTask(TaskHeader taskHeader) {
1387 1391 if (taskHeader == null) {
... ... @@ -1403,7 +1407,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
1403 1407 int allow = parameterConfigurationService.getValueIntByCode(QuantityConstant.RULE_CALL_BOX_ALLOW_EMPTY);
1404 1408 if (allow == QuantityConstant.RULE_ALLOW_EMPTY) {
1405 1409 Result result = taskHeaderService.completeTaskUnLockContainerAndLocation(taskHeader.getContainerFillStatus(), taskType, containerCode,
1406   - fromLocationCode, toLocationCode, warehouseCode);
  1410 + fromLocationCode, toLocationCode, warehouseCode);
1407 1411 if (!result.isSuccess()) {
1408 1412 throw new JeecgBootException(result.getMessage());
1409 1413 }
... ... @@ -1548,7 +1552,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
1548 1552 }
1549 1553 }
1550 1554 Result result = taskHeaderService.completeTaskUnLockContainerAndLocation(taskHeader.getContainerFillStatus(), taskType, containerCode, fromLocationCode,
1551   - toLocationCode, warehouseCode);
  1555 + toLocationCode, warehouseCode);
1552 1556 if (!result.isSuccess()) {
1553 1557 throw new JeecgBootException(result.getMessage());
1554 1558 }
... ... @@ -1566,17 +1570,18 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
1566 1570  
1567 1571 /**
1568 1572 * 完成出库任务
1569   - * @param taskHeader 任务
1570   - * @return result 完成出库任务
  1573 + *
  1574 + * @param taskHeader 任务
  1575 + * @return result 完成出库任务
1571 1576 */
1572 1577 @Override
1573 1578 @Transactional(rollbackFor = Exception.class)
1574 1579 @OperationLog(bizId = "''", bizType = "'任务追踪'", tag = "'出库任务完成'", extra = "#extraJsonString1",
1575   - msg = "#taskHeader == null ? '' : '任务类型:' + #taskHeader.getTaskType() + ',起始库位:' + #taskHeader.getFromLocationCode() + ',目标库位:' + #taskHeader.getToLocationCode() + ',容器编码:' + #taskHeader.getContainerCode()",
1576   - recordReturnValue = true)
  1580 + msg = "#taskHeader == null ? '' : '任务类型:' + #taskHeader.getTaskType() + ',起始库位:' + #taskHeader.getFromLocationCode() + ',目标库位:' + #taskHeader.getToLocationCode() + ',容器编码:' + #taskHeader.getContainerCode()",
  1581 + recordReturnValue = true)
1577 1582 @OperationLog(bizId = "''", bizType = "'出库单追踪'", tag = "'出库任务完成'", extra = "#extraJsonString1",
1578   - msg = "'任务ID:' + #taskHeader.getId() + ',库位编码:' + #taskHeader.getFromLocationCode() + ',容器编码:' + #taskHeader.getContainerCode() + ',目标出入口:' + #taskHeader.getToPortCode()",
1579   - recordReturnValue = true)
  1583 + msg = "'任务ID:' + #taskHeader.getId() + ',库位编码:' + #taskHeader.getFromLocationCode() + ',容器编码:' + #taskHeader.getContainerCode() + ',目标出入口:' + #taskHeader.getToPortCode()",
  1584 + recordReturnValue = true)
1580 1585 @OperationLog(bizId = "''", bizType = "'出库单追踪'", tag = "'详情出库完成'", extra = "#extraJsonString2", msg = "''", recordReturnValue = true)
1581 1586 public Result completeShipmentTask(TaskHeader taskHeader) {
1582 1587 if (taskHeader == null) {
... ... @@ -1614,7 +1619,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
1614 1619 throw new JeecgBootException("完成出库任务,更新出库组盘头失败");
1615 1620 }
1616 1621 List<ShipmentContainerAdvice> shipmentContainerAdviceList =
1617   - shipmentContainerAdviceService.getShipmentContainerAdviceListByShipmentContainerId(shipmentContainerHeader.getId());
  1622 + shipmentContainerAdviceService.getShipmentContainerAdviceListByShipmentContainerId(shipmentContainerHeader.getId());
1618 1623 for (ShipmentContainerAdvice shipmentContainerAdvice : shipmentContainerAdviceList) {
1619 1624 if (!shipmentContainerAdviceService.updateStatusById(QuantityConstant.SHIPMENT_CONTAINER_FINISHED, shipmentContainerAdvice.getId())) {
1620 1625 throw new JeecgBootException("完成出库任务,更新出库预配盘失败");
... ... @@ -1638,7 +1643,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
1638 1643 }
1639 1644 }
1640 1645 Result result = taskHeaderService.completeTaskUnLockContainerAndLocation(taskHeader.getContainerFillStatus(), taskType, containerCode,
1641   - fromLocationCode, toLocationCode, warehouseCode);
  1646 + fromLocationCode, toLocationCode, warehouseCode);
1642 1647 if (!result.isSuccess()) {
1643 1648 throw new JeecgBootException(result.getMessage());
1644 1649 }
... ... @@ -1809,7 +1814,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
1809 1814 }
1810 1815 }
1811 1816 Result result = taskHeaderService.completeTaskUnLockContainerAndLocation(taskHeader.getContainerFillStatus(), taskType, containerCode, fromLocationCode,
1812   - toLocationCode, warehouseCode);
  1817 + toLocationCode, warehouseCode);
1813 1818 if (!result.isSuccess()) {
1814 1819 throw new JeecgBootException(result.getMessage());
1815 1820 }
... ... @@ -1885,8 +1890,8 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
1885 1890 InventoryDetail inventoryDetail1 = inventoryDetailList.get(i);
1886 1891 InventoryDetail inventoryDetail2 = inventoryDetailList.get(j);
1887 1892 if (inventoryDetail1.getMaterialCode().equals(inventoryDetail2.getMaterialCode()) && inventoryDetail1.getBatch().equals(inventoryDetail2.getBatch())
1888   - && inventoryDetail1.getLot().equals(inventoryDetail2.getLot()) && inventoryDetail1.getProject().equals(inventoryDetail2.getProject())
1889   - && inventoryDetail1.getInventoryStatus().equals(inventoryDetail2.getInventoryStatus())) {
  1893 + && inventoryDetail1.getLot().equals(inventoryDetail2.getLot()) && inventoryDetail1.getProject().equals(inventoryDetail2.getProject())
  1894 + && inventoryDetail1.getInventoryStatus().equals(inventoryDetail2.getInventoryStatus())) {
1890 1895 // 属性一样的库存,相加合并。
1891 1896 if (StringUtils.isNotEmpty(inventoryDetail1.getSn())) {
1892 1897 if (!inventoryDetail1.getSn().equals(inventoryDetail2.getSn())) {
... ... @@ -1931,6 +1936,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
1931 1936  
1932 1937 /**
1933 1938 * 锁定容器和库位分4种情况,入库任务、出库任务、分拣任务、换站任务
  1939 + *
1934 1940 * @param
1935 1941 */
1936 1942 @Override
... ... @@ -2147,7 +2153,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
2147 2153 @Override
2148 2154 @Transactional(rollbackFor = Exception.class)
2149 2155 public Result completeTaskUnLockContainerAndLocation(String containerFillStatus, int taskType, String containerCode, String fromLocationCode,
2150   - String toLocationCode, String warehouseCode) {
  2156 + String toLocationCode, String warehouseCode) {
2151 2157 boolean success = false;
2152 2158 if (StringUtils.isEmpty(containerCode)) {
2153 2159 return Result.error("任务类型" + taskType + "完成任务时, 容器编码为空");
... ... @@ -2193,7 +2199,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
2193 2199 break;
2194 2200 case QuantityConstant.TASK_TYPE_OVER_STATION:
2195 2201 success = containerService.updateLocationCodeAndStatus(containerCode, QuantityConstant.EMPTY_STRING, QuantityConstant.STATUS_CONTAINER_EMPTY,
2196   - warehouseCode);
  2202 + warehouseCode);
2197 2203 break;
2198 2204 }
2199 2205 if (!success) {
... ... @@ -2205,7 +2211,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
2205 2211 return Result.error("任务类型" + taskType + "完成任务时," + toLocationCode + "目标库位不存在");
2206 2212 }
2207 2213 success =
2208   - locationService.updateContainerCodeAndStatus(fromLocationCode, QuantityConstant.EMPTY_STRING, QuantityConstant.STATUS_LOCATION_EMPTY, warehouseCode);
  2214 + locationService.updateContainerCodeAndStatus(fromLocationCode, QuantityConstant.EMPTY_STRING, QuantityConstant.STATUS_LOCATION_EMPTY, warehouseCode);
2209 2215 if (!success) {
2210 2216 throw new JeecgBootException("任务类型" + taskType + "完成任务时,更新源库位失败");
2211 2217 }
... ... @@ -2356,7 +2362,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
2356 2362 if (!result.isSuccess()) {
2357 2363 throw new JeecgBootException(result.getMessage());
2358 2364 }
2359   - TaskHeader taskHeader = (TaskHeader)result.getResult();
  2365 + TaskHeader taskHeader = (TaskHeader) result.getResult();
2360 2366 if (taskHeader.getTaskType() == QuantityConstant.TASK_TYPE_SUPPLEMENTRECEIPT) {
2361 2367 if (port == null) {
2362 2368 throw new JeecgBootException("快速入库, 生成补充任务时必须有入库口");
... ... @@ -2426,7 +2432,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
2426 2432 shipmentDetailList.add(shipmentDetail);
2427 2433 shipmentQtyList.add(qty);
2428 2434 List<InventoryDetail> inventoryDetailList =
2429   - inventoryDetailService.getInventoryDetailListByMaterialCodeToShipment(materialCode, zoneCode, qty, warehouseCode);
  2435 + inventoryDetailService.getInventoryDetailListByMaterialCodeToShipment(materialCode, zoneCode, qty, warehouseCode);
2430 2436 List<InventoryDetail> removeInventoryDetailList = new ArrayList<>();
2431 2437 for (InventoryDetail inventoryDetail : inventoryDetailList) {
2432 2438 if (roadWay.intValue() == inventoryDetail.getRoadWay().intValue()) {
... ... @@ -2462,7 +2468,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
2462 2468 ShipmentDetail shipmentDetail = shipmentDetailService.getById(shipmentDetailId);
2463 2469 BigDecimal shipQty = shipmentQtyList.get(i);
2464 2470 InventoryDetail inventoryDetail =
2465   - inventoryDetailService.getInventoryDetailByMaterialCodeToShipment(switchContainerCode, shipmentDetail.getMaterialCode(), shipQty, warehouseCode);
  2471 + inventoryDetailService.getInventoryDetailByMaterialCodeToShipment(switchContainerCode, shipmentDetail.getMaterialCode(), shipQty, warehouseCode);
2466 2472 CombinationModel combinationModel = new CombinationModel();
2467 2473 combinationModel.setShipmentDetail(shipmentDetail);
2468 2474 combinationModel.setInventoryDetail(inventoryDetail);
... ... @@ -2555,8 +2561,9 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
2555 2561  
2556 2562 /**
2557 2563 * 完成空托盘入库任务
2558   - * @param taskHeader 任务
2559   - * @return Result 完成入库任务结果
  2564 + *
  2565 + * @param taskHeader 任务
  2566 + * @return Result 完成入库任务结果
2560 2567 */
2561 2568 @Override
2562 2569 @Transactional(rollbackFor = Exception.class)
... ... @@ -2575,7 +2582,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
2575 2582 return Result.error("完成空托盘入库任务时, 目标库位编码为空");
2576 2583 }
2577 2584 Result result = taskHeaderService.completeTaskUnLockContainerAndLocation(taskHeader.getContainerFillStatus(), QuantityConstant.TASK_TYPE_EMPTYRECEIPT,
2578   - containerCode, QuantityConstant.EMPTY_STRING, toLocationCode, warehouseCode);
  2585 + containerCode, QuantityConstant.EMPTY_STRING, toLocationCode, warehouseCode);
2579 2586 if (!result.isSuccess()) {
2580 2587 throw new JeecgBootException(result.getMessage());
2581 2588 }
... ... @@ -2590,7 +2597,8 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
2590 2597 /**
2591 2598 * 盘点完成
2592 2599 * 盘点有差异完成时状态为105
2593   - * @param taskHeader
  2600 + *
  2601 + * @param taskHeader
2594 2602 * @return
2595 2603 */
2596 2604 @Override
... ... @@ -2870,7 +2878,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
2870 2878 cycleCountHeaderService.updataHeaderStatus(cycleCountDetail.getCycleCountHeadCode());
2871 2879  
2872 2880 Result result = taskHeaderService.completeTaskUnLockContainerAndLocation(taskHeader.getContainerFillStatus(), QuantityConstant.TASK_TYPE_CHECK_OUT,
2873   - containerCode, fromLocationCode, toLocationCode, warehouseCode);
  2881 + containerCode, fromLocationCode, toLocationCode, warehouseCode);
2874 2882 if (!result.isSuccess()) {
2875 2883 throw new JeecgBootException(result.getMessage());
2876 2884 }
... ... @@ -2884,8 +2892,9 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
2884 2892  
2885 2893 /**
2886 2894 * 完成空托盘出库任务
2887   - * @param taskHeader 任务
2888   - * @return Result 完成出库任务结果
  2895 + *
  2896 + * @param taskHeader 任务
  2897 + * @return Result 完成出库任务结果
2889 2898 */
2890 2899 @Override
2891 2900 @Transactional(rollbackFor = Exception.class)
... ... @@ -2921,7 +2930,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
2921 2930 return Result.error("完成空托盘出库任务时," + toPortCode + "目标出库口不存在");
2922 2931 }
2923 2932 Result result = taskHeaderService.completeTaskUnLockContainerAndLocation(taskHeader.getContainerFillStatus(), QuantityConstant.TASK_TYPE_EMPTYSHIPMENT,
2924   - containerCode, fromLocationCode, QuantityConstant.EMPTY_STRING, warehouseCode);
  2933 + containerCode, fromLocationCode, QuantityConstant.EMPTY_STRING, warehouseCode);
2925 2934 if (!result.isSuccess()) {
2926 2935 throw new JeecgBootException(result.getMessage());
2927 2936 }
... ... @@ -2935,8 +2944,9 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
2935 2944  
2936 2945 /**
2937 2946 * 完成移库任务
2938   - * @param taskHeader 任务
2939   - * @return Result 完成移库任务结果
  2947 + *
  2948 + * @param taskHeader 任务
  2949 + * @return Result 完成移库任务结果
2940 2950 */
2941 2951 @Override
2942 2952 @Transactional(rollbackFor = Exception.class)
... ... @@ -2963,7 +2973,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
2963 2973 List<InventoryTransaction> inventoryTransactionList = new ArrayList<>();
2964 2974 LambdaUpdateWrapper<InventoryDetail> inventoryDetailLambdaUpdateWrapper = Wrappers.lambdaUpdate();
2965 2975 inventoryDetailLambdaUpdateWrapper.eq(InventoryDetail::getWarehouseCode, warehouseCode).eq(InventoryDetail::getContainerCode, containerCode)
2966   - .eq(InventoryDetail::getLocationCode, fromLocationCode);
  2976 + .eq(InventoryDetail::getLocationCode, fromLocationCode);
2967 2977 List<InventoryDetail> inventoryDetailList = inventoryDetailService.list(inventoryDetailLambdaUpdateWrapper);
2968 2978 for (InventoryDetail inventoryDetail : inventoryDetailList) {
2969 2979 inventoryDetail.setLocationCode(toLocationCode);
... ... @@ -2994,7 +3004,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
2994 3004 }
2995 3005 }
2996 3006 Result result = taskHeaderService.completeTaskUnLockContainerAndLocation(taskHeader.getContainerFillStatus(), QuantityConstant.TASK_TYPE_TRANSFER,
2997   - containerCode, fromLocationCode, toLocationCode, warehouseCode);
  3007 + containerCode, fromLocationCode, toLocationCode, warehouseCode);
2998 3008 if (!result.isSuccess()) {
2999 3009 throw new JeecgBootException(result.getMessage());
3000 3010 }
... ... @@ -3008,8 +3018,9 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
3008 3018  
3009 3019 /**
3010 3020 * 完成出库查看任务
3011   - * @param taskHeader 任务
3012   - * @return Result 完成出库查看任务结果
  3021 + *
  3022 + * @param taskHeader 任务
  3023 + * @return Result 完成出库查看任务结果
3013 3024 */
3014 3025 @Override
3015 3026 @Transactional(rollbackFor = Exception.class)
... ... @@ -3040,7 +3051,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
3040 3051 boolean success = false;
3041 3052 LambdaUpdateWrapper<InventoryDetail> inventoryDetailLambdaQueryWrapper = Wrappers.lambdaUpdate();
3042 3053 inventoryDetailLambdaQueryWrapper.eq(InventoryDetail::getWarehouseCode, warehouseCode).eq(InventoryDetail::getContainerCode, containerCode)
3043   - .eq(InventoryDetail::getLocationCode, fromLocationCode);
  3054 + .eq(InventoryDetail::getLocationCode, fromLocationCode);
3044 3055 List<InventoryDetail> inventoryDetailList = inventoryDetailService.list(inventoryDetailLambdaQueryWrapper);
3045 3056 if (inventoryDetailList.size() != 0) {
3046 3057 List<InventoryDetail> inventoryDetailList1 = new ArrayList<>();
... ... @@ -3067,7 +3078,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
3067 3078 }
3068 3079  
3069 3080 Result result = taskHeaderService.completeTaskUnLockContainerAndLocation(taskHeader.getContainerFillStatus(), QuantityConstant.TASK_TYPE_CHECK_OUT,
3070   - containerCode, fromLocationCode, toLocationCode, warehouseCode);
  3081 + containerCode, fromLocationCode, toLocationCode, warehouseCode);
3071 3082 if (!result.isSuccess()) {
3072 3083 throw new JeecgBootException(result.getMessage());
3073 3084 }
... ... @@ -3082,8 +3093,9 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
3082 3093  
3083 3094 /**
3084 3095 * 完成跨站任务
3085   - * @param taskHeader 任务
3086   - * @return Result 完成跨站任务结果
  3096 + *
  3097 + * @param taskHeader 任务
  3098 + * @return Result 完成跨站任务结果
3087 3099 */
3088 3100 @Override
3089 3101 @Transactional(rollbackFor = Exception.class)
... ... @@ -3118,7 +3130,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
3118 3130 return Result.error("创建跨站任务时,目标站台为空");
3119 3131 }
3120 3132 Result result = taskHeaderService.completeTaskUnLockContainerAndLocation(taskHeader.getContainerFillStatus(), QuantityConstant.TASK_TYPE_OVER_STATION,
3121   - containerCode, QuantityConstant.EMPTY_STRING, QuantityConstant.EMPTY_STRING, warehouseCode);
  3133 + containerCode, QuantityConstant.EMPTY_STRING, QuantityConstant.EMPTY_STRING, warehouseCode);
3122 3134 if (!result.isSuccess()) {
3123 3135 throw new JeecgBootException(result.getMessage());
3124 3136 }
... ... @@ -3133,8 +3145,9 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
3133 3145  
3134 3146 /**
3135 3147 * 完成空托盘组入库任务
3136   - * @param taskHeader 任务
3137   - * @return Result 完成空托盘组入库任务结果
  3148 + *
  3149 + * @param taskHeader 任务
  3150 + * @return Result 完成空托盘组入库任务结果
3138 3151 */
3139 3152 @Override
3140 3153 @Transactional(rollbackFor = Exception.class)
... ... @@ -3161,7 +3174,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
3161 3174 return Result.error("完成空托盘组入库任务时,没有找到库位" + toLocationCode);
3162 3175 }
3163 3176 Result result = taskHeaderService.completeTaskUnLockContainerAndLocation(taskHeader.getContainerFillStatus(), QuantityConstant.TASK_TYPE_MANY_EMPTYRECEIPT,
3164   - containerCode, QuantityConstant.EMPTY_STRING, toLocationCode, warehouseCode);
  3177 + containerCode, QuantityConstant.EMPTY_STRING, toLocationCode, warehouseCode);
3165 3178 if (!result.isSuccess()) {
3166 3179 throw new JeecgBootException(result.getMessage());
3167 3180 }
... ... @@ -3176,8 +3189,9 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
3176 3189  
3177 3190 /**
3178 3191 * 完成空托盘组出库任务
3179   - * @param taskHeader 任务
3180   - * @return Result 完成空托盘组出库任务结果
  3192 + *
  3193 + * @param taskHeader 任务
  3194 + * @return Result 完成空托盘组出库任务结果
3181 3195 */
3182 3196 @Override
3183 3197 @Transactional(rollbackFor = Exception.class)
... ... @@ -3222,7 +3236,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
3222 3236 throw new JeecgBootException("完成空托盘组出库任务时, 更新任务失败");
3223 3237 }
3224 3238 Result result = taskHeaderService.completeTaskUnLockContainerAndLocation(taskHeader.getContainerFillStatus(), QuantityConstant.TASK_TYPE_MANY_EMPTYSHIPMENT,
3225   - containerCode, fromLocationCode, QuantityConstant.EMPTY_STRING, warehouseCode);
  3239 + containerCode, fromLocationCode, QuantityConstant.EMPTY_STRING, warehouseCode);
3226 3240 if (!result.isSuccess()) {
3227 3241 throw new JeecgBootException(result.getMessage());
3228 3242 }
... ... @@ -3361,7 +3375,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
3361 3375 }
3362 3376 }
3363 3377 Result result = taskHeaderService.completeTaskUnLockContainerAndLocation(taskHeader.getContainerFillStatus(), QuantityConstant.TASK_TYPE_QUALITY,
3364   - containerCode, fromLocationCode, toLocationCode, warehouseCode);
  3378 + containerCode, fromLocationCode, toLocationCode, warehouseCode);
3365 3379 if (!result.isSuccess()) {
3366 3380 throw new JeecgBootException(result.getMessage());
3367 3381 }
... ... @@ -3375,8 +3389,9 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
3375 3389  
3376 3390 /**
3377 3391 * 取消入库任务
3378   - * @param taskHeader 任务
3379   - * @return Result 取消入库任务结果
  3392 + *
  3393 + * @param taskHeader 任务
  3394 + * @return Result 取消入库任务结果
3380 3395 */
3381 3396 @Override
3382 3397 @Transactional(rollbackFor = Exception.class)
... ... @@ -3395,8 +3410,9 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
3395 3410  
3396 3411 /**
3397 3412 * 取消出库任务
3398   - * @param taskHeader 任务
3399   - * @return Result 取消出库任务结果
  3413 + *
  3414 + * @param taskHeader 任务
  3415 + * @return Result 取消出库任务结果
3400 3416 */
3401 3417 @Override
3402 3418 @Transactional(rollbackFor = Exception.class)
... ... @@ -3418,7 +3434,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
3418 3434 log.info("开始取消盘点任务");
3419 3435 LambdaQueryWrapper<CycleCountDetail> cycleCountDetailLambdaQueryWrapper = Wrappers.lambdaQuery();
3420 3436 cycleCountDetailLambdaQueryWrapper.eq(CycleCountDetail::getContainerCode, taskHeader.getContainerCode()).ne(CycleCountDetail::getEnableStatus,
3421   - QuantityConstant.SHIPMENT_RECEIVE_SUCCESS);
  3437 + QuantityConstant.SHIPMENT_RECEIVE_SUCCESS);
3422 3438 CycleCountDetail cycleCountDetail = cycleCountDetailService.getOne(cycleCountDetailLambdaQueryWrapper);
3423 3439 if (cycleCountDetail == null) {
3424 3440 throw new JeecgBootException("取消盘点任务,没有找到盘点明细");
... ... @@ -3474,7 +3490,8 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
3474 3490  
3475 3491 /**
3476 3492 * 取消任务,恢复容器和库位状态
3477   - * @param taskHeader
  3493 + *
  3494 + * @param taskHeader
3478 3495 * @return
3479 3496 */
3480 3497 @Override
... ... @@ -3526,12 +3543,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
3526 3543 public boolean updateById(TaskHeader taskHeader) {
3527 3544 LambdaQueryWrapper<TaskHeader> taskHeaderLambdaQueryWrapper = Wrappers.lambdaQuery();
3528 3545 taskHeaderLambdaQueryWrapper.eq(TaskHeader::getId, taskHeader.getId()).lt(taskHeader.getStatus() != null, TaskHeader::getStatus,
3529   - QuantityConstant.TASK_STATUS_COMPLETED);
  3546 + QuantityConstant.TASK_STATUS_COMPLETED);
3530 3547 return super.update(taskHeader, taskHeaderLambdaQueryWrapper);
3531 3548 }
3532   -
3533   - @Override
3534   - public List<ReportPerformanceAssessmentDto> getPerformanceAssessmentReport(String realName) {
3535   - return super.baseMapper.selectPerformanceAssessment(realName);
3536   - }
3537 3549 }
... ...
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&lt;TaskHeaderHistory&gt; {
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&lt;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 }
... ...