Commit 7906a805d992e3bc7482c2eb704523509f3e4e46
Exists in
master
and in
1 other branch
Merge remote-tracking branch 'origin/master'
Showing 7 changed files
- platform-common/src/main/java/com/lyms/platform/common/utils/HttpRequest.java
- platform-data-api/src/main/java/com/lyms/platform/data/pojo/MessageRequest.java
- platform-data-api/src/main/java/com/lyms/platform/data/util/SaveMessageService.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/result/BabyInfoResult.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/utils/ConfigTask.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/utils/MessageCenterService.java
platform-common/src/main/java/com/lyms/platform/common/utils/HttpRequest.java
View file @
7906a80
... | ... | @@ -258,6 +258,60 @@ |
258 | 258 | return result; |
259 | 259 | } |
260 | 260 | |
261 | + public static String sendPut(String url, String param,String auth) { | |
262 | + PrintWriter out = null; | |
263 | + BufferedReader in = null; | |
264 | + String result = ""; | |
265 | + try { | |
266 | + URL realUrl = new URL(url); | |
267 | + // 打开和URL之间的连接 | |
268 | + HttpURLConnection conn = (HttpURLConnection)realUrl.openConnection(); | |
269 | + // 设置通用的请求属性 | |
270 | + conn.setRequestProperty("accept", "*/*"); | |
271 | + conn.setRequestProperty("connection", "Keep-Alive"); | |
272 | + conn.setRequestProperty("Authorization",auth); | |
273 | + conn.setRequestProperty("Content-Type", "application/json"); | |
274 | + conn.setRequestProperty("user-agent", | |
275 | + "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)"); | |
276 | + // 发送POST请求必须设置如下两行 | |
277 | + conn.setDoOutput(true); | |
278 | + conn.setDoInput(true); | |
279 | + conn.setRequestMethod("PUT"); | |
280 | + conn.setRequestProperty("Charset", "UTF-8"); | |
281 | + // 获取URLConnection对象对应的输出流 | |
282 | + out = new PrintWriter(conn.getOutputStream()); | |
283 | + // 发送请求参数 | |
284 | + out.print(param); | |
285 | + // flush输出流的缓冲 | |
286 | + out.flush(); | |
287 | + // 定义BufferedReader输入流来读取URL的响应 | |
288 | + in = new BufferedReader( | |
289 | + new InputStreamReader(conn.getInputStream())); | |
290 | + String line; | |
291 | + while ((line = in.readLine()) != null) { | |
292 | + result += line; | |
293 | + } | |
294 | + } catch (Exception e) { | |
295 | + System.out.println("发送 POST 请求出现异常!"+e); | |
296 | + e.printStackTrace(); | |
297 | + } | |
298 | + //使用finally块来关闭输出流、输入流 | |
299 | + finally{ | |
300 | + try{ | |
301 | + if(out!=null){ | |
302 | + out.close(); | |
303 | + } | |
304 | + if(in!=null){ | |
305 | + in.close(); | |
306 | + } | |
307 | + } | |
308 | + catch(IOException ex){ | |
309 | + ex.printStackTrace(); | |
310 | + } | |
311 | + } | |
312 | + return result; | |
313 | + } | |
314 | + | |
261 | 315 | public static String Send(String sendUrl,String param){ |
262 | 316 | String retValue = null; |
263 | 317 | HttpURLConnection con = null; |
... | ... | @@ -291,17 +345,19 @@ |
291 | 345 | public static void main(String[] args) { |
292 | 346 | // sendGet("http://localhost:8080/message_develop/sendMMS","id=222222"); |
293 | 347 | // String str = sendGet("http://data.api.healthbaby.com.cn/v1/messages","hospitalId=1&tagName=,高血压,&page=1&limit=9999"); |
294 | - Map<String, String> headers = new HashMap<String, String>(); | |
295 | - headers.put("Authorization", "healthbaby2015"); | |
296 | - Map<String, String> params = new HashMap<String, String>(); | |
297 | - params.put("hospitalId", "e66aafcf-1be5-4cd0-89bc-cf65db7297cc"); | |
298 | - params.put("tagName", "1周"); | |
299 | - params.put("page", "1"); | |
300 | - params.put("limit", "999"); | |
301 | - | |
302 | - String str = sendGet("http://data.api.healthbaby.com.cn/v1/messages", | |
303 | - params,headers); | |
304 | - System.out.println(str); | |
348 | +// Map<String, String> headers = new HashMap<String, String>(); | |
349 | +// headers.put("Authorization", "healthbaby2015"); | |
350 | +// Map<String, String> params = new HashMap<String, String>(); | |
351 | +// params.put("hospitalId", "e66aafcf-1be5-4cd0-89bc-cf65db7297cc"); | |
352 | +// params.put("tagName", "1周"); | |
353 | +// params.put("page", "1"); | |
354 | +// params.put("limit", "999"); | |
355 | +// | |
356 | +// String str = sendGet("http://data.api.healthbaby.com.cn/v1/messages", | |
357 | +// params,headers); | |
358 | +// System.out.println(str); | |
359 | + String json = "[{\"key\":\"6\",\"value\":\"true\"},{\"key\":\"7\",\"value\":\"true\"},{\"key\":\"2\",\"value\":\"false\"},{\"key\":\"3\",\"value\":\"false\"},{\"key\":\"8\",\"value\":\"false\"},{\"key\":\"9\",\"value\":\"false\"},{\"key\":\"10\",\"value\":\"false\"},{\"key\":\"12\",\"value\":\"false\"},{\"key\":\"13\",\"value\":\"false\"},{\"key\":\"15\",\"value\":\"false\"},{\"key\":\"16\",\"value\":\"false\"},{\"key\":\"17\",\"value\":\"false\"},{\"key\":\"19\",\"value\":\"false\"},{\"key\":\"20\",\"value\":\"false\"},{\"key\":\"22\",\"value\":\"false\"},{\"key\":\"23\",\"value\":\"false\"}]"; | |
360 | + String result = HttpRequest.sendPut("http://192.168.5.13:8080/v1/serviceConfig/196",json,"YMer2016"); | |
305 | 361 | } |
306 | 362 | } |
platform-data-api/src/main/java/com/lyms/platform/data/pojo/MessageRequest.java
View file @
7906a80
... | ... | @@ -8,6 +8,7 @@ |
8 | 8 | private String content; |
9 | 9 | private Integer typeId; |
10 | 10 | private Integer subTypeId; |
11 | + private Integer status; | |
11 | 12 | |
12 | 13 | |
13 | 14 | //计划发送时间 |
... | ... | @@ -28,6 +29,15 @@ |
28 | 29 | |
29 | 30 | //患者ID |
30 | 31 | private String ext3; |
32 | + | |
33 | + | |
34 | + public Integer getStatus() { | |
35 | + return status; | |
36 | + } | |
37 | + | |
38 | + public void setStatus(Integer status) { | |
39 | + this.status = status; | |
40 | + } | |
31 | 41 | |
32 | 42 | public String getPhone() { |
33 | 43 | return phone; |
platform-data-api/src/main/java/com/lyms/platform/data/util/SaveMessageService.java
View file @
7906a80
... | ... | @@ -21,7 +21,8 @@ |
21 | 21 | public static boolean saveSmsCenter(MessageListRequest list) |
22 | 22 | { |
23 | 23 | String json = JsonUtil.obj2JsonString(list); |
24 | - String result = HttpRequest.sendPost(CENTER_BASE_URL+"saveCreatedSMS",json,CENTER_TOKEN); | |
24 | + //String result = HttpRequest.sendPost(CENTER_BASE_URL+"saveCreatedSMS",json,CENTER_TOKEN); | |
25 | + String result = HttpRequest.sendPost("http://192.168.5.13:8080/v1/saveCreatedSMS",json,"YMer2016"); | |
25 | 26 | if (StringUtils.isNotEmpty(result)) |
26 | 27 | { |
27 | 28 | Map<String,String> map = JsonUtil.str2Obj(result, Map.class); |
28 | 29 | |
29 | 30 | |
30 | 31 | |
31 | 32 | |
32 | 33 | |
... | ... | @@ -55,21 +56,31 @@ |
55 | 56 | List<MessageRequest> messages = new ArrayList<>(); |
56 | 57 | MessageRequest request = new MessageRequest(); |
57 | 58 | request.setTypeId(1); |
58 | - request.setContent("222222222222222"); | |
59 | + request.setStatus(0); | |
60 | + request.setContent("cccccccccccccccccc"); | |
59 | 61 | request.setObjType(1); |
60 | - request.setPhone("18382670032"); | |
62 | + request.setPhone("18382670000"); | |
61 | 63 | request.setPlanTime("2015-01-06 15:22:12"); |
62 | 64 | request.setServiceType(1); |
65 | + request.setExt1("196"); | |
66 | + request.setExt2("10"); | |
67 | + request.setExt3("10"); | |
68 | + request.setSubTypeId(6); | |
63 | 69 | messages.add(request); |
64 | 70 | |
65 | 71 | |
66 | 72 | MessageRequest request1 = new MessageRequest(); |
67 | 73 | request1.setTypeId(1); |
68 | - request1.setContent("1111111111111111"); | |
74 | + request1.setStatus(0); | |
75 | + request1.setContent("bbbbbbbbbbbbbb"); | |
69 | 76 | request1.setObjType(1); |
70 | - request1.setPhone("18382670031"); | |
77 | + request1.setPhone("18382670001"); | |
71 | 78 | request1.setPlanTime("2015-01-06 15:22:12"); |
72 | 79 | request1.setServiceType(1); |
80 | + request.setSubTypeId(7); | |
81 | + request1.setExt1("196"); | |
82 | + request1.setExt2("10"); | |
83 | + request1.setExt3("10"); | |
73 | 84 | messages.add(request1); |
74 | 85 | |
75 | 86 | list.setTypeId(1); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java
View file @
7906a80
... | ... | @@ -193,43 +193,68 @@ |
193 | 193 | |
194 | 194 | Patients patients = null; |
195 | 195 | PersonModel resperson = null; |
196 | - if (request.getMommyPhone() != null || request.getMommyCertificateNum() != null) | |
196 | + String babyPersonId = ""; | |
197 | + //更新儿童基本信息的内容 | |
198 | + PersonModel babyPerson = new PersonModel(); | |
199 | + babyPerson.setName(request.getBabyName()); | |
200 | + babyPerson.setBirth(DateUtil.parseYMD(request.getBabyBirthday())); | |
201 | + babyPerson.setPhone(request.getMommyPhone()); | |
202 | + babyPerson.setCardNo(request.getMommyCertificateNum()); | |
203 | + babyPerson.setType(2); | |
204 | + babyPerson.setYn(YnEnums.YES.getId()); | |
205 | + babyPerson.setModified(new Date()); | |
206 | + if (StringUtils.isNotEmpty(request.getPid())) { | |
207 | + babyPersonId = request.getPid(); | |
208 | + personService.updatePerson(babyPerson,request.getPid()); | |
209 | + } | |
210 | + else | |
197 | 211 | { |
198 | - //查询儿童基本信息 | |
199 | - PersonModelQuery personModelQuery = new PersonModelQuery(); | |
200 | -// personModelQuery.setPhone(request.getMommyPhone()); | |
201 | - personModelQuery.setYn(YnEnums.YES.getId()); | |
202 | - personModelQuery.setName(request.getBabyName()); | |
203 | - personModelQuery.setType(2); | |
204 | - personModelQuery.setCardNo(request.getMommyCertificateNum()); | |
205 | - List<PersonModel> personModels = personService.queryPersons(personModelQuery); | |
206 | - | |
207 | - //更新儿童基本信息的内容 | |
208 | - PersonModel pmodel = new PersonModel(); | |
209 | - pmodel.setName(request.getBabyName()); | |
210 | - pmodel.setBirth(DateUtil.parseYMD(request.getBabyBirthday())); | |
211 | - pmodel.setPhone(request.getMommyPhone()); | |
212 | - pmodel.setCardNo(request.getMommyCertificateNum()); | |
213 | - pmodel.setType(2); | |
214 | - pmodel.setYn(YnEnums.YES.getId()); | |
215 | - pmodel.setModified(new Date()); | |
216 | - if (CollectionUtils.isNotEmpty(personModels) && personModels.get(0) != null) | |
217 | - { | |
218 | - resperson = personModels.get(0); | |
219 | - personService.updatePerson(pmodel,personModels.get(0).getId()); | |
220 | - } | |
221 | - else | |
222 | - { | |
223 | - pmodel.setYn(YnEnums.YES.getId()); | |
224 | - pmodel.setCreated(new Date()); | |
225 | - resperson = personService.addPerson(pmodel); | |
226 | - } | |
212 | + babyPerson.setYn(YnEnums.YES.getId()); | |
213 | + babyPerson.setCreated(new Date()); | |
214 | + resperson = personService.addPerson(babyPerson); | |
215 | + babyPersonId = resperson.getId(); | |
227 | 216 | } |
228 | 217 | |
229 | 218 | |
219 | +// Patients patients = null; | |
220 | +// PersonModel resperson = null; | |
221 | +// if (request.getMommyPhone() != null || request.getMommyCertificateNum() != null) | |
222 | +// { | |
223 | +// //查询儿童基本信息 | |
224 | +// PersonModelQuery personModelQuery = new PersonModelQuery(); | |
225 | +//// personModelQuery.setPhone(request.getMommyPhone()); | |
226 | +// personModelQuery.setYn(YnEnums.YES.getId()); | |
227 | +// personModelQuery.setName(request.getBabyName()); | |
228 | +// personModelQuery.setType(2); | |
229 | +// personModelQuery.setCardNo(request.getMommyCertificateNum()); | |
230 | +// List<PersonModel> personModels = personService.queryPersons(personModelQuery); | |
231 | +// | |
232 | +// //更新儿童基本信息的内容 | |
233 | +// PersonModel pmodel = new PersonModel(); | |
234 | +// pmodel.setName(request.getBabyName()); | |
235 | +// pmodel.setBirth(DateUtil.parseYMD(request.getBabyBirthday())); | |
236 | +// pmodel.setPhone(request.getMommyPhone()); | |
237 | +// pmodel.setCardNo(request.getMommyCertificateNum()); | |
238 | +// pmodel.setType(2); | |
239 | +// pmodel.setYn(YnEnums.YES.getId()); | |
240 | +// pmodel.setModified(new Date()); | |
241 | +// if (CollectionUtils.isNotEmpty(personModels) && personModels.get(0) != null) | |
242 | +// { | |
243 | +// resperson = personModels.get(0); | |
244 | +// personService.updatePerson(pmodel,personModels.get(0).getId()); | |
245 | +// } | |
246 | +// else | |
247 | +// { | |
248 | +// pmodel.setYn(YnEnums.YES.getId()); | |
249 | +// pmodel.setCreated(new Date()); | |
250 | +// resperson = personService.addPerson(pmodel); | |
251 | +// } | |
252 | +// } | |
253 | + | |
254 | + | |
230 | 255 | //查询孕妇或者产妇建档的基本信息 |
231 | 256 | PersonModelQuery personYunModelQuery = new PersonModelQuery(); |
232 | - personYunModelQuery.setPhone(request.getMommyPhone()); | |
257 | +// personYunModelQuery.setPhone(request.getMommyPhone()); | |
233 | 258 | personYunModelQuery.setYn(YnEnums.YES.getId()); |
234 | 259 | personYunModelQuery.setTypes(new Integer[]{1, 3}); |
235 | 260 | personYunModelQuery.setCardNo(request.getMommyCertificateNum()); |
236 | 261 | |
237 | 262 | |
238 | 263 | |
... | ... | @@ -251,31 +276,40 @@ |
251 | 276 | //当前状态为 孕妇状态 |
252 | 277 | if (pm.getType() != null && pm.getType() == 1) |
253 | 278 | { |
279 | + boolean isUpdatePatStatus = false; | |
280 | + for(Patients pat : pats) | |
281 | + { | |
282 | + if (pat != null) { | |
283 | + if (pat.getType() == 1) { | |
254 | 284 | |
255 | - if (patients != null) { | |
256 | - if (patients.getType() == 1) { | |
285 | + //判断在儿童建档的时候,是否设置到这个儿童对应的孕妇 设置成产妇 | |
286 | + //计算规则 儿童生日 >= 孕妇末次月经 + 24周 设置成分娩 (高帆 2016-08-09 16:47定 ) | |
287 | + Date lastMenses = pat.getLastMenses(); | |
288 | + if (lastMenses != null && request.getBabyBirthday() != null) { | |
289 | + Date brith = DateUtil.parseYMD(request.getBabyBirthday()); | |
290 | + Date tempDate = DateUtil.addWeek(lastMenses, 24); | |
291 | + if (brith.getTime() >= tempDate.getTime()) { | |
292 | + //设置孕妇已分娩 | |
293 | + Patients patientUpdate = new Patients(); | |
294 | + patientUpdate.setYn(YnEnums.YES.getId()); | |
295 | + patientUpdate.setType(3); | |
296 | + patientsService.updatePatientByPid(patientUpdate, pm.getId()); | |
297 | + if (!isUpdatePatStatus) | |
298 | + { | |
299 | + isUpdatePatStatus = true; | |
300 | + } | |
257 | 301 | |
258 | - //判断在儿童建档的时候,是否设置到这个儿童对应的孕妇 设置成产妇 | |
259 | - //计算规则 儿童生日 >= 孕妇末次月经 + 24周 设置成分娩 (高帆 2016-08-09 16:47定 ) | |
260 | - Date lastMenses = patients.getLastMenses(); | |
261 | - if (lastMenses != null && request.getBabyBirthday() != null) { | |
262 | - Date brith = DateUtil.parseYMD(request.getBabyBirthday()); | |
263 | - Date tempDate = DateUtil.addWeek(lastMenses, 24); | |
264 | - if (brith.getTime() >= tempDate.getTime()) { | |
265 | - //设置孕妇已分娩 | |
266 | - Patients patientUpdate = new Patients(); | |
267 | - patientUpdate.setYn(YnEnums.YES.getId()); | |
268 | - patientUpdate.setType(3); | |
269 | - patientsService.updatePatientByPid(patientUpdate,pm.getId()); | |
270 | - | |
271 | - | |
272 | - pm.setType(3);//基本信息更新成产妇 | |
273 | - resperson = pm; | |
274 | - personService.updatePerson(pm,pm.getId()); | |
302 | + } | |
275 | 303 | } |
276 | 304 | } |
277 | 305 | } |
278 | 306 | } |
307 | + | |
308 | + if (isUpdatePatStatus) | |
309 | + { | |
310 | + pm.setType(3);//基本信息更新成产妇 | |
311 | + personService.updatePerson(pm,pm.getId()); | |
312 | + } | |
279 | 313 | } |
280 | 314 | } |
281 | 315 | } |
... | ... | @@ -304,7 +338,7 @@ |
304 | 338 | |
305 | 339 | |
306 | 340 | BabyModel model = getBabyModel(request); |
307 | - model.setPid(resperson.getId()); | |
341 | + model.setPid(babyPersonId); | |
308 | 342 | |
309 | 343 | if (StringUtils.isNotEmpty(request.getMommyCertificateNum())) { |
310 | 344 | |
311 | 345 | |
... | ... | @@ -852,12 +886,10 @@ |
852 | 886 | List<PersonModel> personModels = personService.queryPersons(personModelQuery); |
853 | 887 | if (CollectionUtils.isNotEmpty(personModels)) |
854 | 888 | { |
855 | - | |
856 | - | |
857 | 889 | for(PersonModel babayPerson : personModels) |
858 | 890 | { |
859 | 891 | BabyInfoResult result = new BabyInfoResult(); |
860 | - result.setId(babayPerson.getId()); | |
892 | + result.setPid(babayPerson.getId()); | |
861 | 893 | result.setCardNo(babayPerson.getCardNo());//母亲的身份证号码 |
862 | 894 | result.setName(babayPerson.getName()); |
863 | 895 | if (babayPerson.getBirth() != null) |
... | ... | @@ -899,10 +931,10 @@ |
899 | 931 | buildRecords.put("buildHospital", ""); |
900 | 932 | } |
901 | 933 | |
902 | - result.setId(build.getId()); | |
903 | - result.setCardNo(build.getCardNo()); | |
904 | - result.setName(build.getName()); | |
905 | - result.setMonthAge(DateUtil.getBabyMonthAge(build.getBirth(), new Date())); | |
934 | +// result.setId(build.getId()); | |
935 | +// result.setCardNo(build.getCardNo()); | |
936 | +// result.setName(build.getName()); | |
937 | +// result.setMonthAge(DateUtil.getBabyMonthAge(build.getBirth(), new Date())); | |
906 | 938 | list.add(buildRecords); |
907 | 939 | } |
908 | 940 | |
... | ... | @@ -935,7 +967,7 @@ |
935 | 967 | puerperaQuery.setCardNo(model.getMcertNo()); |
936 | 968 | |
937 | 969 | BabyInfoResult result = new BabyInfoResult(); |
938 | - result.setId(model.getPid()); | |
970 | + result.setPid(model.getPid()); | |
939 | 971 | result.setCardNo(model.getMcertNo());//母亲的身份证号码 |
940 | 972 | result.setName(model.getName()); |
941 | 973 | if (model.getBirth() != null) |
... | ... | @@ -976,10 +1008,6 @@ |
976 | 1008 | buildRecords.put("buildHospital", ""); |
977 | 1009 | } |
978 | 1010 | |
979 | - result.setId(build.getId()); | |
980 | - result.setCardNo(build.getCardNo()); | |
981 | - result.setName(build.getName()); | |
982 | - result.setMonthAge(DateUtil.getBabyMonthAge(build.getBirth(), new Date())); | |
983 | 1011 | list.add(buildRecords); |
984 | 1012 | } |
985 | 1013 | |
... | ... | @@ -1007,109 +1035,6 @@ |
1007 | 1035 | objectResponse.setData(map); |
1008 | 1036 | objectResponse.setErrormsg("成功"); |
1009 | 1037 | return objectResponse; |
1010 | - | |
1011 | - | |
1012 | - | |
1013 | -// if (userId != null) | |
1014 | -// { | |
1015 | -// Users dbuser = usersService.getUsers(userId); | |
1016 | -// if (dbuser != null) { | |
1017 | -// Integer hospitalId = dbuser.getOrgId(); | |
1018 | -// param.setHospitalId(String.valueOf(hospitalId)); | |
1019 | -// } | |
1020 | -// } | |
1021 | -// | |
1022 | -// | |
1023 | -// | |
1024 | -// Map<String,Object> map = new HashMap<>(); | |
1025 | -// | |
1026 | -// List<BabyInfoResult> results = new ArrayList<>(); | |
1027 | -// BabyModelQuery babyQuery = new BabyModelQuery(); | |
1028 | -// babyQuery.setYn(YnEnums.YES.getId()); | |
1029 | -// List<BabyModel> models = null; | |
1030 | -// if (!StringUtils.isEmpty(param.getCardNo())) { | |
1031 | -// babyQuery.setCardId(param.getCardNo()); | |
1032 | -// babyQuery.setHospitalId(param.getHospitalId()); | |
1033 | -// | |
1034 | -// //通过查询孕妇 | |
1035 | -// PatientsQuery puerperaQuery = new PatientsQuery(); | |
1036 | -// puerperaQuery.setCardNo(param.getCardNo()); | |
1037 | -// puerperaQuery.setYn(YnEnums.YES.getId()); | |
1038 | -// Patients patients = patientsService.findOnePatientByCardNo(puerperaQuery); | |
1039 | -// map.put("patients",patients); | |
1040 | -// | |
1041 | -//// if (patients != null && StringUtils.isNotEmpty(patients.getPhone())) { | |
1042 | -//// babyQuery.setPhoneId(patients.getPhone()); | |
1043 | -//// } | |
1044 | -// | |
1045 | -// models = babyBookbuildingService.queryBabyBuildByCond(babyQuery); | |
1046 | -// | |
1047 | -// } else if (param.getHospitalId() != null & !StringUtils.isEmpty(param.getVcCardNo())) { | |
1048 | -// babyQuery.setHospitalId(param.getHospitalId()); | |
1049 | -// babyQuery.setVcCardNo(param.getVcCardNo()); | |
1050 | -// models = babyBookbuildingService.queryBabyBuildByCond(babyQuery); | |
1051 | -// } | |
1052 | -// | |
1053 | -// if (models != null && models.size() > 0) { | |
1054 | -// Set<String> uid = new HashSet<>(); | |
1055 | -// for (BabyModel model : models) { | |
1056 | -// if (model != null) { | |
1057 | -// uid.add(model.getId()); | |
1058 | -// } | |
1059 | -// | |
1060 | -// } | |
1061 | -// | |
1062 | -// for (String id : uid) { | |
1063 | -// BabyInfoResult result = new BabyInfoResult(); | |
1064 | -// | |
1065 | -// List<Map<String, String>> list = new ArrayList<>(); | |
1066 | -// for (BabyModel model : models) { | |
1067 | -// | |
1068 | -// if (id.equals(model.getId())) { | |
1069 | -// | |
1070 | -// BabyModelQuery hospBuildRecordsQuery = new BabyModelQuery(); | |
1071 | -// hospBuildRecordsQuery.setYn(YnEnums.YES.getId()); | |
1072 | -// hospBuildRecordsQuery.setMcertNo(model.getMcertNo()); | |
1073 | -// List<BabyModel> builds = babyBookbuildingService.queryBabyBuildByCond(hospBuildRecordsQuery); | |
1074 | -// if (CollectionUtils.isNotEmpty(builds)) | |
1075 | -// { | |
1076 | -// for(BabyModel build: builds) | |
1077 | -// { | |
1078 | -// Map<String, String> buildRecords = new HashMap<>(); | |
1079 | -// buildRecords.put("id", build.getId()); | |
1080 | -// buildRecords.put("buildDate", DateUtil.getyyyy_MM_dd(build.getBuildDate())); | |
1081 | -// | |
1082 | -// //查询建档医院 | |
1083 | -// Organization org = organizationService.getOrganization(Integer.valueOf(build.getHospitalId())); | |
1084 | -// if (org != null) { | |
1085 | -// buildRecords.put("buildHospital", org.getName()); | |
1086 | -// } else { | |
1087 | -// buildRecords.put("buildHospital", ""); | |
1088 | -// } | |
1089 | -// | |
1090 | -// result.setId(build.getId()); | |
1091 | -// result.setCardNo(build.getCardNo()); | |
1092 | -// result.setName(build.getName()); | |
1093 | -// result.setMonthAge(DateUtil.getBabyMonthAge(build.getBirth(), new Date())); | |
1094 | -// list.add(buildRecords); | |
1095 | -// } | |
1096 | -// | |
1097 | -// } | |
1098 | -// | |
1099 | -// } | |
1100 | -// result.setBuildRecords(list); | |
1101 | -// } | |
1102 | -// results.add(result); | |
1103 | -// } | |
1104 | -// } | |
1105 | -// | |
1106 | -// map.put("records",results); | |
1107 | -// | |
1108 | -// BaseObjectResponse objectResponse = new BaseObjectResponse(); | |
1109 | -// objectResponse.setErrorcode(ErrorCodeConstants.SUCCESS); | |
1110 | -// objectResponse.setData(map); | |
1111 | -// objectResponse.setErrormsg("成功"); | |
1112 | -// return objectResponse; | |
1113 | 1038 | } |
1114 | 1039 | |
1115 | 1040 | private boolean isNotExist(List<Map<String, String>> list, String id) { |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/BabyInfoResult.java
View file @
7906a80
... | ... | @@ -8,7 +8,7 @@ |
8 | 8 | */ |
9 | 9 | public class BabyInfoResult { |
10 | 10 | |
11 | - private String id; | |
11 | + private String pid; | |
12 | 12 | private String name; |
13 | 13 | private String monthAge; |
14 | 14 | private String cardNo; |
15 | 15 | |
... | ... | @@ -24,12 +24,12 @@ |
24 | 24 | this.buildRecords = buildRecords; |
25 | 25 | } |
26 | 26 | |
27 | - public String getId() { | |
28 | - return id; | |
27 | + public String getPid() { | |
28 | + return pid; | |
29 | 29 | } |
30 | 30 | |
31 | - public void setId(String id) { | |
32 | - this.id = id; | |
31 | + public void setPid(String pid) { | |
32 | + this.pid = pid; | |
33 | 33 | } |
34 | 34 | |
35 | 35 | public String getName() { |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/utils/ConfigTask.java
View file @
7906a80
platform-operate-api/src/main/java/com/lyms/platform/operate/web/utils/MessageCenterService.java
View file @
7906a80
... | ... | @@ -26,8 +26,9 @@ |
26 | 26 | */ |
27 | 27 | public static boolean serviceConfig(List<Config> configs,String hid) |
28 | 28 | { |
29 | - String json = JsonUtil.obj2JsonString(configs); | |
30 | - String result = HttpRequest.sendPost(CENTER_BASE_URL+"serviceConfig/{"+hid+"}", json, CENTER_TOKEN); | |
29 | + String json = JsonUtil.array2JsonString(configs); | |
30 | +// String result = HttpRequest.sendPost(CENTER_BASE_URL + "serviceConfig/{" + hid + "}", json, CENTER_TOKEN); | |
31 | + String result = HttpRequest.sendPut("http://192.168.5.13:8080/v1/serviceConfig/"+hid,json,"YMer2016"); | |
31 | 32 | if (StringUtils.isNotEmpty(result)) |
32 | 33 | { |
33 | 34 | Map<String,String> map = JsonUtil.str2Obj(result, Map.class); |