Bladeren bron

项目委外流程

lamphua 7 maanden geleden
bovenliggende
commit
123b06a576

+ 97
- 0
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcOutsourceController.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.CmcOutsource;
19
+import com.ruoyi.oa.service.ICmcOutsourceService;
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-19
28
+ */
29
+@RestController
30
+@RequestMapping("/oa/outsource")
31
+public class CmcOutsourceController extends BaseController
32
+{
33
+    @Autowired
34
+    private ICmcOutsourceService cmcOutsourceService;
35
+
36
+    /**
37
+     * 查询项目委外列表
38
+     */
39
+    @GetMapping("/list")
40
+    public TableDataInfo list(CmcOutsource cmcOutsource)
41
+    {
42
+        startPage();
43
+        List<CmcOutsource> list = cmcOutsourceService.selectCmcOutsourceList(cmcOutsource);
44
+        return getDataTable(list);
45
+    }
46
+
47
+    /**
48
+     * 导出项目委外列表
49
+     */
50
+    @Log(title = "项目委外", businessType = BusinessType.EXPORT)
51
+    @PostMapping("/export")
52
+    public void export(HttpServletResponse response, CmcOutsource cmcOutsource)
53
+    {
54
+        List<CmcOutsource> list = cmcOutsourceService.selectCmcOutsourceList(cmcOutsource);
55
+        ExcelUtil<CmcOutsource> util = new ExcelUtil<CmcOutsource>(CmcOutsource.class);
56
+        util.exportExcel(response, list, "项目委外数据");
57
+    }
58
+
59
+    /**
60
+     * 获取项目委外详细信息
61
+     */
62
+    @GetMapping(value = "/{outsoureId}")
63
+    public AjaxResult getInfo(@PathVariable("outsoureId") String outsoureId)
64
+    {
65
+        return success(cmcOutsourceService.selectCmcOutsourceByOutsoureId(outsoureId));
66
+    }
67
+
68
+    /**
69
+     * 新增项目委外
70
+     */
71
+    @Log(title = "项目委外", businessType = BusinessType.INSERT)
72
+    @PostMapping
73
+    public AjaxResult add(@RequestBody CmcOutsource cmcOutsource)
74
+    {
75
+        return toAjax(cmcOutsourceService.insertCmcOutsource(cmcOutsource));
76
+    }
77
+
78
+    /**
79
+     * 修改项目委外
80
+     */
81
+    @Log(title = "项目委外", businessType = BusinessType.UPDATE)
82
+    @PutMapping
83
+    public AjaxResult edit(@RequestBody CmcOutsource cmcOutsource)
84
+    {
85
+        return toAjax(cmcOutsourceService.updateCmcOutsource(cmcOutsource));
86
+    }
87
+
88
+    /**
89
+     * 删除项目委外
90
+     */
91
+    @Log(title = "项目委外", businessType = BusinessType.DELETE)
92
+	@DeleteMapping("/{outsoureIds}")
93
+    public AjaxResult remove(@PathVariable String[] outsoureIds)
94
+    {
95
+        return toAjax(cmcOutsourceService.deleteCmcOutsourceByOutsoureIds(outsoureIds));
96
+    }
97
+}

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

@@ -0,0 +1,210 @@
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_outsource
12
+ * 
13
+ * @author cmc
14
+ * @date 2024-09-19
15
+ */
16
+public class CmcOutsource extends BaseEntity
17
+{
18
+    private static final long serialVersionUID = 1L;
19
+
20
+    /** 委外id */
21
+    private String outsoureId;
22
+
23
+    /** 委外说明 */
24
+    @Excel(name = "委外说明")
25
+    private String applyReason;
26
+
27
+    /** 项目id */
28
+    @Excel(name = "项目id")
29
+    private String projectId;
30
+
31
+    /** 合作单位id */
32
+    @Excel(name = "合作单位id")
33
+    private String partnerId;
34
+
35
+    /** 申请人 */
36
+    @Excel(name = "申请人")
37
+    private Long applier;
38
+
39
+    /** 申请部门 */
40
+    @Excel(name = "申请部门")
41
+    private Long applyDept;
42
+
43
+    /** 申请时间 */
44
+    @JsonFormat(pattern = "yyyy-MM-dd")
45
+    @Excel(name = "申请时间", width = 30, dateFormat = "yyyy-MM-dd")
46
+    private Date applyTime;
47
+
48
+    /** 分管审核人 */
49
+    @Excel(name = "分管审核人")
50
+    private Long managerUserId;
51
+
52
+    /** 分管审核意见 */
53
+    @Excel(name = "分管审核意见")
54
+    private String managerComment;
55
+
56
+    /** 分管审核时间 */
57
+    @JsonFormat(pattern = "yyyy-MM-dd")
58
+    @Excel(name = "分管审核时间", width = 30, dateFormat = "yyyy-MM-dd")
59
+    private Date managerTime;
60
+
61
+    /** 总经理审批人 */
62
+    @Excel(name = "总经理审批人")
63
+    private Long zjlUserId;
64
+
65
+    /** 总经理审批意见 */
66
+    @Excel(name = "总经理审批意见")
67
+    private String zjlComment;
68
+
69
+    /** 总经理审批时间 */
70
+    @JsonFormat(pattern = "yyyy-MM-dd")
71
+    @Excel(name = "总经理审批时间", width = 30, dateFormat = "yyyy-MM-dd")
72
+    private Date zjlTime;
73
+
74
+    public void setOutsoureId(String outsoureId) 
75
+    {
76
+        this.outsoureId = outsoureId;
77
+    }
78
+
79
+    public String getOutsoureId() 
80
+    {
81
+        return outsoureId;
82
+    }
83
+    public void setApplyReason(String applyReason) 
84
+    {
85
+        this.applyReason = applyReason;
86
+    }
87
+
88
+    public String getApplyReason() 
89
+    {
90
+        return applyReason;
91
+    }
92
+    public void setProjectId(String projectId) 
93
+    {
94
+        this.projectId = projectId;
95
+    }
96
+
97
+    public String getProjectId() 
98
+    {
99
+        return projectId;
100
+    }
101
+    public void setPartnerId(String partnerId) 
102
+    {
103
+        this.partnerId = partnerId;
104
+    }
105
+
106
+    public String getPartnerId() 
107
+    {
108
+        return partnerId;
109
+    }
110
+    public void setApplier(Long applier) 
111
+    {
112
+        this.applier = applier;
113
+    }
114
+
115
+    public Long getApplier() 
116
+    {
117
+        return applier;
118
+    }
119
+    public void setApplyDept(Long applyDept) 
120
+    {
121
+        this.applyDept = applyDept;
122
+    }
123
+
124
+    public Long getApplyDept() 
125
+    {
126
+        return applyDept;
127
+    }
128
+    public void setApplyTime(Date applyTime) 
129
+    {
130
+        this.applyTime = applyTime;
131
+    }
132
+
133
+    public Date getApplyTime() 
134
+    {
135
+        return applyTime;
136
+    }
137
+    public void setManagerUserId(Long managerUserId) 
138
+    {
139
+        this.managerUserId = managerUserId;
140
+    }
141
+
142
+    public Long getManagerUserId() 
143
+    {
144
+        return managerUserId;
145
+    }
146
+    public void setManagerComment(String managerComment) 
147
+    {
148
+        this.managerComment = managerComment;
149
+    }
150
+
151
+    public String getManagerComment() 
152
+    {
153
+        return managerComment;
154
+    }
155
+    public void setManagerTime(Date managerTime) 
156
+    {
157
+        this.managerTime = managerTime;
158
+    }
159
+
160
+    public Date getManagerTime() 
161
+    {
162
+        return managerTime;
163
+    }
164
+    public void setZjlUserId(Long zjlUserId) 
165
+    {
166
+        this.zjlUserId = zjlUserId;
167
+    }
168
+
169
+    public Long getZjlUserId() 
170
+    {
171
+        return zjlUserId;
172
+    }
173
+    public void setZjlComment(String zjlComment) 
174
+    {
175
+        this.zjlComment = zjlComment;
176
+    }
177
+
178
+    public String getZjlComment() 
179
+    {
180
+        return zjlComment;
181
+    }
182
+    public void setZjlTime(Date zjlTime) 
183
+    {
184
+        this.zjlTime = zjlTime;
185
+    }
186
+
187
+    public Date getZjlTime() 
188
+    {
189
+        return zjlTime;
190
+    }
191
+
192
+    @Override
193
+    public String toString() {
194
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
195
+            .append("outsoureId", getOutsoureId())
196
+            .append("applyReason", getApplyReason())
197
+            .append("projectId", getProjectId())
198
+            .append("partnerId", getPartnerId())
199
+            .append("applier", getApplier())
200
+            .append("applyDept", getApplyDept())
201
+            .append("applyTime", getApplyTime())
202
+            .append("managerUserId", getManagerUserId())
203
+            .append("managerComment", getManagerComment())
204
+            .append("managerTime", getManagerTime())
205
+            .append("zjlUserId", getZjlUserId())
206
+            .append("zjlComment", getZjlComment())
207
+            .append("zjlTime", getZjlTime())
208
+            .toString();
209
+    }
210
+}

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

@@ -32,6 +32,11 @@ public class CmcProcureApproval extends BaseEntity
32 32
     @Excel(name = "申请部门")
33 33
     private Long applyDept;
34 34
 
35
+    /** 申请时间 */
36
+    @JsonFormat(pattern = "yyyy-MM-dd")
37
+    @Excel(name = "申请时间", width = 30, dateFormat = "yyyy-MM-dd")
38
+    private Date applyTime;
39
+
35 40
     /** 分管审核人 */
36 41
     @Excel(name = "分管审核人")
37 42
     private Long managerUserId;
@@ -107,6 +112,15 @@ public class CmcProcureApproval extends BaseEntity
107 112
     {
108 113
         return applyDept;
109 114
     }
115
+    public void setApplyTime(Date applyTime)
116
+    {
117
+        this.applyTime = applyTime;
118
+    }
119
+
120
+    public Date getApplyTime()
121
+    {
122
+        return applyTime;
123
+    }
110 124
     public void setManagerUserId(Long managerUserId) 
111 125
     {
112 126
         this.managerUserId = managerUserId;
@@ -196,6 +210,7 @@ public class CmcProcureApproval extends BaseEntity
196 210
             .append("applyReason", getApplyReason())
197 211
             .append("applier", getApplier())
198 212
             .append("applyDept", getApplyDept())
213
+            .append("applyTime", getApplyTime())
199 214
             .append("managerUserId", getManagerUserId())
200 215
             .append("managerComment", getManagerComment())
201 216
             .append("managerTime", getManagerTime())

+ 61
- 0
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/mapper/CmcOutsourceMapper.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.CmcOutsource;
5
+
6
+/**
7
+ * 项目委外Mapper接口
8
+ * 
9
+ * @author cmc
10
+ * @date 2024-09-19
11
+ */
12
+public interface CmcOutsourceMapper 
13
+{
14
+    /**
15
+     * 查询项目委外
16
+     * 
17
+     * @param outsoureId 项目委外主键
18
+     * @return 项目委外
19
+     */
20
+    public CmcOutsource selectCmcOutsourceByOutsoureId(String outsoureId);
21
+
22
+    /**
23
+     * 查询项目委外列表
24
+     * 
25
+     * @param cmcOutsource 项目委外
26
+     * @return 项目委外集合
27
+     */
28
+    public List<CmcOutsource> selectCmcOutsourceList(CmcOutsource cmcOutsource);
29
+
30
+    /**
31
+     * 新增项目委外
32
+     * 
33
+     * @param cmcOutsource 项目委外
34
+     * @return 结果
35
+     */
36
+    public int insertCmcOutsource(CmcOutsource cmcOutsource);
37
+
38
+    /**
39
+     * 修改项目委外
40
+     * 
41
+     * @param cmcOutsource 项目委外
42
+     * @return 结果
43
+     */
44
+    public int updateCmcOutsource(CmcOutsource cmcOutsource);
45
+
46
+    /**
47
+     * 删除项目委外
48
+     * 
49
+     * @param outsoureId 项目委外主键
50
+     * @return 结果
51
+     */
52
+    public int deleteCmcOutsourceByOutsoureId(String outsoureId);
53
+
54
+    /**
55
+     * 批量删除项目委外
56
+     * 
57
+     * @param outsoureIds 需要删除的数据主键集合
58
+     * @return 结果
59
+     */
60
+    public int deleteCmcOutsourceByOutsoureIds(String[] outsoureIds);
61
+}

+ 61
- 0
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/service/ICmcOutsourceService.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.CmcOutsource;
5
+
6
+/**
7
+ * 项目委外Service接口
8
+ * 
9
+ * @author cmc
10
+ * @date 2024-09-19
11
+ */
12
+public interface ICmcOutsourceService 
13
+{
14
+    /**
15
+     * 查询项目委外
16
+     * 
17
+     * @param outsoureId 项目委外主键
18
+     * @return 项目委外
19
+     */
20
+    public CmcOutsource selectCmcOutsourceByOutsoureId(String outsoureId);
21
+
22
+    /**
23
+     * 查询项目委外列表
24
+     * 
25
+     * @param cmcOutsource 项目委外
26
+     * @return 项目委外集合
27
+     */
28
+    public List<CmcOutsource> selectCmcOutsourceList(CmcOutsource cmcOutsource);
29
+
30
+    /**
31
+     * 新增项目委外
32
+     * 
33
+     * @param cmcOutsource 项目委外
34
+     * @return 结果
35
+     */
36
+    public int insertCmcOutsource(CmcOutsource cmcOutsource);
37
+
38
+    /**
39
+     * 修改项目委外
40
+     * 
41
+     * @param cmcOutsource 项目委外
42
+     * @return 结果
43
+     */
44
+    public int updateCmcOutsource(CmcOutsource cmcOutsource);
45
+
46
+    /**
47
+     * 批量删除项目委外
48
+     * 
49
+     * @param outsoureIds 需要删除的项目委外主键集合
50
+     * @return 结果
51
+     */
52
+    public int deleteCmcOutsourceByOutsoureIds(String[] outsoureIds);
53
+
54
+    /**
55
+     * 删除项目委外信息
56
+     * 
57
+     * @param outsoureId 项目委外主键
58
+     * @return 结果
59
+     */
60
+    public int deleteCmcOutsourceByOutsoureId(String outsoureId);
61
+}

+ 93
- 0
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/service/impl/CmcOutsourceServiceImpl.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.CmcOutsourceMapper;
7
+import com.ruoyi.oa.domain.CmcOutsource;
8
+import com.ruoyi.oa.service.ICmcOutsourceService;
9
+
10
+/**
11
+ * 项目委外Service业务层处理
12
+ * 
13
+ * @author cmc
14
+ * @date 2024-09-19
15
+ */
16
+@Service
17
+public class CmcOutsourceServiceImpl implements ICmcOutsourceService 
18
+{
19
+    @Autowired
20
+    private CmcOutsourceMapper cmcOutsourceMapper;
21
+
22
+    /**
23
+     * 查询项目委外
24
+     * 
25
+     * @param outsoureId 项目委外主键
26
+     * @return 项目委外
27
+     */
28
+    @Override
29
+    public CmcOutsource selectCmcOutsourceByOutsoureId(String outsoureId)
30
+    {
31
+        return cmcOutsourceMapper.selectCmcOutsourceByOutsoureId(outsoureId);
32
+    }
33
+
34
+    /**
35
+     * 查询项目委外列表
36
+     * 
37
+     * @param cmcOutsource 项目委外
38
+     * @return 项目委外
39
+     */
40
+    @Override
41
+    public List<CmcOutsource> selectCmcOutsourceList(CmcOutsource cmcOutsource)
42
+    {
43
+        return cmcOutsourceMapper.selectCmcOutsourceList(cmcOutsource);
44
+    }
45
+
46
+    /**
47
+     * 新增项目委外
48
+     * 
49
+     * @param cmcOutsource 项目委外
50
+     * @return 结果
51
+     */
52
+    @Override
53
+    public int insertCmcOutsource(CmcOutsource cmcOutsource)
54
+    {
55
+        return cmcOutsourceMapper.insertCmcOutsource(cmcOutsource);
56
+    }
57
+
58
+    /**
59
+     * 修改项目委外
60
+     * 
61
+     * @param cmcOutsource 项目委外
62
+     * @return 结果
63
+     */
64
+    @Override
65
+    public int updateCmcOutsource(CmcOutsource cmcOutsource)
66
+    {
67
+        return cmcOutsourceMapper.updateCmcOutsource(cmcOutsource);
68
+    }
69
+
70
+    /**
71
+     * 批量删除项目委外
72
+     * 
73
+     * @param outsoureIds 需要删除的项目委外主键
74
+     * @return 结果
75
+     */
76
+    @Override
77
+    public int deleteCmcOutsourceByOutsoureIds(String[] outsoureIds)
78
+    {
79
+        return cmcOutsourceMapper.deleteCmcOutsourceByOutsoureIds(outsoureIds);
80
+    }
81
+
82
+    /**
83
+     * 删除项目委外信息
84
+     * 
85
+     * @param outsoureId 项目委外主键
86
+     * @return 结果
87
+     */
88
+    @Override
89
+    public int deleteCmcOutsourceByOutsoureId(String outsoureId)
90
+    {
91
+        return cmcOutsourceMapper.deleteCmcOutsourceByOutsoureId(outsoureId);
92
+    }
93
+}

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

@@ -0,0 +1,113 @@
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.CmcOutsourceMapper">
6
+    
7
+    <resultMap type="CmcOutsource" id="CmcOutsourceResult">
8
+        <result property="outsoureId"    column="outsoure_id"    />
9
+        <result property="applyReason"    column="apply_reason"    />
10
+        <result property="projectId"    column="project_id"    />
11
+        <result property="partnerId"    column="partner_id"    />
12
+        <result property="applier"    column="applier"    />
13
+        <result property="applyDept"    column="apply_dept"    />
14
+        <result property="applyTime"    column="apply_time"    />
15
+        <result property="managerUserId"    column="manager_user_id"    />
16
+        <result property="managerComment"    column="manager_comment"    />
17
+        <result property="managerTime"    column="manager_time"    />
18
+        <result property="zjlUserId"    column="zjl_user_id"    />
19
+        <result property="zjlComment"    column="zjl_comment"    />
20
+        <result property="zjlTime"    column="zjl_time"    />
21
+    </resultMap>
22
+
23
+    <sql id="selectCmcOutsourceVo">
24
+        select outsoure_id, apply_reason, project_id, partner_id, applier, apply_dept, apply_time, manager_user_id, manager_comment, manager_time, zjl_user_id, zjl_comment, zjl_time from cmc_outsource
25
+    </sql>
26
+
27
+    <select id="selectCmcOutsourceList" parameterType="CmcOutsource" resultMap="CmcOutsourceResult">
28
+        <include refid="selectCmcOutsourceVo"/>
29
+        <where>  
30
+            <if test="applyReason != null  and applyReason != ''"> and apply_reason = #{applyReason}</if>
31
+            <if test="projectId != null  and projectId != ''"> and project_id = #{projectId}</if>
32
+            <if test="partnerId != null  and partnerId != ''"> and partner_id = #{partnerId}</if>
33
+            <if test="applier != null "> and applier = #{applier}</if>
34
+            <if test="applyDept != null "> and apply_dept = #{applyDept}</if>
35
+            <if test="applyTime != null "> and apply_time = #{applyTime}</if>
36
+            <if test="managerUserId != null "> and manager_user_id = #{managerUserId}</if>
37
+            <if test="managerComment != null  and managerComment != ''"> and manager_comment = #{managerComment}</if>
38
+            <if test="managerTime != null "> and manager_time = #{managerTime}</if>
39
+            <if test="zjlUserId != null "> and zjl_user_id = #{zjlUserId}</if>
40
+            <if test="zjlComment != null  and zjlComment != ''"> and zjl_comment = #{zjlComment}</if>
41
+            <if test="zjlTime != null "> and zjl_time = #{zjlTime}</if>
42
+        </where>
43
+    </select>
44
+    
45
+    <select id="selectCmcOutsourceByOutsoureId" parameterType="String" resultMap="CmcOutsourceResult">
46
+        <include refid="selectCmcOutsourceVo"/>
47
+        where outsoure_id = #{outsoureId}
48
+    </select>
49
+        
50
+    <insert id="insertCmcOutsource" parameterType="CmcOutsource">
51
+        insert into cmc_outsource
52
+        <trim prefix="(" suffix=")" suffixOverrides=",">
53
+            <if test="outsoureId != null">outsoure_id,</if>
54
+            <if test="applyReason != null">apply_reason,</if>
55
+            <if test="projectId != null">project_id,</if>
56
+            <if test="partnerId != null">partner_id,</if>
57
+            <if test="applier != null">applier,</if>
58
+            <if test="applyDept != null">apply_dept,</if>
59
+            <if test="applyTime != null">apply_time,</if>
60
+            <if test="managerUserId != null">manager_user_id,</if>
61
+            <if test="managerComment != null">manager_comment,</if>
62
+            <if test="managerTime != null">manager_time,</if>
63
+            <if test="zjlUserId != null">zjl_user_id,</if>
64
+            <if test="zjlComment != null">zjl_comment,</if>
65
+            <if test="zjlTime != null">zjl_time,</if>
66
+         </trim>
67
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
68
+            <if test="outsoureId != null">#{outsoureId},</if>
69
+            <if test="applyReason != null">#{applyReason},</if>
70
+            <if test="projectId != null">#{projectId},</if>
71
+            <if test="partnerId != null">#{partnerId},</if>
72
+            <if test="applier != null">#{applier},</if>
73
+            <if test="applyDept != null">#{applyDept},</if>
74
+            <if test="applyTime != null">#{applyTime},</if>
75
+            <if test="managerUserId != null">#{managerUserId},</if>
76
+            <if test="managerComment != null">#{managerComment},</if>
77
+            <if test="managerTime != null">#{managerTime},</if>
78
+            <if test="zjlUserId != null">#{zjlUserId},</if>
79
+            <if test="zjlComment != null">#{zjlComment},</if>
80
+            <if test="zjlTime != null">#{zjlTime},</if>
81
+         </trim>
82
+    </insert>
83
+
84
+    <update id="updateCmcOutsource" parameterType="CmcOutsource">
85
+        update cmc_outsource
86
+        <trim prefix="SET" suffixOverrides=",">
87
+            <if test="applyReason != null">apply_reason = #{applyReason},</if>
88
+            <if test="projectId != null">project_id = #{projectId},</if>
89
+            <if test="partnerId != null">partner_id = #{partnerId},</if>
90
+            <if test="applier != null">applier = #{applier},</if>
91
+            <if test="applyDept != null">apply_dept = #{applyDept},</if>
92
+            <if test="applyTime != null">apply_time = #{applyTime},</if>
93
+            <if test="managerUserId != null">manager_user_id = #{managerUserId},</if>
94
+            <if test="managerComment != null">manager_comment = #{managerComment},</if>
95
+            <if test="managerTime != null">manager_time = #{managerTime},</if>
96
+            <if test="zjlUserId != null">zjl_user_id = #{zjlUserId},</if>
97
+            <if test="zjlComment != null">zjl_comment = #{zjlComment},</if>
98
+            <if test="zjlTime != null">zjl_time = #{zjlTime},</if>
99
+        </trim>
100
+        where outsoure_id = #{outsoureId}
101
+    </update>
102
+
103
+    <delete id="deleteCmcOutsourceByOutsoureId" parameterType="String">
104
+        delete from cmc_outsource where outsoure_id = #{outsoureId}
105
+    </delete>
106
+
107
+    <delete id="deleteCmcOutsourceByOutsoureIds" parameterType="String">
108
+        delete from cmc_outsource where outsoure_id in 
109
+        <foreach item="outsoureId" collection="array" open="(" separator="," close=")">
110
+            #{outsoureId}
111
+        </foreach>
112
+    </delete>
113
+</mapper>

+ 6
- 1
oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcProcureApprovalMapper.xml Bestand weergeven

@@ -9,6 +9,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
9 9
         <result property="applyReason"    column="apply_reason"    />
10 10
         <result property="applier"    column="applier"    />
11 11
         <result property="applyDept"    column="apply_dept"    />
12
+        <result property="applyTime"    column="apply_time"    />
12 13
         <result property="managerUserId"    column="manager_user_id"    />
13 14
         <result property="managerComment"    column="manager_comment"    />
14 15
         <result property="managerTime"    column="manager_time"    />
@@ -21,7 +22,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
21 22
     </resultMap>
22 23
 
23 24
     <sql id="selectCmcProcureApprovalVo">
24
-        select procure_apply_id, apply_reason, applier, apply_dept, manager_user_id, manager_comment, manager_time, zjl_user_id, zjl_comment, zjl_time, plan_user_id, plan_time, plan_comment from cmc_procure_approval
25
+        select procure_apply_id, apply_reason, applier, apply_dept, apply_time, manager_user_id, manager_comment, manager_time, zjl_user_id, zjl_comment, zjl_time, plan_user_id, plan_time, plan_comment from cmc_procure_approval
25 26
     </sql>
26 27
 
27 28
     <select id="selectCmcProcureApprovalList" parameterType="CmcProcureApproval" resultMap="CmcProcureApprovalResult">
@@ -30,6 +31,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
30 31
             <if test="applyReason != null  and applyReason != ''"> and apply_reason = #{applyReason}</if>
31 32
             <if test="applier != null "> and applier = #{applier}</if>
32 33
             <if test="applyDept != null "> and apply_dept = #{applyDept}</if>
34
+            <if test="applyTime != null "> and apply_time = #{applyTime}</if>
33 35
             <if test="managerUserId != null "> and manager_user_id = #{managerUserId}</if>
34 36
             <if test="managerComment != null  and managerComment != ''"> and manager_comment = #{managerComment}</if>
35 37
             <if test="managerTime != null "> and manager_time = #{managerTime}</if>
@@ -54,6 +56,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
54 56
             <if test="applyReason != null">apply_reason,</if>
55 57
             <if test="applier != null">applier,</if>
56 58
             <if test="applyDept != null">apply_dept,</if>
59
+            <if test="applyTime != null">apply_time,</if>
57 60
             <if test="managerUserId != null">manager_user_id,</if>
58 61
             <if test="managerComment != null">manager_comment,</if>
59 62
             <if test="managerTime != null">manager_time,</if>
@@ -69,6 +72,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
69 72
             <if test="applyReason != null">#{applyReason},</if>
70 73
             <if test="applier != null">#{applier},</if>
71 74
             <if test="applyDept != null">#{applyDept},</if>
75
+            <if test="applyTime != null">#{applyTime},</if>
72 76
             <if test="managerUserId != null">#{managerUserId},</if>
73 77
             <if test="managerComment != null">#{managerComment},</if>
74 78
             <if test="managerTime != null">#{managerTime},</if>
@@ -87,6 +91,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
87 91
             <if test="applyReason != null">apply_reason = #{applyReason},</if>
88 92
             <if test="applier != null">applier = #{applier},</if>
89 93
             <if test="applyDept != null">apply_dept = #{applyDept},</if>
94
+            <if test="applyTime != null">apply_time = #{applyTime},</if>
90 95
             <if test="managerUserId != null">manager_user_id = #{managerUserId},</if>
91 96
             <if test="managerComment != null">manager_comment = #{managerComment},</if>
92 97
             <if test="managerTime != null">manager_time = #{managerTime},</if>

+ 44
- 0
oa-ui/src/api/oa/outsource/outsource.js Bestand weergeven

@@ -0,0 +1,44 @@
1
+import request from '@/utils/request'
2
+
3
+// 查询项目委外列表
4
+export function listOutsource(query) {
5
+  return request({
6
+    url: '/oa/outsource/list',
7
+    method: 'get',
8
+    params: query
9
+  })
10
+}
11
+
12
+// 查询项目委外详细
13
+export function getOutsource(outsoureId) {
14
+  return request({
15
+    url: '/oa/outsource/' + outsoureId,
16
+    method: 'get'
17
+  })
18
+}
19
+
20
+// 新增项目委外
21
+export function addOutsource(data) {
22
+  return request({
23
+    url: '/oa/outsource',
24
+    method: 'post',
25
+    data: data
26
+  })
27
+}
28
+
29
+// 修改项目委外
30
+export function updateOutsource(data) {
31
+  return request({
32
+    url: '/oa/outsource',
33
+    method: 'put',
34
+    data: data
35
+  })
36
+}
37
+
38
+// 删除项目委外
39
+export function delOutsource(outsoureId) {
40
+  return request({
41
+    url: '/oa/outsource/' + outsoureId,
42
+    method: 'delete'
43
+  })
44
+}

+ 426
- 0
oa-ui/src/views/oa/outsource/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="applyReason">
5
+        <el-input
6
+          v-model="queryParams.applyReason"
7
+          placeholder="请输入委外说明"
8
+          clearable
9
+          @keyup.enter.native="handleQuery"
10
+        />
11
+      </el-form-item>
12
+      <el-form-item label="项目id" prop="projectId">
13
+        <el-input
14
+          v-model="queryParams.projectId"
15
+          placeholder="请输入项目id"
16
+          clearable
17
+          @keyup.enter.native="handleQuery"
18
+        />
19
+      </el-form-item>
20
+      <el-form-item label="合作单位id" prop="partnerId">
21
+        <el-input
22
+          v-model="queryParams.partnerId"
23
+          placeholder="请输入合作单位id"
24
+          clearable
25
+          @keyup.enter.native="handleQuery"
26
+        />
27
+      </el-form-item>
28
+      <el-form-item label="申请人" prop="applier">
29
+        <el-input
30
+          v-model="queryParams.applier"
31
+          placeholder="请输入申请人"
32
+          clearable
33
+          @keyup.enter.native="handleQuery"
34
+        />
35
+      </el-form-item>
36
+      <el-form-item label="申请部门" prop="applyDept">
37
+        <el-input
38
+          v-model="queryParams.applyDept"
39
+          placeholder="请输入申请部门"
40
+          clearable
41
+          @keyup.enter.native="handleQuery"
42
+        />
43
+      </el-form-item>
44
+      <el-form-item label="申请时间" prop="applyTime">
45
+        <el-date-picker clearable
46
+          v-model="queryParams.applyTime"
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="managerUserId">
53
+        <el-input
54
+          v-model="queryParams.managerUserId"
55
+          placeholder="请输入分管审核人"
56
+          clearable
57
+          @keyup.enter.native="handleQuery"
58
+        />
59
+      </el-form-item>
60
+      <el-form-item label="分管审核意见" prop="managerComment">
61
+        <el-input
62
+          v-model="queryParams.managerComment"
63
+          placeholder="请输入分管审核意见"
64
+          clearable
65
+          @keyup.enter.native="handleQuery"
66
+        />
67
+      </el-form-item>
68
+      <el-form-item label="分管审核时间" prop="managerTime">
69
+        <el-date-picker clearable
70
+          v-model="queryParams.managerTime"
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="zjlUserId">
77
+        <el-input
78
+          v-model="queryParams.zjlUserId"
79
+          placeholder="请输入总经理审批人"
80
+          clearable
81
+          @keyup.enter.native="handleQuery"
82
+        />
83
+      </el-form-item>
84
+      <el-form-item label="总经理审批意见" prop="zjlComment">
85
+        <el-input
86
+          v-model="queryParams.zjlComment"
87
+          placeholder="请输入总经理审批意见"
88
+          clearable
89
+          @keyup.enter.native="handleQuery"
90
+        />
91
+      </el-form-item>
92
+      <el-form-item label="总经理审批时间" prop="zjlTime">
93
+        <el-date-picker clearable
94
+          v-model="queryParams.zjlTime"
95
+          type="date"
96
+          value-format="yyyy-MM-dd"
97
+          placeholder="请选择总经理审批时间">
98
+        </el-date-picker>
99
+      </el-form-item>
100
+      <el-form-item>
101
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
102
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
103
+      </el-form-item>
104
+    </el-form>
105
+
106
+    <el-row :gutter="10" class="mb8">
107
+      <el-col :span="1.5">
108
+        <el-button
109
+          type="primary"
110
+          plain
111
+          icon="el-icon-plus"
112
+          size="mini"
113
+          @click="handleAdd"
114
+          v-hasPermi="['oa:outsource:add']"
115
+        >新增</el-button>
116
+      </el-col>
117
+      <el-col :span="1.5">
118
+        <el-button
119
+          type="success"
120
+          plain
121
+          icon="el-icon-edit"
122
+          size="mini"
123
+          :disabled="single"
124
+          @click="handleUpdate"
125
+          v-hasPermi="['oa:outsource:edit']"
126
+        >修改</el-button>
127
+      </el-col>
128
+      <el-col :span="1.5">
129
+        <el-button
130
+          type="danger"
131
+          plain
132
+          icon="el-icon-delete"
133
+          size="mini"
134
+          :disabled="multiple"
135
+          @click="handleDelete"
136
+          v-hasPermi="['oa:outsource:remove']"
137
+        >删除</el-button>
138
+      </el-col>
139
+      <el-col :span="1.5">
140
+        <el-button
141
+          type="warning"
142
+          plain
143
+          icon="el-icon-download"
144
+          size="mini"
145
+          @click="handleExport"
146
+          v-hasPermi="['oa:outsource:export']"
147
+        >导出</el-button>
148
+      </el-col>
149
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
150
+    </el-row>
151
+
152
+    <el-table v-loading="loading" :data="outsourceList" @selection-change="handleSelectionChange">
153
+      <el-table-column type="selection" width="55" align="center" />
154
+      <el-table-column label="委外id" align="center" prop="outsoureId" />
155
+      <el-table-column label="委外说明" align="center" prop="applyReason" />
156
+      <el-table-column label="项目id" align="center" prop="projectId" />
157
+      <el-table-column label="合作单位id" align="center" prop="partnerId" />
158
+      <el-table-column label="申请人" align="center" prop="applier" />
159
+      <el-table-column label="申请部门" align="center" prop="applyDept" />
160
+      <el-table-column label="申请时间" align="center" prop="applyTime" width="180">
161
+        <template slot-scope="scope">
162
+          <span>{{ parseTime(scope.row.applyTime, '{y}-{m}-{d}') }}</span>
163
+        </template>
164
+      </el-table-column>
165
+      <el-table-column label="分管审核人" align="center" prop="managerUserId" />
166
+      <el-table-column label="分管审核意见" align="center" prop="managerComment" />
167
+      <el-table-column label="分管审核时间" align="center" prop="managerTime" width="180">
168
+        <template slot-scope="scope">
169
+          <span>{{ parseTime(scope.row.managerTime, '{y}-{m}-{d}') }}</span>
170
+        </template>
171
+      </el-table-column>
172
+      <el-table-column label="总经理审批人" align="center" prop="zjlUserId" />
173
+      <el-table-column label="总经理审批意见" align="center" prop="zjlComment" />
174
+      <el-table-column label="总经理审批时间" align="center" prop="zjlTime" width="180">
175
+        <template slot-scope="scope">
176
+          <span>{{ parseTime(scope.row.zjlTime, '{y}-{m}-{d}') }}</span>
177
+        </template>
178
+      </el-table-column>
179
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
180
+        <template slot-scope="scope">
181
+          <el-button
182
+            size="mini"
183
+            type="text"
184
+            icon="el-icon-edit"
185
+            @click="handleUpdate(scope.row)"
186
+            v-hasPermi="['oa:outsource:edit']"
187
+          >修改</el-button>
188
+          <el-button
189
+            size="mini"
190
+            type="text"
191
+            icon="el-icon-delete"
192
+            @click="handleDelete(scope.row)"
193
+            v-hasPermi="['oa:outsource:remove']"
194
+          >删除</el-button>
195
+        </template>
196
+      </el-table-column>
197
+    </el-table>
198
+    
199
+    <pagination
200
+      v-show="total>0"
201
+      :total="total"
202
+      :page.sync="queryParams.pageNum"
203
+      :limit.sync="queryParams.pageSize"
204
+      @pagination="getList"
205
+    />
206
+
207
+    <!-- 添加或修改项目委外对话框 -->
208
+    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
209
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
210
+        <el-form-item label="委外说明" prop="applyReason">
211
+          <el-input v-model="form.applyReason" placeholder="请输入委外说明" />
212
+        </el-form-item>
213
+        <el-form-item label="项目id" prop="projectId">
214
+          <el-input v-model="form.projectId" placeholder="请输入项目id" />
215
+        </el-form-item>
216
+        <el-form-item label="合作单位id" prop="partnerId">
217
+          <el-input v-model="form.partnerId" placeholder="请输入合作单位id" />
218
+        </el-form-item>
219
+        <el-form-item label="申请人" prop="applier">
220
+          <el-input v-model="form.applier" placeholder="请输入申请人" />
221
+        </el-form-item>
222
+        <el-form-item label="申请部门" prop="applyDept">
223
+          <el-input v-model="form.applyDept" placeholder="请输入申请部门" />
224
+        </el-form-item>
225
+        <el-form-item label="申请时间" prop="applyTime">
226
+          <el-date-picker clearable
227
+            v-model="form.applyTime"
228
+            type="date"
229
+            value-format="yyyy-MM-dd"
230
+            placeholder="请选择申请时间">
231
+          </el-date-picker>
232
+        </el-form-item>
233
+        <el-form-item label="分管审核人" prop="managerUserId">
234
+          <el-input v-model="form.managerUserId" placeholder="请输入分管审核人" />
235
+        </el-form-item>
236
+        <el-form-item label="分管审核意见" prop="managerComment">
237
+          <el-input v-model="form.managerComment" placeholder="请输入分管审核意见" />
238
+        </el-form-item>
239
+        <el-form-item label="分管审核时间" prop="managerTime">
240
+          <el-date-picker clearable
241
+            v-model="form.managerTime"
242
+            type="date"
243
+            value-format="yyyy-MM-dd"
244
+            placeholder="请选择分管审核时间">
245
+          </el-date-picker>
246
+        </el-form-item>
247
+        <el-form-item label="总经理审批人" prop="zjlUserId">
248
+          <el-input v-model="form.zjlUserId" placeholder="请输入总经理审批人" />
249
+        </el-form-item>
250
+        <el-form-item label="总经理审批意见" prop="zjlComment">
251
+          <el-input v-model="form.zjlComment" placeholder="请输入总经理审批意见" />
252
+        </el-form-item>
253
+        <el-form-item label="总经理审批时间" prop="zjlTime">
254
+          <el-date-picker clearable
255
+            v-model="form.zjlTime"
256
+            type="date"
257
+            value-format="yyyy-MM-dd"
258
+            placeholder="请选择总经理审批时间">
259
+          </el-date-picker>
260
+        </el-form-item>
261
+      </el-form>
262
+      <div slot="footer" class="dialog-footer">
263
+        <el-button type="primary" @click="submitForm">确 定</el-button>
264
+        <el-button @click="cancel">取 消</el-button>
265
+      </div>
266
+    </el-dialog>
267
+  </div>
268
+</template>
269
+
270
+<script>
271
+import { listOutsource, getOutsource, delOutsource, addOutsource, updateOutsource } from "@/api/oa/outsource/outsource";
272
+
273
+export default {
274
+  name: "Outsource",
275
+  data() {
276
+    return {
277
+      // 遮罩层
278
+      loading: true,
279
+      // 选中数组
280
+      ids: [],
281
+      // 非单个禁用
282
+      single: true,
283
+      // 非多个禁用
284
+      multiple: true,
285
+      // 显示搜索条件
286
+      showSearch: true,
287
+      // 总条数
288
+      total: 0,
289
+      // 项目委外表格数据
290
+      outsourceList: [],
291
+      // 弹出层标题
292
+      title: "",
293
+      // 是否显示弹出层
294
+      open: false,
295
+      // 查询参数
296
+      queryParams: {
297
+        pageNum: 1,
298
+        pageSize: 10,
299
+        applyReason: null,
300
+        projectId: null,
301
+        partnerId: null,
302
+        applier: null,
303
+        applyDept: null,
304
+        applyTime: null,
305
+        managerUserId: null,
306
+        managerComment: null,
307
+        managerTime: null,
308
+        zjlUserId: null,
309
+        zjlComment: null,
310
+        zjlTime: 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
+      listOutsource(this.queryParams).then(response => {
327
+        this.outsourceList = 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
+        outsoureId: null,
341
+        applyReason: null,
342
+        projectId: null,
343
+        partnerId: null,
344
+        applier: null,
345
+        applyDept: null,
346
+        applyTime: null,
347
+        managerUserId: null,
348
+        managerComment: null,
349
+        managerTime: null,
350
+        zjlUserId: null,
351
+        zjlComment: null,
352
+        zjlTime: 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.outsoureId)
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 outsoureId = row.outsoureId || this.ids
382
+      getOutsource(outsoureId).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.outsoureId != null) {
393
+            updateOutsource(this.form).then(response => {
394
+              this.$modal.msgSuccess("修改成功");
395
+              this.open = false;
396
+              this.getList();
397
+            });
398
+          } else {
399
+            addOutsource(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 outsoureIds = row.outsoureId || this.ids;
411
+      this.$modal.confirm('是否确认删除项目委外编号为"' + outsoureIds + '"的数据项?').then(function() {
412
+        return delOutsource(outsoureIds);
413
+      }).then(() => {
414
+        this.getList();
415
+        this.$modal.msgSuccess("删除成功");
416
+      }).catch(() => {});
417
+    },
418
+    /** 导出按钮操作 */
419
+    handleExport() {
420
+      this.download('oa/outsource/export', {
421
+        ...this.queryParams
422
+      }, `outsource_${new Date().getTime()}.xlsx`)
423
+    }
424
+  }
425
+};
426
+</script>

Laden…
Annuleren
Opslaan