Commit f2361600604b71a1b5dec570806dfc84fb308ecf
1 parent
164c74de
报表:绩效考核报表
Showing
7 changed files
with
247 additions
and
2 deletions
ant-design-vue-jeecg/src/views/system/report/ReportPerformanceAssessmentList.vue
0 → 100644
1 | +<template> | ||
2 | + <a-card :bordered="false"> | ||
3 | + <!-- 查询区域 --> | ||
4 | + <div class="table-page-search-wrapper"> | ||
5 | + <a-form layout="inline" @keyup.enter.native="searchQuery"> | ||
6 | + <a-row :gutter="24"> | ||
7 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> | ||
8 | + <a-form-item label="用户姓名"> | ||
9 | + <a-input placeholder="请输入用户姓名" v-model="queryParam.realName"></a-input> | ||
10 | + </a-form-item> | ||
11 | + </a-col> | ||
12 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> | ||
13 | + <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> | ||
14 | + <a-button id="search" type="primary" @click="searchQuery" icon="search">查询</a-button> | ||
15 | + <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button> | ||
16 | + </span> | ||
17 | + </a-col> | ||
18 | + </a-row> | ||
19 | + </a-form> | ||
20 | + </div> | ||
21 | + <!-- 查询区域-END --> | ||
22 | + <!-- table区域-begin --> | ||
23 | + <div> | ||
24 | + <a-table | ||
25 | + ref="table" | ||
26 | + size="middle" | ||
27 | + :scroll="{x:true}" | ||
28 | + bordered | ||
29 | + rowKey="id" | ||
30 | + :columns="columns" | ||
31 | + :dataSource="dataSource" | ||
32 | + :pagination="ipagination" | ||
33 | + :loading="loading" | ||
34 | + class="j-table-force-nowrap" | ||
35 | + @change="handleTableChange"> | ||
36 | + | ||
37 | + <span slot="zoneCode" slot-scope="zoneCode"> | ||
38 | + <a-tag :key="zoneCode" color="blue"> | ||
39 | + {{ solutionZoneCode(zoneCode) }} | ||
40 | + </a-tag> | ||
41 | + </span> | ||
42 | + <template slot="htmlSlot" slot-scope="text"> | ||
43 | + <div v-html="text"></div> | ||
44 | + </template> | ||
45 | + </a-table> | ||
46 | + </div> | ||
47 | + </a-card> | ||
48 | +</template> | ||
49 | + | ||
50 | +<script> | ||
51 | + | ||
52 | +import '@/assets/less/TableExpand.less' | ||
53 | +import {mixinDevice} from '@/utils/mixin' | ||
54 | +import {JeecgListMixin} from '@/mixins/JeecgListMixin' | ||
55 | +import {getMaterialTypeList, getZoneList} from '@/api/api' | ||
56 | + | ||
57 | +export default { | ||
58 | + name: 'ReportInventoryClassificationList', | ||
59 | + mixins: [JeecgListMixin, mixinDevice], | ||
60 | + components: {}, | ||
61 | + data() { | ||
62 | + return { | ||
63 | + description: '库存分类报表页面', | ||
64 | + zoneList: [], | ||
65 | + zoneOptions: [], | ||
66 | + materialTypeList: [], | ||
67 | + firstLoad: 0, | ||
68 | + // 表头 | ||
69 | + columns: [ | ||
70 | + { | ||
71 | + title: '#', | ||
72 | + dataIndex: '', | ||
73 | + key: 'rowIndex', | ||
74 | + width: 60, | ||
75 | + align: 'center', | ||
76 | + customRender: function (t, r, index) { | ||
77 | + return parseInt(index) + 1 | ||
78 | + } | ||
79 | + }, | ||
80 | + { | ||
81 | + title: '用户姓名', | ||
82 | + align: "center", | ||
83 | + dataIndex: 'realName' | ||
84 | + }, | ||
85 | + { | ||
86 | + title: '入库任务数', | ||
87 | + align: "center", | ||
88 | + dataIndex: 'receiptTaskQty' | ||
89 | + }, | ||
90 | + { | ||
91 | + title: '出库任务数', | ||
92 | + align: "center", | ||
93 | + dataIndex: 'shipmentTaskQty' | ||
94 | + }, | ||
95 | + { | ||
96 | + title: '任务总数', | ||
97 | + align: "center", | ||
98 | + dataIndex: 'sumTaskQty' | ||
99 | + } | ||
100 | + ], | ||
101 | + url: { | ||
102 | + list: "/report/listPerformanceAssessment", | ||
103 | + }, | ||
104 | + } | ||
105 | + }, | ||
106 | + created() { | ||
107 | + this.loadFrom(); | ||
108 | + }, | ||
109 | + mounted() { | ||
110 | + if (this.firstLoad === 0) { | ||
111 | + this.firstLoad = 1; | ||
112 | + return; | ||
113 | + } | ||
114 | + //页面没加载完,此时methods里的方法找不到,使用定时器模拟点击 | ||
115 | + let timeSearch = setInterval(() => { | ||
116 | + let eleSearch = document.getElementById("search"); | ||
117 | + if (eleSearch != null) { | ||
118 | + //调用成功,清除定时器 | ||
119 | + clearInterval(timeSearch) | ||
120 | + eleSearch.click(); | ||
121 | + } | ||
122 | + }, 200) | ||
123 | + }, | ||
124 | + computed: { | ||
125 | + importExcelUrl: function () { | ||
126 | + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; | ||
127 | + }, | ||
128 | + }, | ||
129 | + methods: { | ||
130 | + loadFrom() { | ||
131 | + getMaterialTypeList().then((res) => { | ||
132 | + if (res.success) { | ||
133 | + this.materialTypeList = res.result | ||
134 | + } | ||
135 | + }); | ||
136 | + getZoneList().then((res) => { | ||
137 | + if (res.success) { | ||
138 | + this.zoneList = res.result | ||
139 | + //延迟半秒执行,避免组件未加载完,数据已经加载完 | ||
140 | + setTimeout(() => { | ||
141 | + //slice可以在数组的任何位置进行删除/添加操作 | ||
142 | + this.zoneOptions.splice(0, 1); | ||
143 | + for (const element of res.result) { | ||
144 | + this.zoneOptions.push({value: element.code, text: element.name}) | ||
145 | + } | ||
146 | + }, 500) | ||
147 | + } | ||
148 | + }); | ||
149 | + }, | ||
150 | + solutionZoneCode(value) { | ||
151 | + let actions = [] | ||
152 | + Object.keys(this.zoneList).some(key => { | ||
153 | + if (this.zoneList[key].code === '' + value) { | ||
154 | + actions.push(this.zoneList[key].name) | ||
155 | + return true | ||
156 | + } | ||
157 | + }) | ||
158 | + return actions.join('') | ||
159 | + } | ||
160 | + } | ||
161 | +} | ||
162 | +</script> | ||
163 | +<style scoped> | ||
164 | +@import '~@assets/less/common.less'; | ||
165 | +</style> | ||
0 | \ No newline at end of file | 166 | \ No newline at end of file |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/report/controller/ReportController.java
@@ -31,6 +31,8 @@ import org.jeecg.modules.wms.inventory.inventoryHeader.service.IInventoryDetailS | @@ -31,6 +31,8 @@ import org.jeecg.modules.wms.inventory.inventoryHeader.service.IInventoryDetailS | ||
31 | import org.jeecg.modules.wms.inventory.inventoryTransaction.entity.InventoryTransaction; | 31 | import org.jeecg.modules.wms.inventory.inventoryTransaction.entity.InventoryTransaction; |
32 | import org.jeecg.modules.wms.inventory.inventoryTransaction.service.IInventoryTransactionService; | 32 | import org.jeecg.modules.wms.inventory.inventoryTransaction.service.IInventoryTransactionService; |
33 | import org.jeecg.modules.wms.report.dto.ReportInventoryClassificationDto; | 33 | import org.jeecg.modules.wms.report.dto.ReportInventoryClassificationDto; |
34 | +import org.jeecg.modules.wms.report.dto.ReportPerformanceAssessmentDto; | ||
35 | +import org.jeecg.modules.wms.task.taskHeader.service.ITaskHeaderService; | ||
34 | import org.jeecg.utils.HuahengJwtUtil; | 36 | import org.jeecg.utils.HuahengJwtUtil; |
35 | import org.jeecg.utils.StringUtils; | 37 | import org.jeecg.utils.StringUtils; |
36 | import org.jeecg.utils.constant.QuantityConstant; | 38 | import org.jeecg.utils.constant.QuantityConstant; |
@@ -62,7 +64,7 @@ public class ReportController extends JeecgController<InventoryTransaction, IInv | @@ -62,7 +64,7 @@ public class ReportController extends JeecgController<InventoryTransaction, IInv | ||
62 | @Resource | 64 | @Resource |
63 | private IMaterialService materialService; | 65 | private IMaterialService materialService; |
64 | @Resource | 66 | @Resource |
65 | - private IMaterialTypeService materialTypeService; | 67 | + private ITaskHeaderService taskHeaderService; |
66 | @Resource | 68 | @Resource |
67 | private ILocationService locationService; | 69 | private ILocationService locationService; |
68 | @Resource | 70 | @Resource |
@@ -210,10 +212,22 @@ public class ReportController extends JeecgController<InventoryTransaction, IInv | @@ -210,10 +212,22 @@ public class ReportController extends JeecgController<InventoryTransaction, IInv | ||
210 | */ | 212 | */ |
211 | @GetMapping(value = "/listInventoryClassification") | 213 | @GetMapping(value = "/listInventoryClassification") |
212 | public Result listInventoryClassification(String materialTypeCode, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, | 214 | public Result listInventoryClassification(String materialTypeCode, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, |
213 | - @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest req) { | 215 | + @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) { |
214 | List<ReportInventoryClassificationDto> inventoryClassifyReportList = inventoryDetailService.getInventoryClassifyReport(materialTypeCode); | 216 | List<ReportInventoryClassificationDto> inventoryClassifyReportList = inventoryDetailService.getInventoryClassifyReport(materialTypeCode); |
215 | Page<ReportInventoryClassificationDto> page = new Page<>(pageNo, pageSize); | 217 | Page<ReportInventoryClassificationDto> page = new Page<>(pageNo, pageSize); |
216 | page.setRecords(inventoryClassifyReportList); | 218 | page.setRecords(inventoryClassifyReportList); |
217 | return Result.OK(page); | 219 | return Result.OK(page); |
218 | } | 220 | } |
221 | + | ||
222 | + /** | ||
223 | + * 绩效考核报表列表查询 | ||
224 | + */ | ||
225 | + @GetMapping(value = "/listPerformanceAssessment") | ||
226 | + public Result listPerformanceAssessment(String realName, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, | ||
227 | + @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) { | ||
228 | + List<ReportPerformanceAssessmentDto> performanceAssessmentReportList = taskHeaderService.getPerformanceAssessmentReport(realName); | ||
229 | + Page<ReportPerformanceAssessmentDto> page = new Page<>(pageNo, pageSize); | ||
230 | + page.setRecords(performanceAssessmentReportList); | ||
231 | + return Result.OK(page); | ||
232 | + } | ||
219 | } | 233 | } |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/report/dto/ReportPerformanceAssessmentDto.java
0 → 100644
1 | +package org.jeecg.modules.wms.report.dto; | ||
2 | + | ||
3 | +import lombok.Data; | ||
4 | + | ||
5 | +import java.io.Serializable; | ||
6 | + | ||
7 | +/** | ||
8 | + * 绩效考核报表Dto类 | ||
9 | + */ | ||
10 | +@Data | ||
11 | +public class ReportPerformanceAssessmentDto implements Serializable { | ||
12 | + | ||
13 | + /** | ||
14 | + * 用户姓名 | ||
15 | + */ | ||
16 | + private String realName; | ||
17 | + | ||
18 | + /** | ||
19 | + * 任务总数 | ||
20 | + */ | ||
21 | + private Integer sumTaskQty; | ||
22 | + | ||
23 | + /** | ||
24 | + * 入库任务数(包括整盘入库、补充入库、空容器入库) | ||
25 | + */ | ||
26 | + private Integer receiptTaskQty; | ||
27 | + | ||
28 | + /** | ||
29 | + * 出库任务数(包括整盘出库、分拣出库、空容器出库) | ||
30 | + */ | ||
31 | + private Integer shipmentTaskQty; | ||
32 | +} |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/taskHeader/mapper/TaskHeaderMapper.java
@@ -4,6 +4,7 @@ import java.util.List; | @@ -4,6 +4,7 @@ import java.util.List; | ||
4 | 4 | ||
5 | import org.apache.ibatis.annotations.Param; | 5 | import org.apache.ibatis.annotations.Param; |
6 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; | 6 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
7 | +import org.jeecg.modules.wms.report.dto.ReportPerformanceAssessmentDto; | ||
7 | import org.jeecg.modules.wms.task.taskHeader.entity.TaskHeader; | 8 | import org.jeecg.modules.wms.task.taskHeader.entity.TaskHeader; |
8 | 9 | ||
9 | /** | 10 | /** |
@@ -14,4 +15,10 @@ import org.jeecg.modules.wms.task.taskHeader.entity.TaskHeader; | @@ -14,4 +15,10 @@ import org.jeecg.modules.wms.task.taskHeader.entity.TaskHeader; | ||
14 | */ | 15 | */ |
15 | public interface TaskHeaderMapper extends BaseMapper<TaskHeader> { | 16 | public interface TaskHeaderMapper extends BaseMapper<TaskHeader> { |
16 | 17 | ||
18 | + /** | ||
19 | + * 绩效考核报表查询 | ||
20 | + * @param realName 用户姓名 | ||
21 | + * @return 绩效考核报表信息 | ||
22 | + */ | ||
23 | + List<ReportPerformanceAssessmentDto> selectPerformanceAssessment(@Param("realName") String realName); | ||
17 | } | 24 | } |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/taskHeader/mapper/xml/TaskHeaderMapper.xml
@@ -2,4 +2,18 @@ | @@ -2,4 +2,18 @@ | ||
2 | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | 2 | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
3 | <mapper namespace="org.jeecg.modules.wms.task.taskHeader.mapper.TaskHeaderMapper"> | 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> | ||
5 | </mapper> | 19 | </mapper> |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/taskHeader/service/ITaskHeaderService.java
@@ -9,6 +9,7 @@ import org.jeecg.common.api.vo.Result; | @@ -9,6 +9,7 @@ import org.jeecg.common.api.vo.Result; | ||
9 | import org.jeecg.modules.wms.config.location.entity.Location; | 9 | import org.jeecg.modules.wms.config.location.entity.Location; |
10 | import org.jeecg.modules.wms.inventory.inventoryHeader.entity.InventoryDetail; | 10 | import org.jeecg.modules.wms.inventory.inventoryHeader.entity.InventoryDetail; |
11 | import org.jeecg.modules.wms.inventory.inventoryHeader.entity.InventoryHeader; | 11 | import org.jeecg.modules.wms.inventory.inventoryHeader.entity.InventoryHeader; |
12 | +import org.jeecg.modules.wms.report.dto.ReportPerformanceAssessmentDto; | ||
12 | import org.jeecg.modules.wms.task.taskHeader.entity.QucikReceiptEntity; | 13 | import org.jeecg.modules.wms.task.taskHeader.entity.QucikReceiptEntity; |
13 | import org.jeecg.modules.wms.task.taskHeader.entity.TaskHeader; | 14 | import org.jeecg.modules.wms.task.taskHeader.entity.TaskHeader; |
14 | 15 | ||
@@ -454,4 +455,10 @@ public interface ITaskHeaderService extends IService<TaskHeader> { | @@ -454,4 +455,10 @@ public interface ITaskHeaderService extends IService<TaskHeader> { | ||
454 | 455 | ||
455 | boolean delMain (Integer id); | 456 | boolean delMain (Integer id); |
456 | 457 | ||
458 | + /** | ||
459 | + * 绩效考核报表查询 | ||
460 | + * @param realName 用户姓名 | ||
461 | + * @return 绩效考核报表信息 | ||
462 | + */ | ||
463 | + List<ReportPerformanceAssessmentDto> getPerformanceAssessmentReport(String realName); | ||
457 | } | 464 | } |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/taskHeader/service/impl/TaskHeaderServiceImpl.java
@@ -44,6 +44,7 @@ import org.jeecg.modules.wms.receipt.receiptHeader.service.IReceiptDetailService | @@ -44,6 +44,7 @@ import org.jeecg.modules.wms.receipt.receiptHeader.service.IReceiptDetailService | ||
44 | import org.jeecg.modules.wms.receipt.receiptHeader.service.IReceiptHeaderService; | 44 | import org.jeecg.modules.wms.receipt.receiptHeader.service.IReceiptHeaderService; |
45 | import org.jeecg.modules.wms.receipt.receiving.domain.Receive; | 45 | import org.jeecg.modules.wms.receipt.receiving.domain.Receive; |
46 | import org.jeecg.modules.wms.receipt.receiving.service.IReceiveService; | 46 | import org.jeecg.modules.wms.receipt.receiving.service.IReceiveService; |
47 | +import org.jeecg.modules.wms.report.dto.ReportPerformanceAssessmentDto; | ||
47 | import org.jeecg.modules.wms.shipment.shipmentCombination.entity.CombinationModel; | 48 | import org.jeecg.modules.wms.shipment.shipmentCombination.entity.CombinationModel; |
48 | import org.jeecg.modules.wms.shipment.shipmentCombination.service.IShipmentCombinationService; | 49 | import org.jeecg.modules.wms.shipment.shipmentCombination.service.IShipmentCombinationService; |
49 | import org.jeecg.modules.wms.shipment.shipmentContainerAdvice.entity.ShipmentContainerAdvice; | 50 | import org.jeecg.modules.wms.shipment.shipmentContainerAdvice.entity.ShipmentContainerAdvice; |
@@ -3525,4 +3526,9 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | @@ -3525,4 +3526,9 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | ||
3525 | QuantityConstant.TASK_STATUS_COMPLETED); | 3526 | QuantityConstant.TASK_STATUS_COMPLETED); |
3526 | return super.update(taskHeader, taskHeaderLambdaQueryWrapper); | 3527 | return super.update(taskHeader, taskHeaderLambdaQueryWrapper); |
3527 | } | 3528 | } |
3529 | + | ||
3530 | + @Override | ||
3531 | + public List<ReportPerformanceAssessmentDto> getPerformanceAssessmentReport(String realName) { | ||
3532 | + return super.baseMapper.selectPerformanceAssessment(realName); | ||
3533 | + } | ||
3528 | } | 3534 | } |