瀏覽代碼

新增设备后端代码

lamphua 1 年之前
父節點
當前提交
c9566aaed6
共有 22 個檔案被更改,包括 2020 行新增192 行删除
  1. 1
    1
      oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcCarApprovalController.java
  2. 104
    0
      oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcDeviceApprovalController.java
  3. 104
    0
      oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcDeviceController.java
  4. 93
    13
      oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/domain/CmcCar.java
  5. 78
    63
      oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/domain/CmcCarApproval.java
  6. 125
    0
      oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/domain/CmcDevice.java
  7. 266
    0
      oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/domain/CmcDeviceApproval.java
  8. 61
    0
      oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/mapper/CmcDeviceApprovalMapper.java
  9. 61
    0
      oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/mapper/CmcDeviceMapper.java
  10. 61
    0
      oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/service/ICmcDeviceApprovalService.java
  11. 61
    0
      oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/service/ICmcDeviceService.java
  12. 93
    0
      oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/service/impl/CmcDeviceApprovalServiceImpl.java
  13. 93
    0
      oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/service/impl/CmcDeviceServiceImpl.java
  14. 15
    10
      oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcCarApprovalMapper.xml
  15. 35
    10
      oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcCarMapper.xml
  16. 133
    0
      oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcDeviceApprovalMapper.xml
  17. 81
    0
      oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcDeviceMapper.xml
  18. 110
    95
      oa-back/sql/sql.sql
  19. 44
    0
      oa-ui/src/api/oa/car/carApproval.js
  20. 44
    0
      oa-ui/src/api/oa/device/device.js
  21. 44
    0
      oa-ui/src/api/oa/device/deviceApproval.js
  22. 313
    0
      oa-ui/src/views/oa/device/index.vue

+ 1
- 1
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcCarApprovalController.java 查看文件

@@ -27,7 +27,7 @@ import com.ruoyi.common.core.page.TableDataInfo;
27 27
  * @date 2024-02-23
28 28
  */
29 29
 @RestController
30
-@RequestMapping("/oa/approval")
30
+@RequestMapping("/oa/carApproval")
31 31
 public class CmcCarApprovalController extends BaseController
32 32
 {
33 33
     @Autowired

+ 104
- 0
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcDeviceApprovalController.java 查看文件

@@ -0,0 +1,104 @@
1
+package com.ruoyi.web.controller.oa;
2
+
3
+import java.util.List;
4
+import javax.servlet.http.HttpServletResponse;
5
+import org.springframework.security.access.prepost.PreAuthorize;
6
+import org.springframework.beans.factory.annotation.Autowired;
7
+import org.springframework.web.bind.annotation.GetMapping;
8
+import org.springframework.web.bind.annotation.PostMapping;
9
+import org.springframework.web.bind.annotation.PutMapping;
10
+import org.springframework.web.bind.annotation.DeleteMapping;
11
+import org.springframework.web.bind.annotation.PathVariable;
12
+import org.springframework.web.bind.annotation.RequestBody;
13
+import org.springframework.web.bind.annotation.RequestMapping;
14
+import org.springframework.web.bind.annotation.RestController;
15
+import com.ruoyi.common.annotation.Log;
16
+import com.ruoyi.common.core.controller.BaseController;
17
+import com.ruoyi.common.core.domain.AjaxResult;
18
+import com.ruoyi.common.enums.BusinessType;
19
+import com.ruoyi.oa.domain.CmcDeviceApproval;
20
+import com.ruoyi.oa.service.ICmcDeviceApprovalService;
21
+import com.ruoyi.common.utils.poi.ExcelUtil;
22
+import com.ruoyi.common.core.page.TableDataInfo;
23
+
24
+/**
25
+ * cmc设备审批Controller
26
+ * 
27
+ * @author cmc
28
+ * @date 2024-03-05
29
+ */
30
+@RestController
31
+@RequestMapping("/oa/deviceApproval")
32
+public class CmcDeviceApprovalController extends BaseController
33
+{
34
+    @Autowired
35
+    private ICmcDeviceApprovalService cmcDeviceApprovalService;
36
+
37
+    /**
38
+     * 查询cmc设备审批列表
39
+     */
40
+    @PreAuthorize("@ss.hasPermi('oa:approval:list')")
41
+    @GetMapping("/list")
42
+    public TableDataInfo list(CmcDeviceApproval cmcDeviceApproval)
43
+    {
44
+        startPage();
45
+        List<CmcDeviceApproval> list = cmcDeviceApprovalService.selectCmcDeviceApprovalList(cmcDeviceApproval);
46
+        return getDataTable(list);
47
+    }
48
+
49
+    /**
50
+     * 导出cmc设备审批列表
51
+     */
52
+    @PreAuthorize("@ss.hasPermi('oa:approval:export')")
53
+    @Log(title = "cmc设备审批", businessType = BusinessType.EXPORT)
54
+    @PostMapping("/export")
55
+    public void export(HttpServletResponse response, CmcDeviceApproval cmcDeviceApproval)
56
+    {
57
+        List<CmcDeviceApproval> list = cmcDeviceApprovalService.selectCmcDeviceApprovalList(cmcDeviceApproval);
58
+        ExcelUtil<CmcDeviceApproval> util = new ExcelUtil<CmcDeviceApproval>(CmcDeviceApproval.class);
59
+        util.exportExcel(response, list, "cmc设备审批数据");
60
+    }
61
+
62
+    /**
63
+     * 获取cmc设备审批详细信息
64
+     */
65
+    @PreAuthorize("@ss.hasPermi('oa:approval:query')")
66
+    @GetMapping(value = "/{deviceApplyId}")
67
+    public AjaxResult getInfo(@PathVariable("deviceApplyId") String deviceApplyId)
68
+    {
69
+        return success(cmcDeviceApprovalService.selectCmcDeviceApprovalByDeviceApplyId(deviceApplyId));
70
+    }
71
+
72
+    /**
73
+     * 新增cmc设备审批
74
+     */
75
+    @PreAuthorize("@ss.hasPermi('oa:approval:add')")
76
+    @Log(title = "cmc设备审批", businessType = BusinessType.INSERT)
77
+    @PostMapping
78
+    public AjaxResult add(@RequestBody CmcDeviceApproval cmcDeviceApproval)
79
+    {
80
+        return toAjax(cmcDeviceApprovalService.insertCmcDeviceApproval(cmcDeviceApproval));
81
+    }
82
+
83
+    /**
84
+     * 修改cmc设备审批
85
+     */
86
+    @PreAuthorize("@ss.hasPermi('oa:approval:edit')")
87
+    @Log(title = "cmc设备审批", businessType = BusinessType.UPDATE)
88
+    @PutMapping
89
+    public AjaxResult edit(@RequestBody CmcDeviceApproval cmcDeviceApproval)
90
+    {
91
+        return toAjax(cmcDeviceApprovalService.updateCmcDeviceApproval(cmcDeviceApproval));
92
+    }
93
+
94
+    /**
95
+     * 删除cmc设备审批
96
+     */
97
+    @PreAuthorize("@ss.hasPermi('oa:approval:remove')")
98
+    @Log(title = "cmc设备审批", businessType = BusinessType.DELETE)
99
+	@DeleteMapping("/{deviceApplyIds}")
100
+    public AjaxResult remove(@PathVariable String[] deviceApplyIds)
101
+    {
102
+        return toAjax(cmcDeviceApprovalService.deleteCmcDeviceApprovalByDeviceApplyIds(deviceApplyIds));
103
+    }
104
+}

+ 104
- 0
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcDeviceController.java 查看文件

@@ -0,0 +1,104 @@
1
+package com.ruoyi.web.controller.oa;
2
+
3
+import java.util.List;
4
+import javax.servlet.http.HttpServletResponse;
5
+import org.springframework.security.access.prepost.PreAuthorize;
6
+import org.springframework.beans.factory.annotation.Autowired;
7
+import org.springframework.web.bind.annotation.GetMapping;
8
+import org.springframework.web.bind.annotation.PostMapping;
9
+import org.springframework.web.bind.annotation.PutMapping;
10
+import org.springframework.web.bind.annotation.DeleteMapping;
11
+import org.springframework.web.bind.annotation.PathVariable;
12
+import org.springframework.web.bind.annotation.RequestBody;
13
+import org.springframework.web.bind.annotation.RequestMapping;
14
+import org.springframework.web.bind.annotation.RestController;
15
+import com.ruoyi.common.annotation.Log;
16
+import com.ruoyi.common.core.controller.BaseController;
17
+import com.ruoyi.common.core.domain.AjaxResult;
18
+import com.ruoyi.common.enums.BusinessType;
19
+import com.ruoyi.oa.domain.CmcDevice;
20
+import com.ruoyi.oa.service.ICmcDeviceService;
21
+import com.ruoyi.common.utils.poi.ExcelUtil;
22
+import com.ruoyi.common.core.page.TableDataInfo;
23
+
24
+/**
25
+ * cmc设备信息Controller
26
+ * 
27
+ * @author cmc
28
+ * @date 2024-03-05
29
+ */
30
+@RestController
31
+@RequestMapping("/oa/device")
32
+public class CmcDeviceController extends BaseController
33
+{
34
+    @Autowired
35
+    private ICmcDeviceService cmcDeviceService;
36
+
37
+    /**
38
+     * 查询cmc设备信息列表
39
+     */
40
+    @PreAuthorize("@ss.hasPermi('oa:device:list')")
41
+    @GetMapping("/list")
42
+    public TableDataInfo list(CmcDevice cmcDevice)
43
+    {
44
+        startPage();
45
+        List<CmcDevice> list = cmcDeviceService.selectCmcDeviceList(cmcDevice);
46
+        return getDataTable(list);
47
+    }
48
+
49
+    /**
50
+     * 导出cmc设备信息列表
51
+     */
52
+    @PreAuthorize("@ss.hasPermi('oa:device:export')")
53
+    @Log(title = "cmc设备信息", businessType = BusinessType.EXPORT)
54
+    @PostMapping("/export")
55
+    public void export(HttpServletResponse response, CmcDevice cmcDevice)
56
+    {
57
+        List<CmcDevice> list = cmcDeviceService.selectCmcDeviceList(cmcDevice);
58
+        ExcelUtil<CmcDevice> util = new ExcelUtil<CmcDevice>(CmcDevice.class);
59
+        util.exportExcel(response, list, "cmc设备信息数据");
60
+    }
61
+
62
+    /**
63
+     * 获取cmc设备信息详细信息
64
+     */
65
+    @PreAuthorize("@ss.hasPermi('oa:device:query')")
66
+    @GetMapping(value = "/{deviceId}")
67
+    public AjaxResult getInfo(@PathVariable("deviceId") Long deviceId)
68
+    {
69
+        return success(cmcDeviceService.selectCmcDeviceByDeviceId(deviceId));
70
+    }
71
+
72
+    /**
73
+     * 新增cmc设备信息
74
+     */
75
+    @PreAuthorize("@ss.hasPermi('oa:device:add')")
76
+    @Log(title = "cmc设备信息", businessType = BusinessType.INSERT)
77
+    @PostMapping
78
+    public AjaxResult add(@RequestBody CmcDevice cmcDevice)
79
+    {
80
+        return toAjax(cmcDeviceService.insertCmcDevice(cmcDevice));
81
+    }
82
+
83
+    /**
84
+     * 修改cmc设备信息
85
+     */
86
+    @PreAuthorize("@ss.hasPermi('oa:device:edit')")
87
+    @Log(title = "cmc设备信息", businessType = BusinessType.UPDATE)
88
+    @PutMapping
89
+    public AjaxResult edit(@RequestBody CmcDevice cmcDevice)
90
+    {
91
+        return toAjax(cmcDeviceService.updateCmcDevice(cmcDevice));
92
+    }
93
+
94
+    /**
95
+     * 删除cmc设备信息
96
+     */
97
+    @PreAuthorize("@ss.hasPermi('oa:device:remove')")
98
+    @Log(title = "cmc设备信息", businessType = BusinessType.DELETE)
99
+	@DeleteMapping("/{deviceIds}")
100
+    public AjaxResult remove(@PathVariable Long[] deviceIds)
101
+    {
102
+        return toAjax(cmcDeviceService.deleteCmcDeviceByDeviceIds(deviceIds));
103
+    }
104
+}

+ 93
- 13
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/domain/CmcCar.java 查看文件

@@ -1,5 +1,8 @@
1 1
 package com.ruoyi.oa.domain;
2 2
 
3
+import java.math.BigDecimal;
4
+import java.util.Date;
5
+import com.fasterxml.jackson.annotation.JsonFormat;
3 6
 import org.apache.commons.lang3.builder.ToStringBuilder;
4 7
 import org.apache.commons.lang3.builder.ToStringStyle;
5 8
 import com.ruoyi.common.annotation.Excel;
@@ -7,9 +10,9 @@ import com.ruoyi.common.core.domain.BaseEntity;
7 10
 
8 11
 /**
9 12
  * cmc车辆信息对象 cmc_car
10
- * 
13
+ *
11 14
  * @author cmc
12
- * @date 2024-02-23
15
+ * @date 2024-03-05
13 16
  */
14 17
 public class CmcCar extends BaseEntity
15 18
 {
@@ -23,37 +26,114 @@ public class CmcCar extends BaseEntity
23 26
     private String licensePlate;
24 27
 
25 28
     /** 驾驶员(常用) */
26
-    @Excel(name = "驾驶员", readConverterExp = "常=用")
29
+    @Excel(name = "驾驶员")
27 30
     private Long driver;
28 31
 
29
-    public void setCarId(Long carId) 
32
+    /** 购置时间 */
33
+    @JsonFormat(pattern = "yyyy-MM-dd")
34
+    @Excel(name = "购置时间", width = 30, dateFormat = "yyyy-MM-dd")
35
+    private Date acquisitionTime;
36
+
37
+    /** 总价 */
38
+    @Excel(name = "总价")
39
+    private BigDecimal cost;
40
+
41
+    /** 预计使用年限 */
42
+    @Excel(name = "预计使用年限")
43
+    private Integer expectLife;
44
+
45
+    /** 车系 */
46
+    @Excel(name = "车系")
47
+    private String series;
48
+
49
+    /** 车级 */
50
+    @Excel(name = "车级")
51
+    private String level;
52
+
53
+    public void setCarId(Long carId)
30 54
     {
31 55
         this.carId = carId;
32 56
     }
33 57
 
34
-    public Long getCarId() 
58
+    public Long getCarId()
35 59
     {
36 60
         return carId;
37 61
     }
38
-    public void setLicensePlate(String licensePlate) { this.licensePlate = licensePlate; }
62
+    public void setLicensePlate(String licensePlate)
63
+    {
64
+        this.licensePlate = licensePlate;
65
+    }
39 66
 
40
-    public String getLicensePlate() { return licensePlate; }
41
-    public void setDriver(Long driver) 
67
+    public String getLicensePlate()
68
+    {
69
+        return licensePlate;
70
+    }
71
+    public void setDriver(Long driver)
42 72
     {
43 73
         this.driver = driver;
44 74
     }
45 75
 
46
-    public Long getDriver() 
76
+    public Long getDriver()
47 77
     {
48 78
         return driver;
49 79
     }
80
+    public void setAcquisitionTime(Date acquisitionTime)
81
+    {
82
+        this.acquisitionTime = acquisitionTime;
83
+    }
84
+
85
+    public Date getAcquisitionTime()
86
+    {
87
+        return acquisitionTime;
88
+    }
89
+    public void setCost(BigDecimal cost)
90
+    {
91
+        this.cost = cost;
92
+    }
93
+
94
+    public BigDecimal getCost()
95
+    {
96
+        return cost;
97
+    }
98
+    public void setExpectLife(Integer expectLife)
99
+    {
100
+        this.expectLife = expectLife;
101
+    }
102
+
103
+    public Integer getExpectLife()
104
+    {
105
+        return expectLife;
106
+    }
107
+    public void setSeries(String series)
108
+    {
109
+        this.series = series;
110
+    }
111
+
112
+    public String getSeries()
113
+    {
114
+        return series;
115
+    }
116
+    public void setLevel(String level)
117
+    {
118
+        this.level = level;
119
+    }
120
+
121
+    public String getLevel()
122
+    {
123
+        return level;
124
+    }
50 125
 
51 126
     @Override
52 127
     public String toString() {
53 128
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
54
-            .append("carId", getCarId())
55
-            .append("license plate", getLicensePlate())
56
-            .append("driver", getDriver())
57
-            .toString();
129
+                .append("carId", getCarId())
130
+                .append("licensePlate", getLicensePlate())
131
+                .append("driver", getDriver())
132
+                .append("acquisitionTime", getAcquisitionTime())
133
+                .append("cost", getCost())
134
+                .append("expectLife", getExpectLife())
135
+                .append("series", getSeries())
136
+                .append("level", getLevel())
137
+                .toString();
58 138
     }
59 139
 }

+ 78
- 63
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/domain/CmcCarApproval.java 查看文件

@@ -1,5 +1,6 @@
1 1
 package com.ruoyi.oa.domain;
2 2
 
3
+import java.math.BigDecimal;
3 4
 import java.util.Date;
4 5
 import com.fasterxml.jackson.annotation.JsonFormat;
5 6
 import org.apache.commons.lang3.builder.ToStringBuilder;
@@ -9,9 +10,9 @@ import com.ruoyi.common.core.domain.BaseEntity;
9 10
 
10 11
 /**
11 12
  * cmc用车审批对象 cmc_car_approval
12
- * 
13
+ *
13 14
  * @author cmc
14
- * @date 2024-02-23
15
+ * @date 2024-03-05
15 16
  */
16 17
 public class CmcCarApproval extends BaseEntity
17 18
 {
@@ -98,210 +99,224 @@ public class CmcCarApproval extends BaseEntity
98 99
     @Excel(name = "调度审批意见")
99 100
     private String dispatchComment;
100 101
 
101
-    public void setCarApplyId(String carApplyId) 
102
+    /** 预计用车成本 */
103
+    @Excel(name = "预计用车成本")
104
+    private BigDecimal estimateCost;
105
+
106
+    public void setCarApplyId(String carApplyId)
102 107
     {
103 108
         this.carApplyId = carApplyId;
104 109
     }
105 110
 
106
-    public String getCarApplyId() 
111
+    public String getCarApplyId()
107 112
     {
108 113
         return carApplyId;
109 114
     }
110
-    public void setApplier(Long applier) 
115
+    public void setApplier(Long applier)
111 116
     {
112 117
         this.applier = applier;
113 118
     }
114 119
 
115
-    public Long getApplier() 
120
+    public Long getApplier()
116 121
     {
117 122
         return applier;
118 123
     }
119
-    public void setCars(String cars) 
124
+    public void setCars(String cars)
120 125
     {
121 126
         this.cars = cars;
122 127
     }
123 128
 
124
-    public String getCars() 
129
+    public String getCars()
125 130
     {
126 131
         return cars;
127 132
     }
128
-    public void setDrivers(String drivers) 
133
+    public void setDrivers(String drivers)
129 134
     {
130 135
         this.drivers = drivers;
131 136
     }
132 137
 
133
-    public String getDrivers() 
138
+    public String getDrivers()
134 139
     {
135 140
         return drivers;
136 141
     }
137
-    public void setProjectNumber(String projectNumber) 
142
+    public void setProjectNumber(String projectNumber)
138 143
     {
139 144
         this.projectNumber = projectNumber;
140 145
     }
141 146
 
142
-    public String getProjectNumber() 
147
+    public String getProjectNumber()
143 148
     {
144 149
         return projectNumber;
145 150
     }
146
-    public void setApplyReason(String applyReason) 
151
+    public void setApplyReason(String applyReason)
147 152
     {
148 153
         this.applyReason = applyReason;
149 154
     }
150 155
 
151
-    public String getApplyReason() 
156
+    public String getApplyReason()
152 157
     {
153 158
         return applyReason;
154 159
     }
155
-    public void setPassengers(Long passengers) 
160
+    public void setPassengers(Long passengers)
156 161
     {
157 162
         this.passengers = passengers;
158 163
     }
159 164
 
160
-    public Long getPassengers() 
165
+    public Long getPassengers()
161 166
     {
162 167
         return passengers;
163 168
     }
164
-    public void setBeginDate(Date beginDate) 
169
+    public void setBeginDate(Date beginDate)
165 170
     {
166 171
         this.beginDate = beginDate;
167 172
     }
168 173
 
169
-    public Date getBeginDate() 
174
+    public Date getBeginDate()
170 175
     {
171 176
         return beginDate;
172 177
     }
173
-    public void setBeginHalfday(String beginHalfday) 
178
+    public void setBeginHalfday(String beginHalfday)
174 179
     {
175 180
         this.beginHalfday = beginHalfday;
176 181
     }
177 182
 
178
-    public String getBeginHalfday() 
183
+    public String getBeginHalfday()
179 184
     {
180 185
         return beginHalfday;
181 186
     }
182
-    public void setEndDate(Date endDate) 
187
+    public void setEndDate(Date endDate)
183 188
     {
184 189
         this.endDate = endDate;
185 190
     }
186 191
 
187
-    public Date getEndDate() 
192
+    public Date getEndDate()
188 193
     {
189 194
         return endDate;
190 195
     }
191
-    public void setEndHalfday(String endHalfday) 
196
+    public void setEndHalfday(String endHalfday)
192 197
     {
193 198
         this.endHalfday = endHalfday;
194 199
     }
195 200
 
196
-    public String getEndHalfday() 
201
+    public String getEndHalfday()
197 202
     {
198 203
         return endHalfday;
199 204
     }
200
-    public void setDays(Long days) 
205
+    public void setDays(Long days)
201 206
     {
202 207
         this.days = days;
203 208
     }
204 209
 
205
-    public Long getDays() 
210
+    public Long getDays()
206 211
     {
207 212
         return days;
208 213
     }
209
-    public void setDeptUserId(Long deptUserId) 
214
+    public void setDeptUserId(Long deptUserId)
210 215
     {
211 216
         this.deptUserId = deptUserId;
212 217
     }
213 218
 
214
-    public Long getDeptUserId() 
219
+    public Long getDeptUserId()
215 220
     {
216 221
         return deptUserId;
217 222
     }
218
-    public void setDeptComment(String deptComment) 
223
+    public void setDeptComment(String deptComment)
219 224
     {
220 225
         this.deptComment = deptComment;
221 226
     }
222 227
 
223
-    public String getDeptComment() 
228
+    public String getDeptComment()
224 229
     {
225 230
         return deptComment;
226 231
     }
227
-    public void setManagerUserId(Long managerUserId) 
232
+    public void setManagerUserId(Long managerUserId)
228 233
     {
229 234
         this.managerUserId = managerUserId;
230 235
     }
231 236
 
232
-    public Long getManagerUserId() 
237
+    public Long getManagerUserId()
233 238
     {
234 239
         return managerUserId;
235 240
     }
236
-    public void setManagerComment(String managerComment) 
241
+    public void setManagerComment(String managerComment)
237 242
     {
238 243
         this.managerComment = managerComment;
239 244
     }
240 245
 
241
-    public String getManagerComment() 
246
+    public String getManagerComment()
242 247
     {
243 248
         return managerComment;
244 249
     }
245
-    public void setUnionUserId(Long unionUserId) 
250
+    public void setUnionUserId(Long unionUserId)
246 251
     {
247 252
         this.unionUserId = unionUserId;
248 253
     }
249 254
 
250
-    public Long getUnionUserId() 
255
+    public Long getUnionUserId()
251 256
     {
252 257
         return unionUserId;
253 258
     }
254
-    public void setUnionComment(String unionComment) 
259
+    public void setUnionComment(String unionComment)
255 260
     {
256 261
         this.unionComment = unionComment;
257 262
     }
258 263
 
259
-    public String getUnionComment() 
264
+    public String getUnionComment()
260 265
     {
261 266
         return unionComment;
262 267
     }
263
-    public void setDispatcher(Long dispatcher) 
268
+    public void setDispatcher(Long dispatcher)
264 269
     {
265 270
         this.dispatcher = dispatcher;
266 271
     }
267 272
 
268
-    public Long getDispatcher() 
273
+    public Long getDispatcher()
269 274
     {
270 275
         return dispatcher;
271 276
     }
272
-    public void setDispatchComment(String dispatchComment) 
277
+    public void setDispatchComment(String dispatchComment)
273 278
     {
274 279
         this.dispatchComment = dispatchComment;
275 280
     }
276 281
 
277
-    public String getDispatchComment() 
282
+    public String getDispatchComment()
278 283
     {
279 284
         return dispatchComment;
280 285
     }
286
+    public void setEstimateCost(BigDecimal estimateCost)
287
+    {
288
+        this.estimateCost = estimateCost;
289
+    }
290
+
291
+    public BigDecimal getEstimateCost()
292
+    {
293
+        return estimateCost;
294
+    }
281 295
 
282 296
     @Override
283 297
     public String toString() {
284 298
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
285
-            .append("carApplyId", getCarApplyId())
286
-            .append("applier", getApplier())
287
-            .append("cars", getCars())
288
-            .append("drivers", getDrivers())
289
-            .append("projectNumber", getProjectNumber())
290
-            .append("applyReason", getApplyReason())
291
-            .append("passengers", getPassengers())
292
-            .append("beginDate", getBeginDate())
293
-            .append("beginHalfday", getBeginHalfday())
294
-            .append("endDate", getEndDate())
295
-            .append("endHalfday", getEndHalfday())
296
-            .append("days", getDays())
297
-            .append("deptUserId", getDeptUserId())
298
-            .append("deptComment", getDeptComment())
299
-            .append("managerUserId", getManagerUserId())
300
-            .append("managerComment", getManagerComment())
301
-            .append("unionUserId", getUnionUserId())
302
-            .append("unionComment", getUnionComment())
303
-            .append("dispatcher", getDispatcher())
304
-            .append("dispatchComment", getDispatchComment())
305
-            .toString();
299
+                .append("carApplyId", getCarApplyId())
300
+                .append("applier", getApplier())
301
+                .append("cars", getCars())
302
+                .append("drivers", getDrivers())
303
+                .append("projectNumber", getProjectNumber())
304
+                .append("applyReason", getApplyReason())
305
+                .append("passengers", getPassengers())
306
+                .append("beginDate", getBeginDate())
307
+                .append("beginHalfday", getBeginHalfday())
308
+                .append("endDate", getEndDate())
309
+                .append("endHalfday", getEndHalfday())
310
+                .append("days", getDays())
311
+                .append("deptUserId", getDeptUserId())
312
+                .append("deptComment", getDeptComment())
313
+                .append("managerUserId", getManagerUserId())
314
+                .append("managerComment", getManagerComment())
315
+                .append("unionUserId", getUnionUserId())
316
+                .append("unionComment", getUnionComment())
317
+                .append("dispatcher", getDispatcher())
318
+                .append("dispatchComment", getDispatchComment())
319
+                .append("estimateCost", getEstimateCost())
320
+                .toString();
306 321
     }
307 322
 }

+ 125
- 0
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/domain/CmcDevice.java 查看文件

@@ -0,0 +1,125 @@
1
+package com.ruoyi.oa.domain;
2
+
3
+import java.math.BigDecimal;
4
+import java.util.Date;
5
+import com.fasterxml.jackson.annotation.JsonFormat;
6
+import org.apache.commons.lang3.builder.ToStringBuilder;
7
+import org.apache.commons.lang3.builder.ToStringStyle;
8
+import com.ruoyi.common.annotation.Excel;
9
+import com.ruoyi.common.core.domain.BaseEntity;
10
+
11
+/**
12
+ * cmc设备信息对象 cmc_device
13
+ * 
14
+ * @author cmc
15
+ * @date 2024-03-05
16
+ */
17
+public class CmcDevice extends BaseEntity
18
+{
19
+    private static final long serialVersionUID = 1L;
20
+
21
+    /** 设备id */
22
+    private Long deviceId;
23
+
24
+    /** 设备编号 */
25
+    @Excel(name = "设备编号")
26
+    private String code;
27
+
28
+    /** 设备类别 */
29
+    @Excel(name = "设备类别")
30
+    private String type;
31
+
32
+    /** 购置时间 */
33
+    @JsonFormat(pattern = "yyyy-MM-dd")
34
+    @Excel(name = "购置时间", width = 30, dateFormat = "yyyy-MM-dd")
35
+    private Date acquisitionTime;
36
+
37
+    /** 总价 */
38
+    @Excel(name = "总价")
39
+    private BigDecimal cost;
40
+
41
+    /** 预计使用年限 */
42
+    @Excel(name = "预计使用年限")
43
+    private Integer expectLife;
44
+
45
+    /** 设备系列 */
46
+    @Excel(name = "设备系列")
47
+    private String series;
48
+
49
+    public void setDeviceId(Long deviceId) 
50
+    {
51
+        this.deviceId = deviceId;
52
+    }
53
+
54
+    public Long getDeviceId() 
55
+    {
56
+        return deviceId;
57
+    }
58
+    public void setCode(String code) 
59
+    {
60
+        this.code = code;
61
+    }
62
+
63
+    public String getCode() 
64
+    {
65
+        return code;
66
+    }
67
+    public void setType(String type) 
68
+    {
69
+        this.type = type;
70
+    }
71
+
72
+    public String getType() 
73
+    {
74
+        return type;
75
+    }
76
+    public void setAcquisitionTime(Date acquisitionTime) 
77
+    {
78
+        this.acquisitionTime = acquisitionTime;
79
+    }
80
+
81
+    public Date getAcquisitionTime() 
82
+    {
83
+        return acquisitionTime;
84
+    }
85
+    public void setCost(BigDecimal cost) 
86
+    {
87
+        this.cost = cost;
88
+    }
89
+
90
+    public BigDecimal getCost() 
91
+    {
92
+        return cost;
93
+    }
94
+    public void setExpectLife(Integer expectLife) 
95
+    {
96
+        this.expectLife = expectLife;
97
+    }
98
+
99
+    public Integer getExpectLife() 
100
+    {
101
+        return expectLife;
102
+    }
103
+    public void setSeries(String series) 
104
+    {
105
+        this.series = series;
106
+    }
107
+
108
+    public String getSeries() 
109
+    {
110
+        return series;
111
+    }
112
+
113
+    @Override
114
+    public String toString() {
115
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
116
+            .append("deviceId", getDeviceId())
117
+            .append("code", getCode())
118
+            .append("type", getType())
119
+            .append("acquisitionTime", getAcquisitionTime())
120
+            .append("cost", getCost())
121
+            .append("expectLife", getExpectLife())
122
+            .append("series", getSeries())
123
+            .toString();
124
+    }
125
+}

+ 266
- 0
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/domain/CmcDeviceApproval.java 查看文件

@@ -0,0 +1,266 @@
1
+package com.ruoyi.oa.domain;
2
+
3
+import java.math.BigDecimal;
4
+import java.util.Date;
5
+import com.fasterxml.jackson.annotation.JsonFormat;
6
+import org.apache.commons.lang3.builder.ToStringBuilder;
7
+import org.apache.commons.lang3.builder.ToStringStyle;
8
+import com.ruoyi.common.annotation.Excel;
9
+import com.ruoyi.common.core.domain.BaseEntity;
10
+
11
+/**
12
+ * cmc设备审批对象 cmc_device_approval
13
+ * 
14
+ * @author cmc
15
+ * @date 2024-03-05
16
+ */
17
+public class CmcDeviceApproval extends BaseEntity
18
+{
19
+    private static final long serialVersionUID = 1L;
20
+
21
+    /** 设备申请id */
22
+    private String deviceApplyId;
23
+
24
+    /** 申请人 */
25
+    @Excel(name = "申请人")
26
+    private Long applier;
27
+
28
+    /** 设备id */
29
+    @Excel(name = "设备id")
30
+    private String deviceId;
31
+
32
+    /** 项目编号 */
33
+    @Excel(name = "项目编号")
34
+    private String projectNumber;
35
+
36
+    /** 申领事由 */
37
+    @Excel(name = "申领事由")
38
+    private String applyReason;
39
+
40
+    /** 开始日期 */
41
+    @JsonFormat(pattern = "yyyy-MM-dd")
42
+    @Excel(name = "开始日期", width = 30, dateFormat = "yyyy-MM-dd")
43
+    private Date beginDate;
44
+
45
+    /** 开始日期上/下午 */
46
+    @Excel(name = "开始日期上/下午")
47
+    private String beginHalfday;
48
+
49
+    /** 结束日期 */
50
+    @JsonFormat(pattern = "yyyy-MM-dd")
51
+    @Excel(name = "结束日期", width = 30, dateFormat = "yyyy-MM-dd")
52
+    private Date endDate;
53
+
54
+    /** 结束日期上/下午 */
55
+    @Excel(name = "结束日期上/下午")
56
+    private String endHalfday;
57
+
58
+    /** 天数 */
59
+    @Excel(name = "天数")
60
+    private Long days;
61
+
62
+    /** 部门审批人 */
63
+    @Excel(name = "部门审批人")
64
+    private Long deptUserId;
65
+
66
+    /** 部门审批意见 */
67
+    @Excel(name = "部门审批意见")
68
+    private String deptComment;
69
+
70
+    /** 分管审批人 */
71
+    @Excel(name = "分管审批人")
72
+    private Long managerUserId;
73
+
74
+    /** 分管审批意见 */
75
+    @Excel(name = "分管审批意见")
76
+    private String managerComment;
77
+
78
+    /** 调度员 */
79
+    @Excel(name = "调度员")
80
+    private Long dispatcher;
81
+
82
+    /** 调度审批意见 */
83
+    @Excel(name = "调度审批意见")
84
+    private String dispatchComment;
85
+
86
+    /** 预计设备成本 */
87
+    @Excel(name = "预计设备成本")
88
+    private BigDecimal estimateCost;
89
+
90
+    public void setDeviceApplyId(String deviceApplyId) 
91
+    {
92
+        this.deviceApplyId = deviceApplyId;
93
+    }
94
+
95
+    public String getDeviceApplyId() 
96
+    {
97
+        return deviceApplyId;
98
+    }
99
+    public void setApplier(Long applier) 
100
+    {
101
+        this.applier = applier;
102
+    }
103
+
104
+    public Long getApplier() 
105
+    {
106
+        return applier;
107
+    }
108
+    public void setDeviceId(String deviceId) 
109
+    {
110
+        this.deviceId = deviceId;
111
+    }
112
+
113
+    public String getDeviceId() 
114
+    {
115
+        return deviceId;
116
+    }
117
+    public void setProjectNumber(String projectNumber) 
118
+    {
119
+        this.projectNumber = projectNumber;
120
+    }
121
+
122
+    public String getProjectNumber() 
123
+    {
124
+        return projectNumber;
125
+    }
126
+    public void setApplyReason(String applyReason) 
127
+    {
128
+        this.applyReason = applyReason;
129
+    }
130
+
131
+    public String getApplyReason() 
132
+    {
133
+        return applyReason;
134
+    }
135
+    public void setBeginDate(Date beginDate) 
136
+    {
137
+        this.beginDate = beginDate;
138
+    }
139
+
140
+    public Date getBeginDate() 
141
+    {
142
+        return beginDate;
143
+    }
144
+    public void setBeginHalfday(String beginHalfday) 
145
+    {
146
+        this.beginHalfday = beginHalfday;
147
+    }
148
+
149
+    public String getBeginHalfday() 
150
+    {
151
+        return beginHalfday;
152
+    }
153
+    public void setEndDate(Date endDate) 
154
+    {
155
+        this.endDate = endDate;
156
+    }
157
+
158
+    public Date getEndDate() 
159
+    {
160
+        return endDate;
161
+    }
162
+    public void setEndHalfday(String endHalfday) 
163
+    {
164
+        this.endHalfday = endHalfday;
165
+    }
166
+
167
+    public String getEndHalfday() 
168
+    {
169
+        return endHalfday;
170
+    }
171
+    public void setDays(Long days) 
172
+    {
173
+        this.days = days;
174
+    }
175
+
176
+    public Long getDays() 
177
+    {
178
+        return days;
179
+    }
180
+    public void setDeptUserId(Long deptUserId) 
181
+    {
182
+        this.deptUserId = deptUserId;
183
+    }
184
+
185
+    public Long getDeptUserId() 
186
+    {
187
+        return deptUserId;
188
+    }
189
+    public void setDeptComment(String deptComment) 
190
+    {
191
+        this.deptComment = deptComment;
192
+    }
193
+
194
+    public String getDeptComment() 
195
+    {
196
+        return deptComment;
197
+    }
198
+    public void setManagerUserId(Long managerUserId) 
199
+    {
200
+        this.managerUserId = managerUserId;
201
+    }
202
+
203
+    public Long getManagerUserId() 
204
+    {
205
+        return managerUserId;
206
+    }
207
+    public void setManagerComment(String managerComment) 
208
+    {
209
+        this.managerComment = managerComment;
210
+    }
211
+
212
+    public String getManagerComment() 
213
+    {
214
+        return managerComment;
215
+    }
216
+    public void setDispatcher(Long dispatcher) 
217
+    {
218
+        this.dispatcher = dispatcher;
219
+    }
220
+
221
+    public Long getDispatcher() 
222
+    {
223
+        return dispatcher;
224
+    }
225
+    public void setDispatchComment(String dispatchComment) 
226
+    {
227
+        this.dispatchComment = dispatchComment;
228
+    }
229
+
230
+    public String getDispatchComment() 
231
+    {
232
+        return dispatchComment;
233
+    }
234
+    public void setEstimateCost(BigDecimal estimateCost) 
235
+    {
236
+        this.estimateCost = estimateCost;
237
+    }
238
+
239
+    public BigDecimal getEstimateCost() 
240
+    {
241
+        return estimateCost;
242
+    }
243
+
244
+    @Override
245
+    public String toString() {
246
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
247
+            .append("deviceApplyId", getDeviceApplyId())
248
+            .append("applier", getApplier())
249
+            .append("deviceId", getDeviceId())
250
+            .append("projectNumber", getProjectNumber())
251
+            .append("applyReason", getApplyReason())
252
+            .append("beginDate", getBeginDate())
253
+            .append("beginHalfday", getBeginHalfday())
254
+            .append("endDate", getEndDate())
255
+            .append("endHalfday", getEndHalfday())
256
+            .append("days", getDays())
257
+            .append("deptUserId", getDeptUserId())
258
+            .append("deptComment", getDeptComment())
259
+            .append("managerUserId", getManagerUserId())
260
+            .append("managerComment", getManagerComment())
261
+            .append("dispatcher", getDispatcher())
262
+            .append("dispatchComment", getDispatchComment())
263
+            .append("estimateCost", getEstimateCost())
264
+            .toString();
265
+    }
266
+}

+ 61
- 0
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/mapper/CmcDeviceApprovalMapper.java 查看文件

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

+ 61
- 0
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/mapper/CmcDeviceMapper.java 查看文件

@@ -0,0 +1,61 @@
1
+package com.ruoyi.oa.mapper;
2
+
3
+import java.util.List;
4
+import com.ruoyi.oa.domain.CmcDevice;
5
+
6
+/**
7
+ * cmc设备信息Mapper接口
8
+ * 
9
+ * @author cmc
10
+ * @date 2024-03-05
11
+ */
12
+public interface CmcDeviceMapper 
13
+{
14
+    /**
15
+     * 查询cmc设备信息
16
+     * 
17
+     * @param deviceId cmc设备信息主键
18
+     * @return cmc设备信息
19
+     */
20
+    public CmcDevice selectCmcDeviceByDeviceId(Long deviceId);
21
+
22
+    /**
23
+     * 查询cmc设备信息列表
24
+     * 
25
+     * @param cmcDevice cmc设备信息
26
+     * @return cmc设备信息集合
27
+     */
28
+    public List<CmcDevice> selectCmcDeviceList(CmcDevice cmcDevice);
29
+
30
+    /**
31
+     * 新增cmc设备信息
32
+     * 
33
+     * @param cmcDevice cmc设备信息
34
+     * @return 结果
35
+     */
36
+    public int insertCmcDevice(CmcDevice cmcDevice);
37
+
38
+    /**
39
+     * 修改cmc设备信息
40
+     * 
41
+     * @param cmcDevice cmc设备信息
42
+     * @return 结果
43
+     */
44
+    public int updateCmcDevice(CmcDevice cmcDevice);
45
+
46
+    /**
47
+     * 删除cmc设备信息
48
+     * 
49
+     * @param deviceId cmc设备信息主键
50
+     * @return 结果
51
+     */
52
+    public int deleteCmcDeviceByDeviceId(Long deviceId);
53
+
54
+    /**
55
+     * 批量删除cmc设备信息
56
+     * 
57
+     * @param deviceIds 需要删除的数据主键集合
58
+     * @return 结果
59
+     */
60
+    public int deleteCmcDeviceByDeviceIds(Long[] deviceIds);
61
+}

+ 61
- 0
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/service/ICmcDeviceApprovalService.java 查看文件

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

+ 61
- 0
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/service/ICmcDeviceService.java 查看文件

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

+ 93
- 0
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/service/impl/CmcDeviceApprovalServiceImpl.java 查看文件

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

+ 93
- 0
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/service/impl/CmcDeviceServiceImpl.java 查看文件

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

+ 15
- 10
oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcCarApprovalMapper.xml 查看文件

@@ -1,9 +1,9 @@
1 1
 <?xml version="1.0" encoding="UTF-8" ?>
2 2
 <!DOCTYPE mapper
3
-PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
4
-"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
4
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
5 5
 <mapper namespace="com.ruoyi.oa.mapper.CmcCarApprovalMapper">
6
-    
6
+
7 7
     <resultMap type="CmcCarApproval" id="CmcCarApprovalResult">
8 8
         <result property="carApplyId"    column="car_apply_id"    />
9 9
         <result property="applier"    column="applier"    />
@@ -25,15 +25,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
25 25
         <result property="unionComment"    column="union_comment"    />
26 26
         <result property="dispatcher"    column="dispatcher"    />
27 27
         <result property="dispatchComment"    column="dispatch_comment"    />
28
+        <result property="estimateCost"    column="estimate_cost"    />
28 29
     </resultMap>
29 30
 
30 31
     <sql id="selectCmcCarApprovalVo">
31
-        select car_apply_id, applier, cars, drivers, project_number, apply_reason, passengers, begin_date, begin_halfday, end_date, end_halfday, days, dept_user_id, dept_comment, manager_user_id, manager_comment, union_user_id, union_comment, dispatcher, dispatch_comment from cmc_car_approval
32
+        select car_apply_id, applier, cars, drivers, project_number, apply_reason, passengers, begin_date, begin_halfday, end_date, end_halfday, days, dept_user_id, dept_comment, manager_user_id, manager_comment, union_user_id, union_comment, dispatcher, dispatch_comment, estimate_cost from cmc_car_approval
32 33
     </sql>
33 34
 
34 35
     <select id="selectCmcCarApprovalList" parameterType="CmcCarApproval" resultMap="CmcCarApprovalResult">
35 36
         <include refid="selectCmcCarApprovalVo"/>
36
-        <where>  
37
+        <where>
37 38
             <if test="applier != null "> and applier = #{applier}</if>
38 39
             <if test="cars != null  and cars != ''"> and cars = #{cars}</if>
39 40
             <if test="drivers != null  and drivers != ''"> and drivers = #{drivers}</if>
@@ -53,14 +54,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
53 54
             <if test="unionComment != null  and unionComment != ''"> and union_comment = #{unionComment}</if>
54 55
             <if test="dispatcher != null "> and dispatcher = #{dispatcher}</if>
55 56
             <if test="dispatchComment != null  and dispatchComment != ''"> and dispatch_comment = #{dispatchComment}</if>
57
+            <if test="estimateCost != null "> and estimate_cost = #{estimateCost}</if>
56 58
         </where>
57 59
     </select>
58
-    
60
+
59 61
     <select id="selectCmcCarApprovalByCarApplyId" parameterType="String" resultMap="CmcCarApprovalResult">
60 62
         <include refid="selectCmcCarApprovalVo"/>
61 63
         where car_apply_id = #{carApplyId}
62 64
     </select>
63
-        
65
+
64 66
     <insert id="insertCmcCarApproval" parameterType="CmcCarApproval">
65 67
         insert into cmc_car_approval
66 68
         <trim prefix="(" suffix=")" suffixOverrides=",">
@@ -84,7 +86,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
84 86
             <if test="unionComment != null">union_comment,</if>
85 87
             <if test="dispatcher != null">dispatcher,</if>
86 88
             <if test="dispatchComment != null">dispatch_comment,</if>
87
-         </trim>
89
+            <if test="estimateCost != null">estimate_cost,</if>
90
+        </trim>
88 91
         <trim prefix="values (" suffix=")" suffixOverrides=",">
89 92
             <if test="carApplyId != null">#{carApplyId},</if>
90 93
             <if test="applier != null">#{applier},</if>
@@ -106,7 +109,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
106 109
             <if test="unionComment != null">#{unionComment},</if>
107 110
             <if test="dispatcher != null">#{dispatcher},</if>
108 111
             <if test="dispatchComment != null">#{dispatchComment},</if>
109
-         </trim>
112
+            <if test="estimateCost != null">#{estimateCost},</if>
113
+        </trim>
110 114
     </insert>
111 115
 
112 116
     <update id="updateCmcCarApproval" parameterType="CmcCarApproval">
@@ -131,6 +135,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
131 135
             <if test="unionComment != null">union_comment = #{unionComment},</if>
132 136
             <if test="dispatcher != null">dispatcher = #{dispatcher},</if>
133 137
             <if test="dispatchComment != null">dispatch_comment = #{dispatchComment},</if>
138
+            <if test="estimateCost != null">estimate_cost = #{estimateCost},</if>
134 139
         </trim>
135 140
         where car_apply_id = #{carApplyId}
136 141
     </update>
@@ -140,7 +145,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
140 145
     </delete>
141 146
 
142 147
     <delete id="deleteCmcCarApprovalByCarApplyIds" parameterType="String">
143
-        delete from cmc_car_approval where car_apply_id in 
148
+        delete from cmc_car_approval where car_apply_id in
144 149
         <foreach item="carApplyId" collection="array" open="(" separator="," close=")">
145 150
             #{carApplyId}
146 151
         </foreach>

+ 35
- 10
oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcCarMapper.xml 查看文件

@@ -1,42 +1,62 @@
1 1
 <?xml version="1.0" encoding="UTF-8" ?>
2 2
 <!DOCTYPE mapper
3
-PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
4
-"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
4
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
5 5
 <mapper namespace="com.ruoyi.oa.mapper.CmcCarMapper">
6
-    
6
+
7 7
     <resultMap type="CmcCar" id="CmcCarResult">
8 8
         <result property="carId"    column="car_id"    />
9 9
         <result property="licensePlate"    column="license_plate"    />
10 10
         <result property="driver"    column="driver"    />
11
+        <result property="acquisitionTime"    column="acquisition_time"    />
12
+        <result property="cost"    column="cost"    />
13
+        <result property="expectLife"    column="expect_life"    />
14
+        <result property="series"    column="series"    />
15
+        <result property="level"    column="level"    />
11 16
     </resultMap>
12 17
 
13 18
     <sql id="selectCmcCarVo">
14
-        select car_id, license_plate, driver from cmc_car
19
+        select car_id, license_plate, driver, acquisition_time, cost, expect_life, series, level from cmc_car
15 20
     </sql>
16 21
 
17 22
     <select id="selectCmcCarList" parameterType="CmcCar" resultMap="CmcCarResult">
18 23
         <include refid="selectCmcCarVo"/>
19
-        <where>  
24
+        <where>
20 25
             <if test="licensePlate != null  and licensePlate != ''"> and license_plate = #{licensePlate}</if>
21 26
             <if test="driver != null "> and driver = #{driver}</if>
27
+            <if test="acquisitionTime != null "> and acquisition_time = #{acquisitionTime}</if>
28
+            <if test="cost != null "> and cost = #{cost}</if>
29
+            <if test="expectLife != null "> and expect_life = #{expectLife}</if>
30
+            <if test="series != null  and series != ''"> and series = #{series}</if>
31
+            <if test="level != null  and level != ''"> and level = #{level}</if>
22 32
         </where>
23 33
     </select>
24
-    
34
+
25 35
     <select id="selectCmcCarByCarId" parameterType="Long" resultMap="CmcCarResult">
26 36
         <include refid="selectCmcCarVo"/>
27 37
         where car_id = #{carId}
28 38
     </select>
29
-        
39
+
30 40
     <insert id="insertCmcCar" parameterType="CmcCar" useGeneratedKeys="true" keyProperty="carId">
31 41
         insert into cmc_car
32 42
         <trim prefix="(" suffix=")" suffixOverrides=",">
33 43
             <if test="licensePlate != null">license_plate,</if>
34 44
             <if test="driver != null">driver,</if>
35
-         </trim>
45
+            <if test="acquisitionTime != null">acquisition_time,</if>
46
+            <if test="cost != null">cost,</if>
47
+            <if test="expectLife != null">expect_life,</if>
48
+            <if test="series != null">series,</if>
49
+            <if test="level != null">level,</if>
50
+        </trim>
36 51
         <trim prefix="values (" suffix=")" suffixOverrides=",">
37 52
             <if test="licensePlate != null">#{licensePlate},</if>
38 53
             <if test="driver != null">#{driver},</if>
39
-         </trim>
54
+            <if test="acquisitionTime != null">#{acquisitionTime},</if>
55
+            <if test="cost != null">#{cost},</if>
56
+            <if test="expectLife != null">#{expectLife},</if>
57
+            <if test="series != null">#{series},</if>
58
+            <if test="level != null">#{level},</if>
59
+        </trim>
40 60
     </insert>
41 61
 
42 62
     <update id="updateCmcCar" parameterType="CmcCar">
@@ -44,6 +64,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
44 64
         <trim prefix="SET" suffixOverrides=",">
45 65
             <if test="licensePlate != null">license_plate = #{licensePlate},</if>
46 66
             <if test="driver != null">driver = #{driver},</if>
67
+            <if test="acquisitionTime != null">acquisition_time = #{acquisitionTime},</if>
68
+            <if test="cost != null">cost = #{cost},</if>
69
+            <if test="expectLife != null">expect_life = #{expectLife},</if>
70
+            <if test="series != null">series = #{series},</if>
71
+            <if test="level != null">level = #{level},</if>
47 72
         </trim>
48 73
         where car_id = #{carId}
49 74
     </update>
@@ -53,7 +78,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
53 78
     </delete>
54 79
 
55 80
     <delete id="deleteCmcCarByCarIds" parameterType="String">
56
-        delete from cmc_car where car_id in 
81
+        delete from cmc_car where car_id in
57 82
         <foreach item="carId" collection="array" open="(" separator="," close=")">
58 83
             #{carId}
59 84
         </foreach>

+ 133
- 0
oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcDeviceApprovalMapper.xml 查看文件

@@ -0,0 +1,133 @@
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.CmcDeviceApprovalMapper">
6
+    
7
+    <resultMap type="CmcDeviceApproval" id="CmcDeviceApprovalResult">
8
+        <result property="deviceApplyId"    column="device_apply_id"    />
9
+        <result property="applier"    column="applier"    />
10
+        <result property="deviceId"    column="device_id"    />
11
+        <result property="projectNumber"    column="project_number"    />
12
+        <result property="applyReason"    column="apply_reason"    />
13
+        <result property="beginDate"    column="begin_date"    />
14
+        <result property="beginHalfday"    column="begin_halfday"    />
15
+        <result property="endDate"    column="end_date"    />
16
+        <result property="endHalfday"    column="end_halfday"    />
17
+        <result property="days"    column="days"    />
18
+        <result property="deptUserId"    column="dept_user_id"    />
19
+        <result property="deptComment"    column="dept_comment"    />
20
+        <result property="managerUserId"    column="manager_user_id"    />
21
+        <result property="managerComment"    column="manager_comment"    />
22
+        <result property="dispatcher"    column="dispatcher"    />
23
+        <result property="dispatchComment"    column="dispatch_comment"    />
24
+        <result property="estimateCost"    column="estimate_cost"    />
25
+    </resultMap>
26
+
27
+    <sql id="selectCmcDeviceApprovalVo">
28
+        select device_apply_id, applier, device_id, project_number, apply_reason, begin_date, begin_halfday, end_date, end_halfday, days, dept_user_id, dept_comment, manager_user_id, manager_comment, dispatcher, dispatch_comment, estimate_cost from cmc_device_approval
29
+    </sql>
30
+
31
+    <select id="selectCmcDeviceApprovalList" parameterType="CmcDeviceApproval" resultMap="CmcDeviceApprovalResult">
32
+        <include refid="selectCmcDeviceApprovalVo"/>
33
+        <where>  
34
+            <if test="applier != null "> and applier = #{applier}</if>
35
+            <if test="deviceId != null  and deviceId != ''"> and device_id = #{deviceId}</if>
36
+            <if test="projectNumber != null  and projectNumber != ''"> and project_number = #{projectNumber}</if>
37
+            <if test="applyReason != null  and applyReason != ''"> and apply_reason = #{applyReason}</if>
38
+            <if test="beginDate != null "> and begin_date = #{beginDate}</if>
39
+            <if test="beginHalfday != null  and beginHalfday != ''"> and begin_halfday = #{beginHalfday}</if>
40
+            <if test="endDate != null "> and end_date = #{endDate}</if>
41
+            <if test="endHalfday != null  and endHalfday != ''"> and end_halfday = #{endHalfday}</if>
42
+            <if test="days != null "> and days = #{days}</if>
43
+            <if test="deptUserId != null "> and dept_user_id = #{deptUserId}</if>
44
+            <if test="deptComment != null  and deptComment != ''"> and dept_comment = #{deptComment}</if>
45
+            <if test="managerUserId != null "> and manager_user_id = #{managerUserId}</if>
46
+            <if test="managerComment != null  and managerComment != ''"> and manager_comment = #{managerComment}</if>
47
+            <if test="dispatcher != null "> and dispatcher = #{dispatcher}</if>
48
+            <if test="dispatchComment != null  and dispatchComment != ''"> and dispatch_comment = #{dispatchComment}</if>
49
+            <if test="estimateCost != null "> and estimate_cost = #{estimateCost}</if>
50
+        </where>
51
+    </select>
52
+    
53
+    <select id="selectCmcDeviceApprovalByDeviceApplyId" parameterType="String" resultMap="CmcDeviceApprovalResult">
54
+        <include refid="selectCmcDeviceApprovalVo"/>
55
+        where device_apply_id = #{deviceApplyId}
56
+    </select>
57
+        
58
+    <insert id="insertCmcDeviceApproval" parameterType="CmcDeviceApproval">
59
+        insert into cmc_device_approval
60
+        <trim prefix="(" suffix=")" suffixOverrides=",">
61
+            <if test="deviceApplyId != null">device_apply_id,</if>
62
+            <if test="applier != null">applier,</if>
63
+            <if test="deviceId != null">device_id,</if>
64
+            <if test="projectNumber != null">project_number,</if>
65
+            <if test="applyReason != null">apply_reason,</if>
66
+            <if test="beginDate != null">begin_date,</if>
67
+            <if test="beginHalfday != null">begin_halfday,</if>
68
+            <if test="endDate != null">end_date,</if>
69
+            <if test="endHalfday != null">end_halfday,</if>
70
+            <if test="days != null">days,</if>
71
+            <if test="deptUserId != null">dept_user_id,</if>
72
+            <if test="deptComment != null">dept_comment,</if>
73
+            <if test="managerUserId != null">manager_user_id,</if>
74
+            <if test="managerComment != null">manager_comment,</if>
75
+            <if test="dispatcher != null">dispatcher,</if>
76
+            <if test="dispatchComment != null">dispatch_comment,</if>
77
+            <if test="estimateCost != null">estimate_cost,</if>
78
+         </trim>
79
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
80
+            <if test="deviceApplyId != null">#{deviceApplyId},</if>
81
+            <if test="applier != null">#{applier},</if>
82
+            <if test="deviceId != null">#{deviceId},</if>
83
+            <if test="projectNumber != null">#{projectNumber},</if>
84
+            <if test="applyReason != null">#{applyReason},</if>
85
+            <if test="beginDate != null">#{beginDate},</if>
86
+            <if test="beginHalfday != null">#{beginHalfday},</if>
87
+            <if test="endDate != null">#{endDate},</if>
88
+            <if test="endHalfday != null">#{endHalfday},</if>
89
+            <if test="days != null">#{days},</if>
90
+            <if test="deptUserId != null">#{deptUserId},</if>
91
+            <if test="deptComment != null">#{deptComment},</if>
92
+            <if test="managerUserId != null">#{managerUserId},</if>
93
+            <if test="managerComment != null">#{managerComment},</if>
94
+            <if test="dispatcher != null">#{dispatcher},</if>
95
+            <if test="dispatchComment != null">#{dispatchComment},</if>
96
+            <if test="estimateCost != null">#{estimateCost},</if>
97
+         </trim>
98
+    </insert>
99
+
100
+    <update id="updateCmcDeviceApproval" parameterType="CmcDeviceApproval">
101
+        update cmc_device_approval
102
+        <trim prefix="SET" suffixOverrides=",">
103
+            <if test="applier != null">applier = #{applier},</if>
104
+            <if test="deviceId != null">device_id = #{deviceId},</if>
105
+            <if test="projectNumber != null">project_number = #{projectNumber},</if>
106
+            <if test="applyReason != null">apply_reason = #{applyReason},</if>
107
+            <if test="beginDate != null">begin_date = #{beginDate},</if>
108
+            <if test="beginHalfday != null">begin_halfday = #{beginHalfday},</if>
109
+            <if test="endDate != null">end_date = #{endDate},</if>
110
+            <if test="endHalfday != null">end_halfday = #{endHalfday},</if>
111
+            <if test="days != null">days = #{days},</if>
112
+            <if test="deptUserId != null">dept_user_id = #{deptUserId},</if>
113
+            <if test="deptComment != null">dept_comment = #{deptComment},</if>
114
+            <if test="managerUserId != null">manager_user_id = #{managerUserId},</if>
115
+            <if test="managerComment != null">manager_comment = #{managerComment},</if>
116
+            <if test="dispatcher != null">dispatcher = #{dispatcher},</if>
117
+            <if test="dispatchComment != null">dispatch_comment = #{dispatchComment},</if>
118
+            <if test="estimateCost != null">estimate_cost = #{estimateCost},</if>
119
+        </trim>
120
+        where device_apply_id = #{deviceApplyId}
121
+    </update>
122
+
123
+    <delete id="deleteCmcDeviceApprovalByDeviceApplyId" parameterType="String">
124
+        delete from cmc_device_approval where device_apply_id = #{deviceApplyId}
125
+    </delete>
126
+
127
+    <delete id="deleteCmcDeviceApprovalByDeviceApplyIds" parameterType="String">
128
+        delete from cmc_device_approval where device_apply_id in 
129
+        <foreach item="deviceApplyId" collection="array" open="(" separator="," close=")">
130
+            #{deviceApplyId}
131
+        </foreach>
132
+    </delete>
133
+</mapper>

+ 81
- 0
oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcDeviceMapper.xml 查看文件

@@ -0,0 +1,81 @@
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.CmcDeviceMapper">
6
+    
7
+    <resultMap type="CmcDevice" id="CmcDeviceResult">
8
+        <result property="deviceId"    column="device_id"    />
9
+        <result property="code"    column="code"    />
10
+        <result property="type"    column="type"    />
11
+        <result property="acquisitionTime"    column="acquisition_time"    />
12
+        <result property="cost"    column="cost"    />
13
+        <result property="expectLife"    column="expect_life"    />
14
+        <result property="series"    column="series"    />
15
+    </resultMap>
16
+
17
+    <sql id="selectCmcDeviceVo">
18
+        select device_id, code, type, acquisition_time, cost, expect_life, series from cmc_device
19
+    </sql>
20
+
21
+    <select id="selectCmcDeviceList" parameterType="CmcDevice" resultMap="CmcDeviceResult">
22
+        <include refid="selectCmcDeviceVo"/>
23
+        <where>  
24
+            <if test="code != null  and code != ''"> and code = #{code}</if>
25
+            <if test="type != null  and type != ''"> and type = #{type}</if>
26
+            <if test="acquisitionTime != null "> and acquisition_time = #{acquisitionTime}</if>
27
+            <if test="cost != null "> and cost = #{cost}</if>
28
+            <if test="expectLife != null "> and expect_life = #{expectLife}</if>
29
+            <if test="series != null  and series != ''"> and series = #{series}</if>
30
+        </where>
31
+    </select>
32
+    
33
+    <select id="selectCmcDeviceByDeviceId" parameterType="Long" resultMap="CmcDeviceResult">
34
+        <include refid="selectCmcDeviceVo"/>
35
+        where device_id = #{deviceId}
36
+    </select>
37
+        
38
+    <insert id="insertCmcDevice" parameterType="CmcDevice" useGeneratedKeys="true" keyProperty="deviceId">
39
+        insert into cmc_device
40
+        <trim prefix="(" suffix=")" suffixOverrides=",">
41
+            <if test="code != null">code,</if>
42
+            <if test="type != null">type,</if>
43
+            <if test="acquisitionTime != null">acquisition_time,</if>
44
+            <if test="cost != null">cost,</if>
45
+            <if test="expectLife != null">expect_life,</if>
46
+            <if test="series != null">series,</if>
47
+         </trim>
48
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
49
+            <if test="code != null">#{code},</if>
50
+            <if test="type != null">#{type},</if>
51
+            <if test="acquisitionTime != null">#{acquisitionTime},</if>
52
+            <if test="cost != null">#{cost},</if>
53
+            <if test="expectLife != null">#{expectLife},</if>
54
+            <if test="series != null">#{series},</if>
55
+         </trim>
56
+    </insert>
57
+
58
+    <update id="updateCmcDevice" parameterType="CmcDevice">
59
+        update cmc_device
60
+        <trim prefix="SET" suffixOverrides=",">
61
+            <if test="code != null">code = #{code},</if>
62
+            <if test="type != null">type = #{type},</if>
63
+            <if test="acquisitionTime != null">acquisition_time = #{acquisitionTime},</if>
64
+            <if test="cost != null">cost = #{cost},</if>
65
+            <if test="expectLife != null">expect_life = #{expectLife},</if>
66
+            <if test="series != null">series = #{series},</if>
67
+        </trim>
68
+        where device_id = #{deviceId}
69
+    </update>
70
+
71
+    <delete id="deleteCmcDeviceByDeviceId" parameterType="Long">
72
+        delete from cmc_device where device_id = #{deviceId}
73
+    </delete>
74
+
75
+    <delete id="deleteCmcDeviceByDeviceIds" parameterType="String">
76
+        delete from cmc_device where device_id in 
77
+        <foreach item="deviceId" collection="array" open="(" separator="," close=")">
78
+            #{deviceId}
79
+        </foreach>
80
+    </delete>
81
+</mapper>

+ 110
- 95
oa-back/sql/sql.sql 查看文件

@@ -344,11 +344,12 @@ create table sys_menu (
344 344
 -- 初始化-菜单信息表数据
345 345
 -- ----------------------------
346 346
 -- 一级菜单
347
-insert into sys_menu values('1', '系统管理', '0', '1', 'system',           null, '', 1, 0, 'M', '0', '0', '', 'system',   'admin', sysdate(), '', null, '系统管理目录');
348
-insert into sys_menu values('2', '系统监控', '0', '2', 'monitor',          null, '', 1, 0, 'M', '0', '0', '', 'monitor',  'admin', sysdate(), '', null, '系统监控目录');
349
-insert into sys_menu values('3', '系统工具', '0', '3', 'tool',             null, '', 1, 0, 'M', '0', '0', '', 'tool',     'admin', sysdate(), '', null, '系统工具目录');
350
-insert into sys_menu values('4', '车辆管理', '0', '4', 'car',    	  'oa/car/index',        	  '', 1, 0, 'C', '0', '0', 'oa:car:list',       	  'car',       	   'admin', sysdate(), '', null, '车辆管理菜单');
351
-insert into sys_menu values('5', '项目管理', '0', '5', 'project',	  'oa/project/index',         '', 1, 0, 'C', '0', '0', 'oa:project:list',         'project',       'admin', sysdate(), '', null, '项目管理菜单');
347
+insert into sys_menu values('1', '系统管理', '0', '1', 'system',			null, '', 1, 0, 'M', '0', '0', '', 'system',	'admin', sysdate(), '', null, '系统管理目录');
348
+insert into sys_menu values('2', '系统监控', '0', '2', 'monitor',			null, '', 1, 0, 'M', '0', '0', '', 'monitor',	'admin', sysdate(), '', null, '系统监控目录');
349
+insert into sys_menu values('3', '系统工具', '0', '3', 'tool',				null, '', 1, 0, 'M', '0', '0', '', 'tool',		'admin', sysdate(), '', null, '系统工具目录');
350
+insert into sys_menu values('4', '车辆管理', '0', '4', 'car',			'oa/car/index',        	  '', 1, 0, 'C', '0', '0', 'oa:car:list',       	  'car',			'admin', sysdate(), '', null, '车辆管理菜单');
351
+insert into sys_menu values('5', '设备管理', '0', '5', 'device',		'oa/device/index',        '', 1, 0, 'C', '0', '0', 'oa:device:list',       	  'component',		'admin', sysdate(), '', null, '设备管理菜单');
352
+insert into sys_menu values('6', '项目管理', '0', '6', 'project',		'oa/project/index',       '', 1, 0, 'C', '0', '0', 'oa:project:list',         'project',		'admin', sysdate(), '', null, '项目管理菜单');
352 353
 -- 二级菜单
353 354
 insert into sys_menu values('100',  '用户管理', '1',   '1', 'user',       'system/user/index',        '', 1, 0, 'C', '0', '0', 'system:user:list',        'user',          'admin', sysdate(), '', null, '用户管理菜单');
354 355
 insert into sys_menu values('101',  '角色管理', '1',   '2', 'role',       'system/role/index',        '', 1, 0, 'C', '0', '0', 'system:role:list',        'peoples',       'admin', sysdate(), '', null, '角色管理菜单');
@@ -447,17 +448,23 @@ insert into sys_menu values('1059', '导入代码', '116', '4', '#', '', '', 1,
447 448
 insert into sys_menu values('1060', '预览代码', '116', '5', '#', '', '', 1, 0, 'F', '0', '0', 'tool:gen:preview',           '#', 'admin', sysdate(), '', null, '');
448 449
 insert into sys_menu values('1061', '生成代码', '116', '6', '#', '', '', 1, 0, 'F', '0', '0', 'tool:gen:code',              '#', 'admin', sysdate(), '', null, '');
449 450
 -- 车辆管理按钮
450
-insert into sys_menu values('1062', '车辆查询', '4', '1', '#', '', '', 1, 0, 'F', '0', '0', 'oa:car:query',				'#', 'admin', sysdate(), '', null, '');
451
+insert into sys_menu values('1062', '车辆查询', '4', '1', '#', '', '', 1, 0, 'F', '0', '0', 'oa:car:query',					'#', 'admin', sysdate(), '', null, '');
451 452
 insert into sys_menu values('1063', '车辆新增', '4', '2', '#', '', '', 1, 0, 'F', '0', '0', 'oa:car:add',					'#', 'admin', sysdate(), '', null, '');
452 453
 insert into sys_menu values('1064', '车辆修改', '4', '3', '#', '', '', 1, 0, 'F', '0', '0', 'oa:car:edit',              	'#', 'admin', sysdate(), '', null, '');
453
-insert into sys_menu values('1065', '车辆删除', '4', '4', '#', '', '', 1, 0, 'F', '0', '0', 'oa:car:remove',              '#', 'admin', sysdate(), '', null, '');
454
-insert into sys_menu values('1066', '车辆导出', '4', '5', '#', '', '', 1, 0, 'F', '0', '0', 'oa:car:export',              '#', 'admin', sysdate(), '', null, '');
455
-insert into sys_menu values('1067', '项目查询', '5', '1', '#', '', '', 1, 0, 'F', '0', '0', 'oa:project:query',			'#', 'admin', sysdate(), '', null, '');
456
-insert into sys_menu values('1068', '项目新增', '5', '2', '#', '', '', 1, 0, 'F', '0', '0', 'oa:project:add',				'#', 'admin', sysdate(), '', null, '');
457
-insert into sys_menu values('1069', '项目修改', '5', '3', '#', '', '', 1, 0, 'F', '0', '0', 'oa:project:edit',            '#', 'admin', sysdate(), '', null, '');
458
-insert into sys_menu values('1070', '项目删除', '5', '4', '#', '', '', 1, 0, 'F', '0', '0', 'oa:project:remove',          '#', 'admin', sysdate(), '', null, '');
459
-insert into sys_menu values('1071', '项目导出', '5', '5', '#', '', '', 1, 0, 'F', '0', '0', 'oa:project:export',          '#', 'admin', sysdate(), '', null, '');
454
+insert into sys_menu values('1065', '车辆删除', '4', '4', '#', '', '', 1, 0, 'F', '0', '0', 'oa:car:remove',              	'#', 'admin', sysdate(), '', null, '');
455
+insert into sys_menu values('1066', '车辆导出', '4', '5', '#', '', '', 1, 0, 'F', '0', '0', 'oa:car:export',              	'#', 'admin', sysdate(), '', null, '');
456
+-- 设备管理按钮
457
+insert into sys_menu values('1067', '设备查询', '5', '1', '#', '', '', 1, 0, 'F', '0', '0', 'oa:project:query',				'#', 'admin', sysdate(), '', null, '');
458
+insert into sys_menu values('1068', '设备新增', '5', '2', '#', '', '', 1, 0, 'F', '0', '0', 'oa:project:add',				'#', 'admin', sysdate(), '', null, '');
459
+insert into sys_menu values('1069', '设备修改', '5', '3', '#', '', '', 1, 0, 'F', '0', '0', 'oa:project:edit',            	'#', 'admin', sysdate(), '', null, '');
460
+insert into sys_menu values('1070', '设备删除', '5', '4', '#', '', '', 1, 0, 'F', '0', '0', 'oa:project:remove',          	'#', 'admin', sysdate(), '', null, '');
461
+insert into sys_menu values('1071', '设备导出', '5', '5', '#', '', '', 1, 0, 'F', '0', '0', 'oa:project:export',          	'#', 'admin', sysdate(), '', null, '');
462
+-- 项目管理按钮
463
+insert into sys_menu values('1072', '项目查询', '6', '1', '#', '', '', 1, 0, 'F', '0', '0', 'oa:project:query',				'#', 'admin', sysdate(), '', null, '');
464
+insert into sys_menu values('1073', '项目新增', '6', '2', '#', '', '', 1, 0, 'F', '0', '0', 'oa:project:add',				'#', 'admin', sysdate(), '', null, '');
465
+insert into sys_menu values('1074', '项目修改', '6', '3', '#', '', '', 1, 0, 'F', '0', '0', 'oa:project:edit',            	'#', 'admin', sysdate(), '', null, '');
466
+insert into sys_menu values('1075', '项目删除', '6', '4', '#', '', '', 1, 0, 'F', '0', '0', 'oa:project:remove',          	'#', 'admin', sysdate(), '', null, '');
467
+insert into sys_menu values('1076', '项目导出', '6', '5', '#', '', '', 1, 0, 'F', '0', '0', 'oa:project:export',          	'#', 'admin', sysdate(), '', null, '');
460 468
 
461 469
 -- ----------------------------
462 470
 -- 6、用户和角色关联表  用户N-1角色
@@ -708,19 +715,21 @@ insert into sys_user_post values (13, 12);
708 715
 insert into sys_user_post values (14, 10);
709 716
 insert into sys_user_post values (14, 12);
710 717
 insert into sys_user_post values (15, 19);
711
-insert into sys_user_post values (16, 23);
712
-insert into sys_user_post values (17, 23);
713
-insert into sys_user_post values (18, 23);
714
-insert into sys_user_post values (19, 23);
718
+insert into sys_user_post values (16, 26);
719
+insert into sys_user_post values (16, 27);
720
+insert into sys_user_post values (17, 26);
721
+insert into sys_user_post values (18, 26);
722
+insert into sys_user_post values (19, 26);
723
+insert into sys_user_post values (19, 27);
715 724
 insert into sys_user_post values (20, 13);
716 725
 insert into sys_user_post values (21, 13);
717 726
 insert into sys_user_post values (22, 20);
718
-insert into sys_user_post values (22, 23);
719
-insert into sys_user_post values (23, 23);
720
-insert into sys_user_post values (24, 23);
721
-insert into sys_user_post values (25, 23);
722
-insert into sys_user_post values (26, 23);
723
-insert into sys_user_post values (27, 23);
727
+insert into sys_user_post values (22, 26);
728
+insert into sys_user_post values (23, 26);
729
+insert into sys_user_post values (24, 26);
730
+insert into sys_user_post values (25, 26);
731
+insert into sys_user_post values (26, 26);
732
+insert into sys_user_post values (27, 26);
724 733
 insert into sys_user_post values (28, 13);
725 734
 insert into sys_user_post values (29, 25);
726 735
 insert into sys_user_post values (30, 24);
@@ -1390,13 +1399,14 @@ create table `cmc_project_work`  (
1390 1399
 -- ----------------------------
1391 1400
 drop table if exists `cmc_car`;
1392 1401
 create table `cmc_car`  (
1393
-  `car_id`			int					not null auto_increment		comment '车辆id',
1394
-  `license_plate`	varchar(8)			default null				comment '车牌号',
1395
-  `driver`			bigint				default null				comment '驾驶员(常用)',
1396
-  `cost`			decimal(10,2)		default null				comment '总价',
1397
-  `expect_life`		int					default null				comment '预计使用年限',
1398
-  `series`			varchar(10)			default null				comment '车系',
1399
-  `level`			varchar(10)			default null				comment '车级',
1402
+  `car_id`				int					not null auto_increment		comment '车辆id',
1403
+  `license_plate`		varchar(8)			default null				comment '车牌号',
1404
+  `driver`				bigint				default null				comment '驾驶员(常用)',
1405
+  `acquisition_time`	datetime			default null				comment '购置时间',
1406
+  `cost`				decimal(10,2)		default null				comment '总价',
1407
+  `expect_life`			int					default null				comment '预计使用年限',
1408
+  `series`				varchar(10)			default null				comment '车系',
1409
+  `level`				varchar(10)			default null				comment '车级',
1400 1410
   primary key (`car_id`)
1401 1411
 ) engine = innodb comment = 'cmc车辆信息表';
1402 1412
 
@@ -1442,12 +1452,13 @@ create table `cmc_car_approval`  (
1442 1452
 -- ----------------------------
1443 1453
 drop table if exists `cmc_device`;
1444 1454
 create table `cmc_device`  (
1445
-  `device_id`		int					not null auto_increment		comment '设备id',
1446
-  `code`			varchar(20)			default null				comment '设备编号',
1447
-  `type`			varchar(10)			default null				comment '设备类别',
1448
-  `cost`			decimal(10,2)		default null				comment '总价',
1449
-  `expect_life`		int					default null				comment '预计使用年限',
1450
-  `series`			varchar(20)			default null				comment '设备系列',
1455
+  `device_id`			int					not null auto_increment		comment '设备id',
1456
+  `code`				varchar(20)			default null				comment '设备编号',
1457
+  `type`				varchar(10)			default null				comment '设备类别',
1458
+  `acquisition_time`	datetime			default null				comment '购置时间',
1459
+  `cost`				decimal(10,2)		default null				comment '总价',
1460
+  `expect_life`			int					default null				comment '预计使用年限',
1461
+  `series`				varchar(20)			default null				comment '设备系列',
1451 1462
   primary key (`device_id`)
1452 1463
 ) engine = innodb comment = 'cmc设备信息表';
1453 1464
 
@@ -1514,69 +1525,72 @@ create table `cmc_user_cost`  (
1514 1525
   `name`			varchar(10)		default null				comment '项名',
1515 1526
   `month_cost`		decimal(10, 2)	default null				comment '月成本',
1516 1527
   primary key (`cost_id`)
1517
-) engine = innodb comment = 'cmc用户历史表';
1528
+) engine = innodb comment = 'cmc用户成本表';
1518 1529
 
1519 1530
 -- ----------------------------
1520 1531
 -- 初始化-用户成本表数据
1521 1532
 -- ----------------------------
1522
-insert into `cmc_cost` values (1, '一岗一档', 300.00);
1523
-insert into `cmc_cost` values (2, '一岗二档', 340.00);
1524
-insert into `cmc_cost` values (3, '一岗三档', 380.00);
1525
-insert into `cmc_cost` values (4, '一岗四档', 420.00);
1526
-insert into `cmc_cost` values (5, '二岗一档', 440.00);
1527
-insert into `cmc_cost` values (6, '二岗二档', 500.00);
1528
-insert into `cmc_cost` values (7, '二岗三档', 560.00);
1529
-insert into `cmc_cost` values (8, '二岗四档', 620.00);
1530
-insert into `cmc_cost` values (9, '二岗五档', 680.00);
1531
-insert into `cmc_cost` values (10, '二岗六档', 740.00);
1532
-insert into `cmc_cost` values (11, '三岗一档', 560.00);
1533
-insert into `cmc_cost` values (12, '三岗二档', 640.00);
1534
-insert into `cmc_cost` values (13, '三岗三档', 720.00);
1535
-insert into `cmc_cost` values (14, '三岗四档', 800.00);
1536
-insert into `cmc_cost` values (15, '三岗五档', 880.00);
1537
-insert into `cmc_cost` values (16, '三岗六档', 960.00);
1538
-insert into `cmc_cost` values (17, '三岗七档', 1040.00);
1539
-insert into `cmc_cost` values (18, '三岗八档', 1120.00);
1540
-insert into `cmc_cost` values (19, '四岗一档', 880.00);
1541
-insert into `cmc_cost` values (20, '四岗二档', 1020.00);
1542
-insert into `cmc_cost` values (21, '四岗三档', 1160.00);
1543
-insert into `cmc_cost` values (22, '四岗四档', 1300.00);
1544
-insert into `cmc_cost` values (23, '四岗五档', 1440.00);
1545
-insert into `cmc_cost` values (24, '四岗六档', 1580.00);
1546
-insert into `cmc_cost` values (25, '四岗七档', 1720.00);
1547
-insert into `cmc_cost` values (26, '四岗八档', 1860.00);
1548
-insert into `cmc_cost` values (27, '五岗一档', 1700.00);
1549
-insert into `cmc_cost` values (28, '五岗二档', 1860.00);
1550
-insert into `cmc_cost` values (29, '五岗三档', 2020.00);
1551
-insert into `cmc_cost` values (30, '五岗四档', 2180.00);
1552
-insert into `cmc_cost` values (31, '五岗五档', 2340.00);
1553
-insert into `cmc_cost` values (32, '五岗六档', 2500.00);
1554
-insert into `cmc_cost` values (33, '五岗七档', 2660.00);
1555
-insert into `cmc_cost` values (34, '五岗八档', 2820.00);
1556
-insert into `cmc_cost` values (35, '六岗一档', 2640.00);
1557
-insert into `cmc_cost` values (36, '六岗二档', 2820.00);
1558
-insert into `cmc_cost` values (37, '六岗三档', 3000.00);
1559
-insert into `cmc_cost` values (38, '六岗四档', 3180.00);
1560
-insert into `cmc_cost` values (39, '六岗五档', 3360.00);
1561
-insert into `cmc_cost` values (40, '六岗六档', 3540.00);
1562
-insert into `cmc_cost` values (41, '六岗七档', 3720.00);
1563
-insert into `cmc_cost` values (42, '六岗八档', 3900.00);
1564
-insert into `cmc_cost` values (43, '七岗一档', 3700.00);
1565
-insert into `cmc_cost` values (44, '七岗二档', 3900.00);
1566
-insert into `cmc_cost` values (45, '七岗三档', 4100.00);
1567
-insert into `cmc_cost` values (46, '七岗四档', 4300.00);
1568
-insert into `cmc_cost` values (47, '七岗五档', 4500.00);
1569
-insert into `cmc_cost` values (48, '七岗六档', 4700.00);
1570
-insert into `cmc_cost` values (49, '七岗七档', 4900.00);
1571
-insert into `cmc_cost` values (50, '七岗八档', 5100.00);
1572
-insert into `cmc_cost` values (51, '八岗一档', 4880.00);
1573
-insert into `cmc_cost` values (52, '八岗二档', 5100.00);
1574
-insert into `cmc_cost` values (53, '八岗三档', 5320.00);
1575
-insert into `cmc_cost` values (54, '八岗四档', 5540.00);
1576
-insert into `cmc_cost` values (55, '八岗五档', 5760.00);
1577
-insert into `cmc_cost` values (56, '八岗六档', 5980.00);
1578
-insert into `cmc_cost` values (57, '八岗七档', 6200.00);
1579
-insert into `cmc_cost` values (58, '八岗八档', 6420.00);
1533
+insert into `cmc_user_cost` values (1, '一岗一档', 300.00);
1534
+insert into `cmc_user_cost` values (2, '一岗二档', 340.00);
1535
+insert into `cmc_user_cost` values (3, '一岗三档', 380.00);
1536
+insert into `cmc_user_cost` values (4, '一岗四档', 420.00);
1537
+insert into `cmc_user_cost` values (5, '二岗一档', 440.00);
1538
+insert into `cmc_user_cost` values (6, '二岗二档', 500.00);
1539
+insert into `cmc_user_cost` values (7, '二岗三档', 560.00);
1540
+insert into `cmc_user_cost` values (8, '二岗四档', 620.00);
1541
+insert into `cmc_user_cost` values (9, '二岗五档', 680.00);
1542
+insert into `cmc_user_cost` values (10, '二岗六档', 740.00);
1543
+insert into `cmc_user_cost` values (11, '三岗一档', 560.00);
1544
+insert into `cmc_user_cost` values (12, '三岗二档', 640.00);
1545
+insert into `cmc_user_cost` values (13, '三岗三档', 720.00);
1546
+insert into `cmc_user_cost` values (14, '三岗四档', 800.00);
1547
+insert into `cmc_user_cost` values (15, '三岗五档', 880.00);
1548
+insert into `cmc_user_cost` values (16, '三岗六档', 960.00);
1549
+insert into `cmc_user_cost` values (17, '三岗七档', 1040.00);
1550
+insert into `cmc_user_cost` values (18, '三岗八档', 1120.00);
1551
+insert into `cmc_user_cost` values (19, '四岗一档', 880.00);
1552
+insert into `cmc_user_cost` values (20, '四岗二档', 1020.00);
1553
+insert into `cmc_user_cost` values (21, '四岗三档', 1160.00);
1554
+insert into `cmc_user_cost` values (22, '四岗四档', 1300.00);
1555
+insert into `cmc_user_cost` values (23, '四岗五档', 1440.00);
1556
+insert into `cmc_user_cost` values (24, '四岗六档', 1580.00);
1557
+insert into `cmc_user_cost` values (25, '四岗七档', 1720.00);
1558
+insert into `cmc_user_cost` values (26, '四岗八档', 1860.00);
1559
+insert into `cmc_user_cost` values (27, '五岗一档', 1700.00);
1560
+insert into `cmc_user_cost` values (28, '五岗二档', 1860.00);
1561
+insert into `cmc_user_cost` values (29, '五岗三档', 2020.00);
1562
+insert into `cmc_user_cost` values (30, '五岗四档', 2180.00);
1563
+insert into `cmc_user_cost` values (31, '五岗五档', 2340.00);
1564
+insert into `cmc_user_cost` values (32, '五岗六档', 2500.00);
1565
+insert into `cmc_user_cost` values (33, '五岗七档', 2660.00);
1566
+insert into `cmc_user_cost` values (34, '五岗八档', 2820.00);
1567
+insert into `cmc_user_cost` values (35, '六岗一档', 2640.00);
1568
+insert into `cmc_user_cost` values (36, '六岗二档', 2820.00);
1569
+insert into `cmc_user_cost` values (37, '六岗三档', 3000.00);
1570
+insert into `cmc_user_cost` values (38, '六岗四档', 3180.00);
1571
+insert into `cmc_user_cost` values (39, '六岗五档', 3360.00);
1572
+insert into `cmc_user_cost` values (40, '六岗六档', 3540.00);
1573
+insert into `cmc_user_cost` values (41, '六岗七档', 3720.00);
1574
+insert into `cmc_user_cost` values (42, '六岗八档', 3900.00);
1575
+insert into `cmc_user_cost` values (43, '七岗一档', 3700.00);
1576
+insert into `cmc_user_cost` values (44, '七岗二档', 3900.00);
1577
+insert into `cmc_user_cost` values (45, '七岗三档', 4100.00);
1578
+insert into `cmc_user_cost` values (46, '七岗四档', 4300.00);
1579
+insert into `cmc_user_cost` values (47, '七岗五档', 4500.00);
1580
+insert into `cmc_user_cost` values (48, '七岗六档', 4700.00);
1581
+insert into `cmc_user_cost` values (49, '七岗七档', 4900.00);
1582
+insert into `cmc_user_cost` values (50, '七岗八档', 5100.00);
1583
+insert into `cmc_user_cost` values (51, '八岗一档', 4880.00);
1584
+insert into `cmc_user_cost` values (52, '八岗二档', 5100.00);
1585
+insert into `cmc_user_cost` values (53, '八岗三档', 5320.00);
1586
+insert into `cmc_user_cost` values (54, '八岗四档', 5540.00);
1587
+insert into `cmc_user_cost` values (55, '八岗五档', 5760.00);
1588
+insert into `cmc_user_cost` values (56, '八岗六档', 5980.00);
1589
+insert into `cmc_user_cost` values (57, '八岗七档', 6200.00);
1590
+insert into `cmc_user_cost` values (58, '八岗八档', 6420.00);
1591
+
1592
+SET NAMES utf8mb4;
1593
+SET FOREIGN_KEY_CHECKS = 0;
1580 1594
 
1581 1595
 -- ----------------------------
1582 1596
 -- Table structure for ACT_APP_APPDEF

+ 44
- 0
oa-ui/src/api/oa/car/carApproval.js 查看文件

@@ -0,0 +1,44 @@
1
+import request from '@/utils/request'
2
+
3
+// 查询cmc用车审批列表
4
+export function listCarApproval(query) {
5
+  return request({
6
+    url: '/oa/carApproval/list',
7
+    method: 'get',
8
+    params: query
9
+  })
10
+}
11
+
12
+// 查询cmc用车审批详细
13
+export function getCarApproval(carApplyId) {
14
+  return request({
15
+    url: '/oa/carApproval/' + carApplyId,
16
+    method: 'get'
17
+  })
18
+}
19
+
20
+// 新增cmc用车审批
21
+export function addCarApproval(data) {
22
+  return request({
23
+    url: '/oa/carApproval',
24
+    method: 'post',
25
+    data: data
26
+  })
27
+}
28
+
29
+// 修改cmc用车审批
30
+export function updateCarApproval(data) {
31
+  return request({
32
+    url: '/oa/carApproval',
33
+    method: 'put',
34
+    data: data
35
+  })
36
+}
37
+
38
+// 删除cmc用车审批
39
+export function delCarApproval(carApplyId) {
40
+  return request({
41
+    url: '/oa/carApproval/' + carApplyId,
42
+    method: 'delete'
43
+  })
44
+}

+ 44
- 0
oa-ui/src/api/oa/device/device.js 查看文件

@@ -0,0 +1,44 @@
1
+import request from '@/utils/request'
2
+
3
+// 查询cmc设备信息列表
4
+export function listDevice(query) {
5
+  return request({
6
+    url: '/oa/device/list',
7
+    method: 'get',
8
+    params: query
9
+  })
10
+}
11
+
12
+// 查询cmc设备信息详细
13
+export function getDevice(deviceId) {
14
+  return request({
15
+    url: '/oa/device/' + deviceId,
16
+    method: 'get'
17
+  })
18
+}
19
+
20
+// 新增cmc设备信息
21
+export function addDevice(data) {
22
+  return request({
23
+    url: '/oa/device',
24
+    method: 'post',
25
+    data: data
26
+  })
27
+}
28
+
29
+// 修改cmc设备信息
30
+export function updateDevice(data) {
31
+  return request({
32
+    url: '/oa/device',
33
+    method: 'put',
34
+    data: data
35
+  })
36
+}
37
+
38
+// 删除cmc设备信息
39
+export function delDevice(deviceId) {
40
+  return request({
41
+    url: '/oa/device/' + deviceId,
42
+    method: 'delete'
43
+  })
44
+}

+ 44
- 0
oa-ui/src/api/oa/device/deviceApproval.js 查看文件

@@ -0,0 +1,44 @@
1
+import request from '@/utils/request'
2
+
3
+// 查询cmc设备审批列表
4
+export function listDeviceApproval(query) {
5
+  return request({
6
+    url: '/oa/deviceApproval/list',
7
+    method: 'get',
8
+    params: query
9
+  })
10
+}
11
+
12
+// 查询cmc设备审批详细
13
+export function getDeviceApproval(deviceApplyId) {
14
+  return request({
15
+    url: '/oa/deviceApproval/' + deviceApplyId,
16
+    method: 'get'
17
+  })
18
+}
19
+
20
+// 新增cmc设备审批
21
+export function addDeviceApproval(data) {
22
+  return request({
23
+    url: '/oa/deviceApproval',
24
+    method: 'post',
25
+    data: data
26
+  })
27
+}
28
+
29
+// 修改cmc设备审批
30
+export function updateDeviceApproval(data) {
31
+  return request({
32
+    url: '/oa/deviceApproval',
33
+    method: 'put',
34
+    data: data
35
+  })
36
+}
37
+
38
+// 删除cmc设备审批
39
+export function delDeviceApproval(deviceApplyId) {
40
+  return request({
41
+    url: '/oa/deviceApproval/' + deviceApplyId,
42
+    method: 'delete'
43
+  })
44
+}

+ 313
- 0
oa-ui/src/views/oa/device/index.vue 查看文件

@@ -0,0 +1,313 @@
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="code">
5
+        <el-input
6
+          v-model="queryParams.code"
7
+          placeholder="请输入设备编号"
8
+          clearable
9
+          @keyup.enter.native="handleQuery"
10
+        />
11
+      </el-form-item>
12
+      <el-form-item label="购置时间" prop="acquisitionTime">
13
+        <el-date-picker clearable
14
+          v-model="queryParams.acquisitionTime"
15
+          type="date"
16
+          value-format="yyyy-MM-dd"
17
+          placeholder="请选择购置时间">
18
+        </el-date-picker>
19
+      </el-form-item>
20
+      <el-form-item label="总价" prop="cost">
21
+        <el-input
22
+          v-model="queryParams.cost"
23
+          placeholder="请输入总价"
24
+          clearable
25
+          @keyup.enter.native="handleQuery"
26
+        />
27
+      </el-form-item>
28
+      <el-form-item label="预计使用年限" prop="expectLife">
29
+        <el-input
30
+          v-model="queryParams.expectLife"
31
+          placeholder="请输入预计使用年限"
32
+          clearable
33
+          @keyup.enter.native="handleQuery"
34
+        />
35
+      </el-form-item>
36
+      <el-form-item label="设备系列" prop="series">
37
+        <el-input
38
+          v-model="queryParams.series"
39
+          placeholder="请输入设备系列"
40
+          clearable
41
+          @keyup.enter.native="handleQuery"
42
+        />
43
+      </el-form-item>
44
+      <el-form-item>
45
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
46
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
47
+      </el-form-item>
48
+    </el-form>
49
+
50
+    <el-row :gutter="10" class="mb8">
51
+      <el-col :span="1.5">
52
+        <el-button
53
+          type="primary"
54
+          plain
55
+          icon="el-icon-plus"
56
+          size="mini"
57
+          @click="handleAdd"
58
+          v-hasPermi="['oa:device:add']"
59
+        >新增</el-button>
60
+      </el-col>
61
+      <el-col :span="1.5">
62
+        <el-button
63
+          type="success"
64
+          plain
65
+          icon="el-icon-edit"
66
+          size="mini"
67
+          :disabled="single"
68
+          @click="handleUpdate"
69
+          v-hasPermi="['oa:device:edit']"
70
+        >修改</el-button>
71
+      </el-col>
72
+      <el-col :span="1.5">
73
+        <el-button
74
+          type="danger"
75
+          plain
76
+          icon="el-icon-delete"
77
+          size="mini"
78
+          :disabled="multiple"
79
+          @click="handleDelete"
80
+          v-hasPermi="['oa:device:remove']"
81
+        >删除</el-button>
82
+      </el-col>
83
+      <el-col :span="1.5">
84
+        <el-button
85
+          type="warning"
86
+          plain
87
+          icon="el-icon-download"
88
+          size="mini"
89
+          @click="handleExport"
90
+          v-hasPermi="['oa:device:export']"
91
+        >导出</el-button>
92
+      </el-col>
93
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
94
+    </el-row>
95
+
96
+    <el-table v-loading="loading" :data="deviceList" @selection-change="handleSelectionChange">
97
+      <el-table-column type="selection" width="55" align="center" />
98
+      <el-table-column label="设备id" align="center" prop="deviceId" />
99
+      <el-table-column label="设备编号" align="center" prop="code" />
100
+      <el-table-column label="设备类别" align="center" prop="type" />
101
+      <el-table-column label="购置时间" align="center" prop="acquisitionTime" width="180">
102
+        <template slot-scope="scope">
103
+          <span>{{ parseTime(scope.row.acquisitionTime, '{y}-{m}-{d}') }}</span>
104
+        </template>
105
+      </el-table-column>
106
+      <el-table-column label="总价" align="center" prop="cost" />
107
+      <el-table-column label="预计使用年限" align="center" prop="expectLife" />
108
+      <el-table-column label="设备系列" align="center" prop="series" />
109
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
110
+        <template slot-scope="scope">
111
+          <el-button
112
+            size="mini"
113
+            type="text"
114
+            icon="el-icon-edit"
115
+            @click="handleUpdate(scope.row)"
116
+            v-hasPermi="['oa:device:edit']"
117
+          >修改</el-button>
118
+          <el-button
119
+            size="mini"
120
+            type="text"
121
+            icon="el-icon-delete"
122
+            @click="handleDelete(scope.row)"
123
+            v-hasPermi="['oa:device:remove']"
124
+          >删除</el-button>
125
+        </template>
126
+      </el-table-column>
127
+    </el-table>
128
+    
129
+    <pagination
130
+      v-show="total>0"
131
+      :total="total"
132
+      :page.sync="queryParams.pageNum"
133
+      :limit.sync="queryParams.pageSize"
134
+      @pagination="getList"
135
+    />
136
+
137
+    <!-- 添加或修改cmc设备信息对话框 -->
138
+    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
139
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
140
+        <el-form-item label="设备编号" prop="code">
141
+          <el-input v-model="form.code" placeholder="请输入设备编号" />
142
+        </el-form-item>
143
+        <el-form-item label="购置时间" prop="acquisitionTime">
144
+          <el-date-picker clearable
145
+            v-model="form.acquisitionTime"
146
+            type="date"
147
+            value-format="yyyy-MM-dd"
148
+            placeholder="请选择购置时间">
149
+          </el-date-picker>
150
+        </el-form-item>
151
+        <el-form-item label="总价" prop="cost">
152
+          <el-input v-model="form.cost" placeholder="请输入总价" />
153
+        </el-form-item>
154
+        <el-form-item label="预计使用年限" prop="expectLife">
155
+          <el-input v-model="form.expectLife" placeholder="请输入预计使用年限" />
156
+        </el-form-item>
157
+        <el-form-item label="设备系列" prop="series">
158
+          <el-input v-model="form.series" placeholder="请输入设备系列" />
159
+        </el-form-item>
160
+      </el-form>
161
+      <div slot="footer" class="dialog-footer">
162
+        <el-button type="primary" @click="submitForm">确 定</el-button>
163
+        <el-button @click="cancel">取 消</el-button>
164
+      </div>
165
+    </el-dialog>
166
+  </div>
167
+</template>
168
+
169
+<script>
170
+import { listDevice, getDevice, delDevice, addDevice, updateDevice } from "@/api/oa/device/device";
171
+
172
+export default {
173
+  name: "Device",
174
+  data() {
175
+    return {
176
+      // 遮罩层
177
+      loading: true,
178
+      // 选中数组
179
+      ids: [],
180
+      // 非单个禁用
181
+      single: true,
182
+      // 非多个禁用
183
+      multiple: true,
184
+      // 显示搜索条件
185
+      showSearch: true,
186
+      // 总条数
187
+      total: 0,
188
+      // cmc设备信息表格数据
189
+      deviceList: [],
190
+      // 弹出层标题
191
+      title: "",
192
+      // 是否显示弹出层
193
+      open: false,
194
+      // 查询参数
195
+      queryParams: {
196
+        pageNum: 1,
197
+        pageSize: 10,
198
+        code: null,
199
+        type: null,
200
+        acquisitionTime: null,
201
+        cost: null,
202
+        expectLife: null,
203
+        series: null
204
+      },
205
+      // 表单参数
206
+      form: {},
207
+      // 表单校验
208
+      rules: {
209
+      }
210
+    };
211
+  },
212
+  created() {
213
+    this.getList();
214
+  },
215
+  methods: {
216
+    /** 查询cmc设备信息列表 */
217
+    getList() {
218
+      this.loading = true;
219
+      listDevice(this.queryParams).then(response => {
220
+        this.deviceList = response.rows;
221
+        this.total = response.total;
222
+        this.loading = false;
223
+      });
224
+    },
225
+    // 取消按钮
226
+    cancel() {
227
+      this.open = false;
228
+      this.reset();
229
+    },
230
+    // 表单重置
231
+    reset() {
232
+      this.form = {
233
+        deviceId: null,
234
+        code: null,
235
+        type: null,
236
+        acquisitionTime: null,
237
+        cost: null,
238
+        expectLife: null,
239
+        series: null
240
+      };
241
+      this.resetForm("form");
242
+    },
243
+    /** 搜索按钮操作 */
244
+    handleQuery() {
245
+      this.queryParams.pageNum = 1;
246
+      this.getList();
247
+    },
248
+    /** 重置按钮操作 */
249
+    resetQuery() {
250
+      this.resetForm("queryForm");
251
+      this.handleQuery();
252
+    },
253
+    // 多选框选中数据
254
+    handleSelectionChange(selection) {
255
+      this.ids = selection.map(item => item.deviceId)
256
+      this.single = selection.length!==1
257
+      this.multiple = !selection.length
258
+    },
259
+    /** 新增按钮操作 */
260
+    handleAdd() {
261
+      this.reset();
262
+      this.open = true;
263
+      this.title = "添加cmc设备信息";
264
+    },
265
+    /** 修改按钮操作 */
266
+    handleUpdate(row) {
267
+      this.reset();
268
+      const deviceId = row.deviceId || this.ids
269
+      getDevice(deviceId).then(response => {
270
+        this.form = response.data;
271
+        this.open = true;
272
+        this.title = "修改cmc设备信息";
273
+      });
274
+    },
275
+    /** 提交按钮 */
276
+    submitForm() {
277
+      this.$refs["form"].validate(valid => {
278
+        if (valid) {
279
+          if (this.form.deviceId != null) {
280
+            updateDevice(this.form).then(response => {
281
+              this.$modal.msgSuccess("修改成功");
282
+              this.open = false;
283
+              this.getList();
284
+            });
285
+          } else {
286
+            addDevice(this.form).then(response => {
287
+              this.$modal.msgSuccess("新增成功");
288
+              this.open = false;
289
+              this.getList();
290
+            });
291
+          }
292
+        }
293
+      });
294
+    },
295
+    /** 删除按钮操作 */
296
+    handleDelete(row) {
297
+      const deviceIds = row.deviceId || this.ids;
298
+      this.$modal.confirm('是否确认删除cmc设备信息编号为"' + deviceIds + '"的数据项?').then(function() {
299
+        return delDevice(deviceIds);
300
+      }).then(() => {
301
+        this.getList();
302
+        this.$modal.msgSuccess("删除成功");
303
+      }).catch(() => {});
304
+    },
305
+    /** 导出按钮操作 */
306
+    handleExport() {
307
+      this.download('oa/device/export', {
308
+        ...this.queryParams
309
+      }, `device_${new Date().getTime()}.xlsx`)
310
+    }
311
+  }
312
+};
313
+</script>

Loading…
取消
儲存