|
@@ -31,6 +31,7 @@ import com.xintong.visualinspection.bean.FeeStation;
|
|
|
import com.xintong.visualinspection.bean.Organ;
|
|
import com.xintong.visualinspection.bean.Organ;
|
|
|
import com.xintong.visualinspection.bean.StatisticsBean;
|
|
import com.xintong.visualinspection.bean.StatisticsBean;
|
|
|
import com.xintong.visualinspection.bean.StatisticsBo;
|
|
import com.xintong.visualinspection.bean.StatisticsBo;
|
|
|
|
|
+import com.xintong.visualinspection.bean.StatisticsFsWork;
|
|
|
import com.xintong.visualinspection.bean.User;
|
|
import com.xintong.visualinspection.bean.User;
|
|
|
import com.xintong.visualinspection.dao.cluster.DepartmentDao;
|
|
import com.xintong.visualinspection.dao.cluster.DepartmentDao;
|
|
|
import com.xintong.visualinspection.dao.cluster.UserInfoDao;
|
|
import com.xintong.visualinspection.dao.cluster.UserInfoDao;
|
|
@@ -947,9 +948,189 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
|
|
|
return list;
|
|
return list;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+
|
|
|
@Override
|
|
@Override
|
|
|
public CheckmanStatisticsBean getCheckmanStatisticInfo(CheckmanStatisticsBean obj) {
|
|
public CheckmanStatisticsBean getCheckmanStatisticInfo(CheckmanStatisticsBean obj) {
|
|
|
return statisticsDao.selectCheckManInfo(obj);
|
|
return statisticsDao.selectCheckManInfo(obj);
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ // 根据调剂获取用户列表
|
|
|
|
|
+ private List<User> getUsers(User user){
|
|
|
|
|
+ // 检索收费站的人员
|
|
|
|
|
+ Constant t = CodeUtil.getCodeByFlagAndValue("feestation_check_jobs", "1");
|
|
|
|
|
+ String[] postions = t.getCode_name().split(",");
|
|
|
|
|
+ List<Integer> positionList = new ArrayList<Integer>();
|
|
|
|
|
+ for(int i =0 ;i<postions.length;i++){
|
|
|
|
|
+ positionList.add(Integer.parseInt(postions[i]));
|
|
|
|
|
+ }
|
|
|
|
|
+ user.setPosition_ids(positionList);
|
|
|
|
|
+ return userInfoDao.getUsers(user);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 根据parant_organ_id 查询该下面的收费站列表
|
|
|
|
|
+ * @param id organ_id
|
|
|
|
|
+ * @return
|
|
|
|
|
+ */
|
|
|
|
|
+ private List<Organ> getFsStationList(Integer id){
|
|
|
|
|
+ // 道管中心
|
|
|
|
|
+ Organ organ =new Organ();
|
|
|
|
|
+ organ.setParentid(id);
|
|
|
|
|
+ return departmentDao.getOrgan(organ);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public List<StatisticsFsWork> getFsWorkStatisticInfo(StatisticsFsWork obj) {
|
|
|
|
|
+
|
|
|
|
|
+ List<User> userList =new ArrayList<>();
|
|
|
|
|
+ if(obj.getUser_id()!=null){
|
|
|
|
|
+ userList.add(userInfoDao.getOneDetail(obj.getUser_id().intValue()));
|
|
|
|
|
+ }else{
|
|
|
|
|
+ User user = new User();
|
|
|
|
|
+ if(obj.getDept_id()!=null){
|
|
|
|
|
+ user.setOrganid(obj.getDept_id().intValue());
|
|
|
|
|
+ }
|
|
|
|
|
+ if(obj.getParent_dept_id()!=null){
|
|
|
|
|
+ user.setParent_organid(obj.getParent_dept_id().intValue());
|
|
|
|
|
+ obj.setDept_list(getFsStationList(obj.getParent_dept_id().intValue()));
|
|
|
|
|
+ }
|
|
|
|
|
+ userList = getUsers(user);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ //
|
|
|
|
|
+ Map<Integer,StatisticsFsWork> map = new HashMap<>();
|
|
|
|
|
+ List<StatisticsFsWork> sFsList = statisticsDao.selectFsWork(obj);
|
|
|
|
|
+ for(int i=0;i<sFsList.size();i++){
|
|
|
|
|
+ map.put(sFsList.get(i).getUser_id().intValue(), sFsList.get(i));
|
|
|
|
|
+ }
|
|
|
|
|
+ //
|
|
|
|
|
+ Map<Integer,StatisticsFsWork> mapSta = new HashMap<>();
|
|
|
|
|
+ List<StatisticsFsWork> sfswList = statisticsDao.selectFsWorkGather(obj);
|
|
|
|
|
+ for(int i=0;i<sfswList.size();i++){
|
|
|
|
|
+ mapSta.put(sfswList.get(i).getUser_id().intValue(), sfswList.get(i));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ for(User userObj:userList){
|
|
|
|
|
+ if(mapSta.containsKey(userObj.getId())){
|
|
|
|
|
+ StatisticsFsWork staobj = map.get(userObj.getId());
|
|
|
|
|
+ staobj.setFeeStationName(userObj.getFee_station_name());
|
|
|
|
|
+ staobj.setPositionName(CacheUtil.getJobnameFromMap(new Long(userObj.getPositionid())));
|
|
|
|
|
+ staobj.setUserName(userObj.getTruename());
|
|
|
|
|
+ staobj.setWork_days( mapSta.get(userObj.getId()).getWork_days() );
|
|
|
|
|
+ staobj.setWork_minutes( mapSta.get(userObj.getId()).getWork_minutes() );
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ return sFsList;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public List<StatisticsFsWork> getUnregularFsWorkStatisticInfo(StatisticsFsWork obj) {
|
|
|
|
|
+ List<User> userList =new ArrayList<>();
|
|
|
|
|
+ if(obj.getUser_id()!=null){
|
|
|
|
|
+ userList.add(userInfoDao.getOneDetail(obj.getUser_id().intValue()));
|
|
|
|
|
+ }else{
|
|
|
|
|
+ User user = new User();
|
|
|
|
|
+ if(obj.getDept_id()!=null){
|
|
|
|
|
+ user.setOrganid(obj.getDept_id().intValue());
|
|
|
|
|
+ }
|
|
|
|
|
+ if(obj.getParent_dept_id()!=null){
|
|
|
|
|
+ user.setParent_organid(obj.getParent_dept_id().intValue());
|
|
|
|
|
+ obj.setDept_list(getFsStationList(obj.getParent_dept_id().intValue()));
|
|
|
|
|
+ }
|
|
|
|
|
+ userList = getUsers(user);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ //
|
|
|
|
|
+ Map<Integer,StatisticsFsWork> map = new HashMap<>();
|
|
|
|
|
+ List<StatisticsFsWork> sFsList = statisticsDao.selectFsUnregularWork(obj);
|
|
|
|
|
+ for(int i=0;i<sFsList.size();i++){
|
|
|
|
|
+ map.put(sFsList.get(i).getUser_id().intValue(), sFsList.get(i));
|
|
|
|
|
+ }
|
|
|
|
|
+ //
|
|
|
|
|
+ Map<Integer,StatisticsFsWork> mapSta = new HashMap<>();
|
|
|
|
|
+ List<StatisticsFsWork> sfswList = statisticsDao.selectFsUnregularWorkGather(obj);
|
|
|
|
|
+ for(int i=0;i<sfswList.size();i++){
|
|
|
|
|
+ mapSta.put(sfswList.get(i).getUser_id().intValue(), sfswList.get(i));
|
|
|
|
|
+ }
|
|
|
|
|
+ for(User userObj:userList){
|
|
|
|
|
+ if(mapSta.containsKey(userObj.getId())){
|
|
|
|
|
+ StatisticsFsWork staobj = map.get(userObj.getId());
|
|
|
|
|
+ staobj.setFeeStationName(userObj.getFee_station_name());
|
|
|
|
|
+ staobj.setPositionName(CacheUtil.getJobnameFromMap(new Long(userObj.getPositionid())));
|
|
|
|
|
+ staobj.setUserName(userObj.getTruename());
|
|
|
|
|
+ staobj.setWork_days( mapSta.get(userObj.getId()).getWork_days() );
|
|
|
|
|
+ staobj.setWork_minutes( mapSta.get(userObj.getId()).getWork_minutes() );
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ return sFsList;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public List<StatisticsFsWork> getFsWorkPerson(StatisticsFsWork obj) {
|
|
|
|
|
+
|
|
|
|
|
+ List<User> userList =new ArrayList<>();
|
|
|
|
|
+ if(obj.getUser_id()!=null){
|
|
|
|
|
+ userList.add(userInfoDao.getOneDetail(obj.getUser_id().intValue()));
|
|
|
|
|
+ }else{
|
|
|
|
|
+ User user = new User();
|
|
|
|
|
+ if(obj.getDept_id()!=null){
|
|
|
|
|
+ user.setOrganid(obj.getDept_id().intValue());
|
|
|
|
|
+ }
|
|
|
|
|
+ if(obj.getParent_dept_id()!=null){
|
|
|
|
|
+ user.setParent_organid(obj.getParent_dept_id().intValue());
|
|
|
|
|
+ obj.setDept_list(getFsStationList(obj.getParent_dept_id().intValue()));
|
|
|
|
|
+ }
|
|
|
|
|
+ userList = getUsers(user);
|
|
|
|
|
+ }
|
|
|
|
|
+ Map<Integer,StatisticsFsWork> map = new HashMap<>();
|
|
|
|
|
+ List<StatisticsFsWork> sFsList = statisticsDao.selectFsWorkGatherGroupByWorkType(obj);
|
|
|
|
|
+ for(int i=0;i<sFsList.size();i++){
|
|
|
|
|
+ map.put(sFsList.get(i).getUser_id().intValue(), sFsList.get(i));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ for(User userObj:userList){
|
|
|
|
|
+ if(map.containsKey(userObj.getId())){
|
|
|
|
|
+ StatisticsFsWork staobj = map.get(userObj.getId());
|
|
|
|
|
+ staobj.setFeeStationName(userObj.getFee_station_name());
|
|
|
|
|
+ staobj.setPositionName(CacheUtil.getJobnameFromMap(new Long(userObj.getPositionid())));
|
|
|
|
|
+ staobj.setUserName(userObj.getTruename());
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ return sFsList;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public List<StatisticsFsWork> getFsWorkUnregularWorkPerson(StatisticsFsWork obj) {
|
|
|
|
|
+ List<User> userList =new ArrayList<>();
|
|
|
|
|
+ if(obj.getUser_id()!=null){
|
|
|
|
|
+ userList.add(userInfoDao.getOneDetail(obj.getUser_id().intValue()));
|
|
|
|
|
+ }else{
|
|
|
|
|
+ User user = new User();
|
|
|
|
|
+ if(obj.getDept_id()!=null){
|
|
|
|
|
+ user.setOrganid(obj.getDept_id().intValue());
|
|
|
|
|
+ }
|
|
|
|
|
+ if(obj.getParent_dept_id()!=null){
|
|
|
|
|
+ user.setParent_organid(obj.getParent_dept_id().intValue());
|
|
|
|
|
+ obj.setDept_list(getFsStationList(obj.getParent_dept_id().intValue()));
|
|
|
|
|
+ }
|
|
|
|
|
+ userList = getUsers(user);
|
|
|
|
|
+ }
|
|
|
|
|
+ Map<Integer,StatisticsFsWork> map = new HashMap<>();
|
|
|
|
|
+ List<StatisticsFsWork> sFsList = statisticsDao.selectFsUnregularWorkGatherGroupByWorkType(obj);
|
|
|
|
|
+ for(int i=0;i<sFsList.size();i++){
|
|
|
|
|
+ map.put(sFsList.get(i).getUser_id().intValue(), sFsList.get(i));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ for(User userObj:userList){
|
|
|
|
|
+ if(map.containsKey(userObj.getId())){
|
|
|
|
|
+ StatisticsFsWork staobj = map.get(userObj.getId());
|
|
|
|
|
+ staobj.setFeeStationName(userObj.getFee_station_name());
|
|
|
|
|
+ staobj.setPositionName(CacheUtil.getJobnameFromMap(new Long(userObj.getPositionid())));
|
|
|
|
|
+ staobj.setUserName(userObj.getTruename());
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ return sFsList;
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
}
|
|
}
|