|
|
@@ -365,15 +365,27 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
|
|
|
|
|
|
user.setInvalidtime(obj.getStart_date());
|
|
|
List<StatisticsBean> lists = departmentDao.selectFeeStationGroup(user);
|
|
|
+ lists = getDeptData(lists,obj);
|
|
|
Map<Long, StatisticsBean> mapStationInfos = new HashMap<>();
|
|
|
- for(StatisticsBean sb :lists){
|
|
|
- Organ org = new Organ();
|
|
|
- long deptId = sb.getDept_id();
|
|
|
- org.setId((int)deptId);
|
|
|
- List<Organ> dept = departmentDao.getOrgan(org);
|
|
|
- int parentId = dept.get(0).getParentid();
|
|
|
- sb.setParent_dept_id((long)parentId);
|
|
|
- }
|
|
|
+ if(lists.size() > 25){
|
|
|
+ for(StatisticsBean sb :lists){
|
|
|
+ Organ org = new Organ();
|
|
|
+ long deptId = sb.getDept_id();
|
|
|
+ org.setId((int)deptId);
|
|
|
+ List<Organ> dept = departmentDao.getOrgan(org);
|
|
|
+ int parentId = dept.get(0).getParentid();
|
|
|
+ sb.setParent_dept_id((long)parentId);
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ for(StatisticsBean sb :lists){
|
|
|
+ Organ org = new Organ();
|
|
|
+ long deptId = sb.getDept_id();
|
|
|
+ org.setId((int)deptId);
|
|
|
+ List<Organ> dept = departmentDao.getOldOrgan(org);
|
|
|
+ int parentId = dept.get(0).getParentid();
|
|
|
+ sb.setParent_dept_id((long)parentId);
|
|
|
+ }
|
|
|
+ }
|
|
|
for (StatisticsBean sta : lists) {
|
|
|
if (sta.getParent_dept_id() == 30) {
|
|
|
sta.setId(1);
|
|
|
@@ -484,16 +496,27 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
|
|
|
user.setPosition_ids(positionList);
|
|
|
user.setInvalidtime(obj.getStart_date());
|
|
|
List<StatisticsBean> lists = departmentDao.selectFeeStationGroup(user);
|
|
|
-
|
|
|
+ lists = getDeptData(lists,obj);
|
|
|
Map<Long, StatisticsBean> mapStationInfos = new HashMap<>();
|
|
|
- for(StatisticsBean sb :lists){
|
|
|
- Organ org = new Organ();
|
|
|
- long deptId = sb.getDept_id();
|
|
|
- org.setId((int)deptId);
|
|
|
- List<Organ> dept = departmentDao.getOrgan(org);
|
|
|
- int parentId = dept.get(0).getParentid();
|
|
|
- sb.setParent_dept_id((long)parentId);
|
|
|
- }
|
|
|
+ if(lists.size() >25){
|
|
|
+ for(StatisticsBean sb :lists){
|
|
|
+ Organ org = new Organ();
|
|
|
+ long deptId = sb.getDept_id();
|
|
|
+ org.setId((int)deptId);
|
|
|
+ List<Organ> dept = departmentDao.getOrgan(org);
|
|
|
+ int parentId = dept.get(0).getParentid();
|
|
|
+ sb.setParent_dept_id((long)parentId);
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ for(StatisticsBean sb :lists){
|
|
|
+ Organ org = new Organ();
|
|
|
+ long deptId = sb.getDept_id();
|
|
|
+ org.setId((int)deptId);
|
|
|
+ List<Organ> dept = departmentDao.getOldOrgan(org);
|
|
|
+ int parentId = dept.get(0).getParentid();
|
|
|
+ sb.setParent_dept_id((long)parentId);
|
|
|
+ }
|
|
|
+ }
|
|
|
for (StatisticsBean sta : lists) {
|
|
|
if (sta.getParent_dept_id() == 30) {
|
|
|
sta.setId(1);
|
|
|
@@ -706,7 +729,11 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
|
|
|
map.put("total50", total50);
|
|
|
map.put("totalOver50", totalOver50);
|
|
|
map.put("totalAll", totalAll);
|
|
|
- exportExcel("温馨服务检查千分考核扣分情况汇总表", "checked_info", map, resp);
|
|
|
+ if(list.size() < 25){
|
|
|
+ exportExcel("温馨服务检查千分考核扣分情况汇总表", "checked_info_old", map, resp);
|
|
|
+ }else{
|
|
|
+ exportExcel("温馨服务检查千分考核扣分情况汇总表", "checked_info", map, resp);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
@@ -759,7 +786,11 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
|
|
|
map.putAll(scoreTypeMap);
|
|
|
map.put("totalAll", totalAll);
|
|
|
map.put("list", list);
|
|
|
- exportExcel("温馨服务检查情况统计表", "checked_item_info", map, resp);
|
|
|
+ if(list.size() < 25){
|
|
|
+ exportExcel("温馨服务检查情况统计表", "checked_item_info_old", map, resp);
|
|
|
+ }else{
|
|
|
+ exportExcel("温馨服务检查情况统计表", "checked_item_info", map, resp);
|
|
|
+ };
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
@@ -833,6 +864,7 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
|
|
|
organ.setParentid(obj.getDept_id().intValue());
|
|
|
|
|
|
List<Organ> list = departmentDao.getOrgan(organ);
|
|
|
+ list = getOrganData(list,obj);
|
|
|
// 将导管中心下的收费站部门id 列表放入到list中
|
|
|
obj.setDept_list(list);
|
|
|
}
|
|
|
@@ -847,6 +879,7 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
|
|
|
} else if (obj.getQueryType() != null && obj.getQueryType() == 2) {
|
|
|
// 收费站
|
|
|
feeStationList = userInfoDao.getUsersCountList();
|
|
|
+ feeStationList = getDeptData(feeStationList,obj);
|
|
|
if (feeStationList != null && feeStationList.size() > 0) {
|
|
|
for (StatisticsBean sta : feeStationList) {
|
|
|
if (obj.getDept_id() + 0L == sta.getDept_id()) {
|
|
|
@@ -857,6 +890,7 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
|
|
|
} else {
|
|
|
// 总公司
|
|
|
feeStationList = userInfoDao.getUsersCountList();
|
|
|
+ feeStationList = getDeptData(feeStationList,obj);
|
|
|
if (feeStationList != null && feeStationList.size() > 0) {
|
|
|
for (StatisticsBean sta : feeStationList) {
|
|
|
people_num += sta.getPeople_num();
|
|
|
@@ -935,8 +969,8 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
|
|
|
@Override
|
|
|
public List<StatisticsBean> getSingleFeeStationScoreInfo(StatisticsBean obj) {
|
|
|
List<StatisticsBean> resultList = new ArrayList<>();
|
|
|
-
|
|
|
List<StatisticsBean> scoreList = reFeeStationScoreInfo(obj);
|
|
|
+ scoreList = getDeptData(scoreList,obj);
|
|
|
Map<Long, StatisticsBean> centerManageMap = new HashMap<>();
|
|
|
for (StatisticsBean sta : scoreList) {
|
|
|
if (!centerManageMap.containsKey(sta.getDept_id())) {
|
|
|
@@ -999,7 +1033,12 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
|
|
|
List<StatisticsBean> lists = departmentDao.selectFeeStationGroup(user);
|
|
|
int i = 0;
|
|
|
for (StatisticsBean sta : lists) {
|
|
|
- if (i < 7) {
|
|
|
+ Organ organ = new Organ();
|
|
|
+ long deptId = sta.getDept_id();
|
|
|
+ int dept = (int)deptId;
|
|
|
+ organ.setId(dept);
|
|
|
+ int parentId = departmentDao.getOrgan(organ).get(0).getParentid();
|
|
|
+ if (parentId == 30) {
|
|
|
centerManageList.get(0).setAll_check_score(centerManageList.get(0).getAll_check_score()
|
|
|
+ centerManageMap.get(sta.getDept_id()).getAll_check_score());
|
|
|
centerManageList.get(0).setChecked_num(centerManageList.get(0).getChecked_num()
|
|
|
@@ -1007,15 +1046,15 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
|
|
|
centerManageList.get(0).setPeople_num(centerManageList.get(0).getPeople_num()
|
|
|
+ centerManageMap.get(sta.getDept_id()).getPeople_num());
|
|
|
|
|
|
- centerManageList.get(0).setFeeStationName("连云港");
|
|
|
- } else if (i < 13) {
|
|
|
+ centerManageList.get(0).setFeeStationName("连云港管理处");
|
|
|
+ } else if (parentId == 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).setPeople_num(centerManageList.get(1).getPeople_num()
|
|
|
+ centerManageMap.get(sta.getDept_id()).getPeople_num());
|
|
|
- centerManageList.get(1).setFeeStationName("盐城");
|
|
|
+ centerManageList.get(1).setFeeStationName("连盐管理处");
|
|
|
} else {
|
|
|
centerManageList.get(2).setAll_check_score(centerManageList.get(2).getAll_check_score()
|
|
|
+ centerManageMap.get(sta.getDept_id()).getAll_check_score());
|
|
|
@@ -1023,7 +1062,7 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
|
|
|
+ centerManageMap.get(sta.getDept_id()).getChecked_num());
|
|
|
centerManageList.get(2).setPeople_num(centerManageList.get(2).getPeople_num()
|
|
|
+ centerManageMap.get(sta.getDept_id()).getPeople_num());
|
|
|
- centerManageList.get(2).setFeeStationName("南通");
|
|
|
+ centerManageList.get(2).setFeeStationName("盐通管理处");
|
|
|
}
|
|
|
i++;
|
|
|
}
|
|
|
@@ -1941,6 +1980,7 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
|
|
|
user.setPosition_ids(positionList);
|
|
|
user.setInvalidtime(obj.getStart_date());
|
|
|
List<StatisticsBean> lists = departmentDao.selectFeeStationGroup(user);
|
|
|
+ lists = getDeptData(lists,obj);
|
|
|
Map<Long, StatisticsBean> mapStationInfos = new HashMap<>();
|
|
|
int i = 0;
|
|
|
for (StatisticsBean sta : lists) {
|
|
|
@@ -3106,4 +3146,44 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
|
|
|
return map;
|
|
|
}
|
|
|
|
|
|
+ public List<StatisticsBean> getDeptData(List<StatisticsBean> list,StatisticsBean sObj){
|
|
|
+ List<StatisticsBean> lists =new ArrayList<StatisticsBean>();
|
|
|
+ for(StatisticsBean bean : list){
|
|
|
+ Organ obj = new Organ();
|
|
|
+ long deptId = bean.getDept_id();
|
|
|
+ obj.setId((int)deptId);
|
|
|
+ Organ organ = departmentDao.getOrgan(obj).get(0);
|
|
|
+ Date date = new Date();
|
|
|
+ if(sObj.getStart_date() == null) {
|
|
|
+ //Date date1=null;
|
|
|
+ SimpleDateFormat simdate1 = new SimpleDateFormat("yyyy/MM/dd");
|
|
|
+ String str1 = sObj.getMth() + "/01";
|
|
|
+ try {
|
|
|
+ sObj.setStart_date(simdate1.parse(str1));
|
|
|
+ } catch (Exception e) {
|
|
|
+// TODO Auto-generated catch block
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ System.out.print(organ.getCreattime().getTime()+"-------------"+ sObj.getStart_date().getTime());
|
|
|
+ if(organ.getCreattime().getTime() < sObj.getStart_date().getTime()){
|
|
|
+ lists.add(bean);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ return lists;
|
|
|
+ }
|
|
|
+
|
|
|
+ public List<Organ> getOrganData(List<Organ> list,StatisticsBean sObj){
|
|
|
+ List<Organ> lists =new ArrayList<Organ>();
|
|
|
+ for(Organ bean : list){
|
|
|
+ Organ obj = new Organ();
|
|
|
+ Date date = new Date();
|
|
|
+ if(bean.getCreattime().getTime() < sObj.getStart_date().getTime()){
|
|
|
+ lists.add(bean);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return lists;
|
|
|
+ }
|
|
|
+
|
|
|
}
|