Commit b2cf1a2d972819de64ffb16f8d745ce37685e215
Exists in
master
and in
6 other branches
Merge remote-tracking branch 'origin/master'
Showing 2 changed files
platform-biz-service/src/main/resources/mainOrm/master/CouponMapper.xml
View file @
b2cf1a2
... | ... | @@ -425,7 +425,7 @@ |
425 | 425 | </select> |
426 | 426 | |
427 | 427 | <select id="findUserSendInfo" parameterType="map" resultType="map"> |
428 | - select a.create_hospital_id, a.user_id, a.create_date ,d.name as send_hospital, e.name as doctoer_name | |
428 | + select a.create_hospital_id, a.user_id, DATE_FORMAT(a.create_date, '%Y-%m-%d') as create_date, d.name as send_hospital, e.name as doctoer_name | |
429 | 429 | from |
430 | 430 | coupon_info a, coupon_template b, coupon_type c, organization d, users e |
431 | 431 | where a.coupon_template_id = b.id and b.type_id = c.id and a.create_hospital_id = d.id and a.create_user_id = e.id |
432 | 432 | |
... | ... | @@ -443,12 +443,13 @@ |
443 | 443 | <if test="endDate != null"> |
444 | 444 | and a.create_date <![CDATA[ < ]]> #{endDate} |
445 | 445 | </if> |
446 | + group by a.user_id, a.create_date | |
446 | 447 | limit #{currentPage},#{pageSize} |
447 | 448 | </select> |
448 | 449 | |
449 | 450 | <select id="findUserSendInfoCount" parameterType="map" resultType="integer"> |
450 | 451 | select count(1) from ( |
451 | - select a.create_hospital_id, a.user_id, a.create_date ,d.name as send_hospital, e.name as doctoer_name | |
452 | + select a.create_hospital_id, a.user_id, DATE_FORMAT(a.create_date, '%Y-%m-%d') as create_date, d.name as send_hospital, e.name as doctoer_name | |
452 | 453 | from |
453 | 454 | coupon_info a, coupon_template b, coupon_type c, organization d, users e |
454 | 455 | where a.coupon_template_id = b.id and b.type_id = c.id and a.create_hospital_id = d.id and a.create_user_id = e.id |
... | ... | @@ -466,6 +467,7 @@ |
466 | 467 | <if test="endDate != null"> |
467 | 468 | and a.create_date <![CDATA[ < ]]> #{endDate} |
468 | 469 | </if> |
470 | + group by a.user_id, a.create_date | |
469 | 471 | ) a |
470 | 472 | </select> |
471 | 473 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/ReportServiceImpl.java
View file @
b2cf1a2
... | ... | @@ -645,8 +645,10 @@ |
645 | 645 | public BaseObjectResponse couponInit(Map<String, Object> param) { |
646 | 646 | if(StringUtils.isBlank((String) param.get("hospitalId"))) { |
647 | 647 | param.put("hospitalIds", accessPermissionFacade.getCurrentUserHospPermissions(Integer.parseInt(param.get("userId") + ""))); /** 模拟根据登陆人id 查询出来的医院 */ |
648 | + param.put("hospitalId", accessPermissionFacade.getCurrentUserHospPermissions(Integer.parseInt(param.get("userId") + ""))); /** 模拟根据登陆人id 查询出来的医院 */ | |
648 | 649 | } else { |
649 | 650 | param.put("hospitalIds", CollectionUtils.asList((String) param.get("hospitalId"))); |
651 | + param.put("hospitalId", CollectionUtils.asList((String) param.get("hospitalId"))); | |
650 | 652 | } |
651 | 653 | |
652 | 654 | doHospitalFilter(param); |
... | ... | @@ -733,7 +735,6 @@ |
733 | 735 | if(StringUtils.isNotEmpty(userId)) { |
734 | 736 | setUserSendInfo(userId, map); /** 设置姓名、居住地、户籍地、电话 */ |
735 | 737 | } |
736 | - map.put("create_date", DateUtil.getyyyy_MM_dd((Date) map.get("create_date"))); | |
737 | 738 | } |
738 | 739 | PageResult pageResult = new PageResult(count, (Integer) param.get("currentPage") ,(Integer) param.get("pageSize"), CollectionUtils.createMap("userSendInfos", userSendInfo)); |
739 | 740 | return RespBuilder.buildSuccess(pageResult); |