|
@@ -2,6 +2,7 @@ package com.ruoyi.postCheck.controller;
|
2
|
2
|
|
3
|
3
|
import com.ruoyi.common.core.controller.BaseController;
|
4
|
4
|
import com.ruoyi.common.core.domain.AjaxResult;
|
|
5
|
+import com.ruoyi.common.utils.Arith;
|
5
|
6
|
import com.ruoyi.postCheck.domain.homePage.*;
|
6
|
7
|
import com.ruoyi.postCheck.service.IPostCheckedProblemService;
|
7
|
8
|
import io.swagger.annotations.Api;
|
|
@@ -84,7 +85,7 @@ public class PostCheckedHomePageController extends BaseController {
|
84
|
85
|
// 最好给前端定义一个对象,用Map也可以
|
85
|
86
|
List<Map<Integer, BigDecimal>> dataList = new ArrayList<>();
|
86
|
87
|
Map<Integer, BigDecimal> data1 = new HashMap<>();
|
87
|
|
- data1.put(0, new BigDecimal(0.9));
|
|
88
|
+ data1.put(0, new BigDecimal(Arith.round(new BigDecimal(0.9).doubleValue(), 2)));
|
88
|
89
|
// data1.put(1, new BigDecimal(0.95));//完整问题
|
89
|
90
|
// data1.put(2, new BigDecimal(0.88));//有效性问题
|
90
|
91
|
// data1.put(3, new BigDecimal(0.86));//适宜性问题
|
|
@@ -92,7 +93,7 @@ public class PostCheckedHomePageController extends BaseController {
|
92
|
93
|
|
93
|
94
|
Map<Integer, BigDecimal> data2 = new HashMap<>();
|
94
|
95
|
// data2.put(0, new BigDecimal(0.9));
|
95
|
|
- data2.put(1, new BigDecimal(0.95));//完整问题
|
|
96
|
+ data2.put(1, new BigDecimal(Arith.round(new BigDecimal(0.95).doubleValue(), 2)));//完整问题
|
96
|
97
|
// data2.put(2, new BigDecimal(0.88));//有效性问题
|
97
|
98
|
// data2.put(3, new BigDecimal(0.86));//适宜性问题
|
98
|
99
|
dataList.add(data2);
|
|
@@ -101,7 +102,7 @@ public class PostCheckedHomePageController extends BaseController {
|
101
|
102
|
Map<Integer, BigDecimal> data3 = new HashMap<>();
|
102
|
103
|
// data3.put(0, new BigDecimal(0.9));
|
103
|
104
|
// data3.put(1, new BigDecimal(0.95));//完整问题
|
104
|
|
- data3.put(2, new BigDecimal(0.88));//有效性问题
|
|
105
|
+ data3.put(2, new BigDecimal(Arith.round(new BigDecimal(0.88).doubleValue(), 2)));//有效性问题
|
105
|
106
|
// data3.put(3, new BigDecimal(0.86));//适宜性问题
|
106
|
107
|
dataList.add(data3);
|
107
|
108
|
|
|
@@ -109,7 +110,7 @@ public class PostCheckedHomePageController extends BaseController {
|
109
|
110
|
// data4.put(0, new BigDecimal(0.9));
|
110
|
111
|
// data4.put(1, new BigDecimal(0.95));//完整问题
|
111
|
112
|
// data4.put(2, new BigDecimal(0.88));//有效性问题
|
112
|
|
- data4.put(3, new BigDecimal(0.86));//适宜性问题
|
|
113
|
+ data4.put(3, new BigDecimal(Arith.round(new BigDecimal(0.86).doubleValue(), 2)));//适宜性问题
|
113
|
114
|
dataList.add(data4);
|
114
|
115
|
return success(dataList);
|
115
|
116
|
}
|
|
@@ -127,7 +128,7 @@ public class PostCheckedHomePageController extends BaseController {
|
127
|
128
|
data1.setDeptName("测试部门V1");
|
128
|
129
|
data1.setProblemTotal(10);
|
129
|
130
|
data1.setProblemComplete(9);
|
130
|
|
- data1.setProblemRectificationRate(new BigDecimal(0.9));
|
|
131
|
+ data1.setProblemRectificationRate(new BigDecimal(Arith.round(new BigDecimal(0.9).doubleValue(), 2)));
|
131
|
132
|
dataList.add(data1);
|
132
|
133
|
|
133
|
134
|
|
|
@@ -136,7 +137,7 @@ public class PostCheckedHomePageController extends BaseController {
|
136
|
137
|
data2.setDeptName("测试部门V2");
|
137
|
138
|
data2.setProblemTotal(8);
|
138
|
139
|
data2.setProblemComplete(4);
|
139
|
|
- data2.setProblemRectificationRate(new BigDecimal(0.5));
|
|
140
|
+ data2.setProblemRectificationRate(new BigDecimal(Arith.round(new BigDecimal(0.5).doubleValue(), 2)));
|
140
|
141
|
dataList.add(data2);
|
141
|
142
|
|
142
|
143
|
return success(dataList);
|
|
@@ -224,9 +225,10 @@ public class PostCheckedHomePageController extends BaseController {
|
224
|
225
|
data1.setRating(1);
|
225
|
226
|
data1.setDeptId(100l);
|
226
|
227
|
data1.setDeptName("测试部门V1");
|
227
|
|
- data1.setPostId(1l);
|
228
|
|
- data1.setPostName("内操岗位");
|
229
|
|
- data1.setScore(new BigDecimal(99.98));
|
|
228
|
+// data1.setPostId(1l);
|
|
229
|
+// data1.setPostName("内操岗位");
|
|
230
|
+ data1.setPostCount(6);
|
|
231
|
+ data1.setScore(new BigDecimal(Arith.round(new BigDecimal(99.98).doubleValue(), 2)));
|
230
|
232
|
dataList.add(data1);
|
231
|
233
|
return success(dataList);
|
232
|
234
|
}
|