Bladeren bron

车辆设备使用次数统计

lamphua 7 maanden geleden
bovenliggende
commit
e9305b85ec

+ 50
- 6
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcCarController.java Bestand weergeven

1
 package com.ruoyi.web.controller.oa;
1
 package com.ruoyi.web.controller.oa;
2
 
2
 
3
 import java.math.BigDecimal;
3
 import java.math.BigDecimal;
4
+import java.text.ParseException;
4
 import java.text.SimpleDateFormat;
5
 import java.text.SimpleDateFormat;
5
-import java.util.List;
6
+import java.util.*;
7
+import java.util.stream.Collectors;
6
 import javax.servlet.http.HttpServletResponse;
8
 import javax.servlet.http.HttpServletResponse;
7
 
9
 
8
 import com.alibaba.fastjson2.JSONArray;
10
 import com.alibaba.fastjson2.JSONArray;
9
 import com.alibaba.fastjson2.JSONObject;
11
 import com.alibaba.fastjson2.JSONObject;
10
 import com.ruoyi.common.utils.DateUtils;
12
 import com.ruoyi.common.utils.DateUtils;
13
+import com.ruoyi.oa.domain.CmcCarApproval;
14
+import com.ruoyi.oa.domain.CmcProject;
15
+import com.ruoyi.oa.service.ICmcCarApprovalService;
11
 import com.ruoyi.system.service.ISysUserService;
16
 import com.ruoyi.system.service.ISysUserService;
12
 import org.springframework.beans.factory.annotation.Autowired;
17
 import org.springframework.beans.factory.annotation.Autowired;
13
 
18
 
42
     private ICmcCarService cmcCarService;
47
     private ICmcCarService cmcCarService;
43
 
48
 
44
     @Autowired
49
     @Autowired
45
-    private ISysUserService userService;
50
+    private ICmcCarApprovalService cmcCarApprovalService;
51
+
46
     /**
52
     /**
47
      * 查询cmc车辆信息列表
53
      * 查询cmc车辆信息列表
48
      */
54
      */
79
      * 获取设备统计信息
85
      * 获取设备统计信息
80
      */
86
      */
81
     @GetMapping(value = "/statistic")
87
     @GetMapping(value = "/statistic")
82
-    public AjaxResult getCarStatistic()
88
+    public AjaxResult getCarStatistic(CmcCarApproval cmcCarApproval) throws ParseException
83
     {
89
     {
84
         JSONObject jsonObject = new JSONObject();
90
         JSONObject jsonObject = new JSONObject();
91
+        JSONArray yearArray = new JSONArray();
92
+        JSONObject yearObject = new JSONObject();
85
         JSONArray statusArray = new JSONArray();
93
         JSONArray statusArray = new JSONArray();
86
         JSONObject statusObject = new JSONObject();
94
         JSONObject statusObject = new JSONObject();
95
+        JSONArray approvalArray = new JSONArray();
96
+        JSONObject approvalObject = new JSONObject();
87
         CmcCar cmcCar = new CmcCar();
97
         CmcCar cmcCar = new CmcCar();
88
         cmcCar.setStatus("0");
98
         cmcCar.setStatus("0");
89
-        statusObject.put("被领用", cmcCarService.selectCmcCarList(cmcCar).size());
99
+        statusObject.put("已派出", cmcCarService.selectCmcCarList(cmcCar).size());
90
         cmcCar.setStatus("1");
100
         cmcCar.setStatus("1");
91
-        statusObject.put("可用", cmcCarService.selectCmcCarList(cmcCar).size());
101
+        statusObject.put("可使用", cmcCarService.selectCmcCarList(cmcCar).size());
92
         cmcCar.setStatus("2");
102
         cmcCar.setStatus("2");
93
         statusObject.put("维修中", cmcCarService.selectCmcCarList(cmcCar).size());
103
         statusObject.put("维修中", cmcCarService.selectCmcCarList(cmcCar).size());
94
         cmcCar.setStatus("3");
104
         cmcCar.setStatus("3");
95
-        statusObject.put("已停用", cmcCarService.selectCmcCarList(cmcCar).size());
105
+        statusObject.put("已还车", cmcCarService.selectCmcCarList(cmcCar).size());
96
         cmcCar.setStatus("4");
106
         cmcCar.setStatus("4");
97
         statusObject.put("已报废", cmcCarService.selectCmcCarList(cmcCar).size());
107
         statusObject.put("已报废", cmcCarService.selectCmcCarList(cmcCar).size());
108
+        //整体
109
+        if (cmcCarApproval.getApplyDate() == null) {
110
+            //每年派车次数
111
+            for (int i = 2019; i <= Calendar.getInstance().get(Calendar.YEAR); i++) {
112
+                //总数
113
+                cmcCarApproval.setApplyDate(new SimpleDateFormat("yyyy").parse(String.valueOf(i)));
114
+                List<CmcCarApproval> yearList = cmcCarApprovalService.selectCmcCarApprovalList(cmcCarApproval);
115
+                yearObject.put(String.valueOf(i), yearList.size());
116
+            }
117
+            cmcCarApproval.setApplyDate(null);
118
+        }
119
+        //年度
120
+        else {
121
+            //输入年份派车次数
122
+            yearObject.put(new SimpleDateFormat("yyyy").format(cmcCarApproval.getApplyDate()), cmcCarApprovalService.selectCmcCarApprovalList(cmcCarApproval).size());
123
+        }
124
+        getCarApprovalStatistic(cmcCarApproval, approvalObject);
125
+        yearArray.add(yearObject);
98
         statusArray.add(statusObject);
126
         statusArray.add(statusObject);
127
+        approvalArray.add(approvalObject);
128
+        jsonObject.put("year", yearArray);
99
         jsonObject.put("status",statusArray);
129
         jsonObject.put("status",statusArray);
130
+        jsonObject.put("approval",approvalArray);
100
         return success(jsonObject);
131
         return success(jsonObject);
101
     }
132
     }
102
 
133
 
158
     {
189
     {
159
         return success(cmcCarService.deleteCmcCarByCarIds(carIds));
190
         return success(cmcCarService.deleteCmcCarByCarIds(carIds));
160
     }
191
     }
192
+
193
+    //各车辆派出次数
194
+    public void getCarApprovalStatistic(CmcCarApproval cmcCarApproval, JSONObject approvalObject) {
195
+        //类型太多,循环效率不高-直接用Java特性进行分组统计
196
+        Map<Object, Long> typeGroup = cmcCarApprovalService.selectCmcCarApprovalList(cmcCarApproval).stream().collect(Collectors.groupingBy(item -> Optional.ofNullable(item.getCars()), Collectors.counting()));
197
+        List<Map.Entry<Object, Long>> typeList = new ArrayList<>(typeGroup.entrySet());
198
+        typeList.sort(Map.Entry.comparingByValue());
199
+        typeList.forEach((item) -> {
200
+            if (item.getKey() != Optional.empty())
201
+                approvalObject.put(item.toString().substring(item.toString().indexOf("[") + 1, item.toString().indexOf("]")), item.getValue());
202
+        });
203
+    }
204
+
161
 }
205
 }

+ 1
- 2
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcContractController.java Bestand weergeven

83
 
83
 
84
             }
84
             }
85
             cmcContract.setSignDate(null);
85
             cmcContract.setSignDate(null);
86
-            getProjectSourceStatistic(cmcContract, sourceObject, cwAmountObject);
87
         }
86
         }
88
         else {
87
         else {
89
             //输入年份合同数量及金额
88
             //输入年份合同数量及金额
93
                 amount = amount.add(contract.getAmount());
92
                 amount = amount.add(contract.getAmount());
94
             }
93
             }
95
             amountObject.put(new SimpleDateFormat("yyyy").format(cmcContract.getSignDate()), amount);
94
             amountObject.put(new SimpleDateFormat("yyyy").format(cmcContract.getSignDate()), amount);
96
-            getProjectSourceStatistic(cmcContract, sourceObject, cwAmountObject);
97
         }
95
         }
96
+        getProjectSourceStatistic(cmcContract, sourceObject, cwAmountObject);
98
         yearArray.add(yearObject);
97
         yearArray.add(yearObject);
99
         sourceArray.add(sourceObject);
98
         sourceArray.add(sourceObject);
100
         amountArray.add(amountObject);
99
         amountArray.add(amountObject);

+ 48
- 5
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcDeviceController.java Bestand weergeven

1
 package com.ruoyi.web.controller.oa;
1
 package com.ruoyi.web.controller.oa;
2
 
2
 
3
 import java.math.BigDecimal;
3
 import java.math.BigDecimal;
4
+import java.text.ParseException;
4
 import java.text.SimpleDateFormat;
5
 import java.text.SimpleDateFormat;
5
-import java.util.List;
6
-import java.util.Map;
6
+import java.util.*;
7
+import java.util.stream.Collectors;
7
 import javax.servlet.http.HttpServletResponse;
8
 import javax.servlet.http.HttpServletResponse;
8
 
9
 
9
 import com.alibaba.fastjson2.JSONArray;
10
 import com.alibaba.fastjson2.JSONArray;
10
 import com.alibaba.fastjson2.JSONObject;
11
 import com.alibaba.fastjson2.JSONObject;
11
 import com.ruoyi.common.utils.DateUtils;
12
 import com.ruoyi.common.utils.DateUtils;
12
-import liquibase.pro.packaged.C;
13
+import com.ruoyi.oa.domain.CmcDeviceApproval;
14
+import com.ruoyi.oa.domain.CmcDevice;
15
+import com.ruoyi.oa.service.ICmcDeviceApprovalService;
13
 import org.springframework.beans.factory.annotation.Autowired;
16
 import org.springframework.beans.factory.annotation.Autowired;
14
 import org.springframework.web.bind.annotation.GetMapping;
17
 import org.springframework.web.bind.annotation.GetMapping;
15
 import org.springframework.web.bind.annotation.PostMapping;
18
 import org.springframework.web.bind.annotation.PostMapping;
23
 import com.ruoyi.common.core.controller.BaseController;
26
 import com.ruoyi.common.core.controller.BaseController;
24
 import com.ruoyi.common.core.domain.AjaxResult;
27
 import com.ruoyi.common.core.domain.AjaxResult;
25
 import com.ruoyi.common.enums.BusinessType;
28
 import com.ruoyi.common.enums.BusinessType;
26
-import com.ruoyi.oa.domain.CmcDevice;
27
 import com.ruoyi.oa.service.ICmcDeviceService;
29
 import com.ruoyi.oa.service.ICmcDeviceService;
28
 import com.ruoyi.common.utils.poi.ExcelUtil;
30
 import com.ruoyi.common.utils.poi.ExcelUtil;
29
 import com.ruoyi.common.core.page.TableDataInfo;
31
 import com.ruoyi.common.core.page.TableDataInfo;
41
     @Autowired
43
     @Autowired
42
     private ICmcDeviceService cmcDeviceService;
44
     private ICmcDeviceService cmcDeviceService;
43
 
45
 
46
+    @Autowired
47
+    private ICmcDeviceApprovalService cmcDeviceApprovalService;
48
+
44
     /**
49
     /**
45
      * 查询cmc设备信息列表
50
      * 查询cmc设备信息列表
46
      */
51
      */
87
      * 获取设备统计信息
92
      * 获取设备统计信息
88
      */
93
      */
89
     @GetMapping(value = "/statistic")
94
     @GetMapping(value = "/statistic")
90
-    public AjaxResult getDeviceStatistic()
95
+    public AjaxResult getDeviceStatistic(CmcDeviceApproval cmcDeviceApproval) throws ParseException
91
     {
96
     {
92
         JSONObject jsonObject = new JSONObject();
97
         JSONObject jsonObject = new JSONObject();
98
+        JSONArray yearArray = new JSONArray();
99
+        JSONObject yearObject = new JSONObject();
93
         JSONArray statusArray = new JSONArray();
100
         JSONArray statusArray = new JSONArray();
94
         JSONObject statusObject = new JSONObject();
101
         JSONObject statusObject = new JSONObject();
102
+        JSONArray approvalArray = new JSONArray();
103
+        JSONObject approvalObject = new JSONObject();
95
         CmcDevice cmcDevice = new CmcDevice();
104
         CmcDevice cmcDevice = new CmcDevice();
96
         cmcDevice.setStatus("0");
105
         cmcDevice.setStatus("0");
97
         statusObject.put("被领用", cmcDeviceService.selectCmcDeviceList(cmcDevice).size());
106
         statusObject.put("被领用", cmcDeviceService.selectCmcDeviceList(cmcDevice).size());
103
         statusObject.put("已停用", cmcDeviceService.selectCmcDeviceList(cmcDevice).size());
112
         statusObject.put("已停用", cmcDeviceService.selectCmcDeviceList(cmcDevice).size());
104
         cmcDevice.setStatus("4");
113
         cmcDevice.setStatus("4");
105
         statusObject.put("已报废", cmcDeviceService.selectCmcDeviceList(cmcDevice).size());
114
         statusObject.put("已报废", cmcDeviceService.selectCmcDeviceList(cmcDevice).size());
115
+        //整体
116
+        if (cmcDeviceApproval.getApplyDate() == null) {
117
+            //每年派车次数
118
+            for (int i = 2019; i <= Calendar.getInstance().get(Calendar.YEAR); i++) {
119
+                //总数
120
+                cmcDeviceApproval.setApplyDate(new SimpleDateFormat("yyyy").parse(String.valueOf(i)));
121
+                List<CmcDeviceApproval> yearList = cmcDeviceApprovalService.selectCmcDeviceApprovalList(cmcDeviceApproval);
122
+                yearObject.put(String.valueOf(i), yearList.size());
123
+            }
124
+            cmcDeviceApproval.setApplyDate(null);
125
+        }
126
+        //年度
127
+        else {
128
+            //输入年份派车次数
129
+            yearObject.put(new SimpleDateFormat("yyyy").format(cmcDeviceApproval.getApplyDate()), cmcDeviceApprovalService.selectCmcDeviceApprovalList(cmcDeviceApproval).size());
130
+        }
131
+        getDeviceApprovalStatistic(cmcDeviceApproval, approvalObject);
132
+        yearArray.add(yearObject);
106
         statusArray.add(statusObject);
133
         statusArray.add(statusObject);
134
+        approvalArray.add(approvalObject);
135
+        jsonObject.put("year", yearArray);
107
         jsonObject.put("status",statusArray);
136
         jsonObject.put("status",statusArray);
137
+        jsonObject.put("approval",approvalArray);
108
         return success(jsonObject);
138
         return success(jsonObject);
109
     }
139
     }
110
 
140
 
193
     {
223
     {
194
         return success(cmcDeviceService.deleteCmcDeviceByDeviceIds(deviceIds));
224
         return success(cmcDeviceService.deleteCmcDeviceByDeviceIds(deviceIds));
195
     }
225
     }
226
+
227
+    //各设备领用次数
228
+    public void getDeviceApprovalStatistic(CmcDeviceApproval cmcDeviceApproval, JSONObject approvalObject) {
229
+        //类型太多,循环效率不高-直接用Java特性进行分组统计
230
+        Map<Object, Long> typeGroup = cmcDeviceApprovalService.selectCmcDeviceApprovalList(cmcDeviceApproval).stream().collect(Collectors.groupingBy(item -> Optional.ofNullable(item.getDevices()), Collectors.counting()));
231
+        List<Map.Entry<Object, Long>> typeList = new ArrayList<>(typeGroup.entrySet());
232
+        typeList.sort(Map.Entry.comparingByValue());
233
+        typeList.forEach((item) -> {
234
+            if (item.getKey() != Optional.empty())
235
+                approvalObject.put(item.toString().substring(item.toString().indexOf("[") + 1, item.toString().indexOf("]")), item.getValue());
236
+        });
237
+    }
238
+
196
 }
239
 }

+ 5
- 8
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcProjectController.java Bestand weergeven

168
         JSONArray settleArray = new JSONArray();
168
         JSONArray settleArray = new JSONArray();
169
         JSONObject settleObject = new JSONObject();
169
         JSONObject settleObject = new JSONObject();
170
         //整体
170
         //整体
171
-        if (cmcProject.getProjectNumber() == null && cmcProject.getProjectSource() == null && cmcProject.getProjectType() == null && cmcProject.getUndertakingDept() == null) {
171
+        if (cmcProject.getProjectNumber() == null) {
172
             //每年项目数量
172
             //每年项目数量
173
             for (int i = 2019; i <= Calendar.getInstance().get(Calendar.YEAR); i++) {
173
             for (int i = 2019; i <= Calendar.getInstance().get(Calendar.YEAR); i++) {
174
                 //总数
174
                 //总数
194
                 settleObject.put(String.valueOf(i), settleList.size());
194
                 settleObject.put(String.valueOf(i), settleList.size());
195
             }
195
             }
196
             cmcProject.setProjectNumber(null);
196
             cmcProject.setProjectNumber(null);
197
-            getProjectSourceStatistic(cmcProject, sourceObject);
198
-            getProjectTypeStatistic(cmcProject, typeObject);
199
-            getProjectDeptStatistic(cmcProject, deptObject);
200
 
197
 
201
         }
198
         }
202
         //年度
199
         //年度
203
-        else if (cmcProject.getProjectNumber() != null && cmcProject.getProjectSource() == null && cmcProject.getProjectType() == null && cmcProject.getUndertakingDept() == null) {
200
+        else {
204
             //输入年份项目数量
201
             //输入年份项目数量
205
             List<CmcProject> yearList = cmcProjectService.selectCmcAllProjectList(cmcProject);
202
             List<CmcProject> yearList = cmcProjectService.selectCmcAllProjectList(cmcProject);
206
             //总数
203
             //总数
223
             List<CmcSettle> settleList = cmcSettleService.selectCmcSettleList(cmcSettle);
220
             List<CmcSettle> settleList = cmcSettleService.selectCmcSettleList(cmcSettle);
224
             settleObject.put(cmcProject.getProjectNumber(), settleList.size());
221
             settleObject.put(cmcProject.getProjectNumber(), settleList.size());
225
 
222
 
226
-            getProjectSourceStatistic(cmcProject, sourceObject);
227
-            getProjectTypeStatistic(cmcProject, typeObject);
228
-            getProjectDeptStatistic(cmcProject, deptObject);
229
         }
223
         }
224
+        getProjectSourceStatistic(cmcProject, sourceObject);
225
+        getProjectTypeStatistic(cmcProject, typeObject);
226
+        getProjectDeptStatistic(cmcProject, deptObject);
230
         yearArray.add(yearObject);
227
         yearArray.add(yearObject);
231
         sourceArray.add(sourceObject);
228
         sourceArray.add(sourceObject);
232
         deptArray.add(deptObject);
229
         deptArray.add(deptObject);

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

104
                 }
104
                 }
105
                 amountObject.put(String.valueOf(i), amount);
105
                 amountObject.put(String.valueOf(i), amount);
106
             }
106
             }
107
-            getProjectSourceStatistic(cmcSubContract, sourceObject, cwAmountObject);
107
+            cmcSubContract.setSignDate(null);
108
         }
108
         }
109
         else {
109
         else {
110
             //输入年份合同数量及金额
110
             //输入年份合同数量及金额
114
                 amount = amount.add(subContract.getSubAmount());
114
                 amount = amount.add(subContract.getSubAmount());
115
             }
115
             }
116
             amountObject.put(new SimpleDateFormat("yyyy").format(cmcSubContract.getSignDate()), amount);
116
             amountObject.put(new SimpleDateFormat("yyyy").format(cmcSubContract.getSignDate()), amount);
117
-            getProjectSourceStatistic(cmcSubContract, sourceObject, cwAmountObject);
118
         }
117
         }
118
+        getProjectSourceStatistic(cmcSubContract, sourceObject, cwAmountObject);
119
         yearArray.add(yearObject);
119
         yearArray.add(yearObject);
120
         sourceArray.add(sourceObject);
120
         sourceArray.add(sourceObject);
121
         amountArray.add(amountObject);
121
         amountArray.add(amountObject);

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

124
             <if test="projectId != null  and projectId != ''"> and ca.project_id = #{projectId}</if>
124
             <if test="projectId != null  and projectId != ''"> and ca.project_id = #{projectId}</if>
125
             <if test="applyReason != null  and applyReason != ''"> and ca.apply_reason = #{applyReason}</if>
125
             <if test="applyReason != null  and applyReason != ''"> and ca.apply_reason = #{applyReason}</if>
126
             <if test="passengers != null "> and ca.passengers = #{passengers}</if>
126
             <if test="passengers != null "> and ca.passengers = #{passengers}</if>
127
-            <if test="applyDate != null "> and ca.apply_date = #{beginDate}</if>
127
+            <if test="applyDate != null "> and YEAR(ca.apply_date) = YEAR(#{applyDate})</if>
128
             <if test="beginDate != null "> and ca.begin_date = #{beginDate}</if>
128
             <if test="beginDate != null "> and ca.begin_date = #{beginDate}</if>
129
             <if test="endDate != null "> and ca.end_date = #{endDate}</if>
129
             <if test="endDate != null "> and ca.end_date = #{endDate}</if>
130
             <if test="days != null "> and ca.days = #{days}</if>
130
             <if test="days != null "> and ca.days = #{days}</if>
139
             <if test="gmComment != null  and gmComment != ''"> and ca.gm_comment = #{gmComment}</if>
139
             <if test="gmComment != null  and gmComment != ''"> and ca.gm_comment = #{gmComment}</if>
140
             <if test="dispatcher != null "> and ca.dispatcher = #{dispatcher}</if>
140
             <if test="dispatcher != null "> and ca.dispatcher = #{dispatcher}</if>
141
             <if test="dispatchComment != null  and dispatchComment != ''"> and ca.dispatch_comment = #{dispatchComment}</if>
141
             <if test="dispatchComment != null  and dispatchComment != ''"> and ca.dispatch_comment = #{dispatchComment}</if>
142
+            <if test="dispatchTime != null "> and da.dispatch_time = #{dispatchTime}</if>
142
             <if test="estimateCost != null "> and ca.estimate_cost = #{estimateCost}</if>
143
             <if test="estimateCost != null "> and ca.estimate_cost = #{estimateCost}</if>
143
         </where>
144
         </where>
144
         order by ca.apply_date desc
145
         order by ca.apply_date desc

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

81
             <if test="repairDevices != null  and repairDevices != ''"> and find_in_set(#{repairDevices}, da.repair_devices)</if>
81
             <if test="repairDevices != null  and repairDevices != ''"> and find_in_set(#{repairDevices}, da.repair_devices)</if>
82
             <if test="projectId != null  and projectId != ''"> and da.project_id = #{projectId}</if>
82
             <if test="projectId != null  and projectId != ''"> and da.project_id = #{projectId}</if>
83
             <if test="applyReason != null  and applyReason != ''"> and da.apply_reason = #{applyReason}</if>
83
             <if test="applyReason != null  and applyReason != ''"> and da.apply_reason = #{applyReason}</if>
84
-            <if test="applyDate != null "> and da.apply_date = #{applyDate}</if>
84
+            <if test="applyDate != null "> and YEAR(da.apply_date) = YEAR(#{applyDate})</if>
85
             <if test="returnDate != null "> and da.return_date = #{returnDate}</if>
85
             <if test="returnDate != null "> and da.return_date = #{returnDate}</if>
86
             <if test="beginDate != null "> and da.begin_date = #{beginDate}</if>
86
             <if test="beginDate != null "> and da.begin_date = #{beginDate}</if>
87
             <if test="endDate != null "> and da.end_date = #{endDate}</if>
87
             <if test="endDate != null "> and da.end_date = #{endDate}</if>

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

86
             <if test="signRemark != null  and signRemark != ''"> and sc.sign_remark = #{signRemark}</if>
86
             <if test="signRemark != null  and signRemark != ''"> and sc.sign_remark = #{signRemark}</if>
87
             <if test="signScan != null  and signScan != ''"> and sc.sign_scan = #{signScan}</if>
87
             <if test="signScan != null  and signScan != ''"> and sc.sign_scan = #{signScan}</if>
88
             <if test="commentType != null  and commentType != ''"> and sc.comment_type = #{commentType}</if>
88
             <if test="commentType != null  and commentType != ''"> and sc.comment_type = #{commentType}</if>
89
+            <if test="projectSource != null  and projectSource != ''"> and p.project_source = #{projectSource}</if>
89
         </where>
90
         </where>
90
         group by sc.sub_contract_id
91
         group by sc.sub_contract_id
91
         order by sc.draft_time desc
92
         order by sc.draft_time desc

+ 3
- 3
oa-ui/src/views/oa/car/detail.vue Bestand weergeven

585
     },
585
     },
586
     statusTypeText(row) {
586
     statusTypeText(row) {
587
       if (row == '0') {
587
       if (row == '0') {
588
-        return '被领用'
588
+        return '已派出'
589
       }
589
       }
590
       if (row == '1') {
590
       if (row == '1') {
591
-        return '可用'
591
+        return '可使用'
592
       }
592
       }
593
       if (row == '2') {
593
       if (row == '2') {
594
         return '维修中'
594
         return '维修中'
595
       }
595
       }
596
       if (row == '3') {
596
       if (row == '3') {
597
-        return '已停用'
597
+        return '已还车'
598
       }
598
       }
599
       if (row == '4') {
599
       if (row == '4') {
600
         return '已报废'
600
         return '已报废'

+ 4
- 4
oa-ui/src/views/oa/car/index.vue Bestand weergeven

170
       total: 0,
170
       total: 0,
171
       // cmc车辆信息表格数据
171
       // cmc车辆信息表格数据
172
       carList: [],
172
       carList: [],
173
-      statusList: [{ id: '0', name: '被领用' }, { id: '1', name: '可领用' }, { id: '2', name: '维修中' }, { id: '3', name: '已停用' }, { id: '4', name: '已报废' }],
173
+      statusList: [{ id: '0', name: '已派出' }, { id: '1', name: '可使用' }, { id: '2', name: '维修中' }, { id: '3', name: '已还车' }, { id: '4', name: '已报废' }],
174
       // 弹出层标题
174
       // 弹出层标题
175
       title: "",
175
       title: "",
176
       // 是否显示弹出层
176
       // 是否显示弹出层
305
     },
305
     },
306
     statusTypeText(row) {
306
     statusTypeText(row) {
307
       if (row == '0') {
307
       if (row == '0') {
308
-        return '被领用'
308
+        return '已派出'
309
       }
309
       }
310
       if (row == '1') {
310
       if (row == '1') {
311
-        return '可用'
311
+        return '可使用'
312
       }
312
       }
313
       if (row == '2') {
313
       if (row == '2') {
314
         return '维修中'
314
         return '维修中'
315
       }
315
       }
316
       if (row == '3') {
316
       if (row == '3') {
317
-        return '已停用'
317
+        return '已还车'
318
       }
318
       }
319
       if (row == '4') {
319
       if (row == '4') {
320
         return '已报废'
320
         return '已报废'

Laden…
Annuleren
Opslaan