Commit 6fb6fab1186fd501d286232ad4655ae13b05c6b0

Authored by liquanyu
1 parent 6418c3efdb

智能建档

Showing 2 changed files with 46 additions and 9 deletions

platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java View file @ 6fb6fab
... ... @@ -407,7 +407,7 @@
407 407 if ("4".equals(HIS_VERSION) && "216".equals(tempP.getHospitalId())) {
408 408 Date startDate = DateUtil.addMonth(new Date(),-3);
409 409 Date endDate = DateUtil.addDay(new Date(), 1);
410   - qhdfyFmService.syncByCardNo(DateUtil.getyyyy_MM_dd(startDate),DateUtil.getyyyy_MM_dd(endDate),tempP.getCardNo());
  410 + qhdfyFmService.syncByCardNo(DateUtil.getyyyy_MM_dd(startDate), DateUtil.getyyyy_MM_dd(endDate), tempP.getCardNo());
411 411 }
412 412 if (filePath != null && filePath.getId() == null)
413 413 {
414 414  
... ... @@ -415,9 +415,15 @@
415 415 yunBookbuildingService.addFilePath(filePath);
416 416 }
417 417  
  418 +
  419 +
418 420 }
419 421 });
420 422  
  423 + if (yunRequest != null)
  424 + {
  425 + deleteImg(yunRequest);
  426 + }
421 427  
422 428 br.setErrorcode(ErrorCodeConstants.SUCCESS);
423 429 br.setErrormsg("成功");
424 430  
425 431  
... ... @@ -895,15 +901,18 @@
895 901 yunBookbuildingService.updateFilePath(filePath);
896 902 }
897 903  
898   - List<String> delFiles = yunRequest.getDelFiles();
899   - if (CollectionUtils.isNotEmpty(delFiles))
  904 +
  905 + if (yunRequest != null)
900 906 {
901   - deleteImg(delFiles);
  907 + deleteImg(yunRequest);
902 908 }
903 909  
904 910 return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功");
905 911 }
906 912  
  913 +
  914 +
  915 +
907 916 /**
908 917 * 修改初诊 复诊的末次月经字段
909 918 *
910 919  
911 920  
912 921  
913 922  
... ... @@ -2090,16 +2099,32 @@
2090 2099  
2091 2100 }
2092 2101  
2093   - public void deleteImg(List<String> delFiles) {
  2102 + public void deleteImg(YunBookbuildingAddRequest yunRequest) {
  2103 + List<String> files = new ArrayList<>();
  2104 + List<String> delFiles = yunRequest.getDelFiles();
  2105 + if (CollectionUtils.isNotEmpty(delFiles))
  2106 + {
  2107 + files.addAll(delFiles);
  2108 + }
2094 2109  
2095   - for (String filePath : delFiles)
  2110 + List<String> hdelFiles = yunRequest.getHdelFiles();
  2111 + if (CollectionUtils.isNotEmpty(hdelFiles))
2096 2112 {
2097   - File filepath = new File(BASE_IMG_PATH+File.separator+filePath);
2098   - if (filepath.exists())
  2113 + files.addAll(hdelFiles);
  2114 + }
  2115 +
  2116 + if (CollectionUtils.isNotEmpty(files))
  2117 + {
  2118 + for (String filePath : files)
2099 2119 {
2100   - filepath.delete();
  2120 + File filepath = new File(BASE_IMG_PATH+File.separator+filePath);
  2121 + if (filepath.exists())
  2122 + {
  2123 + filepath.delete();
  2124 + }
2101 2125 }
2102 2126 }
  2127 +
2103 2128 }
2104 2129  
2105 2130 public BaseResponse saveImg(ImgRequest imgRequest) {
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/YunBookbuildingAddRequest.java View file @ 6fb6fab
... ... @@ -38,6 +38,18 @@
38 38 //删除文件路径
39 39 private List<String> delFiles;
40 40  
  41 +
  42 + //丈夫删除文件路径
  43 + private List<String> hdelFiles;
  44 +
  45 + public List<String> getHdelFiles() {
  46 + return hdelFiles;
  47 + }
  48 +
  49 + public void setHdelFiles(List<String> hdelFiles) {
  50 + this.hdelFiles = hdelFiles;
  51 + }
  52 +
41 53 public List<String> getDelFiles() {
42 54 return delFiles;
43 55 }