Commit d872ec2c4979a9b438fdc182a231aa06dd8db974

Authored by litao@lymsh.com
1 parent 4c8d18cd4f

改bug

Showing 2 changed files with 27 additions and 20 deletions

platform-biz-service/src/main/resources/mainOrm/master/CouponMapper.xml View file @ d872ec2
... ... @@ -396,26 +396,27 @@
396 396  
397 397 <select id="findCouponInfoCount" parameterType="map" resultType="integer">
398 398 select count(1) from (
399   - select a.used_hospital_id, c.type, b.coupon_order, a.sequence_id, d.name as send_hospital, a.use_date, a.used_id, a.operator_use_id
400   - from coupon_info a, coupon_template b, coupon_type c, organization d
401   - where a.coupon_template_id = b.id and b.type_id = c.id and a.create_hospital_id = d.id and a.status = 2
402   - and a.used_hospital_id in
403   - <foreach collection="hospitalId" open="(" close=")" separator="," item="hid">
404   - #{hid}
405   - </foreach>
406   - and c.type in
407   - <foreach collection="couponType" open="(" close=")" separator="," item="type">
408   - #{type}
409   - </foreach>
410   - <if test="coupon_order != null">
411   - and b.coupon_order = #{coupon_order}
412   - </if>
413   - <if test="startDate != null">
414   - and a.use_date >= #{startDate}
415   - </if>
416   - <if test="endDate != null">
417   - and a.use_date <![CDATA[ < ]]> #{endDate}
418   - </if>
  399 + select a.used_hospital_id, c.type, b.coupon_order, a.sequence_id, d.name as send_hospital, a.use_date, a.used_id, a.operator_use_id
  400 + from coupon_info a, coupon_template b, coupon_type c, organization d
  401 + where a.coupon_template_id = b.id and b.type_id = c.id and a.create_hospital_id = d.id
  402 + and a.status = 2
  403 + and a.used_hospital_id in
  404 + <foreach collection="hospitalId" open="(" close=")" separator="," item="hid">
  405 + #{hid}
  406 + </foreach>
  407 + and c.type in
  408 + <foreach collection="couponType" open="(" close=")" separator="," item="type">
  409 + #{type}
  410 + </foreach>
  411 + <if test="coupon_order != null">
  412 + and b.coupon_order = #{coupon_order}
  413 + </if>
  414 + <if test="startDate != null">
  415 + and a.create_date >= #{startDate}
  416 + </if>
  417 + <if test="endDate != null">
  418 + and a.create_date <![CDATA[ < ]]> #{endDate}
  419 + </if>
419 420 ) a
420 421 </select>
421 422  
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/ReportServiceImpl.java View file @ d872ec2
... ... @@ -177,6 +177,12 @@
177 177 couponDescMap.put(8, "儿童保健券");
178 178 }
179 179  
  180 + /**
  181 + * 建档统计
  182 + * @param ageType 1=全部年龄 2=20岁以下 3=20-30岁 4=30-40岁 5=40岁以上
  183 + * @param patientType 建档孕周 1=孕早期 2=孕中期 3=孕晚期
  184 + * @return
  185 + */
180 186 @Override
181 187 public BaseObjectResponse patients(String provinceId, String cityId, String aredId, String streetId, Integer ageType, Integer patientType, Date startDate, Date endDate, Integer userId) {
182 188 List<String> hospitals = mongoUtil.getHospitals(userId, provinceId, cityId, aredId, streetId);