|
|
@@ -15,6 +15,7 @@ import org.springframework.stereotype.Service;
|
|
|
import com.xintong.visualinspection.bean.StatisticsBean;
|
|
|
import com.xintong.visualinspection.bean.StatisticsBo;
|
|
|
import com.xintong.visualinspection.bean.User;
|
|
|
+import com.xintong.visualinspection.dao.cluster.DepartmentDao;
|
|
|
import com.xintong.visualinspection.dao.master.StatisticsDao;
|
|
|
import com.xintong.visualinspection.service.BaseService;
|
|
|
import com.xintong.visualinspection.service.StatisticsService;
|
|
|
@@ -32,6 +33,9 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
|
|
|
@Autowired
|
|
|
private StatisticsDao statisticsDao ;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private DepartmentDao departmentDao ;
|
|
|
+
|
|
|
@Override
|
|
|
public List<StatisticsBo> getEmployeeCheckedInfo(StatisticsBean obj) {
|
|
|
// 查看是否有部门id
|
|
|
@@ -87,5 +91,46 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
|
|
|
|
|
|
return lists;
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public List<StatisticsBean> getFeeStationCheckedScore(StatisticsBean obj) {
|
|
|
+ // 获取收费站信息收费站人数
|
|
|
+ List<StatisticsBean> lists = departmentDao.selectFeeStationGroup(obj);
|
|
|
+ Map<Long,StatisticsBean> mapStationInfos = new HashMap<>();
|
|
|
+ for(StatisticsBean sta:lists){
|
|
|
+ mapStationInfos.put(sta.getDept_id(), sta);
|
|
|
+ }
|
|
|
+
|
|
|
+ // 检索受检次数
|
|
|
+ List<StatisticsBean> listCheckNum = statisticsDao.selectFeeStationCheckNum(obj);
|
|
|
+ for(StatisticsBean sta:listCheckNum){
|
|
|
+ if(mapStationInfos.containsKey(sta.getDept_id())){
|
|
|
+ mapStationInfos.get(sta.getDept_id()).setChecked_num(sta.getChecked_num());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ List<StatisticsBean> listCheckedScore = statisticsDao.selectFeeStationCheckedScore(obj);
|
|
|
+ for(StatisticsBean sta:listCheckedScore){
|
|
|
+ if(mapStationInfos.containsKey(sta.getDept_id())){
|
|
|
+ StatisticsBean statis = mapStationInfos.get(sta.getDept_id());
|
|
|
+ statis.setAll_check_score( statis.getAll_check_score()+sta.getScore());
|
|
|
+ if(sta.getScore() <= 15){
|
|
|
+ statis.setScore_fifteen(statis.getScore_fifteen()+1);
|
|
|
+ }else if(sta.getScore()<=50){
|
|
|
+ statis.setScore_fifty(statis.getScore_fifty()+1);
|
|
|
+ }else{
|
|
|
+ statis.setScore_over_fifty(statis.getScore_over_fifty()+1);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ return new ArrayList<>(mapStationInfos.values());
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public List<StatisticsBean> getFeeStationCheckItemScore(StatisticsBean obj) {
|
|
|
+ // TODO Auto-generated method stub
|
|
|
+ return null;
|
|
|
+ }
|
|
|
|
|
|
}
|