|
|
@@ -330,28 +330,36 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
|
|
|
|
|
|
List<StatisticsBo> list = getEmployeeCheckedInfo(obj);
|
|
|
Map<Integer,StatisticsBo> listmap = new HashMap<>();
|
|
|
- for(StatisticsBo b:list){
|
|
|
- listmap.put(b.getUser().getId(),b);
|
|
|
+ for(StatisticsBo b:list) {
|
|
|
+ listmap.put(b.getUser().getId(), b);
|
|
|
}
|
|
|
|
|
|
|
|
|
+
|
|
|
List<StatisticsBean> listCheckedScore = statisticsDao.selectFeeStationCheckedScore(obj);
|
|
|
for (StatisticsBean sta : listCheckedScore) {
|
|
|
if (mapStationInfos.containsKey(sta.getDept_id())) {
|
|
|
|
|
|
- StatisticsBo bo= listmap.get(sta.getUser_id().intValue());
|
|
|
-
|
|
|
StatisticsBean statis = mapStationInfos.get(sta.getDept_id());
|
|
|
statis.setAll_check_score(statis.getAll_check_score() + sta.getScore());
|
|
|
- double sc = Double.parseDouble(bo.getCheck_score_avg());
|
|
|
- if (sc <= 15) {
|
|
|
- statis.setScore_fifteen(statis.getScore_fifteen() + 1);
|
|
|
- } else if (sc <= 50) {
|
|
|
- statis.setScore_fifty(statis.getScore_fifty() + 1);
|
|
|
- } else {
|
|
|
- statis.setScore_over_fifty(statis.getScore_over_fifty() + 1);
|
|
|
- }
|
|
|
- }
|
|
|
+
|
|
|
+ StatisticsBo b = listmap.get(sta.getUser_id().intValue());
|
|
|
+
|
|
|
+ if(b == null || b.getCheck_score_avg() == null || statis == null) continue;
|
|
|
+ double sc = Double.parseDouble(b.getCheck_score_avg());
|
|
|
+ if(sc==0){
|
|
|
+ statis.setScore(statis.getScore()+1);
|
|
|
+ }else
|
|
|
+ if (sc <= 15) {
|
|
|
+ statis.setScore_fifteen(statis.getScore_fifteen() + 1);
|
|
|
+ } else if (sc <= 50) {
|
|
|
+ statis.setScore_fifty(statis.getScore_fifty() + 1);
|
|
|
+ } else {
|
|
|
+ statis.setScore_over_fifty(statis.getScore_over_fifty() + 1);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -972,18 +980,64 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
|
|
|
// }
|
|
|
people_num = statisticsDao.selectCheckedNum(obj);
|
|
|
}
|
|
|
+ if(obj.getStart_date()==null && obj.getMth()!=null){
|
|
|
+ Calendar cal = Calendar.getInstance();
|
|
|
+ Date d = DateUtil.strParseDate(obj.getMth(), "yyyy/MM");
|
|
|
+ cal.setTime(d);
|
|
|
+ cal.set(cal.get(Calendar.YEAR), cal.get(Calendar.MONTH), 25, 23, 0, 0);
|
|
|
+ obj.setEnd_date(cal.getTime());
|
|
|
+ cal.add(Calendar.MONTH, -1);
|
|
|
+ obj.setStart_date(cal.getTime());
|
|
|
+ }
|
|
|
|
|
|
- List<StatisticsBean> userLostScoreInfoList = statisticsDao.selectCheckedScoreList(obj);
|
|
|
+// List<StatisticsBean> userLostScoreInfoList = statisticsDao.selectCheckedScoreList(obj);
|
|
|
|
|
|
- for (StatisticsBean sta : userLostScoreInfoList) {
|
|
|
- if (sta.getAll_check_score() <= 15) {
|
|
|
- returnObj.setScore_fifteen(returnObj.getScore_fifteen() + 1);
|
|
|
- } else if (sta.getAll_check_score() <= 50) {
|
|
|
- returnObj.setScore_fifty(returnObj.getScore_fifty() + 1);
|
|
|
- } else {
|
|
|
- returnObj.setScore_over_fifty(returnObj.getScore_over_fifty() + 1);
|
|
|
- }
|
|
|
- }
|
|
|
+ Long deptid=obj.getDept_id();
|
|
|
+ List<StatisticsBo> list = getEmployeeCheckedInfo(obj);
|
|
|
+ Map<Integer,StatisticsBo> listmap = new HashMap<>();
|
|
|
+ for(StatisticsBo b:list){
|
|
|
+ listmap.put(b.getUser().getId(),b);
|
|
|
+ }
|
|
|
+
|
|
|
+ List<StatisticsBean> listCheckedScore = statisticsDao.selectFeeStationCheckedScore(obj);
|
|
|
+ for (StatisticsBean sta : listCheckedScore) {
|
|
|
+ if (deptid!=null && sta.getDept_id().intValue()==deptid.intValue()) {
|
|
|
+
|
|
|
+ StatisticsBo b=listmap.get(sta.getUser_id().intValue());
|
|
|
+
|
|
|
+ if (b == null || b.getCheck_score_avg() == null ) continue;
|
|
|
+ double sc = Double.parseDouble(b.getCheck_score_avg());
|
|
|
+ if (sc == 0) {
|
|
|
+ returnObj.setScore(returnObj.getScore() + 1);
|
|
|
+ } else if (sc <= 15) {
|
|
|
+ returnObj.setScore_fifteen(returnObj.getScore_fifteen() + 1);
|
|
|
+ } else if (sc <= 50) {
|
|
|
+ returnObj.setScore_fifty(returnObj.getScore_fifty() + 1);
|
|
|
+ } else {
|
|
|
+ returnObj.setScore_over_fifty(returnObj.getScore_over_fifty() + 1);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+// for (StatisticsBean sta : userLostScoreInfoList) {
|
|
|
+// if (listmap.containsKey(sta.getUser_id().intValue())) {
|
|
|
+// StatisticsBo bo = listmap.get(sta.getUser_id().intValue());
|
|
|
+// double score = Double.parseDouble(bo.getCheck_score_avg());
|
|
|
+// if(score==0){
|
|
|
+// continue;
|
|
|
+// }else
|
|
|
+// if (score <= 15) {
|
|
|
+// returnObj.setScore_fifteen(returnObj.getScore_fifteen() + 1);
|
|
|
+// } else if (score <= 50 ) {
|
|
|
+// returnObj.setScore_fifty(returnObj.getScore_fifty() + 1);
|
|
|
+// } else {
|
|
|
+// returnObj.setScore_over_fifty(returnObj.getScore_over_fifty() + 1);
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
returnObj.setPeople_num(people_num);
|
|
|
|
|
|
return returnObj;
|