|
|
@@ -170,28 +170,28 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
|
|
|
|
|
|
}
|
|
|
|
|
|
- List<TaskAndScore> taskAndScores = GET_M_SCORE(obj.getStart_date(), obj.getEnd_date());
|
|
|
- for (StatisticsBo b : statisticBoMap.values()) {
|
|
|
- // 班长扣分加上成员的扣分
|
|
|
- for (TaskAndScore s : taskAndScores) {
|
|
|
- if (s.getMonitor_user_id().intValue() == b.getUser().getId().intValue()
|
|
|
- && s.getCheck_item_score() != null
|
|
|
- && ((s.getChecked_person1() == null
|
|
|
- && s.getChecked_person().intValue() != s.getMonitor_user_id().intValue())
|
|
|
- || (s.getChecked_person1() != null
|
|
|
- && s.getChecked_person1().intValue() != s.getMonitor_user_id().intValue()))) {
|
|
|
- b.setCheck_all_m_score(b.getCheck_all_m_score() + s.getCheck_item_score());
|
|
|
- }
|
|
|
-
|
|
|
- if (s.getMonitor_user_id().intValue() == b.getUser().getId().intValue()
|
|
|
- && ((s.getChecked_person1() == null
|
|
|
- && s.getChecked_person().intValue() != s.getMonitor_user_id().intValue())
|
|
|
- || (s.getChecked_person1() != null
|
|
|
- && s.getChecked_person1().intValue() != s.getMonitor_user_id().intValue()))) {
|
|
|
- b.setChecked_m_num(b.getChecked_m_num() + 1);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+// List<TaskAndScore> taskAndScores = GET_M_SCORE(obj.getStart_date(), obj.getEnd_date());
|
|
|
+// for (StatisticsBo b : statisticBoMap.values()) {
|
|
|
+// // 班长扣分加上成员的扣分
|
|
|
+// for (TaskAndScore s : taskAndScores) {
|
|
|
+// if (s.getMonitor_user_id().intValue() == b.getUser().getId().intValue()
|
|
|
+// && s.getCheck_item_score() != null
|
|
|
+// && ((s.getChecked_person1() == null
|
|
|
+// && s.getChecked_person().intValue() != s.getMonitor_user_id().intValue())
|
|
|
+// || (s.getChecked_person1() != null
|
|
|
+// && s.getChecked_person1().intValue() != s.getMonitor_user_id().intValue()))) {
|
|
|
+// b.setCheck_all_m_score(b.getCheck_all_m_score() + s.getCheck_item_score());
|
|
|
+// }
|
|
|
+//
|
|
|
+// if (s.getMonitor_user_id().intValue() == b.getUser().getId().intValue()
|
|
|
+// && ((s.getChecked_person1() == null
|
|
|
+// && s.getChecked_person().intValue() != s.getMonitor_user_id().intValue())
|
|
|
+// || (s.getChecked_person1() != null
|
|
|
+// && s.getChecked_person1().intValue() != s.getMonitor_user_id().intValue()))) {
|
|
|
+// b.setChecked_m_num(b.getChecked_m_num() + 1);
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
|
|
|
List<StatisticsBo> lists = new ArrayList<>(statisticBoMap.values());
|
|
|
// 进行排序
|
|
|
@@ -1195,30 +1195,31 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
|
|
|
u.setPosition_name(CacheUtil.getJobnameFromMap(new Long(u.getPositionid())));
|
|
|
}
|
|
|
|
|
|
- Map<Long, StatisticsBo> masterMap = getMasterNumAndScore(obj.getMth());
|
|
|
- for (StatisticsBean statisticsBean : userLostScoreInfoList) {
|
|
|
- if (statisticBoMap.containsKey(statisticsBean.getUser_id())) {
|
|
|
- StatisticsBean tmp = statisticBoMap.get(statisticsBean.getUser_id());
|
|
|
- tmp.setAll_check_score(statisticsBean.getAll_check_score());
|
|
|
- tmp.setChecked_num(statisticsBean.getChecked_num());
|
|
|
- }
|
|
|
- // 计算班长总扣分和总稽查次数
|
|
|
- if (masterMap.get(statisticsBean.getUser_id()) != null) {
|
|
|
- StatisticsBean tmp = statisticBoMap.get(statisticsBean.getUser_id());
|
|
|
- StatisticsBo msb = masterMap.get(statisticsBean.getUser_id());
|
|
|
- if(tmp==null) continue;
|
|
|
- tmp.setAll_check_score(statisticsBean.getAll_check_score() + (msb!=null?msb.getCheck_all_m_score():0));
|
|
|
- tmp.setChecked_num(statisticsBean.getChecked_num() + (msb!=null?msb.getChecked_m_num():0));
|
|
|
- }
|
|
|
- }
|
|
|
+// Map<Long, StatisticsBo> masterMap = getMasterNumAndScore(obj.getMth());
|
|
|
+// for (StatisticsBean statisticsBean : userLostScoreInfoList) {
|
|
|
+// if (statisticBoMap.containsKey(statisticsBean.getUser_id())) {
|
|
|
+// StatisticsBean tmp = statisticBoMap.get(statisticsBean.getUser_id());
|
|
|
+// tmp.setAll_check_score(statisticsBean.getAll_check_score());
|
|
|
+// tmp.setChecked_num(statisticsBean.getChecked_num());
|
|
|
+// }
|
|
|
+// // 计算班长总扣分和总稽查次数
|
|
|
+// if (masterMap.get(statisticsBean.getUser_id()) != null) {
|
|
|
+// StatisticsBean tmp = statisticBoMap.get(statisticsBean.getUser_id());
|
|
|
+// StatisticsBo msb = masterMap.get(statisticsBean.getUser_id());
|
|
|
+// if(tmp==null) continue;
|
|
|
+// tmp.setAll_check_score(statisticsBean.getAll_check_score() + (msb!=null?msb.getCheck_all_m_score():0));
|
|
|
+// tmp.setChecked_num(statisticsBean.getChecked_num() + (msb!=null?msb.getChecked_m_num():0));
|
|
|
+// }
|
|
|
+// }
|
|
|
|
|
|
List<StatisticsBean> lists = new ArrayList<>();
|
|
|
for (StatisticsBean bean : statisticBoMap.values()) {
|
|
|
if (bean.getChecked_num() != 0) {
|
|
|
lists.add(bean);
|
|
|
- } else if (masterMap.get(bean.getUser_id()) != null) {
|
|
|
-
|
|
|
}
|
|
|
+// else if (masterMap.get(bean.getUser_id()) != null) {
|
|
|
+//
|
|
|
+// }
|
|
|
}
|
|
|
// 进行排序
|
|
|
lists.sort(new Comparator<StatisticsBean>() {
|
|
|
@@ -1317,14 +1318,14 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
|
|
|
public List<StatisticsBean> getOneFSCheckedInfo(StatisticsBean obj) {
|
|
|
|
|
|
List<StatisticsBean> datas = statisticsDao.selectOneCheckedInfoData(obj);
|
|
|
- for (StatisticsBean d : datas) {
|
|
|
- Map<Long, StatisticsBo> p = getMasterNumAndScore(d.getMth());
|
|
|
- if (p != null && p.get(obj.getUser_id()) != null) {
|
|
|
- StatisticsBo b = p.get(obj.getUser_id());
|
|
|
- d.setChecked_num(b.getChecked_m_num() + d.getChecked_num());
|
|
|
- d.setAll_check_score(d.getAll_check_score() + b.getCheck_all_m_score());
|
|
|
- }
|
|
|
- }
|
|
|
+// for (StatisticsBean d : datas) {
|
|
|
+// Map<Long, StatisticsBo> p = getMasterNumAndScore(d.getMth());
|
|
|
+// if (p != null && p.get(obj.getUser_id()) != null) {
|
|
|
+// StatisticsBo b = p.get(obj.getUser_id());
|
|
|
+// d.setChecked_num(b.getChecked_m_num() + d.getChecked_num());
|
|
|
+// d.setAll_check_score(d.getAll_check_score() + b.getCheck_all_m_score());
|
|
|
+// }
|
|
|
+// }
|
|
|
|
|
|
return datas;
|
|
|
}
|
|
|
@@ -1784,56 +1785,56 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
|
|
|
exportExcel("稽查人员工作量统计", "check_info", map, resp);
|
|
|
}
|
|
|
|
|
|
- /*
|
|
|
- * 获取班长班组内总得分和扣分
|
|
|
- */
|
|
|
- private Map<Long, StatisticsBo> getMasterNumAndScore(String month) {
|
|
|
- TaskAndScore temp = new TaskAndScore();
|
|
|
- Calendar cal = Calendar.getInstance();
|
|
|
- Date d = DateUtil.strParseDate(month, "yyyy/MM");
|
|
|
- cal.setTime(d);
|
|
|
- cal.set(cal.get(Calendar.YEAR), cal.get(Calendar.MONTH), 25, 23, 0, 0);
|
|
|
- temp.setEnd_time(cal.getTime());
|
|
|
- cal.add(Calendar.MONTH, -1);
|
|
|
- temp.setStart_time(cal.getTime());
|
|
|
-
|
|
|
- List<TaskAndScore> taskAndScores = statisticsDao.selectMList(temp);
|
|
|
- Map<Long, StatisticsBo> masterMap = new HashMap<Long, StatisticsBo>();
|
|
|
- for (TaskAndScore score : taskAndScores) {
|
|
|
- if (!masterMap.containsKey(score.getMonitor_user_id())) {
|
|
|
- masterMap.put(score.getMonitor_user_id(), new StatisticsBo());
|
|
|
- }
|
|
|
- StatisticsBo sb = masterMap.get(score.getMonitor_user_id());
|
|
|
-
|
|
|
- if (score.getCheck_item_score() != null && ((score.getChecked_person1() == null
|
|
|
- && score.getChecked_person().intValue() != score.getMonitor_user_id().intValue())
|
|
|
- || (score.getChecked_person1() != null
|
|
|
- && score.getChecked_person1().intValue() != score.getMonitor_user_id().intValue()))) {
|
|
|
- sb.setCheck_all_m_score(sb.getCheck_all_m_score() + score.getCheck_item_score());
|
|
|
- }
|
|
|
-
|
|
|
- if (((score.getChecked_person1() == null
|
|
|
- && score.getChecked_person().intValue() != score.getMonitor_user_id().intValue())
|
|
|
- || (score.getChecked_person1() != null
|
|
|
- && score.getChecked_person1().intValue() != score.getMonitor_user_id().intValue()))) {
|
|
|
- sb.setChecked_m_num(sb.getChecked_m_num() + 1);
|
|
|
- }
|
|
|
- //
|
|
|
- //
|
|
|
- // sb.setCheck_all_m_score(sb.getCheck_all_m_score()+(score.getCheck_item_score()==null?0:score.getCheck_item_score()));
|
|
|
- // sb.setChecked_m_num(sb.getChecked_m_num()+1);
|
|
|
- }
|
|
|
- return masterMap;
|
|
|
- }
|
|
|
-
|
|
|
- private List<TaskAndScore> GET_M_SCORE(Date start_time, Date end_time) {
|
|
|
- TaskAndScore temp = new TaskAndScore();
|
|
|
- temp.setStart_time(start_time);
|
|
|
- temp.setEnd_time(end_time);
|
|
|
-
|
|
|
- List<TaskAndScore> taskAndScores = statisticsDao.selectMList(temp);
|
|
|
- return taskAndScores;
|
|
|
- }
|
|
|
+// /*
|
|
|
+// * 获取班长班组内总得分和扣分
|
|
|
+// */
|
|
|
+// private Map<Long, StatisticsBo> getMasterNumAndScore(String month) {
|
|
|
+// TaskAndScore temp = new TaskAndScore();
|
|
|
+// Calendar cal = Calendar.getInstance();
|
|
|
+// Date d = DateUtil.strParseDate(month, "yyyy/MM");
|
|
|
+// cal.setTime(d);
|
|
|
+// cal.set(cal.get(Calendar.YEAR), cal.get(Calendar.MONTH), 25, 23, 0, 0);
|
|
|
+// temp.setEnd_time(cal.getTime());
|
|
|
+// cal.add(Calendar.MONTH, -1);
|
|
|
+// temp.setStart_time(cal.getTime());
|
|
|
+//
|
|
|
+// List<TaskAndScore> taskAndScores = statisticsDao.selectMList(temp);
|
|
|
+// Map<Long, StatisticsBo> masterMap = new HashMap<Long, StatisticsBo>();
|
|
|
+// for (TaskAndScore score : taskAndScores) {
|
|
|
+// if (!masterMap.containsKey(score.getMonitor_user_id())) {
|
|
|
+// masterMap.put(score.getMonitor_user_id(), new StatisticsBo());
|
|
|
+// }
|
|
|
+// StatisticsBo sb = masterMap.get(score.getMonitor_user_id());
|
|
|
+//
|
|
|
+// if (score.getCheck_item_score() != null && ((score.getChecked_person1() == null
|
|
|
+// && score.getChecked_person().intValue() != score.getMonitor_user_id().intValue())
|
|
|
+// || (score.getChecked_person1() != null
|
|
|
+// && score.getChecked_person1().intValue() != score.getMonitor_user_id().intValue()))) {
|
|
|
+// sb.setCheck_all_m_score(sb.getCheck_all_m_score() + score.getCheck_item_score());
|
|
|
+// }
|
|
|
+//
|
|
|
+// if (((score.getChecked_person1() == null
|
|
|
+// && score.getChecked_person().intValue() != score.getMonitor_user_id().intValue())
|
|
|
+// || (score.getChecked_person1() != null
|
|
|
+// && score.getChecked_person1().intValue() != score.getMonitor_user_id().intValue()))) {
|
|
|
+// sb.setChecked_m_num(sb.getChecked_m_num() + 1);
|
|
|
+// }
|
|
|
+// //
|
|
|
+// //
|
|
|
+// // sb.setCheck_all_m_score(sb.getCheck_all_m_score()+(score.getCheck_item_score()==null?0:score.getCheck_item_score()));
|
|
|
+// // sb.setChecked_m_num(sb.getChecked_m_num()+1);
|
|
|
+// }
|
|
|
+// return masterMap;
|
|
|
+// }
|
|
|
+
|
|
|
+// private List<TaskAndScore> GET_M_SCORE(Date start_time, Date end_time) {
|
|
|
+// TaskAndScore temp = new TaskAndScore();
|
|
|
+// temp.setStart_time(start_time);
|
|
|
+// temp.setEnd_time(end_time);
|
|
|
+//
|
|
|
+// List<TaskAndScore> taskAndScores = statisticsDao.selectMList(temp);
|
|
|
+// return taskAndScores;
|
|
|
+// }
|
|
|
|
|
|
@Override
|
|
|
public List<StatisticsBean> getOperationInfo(StatisticsBean obj) {
|