diff --git a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java index 63a58ad..d821d93 100644 --- a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java +++ b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java @@ -407,7 +407,7 @@ public class BookbuildingFacade { if ("4".equals(HIS_VERSION) && "216".equals(tempP.getHospitalId())) { Date startDate = DateUtil.addMonth(new Date(),-3); Date endDate = DateUtil.addDay(new Date(), 1); - qhdfyFmService.syncByCardNo(DateUtil.getyyyy_MM_dd(startDate),DateUtil.getyyyy_MM_dd(endDate),tempP.getCardNo()); + qhdfyFmService.syncByCardNo(DateUtil.getyyyy_MM_dd(startDate), DateUtil.getyyyy_MM_dd(endDate), tempP.getCardNo()); } if (filePath != null && filePath.getId() == null) { @@ -415,9 +415,15 @@ public class BookbuildingFacade { yunBookbuildingService.addFilePath(filePath); } + + } }); + if (yunRequest != null) + { + deleteImg(yunRequest); + } br.setErrorcode(ErrorCodeConstants.SUCCESS); br.setErrormsg("成功"); @@ -895,15 +901,18 @@ public class BookbuildingFacade { yunBookbuildingService.updateFilePath(filePath); } - List delFiles = yunRequest.getDelFiles(); - if (CollectionUtils.isNotEmpty(delFiles)) + + if (yunRequest != null) { - deleteImg(delFiles); + deleteImg(yunRequest); } return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); } + + + /** * 修改初诊 复诊的末次月经字段 * @@ -2090,16 +2099,32 @@ public class BookbuildingFacade { } - public void deleteImg(List delFiles) { + public void deleteImg(YunBookbuildingAddRequest yunRequest) { + List files = new ArrayList<>(); + List delFiles = yunRequest.getDelFiles(); + if (CollectionUtils.isNotEmpty(delFiles)) + { + files.addAll(delFiles); + } + + List hdelFiles = yunRequest.getHdelFiles(); + if (CollectionUtils.isNotEmpty(hdelFiles)) + { + files.addAll(hdelFiles); + } - for (String filePath : delFiles) + if (CollectionUtils.isNotEmpty(files)) { - File filepath = new File(BASE_IMG_PATH+File.separator+filePath); - if (filepath.exists()) + for (String filePath : files) { - filepath.delete(); + File filepath = new File(BASE_IMG_PATH+File.separator+filePath); + if (filepath.exists()) + { + filepath.delete(); + } } } + } public BaseResponse saveImg(ImgRequest imgRequest) { diff --git a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/YunBookbuildingAddRequest.java b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/YunBookbuildingAddRequest.java index e4d1fce..8ab1413 100644 --- a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/YunBookbuildingAddRequest.java +++ b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/YunBookbuildingAddRequest.java @@ -38,6 +38,18 @@ public class YunBookbuildingAddRequest { //删除文件路径 private List delFiles; + + //丈夫删除文件路径 + private List hdelFiles; + + public List getHdelFiles() { + return hdelFiles; + } + + public void setHdelFiles(List hdelFiles) { + this.hdelFiles = hdelFiles; + } + public List getDelFiles() { return delFiles; }