Commit 487253d4f862a4c33e7b1936e5fd9f61cbe7c1f3
1 parent
4eee5042f3
Exists in
master
and in
8 other branches
儿童电子病历
Showing 5 changed files with 40 additions and 13 deletions
- platform-data-api/src/main/java/com/lyms/platform/data/controller/SmsController.java
- platform-data-api/src/main/java/com/lyms/platform/data/pojo/MessageRequest.java
- platform-data-api/src/main/java/com/lyms/platform/data/service/impl/SmsServiceImpl.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/SmsConfigController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java
platform-data-api/src/main/java/com/lyms/platform/data/controller/SmsController.java
View file @
487253d
... | ... | @@ -22,7 +22,7 @@ |
22 | 22 | */ |
23 | 23 | @RequestMapping(value = "/template") |
24 | 24 | public void productSms(HttpServletResponse response){ |
25 | - smsService.getBirthPatients(); | |
25 | + smsService.productTemplateSms(); | |
26 | 26 | |
27 | 27 | // MessageListRequest list = new MessageListRequest(); |
28 | 28 | // List<MessageRequest> messages = new ArrayList<>(); |
platform-data-api/src/main/java/com/lyms/platform/data/pojo/MessageRequest.java
View file @
487253d
... | ... | @@ -118,5 +118,22 @@ |
118 | 118 | public void setExt3(String ext3) { |
119 | 119 | this.ext3 = ext3; |
120 | 120 | } |
121 | + | |
122 | + @Override | |
123 | + public String toString() { | |
124 | + return "MessageRequest{" + | |
125 | + "phone='" + phone + '\'' + | |
126 | + ", content='" + content + '\'' + | |
127 | + ", typeId=" + typeId + | |
128 | + ", subTypeId=" + subTypeId + | |
129 | + ", status=" + status + | |
130 | + ", planTime='" + planTime + '\'' + | |
131 | + ", objType=" + objType + | |
132 | + ", serviceType=" + serviceType + | |
133 | + ", ext1='" + ext1 + '\'' + | |
134 | + ", ext2='" + ext2 + '\'' + | |
135 | + ", ext3='" + ext3 + '\'' + | |
136 | + '}'; | |
137 | + } | |
121 | 138 | } |
platform-data-api/src/main/java/com/lyms/platform/data/service/impl/SmsServiceImpl.java
View file @
487253d
... | ... | @@ -121,7 +121,7 @@ |
121 | 121 | patientsQuery.setType(1); |
122 | 122 | |
123 | 123 | //末次月经必须大于当前时间减去42周视为为分娩孕妇 |
124 | - Date lastMensesMax = DateUtil.getNewDate(-42,"周",1); | |
124 | + Date lastMensesMax = DateUtil.getNewDate(-42, "周", 1); | |
125 | 125 | patientsQuery.setLastMensesStart(lastMensesMax); |
126 | 126 | //健康指导短信 只能是类型为 增值服务 开通状态 才发送 |
127 | 127 | patientsQuery.setServiceType(ServiceTypeEnums.ADD_SERVICE.getId()); |
... | ... | @@ -159,7 +159,7 @@ |
159 | 159 | continue; |
160 | 160 | } |
161 | 161 | |
162 | - List<String> guideTimes = JsonUtil.toList(timeStr,String.class); | |
162 | + List<String> guideTimes = JsonUtil.toList(timeStr, String.class); | |
163 | 163 | if (guideTimes == null || guideTimes.size() != 2) |
164 | 164 | { |
165 | 165 | continue; |
... | ... | @@ -872,7 +872,7 @@ |
872 | 872 | |
873 | 873 | //更新成产妇状态 分娩时间设置成当前时间 |
874 | 874 | pat.setType(3); |
875 | - pat.setDueDate(new Date()); | |
875 | + pat.setFmDate(new Date()); | |
876 | 876 | pat.setModified(new Date()); |
877 | 877 | yunBookbuildingService.updatePregnant(pat, pat.getId()); |
878 | 878 | } |
... | ... | @@ -2031,6 +2031,14 @@ |
2031 | 2031 | if (list != null && CollectionUtils.isNotEmpty(list.getMessages())) |
2032 | 2032 | { //平台ID TODO |
2033 | 2033 | list.setTypeId(1); |
2034 | + if (list != null && list.getMessages() != null) | |
2035 | + { | |
2036 | + List<MessageRequest> msgs = list.getMessages(); | |
2037 | + for (MessageRequest msg :msgs) | |
2038 | + { | |
2039 | + System.out.println("=======" + msg.getContent()); | |
2040 | + } | |
2041 | + } | |
2034 | 2042 | //SaveMessageService.saveSmsCenter(list); |
2035 | 2043 | } |
2036 | 2044 | } |
2037 | 2045 | |
... | ... | @@ -2148,14 +2156,8 @@ |
2148 | 2156 | return ""; |
2149 | 2157 | } |
2150 | 2158 | |
2151 | - UsersQuery usersQuery = new UsersQuery(); | |
2152 | - usersQuery.setYn(YnEnums.YES.getId()); | |
2153 | - usersQuery.setId(userId); | |
2154 | 2159 | //通过建档医生查询用户信息 |
2155 | - List<Users> users = usersService.queryUsers2(usersQuery); | |
2156 | - if (CollectionUtils.isNotEmpty(users)) | |
2157 | - { | |
2158 | - Users user = users.get(0); | |
2160 | + Users user = usersService.getUsers(userId); | |
2159 | 2161 | if (user != null) |
2160 | 2162 | { |
2161 | 2163 | //得到医生对应的部门id |
... | ... | @@ -2176,7 +2178,6 @@ |
2176 | 2178 | } |
2177 | 2179 | } |
2178 | 2180 | } |
2179 | - } | |
2180 | 2181 | return ""; |
2181 | 2182 | } |
2182 | 2183 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/SmsConfigController.java
View file @
487253d
... | ... | @@ -130,7 +130,7 @@ |
130 | 130 | @RequestParam(required = true) String cityId, |
131 | 131 | @RequestParam(required = true) String areaId, |
132 | 132 | @RequestParam(required = true) String address, |
133 | - @RequestParam(required = true) String remark, | |
133 | + @RequestParam(required = false) String remark, | |
134 | 134 | @RequestParam(required = true) String hid, |
135 | 135 | @RequestParam(required = true) String highConfig, |
136 | 136 | @RequestParam(required = true) Integer status) { |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java
View file @
487253d
... | ... | @@ -104,6 +104,15 @@ |
104 | 104 | checkRecord.put("monthAge", monthAge); |
105 | 105 | checkRecord.put("buildId", babyModel.getId()); |
106 | 106 | checkRecord.put("type","1"); |
107 | + checkRecord.put("hospitalId",babyModel.getHospitalId()); | |
108 | + //查询建档医院 | |
109 | + Organization org = organizationService.getOrganization(Integer.valueOf(babyModel.getHospitalId())); | |
110 | + if (org != null) { | |
111 | + checkRecord.put("hospitalName", org.getName()); | |
112 | + } else { | |
113 | + checkRecord.put("hospitalName", ""); | |
114 | + } | |
115 | + | |
107 | 116 | list.add(checkRecord); |
108 | 117 | } |
109 | 118 | } |