Commit bb243841214606f89a9bc4aa00b9039c774fbab0
Exists in
master
and in
8 other branches
Merge remote-tracking branch 'origin/master'
Showing 17 changed files
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/impl/AntenatalExaminationDaoImpl.java
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/impl/BabyBookbuildingDaoImpl.java
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/impl/PostReviewDaoImpl.java
- platform-common/pom.xml
- platform-common/src/main/java/com/lyms/platform/common/utils/DateUtil.java
- platform-common/src/main/java/com/lyms/platform/common/utils/ExcelUtil.java
- platform-common/src/main/java/com/lyms/platform/common/utils/StringUtils.java
- platform-dal/src/main/java/com/lyms/platform/pojo/BabyCheckModel.java
- platform-dal/src/main/java/com/lyms/platform/query/AntExChuQuery.java
- platform-data-api/src/main/java/com/lyms/platform/data/service/impl/SmsServiceImpl.java
- 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/ApplyOrderController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BabyBookbuildingController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ApplyOrderFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyCheckFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/SmsTemplateFacade.java
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/impl/AntenatalExaminationDaoImpl.java
View file @
bb24384
... | ... | @@ -63,7 +63,7 @@ |
63 | 63 | @Override |
64 | 64 | public List<AntenatalExaminationModel> queryYuyueAntenatalExamination(Date yuYueDate,String hospitalId) { |
65 | 65 | AggregationOperation match = Aggregation.match(Criteria.where("nextCheckTime").gte(yuYueDate).lte(yuYueDate).and("hospitalId").is(hospitalId)); |
66 | - AggregationOperation group = Aggregation.group("parentId").max("modified").as("modified"); | |
66 | + AggregationOperation group = Aggregation.group("parentId").max("created").as("created"); | |
67 | 67 | Aggregation aggregation = Aggregation.newAggregation(match, group); |
68 | 68 | AggregationResults<AntenatalExaminationModel> result = this.mongoTemplate.aggregate(aggregation, "lyms_antex", AntenatalExaminationModel.class); |
69 | 69 | return result.getMappedResults(); |
... | ... | @@ -71,8 +71,8 @@ |
71 | 71 | @Override |
72 | 72 | public List<AntenatalExaminationModel> queryYuyueAntenatalExamination(Date startDate,String hospitalId,String pid) { |
73 | 73 | |
74 | - AggregationOperation match = Aggregation.match(Criteria.where("nextCheckTime").gte("startDate").and("parentId").is("pid").and("hospitalId").is(hospitalId)); | |
75 | - AggregationOperation group = Aggregation.group("parentId").max("modified").as("modified"); | |
74 | + AggregationOperation match = Aggregation.match(Criteria.where("nextCheckTime").gte("startDate").lte(startDate).and("parentId").is("pid").and("hospitalId").is(hospitalId)); | |
75 | + AggregationOperation group = Aggregation.group("parentId").max("created").as("created"); | |
76 | 76 | Aggregation aggregation = Aggregation.newAggregation(match, group); |
77 | 77 | AggregationResults<AntenatalExaminationModel> result = this.mongoTemplate.aggregate(aggregation, "lyms_antex", AntenatalExaminationModel.class); |
78 | 78 | return result.getMappedResults(); |
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/impl/BabyBookbuildingDaoImpl.java
View file @
bb24384
... | ... | @@ -48,8 +48,8 @@ |
48 | 48 | |
49 | 49 | @Override |
50 | 50 | public List<BabyCheckModel> queryBabyYuYueRecord(Date yuYueDate, String hospitalId) { |
51 | - AggregationOperation match = Aggregation.match(Criteria.where("nextDate").gte(yuYueDate).and("hospitalId").is(hospitalId)); | |
52 | - AggregationOperation group = Aggregation.group("buildId").max("modified").as("modified"); | |
51 | + AggregationOperation match = Aggregation.match(Criteria.where("nextDate").gte(yuYueDate).lte(yuYueDate).and("hospitalId").is(hospitalId)); | |
52 | + AggregationOperation group = Aggregation.group("buildId").max("created").as("created"); | |
53 | 53 | Aggregation aggregation = Aggregation.newAggregation(match, group); |
54 | 54 | AggregationResults<BabyCheckModel> result = this.mongoTemplate.aggregate(aggregation, "lyms_babycheck", BabyCheckModel.class); |
55 | 55 | return result.getMappedResults(); |
... | ... | @@ -57,8 +57,8 @@ |
57 | 57 | |
58 | 58 | @Override |
59 | 59 | public List<BabyCheckModel> queryBabyOrder(Date startDate, String hospitalId, String buildId) { |
60 | - AggregationOperation match = Aggregation.match(Criteria.where("nextDate").gte(startDate).and("hospitalId").is(hospitalId).and("buildId").is(buildId)); | |
61 | - AggregationOperation group = Aggregation.group("buildId").max("modified").as("modified"); | |
60 | + AggregationOperation match = Aggregation.match(Criteria.where("nextDate").gte(startDate).lte(startDate).and("buildId").is(buildId)); | |
61 | + AggregationOperation group = Aggregation.group("buildId").max("created").as("created"); | |
62 | 62 | Aggregation aggregation = Aggregation.newAggregation(match, group); |
63 | 63 | AggregationResults<BabyCheckModel> result = this.mongoTemplate.aggregate(aggregation, "lyms_babycheck", BabyCheckModel.class); |
64 | 64 | return result.getMappedResults(); |
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/impl/PostReviewDaoImpl.java
View file @
bb24384
... | ... | @@ -78,16 +78,16 @@ |
78 | 78 | |
79 | 79 | @Override |
80 | 80 | public List<PostReviewModel> queryPostOrder(Date orderDate, String hospitalId) { |
81 | - AggregationOperation match = Aggregation.match(Criteria.where("nextCheckDate").gte(orderDate).and("nextCheckDate").lte(orderDate).and("hospitalId").is(hospitalId)); | |
82 | - AggregationOperation group = Aggregation.group("parentId").max("modified").as("modified"); | |
81 | + AggregationOperation match = Aggregation.match(Criteria.where("nextCheckDate").gte(orderDate).lte(orderDate).and("hospitalId").is(hospitalId)); | |
82 | + AggregationOperation group = Aggregation.group("parentId").max("created").as("created"); | |
83 | 83 | Aggregation aggregation = Aggregation.newAggregation(match, group); |
84 | 84 | AggregationResults<PostReviewModel> result = this.mongoTemplate.aggregate(aggregation, "lyms_postreview", PostReviewModel.class); |
85 | 85 | return result.getMappedResults(); |
86 | 86 | } |
87 | 87 | @Override |
88 | - public List<PostReviewModel> queryPostOrder(Date orderDate, String hospitalId,String pid) { | |
89 | - AggregationOperation match = Aggregation.match(Criteria.where("nextCheckDate").gte(orderDate).and("nextCheckDate").lte(orderDate).and("hospitalId").is(hospitalId).and("parentId")); | |
90 | - AggregationOperation group = Aggregation.group("parentId").max("modified").as("modified"); | |
88 | + public List<PostReviewModel> queryPostOrder(Date orderDate, String hospitalId,String parentId) { | |
89 | + AggregationOperation match = Aggregation.match(Criteria.where("nextCheckDate").gte(orderDate).lte(orderDate).and("hospitalId").is(hospitalId).and("parentId").is(parentId)); | |
90 | + AggregationOperation group = Aggregation.group("parentId").max("created").as("created"); | |
91 | 91 | Aggregation aggregation = Aggregation.newAggregation(match, group); |
92 | 92 | AggregationResults<PostReviewModel> result = this.mongoTemplate.aggregate(aggregation, "lyms_postreview", PostReviewModel.class); |
93 | 93 | return result.getMappedResults(); |
platform-common/pom.xml
View file @
bb24384
... | ... | @@ -19,6 +19,13 @@ |
19 | 19 | <artifactId>pinyin4j</artifactId> |
20 | 20 | <version>2.5.0</version> |
21 | 21 | </dependency> |
22 | + <!-- Execl --> | |
23 | + <dependency> | |
24 | + <groupId>net.sourceforge.jexcelapi</groupId> | |
25 | + <artifactId>jxl</artifactId> | |
26 | + <version>2.6.12</version> | |
27 | + </dependency> | |
28 | + <!-- end Execl --> | |
22 | 29 | </dependencies> |
23 | 30 | <build> |
24 | 31 | <plugins> |
platform-common/src/main/java/com/lyms/platform/common/utils/DateUtil.java
View file @
bb24384
... | ... | @@ -714,8 +714,8 @@ |
714 | 714 | |
715 | 715 | // Date lastLmess = parseYMD("2016-07-02"); |
716 | 716 | // Date startDate = DateUtil.getRangeDate(lastLmess, 1, "周", -2); |
717 | - Date startDate = DateUtil.addDay(new Date(), -100); | |
718 | - System.out.println(getyyyy_MM_dd(startDate)); | |
717 | +// Date startDate = DateUtil.addDay(new Date(), -100); | |
718 | +// System.out.println(getyyyy_MM_dd(startDate)); | |
719 | 719 | try { |
720 | 720 | |
721 | 721 | // Date startDate = DateUtil.addMonth(new Date(), -1); |
722 | 722 | |
... | ... | @@ -738,10 +738,14 @@ |
738 | 738 | // String st = md.format(new Date()); |
739 | 739 | // System.out.print(st); |
740 | 740 | |
741 | - int s = getBabyMonthAge1(parseYMD("2016-09-07"), new Date()); | |
742 | - System.out.println(s); | |
741 | +// int s = getBabyMonthAge1(parseYMD("2016-09-07"), new Date()); | |
742 | +// System.out.println(s); | |
743 | 743 | // Date s = addDay(parseYMD("2016-02-26"), 168); |
744 | -// System.out.println(getyyyy_MM_dd(s)); | |
744 | + | |
745 | + Date startDate = DateUtil.getNewDate(-0,"天",0); | |
746 | + Date endDate = DateUtil.getNewDate(-5,"天",0); | |
747 | + | |
748 | + System.out.println(startDate + "==="+ endDate); | |
745 | 749 | } catch (Exception e) |
746 | 750 | { |
747 | 751 |
platform-common/src/main/java/com/lyms/platform/common/utils/ExcelUtil.java
View file @
bb24384
1 | +package com.lyms.platform.common.utils; | |
2 | + | |
3 | +import java.io.File; | |
4 | +import java.io.FileOutputStream; | |
5 | +import java.io.IOException; | |
6 | +import java.io.OutputStream; | |
7 | +import java.util.Iterator; | |
8 | +import java.util.List; | |
9 | +import java.util.Map; | |
10 | + | |
11 | + | |
12 | +import jxl.SheetSettings; | |
13 | +import jxl.Workbook; | |
14 | +import jxl.format.Colour; | |
15 | +import jxl.format.UnderlineStyle; | |
16 | +import jxl.write.Label; | |
17 | +import jxl.write.WritableCellFormat; | |
18 | +import jxl.write.WritableFont; | |
19 | +import jxl.write.WritableSheet; | |
20 | +import jxl.write.WritableWorkbook; | |
21 | +import jxl.write.WriteException; | |
22 | +import jxl.write.biff.RowsExceededException; | |
23 | + | |
24 | +/** | |
25 | + * Excel 工具类 | |
26 | + * | |
27 | + * @author lqy | |
28 | + * | |
29 | + */ | |
30 | +public class ExcelUtil | |
31 | +{ | |
32 | + | |
33 | + static File from_file; | |
34 | + | |
35 | + static WritableWorkbook to_wwb; // 创建可写入workbook对象 | |
36 | + | |
37 | + public static OutputStream toExcel(OutputStream out, List<Map<String, Object>> data, Map<String, String> columName) | |
38 | + { | |
39 | + WritableWorkbook wwb; | |
40 | + try | |
41 | + { | |
42 | + wwb = Workbook.createWorkbook(out); | |
43 | + WritableSheet ws = wwb.createSheet("sheet", 0); // 创建一个工作表 | |
44 | + /** | |
45 | + * 设置单元格样式 | |
46 | + */ | |
47 | + WritableFont wf = new WritableFont(WritableFont.ARIAL, 12, WritableFont.BOLD, false, UnderlineStyle.NO_UNDERLINE, Colour.BLACK); | |
48 | + WritableCellFormat wcf = new WritableCellFormat(wf); | |
49 | + ws.setRowView(0, 300); // 设置指定行高 | |
50 | + // 设置列宽 | |
51 | + for (int j = 0, columLen = columName.size(); j < columLen; j++) | |
52 | + { | |
53 | + ws.setColumnView(j, 15); | |
54 | + } | |
55 | + // 填充数据的内容 | |
56 | + Map<String, Object> map; | |
57 | + for (int i = 0, len = data.size(); i < len; i++) | |
58 | + { | |
59 | + map = data.get(i); | |
60 | + Iterator<String> ite = columName.keySet().iterator(); | |
61 | + int j = 0; | |
62 | + String keyORvalue = ""; | |
63 | + String keyName = ""; | |
64 | + while (ite.hasNext()) | |
65 | + { | |
66 | + keyName = ite.next(); | |
67 | + if (i > 0) | |
68 | + { // 类容数据 | |
69 | + keyORvalue = map.get(keyName).toString(); | |
70 | + } | |
71 | + else | |
72 | + { // 第一行列名 | |
73 | + keyORvalue = map.get(keyName).toString(); | |
74 | + keyName = columName.get(keyName); | |
75 | + ws.addCell(new Label(j, 0, keyName, wcf)); | |
76 | + } | |
77 | + ws.addCell(new Label(j, 1 + i, keyORvalue)); | |
78 | + j++; | |
79 | + } | |
80 | + } | |
81 | + | |
82 | + wwb.write(); | |
83 | + wwb.close(); | |
84 | + } | |
85 | + catch (IOException e) | |
86 | + { | |
87 | + e.printStackTrace(); | |
88 | + } | |
89 | + catch (RowsExceededException e) | |
90 | + { | |
91 | + e.printStackTrace(); | |
92 | + } | |
93 | + catch (WriteException e) | |
94 | + { | |
95 | + e.printStackTrace(); | |
96 | + } | |
97 | + return out; | |
98 | + } | |
99 | + | |
100 | + | |
101 | + | |
102 | +} |
platform-common/src/main/java/com/lyms/platform/common/utils/StringUtils.java
View file @
bb24384
... | ... | @@ -159,6 +159,16 @@ |
159 | 159 | } |
160 | 160 | |
161 | 161 | |
162 | + public static String replaceName(String name,String repalceStr) | |
163 | + { | |
164 | + if (StringUtils.isNotEmpty(repalceStr)) | |
165 | + { | |
166 | + return repalceStr.replace("{{姓名}}",name); | |
167 | + } | |
168 | + return repalceStr; | |
169 | + } | |
170 | + | |
171 | + | |
162 | 172 | // public static void main(String[] arg) { |
163 | 173 | // System.out.print(encryPhone("18382670036")); |
164 | 174 | // } |
platform-dal/src/main/java/com/lyms/platform/pojo/BabyCheckModel.java
View file @
bb24384
... | ... | @@ -220,6 +220,15 @@ |
220 | 220 | //创建时间 |
221 | 221 | private Date created; |
222 | 222 | |
223 | + private String hospitalId; | |
224 | + | |
225 | + public String getHospitalId() { | |
226 | + return hospitalId; | |
227 | + } | |
228 | + | |
229 | + public void setHospitalId(String hospitalId) { | |
230 | + this.hospitalId = hospitalId; | |
231 | + } | |
223 | 232 | |
224 | 233 | public String getDrugGllergic() { |
225 | 234 | return drugGllergic; |
platform-dal/src/main/java/com/lyms/platform/query/AntExChuQuery.java
View file @
bb24384
... | ... | @@ -130,15 +130,9 @@ |
130 | 130 | isAddStart = Boolean.TRUE; |
131 | 131 | } |
132 | 132 | |
133 | - if (null != nextCheckTimeStart) { | |
134 | - if (c == null) | |
135 | - { | |
136 | - c = Criteria.where("nextCheckTime").gte(nextCheckTimeStart); | |
137 | - } | |
138 | - else | |
139 | - { | |
140 | - c.and("nextCheckTime").gte(nextCheckTimeStart); | |
141 | - } | |
133 | + if (null != nextCheckTimeStart && nextCheckTimeEnd != null) { | |
134 | + Criteria nc = Criteria.where("nextCheckTime").gte(nextCheckTimeStart).lte(nextCheckTimeEnd); | |
135 | + condition= condition.andCondition(new MongoCondition(nc)); | |
142 | 136 | } |
143 | 137 | |
144 | 138 | if (isAddStart) { |
platform-data-api/src/main/java/com/lyms/platform/data/service/impl/SmsServiceImpl.java
View file @
bb24384
... | ... | @@ -622,7 +622,8 @@ |
622 | 622 | public void productTemplateSms() { |
623 | 623 | SmsConfigQuery configQuery = new SmsConfigQuery(); |
624 | 624 | configQuery.setYn(YnEnums.YES.getId()); |
625 | - configQuery.setPrefixTypes(new Integer[]{0,1}); | |
625 | + configQuery.setPrefixTypes(new Integer[]{0, 1}); | |
626 | + configQuery.setHospitalId(221+""); | |
626 | 627 | |
627 | 628 | //查询出对应医院配置 |
628 | 629 | List<SmsConfigModel> configs = smsConfigService.querySmsConfig(configQuery); |
... | ... | @@ -763,7 +764,7 @@ |
763 | 764 | |
764 | 765 | if (start != null && end != null) |
765 | 766 | { |
766 | - Date startDate = DateUtil.getNewDate(-end,"周",sendTimeType); | |
767 | + Date startDate = DateUtil.getNewDate(-end-1,"周",sendTimeType); | |
767 | 768 | Date endDate = DateUtil.getNewDate(-start,"周",sendTimeType); |
768 | 769 | patientsQuery.setLastMensesStart(startDate); |
769 | 770 | patientsQuery.setLastMensesEnd(endDate); |
... | ... | @@ -989,7 +990,7 @@ |
989 | 990 | if (end != null && start != null) |
990 | 991 | { |
991 | 992 | |
992 | - Date startDate = DateUtil.getNewDate(-end,"周",sendTimeType); | |
993 | + Date startDate = DateUtil.getNewDate(-end-1,"周",sendTimeType); | |
993 | 994 | Date endDate = DateUtil.getNewDate(-start,"周",sendTimeType); |
994 | 995 | patientsQuery.setLastMensesStart(startDate); |
995 | 996 | patientsQuery.setLastMensesEnd(endDate); |
... | ... | @@ -1020,6 +1021,7 @@ |
1020 | 1021 | if (smsType == SmsServiceEnums.EBYYTX.getId()) |
1021 | 1022 | { |
1022 | 1023 | Date yuYueDate = DateUtil.addDay(new Date(), sendTimeType); |
1024 | + yuYueDate = DateUtil.formatDate(yuYueDate); | |
1023 | 1025 | List<BabyCheckModel> checkModels = babyBookbuildingService.queryBabyYuYueRecord(yuYueDate, tempHid); |
1024 | 1026 | if (CollectionUtils.isNotEmpty(checkModels)) |
1025 | 1027 | { |
1026 | 1028 | |
... | ... | @@ -1028,10 +1030,10 @@ |
1028 | 1030 | |
1029 | 1031 | BabyModelQuery query = new BabyModelQuery(); |
1030 | 1032 | query.setYn(YnEnums.YES.getId()); |
1031 | - query.setId(checkModel.getBuildId()); | |
1033 | + query.setId(checkModel.getId()); //这里返回的id就是buildId | |
1032 | 1034 | |
1033 | 1035 | //查询符合条件儿童 |
1034 | - List<BabyModel> babyModels = babyBookbuildingService.queryBabyBuildByCond(babyModelQuery); | |
1036 | + List<BabyModel> babyModels = babyBookbuildingService.queryBabyBuildByCond(query); | |
1035 | 1037 | if (CollectionUtils.isNotEmpty(babyModels)) |
1036 | 1038 | { |
1037 | 1039 | for (BabyModel model : babyModels) |
... | ... | @@ -1383,7 +1385,7 @@ |
1383 | 1385 | { |
1384 | 1386 | PatientsQuery query = new PatientsQuery(); |
1385 | 1387 | query.setYn(YnEnums.YES.getId()); |
1386 | - query.setId(orderModel.getParentId()); | |
1388 | + query.setId(orderModel.getId()); //id就是parentId | |
1387 | 1389 | |
1388 | 1390 | //查询符合条件的产妇 |
1389 | 1391 | List<Patients> patients = yunBookbuildingService.queryPregnantWithQuery(patientsQuery); |
... | ... | @@ -1847,7 +1849,7 @@ |
1847 | 1849 | List<PostReviewModel> models = postReviewService.queryPostOrder(startDate, tempHid, pid); |
1848 | 1850 | for (PostReviewModel model : models) |
1849 | 1851 | { |
1850 | - idset.add(model.getParentId()); | |
1852 | + idset.add(model.getId()); //这里的id就是parentid | |
1851 | 1853 | } |
1852 | 1854 | return idset.size() > 0; |
1853 | 1855 | } |
... | ... | @@ -1874,7 +1876,7 @@ |
1874 | 1876 | List<BabyCheckModel> models = babyBookbuildingService.queryBabyOrder(startDate, tempHid, pid); |
1875 | 1877 | for (BabyCheckModel model : models) |
1876 | 1878 | { |
1877 | - idset.add(model.getBuildId()); | |
1879 | + idset.add(model.getId()); | |
1878 | 1880 | } |
1879 | 1881 | return idset.size() > 0; |
1880 | 1882 | } |
... | ... | @@ -2110,6 +2112,7 @@ |
2110 | 2112 | antExChuQuery.setYn(YnEnums.YES.getId()); |
2111 | 2113 | antExChuQuery.setNextCheckTimeStart(yuYueDate); |
2112 | 2114 | antExChuQuery.setNextCheckTimeEnd(yuYueDate); |
2115 | + antExChuQuery.setHospitalId(tempHid); | |
2113 | 2116 | List<AntExChuModel> chus = antenatalExaminationService.queryAntExChu(antExChuQuery); |
2114 | 2117 | for (AntExChuModel chu : chus) |
2115 | 2118 | { |
... | ... | @@ -2119,7 +2122,7 @@ |
2119 | 2122 | |
2120 | 2123 | for (AntenatalExaminationModel f : fuzs) |
2121 | 2124 | { |
2122 | - idset.add(f.getParentId()); | |
2125 | + idset.add(f.getId()); //这里的id就是parentid | |
2123 | 2126 | } |
2124 | 2127 | return idset; |
2125 | 2128 | } |
platform-data-api/src/main/java/com/lyms/platform/data/util/AmsMessageService.java
View file @
bb24384
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/ApplyOrderController.java
View file @
bb24384
... | ... | @@ -16,6 +16,7 @@ |
16 | 16 | import org.springframework.web.bind.annotation.*; |
17 | 17 | |
18 | 18 | import javax.servlet.http.HttpServletRequest; |
19 | +import javax.servlet.http.HttpServletResponse; | |
19 | 20 | import javax.validation.Valid; |
20 | 21 | |
21 | 22 | /** |
... | ... | @@ -67,7 +68,7 @@ |
67 | 68 | //增加产筛申请单 |
68 | 69 | public BaseResponse addSieveApplyOrder(@Valid @RequestBody SieveApplyOrderAddRequest applyOrderAddRequest,HttpServletRequest request) { |
69 | 70 | LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); |
70 | - return applyOrderFacade.addOneSieveApplyOrder(applyOrderAddRequest,loginState.getId()); | |
71 | + return applyOrderFacade.addOneSieveApplyOrder(applyOrderAddRequest, loginState.getId()); | |
71 | 72 | } |
72 | 73 | @RequestMapping(method = RequestMethod.GET,value = "/sieveapply") |
73 | 74 | @ResponseBody |
... | ... | @@ -92,6 +93,20 @@ |
92 | 93 | public BaseResponse queryApplyOrder(@Valid ApplyOrderQueryRequest orderQueryRequest,HttpServletRequest request){ |
93 | 94 | LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); |
94 | 95 | return applyOrderFacade.queryApplyOrder(orderQueryRequest, loginState.getId()); |
96 | + } | |
97 | + | |
98 | + /** | |
99 | + * 导出儿童转诊 | |
100 | + * @param orderQueryRequest | |
101 | + * @param request | |
102 | + * @return | |
103 | + */ | |
104 | + @RequestMapping(method = RequestMethod.GET,value = "/exportChildZZ") | |
105 | + @ResponseBody | |
106 | + @TokenRequired | |
107 | + public void exportChildZZ(@Valid ApplyOrderQueryRequest orderQueryRequest,HttpServletRequest request,HttpServletResponse response){ | |
108 | + LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); | |
109 | + applyOrderFacade.exportChildZZ(orderQueryRequest, loginState.getId(),response); | |
95 | 110 | } |
96 | 111 | |
97 | 112 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BabyBookbuildingController.java
View file @
bb24384
... | ... | @@ -16,6 +16,7 @@ |
16 | 16 | import org.springframework.web.bind.annotation.*; |
17 | 17 | |
18 | 18 | import javax.servlet.http.HttpServletRequest; |
19 | +import javax.servlet.http.HttpServletResponse; | |
19 | 20 | import javax.validation.Valid; |
20 | 21 | import java.io.UnsupportedEncodingException; |
21 | 22 | |
... | ... | @@ -107,7 +108,7 @@ |
107 | 108 | param.setVcCardNo(vcCardNo); |
108 | 109 | param.setHospitalId(hospitalId); |
109 | 110 | LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); |
110 | - return babyBookbuildingFacade.queryBabyBuildRecord(param,loginState.getId()); | |
111 | + return babyBookbuildingFacade.queryBabyBuildRecord(param, loginState.getId()); | |
111 | 112 | } |
112 | 113 | |
113 | 114 | |
... | ... | @@ -193,6 +194,44 @@ |
193 | 194 | request.setPage(page); |
194 | 195 | |
195 | 196 | return babyBookbuildingFacade.queryBabyList(request,loginState.getId()); |
197 | + } | |
198 | + | |
199 | + | |
200 | + @RequestMapping(value = "/exportChilds", method = RequestMethod.GET) | |
201 | + @TokenRequired | |
202 | + public void exportChilds(HttpServletRequest httpServletRequest,HttpServletResponse httpServletResponse, | |
203 | + @RequestParam(value = "mcardNo", required = false) String mcardNo, | |
204 | + @RequestParam(value = "bcardNo", required = false) String bcardNo, | |
205 | + @RequestParam(value = "mphone", required = false) String mphone, | |
206 | + @RequestParam(value = "startMonthAge", required = false) Integer startMonthAge, | |
207 | + @RequestParam(value = "endMonthAge", required = false) Integer endMonthAge, | |
208 | + @RequestParam(value = "birth", required = false) String birth, | |
209 | + @RequestParam(value = "nextDate", required = false) String nextDate, | |
210 | + @RequestParam(value = "expVip", required = false) Integer expVip, | |
211 | + @RequestParam(value = "serviceType", required = false) Integer serviceType, | |
212 | + @RequestParam(value = "name", required = false) String name, | |
213 | + @RequestParam(value = "highRiskType", required = false) Integer highRiskType, | |
214 | + @RequestParam(value = "diagnose", required = false) String diagnose, | |
215 | + @RequestParam("page") Integer page, | |
216 | + @RequestParam("limit") Integer limit){ | |
217 | + LoginContext loginState = (LoginContext) httpServletRequest.getAttribute("loginContext"); | |
218 | + BabyManageRequest request = new BabyManageRequest(); | |
219 | + request.setBcardNo(bcardNo); | |
220 | + request.setMcardNo(mcardNo); | |
221 | + request.setMphone(mphone); | |
222 | + request.setMonthAgeStart(startMonthAge); | |
223 | + request.setMonthAgeEnd(endMonthAge); | |
224 | + request.setBirth(birth); | |
225 | + request.setNextDate(nextDate); | |
226 | + request.setExpVip(expVip); | |
227 | + request.setHighRiskType(highRiskType); | |
228 | + request.setServiceType(serviceType); | |
229 | + request.setDiagnose(diagnose); | |
230 | + request.setName(name); | |
231 | + request.setLimit(limit); | |
232 | + request.setPage(page); | |
233 | + | |
234 | + babyBookbuildingFacade.exportChilds(request,loginState.getId(),httpServletResponse); | |
196 | 235 | } |
197 | 236 | |
198 | 237 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ApplyOrderFacade.java
View file @
bb24384
... | ... | @@ -7,6 +7,7 @@ |
7 | 7 | import com.lyms.platform.common.result.BaseObjectResponse; |
8 | 8 | import com.lyms.platform.common.result.BaseResponse; |
9 | 9 | import com.lyms.platform.common.utils.DateUtil; |
10 | +import com.lyms.platform.common.utils.ExcelUtil; | |
10 | 11 | import com.lyms.platform.common.utils.SystemConfig; |
11 | 12 | import com.lyms.platform.operate.web.request.ApplyOrderQueryRequest; |
12 | 13 | import com.lyms.platform.operate.web.request.BabyApplyOrderQueryRequest; |
... | ... | @@ -26,6 +27,9 @@ |
26 | 27 | import org.springframework.beans.factory.annotation.Autowired; |
27 | 28 | import org.springframework.stereotype.Component; |
28 | 29 | |
30 | +import javax.servlet.http.HttpServletResponse; | |
31 | +import java.io.IOException; | |
32 | +import java.io.OutputStream; | |
29 | 33 | import java.util.*; |
30 | 34 | |
31 | 35 | /** |
... | ... | @@ -360,8 +364,8 @@ |
360 | 364 | Map map1 = new HashMap(); |
361 | 365 | zhuanCName=zhuanchu; |
362 | 366 | zhuanRname=zhuanru; |
363 | - map1.put("id",""); | |
364 | - map1.put("name",zhuanRname); | |
367 | + map1.put("id", ""); | |
368 | + map1.put("name", zhuanRname); | |
365 | 369 | if (NumberUtils.isNumber(zhuanchu)) { |
366 | 370 | Organization zhuanc = organizationService.getOrganization(Integer.valueOf(zhuanchu)); |
367 | 371 | if (null != zhuanc) { |
... | ... | @@ -736,6 +740,217 @@ |
736 | 740 | map.put("score", list); |
737 | 741 | map.put("organizations", antenatalExaminationFacade.convert()); |
738 | 742 | return new BaseObjectResponse().setData(map).setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); |
743 | + } | |
744 | + | |
745 | + public void exportChildZZ(ApplyOrderQueryRequest applyOrderQueryRequest, Integer userId | |
746 | + ,HttpServletResponse response) { | |
747 | + ReferralApplyOrderQuery referralApplyOrderQuery = new ReferralApplyOrderQuery(); | |
748 | + referralApplyOrderQuery.setName(applyOrderQueryRequest.getName()); | |
749 | + Date currentDate = DateUtil.formatDate(new Date()); | |
750 | + //根据年龄 | |
751 | + if (null != applyOrderQueryRequest.getEndAge()) { | |
752 | + Date date = DateUtil.addYear(currentDate, -applyOrderQueryRequest.getEndAge()); | |
753 | + date = DateUtil.addYear(date,-1); | |
754 | + referralApplyOrderQuery.setBirthStart(date); | |
755 | + } | |
756 | + | |
757 | + if (null != applyOrderQueryRequest.getStartAge()) { | |
758 | + Date date = DateUtil.addYear(currentDate, -applyOrderQueryRequest.getStartAge()); | |
759 | + referralApplyOrderQuery.setBirthEnd(date); | |
760 | + } | |
761 | + //根据孕周 | |
762 | + if (null != applyOrderQueryRequest.getEndDueWeek()) { | |
763 | + referralApplyOrderQuery.setDueDateEnd(applyOrderQueryRequest.getEndDueWeek()); | |
764 | + } | |
765 | + if (null != applyOrderQueryRequest.getStartDueWeek()) { | |
766 | +// int i = NumberUtils.toInt(applyOrderQueryRequest.getStartDueWeek()) * 7; | |
767 | + referralApplyOrderQuery.setDueDateStart( applyOrderQueryRequest.getStartDueWeek()); | |
768 | + } | |
769 | + | |
770 | + if (null != applyOrderQueryRequest.getStartScore()) { | |
771 | + referralApplyOrderQuery.setScoreStart(applyOrderQueryRequest.getStartScore()); | |
772 | + } | |
773 | + | |
774 | + if (null != applyOrderQueryRequest.getEndScore()) { | |
775 | + referralApplyOrderQuery.setScoreEnd(applyOrderQueryRequest.getEndScore()); | |
776 | + } | |
777 | + | |
778 | + referralApplyOrderQuery.setRiskFactor(applyOrderQueryRequest.getRiskFactor()); | |
779 | + referralApplyOrderQuery.setrLevel(applyOrderQueryRequest.getrLevel()); | |
780 | + referralApplyOrderQuery.setCardNo(applyOrderQueryRequest.getCardNo()); | |
781 | + referralApplyOrderQuery.setPage(applyOrderQueryRequest.getPage()); | |
782 | + referralApplyOrderQuery.setPhone(applyOrderQueryRequest.getPhone()); | |
783 | + | |
784 | + referralApplyOrderQuery.setLimit(applyOrderQueryRequest.getLimit()); | |
785 | + referralApplyOrderQuery.setType(applyOrderQueryRequest.getType()); | |
786 | + referralApplyOrderQuery.setNeed("1"); | |
787 | + | |
788 | + String hospital = autoMatchFacade.getHospitalId(userId); | |
789 | + referralApplyOrderQuery.setHospitalId(hospital); | |
790 | + referralApplyOrderQuery.setHospitalName(organizationService.getOrganization(Integer.valueOf(hospital)).getName()); | |
791 | + //1 转入 0转出 | |
792 | + if ("1".equals(applyOrderQueryRequest.getAction())) { | |
793 | + if (StringUtils.isNotEmpty(applyOrderQueryRequest.getTransferredHospital())) { | |
794 | + if (NumberUtils.isNumber(applyOrderQueryRequest.getTransferredHospital())) { | |
795 | + referralApplyOrderQuery.setOutHospitalId(applyOrderQueryRequest.getTransferredHospital()); | |
796 | + } else { | |
797 | + OrganizationQuery organizationQuery = new OrganizationQuery(); | |
798 | + organizationQuery.setYn(YnEnums.YES.getId()); | |
799 | + organizationQuery.setName(applyOrderQueryRequest.getTransferredHospital()); | |
800 | + List<Organization> organization = organizationService.queryOrganization(organizationQuery); | |
801 | + if (CollectionUtils.isNotEmpty(organization)) { | |
802 | + referralApplyOrderQuery.setOutHospitalId(organization.get(0).getId() + ""); | |
803 | + } else { | |
804 | + referralApplyOrderQuery.setOutHospitalId(applyOrderQueryRequest.getTransferredHospital()); | |
805 | + } | |
806 | + } | |
807 | + } | |
808 | + | |
809 | + referralApplyOrderQuery.setTransferredHospital(hospital); | |
810 | + } else if ("0".equals(applyOrderQueryRequest.getAction())) { | |
811 | + if (StringUtils.isNotEmpty(applyOrderQueryRequest.getTransferredHospital())) { | |
812 | + if (NumberUtils.isNumber(applyOrderQueryRequest.getTransferredHospital())) { | |
813 | + referralApplyOrderQuery.setTransferredHospital(applyOrderQueryRequest.getTransferredHospital()); | |
814 | + } else { | |
815 | + OrganizationQuery organizationQuery = new OrganizationQuery(); | |
816 | + organizationQuery.setYn(YnEnums.YES.getId()); | |
817 | + organizationQuery.setName(applyOrderQueryRequest.getTransferredHospital()); | |
818 | + List<Organization> organization = organizationService.queryOrganization(organizationQuery); | |
819 | + if (CollectionUtils.isNotEmpty(organization)) { | |
820 | + referralApplyOrderQuery.setTransferredHospital(organization.get(0).getId() + ""); | |
821 | + } else { | |
822 | + referralApplyOrderQuery.setTransferredHospital(applyOrderQueryRequest.getTransferredHospital()); | |
823 | + } | |
824 | + } | |
825 | + } | |
826 | + referralApplyOrderQuery.setOutHospitalId(hospital); | |
827 | + } | |
828 | + List<ReferralApplyOrderModel> orderModels = applyOrderService.queryReferralApplyOrderWithQuery(referralApplyOrderQuery); | |
829 | + | |
830 | + List<Map<String,Object>> datas = new ArrayList<>(); | |
831 | + | |
832 | + if (CollectionUtils.isNotEmpty(orderModels)) { | |
833 | + for (ReferralApplyOrderModel orderModel : orderModels) { | |
834 | + | |
835 | + Map<String,Object> data = new HashMap<>(); | |
836 | + | |
837 | + ApplyOrderOutResult applyOrderResult = new ApplyOrderOutResult(); | |
838 | + String zhuanchu = orderModel.getOutHospitalId(); | |
839 | + String zhuanru = orderModel.getTransferredHospital(); | |
840 | + String zhuanCName = zhuanchu; | |
841 | + String zhuanRname = zhuanru; | |
842 | + if (NumberUtils.isNumber(zhuanchu)) { | |
843 | + Organization zhuanc = organizationService.getOrganization(Integer.valueOf(zhuanchu)); | |
844 | + if (null != zhuanc) { | |
845 | + zhuanCName = zhuanc.getName(); | |
846 | + } | |
847 | + } | |
848 | + if (NumberUtils.isNumber(zhuanru)) { | |
849 | + Organization zhuanc1 = organizationService.getOrganization(Integer.valueOf(zhuanru)); | |
850 | + if (null != zhuanc1) { | |
851 | + zhuanRname = zhuanc1.getName(); | |
852 | + } | |
853 | + } | |
854 | + | |
855 | + if (NumberUtils.isNumber(orderModel.getApplyDoctor())) { | |
856 | + Users users = usersService.getUsers(NumberUtils.toInt(orderModel.getApplyDoctor())); | |
857 | + if (null != users) { | |
858 | + applyOrderResult.setApplyDoctor(users.getName()); | |
859 | + } | |
860 | + } | |
861 | + if (NumberUtils.isNumber(orderModel.getRecDoctor())) { | |
862 | + Users users = usersService.getUsers(NumberUtils.toInt(orderModel.getRecDoctor())); | |
863 | + if (null != users) { | |
864 | + applyOrderResult.setRecDoctor(users.getName()); | |
865 | + } | |
866 | + } | |
867 | + | |
868 | + StringBuilder stringBuilder = new StringBuilder(); | |
869 | + if(CollectionUtils.isNotEmpty(orderModel.getrRisk())){ | |
870 | + for(String str:orderModel.getrRisk()){ | |
871 | + stringBuilder.append(str).append(", "); | |
872 | + } | |
873 | + if(stringBuilder.length()>0){ | |
874 | + stringBuilder.setLength(stringBuilder.length() - 2); | |
875 | + } | |
876 | + } | |
877 | + | |
878 | + applyOrderResult.convertToResult(orderModel, zhuanCName, zhuanRname); | |
879 | + applyOrderResult.setrRisk(stringBuilder.toString()); | |
880 | + applyOrderResult.setScore(orderModel.getScore()); | |
881 | + | |
882 | + | |
883 | + List rLevel = new ArrayList(); | |
884 | + if(CollectionUtils.isNotEmpty(orderModel.getrLevel())){ | |
885 | + for(String str:orderModel.getrLevel()){ | |
886 | + Map map1 = new HashMap(); | |
887 | + map1.put("id", ""); | |
888 | + if (str.indexOf("预警") > -1) { | |
889 | + str = str.replace("预警", ""); | |
890 | + } | |
891 | + map1.put("name",str); | |
892 | + map1.put("color", "risk_" + RiskDefaultTypeEnum.getColor(str)); | |
893 | + rLevel.add(map1); | |
894 | + } | |
895 | + } | |
896 | + applyOrderResult.setrLevel(rLevel); | |
897 | + Patients patients = patientsService.findOnePatientById(orderModel.getParentId()); | |
898 | + if (null != patients) { | |
899 | + if (1 == patients.getDueStatus()) | |
900 | + applyOrderResult.setcDueWeek("终止妊娠"); | |
901 | + else if (patients.getType() == 3) | |
902 | + applyOrderResult.setcDueWeek("已分娩"); | |
903 | + } | |
904 | + } | |
905 | + } | |
906 | + | |
907 | + OutputStream out = null; | |
908 | + try { | |
909 | + out = response.getOutputStream(); | |
910 | + } catch (IOException e) { | |
911 | + e.printStackTrace(); | |
912 | + } | |
913 | + Map<String,String> cnames = new HashMap<>(); | |
914 | + | |
915 | + if ("1".equals(applyOrderQueryRequest.getAction())) | |
916 | + { | |
917 | + cnames.put("name", "姓名"); | |
918 | + cnames.put("hRisk","高危诊断"); | |
919 | + cnames.put("sex","性别"); | |
920 | + cnames.put("yl", "转出月龄"); | |
921 | + cnames.put("cyl", "当前月龄"); | |
922 | + cnames.put("birth", "出生日期"); | |
923 | + cnames.put("mName", "母亲姓名"); | |
924 | + cnames.put("transferredDisease","转院必要性"); | |
925 | + cnames.put("zhuanRname","转入医院"); | |
926 | + cnames.put("created","转出日期"); | |
927 | + cnames.put("received","接收日期"); | |
928 | + cnames.put("created","转出日期"); | |
929 | + cnames.put("phone","联系电话"); | |
930 | + cnames.put("status","状态"); | |
931 | + } | |
932 | + else if ("0".equals(applyOrderQueryRequest.getAction())) | |
933 | + { | |
934 | + cnames.put("name", "姓名"); | |
935 | + cnames.put("hRisk","高危诊断"); | |
936 | + cnames.put("sex","性别"); | |
937 | + cnames.put("yl", "申请月龄"); | |
938 | + cnames.put("cyl", "转入月龄"); | |
939 | + cnames.put("birth", "出生日期"); | |
940 | + cnames.put("mName", "母亲姓名"); | |
941 | + cnames.put("zhuanCName", "转出医院"); | |
942 | + cnames.put("transferredDisease","转院必要性"); | |
943 | + cnames.put("created","转出日期"); | |
944 | + cnames.put("received","接收日期"); | |
945 | + cnames.put("phone","联系电话"); | |
946 | + cnames.put("recDoctor","接收医生"); | |
947 | + cnames.put("status","状态"); | |
948 | + } | |
949 | + | |
950 | + response.setContentType("application/octet-stream"); | |
951 | + response.setHeader("Content-Disposition", "attachment;fileName="+"zhuanz.xls"); | |
952 | + ExcelUtil.toExcel(out, datas, cnames); | |
953 | + | |
739 | 954 | } |
740 | 955 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java
View file @
bb24384
... | ... | @@ -22,6 +22,9 @@ |
22 | 22 | import org.springframework.data.domain.Sort; |
23 | 23 | import org.springframework.stereotype.Component; |
24 | 24 | |
25 | +import javax.servlet.http.HttpServletResponse; | |
26 | +import java.io.IOException; | |
27 | +import java.io.OutputStream; | |
25 | 28 | import java.util.*; |
26 | 29 | |
27 | 30 | /** |
... | ... | @@ -605,7 +608,8 @@ |
605 | 608 | MessageListRequest smsList = new MessageListRequest(); |
606 | 609 | List<MessageRequest> messages = new ArrayList<>(); |
607 | 610 | MessageRequest mr = new MessageRequest(); |
608 | - mr.setContent("【" + messagePrefix + "】" + templateModel.getContent()); | |
611 | + String content = "【" + messagePrefix + "】" + templateModel.getContent(); | |
612 | + mr.setContent(StringUtils.replaceName(babyModel.getName(),content)); | |
609 | 613 | mr.setObjType(ServiceObjEnums.BABYOBJ.getId()); |
610 | 614 | mr.setPhone(babyModel.getMphone()); |
611 | 615 | //短信商 |
... | ... | @@ -1720,6 +1724,75 @@ |
1720 | 1724 | objectResponse.setErrorcode(ErrorCodeConstants.SUCCESS); |
1721 | 1725 | objectResponse.setErrormsg("成功"); |
1722 | 1726 | return objectResponse; |
1727 | + } | |
1728 | + | |
1729 | + public void exportChilds(BabyManageRequest request, Integer userId, HttpServletResponse httpServletResponse) { | |
1730 | + try { | |
1731 | + String hospitalId = ""; | |
1732 | + //得到当前登录的医院id | |
1733 | + if (userId != null) | |
1734 | + { | |
1735 | + Users dbuser = usersService.getUsers(userId); | |
1736 | + if (dbuser != null) { | |
1737 | + hospitalId = String.valueOf(dbuser.getOrgId()); | |
1738 | + } | |
1739 | + } | |
1740 | + List<Map<String,Object>> datas = new ArrayList<>(); | |
1741 | + BabyModelQuery babyQuery = new BabyModelQuery(); | |
1742 | + babyQuery.setHospitalId(String.valueOf(hospitalId)); | |
1743 | + List<BabyModel> models = getBabayListByCondition(request, false, babyQuery); | |
1744 | + if (CollectionUtils.isNotEmpty(models)) { | |
1745 | + for (BabyModel model : models) { | |
1746 | + Map<String,Object> data = new HashMap<>(); | |
1747 | + if (model.getHighRisk() == null || model.getHighRisk() == 0) { | |
1748 | + data.put("highRisk", "健康"); | |
1749 | + } else { | |
1750 | + data.put("highRisk", "高危"); | |
1751 | + } | |
1752 | + data.put("sex",StringUtils.emptyDeal(SexEnum.getTextById(model.getSex()))); | |
1753 | + data.put("babyName",StringUtils.emptyDeal(model.getName())); | |
1754 | + data.put("birthday", StringUtils.emptyDeal(DateUtil.getyyyy_MM_dd(model.getBirth()))); | |
1755 | + data.put("mommyName", StringUtils.emptyDeal(model.getMname())); | |
1756 | + data.put("mommnyPhone", StringUtils.emptyDeal(model.getMphone())); | |
1757 | + data.put("serviceStatus", StringUtils.emptyDeal(model.getServiceStatus() == null ? "" : ServiceStatusEnums.getNameById(model.getServiceStatus()))); | |
1758 | + data.put("nextDate", StringUtils.emptyDeal(DateUtil.getyyyy_MM_dd(model.getNextDate()))); | |
1759 | + data.put("monthAge", StringUtils.emptyDeal(DateUtil.getBabyMonthAge(model.getBirth(), new Date()))); | |
1760 | + | |
1761 | + String diagnose = ""; | |
1762 | + if (StringUtils.isNotEmpty(model.getPid())) | |
1763 | + { | |
1764 | + List diagList = babyCheckFacade.getBabyLastDiagnose(model.getPid()); | |
1765 | + if (CollectionUtils.isNotEmpty(diagList)) { | |
1766 | + for (Object obj : diagList) { | |
1767 | + BasicConfig basicConfig = basicConfigService.getOneBasicConfigById((String) obj); | |
1768 | + if (basicConfig != null) { | |
1769 | + diagnose += basicConfig.getName() + " "; | |
1770 | + } | |
1771 | + } | |
1772 | + } | |
1773 | + } | |
1774 | + data.put("diagnose", diagnose); | |
1775 | + datas.add(data); | |
1776 | + } | |
1777 | + } | |
1778 | + OutputStream out = httpServletResponse.getOutputStream(); | |
1779 | + Map<String,String> cnames = new HashMap<>(); | |
1780 | + cnames.put("highRisk", "是否健康"); | |
1781 | + cnames.put("sex","性别"); | |
1782 | + cnames.put("babyName","儿童姓名"); | |
1783 | + cnames.put("birthday", "儿童生日"); | |
1784 | + cnames.put("mommyName", "母亲姓名"); | |
1785 | + cnames.put("mommnyPhone", "联系方式"); | |
1786 | + cnames.put("serviceStatus", "服务状态"); | |
1787 | + cnames.put("nextDate","下次预约时间"); | |
1788 | + cnames.put("monthAge","月龄"); | |
1789 | + cnames.put("diagnose","高危诊断"); | |
1790 | + httpServletResponse.setContentType("application/octet-stream"); | |
1791 | + httpServletResponse.setHeader("Content-Disposition", "attachment;fileName="+"childDatas.xls"); | |
1792 | + ExcelUtil.toExcel(out,datas,cnames); | |
1793 | + } catch (IOException e) { | |
1794 | + e.printStackTrace(); | |
1795 | + } | |
1723 | 1796 | } |
1724 | 1797 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyCheckFacade.java
View file @
bb24384
... | ... | @@ -212,6 +212,18 @@ |
212 | 212 | bm.setNextDate(DateUtil.parseYMD(request.getNextDate())); |
213 | 213 | |
214 | 214 | |
215 | + String hospitalId = ""; | |
216 | + | |
217 | + //得到当前登录的医院id | |
218 | + if (userId != null) | |
219 | + { | |
220 | + Users dbuser = usersService.getUsers(userId); | |
221 | + if (dbuser != null) { | |
222 | + hospitalId = String.valueOf(dbuser.getOrgId()); | |
223 | + } | |
224 | + } | |
225 | + | |
226 | + | |
215 | 227 | if (CollectionUtils.isNotEmpty(request.getDiagnose())) |
216 | 228 | { |
217 | 229 | BasicConfigQuery basicConfigQuery = new BasicConfigQuery(); |
... | ... | @@ -231,6 +243,7 @@ |
231 | 243 | babyBookbuildingService.updateBabyBuild(bm, request.getBuildId()); |
232 | 244 | |
233 | 245 | BabyCheckModel model = getBabyCheckModel(request); |
246 | + model.setHospitalId(hospitalId); | |
234 | 247 | model.setCreated(new Date()); |
235 | 248 | model = babyCheckService.addBabyCheck(model); |
236 | 249 | BaseObjectResponse br = new BaseObjectResponse(); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/SmsTemplateFacade.java
View file @
bb24384
... | ... | @@ -236,7 +236,7 @@ |
236 | 236 | //发送频次 |
237 | 237 | Integer sendFreq = temp.getSendFrequency(); |
238 | 238 | |
239 | - String sendDate = SendDateEnums.getNameById(temp.getSendDateType()); | |
239 | + String sendDate = temp.getSendDateType() == null ? "" : SendDateEnums.getNameById(temp.getSendDateType()); | |
240 | 240 | |
241 | 241 | |
242 | 242 | String dateRange = temp.getStart() == null ? "" : (temp.getStart() + " "+ temp.getEnd()); |