|
|
@@ -430,27 +430,49 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
|
|
|
it.remove();
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- exportExcel("温馨服务考核情况反馈表", "employee_order", listStatistic, resp);
|
|
|
+ Map<String,Object> map = new HashMap<String,Object>();
|
|
|
+ map.put("list", listStatistic);
|
|
|
+ exportExcel("温馨服务考核情况反馈表", "employee_order", map, resp);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public void getFeeStationCheckedScore(StatisticsBean obj, HttpServletRequest req, HttpServletResponse resp) {
|
|
|
List<StatisticsBean> list = getFeeStationCheckedScore(obj);
|
|
|
+ int totalMan=0,totalcheckedMan=0,totalcheckedCount=0,total0=0,total15=0,total50=0,totalOver50=0,totalAll = 0;
|
|
|
for (StatisticsBean st : list) {
|
|
|
st.setCheck_no_score(st.getChecked_people_num() - st.getScore_fifteen() - st.getScore_fifty()
|
|
|
- st.getScore_over_fifty());
|
|
|
st.setCheck_score_avg(
|
|
|
(st.getChecked_num() != 0) ? st.getAll_check_score() / (st.getChecked_num() + 0.0f) : 0.00f);
|
|
|
st.setScore_avg(String.format("%.2f", 1000.0 - st.getCheck_score_avg()));
|
|
|
+ totalMan+=st.getPeople_num();
|
|
|
+ totalcheckedMan+=st.getChecked_people_num();
|
|
|
+ totalcheckedCount+=st.getChecked_num();
|
|
|
+ total0+=(st.getChecked_people_num()-st.getScore_fifteen()-st.getScore_fifty()-st.getScore_over_fifty());
|
|
|
+ total15+=st.getScore_fifteen();
|
|
|
+ total50+=st.getScore_fifty();
|
|
|
+ totalOver50+=st.getScore_over_fifty();
|
|
|
+ totalAll+=st.getAll_check_score();
|
|
|
}
|
|
|
// 处理数据
|
|
|
- exportExcel("温馨服务检查千分考核扣分情况汇总表", "checked_info", list, resp);
|
|
|
+ Map<String,Object> map = new HashMap<String,Object>();
|
|
|
+ map.put("list", list);
|
|
|
+ map.put("totalMan", totalMan);
|
|
|
+ map.put("totalcheckedMan", totalcheckedMan);
|
|
|
+ map.put("totalcheckedCount", totalcheckedCount);
|
|
|
+ map.put("total0", total0);
|
|
|
+ map.put("total15", total15);
|
|
|
+ map.put("total50", total50);
|
|
|
+ map.put("totalOver50", totalOver50);
|
|
|
+ map.put("totalAll", totalAll);
|
|
|
+ exportExcel("温馨服务检查千分考核扣分情况汇总表", "checked_info", map, resp);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public void getFeeStationCheckItemScore(StatisticsBean obj, HttpServletRequest req, HttpServletResponse resp) {
|
|
|
List<StatisticsBean> list = getFeeStationCheckItemScore(obj);
|
|
|
+ int totalMan=0,totalcheckedMan=0,totalcheckedCount=0,totalAll=0;
|
|
|
+ Map<String,Integer> scoreTypeMap = new HashMap<String,Integer>();
|
|
|
// 处理数据
|
|
|
for (int i = 0; i < list.size(); i++) {
|
|
|
StatisticsBean st = list.get(i);
|
|
|
@@ -466,8 +488,36 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
|
|
|
st.getSeq_checked_score().add(getItemScore2(st, "工作纪律"));
|
|
|
st.getSeq_checked_score().add(getItemScore2(st, "便民服务"));
|
|
|
st.getSeq_checked_score().add(getItemScore2(st, "安全管理"));
|
|
|
- }
|
|
|
- exportExcel("温馨服务检查情况统计表", "checked_item_info", list, resp);
|
|
|
+ totalMan+=st.getPeople_num();
|
|
|
+ totalcheckedMan+=st.getChecked_people_num();
|
|
|
+ totalcheckedCount+=st.getChecked_num();
|
|
|
+ totalAll+=st.getAll_check_score();
|
|
|
+ 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);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ Map<String,Object> map = new HashMap<String,Object>();
|
|
|
+ map.put("totalMan", totalMan);
|
|
|
+ map.put("totalcheckedMan", totalcheckedMan);
|
|
|
+ map.put("totalcheckedCount", totalcheckedCount);
|
|
|
+ List<Constant> typeList = CodeUtil.getCodeByFlag("statistic_check_item_type");
|
|
|
+ for(Constant c:typeList){
|
|
|
+ if(scoreTypeMap.containsKey(c.getCode_name())){
|
|
|
+ scoreTypeMap.put(c.getRemark(), scoreTypeMap.get(c.getCode_name()));
|
|
|
+ }else{
|
|
|
+ scoreTypeMap.put(c.getRemark(), 0);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ map.putAll(scoreTypeMap);
|
|
|
+ map.put("totalAll", totalAll);
|
|
|
+ map.put("list", list);
|
|
|
+ exportExcel("温馨服务检查情况统计表", "checked_item_info", map, resp);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
@@ -480,15 +530,21 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
|
|
|
}
|
|
|
list.get(i).setId(i + 1);
|
|
|
}
|
|
|
- exportExcel(monthName + "月份收费站申诉情况统计", "appeal_info", list, resp);
|
|
|
+ Map<String,Object> map = new HashMap<String,Object>();
|
|
|
+ map.put("list", list);
|
|
|
+ exportExcel(monthName + "月份收费站申诉情况统计", "appeal_info", map, resp);
|
|
|
}
|
|
|
|
|
|
- private void exportExcel(String fileName, String excelTemplateName, List<?> list, HttpServletResponse resp) {
|
|
|
+ private void exportExcel(String fileName, String excelTemplateName, Map<String,Object> map, HttpServletResponse resp) {
|
|
|
String path = "./" + fileName + ".xls";
|
|
|
try (InputStream is = this.getClass().getResourceAsStream("/" + excelTemplateName + ".xls")) {
|
|
|
try (OutputStream os = new FileOutputStream(path)) {
|
|
|
Context context = new Context();
|
|
|
- context.putVar("list", list);
|
|
|
+// context.putVar("list", map.get("list"));
|
|
|
+// context.putVar("totalMan", map.get("totalMan"));
|
|
|
+ for(String key:map.keySet()){
|
|
|
+ context.putVar(key, map.get(key));
|
|
|
+ }
|
|
|
JxlsHelper.getInstance().processTemplate(is, os, context);
|
|
|
}
|
|
|
Thread.sleep(1000);
|
|
|
@@ -1322,6 +1378,8 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
|
|
|
formatter.format(sta.getStart_date()) + formatter2.format(sta.getEnd_date()));
|
|
|
}
|
|
|
}
|
|
|
- exportExcel("稽查人员工作量统计", "check_info", list, resp);
|
|
|
+ Map<String,Object> map = new HashMap<String,Object>();
|
|
|
+ map.put("list", list);
|
|
|
+ exportExcel("稽查人员工作量统计", "check_info", map, resp);
|
|
|
}
|
|
|
}
|