Browse Source

8-评比排名更新字段

csg6 10 months ago
parent
commit
6fbe79380a

+ 11 - 9
ruoyi-postcheck/src/main/java/com/ruoyi/postCheck/controller/PostCheckedHomePageController.java

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

+ 9 - 4
ruoyi-postcheck/src/main/java/com/ruoyi/postCheck/domain/homePage/AssessmentRatingView.java

@@ -25,11 +25,16 @@ public class AssessmentRatingView implements Serializable {
25
     @ApiModelProperty("部门名称")
25
     @ApiModelProperty("部门名称")
26
     private String deptName;
26
     private String deptName;
27
 
27
 
28
-    @ApiModelProperty("岗位ID")
29
-    private Long postId;
28
+//    @ApiModelProperty("岗位ID")
29
+//    private Long postId;
30
+//    @ApiModelProperty("岗位名称")
31
+//    private String postName;
32
+
33
+    @ApiModelProperty("岗位数量")
34
+    private Integer postCount;
35
+
36
+
30
 
37
 
31
-    @ApiModelProperty("岗位名称")
32
-    private String postName;
33
 
38
 
34
     @ApiModelProperty("得分")
39
     @ApiModelProperty("得分")
35
     private BigDecimal score;
40
     private BigDecimal score;