Commit d187cd9b8298167161679a8ae0cb6a8330269f57
1 parent
63f07d5676
Exists in
master
and in
6 other branches
被覆盖的文件
Showing 3 changed files with 47 additions and 4 deletions
platform-biz-service/src/main/java/com/lyms/platform/permission/dao/master/CouponMapper.java
View file @
d187cd9
platform-biz-service/src/main/resources/mainOrm/master/CouponMapper.xml
View file @
d187cd9
... | ... | @@ -230,6 +230,12 @@ |
230 | 230 | </foreach> |
231 | 231 | ) b |
232 | 232 | where a.used_hospital_id = b.hospital_id and a.coupon_template_id = b.id and a.status = 2 |
233 | + <if test="startDate != null"> | |
234 | + and a.use_date >= #{startDate} | |
235 | + </if> | |
236 | + <if test="endDate != null"> | |
237 | + and a.use_date <![CDATA[ < ]]> #{endDate} | |
238 | + </if> | |
233 | 239 | group by b.coupon_order, b.type, a.used_hospital_id |
234 | 240 | </select> |
235 | 241 | |
... | ... | @@ -293,7 +299,27 @@ |
293 | 299 | select phone from users where id = #{id} |
294 | 300 | </select> |
295 | 301 | |
296 | - <select id="findCouponInfo" parameterType="map" resultType="map"> | |
302 | + <select id="couponInfo" parameterType="map" resultType="map"> | |
303 | + select a.used_hospital_id, c.type, b.coupon_order, a.sequence_id, d.name as send_hospital, a.use_date, a.used_id | |
304 | + from coupon_info a, coupon_template b, coupon_type c, organization d | |
305 | + where a.coupon_template_id = b.id and b.type_id = c.id and a.create_hospital_id = d.id | |
306 | + and a.used_hospital_id in | |
307 | + <foreach collection="hospitalId" open="(" close=")" separator="," item="hid"> | |
308 | + #{hid} | |
309 | + </foreach> | |
310 | + and c.type in | |
311 | + <foreach collection="couponType" open="(" close=")" separator="," item="type"> | |
312 | + #{type} | |
313 | + </foreach> | |
314 | + <if test="startDate != null"> | |
315 | + and a.use_date >= #{startDate} | |
316 | + </if> | |
317 | + <if test="endDate != null"> | |
318 | + and a.use_date <![CDATA[ < ]]> #{endDate} | |
319 | + </if> | |
320 | + limit #{currentPage},#{pageSize} | |
321 | + </select> | |
322 | + <!-- <select id="findCouponInfo" parameterType="map" resultType="map"> | |
297 | 323 | select c.type, a.sequence_id, d.name, e.name as send_hospital, a.use_date, a.used_id, b.coupon_order |
298 | 324 | from coupon_info a, coupon_template b, coupon_type c, users d, organization e, hospital_coupon_template_group f |
299 | 325 | where a.coupon_template_id = b.id and b.type_id = c.id and a.user_id = d.id and a.status=2 and a.create_hospital_id = e.id |
... | ... | @@ -315,7 +341,7 @@ |
315 | 341 | and f.coupon_template_group_id = #{tempId} |
316 | 342 | </if> |
317 | 343 | limit #{currentPage},#{pageSize} |
318 | - </select> | |
344 | + </select>--> | |
319 | 345 | |
320 | 346 | <select id="findCouponInfoCount" parameterType="map" resultType="integer"> |
321 | 347 | select count(1) from ( |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/ReportServiceImpl.java
View file @
d187cd9
... | ... | @@ -110,6 +110,7 @@ |
110 | 110 | /** 产后 */ |
111 | 111 | couponReportMap.put("3_1", "<div class='ag-double-line'>产后建档券<div>使用人次</div></div>"); |
112 | 112 | couponReportMap.put("4_1", "<div class='ag-double-line'>分娩券<div>使用人次</div></div>"); |
113 | + couponReportMap.put("5_1", "<div class='ag-double-line'>出院小结券<div>使用人次</div></div>"); | |
113 | 114 | couponReportMap.put("6_1", "<div class='ag-double-line'>42天访视券<div>使用人次</div></div>"); |
114 | 115 | couponReportMap.put("6_2", "<div class='ag-double-line'>产后复查券(一)<div>使用人次</div></div>"); |
115 | 116 | couponReportMap.put("6_3", "<div class='ag-double-line'>产后复查券(二)<div>使用人次</div></div>"); |
... | ... | @@ -689,7 +690,7 @@ |
689 | 690 | if(param.get("hospitalId") == null) { |
690 | 691 | return RespBuilder.buildSuccess(new PageResult(0, (Integer) param.get("currentPage") ,(Integer) param.get("pageSize"), CollectionUtils.createMap("couponInfos", new ArrayList<>()))); |
691 | 692 | } |
692 | - List<Map<String, Object>> couponInfos = couponMapper.findCouponInfo(param); | |
693 | + List<Map<String, Object>> couponInfos = couponMapper.couponInfo(param); | |
693 | 694 | if(CollectionUtils.isNotEmpty(couponInfos)) { |
694 | 695 | for (Map<String, Object> couponInfo : couponInfos) { |
695 | 696 | String desc = (String) couponReportMap.get(couponInfo.get("type") + "_" + couponInfo.get("coupon_order")); |
696 | 697 | |
697 | 698 | |
... | ... | @@ -701,13 +702,27 @@ |
701 | 702 | .replace("</div>", ""); |
702 | 703 | couponInfo.put("type_desc", s); |
703 | 704 | } |
704 | - | |
705 | + couponInfo.put("use_date", DateUtil.getYmd((Date) couponInfo.get("use_date"))); | |
705 | 706 | setUsedInfo(couponInfo); |
707 | + /** 设置产检日期、姓名、产检孕周、产检第次、产检机构、产检医生、联系电话 */ | |
708 | + setUsedInfo((String) couponInfo.get("type"), | |
709 | + (String) couponInfo.get("used_id"), | |
710 | + (String) couponInfo.get("sequence_id") | |
711 | + ); | |
706 | 712 | } |
707 | 713 | } |
708 | 714 | int count = couponMapper.findCouponInfoCount(param); |
709 | 715 | PageResult pageResult = new PageResult(count, (Integer) param.get("currentPage") ,(Integer) param.get("pageSize"), CollectionUtils.createMap("couponInfos", couponInfos)); |
710 | 716 | return RespBuilder.buildSuccess(pageResult); |
717 | + } | |
718 | + | |
719 | + private void setUsedInfo(String type, String used_id, String sequence_id) { | |
720 | + Date checkDate = null; | |
721 | + String name = null; | |
722 | + Integer number = null; | |
723 | + if("1".equals(type)) { | |
724 | + Patients one = mongoTemplate.findOne(Query.query(Criteria.where("1").is("1")), Patients.class); | |
725 | + } | |
711 | 726 | } |
712 | 727 | |
713 | 728 | @Override |