Browse Source

新增员工绩效表

lamphua 2 days ago
parent
commit
c574ed80ac

+ 97
- 0
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcPerformanceStaffController.java View File

@@ -0,0 +1,97 @@
1
+package com.ruoyi.web.controller.oa;
2
+
3
+import java.util.List;
4
+import javax.servlet.http.HttpServletResponse;
5
+import org.springframework.beans.factory.annotation.Autowired;
6
+import org.springframework.web.bind.annotation.GetMapping;
7
+import org.springframework.web.bind.annotation.PostMapping;
8
+import org.springframework.web.bind.annotation.PutMapping;
9
+import org.springframework.web.bind.annotation.DeleteMapping;
10
+import org.springframework.web.bind.annotation.PathVariable;
11
+import org.springframework.web.bind.annotation.RequestBody;
12
+import org.springframework.web.bind.annotation.RequestMapping;
13
+import org.springframework.web.bind.annotation.RestController;
14
+import com.ruoyi.common.annotation.Log;
15
+import com.ruoyi.common.core.controller.BaseController;
16
+import com.ruoyi.common.core.domain.AjaxResult;
17
+import com.ruoyi.common.enums.BusinessType;
18
+import com.ruoyi.oa.domain.CmcPerformanceStaff;
19
+import com.ruoyi.oa.service.ICmcPerformanceStaffService;
20
+import com.ruoyi.common.utils.poi.ExcelUtil;
21
+import com.ruoyi.common.core.page.TableDataInfo;
22
+
23
+/**
24
+ * cmc员工绩效Controller
25
+ * 
26
+ * @author cmc
27
+ * @date 2025-06-04
28
+ */
29
+@RestController
30
+@RequestMapping("/oa/performanceStaff")
31
+public class CmcPerformanceStaffController extends BaseController
32
+{
33
+    @Autowired
34
+    private ICmcPerformanceStaffService cmcPerformanceStaffService;
35
+
36
+    /**
37
+     * 查询cmc员工绩效列表
38
+     */
39
+    @GetMapping("/list")
40
+    public TableDataInfo list(CmcPerformanceStaff cmcPerformanceStaff)
41
+    {
42
+        startPage();
43
+        List<CmcPerformanceStaff> list = cmcPerformanceStaffService.selectCmcPerformanceStaffList(cmcPerformanceStaff);
44
+        return getDataTable(list);
45
+    }
46
+
47
+    /**
48
+     * 导出cmc员工绩效列表
49
+     */
50
+    @Log(title = "cmc员工绩效", businessType = BusinessType.EXPORT)
51
+    @PostMapping("/export")
52
+    public void export(HttpServletResponse response, CmcPerformanceStaff cmcPerformanceStaff)
53
+    {
54
+        List<CmcPerformanceStaff> list = cmcPerformanceStaffService.selectCmcPerformanceStaffList(cmcPerformanceStaff);
55
+        ExcelUtil<CmcPerformanceStaff> util = new ExcelUtil<CmcPerformanceStaff>(CmcPerformanceStaff.class);
56
+        util.exportExcel(response, list, "cmc员工绩效数据");
57
+    }
58
+
59
+    /**
60
+     * 获取cmc员工绩效详细信息
61
+     */
62
+    @GetMapping(value = "/{performanceStaffId}")
63
+    public AjaxResult getInfo(@PathVariable("performanceStaffId") Long performanceStaffId)
64
+    {
65
+        return success(cmcPerformanceStaffService.selectCmcPerformanceStaffByPerformanceStaffId(performanceStaffId));
66
+    }
67
+
68
+    /**
69
+     * 新增cmc员工绩效
70
+     */
71
+    @Log(title = "cmc员工绩效", businessType = BusinessType.INSERT)
72
+    @PostMapping
73
+    public AjaxResult add(@RequestBody CmcPerformanceStaff cmcPerformanceStaff)
74
+    {
75
+        return toAjax(cmcPerformanceStaffService.insertCmcPerformanceStaff(cmcPerformanceStaff));
76
+    }
77
+
78
+    /**
79
+     * 修改cmc员工绩效
80
+     */
81
+    @Log(title = "cmc员工绩效", businessType = BusinessType.UPDATE)
82
+    @PutMapping
83
+    public AjaxResult edit(@RequestBody CmcPerformanceStaff cmcPerformanceStaff)
84
+    {
85
+        return toAjax(cmcPerformanceStaffService.updateCmcPerformanceStaff(cmcPerformanceStaff));
86
+    }
87
+
88
+    /**
89
+     * 删除cmc员工绩效
90
+     */
91
+    @Log(title = "cmc员工绩效", businessType = BusinessType.DELETE)
92
+	@DeleteMapping("/{performanceStaffIds}")
93
+    public AjaxResult remove(@PathVariable Long[] performanceStaffIds)
94
+    {
95
+        return success(cmcPerformanceStaffService.deleteCmcPerformanceStaffByPerformanceStaffIds(performanceStaffIds));
96
+    }
97
+}

+ 212
- 0
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/domain/CmcPerformanceStaff.java View File

@@ -0,0 +1,212 @@
1
+package com.ruoyi.oa.domain;
2
+
3
+import java.math.BigDecimal;
4
+import java.util.Date;
5
+import com.fasterxml.jackson.annotation.JsonFormat;
6
+import com.ruoyi.common.core.domain.entity.SysUser;
7
+import org.apache.commons.lang3.builder.ToStringBuilder;
8
+import org.apache.commons.lang3.builder.ToStringStyle;
9
+import com.ruoyi.common.annotation.Excel;
10
+import com.ruoyi.common.core.domain.BaseEntity;
11
+
12
+/**
13
+ * cmc员工绩效对象 cmc_performance_staff
14
+ * 
15
+ * @author cmc
16
+ * @date 2025-06-04
17
+ */
18
+public class CmcPerformanceStaff extends BaseEntity
19
+{
20
+    private static final long serialVersionUID = 1L;
21
+
22
+    /** 员工绩效id */
23
+    private Long performanceStaffId;
24
+
25
+    /** 项目id */
26
+    private String projectId;
27
+    @Excel(name = "项目编号")
28
+    private String projectNumber;
29
+    @Excel(name = "项目名称")
30
+    private String projectName;
31
+
32
+    /** 员工姓名 */
33
+    @Excel(name = "员工姓名")
34
+    private String nickName;
35
+    private Long userId;
36
+
37
+    /** 作业类别 */
38
+    @Excel(name = "作业类别")
39
+    private String workType;
40
+
41
+    /** 工作内容 */
42
+    @Excel(name = "工作内容")
43
+    private String content;
44
+
45
+    /** 比例尺 */
46
+    @Excel(name = "比例尺")
47
+    private String scaleGrade;
48
+
49
+    /** 工作量 */
50
+    @Excel(name = "工作量")
51
+    private Double workload;
52
+
53
+    /** 单位 */
54
+    @Excel(name = "单位")
55
+    private String unit;
56
+
57
+    /** 系数 */
58
+    @Excel(name = "系数")
59
+    private Double coefficient;
60
+
61
+    /** 绩效 */
62
+    @Excel(name = "绩效")
63
+    private BigDecimal performance;
64
+
65
+    /** 月份 */
66
+    @JsonFormat(pattern = "yyyy-MM-dd")
67
+    @Excel(name = "月份", width = 30, dateFormat = "yyyy-MM-dd")
68
+    private Date performanceMonth;
69
+
70
+    private SysUser user;
71
+
72
+    private CmcProject project;
73
+
74
+    public void setPerformanceStaffId(Long performanceStaffId) 
75
+    {
76
+        this.performanceStaffId = performanceStaffId;
77
+    }
78
+
79
+    public Long getPerformanceStaffId() 
80
+    {
81
+        return performanceStaffId;
82
+    }
83
+    public void setProjectId(String projectId) 
84
+    {
85
+        this.projectId = projectId;
86
+    }
87
+
88
+    public String getProjectId() 
89
+    {
90
+        return projectId;
91
+    }
92
+    public void setProject(CmcProject project)
93
+    {
94
+        this.project = project;
95
+        this.projectNumber = project == null ? "" : project.getProjectNumber();
96
+        this.projectName = project == null ? "" : project.getProjectName();
97
+    }
98
+
99
+    public CmcProject getProject()
100
+    {
101
+        return project;
102
+    }
103
+    public void setUserId(Long userId) 
104
+    {
105
+        this.userId = userId;
106
+    }
107
+
108
+    public Long getUserId() 
109
+    {
110
+        return userId;
111
+    }
112
+    public void setUser(SysUser user)
113
+    {
114
+        this.user = user;
115
+        this.nickName = user == null ? "" : user.getNickName();
116
+    }
117
+
118
+    public SysUser getUser()
119
+    {
120
+        return user;
121
+    }
122
+    public void setWorkType(String workType) 
123
+    {
124
+        this.workType = workType;
125
+    }
126
+
127
+    public String getWorkType() 
128
+    {
129
+        return workType;
130
+    }
131
+    public void setContent(String content) 
132
+    {
133
+        this.content = content;
134
+    }
135
+
136
+    public String getContent() 
137
+    {
138
+        return content;
139
+    }
140
+    public void setScaleGrade(String scaleGrade) 
141
+    {
142
+        this.scaleGrade = scaleGrade;
143
+    }
144
+
145
+    public String getScaleGrade() 
146
+    {
147
+        return scaleGrade;
148
+    }
149
+    public void setWorkload(Double workload) 
150
+    {
151
+        this.workload = workload;
152
+    }
153
+
154
+    public Double getWorkload() 
155
+    {
156
+        return workload;
157
+    }
158
+    public void setUnit(String unit) 
159
+    {
160
+        this.unit = unit;
161
+    }
162
+
163
+    public String getUnit() 
164
+    {
165
+        return unit;
166
+    }
167
+    public void setCoefficient(Double coefficient) 
168
+    {
169
+        this.coefficient = coefficient;
170
+    }
171
+
172
+    public Double getCoefficient() 
173
+    {
174
+        return coefficient;
175
+    }
176
+    public void setPerformance(BigDecimal performance) 
177
+    {
178
+        this.performance = performance;
179
+    }
180
+
181
+    public BigDecimal getPerformance() 
182
+    {
183
+        return performance;
184
+    }
185
+    public void setPerformacneMonth(Date performanceMonth) 
186
+    {
187
+        this.performanceMonth = performanceMonth;
188
+    }
189
+
190
+    public Date getPerformacneMonth() 
191
+    {
192
+        return performanceMonth;
193
+    }
194
+
195
+    @Override
196
+    public String toString() {
197
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
198
+            .append("performanceStaffId", getPerformanceStaffId())
199
+            .append("projectId", getProjectId())
200
+            .append("userId", getUserId())
201
+            .append("workType", getWorkType())
202
+            .append("content", getContent())
203
+            .append("scaleGrade", getScaleGrade())
204
+            .append("workload", getWorkload())
205
+            .append("unit", getUnit())
206
+            .append("coefficient", getCoefficient())
207
+            .append("performance", getPerformance())
208
+            .append("performanceMonth", getPerformacneMonth())
209
+            .append("remark", getRemark())
210
+            .toString();
211
+    }
212
+}

+ 61
- 0
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/mapper/CmcPerformanceStaffMapper.java View File

@@ -0,0 +1,61 @@
1
+package com.ruoyi.oa.mapper;
2
+
3
+import java.util.List;
4
+import com.ruoyi.oa.domain.CmcPerformanceStaff;
5
+
6
+/**
7
+ * cmc员工绩效Mapper接口
8
+ * 
9
+ * @author cmc
10
+ * @date 2025-06-04
11
+ */
12
+public interface CmcPerformanceStaffMapper 
13
+{
14
+    /**
15
+     * 查询cmc员工绩效
16
+     * 
17
+     * @param performanceStaffId cmc员工绩效主键
18
+     * @return cmc员工绩效
19
+     */
20
+    public CmcPerformanceStaff selectCmcPerformanceStaffByPerformanceStaffId(Long performanceStaffId);
21
+
22
+    /**
23
+     * 查询cmc员工绩效列表
24
+     * 
25
+     * @param cmcPerformanceStaff cmc员工绩效
26
+     * @return cmc员工绩效集合
27
+     */
28
+    public List<CmcPerformanceStaff> selectCmcPerformanceStaffList(CmcPerformanceStaff cmcPerformanceStaff);
29
+
30
+    /**
31
+     * 新增cmc员工绩效
32
+     * 
33
+     * @param cmcPerformanceStaff cmc员工绩效
34
+     * @return 结果
35
+     */
36
+    public int insertCmcPerformanceStaff(CmcPerformanceStaff cmcPerformanceStaff);
37
+
38
+    /**
39
+     * 修改cmc员工绩效
40
+     * 
41
+     * @param cmcPerformanceStaff cmc员工绩效
42
+     * @return 结果
43
+     */
44
+    public int updateCmcPerformanceStaff(CmcPerformanceStaff cmcPerformanceStaff);
45
+
46
+    /**
47
+     * 删除cmc员工绩效
48
+     * 
49
+     * @param performanceStaffId cmc员工绩效主键
50
+     * @return 结果
51
+     */
52
+    public int deleteCmcPerformanceStaffByPerformanceStaffId(Long performanceStaffId);
53
+
54
+    /**
55
+     * 批量删除cmc员工绩效
56
+     * 
57
+     * @param performanceStaffIds 需要删除的数据主键集合
58
+     * @return 结果
59
+     */
60
+    public int deleteCmcPerformanceStaffByPerformanceStaffIds(Long[] performanceStaffIds);
61
+}

+ 61
- 0
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/service/ICmcPerformanceStaffService.java View File

@@ -0,0 +1,61 @@
1
+package com.ruoyi.oa.service;
2
+
3
+import java.util.List;
4
+import com.ruoyi.oa.domain.CmcPerformanceStaff;
5
+
6
+/**
7
+ * cmc员工绩效Service接口
8
+ * 
9
+ * @author cmc
10
+ * @date 2025-06-04
11
+ */
12
+public interface ICmcPerformanceStaffService 
13
+{
14
+    /**
15
+     * 查询cmc员工绩效
16
+     * 
17
+     * @param performanceStaffId cmc员工绩效主键
18
+     * @return cmc员工绩效
19
+     */
20
+    public CmcPerformanceStaff selectCmcPerformanceStaffByPerformanceStaffId(Long performanceStaffId);
21
+
22
+    /**
23
+     * 查询cmc员工绩效列表
24
+     * 
25
+     * @param cmcPerformanceStaff cmc员工绩效
26
+     * @return cmc员工绩效集合
27
+     */
28
+    public List<CmcPerformanceStaff> selectCmcPerformanceStaffList(CmcPerformanceStaff cmcPerformanceStaff);
29
+
30
+    /**
31
+     * 新增cmc员工绩效
32
+     * 
33
+     * @param cmcPerformanceStaff cmc员工绩效
34
+     * @return 结果
35
+     */
36
+    public int insertCmcPerformanceStaff(CmcPerformanceStaff cmcPerformanceStaff);
37
+
38
+    /**
39
+     * 修改cmc员工绩效
40
+     * 
41
+     * @param cmcPerformanceStaff cmc员工绩效
42
+     * @return 结果
43
+     */
44
+    public int updateCmcPerformanceStaff(CmcPerformanceStaff cmcPerformanceStaff);
45
+
46
+    /**
47
+     * 批量删除cmc员工绩效
48
+     * 
49
+     * @param performanceStaffIds 需要删除的cmc员工绩效主键集合
50
+     * @return 结果
51
+     */
52
+    public int deleteCmcPerformanceStaffByPerformanceStaffIds(Long[] performanceStaffIds);
53
+
54
+    /**
55
+     * 删除cmc员工绩效信息
56
+     * 
57
+     * @param performanceStaffId cmc员工绩效主键
58
+     * @return 结果
59
+     */
60
+    public int deleteCmcPerformanceStaffByPerformanceStaffId(Long performanceStaffId);
61
+}

+ 93
- 0
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/service/impl/CmcPerformanceStaffServiceImpl.java View File

@@ -0,0 +1,93 @@
1
+package com.ruoyi.oa.service.impl;
2
+
3
+import java.util.List;
4
+import org.springframework.beans.factory.annotation.Autowired;
5
+import org.springframework.stereotype.Service;
6
+import com.ruoyi.oa.mapper.CmcPerformanceStaffMapper;
7
+import com.ruoyi.oa.domain.CmcPerformanceStaff;
8
+import com.ruoyi.oa.service.ICmcPerformanceStaffService;
9
+
10
+/**
11
+ * cmc员工绩效Service业务层处理
12
+ * 
13
+ * @author cmc
14
+ * @date 2025-06-04
15
+ */
16
+@Service
17
+public class CmcPerformanceStaffServiceImpl implements ICmcPerformanceStaffService 
18
+{
19
+    @Autowired
20
+    private CmcPerformanceStaffMapper cmcPerformanceStaffMapper;
21
+
22
+    /**
23
+     * 查询cmc员工绩效
24
+     * 
25
+     * @param performanceStaffId cmc员工绩效主键
26
+     * @return cmc员工绩效
27
+     */
28
+    @Override
29
+    public CmcPerformanceStaff selectCmcPerformanceStaffByPerformanceStaffId(Long performanceStaffId)
30
+    {
31
+        return cmcPerformanceStaffMapper.selectCmcPerformanceStaffByPerformanceStaffId(performanceStaffId);
32
+    }
33
+
34
+    /**
35
+     * 查询cmc员工绩效列表
36
+     * 
37
+     * @param cmcPerformanceStaff cmc员工绩效
38
+     * @return cmc员工绩效
39
+     */
40
+    @Override
41
+    public List<CmcPerformanceStaff> selectCmcPerformanceStaffList(CmcPerformanceStaff cmcPerformanceStaff)
42
+    {
43
+        return cmcPerformanceStaffMapper.selectCmcPerformanceStaffList(cmcPerformanceStaff);
44
+    }
45
+
46
+    /**
47
+     * 新增cmc员工绩效
48
+     * 
49
+     * @param cmcPerformanceStaff cmc员工绩效
50
+     * @return 结果
51
+     */
52
+    @Override
53
+    public int insertCmcPerformanceStaff(CmcPerformanceStaff cmcPerformanceStaff)
54
+    {
55
+        return cmcPerformanceStaffMapper.insertCmcPerformanceStaff(cmcPerformanceStaff);
56
+    }
57
+
58
+    /**
59
+     * 修改cmc员工绩效
60
+     * 
61
+     * @param cmcPerformanceStaff cmc员工绩效
62
+     * @return 结果
63
+     */
64
+    @Override
65
+    public int updateCmcPerformanceStaff(CmcPerformanceStaff cmcPerformanceStaff)
66
+    {
67
+        return cmcPerformanceStaffMapper.updateCmcPerformanceStaff(cmcPerformanceStaff);
68
+    }
69
+
70
+    /**
71
+     * 批量删除cmc员工绩效
72
+     * 
73
+     * @param performanceStaffIds 需要删除的cmc员工绩效主键
74
+     * @return 结果
75
+     */
76
+    @Override
77
+    public int deleteCmcPerformanceStaffByPerformanceStaffIds(Long[] performanceStaffIds)
78
+    {
79
+        return cmcPerformanceStaffMapper.deleteCmcPerformanceStaffByPerformanceStaffIds(performanceStaffIds);
80
+    }
81
+
82
+    /**
83
+     * 删除cmc员工绩效信息
84
+     * 
85
+     * @param performanceStaffId cmc员工绩效主键
86
+     * @return 结果
87
+     */
88
+    @Override
89
+    public int deleteCmcPerformanceStaffByPerformanceStaffId(Long performanceStaffId)
90
+    {
91
+        return cmcPerformanceStaffMapper.deleteCmcPerformanceStaffByPerformanceStaffId(performanceStaffId);
92
+    }
93
+}

+ 120
- 0
oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcPerformanceStaffMapper.xml View File

@@ -0,0 +1,120 @@
1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+<!DOCTYPE mapper
3
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
4
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
5
+<mapper namespace="com.ruoyi.oa.mapper.CmcPerformanceStaffMapper">
6
+    
7
+    <resultMap type="CmcPerformanceStaff" id="CmcPerformanceStaffResult">
8
+        <result property="performanceStaffId"    column="performance_staff_id"    />
9
+        <result property="projectId"    column="project_id"    />
10
+        <result property="userId"    column="user_id"    />
11
+        <result property="workType"    column="work_type"    />
12
+        <result property="content"    column="content"    />
13
+        <result property="scaleGrade"    column="scale_grade"    />
14
+        <result property="workload"    column="workload"    />
15
+        <result property="unit"    column="unit"    />
16
+        <result property="coefficient"    column="coefficient"    />
17
+        <result property="performance"    column="performance"    />
18
+        <result property="performanceMonth"    column="performance_month"    />
19
+        <result property="remark"    column="remark"    />
20
+        <association property="project"    javaType="CmcProject"         resultMap="CmcProjectResult" />
21
+        <association property="user"    javaType="SysUser"         resultMap="SysUserResult" />
22
+    </resultMap>
23
+
24
+    <resultMap type="SysUser" id="SysUserResult">
25
+        <result property="userId"    column="user_id"    />
26
+        <result property="nickName"    column="nick_name"    />
27
+    </resultMap>
28
+
29
+    <resultMap type="CmcProject" id="CmcProjectResult">
30
+    <result property="projectId"    column="project_id"    />
31
+    <result property="projectNumber"    column="project_number"    />
32
+    <result property="projectName"    column="project_name"    />
33
+    </resultMap>
34
+
35
+    <sql id="selectCmcPerformanceStaffVo">
36
+        select ps.performance_staff_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.coefficient, ps.performance, ps.performance_month, ps.remark from cmc_performance_staff as ps
37
+        left join cmc_project as p on p.project_id = ps.project_id
38
+        left join sys_user as u on u.user_id = ps.user_id
39
+    </sql>
40
+
41
+    <select id="selectCmcPerformanceStaffList" parameterType="CmcPerformanceStaff" resultMap="CmcPerformanceStaffResult">
42
+        <include refid="selectCmcPerformanceStaffVo"/>
43
+        <where>  
44
+            <if test="projectId != null  and projectId != ''"> and ps.project_id = #{projectId}</if>
45
+            <if test="userId != null "> and ps.user_id = #{userId}</if>
46
+            <if test="workType != null  and workType != ''"> and ps.work_type = #{workType}</if>
47
+            <if test="content != null  and content != ''"> and ps.content = #{content}</if>
48
+            <if test="scaleGrade != null  and scaleGrade != ''"> and ps.scale_grade = #{scaleGrade}</if>
49
+            <if test="workload != null "> and ps.workload = #{workload}</if>
50
+            <if test="unit != null  and unit != ''"> and ps.unit = #{unit}</if>
51
+            <if test="coefficient != null "> and ps.coefficient = #{coefficient}</if>
52
+            <if test="performance != null "> and ps.performance = #{performance}</if>
53
+            <if test="performanceMonth != null "> and Month(ps.performance_month) = Month(#{performanceMonth})</if>
54
+        </where>
55
+    </select>
56
+    
57
+    <select id="selectCmcPerformanceStaffByPerformanceStaffId" parameterType="Long" resultMap="CmcPerformanceStaffResult">
58
+        <include refid="selectCmcPerformanceStaffVo"/>
59
+        where performance_staff_id = #{performanceStaffId}
60
+    </select>
61
+        
62
+    <insert id="insertCmcPerformanceStaff" parameterType="CmcPerformanceStaff" useGeneratedKeys="true" keyProperty="performanceStaffId">
63
+        insert into cmc_performance_staff
64
+        <trim prefix="(" suffix=")" suffixOverrides=",">
65
+            <if test="projectId != null">project_id,</if>
66
+            <if test="userId != null">user_id,</if>
67
+            <if test="workType != null">work_type,</if>
68
+            <if test="content != null">content,</if>
69
+            <if test="scaleGrade != null">scale_grade,</if>
70
+            <if test="workload != null">workload,</if>
71
+            <if test="unit != null">unit,</if>
72
+            <if test="coefficient != null">coefficient,</if>
73
+            <if test="performance != null">performance,</if>
74
+            <if test="performanceMonth != null">performance_month,</if>
75
+            <if test="remark != null">remark,</if>
76
+         </trim>
77
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
78
+            <if test="projectId != null">#{projectId},</if>
79
+            <if test="userId != null">#{userId},</if>
80
+            <if test="workType != null">#{workType},</if>
81
+            <if test="content != null">#{content},</if>
82
+            <if test="scaleGrade != null">#{scaleGrade},</if>
83
+            <if test="workload != null">#{workload},</if>
84
+            <if test="unit != null">#{unit},</if>
85
+            <if test="coefficient != null">#{coefficient},</if>
86
+            <if test="performance != null">#{performance},</if>
87
+            <if test="performanceMonth != null">#{performanceMonth},</if>
88
+            <if test="remark != null">#{remark},</if>
89
+         </trim>
90
+    </insert>
91
+
92
+    <update id="updateCmcPerformanceStaff" parameterType="CmcPerformanceStaff">
93
+        update cmc_performance_staff
94
+        <trim prefix="SET" suffixOverrides=",">
95
+            <if test="projectId != null">project_id = #{projectId},</if>
96
+            <if test="userId != null">user_id = #{userId},</if>
97
+            <if test="workType != null">work_type = #{workType},</if>
98
+            <if test="content != null">content = #{content},</if>
99
+            <if test="scaleGrade != null">scale_grade = #{scaleGrade},</if>
100
+            <if test="workload != null">workload = #{workload},</if>
101
+            <if test="unit != null">unit = #{unit},</if>
102
+            <if test="coefficient != null">coefficient = #{coefficient},</if>
103
+            <if test="performance != null">performance = #{performance},</if>
104
+            <if test="performanceMonth != null">performance_month = #{performanceMonth},</if>
105
+            <if test="remark != null">remark = #{remark},</if>
106
+        </trim>
107
+        where performance_staff_id = #{performanceStaffId}
108
+    </update>
109
+
110
+    <delete id="deleteCmcPerformanceStaffByPerformanceStaffId" parameterType="Long">
111
+        delete from cmc_performance_staff where performance_staff_id = #{performanceStaffId}
112
+    </delete>
113
+
114
+    <delete id="deleteCmcPerformanceStaffByPerformanceStaffIds" parameterType="String">
115
+        delete from cmc_performance_staff where performance_staff_id in 
116
+        <foreach item="performanceStaffId" collection="array" open="(" separator="," close=")">
117
+            #{performanceStaffId}
118
+        </foreach>
119
+    </delete>
120
+</mapper>

+ 16
- 32
oa-back/sql/sq.sql
File diff suppressed because it is too large
View File


Loading…
Cancel
Save