Commit 2bd6a1bc60c18bf472387bd340deb9d6a279ce54

Authored by litao
1 parent d5cc23922e

放开查询条件

Showing 2 changed files with 13 additions and 49 deletions

platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/ReportController.java View file @ 2bd6a1b
... ... @@ -186,7 +186,6 @@
186 186 HttpServletRequest request, HttpServletResponse resp) {
187 187 LoginContext loginState = (LoginContext) request.getAttribute("loginContext");
188 188 reportService.exportDoctor(startDate, endDate, childBirth, loginState.getId(), resp);
189   -// reportService.exportDoctor(startDate, endDate, childBirth, 753, resp);
190 189 }
191 190  
192 191  
193 192  
... ... @@ -208,10 +207,10 @@
208 207 @RequestMapping(value = "/coupon", method = RequestMethod.GET)
209 208 public BaseObjectResponse coupon(HttpServletRequest request, Date startDate, Date endDate,
210 209 String provinceId, String cityId, String areaId, String hospitalId, String tempId, String couponType) {
211   - /*Map<String, Object> param = CollectionUtils.createMap("userId", getUserId(request), "startDate", startDate,
  210 + Map<String, Object> param = CollectionUtils.createMap("userId", getUserId(request), "startDate", startDate,
212 211 "endDate", endDate, "hospitalId", hospitalId, "provinceId", provinceId, "cityId", cityId, "areaId",
213   - areaId, "tempId", tempId, "couponType", couponType);*/
214   - Map<String, Object> param = CollectionUtils.createMap("userId", getUserId(request),"hospitalId", "1000000094","tempId", tempId, "couponType", "1,2,3,4,5,6,7,8");
  212 + areaId, "tempId", tempId, "couponType", couponType);
  213 + /*Map<String, Object> param = CollectionUtils.createMap("userId", getUserId(request),"hospitalId", "1000000094","tempId", tempId, "couponType", "1,2,3,4,5,6,7,8");*/
215 214 return reportService.coupon(param);
216 215 }
217 216  
218 217  
... ... @@ -235,11 +234,11 @@
235 234 public BaseObjectResponse couponInfo(HttpServletRequest request, Date startDate, Date endDate, Integer type,
236 235 String provinceId, String cityId, String areaId, String hospitalId, String tempId, String couponType,
237 236 Integer page, Integer limit) {
238   - /* Map<String, Object> param = CollectionUtils.createMap("userId", getUserId(request), "startDate", startDate,
  237 + Map<String, Object> param = CollectionUtils.createMap("userId", getUserId(request), "startDate", startDate,
239 238 "endDate", endDate, "hospitalId", CollectionUtils.asList(hospitalId), "provinceId", provinceId, "cityId", cityId, "areaId", areaId, "type", type,
240   - "tempId", tempId, "couponType", CollectionUtils.asList(couponType), "currentPage", page, "pageSize", limit);*/
241   - Map<String, Object> param = CollectionUtils.createMap("userId", getUserId(request), "hospitalId", CollectionUtils.asList("216"), "type", type,
242   - "tempId", tempId, "couponType", CollectionUtils.asList("1,2,3,4,5,6,7,8"), "currentPage", page, "pageSize", limit);
  239 + "tempId", tempId, "couponType", CollectionUtils.asList(couponType), "currentPage", page, "pageSize", limit);
  240 + /* Map<String, Object> param = CollectionUtils.createMap("userId", getUserId(request), "hospitalId", CollectionUtils.asList("216"), "type", type,
  241 + "tempId", tempId, "couponType", CollectionUtils.asList("1,2,3,4,5,6,7,8"), "currentPage", page, "pageSize", limit);*/
243 242 return reportService.couponInfo(param);
244 243 }
245 244  
... ... @@ -247,7 +246,7 @@
247 246 * @param request
248 247 * @param startDate
249 248 * @param endDate
250   - * @param type 1 = 孕期优惠券使用统计, 2 = 产后优惠券使用统计, 3 = 儿童优惠券使用统计
  249 + * @param type 1 = 孕期优惠券使用统计详情导出, 2 = 产后优惠券使用统计详情导出, 3 = 儿童优惠券使用统计详情导出
251 250 * @param response
252 251 * @param provinceId
253 252 * @param cityId
254 253  
... ... @@ -264,11 +263,11 @@
264 263 public void couponInfoExport(HttpServletRequest request, Date startDate, Date endDate, Integer type, HttpServletResponse response,
265 264 String provinceId, String cityId, String areaId, String hospitalId, String tempId, String couponType,
266 265 Integer page, Integer limit) {
267   - /* Map<String, Object> param = CollectionUtils.createMap("userId", getUserId(request), "startDate", startDate,
  266 + Map<String, Object> param = CollectionUtils.createMap("userId", getUserId(request), "startDate", startDate,
268 267 "endDate", endDate, "hospitalId", hospitalId, "provinceId", provinceId, "cityId", cityId, "areaId", areaId, "type", type,
269   - "tempId", tempId, "couponType", CollectionUtils.asList(couponType), "currentPage", page, "pageSize", limit);*/
270   - Map<String, Object> param = CollectionUtils.createMap("userId", "1000000185", "hospitalId", CollectionUtils.asList("216"), "type", type,
271   - "tempId", tempId, "couponType", CollectionUtils.asList("1,2,3,4,5,6,7,8"), "currentPage", page, "pageSize", limit);
  268 + "tempId", tempId, "couponType", CollectionUtils.asList(couponType), "currentPage", page, "pageSize", limit);
  269 + /*Map<String, Object> param = CollectionUtils.createMap("userId", "1000000185", "hospitalId", CollectionUtils.asList("216"), "type", type,
  270 + "tempId", tempId, "couponType", CollectionUtils.asList("1,2,3,4,5,6,7,8"), "currentPage", page, "pageSize", limit);*/
272 271 reportService.exportCouponInfo(param, response);
273 272 }
274 273  
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/ReportServiceImpl.java View file @ 2bd6a1b
... ... @@ -22,7 +22,6 @@
22 22 import org.springframework.data.mongodb.core.query.Criteria;
23 23 import org.springframework.data.mongodb.core.query.Query;
24 24 import org.springframework.stereotype.Service;
25   -import scala.annotation.target.param;
26 25  
27 26 import javax.servlet.http.HttpServletResponse;
28 27 import java.sql.PreparedStatement;
29 28  
... ... @@ -537,42 +536,8 @@
537 536 exportPregnancy(couponInfos, response);
538 537 } else if(type == 2 || type == 3) { /** 产后和儿童类似 */
539 538 exportPostpartum(couponInfos, response);
540   - } /*else if(type == 3) { *//** 儿童 *//*
541   - exportChild(couponInfos, response);
542   - }*/
543   -
544   - }
545   -
546   - private void exportChild(List<Map<String, Object>> couponInfos, HttpServletResponse response) {
547   - Map<String, String> cnames = new LinkedHashMap<>();
548   - cnames.put("id", "#");
549   - cnames.put("checkDate", "产检日期");
550   - cnames.put("username", "姓名");
551   - cnames.put("patient_week", "建档孕周");
552   - cnames.put("patient_org_name", "建档机构");
553   - cnames.put("patient_docker_name", "建档医生");
554   - cnames.put("address", "居住地");
555   - cnames.put("census_register", "户籍地");
556   - cnames.put("phone", "联系电话");
557   -
558   - List<Map<String,Object>> results = new ArrayList<>();
559   - int i = 0;
560   - for (Map<String, Object> m : couponInfos) {
561   - Map<String, Object> result = new LinkedHashMap<>();
562   - result.put("id", ++i);
563   - result.put("checkDate", DateUtil.getyyyy_MM_dd((Date) m.get("checkDate")));
564   - result.put("username", m.get("username"));
565   - result.put("use_day", m.get("use_day"));
566   - result.put("type", couponDescMap.get(m.get("type")));
567   - result.put("coupon_desc", couponReportMap.get(m.get("type") + "_" + m.get("coupon_order")));
568   - result.put("sequence_id", m.get("sequence_id"));
569   - result.put("operatorOrgName", m.get("operatorOrgName"));
570   - result.put("doctorName", m.get("doctorName"));
571   - result.put("send_hospital", m.get("send_hospital"));
572   - result.put("phone", m.get("phone"));
573   - results.add(result);
574 539 }
575   - ResponseUtil.responseExcel(cnames, results, response);
  540 +
576 541 }
577 542  
578 543 private void exportPostpartum(List<Map<String, Object>> couponInfos, HttpServletResponse response) {