Bladeren bron

绩效审批流程

lamphua 6 maanden geleden
bovenliggende
commit
6aa047cc52

+ 3
- 3
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcOutsourceWorkController.java Bestand weergeven

@@ -89,9 +89,9 @@ public class CmcOutsourceWorkController extends BaseController
89 89
      * 删除委外工作
90 90
      */
91 91
     @Log(title = "委外工作", businessType = BusinessType.DELETE)
92
-	@DeleteMapping("/{workIds}")
93
-    public AjaxResult remove(@PathVariable Integer[] workIds)
92
+	@DeleteMapping("/{outsourceIds}")
93
+    public AjaxResult remove(@PathVariable String[] outsourceIds)
94 94
     {
95
-        return toAjax(cmcOutsourceWorkService.deleteCmcOutsourceWorkByWorkIds(workIds));
95
+        return toAjax(cmcOutsourceWorkService.deleteCmcOutsourceWorkByOutsourceIds(outsourceIds));
96 96
     }
97 97
 }

+ 97
- 0
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcPerformanceController.java Bestand weergeven

@@ -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.CmcPerformance;
19
+import com.ruoyi.oa.service.ICmcPerformanceService;
20
+import com.ruoyi.common.utils.poi.ExcelUtil;
21
+import com.ruoyi.common.core.page.TableDataInfo;
22
+
23
+/**
24
+ * 绩效审批Controller
25
+ *
26
+ * @author cmc
27
+ * @date 2024-09-23
28
+ */
29
+@RestController
30
+@RequestMapping("/oa/performance")
31
+public class CmcPerformanceController extends BaseController
32
+{
33
+    @Autowired
34
+    private ICmcPerformanceService cmcPerformanceService;
35
+
36
+    /**
37
+     * 查询绩效审批列表
38
+     */
39
+    @GetMapping("/list")
40
+    public TableDataInfo list(CmcPerformance cmcPerformance)
41
+    {
42
+        startPage();
43
+        List<CmcPerformance> list = cmcPerformanceService.selectCmcPerformanceList(cmcPerformance);
44
+        return getDataTable(list);
45
+    }
46
+
47
+    /**
48
+     * 导出绩效审批列表
49
+     */
50
+    @Log(title = "绩效审批", businessType = BusinessType.EXPORT)
51
+    @PostMapping("/export")
52
+    public void export(HttpServletResponse response, CmcPerformance cmcPerformance)
53
+    {
54
+        List<CmcPerformance> list = cmcPerformanceService.selectCmcPerformanceList(cmcPerformance);
55
+        ExcelUtil<CmcPerformance> util = new ExcelUtil<CmcPerformance>(CmcPerformance.class);
56
+        util.exportExcel(response, list, "绩效审批数据");
57
+    }
58
+
59
+    /**
60
+     * 获取绩效审批详细信息
61
+     */
62
+    @GetMapping(value = "/{performanceId}")
63
+    public AjaxResult getInfo(@PathVariable("performanceId") String performanceId)
64
+    {
65
+        return success(cmcPerformanceService.selectCmcPerformanceByPerformanceId(performanceId));
66
+    }
67
+
68
+    /**
69
+     * 新增绩效审批
70
+     */
71
+    @Log(title = "绩效审批", businessType = BusinessType.INSERT)
72
+    @PostMapping
73
+    public AjaxResult add(@RequestBody CmcPerformance cmcPerformance)
74
+    {
75
+        return toAjax(cmcPerformanceService.insertCmcPerformance(cmcPerformance));
76
+    }
77
+
78
+    /**
79
+     * 修改绩效审批
80
+     */
81
+    @Log(title = "绩效审批", businessType = BusinessType.UPDATE)
82
+    @PutMapping
83
+    public AjaxResult edit(@RequestBody CmcPerformance cmcPerformance)
84
+    {
85
+        return toAjax(cmcPerformanceService.updateCmcPerformance(cmcPerformance));
86
+    }
87
+
88
+    /**
89
+     * 删除绩效审批
90
+     */
91
+    @Log(title = "绩效审批", businessType = BusinessType.DELETE)
92
+    @DeleteMapping("/{performanceIds}")
93
+    public AjaxResult remove(@PathVariable String[] performanceIds)
94
+    {
95
+        return toAjax(cmcPerformanceService.deleteCmcPerformanceByPerformanceIds(performanceIds));
96
+    }
97
+}

+ 198
- 0
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/domain/CmcPerformance.java Bestand weergeven

@@ -0,0 +1,198 @@
1
+package com.ruoyi.oa.domain;
2
+
3
+import java.util.Date;
4
+import com.fasterxml.jackson.annotation.JsonFormat;
5
+import org.apache.commons.lang3.builder.ToStringBuilder;
6
+import org.apache.commons.lang3.builder.ToStringStyle;
7
+import com.ruoyi.common.annotation.Excel;
8
+import com.ruoyi.common.core.domain.BaseEntity;
9
+
10
+/**
11
+ * 绩效审批对象 cmc_performance
12
+ *
13
+ * @author cmc
14
+ * @date 2024-09-23
15
+ */
16
+public class CmcPerformance extends BaseEntity
17
+{
18
+    private static final long serialVersionUID = 1L;
19
+
20
+    /** 绩效审批id */
21
+    private String performanceId;
22
+
23
+    /** 上报人 */
24
+    @Excel(name = "上报人")
25
+    private Long reporter;
26
+
27
+    /** 附件 */
28
+    @Excel(name = "附件")
29
+    private String document;
30
+
31
+    /** 上报日期 */
32
+    @JsonFormat(pattern = "yyyy-MM-dd")
33
+    @Excel(name = "上报日期", width = 30, dateFormat = "yyyy-MM-dd")
34
+    private Date reportTime;
35
+
36
+    /** 分管审核人 */
37
+    @Excel(name = "分管审核人")
38
+    private Long managerUserId;
39
+
40
+    /** 分管审核意见 */
41
+    @Excel(name = "分管审核意见")
42
+    private String managerComment;
43
+
44
+    /** 分管审核时间 */
45
+    @JsonFormat(pattern = "yyyy-MM-dd")
46
+    @Excel(name = "分管审核时间", width = 30, dateFormat = "yyyy-MM-dd")
47
+    private Date managerTime;
48
+
49
+    /** 总经理审批人 */
50
+    @Excel(name = "总经理审批人")
51
+    private Long zjlUserId;
52
+
53
+    /** 总经理审批意见 */
54
+    @Excel(name = "总经理审批意见")
55
+    private String zjlComment;
56
+
57
+    /** 总经理审批时间 */
58
+    @JsonFormat(pattern = "yyyy-MM-dd")
59
+    @Excel(name = "总经理审批时间", width = 30, dateFormat = "yyyy-MM-dd")
60
+    private Date zjlTime;
61
+
62
+    /** 人事管理员 */
63
+    @Excel(name = "人事管理员")
64
+    private Long zhUserId;
65
+
66
+    /** 制单日期 */
67
+    @JsonFormat(pattern = "yyyy-MM-dd")
68
+    @Excel(name = "制单日期", width = 30, dateFormat = "yyyy-MM-dd")
69
+    private Date zhTime;
70
+
71
+    public void setPerformanceId(String performanceId)
72
+    {
73
+        this.performanceId = performanceId;
74
+    }
75
+
76
+    public String getPerformanceId()
77
+    {
78
+        return performanceId;
79
+    }
80
+    public void setReporter(Long reporter)
81
+    {
82
+        this.reporter = reporter;
83
+    }
84
+
85
+    public Long getReporter()
86
+    {
87
+        return reporter;
88
+    }
89
+    public void setDocument(String document)
90
+    {
91
+        this.document = document;
92
+    }
93
+
94
+    public String getDocument()
95
+    {
96
+        return document;
97
+    }
98
+    public void setReportTime(Date reportTime)
99
+    {
100
+        this.reportTime = reportTime;
101
+    }
102
+
103
+    public Date getReportTime()
104
+    {
105
+        return reportTime;
106
+    }
107
+    public void setManagerUserId(Long managerUserId)
108
+    {
109
+        this.managerUserId = managerUserId;
110
+    }
111
+
112
+    public Long getManagerUserId()
113
+    {
114
+        return managerUserId;
115
+    }
116
+    public void setManagerComment(String managerComment)
117
+    {
118
+        this.managerComment = managerComment;
119
+    }
120
+
121
+    public String getManagerComment()
122
+    {
123
+        return managerComment;
124
+    }
125
+    public void setManagerTime(Date managerTime)
126
+    {
127
+        this.managerTime = managerTime;
128
+    }
129
+
130
+    public Date getManagerTime()
131
+    {
132
+        return managerTime;
133
+    }
134
+    public void setZjlUserId(Long zjlUserId)
135
+    {
136
+        this.zjlUserId = zjlUserId;
137
+    }
138
+
139
+    public Long getZjlUserId()
140
+    {
141
+        return zjlUserId;
142
+    }
143
+    public void setZjlComment(String zjlComment)
144
+    {
145
+        this.zjlComment = zjlComment;
146
+    }
147
+
148
+    public String getZjlComment()
149
+    {
150
+        return zjlComment;
151
+    }
152
+    public void setZjlTime(Date zjlTime)
153
+    {
154
+        this.zjlTime = zjlTime;
155
+    }
156
+
157
+    public Date getZjlTime()
158
+    {
159
+        return zjlTime;
160
+    }
161
+    public void setZhUserId(Long zhUserId)
162
+    {
163
+        this.zhUserId = zhUserId;
164
+    }
165
+
166
+    public Long getZhUserId()
167
+    {
168
+        return zhUserId;
169
+    }
170
+    public void setZhTime(Date zhTime)
171
+    {
172
+        this.zhTime = zhTime;
173
+    }
174
+
175
+    public Date getZhTime()
176
+    {
177
+        return zhTime;
178
+    }
179
+
180
+    @Override
181
+    public String toString() {
182
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
183
+                .append("performanceId", getPerformanceId())
184
+                .append("reporter", getReporter())
185
+                .append("document", getDocument())
186
+                .append("remark", getRemark())
187
+                .append("reportTime", getReportTime())
188
+                .append("managerUserId", getManagerUserId())
189
+                .append("managerComment", getManagerComment())
190
+                .append("managerTime", getManagerTime())
191
+                .append("zjlUserId", getZjlUserId())
192
+                .append("zjlComment", getZjlComment())
193
+                .append("zjlTime", getZjlTime())
194
+                .append("zhUserId", getZhUserId())
195
+                .append("zhTime", getZhTime())
196
+                .toString();
197
+    }
198
+}

+ 3
- 3
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/mapper/CmcOutsourceWorkMapper.java Bestand weergeven

@@ -53,9 +53,9 @@ public interface CmcOutsourceWorkMapper
53 53
 
54 54
     /**
55 55
      * 批量删除委外工作
56
-     * 
57
-     * @param workIds 需要删除的数据主键集合
56
+     *
57
+     * @param outsourceIds 需要删除的数据主键集合
58 58
      * @return 结果
59 59
      */
60
-    public int deleteCmcOutsourceWorkByWorkIds(Integer[] workIds);
60
+    public int deleteCmcOutsourceWorkByOutsourceIds(String[] outsourceIds);
61 61
 }

+ 61
- 0
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/mapper/CmcPerformanceMapper.java Bestand weergeven

@@ -0,0 +1,61 @@
1
+package com.ruoyi.oa.mapper;
2
+
3
+import java.util.List;
4
+import com.ruoyi.oa.domain.CmcPerformance;
5
+
6
+/**
7
+ * 绩效审批Mapper接口
8
+ *
9
+ * @author cmc
10
+ * @date 2024-09-23
11
+ */
12
+public interface CmcPerformanceMapper
13
+{
14
+    /**
15
+     * 查询绩效审批
16
+     *
17
+     * @param performanceId 绩效审批主键
18
+     * @return 绩效审批
19
+     */
20
+    public CmcPerformance selectCmcPerformanceByPerformanceId(String performanceId);
21
+
22
+    /**
23
+     * 查询绩效审批列表
24
+     *
25
+     * @param cmcPerformance 绩效审批
26
+     * @return 绩效审批集合
27
+     */
28
+    public List<CmcPerformance> selectCmcPerformanceList(CmcPerformance cmcPerformance);
29
+
30
+    /**
31
+     * 新增绩效审批
32
+     *
33
+     * @param cmcPerformance 绩效审批
34
+     * @return 结果
35
+     */
36
+    public int insertCmcPerformance(CmcPerformance cmcPerformance);
37
+
38
+    /**
39
+     * 修改绩效审批
40
+     *
41
+     * @param cmcPerformance 绩效审批
42
+     * @return 结果
43
+     */
44
+    public int updateCmcPerformance(CmcPerformance cmcPerformance);
45
+
46
+    /**
47
+     * 删除绩效审批
48
+     *
49
+     * @param performanceId 绩效审批主键
50
+     * @return 结果
51
+     */
52
+    public int deleteCmcPerformanceByPerformanceId(String performanceId);
53
+
54
+    /**
55
+     * 批量删除绩效审批
56
+     *
57
+     * @param performanceIds 需要删除的数据主键集合
58
+     * @return 结果
59
+     */
60
+    public int deleteCmcPerformanceByPerformanceIds(String[] performanceIds);
61
+}

+ 2
- 2
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/service/ICmcOutsourceWorkService.java Bestand weergeven

@@ -46,10 +46,10 @@ public interface ICmcOutsourceWorkService
46 46
     /**
47 47
      * 批量删除委外工作
48 48
      * 
49
-     * @param workIds 需要删除的委外工作主键集合
49
+     * @param outsourceIds 需要删除的委外工作主键集合
50 50
      * @return 结果
51 51
      */
52
-    public int deleteCmcOutsourceWorkByWorkIds(Integer[] workIds);
52
+    public int deleteCmcOutsourceWorkByOutsourceIds(String[] outsourceIds);
53 53
 
54 54
     /**
55 55
      * 删除委外工作信息

+ 61
- 0
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/service/ICmcPerformanceService.java Bestand weergeven

@@ -0,0 +1,61 @@
1
+package com.ruoyi.oa.service;
2
+
3
+import java.util.List;
4
+import com.ruoyi.oa.domain.CmcPerformance;
5
+
6
+/**
7
+ * 绩效审批Service接口
8
+ *
9
+ * @author cmc
10
+ * @date 2024-09-23
11
+ */
12
+public interface ICmcPerformanceService
13
+{
14
+    /**
15
+     * 查询绩效审批
16
+     *
17
+     * @param performanceId 绩效审批主键
18
+     * @return 绩效审批
19
+     */
20
+    public CmcPerformance selectCmcPerformanceByPerformanceId(String performanceId);
21
+
22
+    /**
23
+     * 查询绩效审批列表
24
+     *
25
+     * @param cmcPerformance 绩效审批
26
+     * @return 绩效审批集合
27
+     */
28
+    public List<CmcPerformance> selectCmcPerformanceList(CmcPerformance cmcPerformance);
29
+
30
+    /**
31
+     * 新增绩效审批
32
+     *
33
+     * @param cmcPerformance 绩效审批
34
+     * @return 结果
35
+     */
36
+    public int insertCmcPerformance(CmcPerformance cmcPerformance);
37
+
38
+    /**
39
+     * 修改绩效审批
40
+     *
41
+     * @param cmcPerformance 绩效审批
42
+     * @return 结果
43
+     */
44
+    public int updateCmcPerformance(CmcPerformance cmcPerformance);
45
+
46
+    /**
47
+     * 批量删除绩效审批
48
+     *
49
+     * @param performanceIds 需要删除的绩效审批主键集合
50
+     * @return 结果
51
+     */
52
+    public int deleteCmcPerformanceByPerformanceIds(String[] performanceIds);
53
+
54
+    /**
55
+     * 删除绩效审批信息
56
+     *
57
+     * @param performanceId 绩效审批主键
58
+     * @return 结果
59
+     */
60
+    public int deleteCmcPerformanceByPerformanceId(String performanceId);
61
+}

+ 3
- 3
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/service/impl/CmcOutsourceWorkServiceImpl.java Bestand weergeven

@@ -70,13 +70,13 @@ public class CmcOutsourceWorkServiceImpl implements ICmcOutsourceWorkService
70 70
     /**
71 71
      * 批量删除委外工作
72 72
      * 
73
-     * @param workIds 需要删除的委外工作主键
73
+     * @param outsourceIds 需要删除的委外工作主键
74 74
      * @return 结果
75 75
      */
76 76
     @Override
77
-    public int deleteCmcOutsourceWorkByWorkIds(Integer[] workIds)
77
+    public int deleteCmcOutsourceWorkByOutsourceIds(String[] outsourceIds)
78 78
     {
79
-        return cmcOutsourceWorkMapper.deleteCmcOutsourceWorkByWorkIds(workIds);
79
+        return cmcOutsourceWorkMapper.deleteCmcOutsourceWorkByOutsourceIds(outsourceIds);
80 80
     }
81 81
 
82 82
     /**

+ 93
- 0
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/service/impl/CmcPerformanceServiceImpl.java Bestand weergeven

@@ -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.CmcPerformanceMapper;
7
+import com.ruoyi.oa.domain.CmcPerformance;
8
+import com.ruoyi.oa.service.ICmcPerformanceService;
9
+
10
+/**
11
+ * 绩效审批Service业务层处理
12
+ *
13
+ * @author cmc
14
+ * @date 2024-09-23
15
+ */
16
+@Service
17
+public class CmcPerformanceServiceImpl implements ICmcPerformanceService
18
+{
19
+    @Autowired
20
+    private CmcPerformanceMapper cmcPerformanceMapper;
21
+
22
+    /**
23
+     * 查询绩效审批
24
+     *
25
+     * @param performanceId 绩效审批主键
26
+     * @return 绩效审批
27
+     */
28
+    @Override
29
+    public CmcPerformance selectCmcPerformanceByPerformanceId(String performanceId)
30
+    {
31
+        return cmcPerformanceMapper.selectCmcPerformanceByPerformanceId(performanceId);
32
+    }
33
+
34
+    /**
35
+     * 查询绩效审批列表
36
+     *
37
+     * @param cmcPerformance 绩效审批
38
+     * @return 绩效审批
39
+     */
40
+    @Override
41
+    public List<CmcPerformance> selectCmcPerformanceList(CmcPerformance cmcPerformance)
42
+    {
43
+        return cmcPerformanceMapper.selectCmcPerformanceList(cmcPerformance);
44
+    }
45
+
46
+    /**
47
+     * 新增绩效审批
48
+     *
49
+     * @param cmcPerformance 绩效审批
50
+     * @return 结果
51
+     */
52
+    @Override
53
+    public int insertCmcPerformance(CmcPerformance cmcPerformance)
54
+    {
55
+        return cmcPerformanceMapper.insertCmcPerformance(cmcPerformance);
56
+    }
57
+
58
+    /**
59
+     * 修改绩效审批
60
+     *
61
+     * @param cmcPerformance 绩效审批
62
+     * @return 结果
63
+     */
64
+    @Override
65
+    public int updateCmcPerformance(CmcPerformance cmcPerformance)
66
+    {
67
+        return cmcPerformanceMapper.updateCmcPerformance(cmcPerformance);
68
+    }
69
+
70
+    /**
71
+     * 批量删除绩效审批
72
+     *
73
+     * @param performanceIds 需要删除的绩效审批主键
74
+     * @return 结果
75
+     */
76
+    @Override
77
+    public int deleteCmcPerformanceByPerformanceIds(String[] performanceIds)
78
+    {
79
+        return cmcPerformanceMapper.deleteCmcPerformanceByPerformanceIds(performanceIds);
80
+    }
81
+
82
+    /**
83
+     * 删除绩效审批信息
84
+     *
85
+     * @param performanceId 绩效审批主键
86
+     * @return 结果
87
+     */
88
+    @Override
89
+    public int deleteCmcPerformanceByPerformanceId(String performanceId)
90
+    {
91
+        return cmcPerformanceMapper.deleteCmcPerformanceByPerformanceId(performanceId);
92
+    }
93
+}

+ 4
- 4
oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcOutsourceWorkMapper.xml Bestand weergeven

@@ -78,10 +78,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
78 78
         delete from cmc_outsource_work where work_id = #{workId}
79 79
     </delete>
80 80
 
81
-    <delete id="deleteCmcOutsourceWorkByWorkIds" parameterType="String">
82
-        delete from cmc_outsource_work where work_id in 
83
-        <foreach item="workId" collection="array" open="(" separator="," close=")">
84
-            #{workId}
81
+    <delete id="deleteCmcOutsourceWorkByOutsourceIds" parameterType="String">
82
+        delete from cmc_outsource_work where outsource_id in
83
+        <foreach item="outsourceId" collection="array" open="(" separator="," close=")">
84
+            #{outsourceId}
85 85
         </foreach>
86 86
     </delete>
87 87
 </mapper>

+ 112
- 0
oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcPerformanceMapper.xml Bestand weergeven

@@ -0,0 +1,112 @@
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.CmcPerformanceMapper">
6
+    
7
+    <resultMap type="CmcPerformance" id="CmcPerformanceResult">
8
+        <result property="performanceId"    column="performance_id"    />
9
+        <result property="reporter"    column="reporter"    />
10
+        <result property="document"    column="document"    />
11
+        <result property="remark"    column="remark"    />
12
+        <result property="reportTime"    column="report_time"    />
13
+        <result property="managerUserId"    column="manager_user_id"    />
14
+        <result property="managerComment"    column="manager_comment"    />
15
+        <result property="managerTime"    column="manager_time"    />
16
+        <result property="zjlUserId"    column="zjl_user_id"    />
17
+        <result property="zjlComment"    column="zjl_comment"    />
18
+        <result property="zjlTime"    column="zjl_time"    />
19
+        <result property="zhUserId"    column="zh_user_id"    />
20
+        <result property="zhTime"    column="zh_time"    />
21
+    </resultMap>
22
+
23
+    <sql id="selectCmcPerformanceVo">
24
+        select performance_id, reporter, document, remark, report_time, manager_user_id, manager_comment, manager_time, zjl_user_id, zjl_comment, zjl_time, zh_user_id, zh_time from cmc_performance
25
+    </sql>
26
+
27
+    <select id="selectCmcPerformanceList" parameterType="CmcPerformance" resultMap="CmcPerformanceResult">
28
+        <include refid="selectCmcPerformanceVo"/>
29
+        <where>  
30
+            <if test="reporter != null "> and reporter = #{reporter}</if>
31
+            <if test="document != null  and document != ''"> and document = #{document}</if>
32
+            <if test="reportTime != null "> and report_time = #{reportTime}</if>
33
+            <if test="managerUserId != null "> and manager_user_id = #{managerUserId}</if>
34
+            <if test="managerComment != null  and managerComment != ''"> and manager_comment = #{managerComment}</if>
35
+            <if test="managerTime != null "> and manager_time = #{managerTime}</if>
36
+            <if test="zjlUserId != null "> and zjl_user_id = #{zjlUserId}</if>
37
+            <if test="zjlComment != null  and zjlComment != ''"> and zjl_comment = #{zjlComment}</if>
38
+            <if test="zjlTime != null "> and zjl_time = #{zjlTime}</if>
39
+            <if test="zhUserId != null "> and zh_user_id = #{zhUserId}</if>
40
+            <if test="zhTime != null "> and zh_time = #{zhTime}</if>
41
+        </where>
42
+    </select>
43
+    
44
+    <select id="selectCmcPerformanceByPerformanceId" parameterType="String" resultMap="CmcPerformanceResult">
45
+        <include refid="selectCmcPerformanceVo"/>
46
+        where performance_id = #{performanceId}
47
+    </select>
48
+        
49
+    <insert id="insertCmcPerformance" parameterType="CmcPerformance">
50
+        insert into cmc_performance
51
+        <trim prefix="(" suffix=")" suffixOverrides=",">
52
+            <if test="performanceId != null">performance_id,</if>
53
+            <if test="reporter != null">reporter,</if>
54
+            <if test="document != null">document,</if>
55
+            <if test="remark != null">remark,</if>
56
+            <if test="reportTime != null">report_time,</if>
57
+            <if test="managerUserId != null">manager_user_id,</if>
58
+            <if test="managerComment != null">manager_comment,</if>
59
+            <if test="managerTime != null">manager_time,</if>
60
+            <if test="zjlUserId != null">zjl_user_id,</if>
61
+            <if test="zjlComment != null">zjl_comment,</if>
62
+            <if test="zjlTime != null">zjl_time,</if>
63
+            <if test="zhUserId != null">zh_user_id,</if>
64
+            <if test="zhTime != null">zh_time,</if>
65
+         </trim>
66
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
67
+            <if test="performanceId != null">#{performanceId},</if>
68
+            <if test="reporter != null">#{reporter},</if>
69
+            <if test="document != null">#{document},</if>
70
+            <if test="remark != null">#{remark},</if>
71
+            <if test="reportTime != null">#{reportTime},</if>
72
+            <if test="managerUserId != null">#{managerUserId},</if>
73
+            <if test="managerComment != null">#{managerComment},</if>
74
+            <if test="managerTime != null">#{managerTime},</if>
75
+            <if test="zjlUserId != null">#{zjlUserId},</if>
76
+            <if test="zjlComment != null">#{zjlComment},</if>
77
+            <if test="zjlTime != null">#{zjlTime},</if>
78
+            <if test="zhUserId != null">#{zhUserId},</if>
79
+            <if test="zhTime != null">#{zhTime},</if>
80
+         </trim>
81
+    </insert>
82
+
83
+    <update id="updateCmcPerformance" parameterType="CmcPerformance">
84
+        update cmc_performance
85
+        <trim prefix="SET" suffixOverrides=",">
86
+            <if test="reporter != null">reporter = #{reporter},</if>
87
+            <if test="document != null">document = #{document},</if>
88
+            <if test="remark != null">remark = #{remark},</if>
89
+            <if test="reportTime != null">report_time = #{reportTime},</if>
90
+            <if test="managerUserId != null">manager_user_id = #{managerUserId},</if>
91
+            <if test="managerComment != null">manager_comment = #{managerComment},</if>
92
+            <if test="managerTime != null">manager_time = #{managerTime},</if>
93
+            <if test="zjlUserId != null">zjl_user_id = #{zjlUserId},</if>
94
+            <if test="zjlComment != null">zjl_comment = #{zjlComment},</if>
95
+            <if test="zjlTime != null">zjl_time = #{zjlTime},</if>
96
+            <if test="zhUserId != null">zh_user_id = #{zhUserId},</if>
97
+            <if test="zhTime != null">zh_time = #{zhTime},</if>
98
+        </trim>
99
+        where performance_id = #{performanceId}
100
+    </update>
101
+
102
+    <delete id="deleteCmcPerformanceByPerformanceId" parameterType="String">
103
+        delete from cmc_performance where performance_id = #{performanceId}
104
+    </delete>
105
+
106
+    <delete id="deleteCmcPerformanceByPerformanceIds" parameterType="String">
107
+        delete from cmc_performance where performance_id in 
108
+        <foreach item="performanceId" collection="array" open="(" separator="," close=")">
109
+            #{performanceId}
110
+        </foreach>
111
+    </delete>
112
+</mapper>

+ 28
- 493
oa-back/sql/sq.sql
Diff onderdrukt omdat het te groot bestand
Bestand weergeven


+ 50
- 0
oa-ui/src/api/oa/performance/performance.js Bestand weergeven

@@ -0,0 +1,50 @@
1
+/*
2
+ * @Author: wrh
3
+ * @Date: 2024-09-23 14:23:36
4
+ * @LastEditors: wrh
5
+ * @LastEditTime: 2024-09-23 14:31:00
6
+ */
7
+import request from '@/utils/request'
8
+
9
+// 查询绩效审批列表
10
+export function listPerformance(query) {
11
+  return request({
12
+    url: '/oa/performance/list',
13
+    method: 'get',
14
+    params: query
15
+  })
16
+}
17
+
18
+// 查询绩效审批详细
19
+export function getPerformance(performanceId) {
20
+  return request({
21
+    url: '/oa/performance/' + performanceId,
22
+    method: 'get'
23
+  })
24
+}
25
+
26
+// 新增绩效审批
27
+export function addPerformance(data) {
28
+  return request({
29
+    url: '/oa/performance',
30
+    method: 'post',
31
+    data: data
32
+  })
33
+}
34
+
35
+// 修改绩效审批
36
+export function updatePerformance(data) {
37
+  return request({
38
+    url: '/oa/performance',
39
+    method: 'put',
40
+    data: data
41
+  })
42
+}
43
+
44
+// 删除绩效审批
45
+export function delPerformance(performanceId) {
46
+  return request({
47
+    url: '/oa/performance/' + performanceId,
48
+    method: 'delete'
49
+  })
50
+}

+ 426
- 0
oa-ui/src/views/oa/performance/index.vue Bestand weergeven

@@ -0,0 +1,426 @@
1
+<template>
2
+  <div class="app-container">
3
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
4
+      <el-form-item label="上报人" prop="reporter">
5
+        <el-input
6
+          v-model="queryParams.reporter"
7
+          placeholder="请输入上报人"
8
+          clearable
9
+          @keyup.enter.native="handleQuery"
10
+        />
11
+      </el-form-item>
12
+      <el-form-item label="附件" prop="document">
13
+        <el-input
14
+          v-model="queryParams.document"
15
+          placeholder="请输入附件"
16
+          clearable
17
+          @keyup.enter.native="handleQuery"
18
+        />
19
+      </el-form-item>
20
+      <el-form-item label="上报日期" prop="reportTime">
21
+        <el-date-picker clearable
22
+          v-model="queryParams.reportTime"
23
+          type="date"
24
+          value-format="yyyy-MM-dd"
25
+          placeholder="请选择上报日期">
26
+        </el-date-picker>
27
+      </el-form-item>
28
+      <el-form-item label="分管审核人" prop="managerUserId">
29
+        <el-input
30
+          v-model="queryParams.managerUserId"
31
+          placeholder="请输入分管审核人"
32
+          clearable
33
+          @keyup.enter.native="handleQuery"
34
+        />
35
+      </el-form-item>
36
+      <el-form-item label="分管审核意见" prop="managerComment">
37
+        <el-input
38
+          v-model="queryParams.managerComment"
39
+          placeholder="请输入分管审核意见"
40
+          clearable
41
+          @keyup.enter.native="handleQuery"
42
+        />
43
+      </el-form-item>
44
+      <el-form-item label="分管审核时间" prop="managerTime">
45
+        <el-date-picker clearable
46
+          v-model="queryParams.managerTime"
47
+          type="date"
48
+          value-format="yyyy-MM-dd"
49
+          placeholder="请选择分管审核时间">
50
+        </el-date-picker>
51
+      </el-form-item>
52
+      <el-form-item label="总经理审批人" prop="zjlUserId">
53
+        <el-input
54
+          v-model="queryParams.zjlUserId"
55
+          placeholder="请输入总经理审批人"
56
+          clearable
57
+          @keyup.enter.native="handleQuery"
58
+        />
59
+      </el-form-item>
60
+      <el-form-item label="总经理审批意见" prop="zjlComment">
61
+        <el-input
62
+          v-model="queryParams.zjlComment"
63
+          placeholder="请输入总经理审批意见"
64
+          clearable
65
+          @keyup.enter.native="handleQuery"
66
+        />
67
+      </el-form-item>
68
+      <el-form-item label="总经理审批时间" prop="zjlTime">
69
+        <el-date-picker clearable
70
+          v-model="queryParams.zjlTime"
71
+          type="date"
72
+          value-format="yyyy-MM-dd"
73
+          placeholder="请选择总经理审批时间">
74
+        </el-date-picker>
75
+      </el-form-item>
76
+      <el-form-item label="人事管理员" prop="zhUserId">
77
+        <el-input
78
+          v-model="queryParams.zhUserId"
79
+          placeholder="请输入人事管理员"
80
+          clearable
81
+          @keyup.enter.native="handleQuery"
82
+        />
83
+      </el-form-item>
84
+      <el-form-item label="制单日期" prop="zhTime">
85
+        <el-date-picker clearable
86
+          v-model="queryParams.zhTime"
87
+          type="date"
88
+          value-format="yyyy-MM-dd"
89
+          placeholder="请选择制单日期">
90
+        </el-date-picker>
91
+      </el-form-item>
92
+      <el-form-item>
93
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
94
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
95
+      </el-form-item>
96
+    </el-form>
97
+
98
+    <el-row :gutter="10" class="mb8">
99
+      <el-col :span="1.5">
100
+        <el-button
101
+          type="primary"
102
+          plain
103
+          icon="el-icon-plus"
104
+          size="mini"
105
+          @click="handleAdd"
106
+          v-hasPermi="['oa:performance:add']"
107
+        >新增</el-button>
108
+      </el-col>
109
+      <el-col :span="1.5">
110
+        <el-button
111
+          type="success"
112
+          plain
113
+          icon="el-icon-edit"
114
+          size="mini"
115
+          :disabled="single"
116
+          @click="handleUpdate"
117
+          v-hasPermi="['oa:performance:edit']"
118
+        >修改</el-button>
119
+      </el-col>
120
+      <el-col :span="1.5">
121
+        <el-button
122
+          type="danger"
123
+          plain
124
+          icon="el-icon-delete"
125
+          size="mini"
126
+          :disabled="multiple"
127
+          @click="handleDelete"
128
+          v-hasPermi="['oa:performance:remove']"
129
+        >删除</el-button>
130
+      </el-col>
131
+      <el-col :span="1.5">
132
+        <el-button
133
+          type="warning"
134
+          plain
135
+          icon="el-icon-download"
136
+          size="mini"
137
+          @click="handleExport"
138
+          v-hasPermi="['oa:performance:export']"
139
+        >导出</el-button>
140
+      </el-col>
141
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
142
+    </el-row>
143
+
144
+    <el-table v-loading="loading" :data="performanceList" @selection-change="handleSelectionChange">
145
+      <el-table-column type="selection" width="55" align="center" />
146
+      <el-table-column label="绩效审批id" align="center" prop="performanceId" />
147
+      <el-table-column label="上报人" align="center" prop="reporter" />
148
+      <el-table-column label="附件" align="center" prop="document" />
149
+      <el-table-column label="备注" align="center" prop="remark" />
150
+      <el-table-column label="上报日期" align="center" prop="reportTime" width="180">
151
+        <template slot-scope="scope">
152
+          <span>{{ parseTime(scope.row.reportTime, '{y}-{m}-{d}') }}</span>
153
+        </template>
154
+      </el-table-column>
155
+      <el-table-column label="分管审核人" align="center" prop="managerUserId" />
156
+      <el-table-column label="分管审核意见" align="center" prop="managerComment" />
157
+      <el-table-column label="分管审核时间" align="center" prop="managerTime" width="180">
158
+        <template slot-scope="scope">
159
+          <span>{{ parseTime(scope.row.managerTime, '{y}-{m}-{d}') }}</span>
160
+        </template>
161
+      </el-table-column>
162
+      <el-table-column label="总经理审批人" align="center" prop="zjlUserId" />
163
+      <el-table-column label="总经理审批意见" align="center" prop="zjlComment" />
164
+      <el-table-column label="总经理审批时间" align="center" prop="zjlTime" width="180">
165
+        <template slot-scope="scope">
166
+          <span>{{ parseTime(scope.row.zjlTime, '{y}-{m}-{d}') }}</span>
167
+        </template>
168
+      </el-table-column>
169
+      <el-table-column label="人事管理员" align="center" prop="zhUserId" />
170
+      <el-table-column label="制单日期" align="center" prop="zhTime" width="180">
171
+        <template slot-scope="scope">
172
+          <span>{{ parseTime(scope.row.zhTime, '{y}-{m}-{d}') }}</span>
173
+        </template>
174
+      </el-table-column>
175
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
176
+        <template slot-scope="scope">
177
+          <el-button
178
+            size="mini"
179
+            type="text"
180
+            icon="el-icon-edit"
181
+            @click="handleUpdate(scope.row)"
182
+            v-hasPermi="['oa:performance:edit']"
183
+          >修改</el-button>
184
+          <el-button
185
+            size="mini"
186
+            type="text"
187
+            icon="el-icon-delete"
188
+            @click="handleDelete(scope.row)"
189
+            v-hasPermi="['oa:performance:remove']"
190
+          >删除</el-button>
191
+        </template>
192
+      </el-table-column>
193
+    </el-table>
194
+    
195
+    <pagination
196
+      v-show="total>0"
197
+      :total="total"
198
+      :page.sync="queryParams.pageNum"
199
+      :limit.sync="queryParams.pageSize"
200
+      @pagination="getList"
201
+    />
202
+
203
+    <!-- 添加或修改绩效审批对话框 -->
204
+    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
205
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
206
+        <el-form-item label="上报人" prop="reporter">
207
+          <el-input v-model="form.reporter" placeholder="请输入上报人" />
208
+        </el-form-item>
209
+        <el-form-item label="附件" prop="document">
210
+          <el-input v-model="form.document" placeholder="请输入附件" />
211
+        </el-form-item>
212
+        <el-form-item label="备注" prop="remark">
213
+          <el-input v-model="form.remark" placeholder="请输入备注" />
214
+        </el-form-item>
215
+        <el-form-item label="上报日期" prop="reportTime">
216
+          <el-date-picker clearable
217
+            v-model="form.reportTime"
218
+            type="date"
219
+            value-format="yyyy-MM-dd"
220
+            placeholder="请选择上报日期">
221
+          </el-date-picker>
222
+        </el-form-item>
223
+        <el-form-item label="分管审核人" prop="managerUserId">
224
+          <el-input v-model="form.managerUserId" placeholder="请输入分管审核人" />
225
+        </el-form-item>
226
+        <el-form-item label="分管审核意见" prop="managerComment">
227
+          <el-input v-model="form.managerComment" placeholder="请输入分管审核意见" />
228
+        </el-form-item>
229
+        <el-form-item label="分管审核时间" prop="managerTime">
230
+          <el-date-picker clearable
231
+            v-model="form.managerTime"
232
+            type="date"
233
+            value-format="yyyy-MM-dd"
234
+            placeholder="请选择分管审核时间">
235
+          </el-date-picker>
236
+        </el-form-item>
237
+        <el-form-item label="总经理审批人" prop="zjlUserId">
238
+          <el-input v-model="form.zjlUserId" placeholder="请输入总经理审批人" />
239
+        </el-form-item>
240
+        <el-form-item label="总经理审批意见" prop="zjlComment">
241
+          <el-input v-model="form.zjlComment" placeholder="请输入总经理审批意见" />
242
+        </el-form-item>
243
+        <el-form-item label="总经理审批时间" prop="zjlTime">
244
+          <el-date-picker clearable
245
+            v-model="form.zjlTime"
246
+            type="date"
247
+            value-format="yyyy-MM-dd"
248
+            placeholder="请选择总经理审批时间">
249
+          </el-date-picker>
250
+        </el-form-item>
251
+        <el-form-item label="人事管理员" prop="zhUserId">
252
+          <el-input v-model="form.zhUserId" placeholder="请输入人事管理员" />
253
+        </el-form-item>
254
+        <el-form-item label="制单日期" prop="zhTime">
255
+          <el-date-picker clearable
256
+            v-model="form.zhTime"
257
+            type="date"
258
+            value-format="yyyy-MM-dd"
259
+            placeholder="请选择制单日期">
260
+          </el-date-picker>
261
+        </el-form-item>
262
+      </el-form>
263
+      <div slot="footer" class="dialog-footer">
264
+        <el-button type="primary" @click="submitForm">确 定</el-button>
265
+        <el-button @click="cancel">取 消</el-button>
266
+      </div>
267
+    </el-dialog>
268
+  </div>
269
+</template>
270
+
271
+<script>
272
+import { listPerformance, getPerformance, delPerformance, addPerformance, updatePerformance } from "@/api/oa/performance/performance";
273
+
274
+export default {
275
+  name: "Performance",
276
+  data() {
277
+    return {
278
+      // 遮罩层
279
+      loading: true,
280
+      // 选中数组
281
+      ids: [],
282
+      // 非单个禁用
283
+      single: true,
284
+      // 非多个禁用
285
+      multiple: true,
286
+      // 显示搜索条件
287
+      showSearch: true,
288
+      // 总条数
289
+      total: 0,
290
+      // 绩效审批表格数据
291
+      performanceList: [],
292
+      // 弹出层标题
293
+      title: "",
294
+      // 是否显示弹出层
295
+      open: false,
296
+      // 查询参数
297
+      queryParams: {
298
+        pageNum: 1,
299
+        pageSize: 10,
300
+        reporter: null,
301
+        document: null,
302
+        reportTime: null,
303
+        managerUserId: null,
304
+        managerComment: null,
305
+        managerTime: null,
306
+        zjlUserId: null,
307
+        zjlComment: null,
308
+        zjlTime: null,
309
+        zhUserId: null,
310
+        zhTime: null
311
+      },
312
+      // 表单参数
313
+      form: {},
314
+      // 表单校验
315
+      rules: {
316
+      }
317
+    };
318
+  },
319
+  created() {
320
+    this.getList();
321
+  },
322
+  methods: {
323
+    /** 查询绩效审批列表 */
324
+    getList() {
325
+      this.loading = true;
326
+      listPerformance(this.queryParams).then(response => {
327
+        this.performanceList = response.rows;
328
+        this.total = response.total;
329
+        this.loading = false;
330
+      });
331
+    },
332
+    // 取消按钮
333
+    cancel() {
334
+      this.open = false;
335
+      this.reset();
336
+    },
337
+    // 表单重置
338
+    reset() {
339
+      this.form = {
340
+        performanceId: null,
341
+        reporter: null,
342
+        document: null,
343
+        remark: null,
344
+        reportTime: null,
345
+        managerUserId: null,
346
+        managerComment: null,
347
+        managerTime: null,
348
+        zjlUserId: null,
349
+        zjlComment: null,
350
+        zjlTime: null,
351
+        zhUserId: null,
352
+        zhTime: null
353
+      };
354
+      this.resetForm("form");
355
+    },
356
+    /** 搜索按钮操作 */
357
+    handleQuery() {
358
+      this.queryParams.pageNum = 1;
359
+      this.getList();
360
+    },
361
+    /** 重置按钮操作 */
362
+    resetQuery() {
363
+      this.resetForm("queryForm");
364
+      this.handleQuery();
365
+    },
366
+    // 多选框选中数据
367
+    handleSelectionChange(selection) {
368
+      this.ids = selection.map(item => item.performanceId)
369
+      this.single = selection.length!==1
370
+      this.multiple = !selection.length
371
+    },
372
+    /** 新增按钮操作 */
373
+    handleAdd() {
374
+      this.reset();
375
+      this.open = true;
376
+      this.title = "添加绩效审批";
377
+    },
378
+    /** 修改按钮操作 */
379
+    handleUpdate(row) {
380
+      this.reset();
381
+      const performanceId = row.performanceId || this.ids
382
+      getPerformance(performanceId).then(response => {
383
+        this.form = response.data;
384
+        this.open = true;
385
+        this.title = "修改绩效审批";
386
+      });
387
+    },
388
+    /** 提交按钮 */
389
+    submitForm() {
390
+      this.$refs["form"].validate(valid => {
391
+        if (valid) {
392
+          if (this.form.performanceId != null) {
393
+            updatePerformance(this.form).then(response => {
394
+              this.$modal.msgSuccess("修改成功");
395
+              this.open = false;
396
+              this.getList();
397
+            });
398
+          } else {
399
+            addPerformance(this.form).then(response => {
400
+              this.$modal.msgSuccess("新增成功");
401
+              this.open = false;
402
+              this.getList();
403
+            });
404
+          }
405
+        }
406
+      });
407
+    },
408
+    /** 删除按钮操作 */
409
+    handleDelete(row) {
410
+      const performanceIds = row.performanceId || this.ids;
411
+      this.$modal.confirm('是否确认删除绩效审批编号为"' + performanceIds + '"的数据项?').then(function() {
412
+        return delPerformance(performanceIds);
413
+      }).then(() => {
414
+        this.getList();
415
+        this.$modal.msgSuccess("删除成功");
416
+      }).catch(() => {});
417
+    },
418
+    /** 导出按钮操作 */
419
+    handleExport() {
420
+      this.download('oa/performance/export', {
421
+        ...this.queryParams
422
+      }, `performance_${new Date().getTime()}.xlsx`)
423
+    }
424
+  }
425
+};
426
+</script>

Laden…
Annuleren
Opslaan