Report95598ServiceImpl.java 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. package com.minpay.common.service.impl;
  2. import com.minpay.common.constant.Constant;
  3. import com.minpay.common.service.IReport95598Service;
  4. import com.minpay.common.service.IReportService;
  5. import com.minpay.common.util.*;
  6. import com.minpay.db.table.mapper.*;
  7. import com.minpay.db.table.model.*;
  8. import com.minpay.db.table.own.mapper.IReportBatchMapper;
  9. import com.minpay.db.table.own.mapper.IZb95598ReportMapper;
  10. import com.minpay.db.table.own.mapper.ReportServiceMapper;
  11. import com.startup.minpay.frame.business.MINHttpServletRequestContext;
  12. import com.startup.minpay.frame.exception.MINBusinessException;
  13. import com.startup.minpay.frame.jdbc.MINRowBounds;
  14. import com.startup.minpay.frame.service.base.IMINDataBaseService;
  15. import com.startup.minpay.frame.service.base.Service;
  16. import com.startup.minpay.frame.target.MINComponent;
  17. import net.sf.json.JSONArray;
  18. import net.sf.json.JSONObject;
  19. import org.apache.commons.fileupload.FileItem;
  20. import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
  21. import java.io.IOException;
  22. import java.lang.reflect.InvocationTargetException;
  23. import java.text.ParseException;
  24. import java.util.*;
  25. @MINComponent
  26. public class Report95598ServiceImpl implements IReport95598Service {
  27. @Override
  28. public Map<String, Object> reportNeedDetail(Map<String, Object> param) throws MINBusinessException {
  29. String range = (String)param.get("range");
  30. String timeRange = (String)param.get("timeRange");
  31. String reportTypeId = (String)param.get("reportTypeId");
  32. MINHttpServletRequestContext request = (MINHttpServletRequestContext)param.get("request");
  33. Map<String, Object> resMap = new HashMap<String, Object>();
  34. if(Constant.REPORT_TYPE_20.equals(reportTypeId)){//95598日报
  35. Map<String,Object> mm = new HashMap<String,Object>();
  36. mm.put("range",range);
  37. mm.put("timeRange",timeRange);
  38. mm.put("reportTypeId",reportTypeId);
  39. Map<String,Object> resList = reportType95598Zb(mm, request);
  40. resMap.put("resList", resList);
  41. }else if(Constant.REPORT_TYPE_21.equals(reportTypeId)){//95598日汇报
  42. Map<String,Object> mm = new HashMap<String,Object>();
  43. mm.put("range",range);
  44. mm.put("timeRange",timeRange);
  45. mm.put("reportTypeId",reportTypeId);
  46. Map<String,Object> resList = reportType95598Zb(mm, request);
  47. resMap.put("resList", resList);
  48. }else if(Constant.REPORT_TYPE_22.equals(reportTypeId)){//95598周报
  49. Map<String,Object> mm = new HashMap<String,Object>();
  50. mm.put("range",range);
  51. mm.put("timeRange",timeRange);
  52. mm.put("reportTypeId",reportTypeId);
  53. Map<String,Object> resList = reportType95598Zb(mm, request);
  54. resMap.put("resList", resList);
  55. }else if(Constant.REPORT_TYPE_23.equals(reportTypeId)){//95598日汇报
  56. Map<String,Object> mm = new HashMap<String,Object>();
  57. mm.put("range",range);
  58. mm.put("timeRange",timeRange);
  59. mm.put("reportTypeId",reportTypeId);
  60. Map<String,Object> resList = reportType95598Zb(mm, request);
  61. resMap.put("resList", resList);
  62. }
  63. return resMap;
  64. }
  65. /**
  66. * 95598周报
  67. * @param mm
  68. * @param request
  69. * @return
  70. */
  71. private Map<String, Object> reportType95598Zb(Map<String, Object> mm, MINHttpServletRequestContext request) throws MINBusinessException {
  72. IMINDataBaseService db = Service.lookup(IMINDataBaseService.class);
  73. String range = StringUtil.ObjectToString(mm.get("range"));
  74. String timeRange = StringUtil.ObjectToString(mm.get("timeRange"));
  75. String start = StringUtil.getStartAndEndDatetime(range,timeRange,"1");
  76. String end = StringUtil.getStartAndEndDatetime(range,timeRange,"2");
  77. mm.put("start",start);
  78. mm.put("end",end);
  79. //95598业务受理情况
  80. //户数数据
  81. List<Map<String,String>> list = db.getMybatisMapper(IZb95598ReportMapper.class).selectBeforeIndex(mm);
  82. //分类汇总数据
  83. List<Map<String,String>> list2 = db.getMybatisMapper(IZb95598ReportMapper.class).selectFltjYwsl(mm);
  84. return null;
  85. }
  86. @Override
  87. public void init() throws MINBusinessException {
  88. }
  89. }