Commit a92be449983936d3183ec241174907238b9e976e

Authored by liquanyu
1 parent e147673033

产筛优惠劵

Showing 3 changed files with 21 additions and 0 deletions

platform-biz-service/src/main/java/com/lyms/platform/permission/dao/master/CouponMapper.java View file @ a92be44
... ... @@ -152,5 +152,7 @@
152 152 int findCouponInfoCount2(Map<String, Object> param);
153 153  
154 154 Map<String,Object> findHospitalAllused(Map<String, Object> param);
  155 +
  156 + Map<String,Object> findHospitalCsAllused(Map<String, Object> queryParam);
155 157 }
platform-biz-service/src/main/resources/mainOrm/master/CouponMapper.xml View file @ a92be44
... ... @@ -984,5 +984,22 @@
984 984 </select>
985 985  
986 986  
  987 +
  988 + <select id="findHospitalCsAllused" parameterType="map" resultType="map">
  989 + select count(t.id) as allUserdCsCount
  990 + from coupon_info c, hospital_coupon_template_group h,coupon_template t ,coupon_type p
  991 + where h.coupon_template_group_id=t.group_id and t.type_id=p.id and c.coupon_template_id = t.id
  992 + and h.hospital_id = #{hid}
  993 + and p.type=11
  994 + <if test="startDate != null">
  995 + and c.use_date >= #{startDate}
  996 + </if>
  997 + <if test="endDate != null">
  998 + and c.use_date <![CDATA[ <= ]]> #{endDate}
  999 + </if>
  1000 + and c.status =2 and c.used_id is not null
  1001 + </select>
  1002 +
  1003 +
987 1004 </mapper>
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/ReportServiceImpl.java View file @ a92be44
... ... @@ -2490,11 +2490,13 @@
2490 2490 Map<String, Object> usedInfo = couponMapper.findHospitalUsedInfo2(queryParam);
2491 2491 Map<String, Object> sendInfo = couponMapper.findHospitalSendInfo2(queryParam);
2492 2492 Map<String, Object> allusedInfo = couponMapper.findHospitalAllused(queryParam);
  2493 + Map<String, Object> allusedCsInfo = couponMapper.findHospitalCsAllused(queryParam);
2493 2494  
2494 2495 Map<String, Object> tempMap = packCouponMap(sendInfo, usedInfo, hNameMap, hid, xAxis, queryParam);
2495 2496  
2496 2497 if(MapUtils.isNotEmpty(tempMap)) {
2497 2498 tempMap.put("allUserdCount",(allusedInfo == null || allusedInfo.get("allUserdCount") == null) ? 0 : allusedInfo.get("allUserdCount"));
  2499 + tempMap.put("allUserdCsCount",(allusedCsInfo == null || allusedCsInfo.get("allUserdCsCount") == null) ? 0 : allusedCsInfo.get("allUserdCsCount"));
2498 2500  
2499 2501 /** 方法/使用人数id */
2500 2502 List<String> sendUserIds = couponMapper.findSendUserIds2(queryParam);