Commit 7b874cd8d4b35cc884bcb98d6b3c38ed73caca3e
1 parent
fd905eaab7
Exists in
master
and in
6 other branches
update code
Showing 4 changed files with 200 additions and 73 deletions
- platform-data-api/src/main/java/com/lyms/platform/data/util/AmsMessageService.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/AreaCountController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AreaCountFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/utils/MessageCenterService.java
platform-data-api/src/main/java/com/lyms/platform/data/util/AmsMessageService.java
View file @
7b874cd
... | ... | @@ -88,7 +88,9 @@ |
88 | 88 | |
89 | 89 | //调用https用这个 |
90 | 90 | // String str = HttpClientUtil.doGet(AMS_URL, params, "utf-8", AUTHORIZATION); |
91 | -// System.out.println(str); | |
91 | + | |
92 | + System.out.println("amsurl = "+ AMS_URL); | |
93 | + System.out.println("amscontent = "+ str); | |
92 | 94 | ObjectMapper om = new ObjectMapper(); |
93 | 95 | MessageResponseEntity mre = null; |
94 | 96 | Map<String,List<MessageContent>> map = new HashMap<String, List<MessageContent>>(); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/AreaCountController.java
View file @
7b874cd
... | ... | @@ -113,6 +113,7 @@ |
113 | 113 | * @param areaId |
114 | 114 | * @param page |
115 | 115 | * @param limit |
116 | + * @param ticketOrder 1,'首次产检券',2,'孕中期一券',3,'孕中期二券',4,'孕晚期一券',5,'孕晚期二券' | |
116 | 117 | * @return |
117 | 118 | */ |
118 | 119 | @RequestMapping(method = RequestMethod.GET,value = "/getTicketUseDetail") |
119 | 120 | |
... | ... | @@ -125,9 +126,10 @@ |
125 | 126 | @RequestParam(required = false)String cityId, |
126 | 127 | @RequestParam(required = false)String areaId, |
127 | 128 | @RequestParam(required = false) Integer page, |
128 | - @RequestParam(required = false) Integer limit) { | |
129 | + @RequestParam(required = false) Integer limit, | |
130 | + @RequestParam(required = false) Integer ticketOrder) { | |
129 | 131 | LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); |
130 | - return areaCountFacade.getTicketUseDetail(time, hospitalId, provinceId, cityId, areaId,page,limit ,loginState.getId()); | |
132 | + return areaCountFacade.getTicketUseDetail(time, hospitalId, provinceId, cityId, areaId,page,limit ,loginState.getId(),ticketOrder); | |
131 | 133 | } |
132 | 134 | |
133 | 135 | |
... | ... | @@ -141,6 +143,7 @@ |
141 | 143 | * @param areaId |
142 | 144 | * @param page |
143 | 145 | * @param limit |
146 | + * @param ticketOrder 1,'首次产检券',2,'孕中期一券',3,'孕中期二券',4,'孕晚期一券',5,'孕晚期二券' | |
144 | 147 | * @return |
145 | 148 | */ |
146 | 149 | @RequestMapping(method = RequestMethod.GET,value = "/getTicketUseDetailExport") |
147 | 150 | |
... | ... | @@ -153,9 +156,11 @@ |
153 | 156 | @RequestParam(required = false)String cityId, |
154 | 157 | @RequestParam(required = false)String areaId, |
155 | 158 | @RequestParam(required = false) Integer page, |
156 | - @RequestParam(required = false) Integer limit) { | |
159 | + @RequestParam(required = false) Integer limit, | |
160 | + @RequestParam(required = false) Integer ticketOrder) { | |
157 | 161 | LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); |
158 | - areaCountFacade.getTicketUseDetailExport(time, hospitalId, provinceId, cityId, areaId,loginState.getId(),httpServletResponse); | |
162 | + areaCountFacade.getTicketUseDetailExport(time, hospitalId, provinceId, cityId, | |
163 | + areaId,loginState.getId(),httpServletResponse,ticketOrder); | |
159 | 164 | } |
160 | 165 | |
161 | 166 | |
... | ... | @@ -170,7 +175,7 @@ |
170 | 175 | * @param provinceId 省份 |
171 | 176 | * @param cityId 城市 |
172 | 177 | * @param areaId 区域 |
173 | - * @param pointType 节点统计范围 1 首次产检 2全部 | |
178 | + * @param nodeType 节点统计范围 1 首次产检 2全部 | |
174 | 179 | * @return |
175 | 180 | */ |
176 | 181 | @RequestMapping(method = RequestMethod.GET,value = "/getCheckPointCount") |
177 | 182 | |
... | ... | @@ -182,9 +187,9 @@ |
182 | 187 | @RequestParam(required = false)String provinceId, |
183 | 188 | @RequestParam(required = false)String cityId, |
184 | 189 | @RequestParam(required = false)String areaId, |
185 | - @RequestParam(required = false)Integer pointType) { | |
190 | + @RequestParam(required = false)Integer nodeType) { | |
186 | 191 | LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); |
187 | - return areaCountFacade.getCheckPointCount(pointType,time, hospitalId, provinceId, cityId, areaId, loginState.getId()); | |
192 | + return areaCountFacade.getCheckPointCount(nodeType,time, hospitalId, provinceId, cityId, areaId, loginState.getId()); | |
188 | 193 | } |
189 | 194 | |
190 | 195 | /** |
... | ... | @@ -246,6 +251,8 @@ |
246 | 251 | * @param areaId |
247 | 252 | * @param page |
248 | 253 | * @param limit |
254 | + * @param nodeType 1 首次 2 全部 | |
255 | + * @param nodeName 0:0~12 孕周 1: 16~20 孕周 2: 21~24 孕周 3:28~36 孕周 4:37~ 分娩 | |
249 | 256 | * @return |
250 | 257 | */ |
251 | 258 | @RequestMapping(method = RequestMethod.GET,value = "/getCheckDetail") |
252 | 259 | |
... | ... | @@ -259,9 +266,12 @@ |
259 | 266 | @RequestParam(required = false)String areaId, |
260 | 267 | @RequestParam(required = false) Integer page, |
261 | 268 | @RequestParam(required = false) Integer limit, |
262 | - @RequestParam(required = false)Integer pointType) { | |
269 | + @RequestParam(required = false)Integer nodeType, | |
270 | + @RequestParam(required = false)Integer nodeName | |
271 | + ) { | |
263 | 272 | LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); |
264 | - return areaCountFacade.getCheckDetail(pointType,time, hospitalId, provinceId, cityId, areaId, page, limit, loginState.getId()); | |
273 | + return areaCountFacade.getCheckDetail(nodeType,time, hospitalId, provinceId, | |
274 | + cityId, areaId, page, limit, loginState.getId(),nodeName); | |
265 | 275 | } |
266 | 276 | |
267 | 277 | |
... | ... | @@ -275,6 +285,8 @@ |
275 | 285 | * @param areaId |
276 | 286 | * @param page |
277 | 287 | * @param limit |
288 | + * @param nodeType 1 首次 2 全部 | |
289 | + * @param nodeName 0:0~12 孕周 1: 16~20 孕周 2: 21~24 孕周 3:28~36 孕周 4:37~ 分娩 | |
278 | 290 | * @return |
279 | 291 | */ |
280 | 292 | @RequestMapping(method = RequestMethod.GET,value = "/getCheckDetailExport") |
281 | 293 | |
... | ... | @@ -288,9 +300,11 @@ |
288 | 300 | @RequestParam(required = false)String areaId, |
289 | 301 | @RequestParam(required = false) Integer page, |
290 | 302 | @RequestParam(required = false) Integer limit, |
291 | - @RequestParam(required = false)Integer pointType) { | |
303 | + @RequestParam(required = false)Integer nodeType, | |
304 | + @RequestParam(required = false)Integer nodeName) { | |
292 | 305 | LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); |
293 | - areaCountFacade.getCheckDetailExport(pointType,time, hospitalId, provinceId, cityId, areaId, loginState.getId(), httpServletResponse); | |
306 | + areaCountFacade.getCheckDetailExport(nodeType,time, hospitalId, provinceId, cityId, areaId, loginState.getId(), | |
307 | + httpServletResponse,nodeName); | |
294 | 308 | } |
295 | 309 | |
296 | 310 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AreaCountFacade.java
View file @
7b874cd
1 | 1 | package com.lyms.platform.operate.web.facade; |
2 | 2 | |
3 | 3 | |
4 | +import com.lyms.platform.biz.service.BasicConfigService; | |
4 | 5 | import com.lyms.platform.biz.service.DataPermissionService; |
5 | 6 | import com.lyms.platform.common.base.PageInfo; |
6 | 7 | import com.lyms.platform.common.constants.ErrorCodeConstants; |
7 | 8 | |
... | ... | @@ -18,7 +19,9 @@ |
18 | 19 | import com.lyms.platform.permission.model.Organization; |
19 | 20 | import com.lyms.platform.permission.model.OrganizationQuery; |
20 | 21 | import com.lyms.platform.permission.service.OrganizationService; |
22 | +import com.lyms.platform.pojo.BasicConfig; | |
21 | 23 | import com.lyms.platform.pojo.DataPermissionsModel; |
24 | +import com.lyms.platform.query.BasicConfigQuery; | |
22 | 25 | import com.lyms.platform.query.DataPermissionsModelQuery; |
23 | 26 | import org.apache.commons.collections.CollectionUtils; |
24 | 27 | import org.springframework.beans.factory.annotation.Autowired; |
... | ... | @@ -52,6 +55,10 @@ |
52 | 55 | @Autowired |
53 | 56 | private OrganizationService organizationService; |
54 | 57 | |
58 | + | |
59 | + @Autowired | |
60 | + private BasicConfigService basicConfigService; | |
61 | + | |
55 | 62 | public BaseResponse getTicketUsedCount(String time, String hospitalId, |
56 | 63 | String provinceId,String cityId, |
57 | 64 | String areaId, Integer userId) { |
... | ... | @@ -447,7 +454,8 @@ |
447 | 454 | return new BaseListResponse().setErrormsg("成功").setErrorcode(ErrorCodeConstants.SUCCESS).setData(ticketList).setPageInfo(pageInfo); |
448 | 455 | } |
449 | 456 | |
450 | - public BaseResponse getTicketUseDetail(String time, String hospitalId, String provinceId, String cityId, String areaId, Integer page, Integer limit, Integer userId) { | |
457 | + public BaseResponse getTicketUseDetail(String time, String hospitalId, String provinceId, | |
458 | + String cityId, String areaId, Integer page, Integer limit, Integer userId,Integer ticketOrder) { | |
451 | 459 | |
452 | 460 | |
453 | 461 | |
... | ... | @@ -484,6 +492,11 @@ |
484 | 492 | " INNER JOIN ODS_F_GRAVIDA_RECORD B ON CC.RECORD_ID=B.RECORD_ID " + |
485 | 493 | " INNER JOIN ODS_F_EXAMINE_TICKET D ON CC.TICKETS_NO=D.TICKETS_NO " + |
486 | 494 | " WHERE CC.TICKETS_NO IS NOT NULL "; |
495 | + if (ticketOrder != null) | |
496 | + { | |
497 | + sql+= " AND CC.TICKETS_ORDER= "+ticketOrder; | |
498 | + sqlCount+= " AND CC.TICKETS_ORDER= " +ticketOrder; | |
499 | + } | |
487 | 500 | if (StringUtils.isNotEmpty(time)) |
488 | 501 | { |
489 | 502 | String startTime = time.split(" - ")[0]; |
... | ... | @@ -576,6 +589,20 @@ |
576 | 589 | } |
577 | 590 | |
578 | 591 | |
592 | + private String getBaseconfgIdByCode(String code) | |
593 | + { | |
594 | + BasicConfigQuery query = new BasicConfigQuery(); | |
595 | + query.setYn(YnEnums.YES.getId()); | |
596 | + query.setCode(code); | |
597 | + List<BasicConfig> configList = basicConfigService.queryBasicConfig(query); | |
598 | + if (CollectionUtils.isNotEmpty(configList)) | |
599 | + { | |
600 | + return configList.get(0).getId(); | |
601 | + } | |
602 | + return ""; | |
603 | + } | |
604 | + | |
605 | + | |
579 | 606 | /** |
580 | 607 | * 获取当前用户拥有的医院权限列表并和查询条件取交集 |
581 | 608 | * @param userId |
582 | 609 | |
583 | 610 | |
... | ... | @@ -613,11 +640,24 @@ |
613 | 640 | if (com.lyms.platform.common.utils.StringUtils.isNotEmpty(provinceId)) { |
614 | 641 | OrganizationQuery organizationQuery = new OrganizationQuery(); |
615 | 642 | organizationQuery.setYn(YnEnums.YES.getId()); |
616 | - organizationQuery.setProvinceId(provinceId); | |
643 | + | |
644 | + String id = getBaseconfgIdByCode(provinceId); | |
645 | + if (StringUtils.isNotEmpty(id)) | |
646 | + { | |
647 | + organizationQuery.setProvinceId(id); | |
648 | + } | |
617 | 649 | if (com.lyms.platform.common.utils.StringUtils.isNotEmpty(cityId)) { |
618 | - organizationQuery.setCityId(cityId); | |
650 | + id = getBaseconfgIdByCode(cityId); | |
651 | + if (StringUtils.isNotEmpty(id)) | |
652 | + { | |
653 | + organizationQuery.setCityId(id); | |
654 | + } | |
619 | 655 | if (com.lyms.platform.common.utils.StringUtils.isNotEmpty(areaId)) { |
620 | - organizationQuery.setAreaId(areaId); | |
656 | + id = getBaseconfgIdByCode(areaId); | |
657 | + if (StringUtils.isNotEmpty(id)) | |
658 | + { | |
659 | + organizationQuery.setAreaId(id); | |
660 | + } | |
621 | 661 | } |
622 | 662 | } |
623 | 663 | List<Organization> organizations = organizationService.queryOrganization(organizationQuery); |
... | ... | @@ -635,24 +675,25 @@ |
635 | 675 | allHospitalList.addAll(hospitalList); |
636 | 676 | return allHospitalList; |
637 | 677 | } |
638 | - //条件查询未空就返回条件查询的结果 | |
639 | - if (CollectionUtils.isEmpty(orgHospitalList)) | |
640 | - { | |
641 | - return orgHospitalList; | |
642 | - } | |
643 | - | |
644 | - //取所拥有的医院和查询条件查询的医院的交集 | |
645 | - if (CollectionUtils.isNotEmpty(allHospitalList)) | |
646 | - { | |
647 | - for(String hp : allHospitalList) | |
648 | - { | |
649 | - if (orgHospitalList.contains(hp)) | |
650 | - { | |
651 | - hospitalList.add(hp); | |
652 | - } | |
653 | - } | |
654 | - } | |
655 | - return hospitalList; | |
678 | +// //条件查询未空就返回条件查询的结果 | |
679 | +// if (CollectionUtils.isEmpty(orgHospitalList)) | |
680 | +// { | |
681 | +// return orgHospitalList; | |
682 | +// } | |
683 | +// | |
684 | +// //取所拥有的医院和查询条件查询的医院的交集 | |
685 | +// if (CollectionUtils.isNotEmpty(allHospitalList)) | |
686 | +// { | |
687 | +// for(String hp : allHospitalList) | |
688 | +// { | |
689 | +// if (orgHospitalList.contains(hp)) | |
690 | +// { | |
691 | +// hospitalList.add(hp); | |
692 | +// } | |
693 | +// } | |
694 | +// } | |
695 | +// return hospitalList; | |
696 | + return orgHospitalList; | |
656 | 697 | } |
657 | 698 | |
658 | 699 | /** |
... | ... | @@ -761,7 +802,8 @@ |
761 | 802 | * @param httpServletResponse |
762 | 803 | */ |
763 | 804 | public void getTicketUseDetailExport(String time, String hospitalId, String provinceId, String cityId, |
764 | - String areaId, Integer userId,HttpServletResponse httpServletResponse) { | |
805 | + String areaId, Integer userId,HttpServletResponse httpServletResponse, | |
806 | + Integer ticketOrder) { | |
765 | 807 | |
766 | 808 | String sql = " SELECT CC.EXAMINE_DATE, " + |
767 | 809 | " CC.NAME," + |
... | ... | @@ -780,6 +822,10 @@ |
780 | 822 | " INNER JOIN ODS_F_GRAVIDA_RECORD B ON CC.RECORD_ID=B.RECORD_ID " + |
781 | 823 | " INNER JOIN ODS_F_EXAMINE_TICKET D ON CC.TICKETS_NO=D.TICKETS_NO " + |
782 | 824 | " WHERE CC.TICKETS_NO IS NOT NULL "; |
825 | + if (ticketOrder != null) | |
826 | + { | |
827 | + sql+= " AND CC.TICKETS_ORDER= "+ticketOrder; | |
828 | + } | |
783 | 829 | if (StringUtils.isNotEmpty(time)) |
784 | 830 | { |
785 | 831 | String startTime = time.split(" - ")[0]; |
... | ... | @@ -1067,30 +1113,30 @@ |
1067 | 1113 | |
1068 | 1114 | |
1069 | 1115 | |
1070 | - String sql = "SELECT AA.PROVINCE,AA.PROVINCE_ID,\n" + | |
1071 | - " AA.CITY,AA.CITY_ID,\n" + | |
1072 | - " AA.AREA_COUNTY,AA.AREA_COUNTY_ID ,\n" + | |
1073 | - " AA.HOSPITAL_NAME,AA.YCY_STSTEM_ID,\n" + | |
1074 | - " AA.JD_NUM,\n" + | |
1075 | - " CJ_NUM,\n" + | |
1076 | - " NUM_12,\n" + | |
1077 | - " NUM_16,\n" + | |
1078 | - " NUM_24,\n" + | |
1079 | - " NUM_36,\n" + | |
1080 | - " NUM_40\n" + | |
1081 | - " FROM (\n" + | |
1082 | - " SELECT A.PROVINCE_ID,\n" + | |
1083 | - " A.PROVINCE,\n" + | |
1084 | - " A.CITY_ID,\n" + | |
1085 | - " A.CITY,\n" + | |
1086 | - " A.AREA_COUNTY_ID,\n" + | |
1087 | - " A.AREA_COUNTY,\n" + | |
1088 | - " A.HOSPITAL_NO,\n" + | |
1089 | - " A.HOSPITAL_NAME,\n" + | |
1090 | - " A.YCY_STSTEM_ID,\n" + | |
1091 | - " COUNT(B.RECORD_ID) AS JD_NUM\n" + | |
1092 | - " FROM ODS_D_HOSPITAL A\n" + | |
1093 | - " INNER JOIN ODS_F_GRAVIDA_RECORD B ON A.HOSPITAL_NO=B.HOSPITAL_NO\n" + | |
1116 | + String sql = "SELECT AA.PROVINCE,AA.PROVINCE_ID," + | |
1117 | + " AA.CITY,AA.CITY_ID," + | |
1118 | + " AA.AREA_COUNTY,AA.AREA_COUNTY_ID ," + | |
1119 | + " AA.HOSPITAL_NAME,AA.YCY_STSTEM_ID," + | |
1120 | + " (CASE WHEN AA.JD_NUM IS NULL THEN 0 ELSE AA.JD_NUM END) AS JD_NUM," + | |
1121 | + " (CASE WHEN CJ_NUM IS NULL THEN 0 ELSE CJ_NUM END) AS CJ_NUM," + | |
1122 | + " (CASE WHEN NUM_12 IS NULL THEN 0 ELSE NUM_12 END) AS NUM_12," + | |
1123 | + " (CASE WHEN NUM_16 IS NULL THEN 0 ELSE NUM_16 END) AS NUM_16," + | |
1124 | + " (CASE WHEN NUM_24 IS NULL THEN 0 ELSE NUM_24 END) AS NUM_24," + | |
1125 | + " (CASE WHEN NUM_36 IS NULL THEN 0 ELSE NUM_36 END) AS NUM_36," + | |
1126 | + " (CASE WHEN NUM_40 IS NULL THEN 0 ELSE NUM_40 END) AS NUM_40 " + | |
1127 | + " FROM (" + | |
1128 | + " SELECT A.PROVINCE_ID," + | |
1129 | + " A.PROVINCE," + | |
1130 | + " A.CITY_ID," + | |
1131 | + " A.CITY," + | |
1132 | + " A.AREA_COUNTY_ID," + | |
1133 | + " A.AREA_COUNTY," + | |
1134 | + " A.HOSPITAL_NO," + | |
1135 | + " A.HOSPITAL_NAME," + | |
1136 | + " A.YCY_STSTEM_ID," + | |
1137 | + " COUNT(B.RECORD_ID) AS JD_NUM" + | |
1138 | + " FROM ODS_D_HOSPITAL A" + | |
1139 | + " INNER JOIN ODS_F_GRAVIDA_RECORD B ON A.HOSPITAL_NO=B.HOSPITAL_NO " + | |
1094 | 1140 | " WHERE 1=1 " ; |
1095 | 1141 | |
1096 | 1142 | if (StringUtils.isNotEmpty(time)) |
... | ... | @@ -1347,7 +1393,9 @@ |
1347 | 1393 | return new BaseListResponse().setErrormsg("成功").setErrorcode(ErrorCodeConstants.SUCCESS).setData(checkBuildtList).setPageInfo(pageInfo); |
1348 | 1394 | } |
1349 | 1395 | |
1350 | - public BaseResponse getCheckDetail(Integer pointType,String time, String hospitalId, String provinceId, String cityId, String areaId, Integer page, Integer limit, Integer userId) { | |
1396 | + public BaseResponse getCheckDetail(Integer pointType,String time, String hospitalId, String provinceId, | |
1397 | + String cityId, String areaId, Integer page, Integer limit, Integer userId, | |
1398 | + Integer nodeName) { | |
1351 | 1399 | |
1352 | 1400 | int start = 0; |
1353 | 1401 | int end = 0; |
... | ... | @@ -1380,6 +1428,10 @@ |
1380 | 1428 | sql+=" AND CC.NODE_ID=2 "; |
1381 | 1429 | countSql+=" AND CC.NODE_ID=2 "; |
1382 | 1430 | } |
1431 | + if (nodeName != null){ | |
1432 | + sql+=" AND CC.NODE_NAME= " + nodeName; | |
1433 | + countSql+=" AND CC.NODE_NAME= " + nodeName; | |
1434 | + } | |
1383 | 1435 | //" AND CC.NODE_NAME=''\n" + |
1384 | 1436 | if (StringUtils.isNotEmpty(time)) |
1385 | 1437 | { |
... | ... | @@ -1434,7 +1486,9 @@ |
1434 | 1486 | return new BaseListResponse().setErrormsg("成功").setErrorcode(ErrorCodeConstants.SUCCESS).setData(checkBuildtList).setPageInfo(pageInfo); |
1435 | 1487 | } |
1436 | 1488 | |
1437 | - public void getCheckDetailExport(Integer pointType, String time, String hospitalId, String provinceId, String cityId, String areaId, Integer userId, HttpServletResponse httpServletResponse) { | |
1489 | + public void getCheckDetailExport(Integer pointType, String time, String hospitalId, | |
1490 | + String provinceId, String cityId, String areaId, | |
1491 | + Integer userId, HttpServletResponse httpServletResponse,Integer nodeName) { | |
1438 | 1492 | |
1439 | 1493 | String sql = "SELECT CC.EXAMINE_DATE,\n" + |
1440 | 1494 | " CC.NAME,\n" + |
... | ... | @@ -1452,6 +1506,9 @@ |
1452 | 1506 | " WHERE 1=1 "; |
1453 | 1507 | if (pointType != null && pointType == 1){ |
1454 | 1508 | sql+=" AND CC.NODE_ID=2 "; |
1509 | + } | |
1510 | + if (nodeName != null && nodeName == 1){ | |
1511 | + sql+=" AND CC.NODE_NAME= "+nodeName; | |
1455 | 1512 | } |
1456 | 1513 | //" AND CC.NODE_NAME=''\n" + |
1457 | 1514 | if (StringUtils.isNotEmpty(time)) |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/utils/MessageCenterService.java
View file @
7b874cd
... | ... | @@ -47,6 +47,7 @@ |
47 | 47 | |
48 | 48 | |
49 | 49 | /** |
50 | + * 线上环境调用 | |
50 | 51 | * 保存到短信中心 短信 |
51 | 52 | * @param list |
52 | 53 | * @return |
... | ... | @@ -62,18 +63,6 @@ |
62 | 63 | Map<String,Integer> map = JsonUtil.str2Obj(result, Map.class); |
63 | 64 | if ("0".equals(map.get("errorcode").toString())) |
64 | 65 | { |
65 | -// List<MessageRequest> msgs = list.getMessages(); | |
66 | -// if (CollectionUtils.isNotEmpty(msgs)) | |
67 | -// { | |
68 | -// for(MessageRequest messageRequest : msgs) | |
69 | -// { | |
70 | -// messageRequest.setStatus(SmsStatusEnums.YFS.getId()); | |
71 | -// } | |
72 | -// } | |
73 | -// json = JsonUtil.obj2Str(list); | |
74 | -// System.out.println("json========" + json); | |
75 | -// System.out.println("url========" + CENTER_BASE_URL); | |
76 | -// HttpRequest.sendPost(CENTER_BASE_URL+"saveCreatedSMS", json, CENTER_TOKEN); | |
77 | 66 | return true; |
78 | 67 | } |
79 | 68 | } |
... | ... | @@ -84,6 +73,71 @@ |
84 | 73 | } |
85 | 74 | return false; |
86 | 75 | } |
76 | + | |
77 | +// /** | |
78 | +// * 演示换调用 | |
79 | +// * @param list | |
80 | +// * @return | |
81 | +// */ | |
82 | +// public static boolean saveSmsCenter(MessageListRequest list) | |
83 | +// { | |
84 | +// String json = ""; | |
85 | +// try{ | |
86 | +// | |
87 | +//// MessageListRequest centerList = new MessageListRequest(); | |
88 | +//// List<MessageRequest> messageRequestList = new ArrayList<>(); | |
89 | +//// messageRequestList.addAll(list.getMessages()); | |
90 | +//// centerList.setMessages(messageRequestList); | |
91 | +//// centerList.setTypeId(list.getTypeId()); | |
92 | +//// | |
93 | +//// List<MessageRequest> centerMsgs = centerList.getMessages(); | |
94 | +//// if (CollectionUtils.isNotEmpty(centerMsgs)) | |
95 | +//// { | |
96 | +//// for(MessageRequest messageRequest : centerMsgs) | |
97 | +//// { | |
98 | +//// messageRequest.setExt1("8000000014"); | |
99 | +//// } | |
100 | +//// } | |
101 | +// | |
102 | +// List<MessageRequest> msgs = list.getMessages(); | |
103 | +// if (CollectionUtils.isNotEmpty(msgs)) | |
104 | +// { | |
105 | +// for(MessageRequest messageRequest : msgs) | |
106 | +// { | |
107 | +// messageRequest.setStatus(SmsStatusEnums.YFS.getId()); | |
108 | +// } | |
109 | +// } | |
110 | +// | |
111 | +// json = JsonUtil.obj2Str(list); | |
112 | +// String result = HttpRequest.sendPost(CENTER_BASE_URL+"saveCreatedSMS", json, CENTER_TOKEN); | |
113 | +// if (StringUtils.isNotEmpty(result)) | |
114 | +// { | |
115 | +// Map<String,Integer> map = JsonUtil.str2Obj(result, Map.class); | |
116 | +// if ("0".equals(map.get("errorcode").toString())) | |
117 | +// { | |
118 | +// | |
119 | +// if (CollectionUtils.isNotEmpty(msgs)) | |
120 | +// { | |
121 | +// for(MessageRequest messageRequest : msgs) | |
122 | +// { | |
123 | +// messageRequest.setStatus(SmsStatusEnums.WFS.getId()); | |
124 | +// messageRequest.setExt1("8000000014"); | |
125 | +// } | |
126 | +// } | |
127 | +// json = JsonUtil.obj2Str(list); | |
128 | +// System.out.println("json========" + json); | |
129 | +// System.out.println("url========" + CENTER_BASE_URL); | |
130 | +// HttpRequest.sendPost("http://sms.healthbaby.com.cn/v1/saveCreatedSMS", json, CENTER_TOKEN); | |
131 | +// return true; | |
132 | +// } | |
133 | +// } | |
134 | +// } | |
135 | +// catch (Exception e) | |
136 | +// { | |
137 | +// ExceptionUtils.catchException(e,"保存短信中心异常"+json); | |
138 | +// } | |
139 | +// return false; | |
140 | +// } | |
87 | 141 | |
88 | 142 | |
89 | 143 | public static SmsResult querySmsList(String hospitalId, String phone,Integer smsType,Integer smsStatus,String content,String planTimeStart,String planTimeEnd,String actualTimeStart,String actualTimeEnd,Integer objType ,Integer page, Integer limit) |