| | |
| | | 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; |
| | | } |
| | | } |
| | |
| | | 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; |