lamphua пре 1 месец
родитељ
комит
c2b4a92d2c

+ 14
- 0
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/domain/CmcPerformanceStaff.java Прегледај датотеку

@@ -3,6 +3,7 @@ package com.ruoyi.oa.domain;
3 3
 import java.math.BigDecimal;
4 4
 import java.util.Date;
5 5
 import com.fasterxml.jackson.annotation.JsonFormat;
6
+import com.ruoyi.common.core.domain.entity.SysDept;
6 7
 import com.ruoyi.common.core.domain.entity.SysUser;
7 8
 import org.apache.commons.lang3.builder.ToStringBuilder;
8 9
 import org.apache.commons.lang3.builder.ToStringStyle;
@@ -36,6 +37,7 @@ public class CmcPerformanceStaff extends BaseEntity
36 37
     @Excel(name = "姓名")
37 38
     private String nickName;
38 39
     private Long userId;
40
+    private String deptName;
39 41
 
40 42
     /** 作业类别 */
41 43
     @Excel(name = "作业类别")
@@ -84,6 +86,8 @@ public class CmcPerformanceStaff extends BaseEntity
84 86
 
85 87
     private SysUser user;
86 88
 
89
+    private SysDept dept;
90
+
87 91
     private CmcProject project;
88 92
 
89 93
     public void setPerformanceStaffId(Integer performanceStaffId)
@@ -161,6 +165,16 @@ public class CmcPerformanceStaff extends BaseEntity
161 165
     {
162 166
         return user;
163 167
     }
168
+    public void setDept(SysDept dept)
169
+    {
170
+        this.dept = dept;
171
+        this.deptName = dept == null ? "" : dept.getDeptName();
172
+    }
173
+
174
+    public SysDept getDept()
175
+    {
176
+        return dept;
177
+    }
164 178
     public void setWorkType(String workType) 
165 179
     {
166 180
         this.workType = workType;

+ 10
- 3
oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcPerformanceStaffMapper.xml Прегледај датотеку

@@ -24,6 +24,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
24 24
         <result property="remark"    column="remark"    />
25 25
         <association property="project"    javaType="CmcProject"         resultMap="CmcProjectResult" />
26 26
         <association property="user"    javaType="SysUser"         resultMap="SysUserResult" />
27
+        <association property="dept"    javaType="SysDept"         resultMap="SysDeptResult" />
27 28
     </resultMap>
28 29
 
29 30
     <resultMap type="SysUser" id="SysUserResult">
@@ -37,11 +38,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
37 38
     <result property="projectName"    column="project_name"    />
38 39
     </resultMap>
39 40
 
41
+    <resultMap type="SysDept" id="SysDeptResult">
42
+    <result property="deptId"    column="dept_id"    />
43
+    <result property="deptName"    column="dept_name"    />
44
+    </resultMap>
45
+
40 46
     <sql id="selectCmcPerformanceStaffVo">
41
-        select ps.performance_staff_id, ps.performance_id, ps.project_id, p.project_number, p.project_name, ps.user_id, u.nick_name, ps.work_type, ps.content, ps.scale_grade, ps.workload, ps.unit, ps.price,
47
+        select ps.performance_staff_id, ps.performance_id, ps.project_id, p.project_number, p.project_name, ps.user_id, u.nick_name, d.dept_name, ps.work_type, ps.content, ps.scale_grade, ps.workload, ps.unit, ps.price,
42 48
                ps.coefficient, ps.produce_performance, ps.manage_performance, ps.performance_month, ps.remark from cmc_performance_staff as ps
43 49
         left join cmc_project as p on p.project_id = ps.project_id
44 50
         left join sys_user as u on u.user_id = ps.user_id
51
+        left join sys_dept as d on d.dept_id = u.dept_id
45 52
     </sql>
46 53
 
47 54
     <select id="selectCmcPerformanceStaffList" parameterType="CmcPerformanceStaff" resultMap="CmcPerformanceStaffResult">
@@ -62,7 +69,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
62 69
     </select>
63 70
 
64 71
     <select id="selectMonthPerformanceList" parameterType="String" resultMap="CmcPerformanceStaffResult">
65
-        select avg(t1.produce_performance) * 1.6 as manage_performance, t2.produce_performance, t2.user_id, t2.nick_name, t2.dept_name, t2.performance_month
72
+        select cast(avg(t1.produce_performance) * 1.6 as decimal(10,2)) as manage_performance, t2.produce_performance, t2.user_id, t2.nick_name, t2.dept_name, t2.performance_month
66 73
         from
67 74
         (select sum(ps.produce_performance) as produce_performance, u.nick_name, d.dept_name, p.post_name, ps.user_id, ps.performance_month from cmc_performance_staff as ps
68 75
         left join sys_user as u on u.user_id = ps.user_id
@@ -79,7 +86,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
79 86
         where p.post_name = '主任' and ps.performance_id = #{param1} and u.dept_id = #{param2}
80 87
         group by user_id) as t2
81 88
         union all
82
-        select avg(t1.produce_performance) * 1.2 as manage_performance, t2.produce_performance, t2.user_id, t2.nick_name, t2.dept_name, t2.performance_month
89
+        select cast(avg(t1.produce_performance) * 1.2 as decimal(10,2)) as manage_performance, t2.produce_performance, t2.user_id, t2.nick_name, t2.dept_name, t2.performance_month
83 90
         from
84 91
         (select sum(ps.produce_performance) as produce_performance, u.nick_name, d.dept_name, p.post_name, ps.user_id, ps.performance_month from cmc_performance_staff as ps
85 92
         left join sys_user as u on u.user_id = ps.user_id

+ 1
- 1
oa-ui/src/views/flowable/form/performance/performanceForm.vue Прегледај датотеку

@@ -126,7 +126,7 @@
126 126
         <div class="table-title">绩效统计表</div>
127 127
         <el-table :data="performanceTableData" style="width: 100%">
128 128
           <el-table-column prop="nickName" label="姓名" />
129
-          <el-table-column prop="deptName" label="部门" />
129
+          <el-table-column prop="dept.deptName" label="部门" />
130 130
           <el-table-column prop="producePerformance" label="生产绩效" />
131 131
           <el-table-column prop="managePerformance" label="管理绩效" />
132 132
           <el-table-column prop="performanceMonth" label="统计月份">

Loading…
Откажи
Сачувај