Commit a9b00f9cd927ff4b86c0bfcf2f845fd867cec73d

Authored by liquanyu
1 parent dab140f7f2

update

Showing 5 changed files with 37 additions and 12 deletions

platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/PatientsService.java View file @ a9b00f9
... ... @@ -445,14 +445,14 @@
445 445 * 自动分娩产妇的
446 446 */
447 447 public void autoMatDeliver() {
448   - setAutoMatDeliver(null);
  448 + setAutoMatDeliver(null,null);
449 449  
450 450 }
451 451  
452 452  
453   - public void setAutoMatDeliver(String cardNo)
  453 + public void setAutoMatDeliver(String cardNo,Date dueDate)
454 454 {
455   - Date endDate = DateUtil.addDay(new Date(), -294);
  455 + Date endDate = dueDate == null ? DateUtil.addDay(new Date(), -294) : dueDate;
456 456 PatientsQuery patientsQuery = new PatientsQuery();
457 457 patientsQuery.setYn(YnEnums.YES.getId());
458 458 patientsQuery.setType(1);
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PostReviewController.java View file @ a9b00f9
... ... @@ -65,6 +65,22 @@
65 65 return baseResponse;
66 66 }
67 67  
  68 +
  69 + /**
  70 + * 南和不填写分娩记录 直接填写产后复查 先设置分娩时间
  71 + * @param postReviewRequest
  72 + * @param request
  73 + * @return
  74 + */
  75 + @RequestMapping(method = RequestMethod.POST,value = "/postreviewDueDate")
  76 + @ResponseBody
  77 + @TokenRequired
  78 + public BaseResponse addPostReviewDueDate(@Valid @RequestBody PostReviewRequest postReviewRequest,HttpServletRequest request){
  79 + LoginContext loginState = (LoginContext) request.getAttribute("loginContext");
  80 + BaseResponse baseResponse = postReviewFacade.addPostReviewDueDate(postReviewRequest, loginState.getId());
  81 + return baseResponse;
  82 + }
  83 +
68 84 /**
69 85 * 查询产后复查
70 86 *
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/RemoteController.java View file @ a9b00f9
... ... @@ -56,6 +56,8 @@
56 56 @Autowired
57 57 private RemoteFacade remoteFacade;
58 58  
  59 + private static final long TIMES = 24 * 60 * 60 * 1000 - 1;
  60 +
59 61 public static final String center_statistics_url= PropertiesUtils.getPropertyValue("center_statistics_url");
60 62  
61 63 @ResponseBody
... ... @@ -194,7 +196,7 @@
194 196 {
195 197 String[] arr = created.split(" - ");
196 198 Date start = DateUtil.parseYMD(arr[0]);
197   - Date end = new Date(DateUtil.parseYMD(arr[1]).getTime() + 24 * 60 * 60 * 1000 - 1);
  199 + Date end = new Date(DateUtil.parseYMD(arr[1]).getTime() + TIMES);
198 200 query.setCreatedStart(start);
199 201 query.setCreatedEnd(end);
200 202 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PostReviewFacade.java View file @ a9b00f9
... ... @@ -352,14 +352,7 @@
352 352  
353 353 //未分娩建档
354 354 if (null != patients) {
355   - if (postReviewQueryRequest.getFlag() != null)
356   - {
357   - patientsService.setAutoMatDeliver(patients.getCardNo());
358   - }
359   - else
360   - {
361   - return new BaseResponse().setErrorcode(ErrorCodeConstants.PARAMETER_ERROR).setErrormsg("该孕妇还未分娩,不能进行复查");
362   - }
  355 + return new BaseResponse().setErrorcode(ErrorCodeConstants.PARAMETER_ERROR).setErrormsg("该孕妇还未分娩,不能进行复查");
363 356 }
364 357  
365 358 //取所有医院的建档数据 优先取本院 ,然后取外院
... ... @@ -520,6 +513,11 @@
520 513 } else {
521 514 return new BaseResponse().setErrorcode(ErrorCodeConstants.BUSINESS_ERROR).setErrormsg("当前复查记录不是本院最新的复查记录,不能删除");
522 515 }
  516 + }
  517 +
  518 + public BaseResponse addPostReviewDueDate(PostReviewRequest postReviewRequest, Integer id) {
  519 + patientsService.setAutoMatDeliver(postReviewRequest.getCardNo(),DateUtil.parseYMD(postReviewRequest.getDueDate()));
  520 + return new BaseResponse().setErrormsg("成功").setErrorcode(ErrorCodeConstants.SUCCESS);
523 521 }
524 522 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/PostReviewRequest.java View file @ a9b00f9
... ... @@ -124,6 +124,15 @@
124 124 // B超
125 125 private String bChao;
126 126  
  127 + private String cardNo;
  128 +
  129 + public String getCardNo() {
  130 + return cardNo;
  131 + }
  132 +
  133 + public void setCardNo(String cardNo) {
  134 + this.cardNo = cardNo;
  135 + }
127 136  
128 137 public String getXhdb() {
129 138 return xhdb;