|
|
@@ -3,18 +3,13 @@ package com.xintong.visualinspection.visuallnspection_qzd.service.impl;
|
|
|
import com.alibaba.dubbo.config.annotation.Reference;
|
|
|
import com.github.pagehelper.PageHelper;
|
|
|
import com.github.pagehelper.PageInfo;
|
|
|
-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.FwqStatisticsBo;
|
|
|
-import com.xintong.visualinspection.bean.Item;
|
|
|
-import com.xintong.visualinspection.bean.Organ;
|
|
|
+import com.xintong.visualinspection.bean.*;
|
|
|
import com.xintong.visualinspection.pojo.fwq.FwqRankingData;
|
|
|
import com.xintong.visualinspection.pojo.fwq.FwqStatisiticPojo;
|
|
|
import com.xintong.visualinspection.pojo.fwq.ServiceAreaStatistic;
|
|
|
+import com.xintong.visualinspection.service.CheckOtherService_Q;
|
|
|
import com.xintong.visualinspection.service.CommonService;
|
|
|
-import com.xintong.visualinspection.service.StatisticsService_F;
|
|
|
+import com.xintong.visualinspection.service.StatisticsService_Q;
|
|
|
import com.xintong.visualinspection.visuallnspection_qzd.dao.QzdCheckDeptStatisticsDao;
|
|
|
import com.xintong.visualinspection.visuallnspection_qzd.dao.QzdStatisticsDao;
|
|
|
import org.slf4j.Logger;
|
|
|
@@ -46,41 +41,57 @@ import java.util.Set;
|
|
|
registry = "${dubbo.registry.id}",
|
|
|
timeout = 3000
|
|
|
)
|
|
|
-public class StatisticsServiceImpl implements StatisticsService_F {
|
|
|
+
|
|
|
+public class StatisticsServiceImpl implements StatisticsService_Q {
|
|
|
|
|
|
private static final Logger logger = LoggerFactory.getLogger(StatisticsServiceImpl.class);
|
|
|
|
|
|
@Autowired
|
|
|
- private QzdStatisticsDao qzdStatisticsDao;
|
|
|
+ private QzdStatisticsDao fwqStatisticsDao;
|
|
|
@Autowired
|
|
|
- private QzdCheckDeptStatisticsDao qzdCheckDeptStatisticsDao;
|
|
|
+ private QzdCheckDeptStatisticsDao fwqCheckDeptStatisticsDao;
|
|
|
|
|
|
@Reference(version = "1.0.0",
|
|
|
application = "${dubbo.application.id}",
|
|
|
registry = "${dubbo.registry.address}")
|
|
|
private CommonService commonService;
|
|
|
|
|
|
+ private CheckOtherService_Q checkOtherService_f;
|
|
|
+
|
|
|
@Override
|
|
|
public List<FwqStatisticsBean> getOperationInfo(FwqStatisticsBean obj) {
|
|
|
|
|
|
// 获得所有服务区数据
|
|
|
- List<FeeStation> saList = commonService.getAllDeptByLayer("SA");
|
|
|
+ List<FeeStation> saList = commonService.getAllDeptByLayer("WG");
|
|
|
Map<Long, FwqStatisticsBean> mapStationInfos = new HashMap<>();
|
|
|
+ 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());
|
|
|
+ }
|
|
|
+ }
|
|
|
for (FeeStation sta : saList) {
|
|
|
FwqStatisticsBean obj2 = new FwqStatisticsBean();
|
|
|
obj2.setDept_id(Long.valueOf(sta.getDeptid()));
|
|
|
obj2.setName(sta.getName());
|
|
|
mapStationInfos.put(Long.valueOf(sta.getDeptid()), obj2);
|
|
|
+ FwqStatisticsBean obj3 = new FwqStatisticsBean();
|
|
|
+ obj3.setDept_id(Long.valueOf(sta.getDeptid()));
|
|
|
+ obj3.setStart_date(obj.getStart_date());
|
|
|
+ obj3.setEnd_date(obj.getEnd_date());
|
|
|
+ obj3.setPeriod_id(obj.getPeriod_id());
|
|
|
+ mapStationInfos.get(Long.valueOf(sta.getDeptid())).setCheck_t_num(fwqStatisticsDao.selectDeptChedkpeople(obj3));
|
|
|
+ mapStationInfos.get(Long.valueOf(sta.getDeptid())).setOther_check_num(fwqStatisticsDao.selectDeptRecord(obj3));
|
|
|
}
|
|
|
|
|
|
// 获取公司检查的某个收费站的受检次数和扣分合计
|
|
|
List<FwqStatisticsBean> company_beans = getFeeStationCheckItemScore(obj);
|
|
|
// 获取第三方暗访稽查的某个服务区的受检次数和扣分合计
|
|
|
- obj.setCheck_type(8);
|
|
|
- List<FwqStatisticsBean> third_beans = qzdStatisticsDao.getselectFeeStationOperationScoreDetail(obj);
|
|
|
+ obj.setCheck_type(12);
|
|
|
+ List<FwqStatisticsBean> third_beans = fwqStatisticsDao.getselectFeeStationOperationScoreDetail(obj);
|
|
|
// 获取现场稽查的某个服务区的受检次数和扣分合计
|
|
|
- obj.setCheck_type(9);
|
|
|
- List<FwqStatisticsBean> onsite_beans = qzdStatisticsDao.getselectFeeStationOperationScoreDetail(obj);
|
|
|
+ obj.setCheck_type(11);
|
|
|
+ List<FwqStatisticsBean> onsite_beans = fwqStatisticsDao.getselectFeeStationOperationScoreDetail(obj);
|
|
|
|
|
|
for (FwqStatisticsBean company_bean : company_beans) {
|
|
|
mapStationInfos.get(company_bean.getDept_id()).setCompany_check_num(company_bean.getChecked_num());
|
|
|
@@ -117,12 +128,12 @@ public class StatisticsServiceImpl implements StatisticsService_F {
|
|
|
value.setScore_avg(score_avg.toString());
|
|
|
}
|
|
|
List<FwqStatisticsBean> sortList = new ArrayList<>(mapStationInfos.values());
|
|
|
- sortList.sort(new Comparator<FwqStatisticsBean>() {
|
|
|
- @Override
|
|
|
- public int compare(FwqStatisticsBean o1, FwqStatisticsBean o2) {
|
|
|
- return o1.compare3To(o2);
|
|
|
- }
|
|
|
- });
|
|
|
+// sortList.sort(new Comparator<FwqStatisticsBean>() {
|
|
|
+// @Override
|
|
|
+// public int compare(FwqStatisticsBean o1, FwqStatisticsBean o2) {
|
|
|
+// return o1.compare3To(o2);
|
|
|
+// }
|
|
|
+// });
|
|
|
|
|
|
List<FwqStatisticsBean> temp = new ArrayList<>();
|
|
|
temp.addAll(sortList);
|
|
|
@@ -161,7 +172,7 @@ public class StatisticsServiceImpl implements StatisticsService_F {
|
|
|
ss.setIntegral(sortList.size() - s.getCompany_ranking2() + 1);
|
|
|
ss.setDept_id(s.getDept_id());
|
|
|
ss.setPeriod_id(period.getId());
|
|
|
- qzdCheckDeptStatisticsDao.saveandupdate(ss);
|
|
|
+ fwqCheckDeptStatisticsDao.saveandupdate(ss);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -196,7 +207,7 @@ public class StatisticsServiceImpl implements StatisticsService_F {
|
|
|
obj.setEndperiod_id(checkTaskPeriods.get(checkTaskPeriods.size() - 1).getId());
|
|
|
}
|
|
|
|
|
|
- List<FwqDeptStatistic> deptStatistics = qzdCheckDeptStatisticsDao.selectdepts(obj);
|
|
|
+ List<FwqDeptStatistic> deptStatistics = fwqCheckDeptStatisticsDao.selectdepts(obj);
|
|
|
Map<String, List<FwqDeptStatistic>> listMap = new HashMap<>();
|
|
|
Map<Long, List<FwqDeptStatistic>> listMap1 = new HashMap<>();
|
|
|
if (deptStatistics.size() > 0) {
|
|
|
@@ -368,7 +379,7 @@ public class StatisticsServiceImpl implements StatisticsService_F {
|
|
|
public List<FwqStatisticsBean> getFeeStationCheckItemScore(FwqStatisticsBean obj) {
|
|
|
|
|
|
// 获得所有服务区数据
|
|
|
- List<FeeStation> saList = commonService.getAllDeptByLayer("SA");
|
|
|
+ List<FeeStation> saList = commonService.getAllDeptByLayer("WG");
|
|
|
Map<Long, Item> itemMap = commonService.getItemMap();
|
|
|
Map<Long, FwqStatisticsBean> mapStationInfos = new HashMap<>();
|
|
|
for (FeeStation sta : saList) {
|
|
|
@@ -394,7 +405,7 @@ public class StatisticsServiceImpl implements StatisticsService_F {
|
|
|
}
|
|
|
|
|
|
//服务区检查次数
|
|
|
- List<FwqStatisticsBean> listCheckNum = qzdStatisticsDao.selectFeeStationCheckNum(obj);
|
|
|
+ List<FwqStatisticsBean> listCheckNum = fwqStatisticsDao.selectFeeStationCheckNum(obj);
|
|
|
for (FwqStatisticsBean sta : listCheckNum) {
|
|
|
if (mapStationInfos.containsKey(sta.getDept_id())) {
|
|
|
mapStationInfos.get(sta.getDept_id()).setChecked_num(sta.getChecked_num());
|
|
|
@@ -402,7 +413,7 @@ public class StatisticsServiceImpl implements StatisticsService_F {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- List<FwqStatisticsBean> listCheckedScore = qzdStatisticsDao.selectFeeStationCheckedPersonScoreDetail(obj);
|
|
|
+ List<FwqStatisticsBean> listCheckedScore = fwqStatisticsDao.selectFeeStationCheckedPersonScoreDetail(obj);
|
|
|
|
|
|
// 处理同一个服务区中,如果item的parent_id是一样的话,将这些数据结合在一起
|
|
|
for (FwqStatisticsBean sta : listCheckedScore) {
|
|
|
@@ -512,7 +523,7 @@ public class StatisticsServiceImpl implements StatisticsService_F {
|
|
|
if (!(page.equals(0) && size.equals(0))) {
|
|
|
PageHelper.startPage(page, size);
|
|
|
}
|
|
|
- List<FwqStatisticsBean> list = qzdStatisticsDao.selectOneCheckedDetailInfo(obj);
|
|
|
+ List<FwqStatisticsBean> list = fwqStatisticsDao.selectOneCheckedDetailInfo(obj);
|
|
|
Map<Long, Item> itemMap = commonService.getItemMap();
|
|
|
|
|
|
for (FwqStatisticsBean sta : list) {
|
|
|
@@ -570,12 +581,12 @@ public class StatisticsServiceImpl implements StatisticsService_F {
|
|
|
|
|
|
@Override
|
|
|
public List<FwqStatisticsBean> getOneSACheckedInfo(FwqStatisticsBean obj) {
|
|
|
- return qzdStatisticsDao.selectOneCheckedInfoData(obj);
|
|
|
+ return fwqStatisticsDao.selectOneCheckedInfoData(obj);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public List<FwqStatisticsBean> getOneCheckedItemInfo(FwqStatisticsBean obj) {
|
|
|
- List<FwqStatisticsBean> listCheckedScore = qzdStatisticsDao.selectOneCheckedItemInfo(obj);
|
|
|
+ List<FwqStatisticsBean> listCheckedScore = fwqStatisticsDao.selectOneCheckedItemInfo(obj);
|
|
|
Map<Long, Item> itemMap = commonService.getItemMap();
|
|
|
// 处理同一个服务区中,如果item的parent_id是一样的话,将这些数据结合在一起
|
|
|
for (FwqStatisticsBean sta : listCheckedScore) {
|
|
|
@@ -601,7 +612,7 @@ public class StatisticsServiceImpl implements StatisticsService_F {
|
|
|
public List<FwqStatisticsBo> getEmployeeCheckedInfo(FwqStatisticsBean obj) {
|
|
|
|
|
|
// 将检索出来的数据放到如map中
|
|
|
- List<FwqStatisticsBean> list = qzdStatisticsDao.selectStatistics(obj);
|
|
|
+ List<FwqStatisticsBean> list = fwqStatisticsDao.selectStatistics(obj);
|
|
|
Map<Long, Item> itemMap = commonService.getItemMap();
|
|
|
Map<Long, Organ> deptMap = commonService.getDeptMap();
|
|
|
// 将list中的数据找到项目的父项目,然后去除重复的
|
|
|
@@ -618,12 +629,12 @@ public class StatisticsServiceImpl implements StatisticsService_F {
|
|
|
}
|
|
|
|
|
|
// 查询服务区受检次数
|
|
|
- List<FwqStatisticsBean> timesList = qzdStatisticsDao.selectCheckedTimes(obj);
|
|
|
+ List<FwqStatisticsBean> timesList = fwqStatisticsDao.selectCheckedTimes(obj);
|
|
|
|
|
|
Map<Long, FwqStatisticsBo> statisticBoMap = new HashMap<>();
|
|
|
|
|
|
// 获得所有服务区数据,将服务区数据保存在map中
|
|
|
- List<FeeStation> saList = commonService.getAllDeptByLayer("SA");
|
|
|
+ List<FeeStation> saList = commonService.getAllDeptByLayer("WG");
|
|
|
for (FeeStation sta : saList) {
|
|
|
FwqStatisticsBo obj2 = new FwqStatisticsBo();
|
|
|
obj2.setDept_id(Long.valueOf(sta.getDeptid()));
|
|
|
@@ -755,7 +766,7 @@ public class StatisticsServiceImpl implements StatisticsService_F {
|
|
|
|
|
|
@Override
|
|
|
public List<FwqStatisticsBean> getYearScoreChange(FwqStatisticsBean obj) {
|
|
|
- List<FwqStatisticsBean> list = qzdStatisticsDao.selectYearScoreInfo(obj);
|
|
|
+ List<FwqStatisticsBean> list = fwqStatisticsDao.selectYearScoreInfo(obj);
|
|
|
return list;
|
|
|
|
|
|
}
|
|
|
@@ -765,7 +776,7 @@ public class StatisticsServiceImpl implements StatisticsService_F {
|
|
|
|
|
|
Map<Long, FwqStatisticsBean> mapStationInfos = new HashMap<>();
|
|
|
// 获得所有服务区数据,将服务区数据保存在map中
|
|
|
- List<FeeStation> saList = commonService.getAllDeptByLayer("SA");
|
|
|
+ List<FeeStation> saList = commonService.getAllDeptByLayer("WG");
|
|
|
for (FeeStation sta : saList) {
|
|
|
FwqStatisticsBean obj2 = new FwqStatisticsBean();
|
|
|
obj2.setDept_id(Long.valueOf(sta.getDeptid()));
|
|
|
@@ -789,7 +800,7 @@ public class StatisticsServiceImpl implements StatisticsService_F {
|
|
|
}
|
|
|
|
|
|
// 检查次数
|
|
|
- List<FwqStatisticsBean> listCheckNum = qzdStatisticsDao.selectFeeStationCheckNum(obj);
|
|
|
+ List<FwqStatisticsBean> listCheckNum = fwqStatisticsDao.selectFeeStationCheckNum(obj);
|
|
|
for (FwqStatisticsBean sta : listCheckNum) {
|
|
|
if (mapStationInfos.containsKey(sta.getDept_id())) {
|
|
|
mapStationInfos.get(sta.getDept_id()).setChecked_num(sta.getChecked_num());
|
|
|
@@ -802,7 +813,7 @@ public class StatisticsServiceImpl implements StatisticsService_F {
|
|
|
listmap.put(b.getDept_id().intValue(), b);
|
|
|
}
|
|
|
|
|
|
- List<FwqStatisticsBean> listCheckedScore = qzdStatisticsDao.selectFeeStationCheckedScore(obj);
|
|
|
+ List<FwqStatisticsBean> listCheckedScore = fwqStatisticsDao.selectFeeStationCheckedScore(obj);
|
|
|
for (FwqStatisticsBean sta : listCheckedScore) {
|
|
|
if (mapStationInfos.containsKey(sta.getDept_id())) {
|
|
|
|
|
|
@@ -882,7 +893,7 @@ public class StatisticsServiceImpl implements StatisticsService_F {
|
|
|
|
|
|
// 获取所有的服务区
|
|
|
List<FwqStatisticsBean> lists = new ArrayList<>();
|
|
|
- List<FeeStation> saList = commonService.getAllDeptByLayer("SA");
|
|
|
+ List<FeeStation> saList = commonService.getAllDeptByLayer("WG");
|
|
|
for (FeeStation sta : saList) {
|
|
|
FwqStatisticsBean obj2 = new FwqStatisticsBean();
|
|
|
obj2.setDept_id(Long.valueOf(sta.getDeptid()));
|
|
|
@@ -897,18 +908,30 @@ public class StatisticsServiceImpl implements StatisticsService_F {
|
|
|
+ centerManageMap.get(sta.getDept_id()).getAll_check_score());
|
|
|
centerManageList.get(0).setChecked_num(centerManageList.get(0).getChecked_num()
|
|
|
+ centerManageMap.get(sta.getDept_id()).getChecked_num());
|
|
|
+ centerManageList.get(0).setOnsite_total_score(centerManageList.get(0).getOnsite_total_score()
|
|
|
+ + centerManageMap.get(sta.getDept_id()).getOnsite_total_score());
|
|
|
+ centerManageList.get(0).setThird_total_score(centerManageList.get(0).getThird_total_score()
|
|
|
+ + centerManageMap.get(sta.getDept_id()).getThird_total_score());
|
|
|
centerManageList.get(0).setFeeStationName("连云港");
|
|
|
} else if (sta.getParent_dept_id() == 31) {
|
|
|
centerManageList.get(1).setAll_check_score(centerManageList.get(1).getAll_check_score()
|
|
|
+ centerManageMap.get(sta.getDept_id()).getAll_check_score());
|
|
|
centerManageList.get(1).setChecked_num(centerManageList.get(1).getChecked_num()
|
|
|
+ centerManageMap.get(sta.getDept_id()).getChecked_num());
|
|
|
+ centerManageList.get(1).setOnsite_total_score(centerManageList.get(0).getOnsite_total_score()
|
|
|
+ + centerManageMap.get(sta.getDept_id()).getOnsite_total_score());
|
|
|
+ centerManageList.get(1).setThird_total_score(centerManageList.get(0).getThird_total_score()
|
|
|
+ + centerManageMap.get(sta.getDept_id()).getThird_total_score());
|
|
|
centerManageList.get(1).setFeeStationName("盐城");
|
|
|
} else if (sta.getParent_dept_id() == 32) {
|
|
|
centerManageList.get(2).setAll_check_score(centerManageList.get(2).getAll_check_score()
|
|
|
+ centerManageMap.get(sta.getDept_id()).getAll_check_score());
|
|
|
centerManageList.get(2).setChecked_num(centerManageList.get(2).getChecked_num()
|
|
|
+ centerManageMap.get(sta.getDept_id()).getChecked_num());
|
|
|
+ centerManageList.get(2).setOnsite_total_score(centerManageList.get(0).getOnsite_total_score()
|
|
|
+ + centerManageMap.get(sta.getDept_id()).getOnsite_total_score());
|
|
|
+ centerManageList.get(2).setThird_total_score(centerManageList.get(0).getThird_total_score()
|
|
|
+ + centerManageMap.get(sta.getDept_id()).getThird_total_score());
|
|
|
centerManageList.get(2).setFeeStationName("南通");
|
|
|
}
|
|
|
}
|
|
|
@@ -940,7 +963,7 @@ public class StatisticsServiceImpl implements StatisticsService_F {
|
|
|
|
|
|
@Override
|
|
|
public List<FwqStatisticsBean> getCheckedItemScoreInfo(FwqStatisticsBean obj) {
|
|
|
- List<FwqStatisticsBean> list = qzdStatisticsDao.selectCheckedItemScoreInfo(obj);
|
|
|
+ List<FwqStatisticsBean> list = fwqStatisticsDao.selectCheckedItemScoreInfo(obj);
|
|
|
Map<Long, Item> itemMap = commonService.getItemMap();
|
|
|
Map<Long, Organ> deptMap = commonService.getDeptMap();
|
|
|
for (FwqStatisticsBean sta : list) {
|
|
|
@@ -965,7 +988,7 @@ public class StatisticsServiceImpl implements StatisticsService_F {
|
|
|
public Map<String, List<FwqStatisticsBean>> get2CheckedItemScoreInfo(FwqStatisticsBean obj) {
|
|
|
|
|
|
Map<String, List<FwqStatisticsBean>> map = new HashMap<>();
|
|
|
- List<FwqStatisticsBean> objList = qzdStatisticsDao.selectCheckedItemScoreInfo(obj);
|
|
|
+ List<FwqStatisticsBean> objList = fwqStatisticsDao.selectCheckedItemScoreInfo(obj);
|
|
|
Map<Long, Item> itemMap = commonService.getItemMap();
|
|
|
Map<Long, Organ> deptMap = commonService.getDeptMap();
|
|
|
for (FwqStatisticsBean sta : objList) {
|
|
|
@@ -987,7 +1010,7 @@ public class StatisticsServiceImpl implements StatisticsService_F {
|
|
|
|
|
|
map.put("Tmth", objList);
|
|
|
obj.setMth(obj.getPrev_mth());
|
|
|
- objList = qzdStatisticsDao.selectCheckedItemScoreInfo(obj);
|
|
|
+ objList = fwqStatisticsDao.selectCheckedItemScoreInfo(obj);
|
|
|
|
|
|
for (FwqStatisticsBean sta : objList) {
|
|
|
sta.setItem_id(itemMap.get(sta.getCheck_item_id().longValue()).getParent_id().intValue());
|
|
|
@@ -1047,7 +1070,7 @@ public class StatisticsServiceImpl implements StatisticsService_F {
|
|
|
|
|
|
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy.MM");
|
|
|
//获取满足条件的服务区
|
|
|
- List<ServiceAreaStatistic> fwqStatistics = qzdStatisticsDao.selectlimituser(obj);
|
|
|
+ List<ServiceAreaStatistic> fwqStatistics = fwqStatisticsDao.selectlimituser(obj);
|
|
|
|
|
|
HashMap<Integer, List<ServiceAreaStatistic>> usm = new HashMap<>();
|
|
|
|
|
|
@@ -1116,20 +1139,34 @@ public class StatisticsServiceImpl implements StatisticsService_F {
|
|
|
}
|
|
|
|
|
|
private List<FwqStatisticsBean> reFeeStationScoreInfo(FwqStatisticsBean obj) {
|
|
|
- List<FwqStatisticsBean> scoreList = qzdStatisticsDao.selectFeeStationScoreInfo(obj);
|
|
|
+ List<FwqStatisticsBean> scoreList = fwqStatisticsDao.selectFeeStationScoreInfo(obj);
|
|
|
Map<Long, FwqStatisticsBean> feeStationMap = new HashMap<>();
|
|
|
|
|
|
for (FwqStatisticsBean feeObj : scoreList) {
|
|
|
if (!feeStationMap.containsKey(feeObj.getDept_id())) {
|
|
|
+ FwqCheckOther fwq = new FwqCheckOther();
|
|
|
+ fwq.setCheck_time_name(obj.getMth());
|
|
|
+ fwq.setDept_id(feeObj.getDept_id());
|
|
|
+ fwq.setCheck_type(11);
|
|
|
+ if(fwqStatisticsDao.getOtherCheckScore(fwq) != null){
|
|
|
+ feeObj.setOnsite_total_score(fwqStatisticsDao.getOtherCheckScore(fwq));
|
|
|
+ }else{
|
|
|
+ feeObj.setOnsite_total_score(0);
|
|
|
+ }
|
|
|
+ fwq.setCheck_type(12);
|
|
|
+ if(fwqStatisticsDao.getOtherCheckScore(fwq) != null){
|
|
|
+ feeObj.setOnsite_total_score(fwqStatisticsDao.getOtherCheckScore(fwq));
|
|
|
+ }else{
|
|
|
+ feeObj.setOnsite_total_score(0);
|
|
|
+ }
|
|
|
feeStationMap.put(feeObj.getDept_id(), feeObj);
|
|
|
}
|
|
|
}
|
|
|
// 需要补充的
|
|
|
List<FwqStatisticsBean> reList = new ArrayList<>();
|
|
|
-
|
|
|
// 获取所有的服务区
|
|
|
List<FwqStatisticsBean> feeStationList = new ArrayList<>();
|
|
|
- List<FeeStation> saList = commonService.getAllDeptByLayer("SA");
|
|
|
+ List<FeeStation> saList = commonService.getAllDeptByLayer("WG");
|
|
|
for (FeeStation sta : saList) {
|
|
|
FwqStatisticsBean obj2 = new FwqStatisticsBean();
|
|
|
obj2.setDept_id(Long.valueOf(sta.getDeptid()));
|
|
|
@@ -1149,4 +1186,166 @@ public class StatisticsServiceImpl implements StatisticsService_F {
|
|
|
scoreList.addAll(reList);
|
|
|
return scoreList;
|
|
|
}
|
|
|
+
|
|
|
+ public Map<Long, FwqStatisticsBean> getQWzdCheckedItemScoreInfo(List<User> userlist, 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 = fwqStatisticsDao.selectWGCheckNum(obj);
|
|
|
+ List<User> recordList = fwqStatisticsDao.selectRecordNum(obj);
|
|
|
+ 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());
|
|
|
+ mapStationInfos.put(Long.valueOf(sta.getId()), obj2);
|
|
|
+ }
|
|
|
+ List<FwqStatisticsBean> listCheckedScore = fwqStatisticsDao.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());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ 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 = fwqStatisticsDao.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 = fwqStatisticsDao.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;
|
|
|
+ }
|
|
|
+
|
|
|
+ public List<CheckNum> selectQzdCheckNum(FwqStatisticsBean obj){
|
|
|
+ List<CheckNum> objList = fwqStatisticsDao.selectQzdCheckNum(obj);
|
|
|
+ Map<Long, Item> itemMap = commonService.getItemMap();
|
|
|
+ Map<Long, Organ> deptMap = commonService.getDeptMap();
|
|
|
+ for (CheckNum sta : objList) {
|
|
|
+ obj.setDept_id(sta.getDept().longValue());
|
|
|
+ sta.setDeptName(deptMap.get(sta.getDept().longValue()).getOrganname());
|
|
|
+ sta.setIsApplyNunm(fwqStatisticsDao.selectQzdApplyNum(obj));
|
|
|
+ }
|
|
|
+ return objList;
|
|
|
+ }
|
|
|
}
|