Commit 15064acc2ef9cd70ad9160a4a8c8e1f410d4436b
1 parent
fc00b4ef27
Exists in
master
and in
6 other branches
发放人数详情新增
Showing 3 changed files with 38 additions and 22 deletions
platform-biz-service/src/main/java/com/lyms/platform/permission/dao/master/CouponMapper.java
View file @
15064ac
platform-biz-service/src/main/resources/mainOrm/master/CouponMapper.xml
View file @
15064ac
... | ... | @@ -420,5 +420,13 @@ |
420 | 420 | #{type} |
421 | 421 | </foreach> |
422 | 422 | </select> |
423 | + | |
424 | + <select id="findUserSendInfo" parameterType="map" resultType="map"> | |
425 | + select a.user_id, a.create_date, e.name as username, d.name as send_hospital, f.name as doctoer_name | |
426 | + from | |
427 | + coupon_info a, coupon_template b, coupon_type c, organization d, users e, users f | |
428 | + where a.coupon_template_id = b.id and b.type_id = c.id | |
429 | + and a.create_hospital_id = d.id and a.user_id = e.id and a.create_user_id = f.id | |
430 | + </select> | |
423 | 431 | </mapper> |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/ReportServiceImpl.java
View file @
15064ac
... | ... | @@ -672,30 +672,36 @@ |
672 | 672 | if(param.get("hospitalId") == null) { |
673 | 673 | return RespBuilder.buildSuccess(new PageResult(0, (Integer) param.get("currentPage") ,(Integer) param.get("pageSize"), CollectionUtils.createMap("couponInfos", new ArrayList<>()))); |
674 | 674 | } |
675 | - List<Map<String, Object>> couponInfos = couponMapper.couponInfo(param); | |
676 | - if(CollectionUtils.isNotEmpty(couponInfos)) { | |
677 | - for (Map<String, Object> couponInfo : couponInfos) { | |
678 | - String desc = (String) couponReportMap.get(couponInfo.get("type") + "_" + couponInfo.get("coupon_order")); | |
679 | - if(StringUtils.isNotBlank(desc)) { | |
680 | - /** <div class='ag-double-line'>儿童保健券(五)<div>使用人次</div></div> */ | |
681 | - String s = desc.replace("使用人次", "") | |
682 | - .replace("<div class='ag-double-line'>", "") | |
683 | - .replace("<div>", "") | |
684 | - .replace("</div>", ""); | |
685 | - couponInfo.put("type_desc", s); | |
675 | + Integer type = (Integer) param.get("type"); | |
676 | + if(type == 4) { /** 使用详情统计 */ | |
677 | + List<Map<String, Object>> couponInfos = couponMapper.couponInfo(param); | |
678 | + if(CollectionUtils.isNotEmpty(couponInfos)) { | |
679 | + for (Map<String, Object> couponInfo : couponInfos) { | |
680 | + String desc = (String) couponReportMap.get(couponInfo.get("type") + "_" + couponInfo.get("coupon_order")); | |
681 | + if(StringUtils.isNotBlank(desc)) { | |
682 | + /** <div class='ag-double-line'>儿童保健券(五)<div>使用人次</div></div> */ | |
683 | + String s = desc.replace("使用人次", "") | |
684 | + .replace("<div class='ag-double-line'>", "") | |
685 | + .replace("<div>", "") | |
686 | + .replace("</div>", ""); | |
687 | + couponInfo.put("type_desc", s); | |
688 | + } | |
689 | + Date useDate = (Date) couponInfo.get("use_date"); | |
690 | + couponInfo.put("use_date", DateUtil.getyyyy_MM_dd(useDate)); | |
691 | + /** 设置产检日期、姓名、产检孕周、产检第次、产检机构、产检医生、联系电话 */ | |
692 | + setUsedInfo((Integer) couponInfo.get("type"), (String) couponInfo.get("used_id"), | |
693 | + (String) couponInfo.get("sequence_id"), useDate, couponInfo | |
694 | + ); | |
686 | 695 | } |
687 | - Date useDate = (Date) couponInfo.get("use_date"); | |
688 | - couponInfo.put("use_date", DateUtil.getyyyy_MM_dd(useDate)); | |
689 | -// setUsedInfo(couponInfo); | |
690 | - /** 设置产检日期、姓名、产检孕周、产检第次、产检机构、产检医生、联系电话 */ | |
691 | - setUsedInfo((Integer) couponInfo.get("type"), (String) couponInfo.get("used_id"), | |
692 | - (String) couponInfo.get("sequence_id"), useDate, couponInfo | |
693 | - ); | |
694 | 696 | } |
697 | + int count = couponMapper.findCouponInfoCount(param); | |
698 | + PageResult pageResult = new PageResult(count, (Integer) param.get("currentPage") ,(Integer) param.get("pageSize"), CollectionUtils.createMap("couponInfos", couponInfos)); | |
699 | + return RespBuilder.buildSuccess(pageResult); | |
700 | + } if(type == 1) { /** 发放人数统计 */ | |
701 | + List<Map<String,Object>> userSendInfo = couponMapper.findUserSendInfo(param); | |
702 | + System.err.println(userSendInfo); | |
695 | 703 | } |
696 | - int count = couponMapper.findCouponInfoCount(param); | |
697 | - PageResult pageResult = new PageResult(count, (Integer) param.get("currentPage") ,(Integer) param.get("pageSize"), CollectionUtils.createMap("couponInfos", couponInfos)); | |
698 | - return RespBuilder.buildSuccess(pageResult); | |
704 | + return RespBuilder.buildSuccess(); | |
699 | 705 | } |
700 | 706 | |
701 | 707 | /** |
... | ... | @@ -713,7 +719,7 @@ |
713 | 719 | Date checkDate = null; /** 产检日期 */ |
714 | 720 | String username = null; /** 姓名 */ |
715 | 721 | String week = null; /** 产检孕周 = 产检时间 - 末次月经 */ |
716 | - Integer number = 1; /** 产检第次 */ | |
722 | + Integer number = null; /** 产检第次 */ | |
717 | 723 | String operatorOrgName = null; /** 产检机构 */ |
718 | 724 | String doctorName = null; /** 产检医生 */ |
719 | 725 | String phone = null; /** 联系电话 */ |