Przeglądaj źródła

新增项目变更流程

lamphua 1 rok temu
rodzic
commit
e7436ac0db

+ 97
- 0
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcProjectChangeController.java Wyświetl plik

@@ -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.CmcProjectChange;
19
+import com.ruoyi.oa.service.ICmcProjectChangeService;
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 2024-06-05
28
+ */
29
+@RestController
30
+@RequestMapping("/oa/projectChange")
31
+public class CmcProjectChangeController extends BaseController
32
+{
33
+    @Autowired
34
+    private ICmcProjectChangeService cmcProjectChangeService;
35
+
36
+    /**
37
+     * 查询cmc项目变更列表
38
+     */
39
+    @GetMapping("/list")
40
+    public TableDataInfo list(CmcProjectChange cmcProjectChange)
41
+    {
42
+        startPage();
43
+        List<CmcProjectChange> list = cmcProjectChangeService.selectCmcProjectChangeList(cmcProjectChange);
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, CmcProjectChange cmcProjectChange)
53
+    {
54
+        List<CmcProjectChange> list = cmcProjectChangeService.selectCmcProjectChangeList(cmcProjectChange);
55
+        ExcelUtil<CmcProjectChange> util = new ExcelUtil<CmcProjectChange>(CmcProjectChange.class);
56
+        util.exportExcel(response, list, "cmc项目变更数据");
57
+    }
58
+
59
+    /**
60
+     * 获取cmc项目变更详细信息
61
+     */
62
+    @GetMapping(value = "/{changeId}")
63
+    public AjaxResult getInfo(@PathVariable("changeId") Long changeId)
64
+    {
65
+        return success(cmcProjectChangeService.selectCmcProjectChangeByChangeId(changeId));
66
+    }
67
+
68
+    /**
69
+     * 新增cmc项目变更
70
+     */
71
+    @Log(title = "cmc项目变更", businessType = BusinessType.INSERT)
72
+    @PostMapping
73
+    public AjaxResult add(@RequestBody CmcProjectChange cmcProjectChange)
74
+    {
75
+        return toAjax(cmcProjectChangeService.insertCmcProjectChange(cmcProjectChange));
76
+    }
77
+
78
+    /**
79
+     * 修改cmc项目变更
80
+     */
81
+    @Log(title = "cmc项目变更", businessType = BusinessType.UPDATE)
82
+    @PutMapping
83
+    public AjaxResult edit(@RequestBody CmcProjectChange cmcProjectChange)
84
+    {
85
+        return toAjax(cmcProjectChangeService.updateCmcProjectChange(cmcProjectChange));
86
+    }
87
+
88
+    /**
89
+     * 删除cmc项目变更
90
+     */
91
+    @Log(title = "cmc项目变更", businessType = BusinessType.DELETE)
92
+	@DeleteMapping("/{changeIds}")
93
+    public AjaxResult remove(@PathVariable Long[] changeIds)
94
+    {
95
+        return toAjax(cmcProjectChangeService.deleteCmcProjectChangeByChangeIds(changeIds));
96
+    }
97
+}

+ 7
- 7
oa-back/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysUser.java Wyświetl plik

@@ -87,20 +87,20 @@ public class SysUser extends BaseEntity
87 87
     @Excel(name = "工程师岗级", readConverterExp = "0=一级,1=二级,2=三级,3=四级,4=五级,5=六级")
88 88
     private String engineerLevel;
89 89
 
90
-    /** 技工等级(0一级、1二级、2三级) */
91
-    @Excel(name = "技工等级", readConverterExp = "0=一级、1二级、2三级")
90
+    /** 技工等级 */
91
+    @Excel(name = "技工等级", readConverterExp = "0=一级,1=二级,2=三级")
92 92
     private String operatorLevel;
93 93
 
94 94
     /** 技术职称 */
95
-    @Excel(name = "技术职称", readConverterExp = "0=正高,1=高,2=中级,3=助工")
95
+    @Excel(name = "技术职称", readConverterExp = "0=正高级工程师,1=高级工程师,2=中级工程师,3=助程师,4=高级会计师,5=会计师,6=助理会计师,7=高级经济师,8=经济师,9=助理经济师,10=工人高级工,11=工人中级工,12=工人初级工,13=无职称")
96 96
     private String titles;
97 97
 
98 98
     /** 执业证书 */
99
-    @Excel(name = "执业证书", readConverterExp = "0=注测,1=注规,2=注岩,3=注安,4=注会")
99
+    @Excel(name = "执业证书", readConverterExp = "0=注绘师,1=注册城乡划师,2=注土工程师,3=注全工程师,4=注计师")
100 100
     private String certificates;
101 101
 
102 102
     /** 更新原因 */
103
-    @Excel(name = "更新原因", readConverterExp = "0=误录修改1=正常调整)")
103
+    @Excel(name = "更新原因", readConverterExp = "0=误录修改,1=正常调整)")
104 104
     private String updateReason;
105 105
 
106 106
     /** 入职时间 */
@@ -124,7 +124,7 @@ public class SysUser extends BaseEntity
124 124
     private String nativePlace;
125 125
 
126 126
     /** 政治面貌 */
127
-    @Excel(name = "政治面貌")
127
+    @Excel(name = "政治面貌", readConverterExp = "0=党总支书记,1=党总支干事,2=党总支委员,3=第一党支部书记,4=第二党支部书记,5=第一党支部组织委员,6=第二党支部组织委员,7=第一党支部宣传委员,8=第二党支部宣传委员,9=第一党支部党员,10=第二党支部党员,11=预备党员,12=共青团员,13=群众")
128 128
     private String politicalAffiliation;
129 129
 
130 130
     /** 民族 */
@@ -140,7 +140,7 @@ public class SysUser extends BaseEntity
140 140
     private String major;
141 141
 
142 142
     /** 学历 */
143
-    @Excel(name = "学历")
143
+    @Excel(name = "学历", readConverterExp = "0=博士,1=硕士,2=本科,3=专科,4=高中,5=中专,6=初中")
144 144
     private String degree;
145 145
 
146 146
     /** 合同签订 */

+ 1
- 1
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/domain/CmcCarExpense.java Wyświetl plik

@@ -65,7 +65,7 @@ public class CmcCarExpense extends BaseEntity
65 65
     public void setCar(CmcCar car)
66 66
     {
67 67
         this.car = car;
68
-        this.licensePlate = car.getLicensePlate();
68
+        this.licensePlate = car != null ? car.getLicensePlate() : "";
69 69
     }
70 70
 
71 71
     public CmcCar getCar()

+ 12
- 6
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/domain/CmcContract.java Wyświetl plik

@@ -33,7 +33,8 @@ public class CmcContract extends BaseEntity
33 33
     /** 投标项目 */
34 34
     private String tenderId;
35 35
 
36
-    /** 投标项目 */
36
+    @Excel(name = "投标项目")
37
+    private String tenderName;
37 38
     private CmcTender tender;
38 39
 
39 40
     /** 合同金额 */
@@ -49,13 +50,12 @@ public class CmcContract extends BaseEntity
49 50
     private String contractDocument;
50 51
 
51 52
     /** 拟稿人 */
52
-    @Excel(name = "拟稿人")
53 53
     private Long drafter;
54 54
 
55
+    @Excel(name = "拟稿人")
56
+    private String draftUserName;
55 57
     private SysUser draftUser;
56 58
 
57
-    private SysUser managerUser;
58
-
59 59
     /** 拟稿日期 */
60 60
     @JsonFormat(pattern = "yyyy-MM-dd")
61 61
     @Excel(name = "拟稿日期", width = 30, dateFormat = "yyyy-MM-dd")
@@ -75,7 +75,7 @@ public class CmcContract extends BaseEntity
75 75
     private String signScan;
76 76
 
77 77
     /** 评审方式 */
78
-    @Excel(name = "评审方式")
78
+    @Excel(name = "评审方式", readConverterExp = "0=无须评审,1=会议评审,2=线上会审")
79 79
     private String commentType;
80 80
 
81 81
     /** 分管审批意见 */
@@ -83,9 +83,12 @@ public class CmcContract extends BaseEntity
83 83
     private String managerComment;
84 84
 
85 85
     /** 分管审批人 */
86
-    @Excel(name = "分管审批人")
87 86
     private Long managerUserId;
88 87
 
88
+    @Excel(name = "分管审批人")
89
+    private String managerUserName;
90
+    private SysUser managerUser;
91
+
89 92
     /** 分管审批日期 */
90 93
     @JsonFormat(pattern = "yyyy-MM-dd")
91 94
     @Excel(name = "分管审批日期", width = 30, dateFormat = "yyyy-MM-dd")
@@ -130,6 +133,7 @@ public class CmcContract extends BaseEntity
130 133
     public void setTender(CmcTender tender)
131 134
     {
132 135
         this.tender = tender;
136
+        this.tenderName = tender != null ? tender.getProjectName() : "";
133 137
     }
134 138
 
135 139
     public CmcTender getTender()
@@ -175,6 +179,7 @@ public class CmcContract extends BaseEntity
175 179
     public void setDraftUser(SysUser draftUser)
176 180
     {
177 181
         this.draftUser = draftUser;
182
+        this.draftUserName = draftUser != null ? draftUser.getNickName() : "";
178 183
     }
179 184
 
180 185
     public SysUser getDraftUser()
@@ -184,6 +189,7 @@ public class CmcContract extends BaseEntity
184 189
     public void setManagerUser(SysUser managerUser)
185 190
     {
186 191
         this.managerUser = managerUser;
192
+        this.managerUserName = managerUser != null ? managerUser.getNickName() : "";
187 193
     }
188 194
 
189 195
     public SysUser getManagerUser()

+ 8
- 6
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/domain/CmcDeviceExpense.java Wyświetl plik

@@ -86,11 +86,13 @@ public class CmcDeviceExpense extends BaseEntity
86 86
     public void setDevice(CmcDevice device)
87 87
     {
88 88
         this.device = device;
89
-        this.deviceNumber = device.getDeviceNumber();
90
-        this.brand = device.getBrand();
91
-        this.series = device.getSeries();
92
-        this.name = device.getName();
93
-        this.code = device.getCode();
89
+        if (device != null) {
90
+            this.deviceNumber = device.getDeviceNumber();
91
+            this.brand = device.getBrand();
92
+            this.series = device.getSeries();
93
+            this.name = device.getName();
94
+            this.code = device.getCode();
95
+        }
94 96
     }
95 97
 
96 98
     public CmcDevice getDevice()
@@ -109,7 +111,7 @@ public class CmcDeviceExpense extends BaseEntity
109 111
     public void setUser(SysUser user)
110 112
     {
111 113
         this.user = user;
112
-        this.nickName = user.getNickName();
114
+        this.nickName = user != null ? user.getNickName() : "";
113 115
     }
114 116
 
115 117
     public SysUser getUser()

+ 11
- 9
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/domain/CmcDeviceHandover.java Wyświetl plik

@@ -104,11 +104,13 @@ public class CmcDeviceHandover extends BaseEntity
104 104
     public void setDevice(CmcDevice device)
105 105
     {
106 106
         this.device = device;
107
-        this.deviceNumber = device.getDeviceNumber();
108
-        this.brand = device.getBrand();
109
-        this.series = device.getSeries();
110
-        this.name = device.getName();
111
-        this.code = device.getCode();
107
+        if (device != null) {
108
+            this.deviceNumber = device.getDeviceNumber();
109
+            this.brand = device.getBrand();
110
+            this.series = device.getSeries();
111
+            this.name = device.getName();
112
+            this.code = device.getCode();
113
+        }
112 114
     }
113 115
 
114 116
     public CmcDevice getDevice()
@@ -163,7 +165,7 @@ public class CmcDeviceHandover extends BaseEntity
163 165
     public void setHandoverUser(SysUser handoverUser)
164 166
     {
165 167
         this.handoverUser = handoverUser;
166
-        this.handoverNickName = handoverUser.getNickName();
168
+        this.handoverNickName = handoverUser != null ? handoverUser.getNickName() : "";
167 169
     }
168 170
 
169 171
     public SysUser getHandoverUser()
@@ -173,7 +175,7 @@ public class CmcDeviceHandover extends BaseEntity
173 175
     public void setReceiveUser(SysUser receiveUser)
174 176
     {
175 177
         this.receiveUser = receiveUser;
176
-        this.receiveNickName = receiveUser.getNickName();
178
+        this.receiveNickName = receiveUser != null ? receiveUser.getNickName() : "";
177 179
     }
178 180
 
179 181
     public SysUser getReceiveUser()
@@ -183,7 +185,7 @@ public class CmcDeviceHandover extends BaseEntity
183 185
     public void setReceiveDept(SysDept receiveDept)
184 186
     {
185 187
         this.receiveDept = receiveDept;
186
-        this.receiveDeptName = receiveDept.getDeptName();
188
+        this.receiveDeptName = receiveDept != null ? receiveDept.getDeptName() : "";
187 189
     }
188 190
 
189 191
     public SysDept getReceiveDept()
@@ -193,7 +195,7 @@ public class CmcDeviceHandover extends BaseEntity
193 195
     public void setHandoverDept(SysDept handoverDept)
194 196
     {
195 197
         this.handoverDept = handoverDept;
196
-        this.handoverDeptName = handoverDept.getDeptName();
198
+        this.handoverDeptName = handoverDept != null ? handoverDept.getDeptName() : "";
197 199
     }
198 200
 
199 201
     public SysDept getHandoverDept()

+ 96
- 0
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/domain/CmcProjectChange.java Wyświetl plik

@@ -0,0 +1,96 @@
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项目变更对象 cmc_project_change
12
+ * 
13
+ * @author cmc
14
+ * @date 2024-06-05
15
+ */
16
+public class CmcProjectChange extends BaseEntity
17
+{
18
+    private static final long serialVersionUID = 1L;
19
+
20
+    /** 变更id */
21
+    private Long changeId;
22
+
23
+    /** 项目id */
24
+    @Excel(name = "项目id")
25
+    private String projectId;
26
+
27
+    /** 变更内容 */
28
+    @Excel(name = "变更内容")
29
+    private String content;
30
+
31
+    /** 登记人 */
32
+    @Excel(name = "登记人")
33
+    private Long registrant;
34
+
35
+    /** 登记时间 */
36
+    @JsonFormat(pattern = "yyyy-MM-dd")
37
+    @Excel(name = "登记时间", width = 30, dateFormat = "yyyy-MM-dd")
38
+    private Date registerTime;
39
+
40
+    public void setChangeId(Long changeId) 
41
+    {
42
+        this.changeId = changeId;
43
+    }
44
+
45
+    public Long getChangeId() 
46
+    {
47
+        return changeId;
48
+    }
49
+    public void setProjectId(String projectId) 
50
+    {
51
+        this.projectId = projectId;
52
+    }
53
+
54
+    public String getProjectId() 
55
+    {
56
+        return projectId;
57
+    }
58
+    public void setContent(String content) 
59
+    {
60
+        this.content = content;
61
+    }
62
+
63
+    public String getContent() 
64
+    {
65
+        return content;
66
+    }
67
+    public void setRegistrant(Long registrant) 
68
+    {
69
+        this.registrant = registrant;
70
+    }
71
+
72
+    public Long getRegistrant() 
73
+    {
74
+        return registrant;
75
+    }
76
+    public void setRegisterTime(Date registerTime) 
77
+    {
78
+        this.registerTime = registerTime;
79
+    }
80
+
81
+    public Date getRegisterTime() 
82
+    {
83
+        return registerTime;
84
+    }
85
+
86
+    @Override
87
+    public String toString() {
88
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
89
+            .append("changeId", getChangeId())
90
+            .append("projectId", getProjectId())
91
+            .append("content", getContent())
92
+            .append("registrant", getRegistrant())
93
+            .append("registerTime", getRegisterTime())
94
+            .toString();
95
+    }
96
+}

+ 7
- 7
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/domain/CmcTender.java Wyświetl plik

@@ -398,7 +398,7 @@ public class CmcTender extends BaseEntity
398 398
     public void setBusinessUser(SysUser businessUser)
399 399
     {
400 400
         this.businessUser = businessUser;
401
-        this.businessUserName = businessUser.getNickName();
401
+        this.businessUserName = businessUser != null ? businessUser.getNickName() : "";
402 402
     }
403 403
 
404 404
     public SysUser getBusinessUser()
@@ -408,7 +408,7 @@ public class CmcTender extends BaseEntity
408 408
     public void setTechUser(SysUser techUser)
409 409
     {
410 410
         this.techUser = techUser;
411
-        this.techUserName = techUser.getNickName();
411
+        this.techUserName = techUser != null ? techUser.getNickName() : "";
412 412
     }
413 413
 
414 414
     public SysUser getTechUser()
@@ -418,7 +418,7 @@ public class CmcTender extends BaseEntity
418 418
     public void setCombinerUser(SysUser combinerUser)
419 419
     {
420 420
         this.combinerUser = combinerUser;
421
-        this.combinerUserName = combinerUser.getNickName();
421
+        this.combinerUserName = combinerUser != null ? combinerUser.getNickName() : "";
422 422
     }
423 423
 
424 424
     public SysUser getCombinerUser()
@@ -428,7 +428,7 @@ public class CmcTender extends BaseEntity
428 428
     public void setCheckerUser(SysUser checkerUser)
429 429
     {
430 430
         this.checkerUser = checkerUser;
431
-        this.checkerUserName = checkerUser.getNickName();
431
+        this.checkerUserName = checkerUser != null ? checkerUser.getNickName() : "";
432 432
     }
433 433
 
434 434
     public SysUser getCheckerUser()
@@ -438,7 +438,7 @@ public class CmcTender extends BaseEntity
438 438
     public void setPrinterUser(SysUser printerUser)
439 439
     {
440 440
         this.printerUser = printerUser;
441
-        this.printerUserName = printerUser.getNickName();
441
+        this.printerUserName = printerUser != null ? printerUser.getNickName() : "";
442 442
     }
443 443
 
444 444
     public SysUser getPrinterUser()
@@ -448,7 +448,7 @@ public class CmcTender extends BaseEntity
448 448
     public void setTrusteeUser(SysUser trusteeUser)
449 449
     {
450 450
         this.trusteeUser = trusteeUser;
451
-        this.trusteeUserName = trusteeUser.getNickName();
451
+        this.trusteeUserName = trusteeUser != null ? trusteeUser.getNickName() : "";
452 452
     }
453 453
 
454 454
     public SysUser getTrusteeUser()
@@ -458,7 +458,7 @@ public class CmcTender extends BaseEntity
458 458
     public void setTenderDept(SysDept tenderDept)
459 459
     {
460 460
         this.tenderDept = tenderDept;
461
-        this.tenderDeptName = tenderDept.getDeptName();
461
+        this.tenderDeptName = tenderDept != null ? tenderDept.getDeptName() : "";
462 462
     }
463 463
 
464 464
     public SysDept getTenderDept()

+ 61
- 0
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/mapper/CmcProjectChangeMapper.java Wyświetl plik

@@ -0,0 +1,61 @@
1
+package com.ruoyi.oa.mapper;
2
+
3
+import java.util.List;
4
+import com.ruoyi.oa.domain.CmcProjectChange;
5
+
6
+/**
7
+ * cmc项目变更Mapper接口
8
+ * 
9
+ * @author cmc
10
+ * @date 2024-06-05
11
+ */
12
+public interface CmcProjectChangeMapper 
13
+{
14
+    /**
15
+     * 查询cmc项目变更
16
+     * 
17
+     * @param changeId cmc项目变更主键
18
+     * @return cmc项目变更
19
+     */
20
+    public CmcProjectChange selectCmcProjectChangeByChangeId(Long changeId);
21
+
22
+    /**
23
+     * 查询cmc项目变更列表
24
+     * 
25
+     * @param cmcProjectChange cmc项目变更
26
+     * @return cmc项目变更集合
27
+     */
28
+    public List<CmcProjectChange> selectCmcProjectChangeList(CmcProjectChange cmcProjectChange);
29
+
30
+    /**
31
+     * 新增cmc项目变更
32
+     * 
33
+     * @param cmcProjectChange cmc项目变更
34
+     * @return 结果
35
+     */
36
+    public int insertCmcProjectChange(CmcProjectChange cmcProjectChange);
37
+
38
+    /**
39
+     * 修改cmc项目变更
40
+     * 
41
+     * @param cmcProjectChange cmc项目变更
42
+     * @return 结果
43
+     */
44
+    public int updateCmcProjectChange(CmcProjectChange cmcProjectChange);
45
+
46
+    /**
47
+     * 删除cmc项目变更
48
+     * 
49
+     * @param changeId cmc项目变更主键
50
+     * @return 结果
51
+     */
52
+    public int deleteCmcProjectChangeByChangeId(Long changeId);
53
+
54
+    /**
55
+     * 批量删除cmc项目变更
56
+     * 
57
+     * @param changeIds 需要删除的数据主键集合
58
+     * @return 结果
59
+     */
60
+    public int deleteCmcProjectChangeByChangeIds(Long[] changeIds);
61
+}

+ 61
- 0
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/service/ICmcProjectChangeService.java Wyświetl plik

@@ -0,0 +1,61 @@
1
+package com.ruoyi.oa.service;
2
+
3
+import java.util.List;
4
+import com.ruoyi.oa.domain.CmcProjectChange;
5
+
6
+/**
7
+ * cmc项目变更Service接口
8
+ * 
9
+ * @author cmc
10
+ * @date 2024-06-05
11
+ */
12
+public interface ICmcProjectChangeService 
13
+{
14
+    /**
15
+     * 查询cmc项目变更
16
+     * 
17
+     * @param changeId cmc项目变更主键
18
+     * @return cmc项目变更
19
+     */
20
+    public CmcProjectChange selectCmcProjectChangeByChangeId(Long changeId);
21
+
22
+    /**
23
+     * 查询cmc项目变更列表
24
+     * 
25
+     * @param cmcProjectChange cmc项目变更
26
+     * @return cmc项目变更集合
27
+     */
28
+    public List<CmcProjectChange> selectCmcProjectChangeList(CmcProjectChange cmcProjectChange);
29
+
30
+    /**
31
+     * 新增cmc项目变更
32
+     * 
33
+     * @param cmcProjectChange cmc项目变更
34
+     * @return 结果
35
+     */
36
+    public int insertCmcProjectChange(CmcProjectChange cmcProjectChange);
37
+
38
+    /**
39
+     * 修改cmc项目变更
40
+     * 
41
+     * @param cmcProjectChange cmc项目变更
42
+     * @return 结果
43
+     */
44
+    public int updateCmcProjectChange(CmcProjectChange cmcProjectChange);
45
+
46
+    /**
47
+     * 批量删除cmc项目变更
48
+     * 
49
+     * @param changeIds 需要删除的cmc项目变更主键集合
50
+     * @return 结果
51
+     */
52
+    public int deleteCmcProjectChangeByChangeIds(Long[] changeIds);
53
+
54
+    /**
55
+     * 删除cmc项目变更信息
56
+     * 
57
+     * @param changeId cmc项目变更主键
58
+     * @return 结果
59
+     */
60
+    public int deleteCmcProjectChangeByChangeId(Long changeId);
61
+}

+ 93
- 0
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/service/impl/CmcProjectChangeServiceImpl.java Wyświetl plik

@@ -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.CmcProjectChangeMapper;
7
+import com.ruoyi.oa.domain.CmcProjectChange;
8
+import com.ruoyi.oa.service.ICmcProjectChangeService;
9
+
10
+/**
11
+ * cmc项目变更Service业务层处理
12
+ * 
13
+ * @author cmc
14
+ * @date 2024-06-05
15
+ */
16
+@Service
17
+public class CmcProjectChangeServiceImpl implements ICmcProjectChangeService 
18
+{
19
+    @Autowired
20
+    private CmcProjectChangeMapper cmcProjectChangeMapper;
21
+
22
+    /**
23
+     * 查询cmc项目变更
24
+     * 
25
+     * @param changeId cmc项目变更主键
26
+     * @return cmc项目变更
27
+     */
28
+    @Override
29
+    public CmcProjectChange selectCmcProjectChangeByChangeId(Long changeId)
30
+    {
31
+        return cmcProjectChangeMapper.selectCmcProjectChangeByChangeId(changeId);
32
+    }
33
+
34
+    /**
35
+     * 查询cmc项目变更列表
36
+     * 
37
+     * @param cmcProjectChange cmc项目变更
38
+     * @return cmc项目变更
39
+     */
40
+    @Override
41
+    public List<CmcProjectChange> selectCmcProjectChangeList(CmcProjectChange cmcProjectChange)
42
+    {
43
+        return cmcProjectChangeMapper.selectCmcProjectChangeList(cmcProjectChange);
44
+    }
45
+
46
+    /**
47
+     * 新增cmc项目变更
48
+     * 
49
+     * @param cmcProjectChange cmc项目变更
50
+     * @return 结果
51
+     */
52
+    @Override
53
+    public int insertCmcProjectChange(CmcProjectChange cmcProjectChange)
54
+    {
55
+        return cmcProjectChangeMapper.insertCmcProjectChange(cmcProjectChange);
56
+    }
57
+
58
+    /**
59
+     * 修改cmc项目变更
60
+     * 
61
+     * @param cmcProjectChange cmc项目变更
62
+     * @return 结果
63
+     */
64
+    @Override
65
+    public int updateCmcProjectChange(CmcProjectChange cmcProjectChange)
66
+    {
67
+        return cmcProjectChangeMapper.updateCmcProjectChange(cmcProjectChange);
68
+    }
69
+
70
+    /**
71
+     * 批量删除cmc项目变更
72
+     * 
73
+     * @param changeIds 需要删除的cmc项目变更主键
74
+     * @return 结果
75
+     */
76
+    @Override
77
+    public int deleteCmcProjectChangeByChangeIds(Long[] changeIds)
78
+    {
79
+        return cmcProjectChangeMapper.deleteCmcProjectChangeByChangeIds(changeIds);
80
+    }
81
+
82
+    /**
83
+     * 删除cmc项目变更信息
84
+     * 
85
+     * @param changeId cmc项目变更主键
86
+     * @return 结果
87
+     */
88
+    @Override
89
+    public int deleteCmcProjectChangeByChangeId(Long changeId)
90
+    {
91
+        return cmcProjectChangeMapper.deleteCmcProjectChangeByChangeId(changeId);
92
+    }
93
+}

+ 71
- 0
oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcProjectChangeMapper.xml Wyświetl plik

@@ -0,0 +1,71 @@
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.CmcProjectChangeMapper">
6
+    
7
+    <resultMap type="CmcProjectChange" id="CmcProjectChangeResult">
8
+        <result property="changeId"    column="change_id"    />
9
+        <result property="projectId"    column="project_id"    />
10
+        <result property="content"    column="content"    />
11
+        <result property="registrant"    column="registrant"    />
12
+        <result property="registerTime"    column="register_time"    />
13
+    </resultMap>
14
+
15
+    <sql id="selectCmcProjectChangeVo">
16
+        select change_id, project_id, content, registrant, register_time from cmc_project_change
17
+    </sql>
18
+
19
+    <select id="selectCmcProjectChangeList" parameterType="CmcProjectChange" resultMap="CmcProjectChangeResult">
20
+        <include refid="selectCmcProjectChangeVo"/>
21
+        <where>  
22
+            <if test="projectId != null  and projectId != ''"> and project_id = #{projectId}</if>
23
+            <if test="content != null  and content != ''"> and content = #{content}</if>
24
+            <if test="registrant != null "> and registrant = #{registrant}</if>
25
+            <if test="registerTime != null "> and register_time = #{registerTime}</if>
26
+        </where>
27
+    </select>
28
+    
29
+    <select id="selectCmcProjectChangeByChangeId" parameterType="Long" resultMap="CmcProjectChangeResult">
30
+        <include refid="selectCmcProjectChangeVo"/>
31
+        where change_id = #{changeId}
32
+    </select>
33
+        
34
+    <insert id="insertCmcProjectChange" parameterType="CmcProjectChange" useGeneratedKeys="true" keyProperty="changeId">
35
+        insert into cmc_project_change
36
+        <trim prefix="(" suffix=")" suffixOverrides=",">
37
+            <if test="projectId != null">project_id,</if>
38
+            <if test="content != null">content,</if>
39
+            <if test="registrant != null">registrant,</if>
40
+            <if test="registerTime != null">register_time,</if>
41
+         </trim>
42
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
43
+            <if test="projectId != null">#{projectId},</if>
44
+            <if test="content != null">#{content},</if>
45
+            <if test="registrant != null">#{registrant},</if>
46
+            <if test="registerTime != null">#{registerTime},</if>
47
+         </trim>
48
+    </insert>
49
+
50
+    <update id="updateCmcProjectChange" parameterType="CmcProjectChange">
51
+        update cmc_project_change
52
+        <trim prefix="SET" suffixOverrides=",">
53
+            <if test="projectId != null">project_id = #{projectId},</if>
54
+            <if test="content != null">content = #{content},</if>
55
+            <if test="registrant != null">registrant = #{registrant},</if>
56
+            <if test="registerTime != null">register_time = #{registerTime},</if>
57
+        </trim>
58
+        where change_id = #{changeId}
59
+    </update>
60
+
61
+    <delete id="deleteCmcProjectChangeByChangeId" parameterType="Long">
62
+        delete from cmc_project_change where change_id = #{changeId}
63
+    </delete>
64
+
65
+    <delete id="deleteCmcProjectChangeByChangeIds" parameterType="String">
66
+        delete from cmc_project_change where change_id in 
67
+        <foreach item="changeId" collection="array" open="(" separator="," close=")">
68
+            #{changeId}
69
+        </foreach>
70
+    </delete>
71
+</mapper>

+ 1
- 0
oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcProjectWorkMapper.xml Wyświetl plik

@@ -31,6 +31,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
31 31
             <if test="deadline != null "> and deadline like concat('%', #{deadline}, '%')</if>
32 32
             <if test="finishTime != null "> and finish_time like concat('%', #{finishTime}, '%')</if>
33 33
         </where>
34
+        order by deadline desc
34 35
     </select>
35 36
     
36 37
     <select id="selectCmcProjectWorkListByProjectId" parameterType="String" resultMap="CmcProjectWorkResult">

+ 125
- 38
oa-back/sql/sql.sql
Plik diff jest za duży
Wyświetl plik


+ 44
- 0
oa-ui/src/api/oa/project/projectChange.js Wyświetl plik

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

Ładowanie…
Anuluj
Zapisz