Commit f9b3eb3e71bb564d91e986b22b4d332faddae01f

Authored by liquanyu
1 parent 2b1f675065

优惠劵统计

Showing 1 changed file with 18 additions and 17 deletions

platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/ReportServiceImpl.java View file @ f9b3eb3
... ... @@ -2475,6 +2475,7 @@
2475 2475 Map<String ,Object> qp = new HashMap<>();
2476 2476 for (String key : param.keySet())
2477 2477 {
  2478 + System.out.println(key + "===" + param.get(key));
2478 2479 qp.put(key, param.get(key));
2479 2480 }
2480 2481 final Map<String ,Object> queryParam = qp;
... ... @@ -2577,23 +2578,23 @@
2577 2578 map.put("sendUserIds", sendUserIds2);
2578 2579 map.put("people_send_count", sendUserIds2.size());
2579 2580  
2580   - List<String> usedUserIds = (List<String>) map.get("usedUserIds");
2581   - List<String> usedUserIds2 = new ArrayList<>();
2582   - if(CollectionUtils.isNotEmpty(usedUserIds)) {
2583   - param.put("hospitalFlag", "used_hospital_id");
2584   - List<Map<String, Object>> mulitPatienInfo = couponMapper.findMulitPatienInfo(param); /** 查询需要添加人数的总数, 例如A发了两次优惠券 那么这里返回需要加的值为1 */
2585   - for (Map<String, Object> m : mulitPatienInfo) {
2586   - Long count = (Long) m.get("count");
2587   - usedUserIds2.add((String) m.get("user_id"));
2588   - if(count > 1) {
2589   - for (int i = 1; i < count; i++) {
2590   - usedUserIds2.add(m.get("user_id") + "___" + (i + 1));
2591   - }
2592   - }
2593   - }
2594   - }
2595   - map.put("usedUserIds", usedUserIds2);
2596   - map.put("user_used_count", usedUserIds2.size());
  2581 +// List<String> usedUserIds = (List<String>) map.get("usedUserIds");
  2582 +// List<String> usedUserIds2 = new ArrayList<>();
  2583 +// if(CollectionUtils.isNotEmpty(usedUserIds)) {
  2584 +// param.put("hospitalFlag", "used_hospital_id");
  2585 +// List<Map<String, Object>> mulitPatienInfo = couponMapper.findMulitPatienInfo(param); /** 查询需要添加人数的总数, 例如A发了两次优惠券 那么这里返回需要加的值为1 */
  2586 +// for (Map<String, Object> m : mulitPatienInfo) {
  2587 +// Long count = (Long) m.get("count");
  2588 +// usedUserIds2.add((String) m.get("user_id"));
  2589 +// if(count > 1) {
  2590 +// for (int i = 1; i < count; i++) {
  2591 +// usedUserIds2.add(m.get("user_id") + "___" + (i + 1));
  2592 +// }
  2593 +// }
  2594 +// }
  2595 +// }
  2596 +// map.put("usedUserIds", usedUserIds2);
  2597 +// map.put("user_used_count", usedUserIds2.size());
2597 2598 }
2598 2599  
2599 2600 return RespBuilder.buildSuccess("couponReport", couponReport, "couponReportMap", couponReportMap, "reportModel", reportModal);