Commit 204e101c19d416c862376db0a9fcd2b9f50cfb60
1 parent
547ed3717d
Exists in
master
and in
1 other branch
短信保存
Showing 9 changed files with 138 additions and 12 deletions
- platform-common/src/main/java/com/lyms/platform/common/utils/StringUtils.java
- platform-dal/src/main/java/com/lyms/platform/pojo/FilePathModel.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/ViewController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ResidentsArchiveFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ViewFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/ResidentsArchiveAddRequest.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/ResidentsArchiveResult.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/ResidentsPageResult.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/PatientWeightServiceImpl.java
platform-common/src/main/java/com/lyms/platform/common/utils/StringUtils.java
View file @
204e101
| ... | ... | @@ -362,5 +362,22 @@ |
| 362 | 362 | return list; |
| 363 | 363 | } |
| 364 | 364 | |
| 365 | + | |
| 366 | + public static String getValue(Object obj) | |
| 367 | + { | |
| 368 | + return obj == null ? null : java.lang.String.valueOf(obj); | |
| 369 | + } | |
| 370 | + | |
| 371 | + | |
| 372 | + public static Date getDate(Object obj) | |
| 373 | + { | |
| 374 | + return obj == null ? null : DateUtil.parseYMD(java.lang.String.valueOf(obj)); | |
| 375 | + } | |
| 376 | + | |
| 377 | + public static Date getTime(Object obj) | |
| 378 | + { | |
| 379 | + return obj == null ? null : DateUtil.parseYMDHMS(java.lang.String.valueOf(obj)); | |
| 380 | + } | |
| 381 | + | |
| 365 | 382 | } |
platform-dal/src/main/java/com/lyms/platform/pojo/FilePathModel.java
View file @
204e101
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/ViewController.java
View file @
204e101
| ... | ... | @@ -93,7 +93,7 @@ |
| 93 | 93 | @ResponseBody |
| 94 | 94 | @TokenRequired |
| 95 | 95 | public BaseObjectResponse findDtAntExChuData(@RequestParam("id") String id, |
| 96 | - HttpServletRequest request) { | |
| 96 | + HttpServletRequest request) { | |
| 97 | 97 | BaseObjectResponse br = viewFacade.findDtAntExChuData(id); |
| 98 | 98 | return br; |
| 99 | 99 | } |
| ... | ... | @@ -130,7 +130,7 @@ |
| 130 | 130 | @RequestMapping(value = "/AntExChuTongbuSync", method = RequestMethod.GET) |
| 131 | 131 | @ResponseBody |
| 132 | 132 | public BaseObjectResponse AntExChuTongbuSync(@RequestParam("startDate") String startDate, |
| 133 | - @RequestParam("endDate") String endDate) { | |
| 133 | + @RequestParam("endDate") String endDate) { | |
| 134 | 134 | BaseObjectResponse br = antenatalExaminationFacade.AntExChuTongbuSync(startDate, endDate, true); |
| 135 | 135 | return br; |
| 136 | 136 | } |
| ... | ... | @@ -763,7 +763,7 @@ |
| 763 | 763 | @ResponseBody |
| 764 | 764 | @TokenRequired |
| 765 | 765 | public BaseObjectResponse findDtAntenatalExaminationData(@RequestParam("id") String id, |
| 766 | - HttpServletRequest request) { | |
| 766 | + HttpServletRequest request) { | |
| 767 | 767 | |
| 768 | 768 | return viewFacade.findDtAntenatalExaminationData(id); |
| 769 | 769 | } |
| ... | ... | @@ -1094,7 +1094,7 @@ |
| 1094 | 1094 | @RequestMapping(value = "/getBabyScreeningInfo", method = RequestMethod.GET) |
| 1095 | 1095 | @ResponseBody |
| 1096 | 1096 | public BaseObjectResponse getBabyScreeningInfo(@RequestParam(required = true) String blNo, |
| 1097 | - @RequestHeader(required = true) String Authorization) { | |
| 1097 | + @RequestHeader(required = true) String Authorization) { | |
| 1098 | 1098 | |
| 1099 | 1099 | if (StringUtils.isEmpty(Authorization) || !"1a8152fc04c86b9cca3244e0e52ecb33".equals(Authorization)) |
| 1100 | 1100 | { |
| ... | ... | @@ -1114,7 +1114,7 @@ |
| 1114 | 1114 | @RequestMapping(value = "/getBabyScreening", method = RequestMethod.GET) |
| 1115 | 1115 | @ResponseBody |
| 1116 | 1116 | public BaseObjectResponse getBabyScreening(@RequestParam(required = true) String cardNo, |
| 1117 | - @RequestHeader(required = true) String Authorization) { | |
| 1117 | + @RequestHeader(required = true) String Authorization) { | |
| 1118 | 1118 | if (StringUtils.isEmpty(Authorization) || !"1a8152fc04c86b9cca3244e0e52ecb33".equals(Authorization)) |
| 1119 | 1119 | { |
| 1120 | 1120 | return new BaseObjectResponse().setErrorcode(ErrorCodeConstants.TOKEN_EXPIRE).setErrormsg("Authorization验证失败"); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ResidentsArchiveFacade.java
View file @
204e101
| ... | ... | @@ -12,6 +12,7 @@ |
| 12 | 12 | import com.lyms.platform.operate.web.request.ResidentsArchiveAddRequest; |
| 13 | 13 | import com.lyms.platform.operate.web.request.ResidentsArchiveQueryRequest; |
| 14 | 14 | import com.lyms.platform.operate.web.request.WomenGuideSmsRequest; |
| 15 | +import com.lyms.platform.operate.web.request.YunBookbuildingAddRequest; | |
| 15 | 16 | import com.lyms.platform.operate.web.result.BasicConfigResult; |
| 16 | 17 | import com.lyms.platform.operate.web.result.ResidentsArchiveHistoryResult; |
| 17 | 18 | import com.lyms.platform.operate.web.result.ResidentsArchiveResult; |
| ... | ... | @@ -35,6 +36,7 @@ |
| 35 | 36 | import org.springframework.stereotype.Component; |
| 36 | 37 | |
| 37 | 38 | import javax.servlet.http.HttpServletResponse; |
| 39 | +import java.io.File; | |
| 38 | 40 | import java.io.OutputStream; |
| 39 | 41 | import java.util.*; |
| 40 | 42 | |
| ... | ... | @@ -46,7 +48,7 @@ |
| 46 | 48 | |
| 47 | 49 | |
| 48 | 50 | public static final String HIS_VERSION = PropertiesUtils.getPropertyValue("his_version"); |
| 49 | - | |
| 51 | + public static final String BASE_IMG_PATH = PropertiesUtils.getPropertyValue("img_path"); | |
| 50 | 52 | @Autowired |
| 51 | 53 | private ResidentsArchiveService residentsArchiveService; |
| 52 | 54 | @Autowired |
| 53 | 55 | |
| 54 | 56 | |
| ... | ... | @@ -67,10 +69,14 @@ |
| 67 | 69 | private ITrackDownService trackDownService; |
| 68 | 70 | @Autowired |
| 69 | 71 | private PostVisitHospitalService postVisitHospitalService; |
| 70 | - | |
| 71 | 72 | @Autowired |
| 73 | + private YunBookbuildingService yunBookbuildingService; | |
| 74 | + @Autowired | |
| 72 | 75 | private LisService lcfyLisService; |
| 73 | 76 | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 74 | 80 | @Autowired |
| 75 | 81 | private TrackDownRecordService trackDownRecordService; |
| 76 | 82 | |
| ... | ... | @@ -308,6 +314,19 @@ |
| 308 | 314 | model.setId(id); |
| 309 | 315 | residentsArchiveService.updateResident(model, id); |
| 310 | 316 | |
| 317 | + | |
| 318 | + FilePathModel filePath = addRequest.getFilePath(); | |
| 319 | + if (filePath != null && filePath.getId() != null) { | |
| 320 | + yunBookbuildingService.updateFilePath(filePath); | |
| 321 | + } else if (filePath != null) { | |
| 322 | + filePath.setPatientId(model.getId()); | |
| 323 | + yunBookbuildingService.addFilePath(filePath); | |
| 324 | + } | |
| 325 | + | |
| 326 | + if (addRequest != null) { | |
| 327 | + deleteImg(addRequest); | |
| 328 | + } | |
| 329 | + | |
| 311 | 330 | //修改追访基本信息 |
| 312 | 331 | addTrackDownInfo(userId, model); |
| 313 | 332 | |
| ... | ... | @@ -393,6 +412,18 @@ |
| 393 | 412 | setCode(archiveModel); |
| 394 | 413 | ResidentsArchiveModel residentsArchiveModel = residentsArchiveService.addResident(archiveModel); |
| 395 | 414 | |
| 415 | + | |
| 416 | + FilePathModel filePath = addRequest.getFilePath(); | |
| 417 | + if (filePath != null && filePath.getId() == null) { | |
| 418 | + filePath.setPatientId(archiveModel.getId()); | |
| 419 | + yunBookbuildingService.addFilePath(filePath); | |
| 420 | + } | |
| 421 | + | |
| 422 | + | |
| 423 | + if (addRequest != null) { | |
| 424 | + deleteImg(addRequest); | |
| 425 | + } | |
| 426 | + | |
| 396 | 427 | //新增婚检追访信息,默认进入婚检追访 |
| 397 | 428 | addTrackDownInfo(userId, residentsArchiveModel); |
| 398 | 429 | |
| 399 | 430 | |
| ... | ... | @@ -408,7 +439,24 @@ |
| 408 | 439 | return br; |
| 409 | 440 | } |
| 410 | 441 | |
| 442 | + public void deleteImg(ResidentsArchiveAddRequest yunRequest) { | |
| 443 | + List<String> files = new ArrayList<>(); | |
| 444 | + List<String> delFiles = yunRequest.getDelFiles(); | |
| 445 | + if (CollectionUtils.isNotEmpty(delFiles)) { | |
| 446 | + files.addAll(delFiles); | |
| 447 | + } | |
| 448 | + if (CollectionUtils.isNotEmpty(files)) { | |
| 449 | + for (String filePath : files) { | |
| 450 | + File filepath = new File(BASE_IMG_PATH + File.separator + filePath); | |
| 451 | + if (filepath.exists()) { | |
| 452 | + filepath.delete(); | |
| 453 | + } | |
| 454 | + } | |
| 455 | + } | |
| 411 | 456 | |
| 457 | + } | |
| 458 | + | |
| 459 | + | |
| 412 | 460 | private synchronized void setCode(ResidentsArchiveModel archiveModel) |
| 413 | 461 | { |
| 414 | 462 | String cuurent = DateUtil.getYyyyMM(new Date()); |
| ... | ... | @@ -597,6 +645,8 @@ |
| 597 | 645 | return null; |
| 598 | 646 | } |
| 599 | 647 | ResidentsArchiveResult result = new ResidentsArchiveResult(); |
| 648 | + FilePathModel filePath = yunBookbuildingService.findFilePath(model.getId()); | |
| 649 | + result.setFilePath(filePath); | |
| 600 | 650 | result.setId(model.getId()); |
| 601 | 651 | result.setUsername(model.getUsername()); |
| 602 | 652 | result.setSex(model.getSex()); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ViewFacade.java
View file @
204e101
| ... | ... | @@ -578,6 +578,10 @@ |
| 578 | 578 | map.put("pastHistory", data.getPastHistory() == null ? "" : data.getPastHistory()); |
| 579 | 579 | map.put("familyHistory", data.getFamilyHistory() == null ? "" : data.getFamilyHistory()); |
| 580 | 580 | map.put("other", data.getOther() == null ? "" : data.getOther()); |
| 581 | + map.put("yn", data.getYn()); | |
| 582 | + map.put("createdTime", DateUtil.getyyyy_MM_dd_hms(data.getCreated())); | |
| 583 | + map.put("modifiedTime", DateUtil.getyyyy_MM_dd_hms(data.getCreated())); | |
| 584 | + map.put("type", data.getType()); | |
| 581 | 585 | |
| 582 | 586 | return map; |
| 583 | 587 | } |
| ... | ... | @@ -6328,8 +6332,8 @@ |
| 6328 | 6332 | result.setBdXyHours(model.getBdXyHours()); |
| 6329 | 6333 | result.setIsOrNotYj(model.getIsOrNotYj()); |
| 6330 | 6334 | result.setYjMl(model.getYjMl()); |
| 6331 | - | |
| 6332 | - | |
| 6335 | + FilePathModel filePath = yunBookbuildingService.findFilePath(model.getId()); | |
| 6336 | + result.setFilePath(filePath); | |
| 6333 | 6337 | return result; |
| 6334 | 6338 | } |
| 6335 | 6339 | |
| ... | ... | @@ -7035,7 +7039,7 @@ |
| 7035 | 7039 | patientMap.put("maddress", CommonsHelper.getResidence(patients.getProvinceId(), patients.getCityId(), |
| 7036 | 7040 | patients.getAreaId(), patients.getStreetId(), patients.getAddress(), basicConfigService));//母亲户籍地址 |
| 7037 | 7041 | |
| 7038 | - if (StringUtils.isNotEmpty(patients.getHusbandName())) { | |
| 7042 | + if (StringUtils.isNotEmpty(patients.getHusbandName()) && (patients.getReqHusband() == null || !patients.getReqHusband())) { | |
| 7039 | 7043 | patientMap.put("fname", StringUtils.isNotEmpty(patients.getHusbandName()) ? patients.getHusbandName() : "");//父亲姓名 |
| 7040 | 7044 | |
| 7041 | 7045 | patientMap.put("fcountry", getBasicConfig(patients.getHcountryId()));//父亲国籍 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/ResidentsArchiveAddRequest.java
View file @
204e101
| ... | ... | @@ -5,6 +5,7 @@ |
| 5 | 5 | import com.lyms.platform.common.core.annotation.form.FormParam; |
| 6 | 6 | import com.lyms.platform.common.utils.DateUtil; |
| 7 | 7 | import com.lyms.platform.common.utils.JsonUtil; |
| 8 | +import com.lyms.platform.pojo.FilePathModel; | |
| 8 | 9 | import com.lyms.platform.pojo.ResidentsArchiveModel; |
| 9 | 10 | import org.hibernate.validator.constraints.NotEmpty; |
| 10 | 11 | |
| ... | ... | @@ -163,6 +164,12 @@ |
| 163 | 164 | private Integer military; |
| 164 | 165 | |
| 165 | 166 | |
| 167 | + | |
| 168 | + private FilePathModel filePath; | |
| 169 | + //删除文件路径 | |
| 170 | + private List<String> delFiles; | |
| 171 | + | |
| 172 | + | |
| 166 | 173 | @Override |
| 167 | 174 | public ResidentsArchiveModel convertToDataModel() { |
| 168 | 175 | ResidentsArchiveModel model = new ResidentsArchiveModel(); |
| ... | ... | @@ -262,6 +269,23 @@ |
| 262 | 269 | model.setChildExtAddrs(childExtAddrs); |
| 263 | 270 | model.setMilitary(military); |
| 264 | 271 | return model; |
| 272 | + } | |
| 273 | + | |
| 274 | + | |
| 275 | + public FilePathModel getFilePath() { | |
| 276 | + return filePath; | |
| 277 | + } | |
| 278 | + | |
| 279 | + public void setFilePath(FilePathModel filePath) { | |
| 280 | + this.filePath = filePath; | |
| 281 | + } | |
| 282 | + | |
| 283 | + public List<String> getDelFiles() { | |
| 284 | + return delFiles; | |
| 285 | + } | |
| 286 | + | |
| 287 | + public void setDelFiles(List<String> delFiles) { | |
| 288 | + this.delFiles = delFiles; | |
| 265 | 289 | } |
| 266 | 290 | |
| 267 | 291 | public Integer getMilitary() { |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/ResidentsArchiveResult.java
View file @
204e101
| 1 | 1 | package com.lyms.platform.operate.web.result; |
| 2 | 2 | |
| 3 | +import com.lyms.platform.pojo.FilePathModel; | |
| 4 | + | |
| 3 | 5 | import java.util.Date; |
| 4 | 6 | import java.util.List; |
| 5 | 7 | import java.util.Map; |
| 6 | 8 | |
| ... | ... | @@ -164,7 +166,15 @@ |
| 164 | 166 | |
| 165 | 167 | // 是否军嫂 |
| 166 | 168 | private Integer military; |
| 169 | + private FilePathModel filePath; | |
| 167 | 170 | |
| 171 | + public FilePathModel getFilePath() { | |
| 172 | + return filePath; | |
| 173 | + } | |
| 174 | + | |
| 175 | + public void setFilePath(FilePathModel filePath) { | |
| 176 | + this.filePath = filePath; | |
| 177 | + } | |
| 168 | 178 | public List<String> getChildExtAddrs() { |
| 169 | 179 | return childExtAddrs; |
| 170 | 180 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/ResidentsPageResult.java
View file @
204e101
| 1 | 1 | package com.lyms.platform.operate.web.result; |
| 2 | 2 | |
| 3 | 3 | |
| 4 | +import com.lyms.platform.pojo.FilePathModel; | |
| 5 | + | |
| 4 | 6 | import java.util.Date; |
| 5 | 7 | |
| 6 | 8 | public class ResidentsPageResult { |
| 7 | 9 | |
| 8 | 10 | |
| ... | ... | @@ -125,9 +127,15 @@ |
| 125 | 127 | private String photo; |
| 126 | 128 | |
| 127 | 129 | |
| 130 | + private FilePathModel filePath; | |
| 128 | 131 | |
| 132 | + public FilePathModel getFilePath() { | |
| 133 | + return filePath; | |
| 134 | + } | |
| 129 | 135 | |
| 130 | - | |
| 136 | + public void setFilePath(FilePathModel filePath) { | |
| 137 | + this.filePath = filePath; | |
| 138 | + } | |
| 131 | 139 | |
| 132 | 140 | public String getPhoto() { |
| 133 | 141 | return photo; |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/PatientWeightServiceImpl.java
View file @
204e101
| ... | ... | @@ -958,6 +958,19 @@ |
| 958 | 958 | public BaseResponse report(String id, Integer userId, String rid, String version, String doctorId, String beforeWeight, String height, |
| 959 | 959 | String bregmatic, String bregmaticOther) { |
| 960 | 960 | String hospitalId = autoMatchFacade.getHospitalId(userId); |
| 961 | + | |
| 962 | + | |
| 963 | + //遵化市妇幼保健院 零时调整慢点 | |
| 964 | + if ("1000000094".equals(hospitalId)) | |
| 965 | + { | |
| 966 | + try { | |
| 967 | + Thread.sleep(10*1000); | |
| 968 | + }catch (Exception e) | |
| 969 | + { | |
| 970 | + | |
| 971 | + } | |
| 972 | + } | |
| 973 | + | |
| 961 | 974 | Organization org = organizationService.getOrganization(Integer.parseInt(hospitalId)); |
| 962 | 975 | |
| 963 | 976 |