2 Commits 5ff66aa45b ... f05cf16ce5

Author SHA1 Message Date
  chenshudong f05cf16ce5 Merge branch 'master' into feature/dev 3 days ago
  simonlll c667b73568 修复抽问抽答完成趋势对比-TEAM类型scopeType未处理导致返回大队级别数据 3 days ago

+ 6 - 1
airport-admin/src/main/java/com/sundot/airport/web/controller/exam/DailyExamComparisonController.java

@@ -58,7 +58,7 @@ public class DailyExamComparisonController {
58
      * @param year               年份,默认当前年
58
      * @param year               年份,默认当前年
59
      * @param quarter            季度 1-4,dateRangeQueryType=QUARTER 时有效
59
      * @param quarter            季度 1-4,dateRangeQueryType=QUARTER 时有效
60
      * @param month              月份 1-12,dateRangeQueryType=MONTH 时有效
60
      * @param month              月份 1-12,dateRangeQueryType=MONTH 时有效
61
-     * @param scopeType          统计范围:STATION/BRIGADE/MANAGER/USER,不传则按登录角色自动判断
61
+     * @param scopeType          统计范围:STATION/BRIGADE/MANAGER/TEAM/USER,不传则按登录角色自动判断
62
      * @param scopeId            统计范围ID(deptId 或 userId)
62
      * @param scopeId            统计范围ID(deptId 或 userId)
63
      */
63
      */
64
     @GetMapping("/completion-comparison")
64
     @GetMapping("/completion-comparison")
@@ -228,6 +228,11 @@ public class DailyExamComparisonController {
228
         } else if ("BRIGADE".equals(scopeType) && scopeId != null) {
228
         } else if ("BRIGADE".equals(scopeType) && scopeId != null) {
229
             return buildBrigadeSeriesList(scopeId, periods, hasChain, currentIdx);
229
             return buildBrigadeSeriesList(scopeId, periods, hasChain, currentIdx);
230
 
230
 
231
+        } else if ("TEAM".equals(scopeType) && scopeId != null) {
232
+            List<Integer> counts = countByPeriods(periods, r -> countCompletedByDepartmentId(scopeId, r[0], r[1]));
233
+            return Collections.singletonList(
234
+                    buildSeriesItem(getDeptName(scopeId), scopeId, null, counts, currentIdx, hasChain));
235
+
231
         } else {
236
         } else {
232
             Long stationDeptId = ("STATION".equals(scopeType) && scopeId != null) ? scopeId : userDeptId;
237
             Long stationDeptId = ("STATION".equals(scopeType) && scopeId != null) ? scopeId : userDeptId;
233
             if (isStation || "STATION".equals(scopeType)) {
238
             if (isStation || "STATION".equals(scopeType)) {