|
|
@@ -1,12 +1,7 @@
|
|
|
package com.xintong.visualinspection.visuallnspection_qzd.service.impl;
|
|
|
|
|
|
import com.alibaba.dubbo.config.annotation.Reference;
|
|
|
-import com.xintong.visualinspection.bean.CheckTaskPeriod;
|
|
|
-import com.xintong.visualinspection.bean.FeeStation;
|
|
|
-import com.xintong.visualinspection.bean.FwqDeptStatistic;
|
|
|
-import com.xintong.visualinspection.bean.FwqStatisticsBean;
|
|
|
-import com.xintong.visualinspection.bean.Item;
|
|
|
-import com.xintong.visualinspection.bean.Organ;
|
|
|
+import com.xintong.visualinspection.bean.*;
|
|
|
import com.xintong.visualinspection.service.CommonService;
|
|
|
import com.xintong.visualinspection.visuallnspection_qzd.dao.QzdCheckDeptStatisticsDao;
|
|
|
import com.xintong.visualinspection.visuallnspection_qzd.dao.QzdStatisticsDao;
|
|
|
@@ -61,6 +56,7 @@ public class StatisticsService_FImpl implements StatisticsService_F {
|
|
|
|
|
|
public List<FwqStatisticsBean> getOperationInfo(FwqStatisticsBean obj) {
|
|
|
|
|
|
+ // 获得所有服务区数据
|
|
|
List<FeeStation> saList = commonService.getAllDeptByLayer("WG");
|
|
|
Map<Long, FwqStatisticsBean> mapStationInfos = new HashMap<>();
|
|
|
if (obj.getStart_date() != null && obj.getEnd_date() != null) {
|
|
|
@@ -69,8 +65,9 @@ public class StatisticsService_FImpl implements StatisticsService_F {
|
|
|
obj.setPeriod_id(p.getId());
|
|
|
}
|
|
|
}
|
|
|
- int sort = 1;
|
|
|
+ int number = 0;
|
|
|
for (FeeStation sta : saList) {
|
|
|
+ number++;
|
|
|
FwqStatisticsBean obj2 = new FwqStatisticsBean();
|
|
|
obj2.setDept_id(Long.valueOf(sta.getDeptid()));
|
|
|
obj2.setName(sta.getName());
|
|
|
@@ -80,10 +77,10 @@ public class StatisticsService_FImpl implements StatisticsService_F {
|
|
|
obj3.setStart_date(obj.getStart_date());
|
|
|
obj3.setEnd_date(obj.getEnd_date());
|
|
|
obj3.setPeriod_id(obj.getPeriod_id());
|
|
|
+ mapStationInfos.get(Long.valueOf(sta.getDeptid())).setId(number);
|
|
|
mapStationInfos.get(Long.valueOf(sta.getDeptid())).setCheck_t_num(qzdStatisticsDao.selectDeptChedkpeople(obj3));
|
|
|
mapStationInfos.get(Long.valueOf(sta.getDeptid())).setOther_check_num(qzdStatisticsDao.selectDeptRecord(obj3));
|
|
|
- mapStationInfos.get(Long.valueOf(sta.getDeptid())).setId(sort);
|
|
|
- sort++;
|
|
|
+ mapStationInfos.get(Long.valueOf(sta.getDeptid())).setCheck_s_num(qzdStatisticsDao.getDeptCount(obj3));
|
|
|
}
|
|
|
|
|
|
// 获取公司检查的某个收费站的受检次数和扣分合计
|
|
|
@@ -117,17 +114,28 @@ public class StatisticsService_FImpl implements StatisticsService_F {
|
|
|
FwqStatisticsBean value = station.getValue();
|
|
|
value.setThird_check_num(1);
|
|
|
value.setOnsite_check_num(1);
|
|
|
- // 设置总平均扣分
|
|
|
- if (value.getCompany_check_num() > 0 || value.getThird_check_num() > 0) {
|
|
|
- avg += (value.getCompany_total_score() + value.getThird_total_score()) / 2.0 / (value.getCompany_check_num() + value.getThird_check_num());
|
|
|
+ int avgNum = 0;
|
|
|
+ if(value.getCheck_t_num() != 0){
|
|
|
+ avgNum =(int)Math.ceil(value.getCompany_check_num()/value.getCheck_t_num());
|
|
|
}
|
|
|
- if (value.getOnsite_check_num() > 0) {
|
|
|
- avg += value.getOnsite_total_score() / 2.0 / value.getOnsite_check_num();
|
|
|
+ value.setChecked_num(avgNum);
|
|
|
+ int checkScore = 0;
|
|
|
+ if(avgNum != 0){
|
|
|
+ checkScore = value.getCompany_total_score()/avgNum;
|
|
|
}
|
|
|
- value.setCheck_total_avg(df.format(avg));
|
|
|
+ // 设置总平均扣分
|
|
|
+// if (value.getCompany_check_num() > 0 || value.getThird_check_num() > 0) {
|
|
|
+// avg += (value.getCompany_total_score() + value.getThird_total_score()) / 2.0 / (value.getCompany_check_num() + value.getThird_check_num());
|
|
|
+// }
|
|
|
+// if (value.getOnsite_check_num() > 0) {
|
|
|
+// avg += value.getOnsite_total_score() / 2.0 / value.getOnsite_check_num();
|
|
|
+// }
|
|
|
+ Integer scoreTotal = value.getCompany_total_score()+value.getThird_total_score()+value.getThird_total_score();
|
|
|
+ value.setCheck_total_avg(scoreTotal.toString());
|
|
|
// 设置平均得分
|
|
|
- Float score_avg = (1000 - Float.valueOf(df.format(avg)));
|
|
|
- value.setScore_avg(score_avg.toString());
|
|
|
+ Double a =1000-checkScore*0.4-value.getOnsite_total_score()*0.4-value.getThird_total_score()*0.2;
|
|
|
+ // Float score_avg = 1000 - (float)checkScore*0.4;
|
|
|
+ value.setScore_avg(a.toString());
|
|
|
}
|
|
|
List<FwqStatisticsBean> sortList = new ArrayList<>(mapStationInfos.values());
|
|
|
// sortList.sort(new Comparator<FwqStatisticsBean>() {
|
|
|
@@ -167,6 +175,17 @@ public class StatisticsService_FImpl implements StatisticsService_F {
|
|
|
|
|
|
CheckTaskPeriod period = commonService.getCheckTaskPeriod(obj.getStart_date().getTime()+1 * 1000 * 60 * 60, obj.getEnd_date().getTime()+1 * 1000 * 60 * 60);
|
|
|
|
|
|
+ if (period != null) {
|
|
|
+ for (FwqStatisticsBean s : sortList) {
|
|
|
+ FwqDeptStatistic ss = new FwqDeptStatistic();
|
|
|
+ ss.setScore(Double.parseDouble(s.getScore_avg()));
|
|
|
+ ss.setIntegral(sortList.size() - s.getCompany_ranking2() + 1);
|
|
|
+ ss.setDept_id(s.getDept_id());
|
|
|
+ ss.setPeriod_id(period.getId());
|
|
|
+ qzdCheckDeptStatisticsDao.saveandupdate(ss);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
return sortList;
|
|
|
}
|
|
|
|
|
|
@@ -500,104 +519,43 @@ public class StatisticsService_FImpl implements StatisticsService_F {
|
|
|
|
|
|
@Override
|
|
|
public void getFeeStationCheckItemScore(FwqStatisticsBean obj, HttpServletRequest req, HttpServletResponse resp) {
|
|
|
- List<FwqStatisticsBean> list = getFeeStationCheckItemScore(obj);
|
|
|
- int totalcheckedCount = 0, totalAll = 0;
|
|
|
- float lygScore = 0.00f, ycScore = 0.00f, ntScore = 0.00f;
|
|
|
- int lygCheckNum = 0, ycCheckNum = 0, ntCheckNum = 0;
|
|
|
- Map<String, Integer> scoreTypeMap = new HashMap<>();
|
|
|
+ // List<FwqStatisticsBean> list = getFeeStationCheckItemScore(obj);
|
|
|
+ Map<Long, FwqStatisticsBean> scoreMap = getQWzdCheckedItemScoreInfo(obj);
|
|
|
+ List<FwqStatisticsBean> scorelist = new ArrayList<FwqStatisticsBean>(scoreMap.values());
|
|
|
+ scorelist.sort(new Comparator<FwqStatisticsBean>() {
|
|
|
+ @Override
|
|
|
+ public int compare(FwqStatisticsBean o1, FwqStatisticsBean o2) {
|
|
|
+ return o1.getId() > o2.getId() ? 1 : -1;
|
|
|
+ }
|
|
|
+ });
|
|
|
+// List<User> userList = new ArrayList<User>();
|
|
|
List<String> itemAll = commonService.getCheckItemName(25L);
|
|
|
+ List<String> itemOnsite = commonService.getCheckItemName(29L);
|
|
|
+ List<String> itemThird = commonService.getCheckItemName(29L);
|
|
|
Map<Long, Organ> deptMap = commonService.getDeptMap();
|
|
|
// 处理数据
|
|
|
- for (FwqStatisticsBean st : list) {
|
|
|
- // id值设置 seq_checked_score
|
|
|
- // 平均值
|
|
|
- st.setCheck_score_avg(
|
|
|
- (st.getChecked_num() != 0) ? st.getAll_check_score() / (st.getChecked_num() + 0.00f) : 0.00f);
|
|
|
+ Map<String, Object> map = new HashMap<>();
|
|
|
+ for(FwqStatisticsBean bean : scorelist){
|
|
|
for (String i : itemAll) {
|
|
|
- st.getSeq_checked_score().add(getItemScore2(st, i));
|
|
|
- }
|
|
|
- st.setParent_dept_id(deptMap.get(st.getDept_id()).getParentid().longValue());
|
|
|
- totalcheckedCount += st.getChecked_num();
|
|
|
- totalAll += st.getAll_check_score();
|
|
|
- if (st.getParent_dept_id() == 30) {
|
|
|
- lygScore += st.getAll_check_score();
|
|
|
- lygCheckNum += st.getChecked_num();
|
|
|
- }
|
|
|
- if (st.getParent_dept_id() == 31) {
|
|
|
- ycScore += st.getAll_check_score();
|
|
|
- ycCheckNum += st.getChecked_num();
|
|
|
- }
|
|
|
- if (st.getParent_dept_id() == 32) {
|
|
|
- ntScore += st.getAll_check_score();
|
|
|
- ntCheckNum += st.getChecked_num();
|
|
|
- }
|
|
|
- st.setCheck_total_avg("");
|
|
|
- st.setParent_name("");
|
|
|
- List<String> names = st.getChecked_socre_name();
|
|
|
- List<Integer> scores = st.getChecked_score();
|
|
|
- for (int j = 0; j < names.size(); j++) {
|
|
|
- Integer score = scoreTypeMap.get(names.get(j));
|
|
|
- if (score == null) {
|
|
|
- score = 0;
|
|
|
- }
|
|
|
- score += scores.get(j);
|
|
|
- scoreTypeMap.put(names.get(j), score);
|
|
|
- }
|
|
|
- }
|
|
|
- boolean lyg = false, yc = false, nt = false;
|
|
|
- float lygTemp = 0.00f, ycTemp = 0.00f, ntTemp = 0.00f;
|
|
|
- for (int i = 0; i < list.size(); i++) {
|
|
|
- if (list.get(i).getParent_dept_id() == 30 && !lyg) {
|
|
|
- list.get(i).setParent_name(deptMap.get(deptMap.get(list.get(i).getDept_id()).getParentid().longValue()).getOrganname());
|
|
|
- list.get(i).setCheck_total_avg(String.format("%.2f", lygCheckNum != 0 ? lygScore / (lygCheckNum + 0.00f) : 0.00));
|
|
|
- lygTemp = lygCheckNum != 0 ? lygScore / (lygCheckNum + 0.00f) : 0.00f;
|
|
|
- lyg = true;
|
|
|
- } else if (list.get(i).getParent_dept_id() == 31 && !yc) {
|
|
|
- list.get(i).setParent_name(deptMap.get(deptMap.get(list.get(i).getDept_id()).getParentid().longValue()).getOrganname());
|
|
|
- list.get(i).setCheck_total_avg(String.format("%.2f", ycCheckNum != 0 ? ycScore / (ycCheckNum + 0.00f) : 0.00));
|
|
|
- ycTemp = ycCheckNum != 0 ? ycScore / (ycCheckNum + 0.00f) : 0.00f;
|
|
|
- yc = true;
|
|
|
- } else if (list.get(i).getParent_dept_id() == 32 && !nt) {
|
|
|
- list.get(i).setParent_name(deptMap.get(deptMap.get(list.get(i).getDept_id()).getParentid().longValue()).getOrganname());
|
|
|
- list.get(i).setCheck_total_avg(String.format("%.2f", ntCheckNum != 0 ? ntScore / (ntCheckNum + 0.00f) : 0.00));
|
|
|
- ntTemp = ntCheckNum != 0 ? ntScore / (ntCheckNum + 0.00f) : 0.00f;
|
|
|
- nt = true;
|
|
|
- }
|
|
|
- }
|
|
|
- int lygOrder = 1, ycOrder = 1, ntOrder = 1;
|
|
|
- for (int i = 0; i < list.size(); i++) {
|
|
|
- if (!"".equals(list.get(i).getParent_name()) && list.get(i).getParent_dept_id() == 30) {
|
|
|
- if (lygTemp > ycTemp) {
|
|
|
- lygOrder += 1;
|
|
|
- }
|
|
|
- if (lygTemp > ntTemp) {
|
|
|
- lygOrder += 1;
|
|
|
- }
|
|
|
- list.get(i).setFee_station_ranking2(lygOrder);
|
|
|
+ bean.getSeq_checked_score().add(getItemScore2(bean, i));
|
|
|
}
|
|
|
- if (!"".equals(list.get(i).getParent_name()) && list.get(i).getParent_dept_id() == 31) {
|
|
|
- if (ycTemp > lygTemp) {
|
|
|
- ycOrder += 1;
|
|
|
- }
|
|
|
- if (ycTemp > ntTemp) {
|
|
|
- ycOrder += 1;
|
|
|
- }
|
|
|
- list.get(i).setFee_station_ranking2(ycOrder);
|
|
|
+ for (String i : itemOnsite) {
|
|
|
+ bean.getOnsite_checked_score().add(getItemScore3(bean, i));
|
|
|
}
|
|
|
- if (!"".equals(list.get(i).getParent_name()) && list.get(i).getParent_dept_id() == 32) {
|
|
|
- if (ntTemp > lygTemp) {
|
|
|
- ntOrder += 1;
|
|
|
- }
|
|
|
- if (ntTemp > ycTemp) {
|
|
|
- ntOrder += 1;
|
|
|
- }
|
|
|
- list.get(i).setFee_station_ranking2(ntOrder);
|
|
|
+ for (String i : itemThird) {
|
|
|
+ bean.getThird_checked_score().add(getItemScore4(bean, i));
|
|
|
}
|
|
|
+ Integer countScore = +bean.getThird_total_score()+ bean.getOnsite_total_score()+bean.getCompany_total_score();
|
|
|
+ bean.setAll_check_score(countScore);
|
|
|
+ int scoreTotal = countScore;
|
|
|
+ float score = (float)scoreTotal;
|
|
|
+ bean.setCheck_score_avg(1000-score/(bean.getCheck_t_num()+2));
|
|
|
+ // int score = (1000-countScore/(bean.getCheck_t_num()+2));
|
|
|
}
|
|
|
-
|
|
|
- Map<String, Object> map = new HashMap<>();
|
|
|
- map.put("list", list);
|
|
|
+ map.put("list", scorelist);
|
|
|
map.put("itemList", itemAll);
|
|
|
+ map.put("itemThird", itemThird);
|
|
|
+ map.put("itemOnsite", itemOnsite);
|
|
|
exportExcel("温馨服务检查情况统计表", "fwq_checked_item_info", map, resp);
|
|
|
}
|
|
|
|
|
|
@@ -610,6 +568,7 @@ public class StatisticsService_FImpl implements StatisticsService_F {
|
|
|
// context.putVar("list", map.get("list"));
|
|
|
// context.putVar("totalMan", map.get("totalMan"));
|
|
|
for (String key : map.keySet()) {
|
|
|
+ System.out.println(key);
|
|
|
context.putVar(key, map.get(key));
|
|
|
}
|
|
|
JxlsHelper.getInstance().processTemplate(is, os, context);
|
|
|
@@ -658,4 +617,209 @@ public class StatisticsService_FImpl implements StatisticsService_F {
|
|
|
}
|
|
|
return 0;
|
|
|
}
|
|
|
+
|
|
|
+ private Integer getItemScore3(FwqStatisticsBean obj, String name) {
|
|
|
+ List<String> names = obj.getOnsite_socre_name();
|
|
|
+ List<Integer> scores = obj.getOnsite_score();
|
|
|
+ for (int i = 0; i < names.size(); i++) {
|
|
|
+ if (names.get(i) == null) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ if (names.get(i).contains(name)) {
|
|
|
+ return scores.get(i);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ private Integer getItemScore4(FwqStatisticsBean obj, String name) {
|
|
|
+ List<String> names = obj.getThird_socre_name();
|
|
|
+ List<Integer> scores = obj.getThird_score();
|
|
|
+ for (int i = 0; i < names.size(); i++) {
|
|
|
+ if (names.get(i) == null) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ if (names.get(i).contains(name)) {
|
|
|
+ return scores.get(i);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void getQzdCheck(FwqStatisticsBean obj, HttpServletRequest req, HttpServletResponse resp){
|
|
|
+ List<CheckNum> lists = selectQzdCheckNum(obj);
|
|
|
+ Map<String, Object> map = new HashMap<>(1);
|
|
|
+ map.put("list", lists);
|
|
|
+ exportExcel("运营管理综合检查情况统计表", "qzd_check_statistic", map, resp);
|
|
|
+ }
|
|
|
+
|
|
|
+ public List<CheckNum> selectQzdCheckNum(FwqStatisticsBean obj){
|
|
|
+ List<CheckNum> objList = qzdStatisticsDao.selectQzdCheckNum(obj);
|
|
|
+ Map<Long, Item> itemMap = commonService.getItemMap();
|
|
|
+ Map<Long, Organ> deptMap = commonService.getDeptMap();
|
|
|
+ int i = 0;
|
|
|
+ for (CheckNum sta : objList) {
|
|
|
+ obj.setDept_id(sta.getDept().longValue());
|
|
|
+ sta.setDeptName(deptMap.get(sta.getDept().longValue()).getOrganname());
|
|
|
+ i++;
|
|
|
+ sta.setDept(i);
|
|
|
+ sta.setIsApplyNunm(qzdStatisticsDao.selectQzdApplyNum(obj));
|
|
|
+ }
|
|
|
+ return objList;
|
|
|
+ }
|
|
|
+
|
|
|
+ public Map<Long, FwqStatisticsBean> getQWzdCheckedItemScoreInfo(FwqStatisticsBean obj){
|
|
|
+ Map<Long, Item> itemMap = commonService.getItemMap();
|
|
|
+ Map<Long, FwqStatisticsBean> mapStationInfos = new HashMap<>();
|
|
|
+// for (User sta : userlist) {
|
|
|
+// FwqStatisticsBean obj2 = new FwqStatisticsBean();
|
|
|
+// obj2.setUser(sta);
|
|
|
+// mapStationInfos.put(Long.valueOf(sta.getId()), obj2);
|
|
|
+// }
|
|
|
+ if (obj.getStart_date() != null && obj.getEnd_date() != null) {
|
|
|
+ CheckTaskPeriod p = commonService.getCheckTaskPeriod(obj.getStart_date().getTime() + 1 * 1000 * 60 * 60, obj.getEnd_date().getTime() + 1 * 1000 * 60 * 60);
|
|
|
+ if (p != null) {
|
|
|
+ obj.setPeriod_id(p.getId());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ List<User> taskList = qzdStatisticsDao.selectWGCheckNum(obj);
|
|
|
+ List<User> recordList = qzdStatisticsDao.selectRecordNum(obj);
|
|
|
+ int peopleNo = 0;
|
|
|
+ for(int i =0;i<taskList.size();i++){
|
|
|
+ User sta = taskList.get(i);
|
|
|
+ FwqStatisticsBean obj2 = new FwqStatisticsBean();
|
|
|
+ obj2.setUser(sta);
|
|
|
+ obj2.setCheck_t_num(taskList.get(i).getAge());
|
|
|
+ obj2.setCheck_s_num(recordList.get(i).getAge());
|
|
|
+ peopleNo++;
|
|
|
+ obj2.setId(peopleNo);
|
|
|
+ mapStationInfos.put(Long.valueOf(sta.getId()), obj2);
|
|
|
+ }
|
|
|
+ List<FwqStatisticsBean> listCheckedScore = qzdStatisticsDao.selectFeeStationCheckedPersonScoreDetail(obj);
|
|
|
+ for (FwqStatisticsBean sta : listCheckedScore) {
|
|
|
+ Item item = itemMap.get(sta.getCheck_item_id().longValue());
|
|
|
+ if (item != null) {
|
|
|
+ sta.setItem_id(item.getParent_id().intValue());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ for (int i = 0; i < listCheckedScore.size(); i++) {
|
|
|
+ for (int j = listCheckedScore.size() - 1; j > i; j--) {
|
|
|
+ //此处checkman_id所放为被考核人
|
|
|
+ if (listCheckedScore.get(j).getCheckman_id() != null && listCheckedScore.get(j).getItem_id() != null){
|
|
|
+ if(listCheckedScore.get(j).getCheckman_id().equals(listCheckedScore.get(i).getCheckman_id())) {
|
|
|
+ if (listCheckedScore.get(j).getItem_id().equals(listCheckedScore.get(i).getItem_id())) {
|
|
|
+ listCheckedScore.get(i).setScore(listCheckedScore.get(i).getScore() + listCheckedScore.get(j).getScore());
|
|
|
+ listCheckedScore.remove(j);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ for (FwqStatisticsBean sta : listCheckedScore) {
|
|
|
+ if (mapStationInfos.containsKey(Long.valueOf(sta.getCheckman_id()))) {
|
|
|
+ FwqStatisticsBean statis = mapStationInfos.get(Long.valueOf(sta.getCheckman_id()));
|
|
|
+ statis.setAll_check_score(statis.getAll_check_score() + sta.getScore());
|
|
|
+ // 组装扣分类型内容
|
|
|
+ if (itemMap.get(sta.getCheck_item_id().longValue()).getParent_id() != null) {
|
|
|
+ sta.setId(itemMap.get(sta.getCheck_item_id().longValue()).getParent_id().intValue());
|
|
|
+ if (itemMap.get(sta.getCheck_item_id().longValue()).getScore() == null) {
|
|
|
+ sta.setName(itemMap.get(sta.getCheck_item_id().longValue()).getName());
|
|
|
+ } else {
|
|
|
+ sta.setName(itemMap.get(itemMap.get(sta.getCheck_item_id().longValue()).getParent_id()).getName());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ statis.getChecked_socre_name().add(sta.getName());
|
|
|
+ statis.getChecked_score().add(sta.getScore());
|
|
|
+ statis.getChecked_score_ids().add(sta.getId());
|
|
|
+ statis.setCompany_total_score(statis.getCompany_total_score()+sta.getScore());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ SimpleDateFormat time=new SimpleDateFormat("yyyy/MM");
|
|
|
+ FwqCheckOther fwqCheckOther = new FwqCheckOther();
|
|
|
+ fwqCheckOther.setCheck_time_name(time.format(obj.getEnd_date().getTime()));
|
|
|
+ fwqCheckOther.setCheck_type(11);
|
|
|
+ List<FwqStatisticsBean> listOnsiteScore = qzdStatisticsDao.selectOtherCheckedPersonScoreDetail(fwqCheckOther);
|
|
|
+ for (FwqStatisticsBean sta : listOnsiteScore) {
|
|
|
+ Item item = itemMap.get(sta.getCheck_item_id().longValue());
|
|
|
+ if (item != null) {
|
|
|
+ sta.setItem_id(item.getParent_id().intValue());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ for (int i = 0; i < listOnsiteScore.size(); i++) {
|
|
|
+ for (int j = listOnsiteScore.size() - 1; j > i; j--) {
|
|
|
+ //此处checkman_id所放为被考核人
|
|
|
+ if (listOnsiteScore.get(j).getCheckman_id() != null && listOnsiteScore.get(j).getItem_id() != null){
|
|
|
+ if(listOnsiteScore.get(j).getCheckman_id().equals(listOnsiteScore.get(i).getCheckman_id())) {
|
|
|
+ if (listOnsiteScore.get(j).getItem_id().equals(listOnsiteScore.get(i).getItem_id())) {
|
|
|
+ listOnsiteScore.get(i).setScore(listOnsiteScore.get(i).getScore() + listOnsiteScore.get(j).getScore());
|
|
|
+ listOnsiteScore.remove(j);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ for (FwqStatisticsBean sta : listOnsiteScore) {
|
|
|
+ if (mapStationInfos.containsKey(Long.valueOf(sta.getCheckman_id()))) {
|
|
|
+ FwqStatisticsBean statis = mapStationInfos.get(Long.valueOf(sta.getCheckman_id()));
|
|
|
+ statis.setOnsite_total_score(statis.getOnsite_total_score() + sta.getScore());
|
|
|
+ // 组装扣分类型内容
|
|
|
+ if (itemMap.get(sta.getCheck_item_id().longValue()).getParent_id() != null) {
|
|
|
+ sta.setId(itemMap.get(sta.getCheck_item_id().longValue()).getParent_id().intValue());
|
|
|
+ if (itemMap.get(sta.getCheck_item_id().longValue()).getScore() == null) {
|
|
|
+ sta.setName(itemMap.get(sta.getCheck_item_id().longValue()).getName());
|
|
|
+ } else {
|
|
|
+ sta.setName(itemMap.get(itemMap.get(sta.getCheck_item_id().longValue()).getParent_id()).getName());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ statis.getOnsite_socre_name().add(sta.getName());
|
|
|
+ statis.getOnsite_score().add(sta.getScore());
|
|
|
+ // statis.getChecked_score_ids().add(sta.getId());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ fwqCheckOther.setCheck_type(12);
|
|
|
+ List<FwqStatisticsBean> listThirdScore = qzdStatisticsDao.selectOtherCheckedPersonScoreDetail(fwqCheckOther);
|
|
|
+ for (FwqStatisticsBean sta : listThirdScore) {
|
|
|
+ Item item = itemMap.get(sta.getCheck_item_id().longValue());
|
|
|
+ if (item != null) {
|
|
|
+ sta.setItem_id(item.getParent_id().intValue());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ for (int i = 0; i < listThirdScore.size(); i++) {
|
|
|
+ for (int j = listThirdScore.size() - 1; j > i; j--) {
|
|
|
+ //此处checkman_id所放为被考核人
|
|
|
+ if (listThirdScore.get(j).getCheckman_id() != null && listThirdScore.get(j).getItem_id() != null){
|
|
|
+ if(listThirdScore.get(j).getCheckman_id().equals(listThirdScore.get(i).getCheckman_id())) {
|
|
|
+ if (listThirdScore.get(j).getItem_id().equals(listThirdScore.get(i).getItem_id())) {
|
|
|
+ listThirdScore.get(i).setScore(listThirdScore.get(i).getScore() + listThirdScore.get(j).getScore());
|
|
|
+ listThirdScore.remove(j);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ for (FwqStatisticsBean sta : listThirdScore) {
|
|
|
+ if (mapStationInfos.containsKey(Long.valueOf(sta.getCheckman_id()))) {
|
|
|
+ FwqStatisticsBean statis = mapStationInfos.get(Long.valueOf(sta.getCheckman_id()));
|
|
|
+ statis.setThird_total_score(statis.getThird_total_score() + sta.getScore());
|
|
|
+ // 组装扣分类型内容
|
|
|
+ if (itemMap.get(sta.getCheck_item_id().longValue()).getParent_id() != null) {
|
|
|
+ sta.setId(itemMap.get(sta.getCheck_item_id().longValue()).getParent_id().intValue());
|
|
|
+ if (itemMap.get(sta.getCheck_item_id().longValue()).getScore() == null) {
|
|
|
+ sta.setName(itemMap.get(sta.getCheck_item_id().longValue()).getName());
|
|
|
+ } else {
|
|
|
+ sta.setName(itemMap.get(itemMap.get(sta.getCheck_item_id().longValue()).getParent_id()).getName());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ statis.getThird_socre_name().add(sta.getName());
|
|
|
+ statis.getThird_score().add(sta.getScore());
|
|
|
+ // statis.getChecked_score_ids().add(sta.getId());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return mapStationInfos;
|
|
|
+ }
|
|
|
+
|
|
|
}
|