diff --git a/platform-biz-service/src/main/java/com/lyms/platform/permission/dao/master/CouponMapper.java b/platform-biz-service/src/main/java/com/lyms/platform/permission/dao/master/CouponMapper.java index 6a06336..67cc38f 100644 --- a/platform-biz-service/src/main/java/com/lyms/platform/permission/dao/master/CouponMapper.java +++ b/platform-biz-service/src/main/java/com/lyms/platform/permission/dao/master/CouponMapper.java @@ -76,4 +76,6 @@ public interface CouponMapper { Map findHospitalSendInfo(Map param); List> couponInfo(Map param); + + List findCouponTitleByTemp(Map param); } diff --git a/platform-biz-service/src/main/resources/mainOrm/master/CouponMapper.xml b/platform-biz-service/src/main/resources/mainOrm/master/CouponMapper.xml index ca8c3df..7b6ce96 100644 --- a/platform-biz-service/src/main/resources/mainOrm/master/CouponMapper.xml +++ b/platform-biz-service/src/main/resources/mainOrm/master/CouponMapper.xml @@ -391,4 +391,33 @@ #{hid} + + \ No newline at end of file diff --git a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/ReportServiceImpl.java b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/ReportServiceImpl.java index 0f2a1b6..c291e54 100644 --- a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/ReportServiceImpl.java +++ b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/ReportServiceImpl.java @@ -108,6 +108,10 @@ public class ReportServiceImpl extends BaseServiceImpl implements IReportService couponReportMap.put("8_4", "
儿童保健券(三)
使用人次
"); couponReportMap.put("8_5", "
儿童保健券(四)
使用人次
"); couponReportMap.put("8_6", "
儿童保健券(五)
使用人次
"); + couponReportMap.put("8_7", "
儿童保健券(六)
使用人次
"); + couponReportMap.put("8_8", "
儿童保健券(七)
使用人次
"); + couponReportMap.put("8_9", "
儿童保健券(八)
使用人次
"); + couponReportMap.put("8_10", "
儿童保健券(九)
使用人次
"); /** 产后 */ couponReportMap.put("3_1", "
产后建档券
使用人次
"); couponReportMap.put("4_1", "
分娩券
使用人次
"); @@ -116,6 +120,8 @@ public class ReportServiceImpl extends BaseServiceImpl implements IReportService couponReportMap.put("6_2", "
产后复查券(一)
使用人次
"); couponReportMap.put("6_3", "
产后复查券(二)
使用人次
"); couponReportMap.put("6_4", "
产后复查券(三)
使用人次
"); + couponReportMap.put("6_5", "
产后复查券(四)
使用人次
"); + couponReportMap.put("6_6", "
产后复查券(五)
使用人次
"); /** 1=孕妇建档 2=孕妇产检 3=产妇建档 4=产妇分娩 5=产妇出院小结 6=产妇产后复查 7=儿童建档 8=儿童保健 */ couponDescMap.put(1, "孕妇建档券"); @@ -377,12 +383,6 @@ public class ReportServiceImpl extends BaseServiceImpl implements IReportService rest.setErrorcode(500); rest.setErrormsg(e.getMessage()); } - - - // PageResult page = findPage(getDoctorInfoSql(startDate, endDate, childBirth, number, name, hospitalId, params), currentPage, pageSize, params); -// List> grid = (List>) page.getGrid(); -// setColor(grid); -// rest.setData(page); return rest; } @@ -487,43 +487,24 @@ public class ReportServiceImpl extends BaseServiceImpl implements IReportService reportModel.setSeries(createSeries(couponReport)); reportModel.doMerge(); + /** 查询医院所绑定的type和coupon_order */ + List key = couponMapper.findCouponTitleByTemp(param); + setZeroDataByTemp(key, couponReport); + Map titleMap = parseTitle(couponReport); transNullToZero(couponReport, titleMap); return RespBuilder.buildSuccess("couponReport", couponReport, "couponReportMap", titleMap, "reportModel", reportModel); - // return RespBuilder.buildSuccess(couponReport); -// if(org.apache.commons.collections.CollectionUtils.isNotEmpty(couponReport) && -// org.apache.commons.collections.CollectionUtils.isNotEmpty(usedInfo)) { -// if(CollectionUtils.putAll(couponReport, usedInfo, "used_hospital_id", "used_hospital_id")) { -// for (Map map : couponReport) { -// map.put("province_name", findName(map.get("province_id"))); -// map.put("city_name", findName(map.get("city_id"))); -// -// String areaName = findName(map.get("area_id")); -// map.put("area_name", areaName); -// if(map.get("areaId") == null) { /** 没传区县 报表数据就为区域的 传了区县 报表数据就为市 */ -// xAxis.add(areaName); -// } else { -// Map m = couponMapper.findHospitalName(CollectionUtils.createMap("hospitalId", "")); -// if(m.get("name") != null) { -// xAxis.add(m.get("name").toString()); -// } -// } -// } -// } -// } -// -// ReportModel reportModel = new ReportModel(); -// reportModel.setxAxis(xAxis); -// reportModel.setData(Arrays.asList("发放券数", "使用券数")); -// reportModel.setSeries(createSeries(couponReport)); -// reportModel.doMerge(); -// -// Map titleMap = parseTitle(couponReport); -// transNullToZero(couponReport, titleMap); -// -// -// return RespBuilder.buildSuccess("couponReport", couponReport, "couponReportMap", titleMap, "reportModel", reportModel); + } + + private void setZeroDataByTemp(List key, List> couponReport) { + for (Map map : couponReport) { + for (String s : key) { + if(map.get(s) == null) { + map.put(s, 0); + } + } + } } private Map packCouponMap(Map sendInfo, Map usedInfo, Map hNameMap, String hid, List xAxis, Map param) {