Commit d381acb4080da8020776f9b960bfe8661773da78
1 parent
6ac7d684ab
Exists in
master
and in
8 other branches
s
Showing 2 changed files with 18 additions and 6 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java
View file @
d381acb
| ... | ... | @@ -1406,7 +1406,7 @@ |
| 1406 | 1406 | }*/ |
| 1407 | 1407 | |
| 1408 | 1408 | // if (CollectionUtils.isEmpty(list)) { |
| 1409 | - if (deleteProcessHandler.deleteAntExChu(antExChuModel11.getPid(), antExChuModel11.getCheckTime(), hospital, true)) { | |
| 1409 | + if (deleteProcessHandler.deleteAntExChu(antExChuModel11.getPid(), antExChuModel11.getCheckTime(), hospital, true,antExQueryRequest.getId())) { | |
| 1410 | 1410 | antenatalExaminationService.updateAntExChu(antExChuModel, antExQueryRequest.getId()); |
| 1411 | 1411 | |
| 1412 | 1412 | AntExChuModel antExChuModel1 = antenatalExaminationService.findOne(antExQueryRequest.getId()); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/DeleteProcessHandler.java
View file @
d381acb
| ... | ... | @@ -5,11 +5,15 @@ |
| 5 | 5 | import com.lyms.platform.biz.service.PostReviewService; |
| 6 | 6 | import com.lyms.platform.biz.service.StopPregnancyService; |
| 7 | 7 | import com.lyms.platform.common.enums.YnEnums; |
| 8 | +import com.lyms.platform.common.utils.StringUtils; | |
| 9 | +import com.lyms.platform.pojo.AntExChuModel; | |
| 8 | 10 | import com.lyms.platform.query.*; |
| 11 | +import org.apache.commons.collections.CollectionUtils; | |
| 9 | 12 | import org.springframework.beans.factory.annotation.Autowired; |
| 10 | 13 | import org.springframework.stereotype.Component; |
| 11 | 14 | |
| 12 | 15 | import java.util.Date; |
| 16 | +import java.util.List; | |
| 13 | 17 | |
| 14 | 18 | /** |
| 15 | 19 | * 产后复查删除 |
| ... | ... | @@ -31,7 +35,6 @@ |
| 31 | 35 | /** |
| 32 | 36 | * 删除产后复查记录,查询有没有大于检查时间的本院数据 |
| 33 | 37 | * |
| 34 | - * @param lastMenses 末次月经 | |
| 35 | 38 | * @param pid |
| 36 | 39 | * @param checkTime |
| 37 | 40 | * @param hospitalId |
| ... | ... | @@ -83,7 +86,7 @@ |
| 83 | 86 | */ |
| 84 | 87 | public boolean deleteAntEx( String pid, Date checkTime, String hospitalId,boolean qufenHospital) { |
| 85 | 88 | //先判断是否有复查记录 |
| 86 | - if (doBiz(pid, checkTime, hospitalId,false)) { | |
| 89 | + if (doBiz(pid, checkTime, hospitalId, false)) { | |
| 87 | 90 | StopPregQuery stopPregQuery = new StopPregQuery(); |
| 88 | 91 | stopPregQuery.setPid(pid); |
| 89 | 92 | stopPregQuery.setYn(YnEnums.YES.getId()); |
| ... | ... | @@ -110,7 +113,7 @@ |
| 110 | 113 | return false; |
| 111 | 114 | } |
| 112 | 115 | |
| 113 | - public boolean deleteAntExChu( String pid, Date checkTime, String hospitalId,boolean qufenHospital) { | |
| 116 | + public boolean deleteAntExChu( String pid, Date checkTime, String hospitalId,boolean qufenHospital,String antExChuId) { | |
| 114 | 117 | if (deleteAntEx(pid, checkTime, hospitalId, false)) { |
| 115 | 118 | AntExChuQuery antExChuQuery=new AntExChuQuery(); |
| 116 | 119 | antExChuQuery.setPid(pid); |
| 117 | 120 | |
| ... | ... | @@ -119,13 +122,22 @@ |
| 119 | 122 | if(qufenHospital){ |
| 120 | 123 | antExChuQuery.setHospitalId(hospitalId); |
| 121 | 124 | } |
| 122 | - return antenatalExaminationService.queryAntExChuCount(antExChuQuery.convertToQuery()) ==0; | |
| 125 | + List<AntExChuModel> antExChuModels = antenatalExaminationService.queryAntExChu(antExChuQuery.convertToQuery()); | |
| 126 | + if(StringUtils.isNotEmpty(antExChuId) && CollectionUtils.isNotEmpty(antExChuModels)){ | |
| 127 | + for(int i=0;i<antExChuModels.size();i++){ | |
| 128 | + if(antExChuModels.get(i).equals(antExChuId)){ | |
| 129 | + antExChuModels.remove(i); | |
| 130 | + break; | |
| 131 | + } | |
| 132 | + } | |
| 133 | + } | |
| 134 | + return antExChuModels.size()==0; | |
| 123 | 135 | } |
| 124 | 136 | return false; |
| 125 | 137 | } |
| 126 | 138 | |
| 127 | 139 | public boolean deleteBookBuild(String pid, Date checkTime, String hospitalId){ |
| 128 | - if(deleteAntExChu(pid,checkTime,hospitalId,false)){ | |
| 140 | + if(deleteAntExChu(pid,checkTime,hospitalId,false,null)){ | |
| 129 | 141 | return true; |
| 130 | 142 | } |
| 131 | 143 | return false; |