fuliqi
2024-12-02 316d54ecdc49ce1625b429f3d0bdca54af647e74
ycl-server/src/main/java/com/ycl/platform/service/impl/CheckScoreServiceImpl.java
@@ -187,16 +187,22 @@
                checkScore.setEndDate(calendar.getTime());
                calendar.set(Calendar.DAY_OF_MONTH, 1);
                checkScore.setStartDate(calendar.getTime());
                if(checkScore.getExamineTag() == 0) checkScore.setExamineTag(Integer.valueOf(CheckConstants.Examine_Tag_Province+""));
                if(checkScore.getExamineTag() == 2) checkScore.setExamineTag(Integer.valueOf(CheckConstants.Examine_Tag_County+""));
                if(checkScore.getExamineTag() == 4) checkScore.setExamineTag(Integer.valueOf(CheckConstants.Examine_Tag_Dept+""));
                if (checkScore.getExamineTag() == 0)
                    checkScore.setExamineTag(Integer.valueOf(CheckConstants.Examine_Tag_Province + ""));
                if (checkScore.getExamineTag() == 2)
                    checkScore.setExamineTag(Integer.valueOf(CheckConstants.Examine_Tag_County + ""));
                if (checkScore.getExamineTag() == 4)
                    checkScore.setExamineTag(Integer.valueOf(CheckConstants.Examine_Tag_Dept + ""));
                break;
            case 1, 3, 5:
                checkScore.setStartDate(DateUtils.getQuarterStart(calendar).getTime());
                checkScore.setEndDate(DateUtils.getQuarterEnd(calendar).getTime());
                if(checkScore.getExamineTag() == 1) checkScore.setExamineTag(Integer.valueOf(CheckConstants.Examine_Tag_Province+""));
                if(checkScore.getExamineTag() == 3) checkScore.setExamineTag(Integer.valueOf(CheckConstants.Examine_Tag_County+""));
                if(checkScore.getExamineTag() == 5) checkScore.setExamineTag(Integer.valueOf(CheckConstants.Examine_Tag_Dept+""));
                if (checkScore.getExamineTag() == 1)
                    checkScore.setExamineTag(Integer.valueOf(CheckConstants.Examine_Tag_Province + ""));
                if (checkScore.getExamineTag() == 3)
                    checkScore.setExamineTag(Integer.valueOf(CheckConstants.Examine_Tag_County + ""));
                if (checkScore.getExamineTag() == 5)
                    checkScore.setExamineTag(Integer.valueOf(CheckConstants.Examine_Tag_Dept + ""));
                break;
        }
    }
@@ -540,13 +546,21 @@
        Map<String, Map<String, Object>> resultMap = new HashMap<>();
        for (AreaDeptEnum value : AreaDeptEnum.values()) {
            Map<String, Object> map = new HashMap<>();
            map.put("score", 0);
            map.put("video", 0);
            map.put("car", 0);
            map.put("face", 0);
            resultMap.put(value.getName(), map);
        }
        //填充各个区县数据
        for (CheckScore checkScore : dashboard) {
            Map<String, Object> map = new HashMap<>();
            map.put("score", checkScore.getScore().setScale(1,RoundingMode.HALF_UP));
            if (CheckConstants.Rule_Category_Video.equals(checkScore.getExamineCategory())) {
                map.put("video", checkScore.getScore().setScale(1, RoundingMode.HALF_UP));
            } else if (CheckConstants.Rule_Category_Car.equals(checkScore.getExamineCategory())) {
                map.put("car", checkScore.getScore().setScale(1, RoundingMode.HALF_UP));
            } else if (CheckConstants.Rule_Category_Face.equals(checkScore.getExamineCategory())) {
                map.put("face", checkScore.getScore().setScale(1, RoundingMode.HALF_UP));
            }
            resultMap.put(checkScore.getDeptName(), map);
        }
        return resultMap;