Commit beddd95809e587305d995c2d6d1214aae4eaea05
1 parent
bedcf372fd
Exists in
master
and in
1 other branch
1
Showing 2 changed files with 26 additions and 19 deletions
platform-dal/src/main/java/com/lyms/platform/pojo/PatientCheckTicket.java
View file @
beddd95
... | ... | @@ -19,7 +19,7 @@ |
19 | 19 | private String hospitalId; |
20 | 20 | private String pid; |
21 | 21 | private String consumeHospitalId; |
22 | - private Integer status; // 1:创建未使用, 2:产检使用,3:分娩销毁 | |
22 | + private Integer status; // 1:创建未使用, 2:产检使用,3:分娩销毁 4:建档删除 删除 | |
23 | 23 | private Date created; |
24 | 24 | private Date consumeDate; |
25 | 25 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java
View file @
beddd95
... | ... | @@ -976,24 +976,31 @@ |
976 | 976 | * @return |
977 | 977 | */ |
978 | 978 | public BaseResponse deletePregnantById(String id, Integer userId) { |
979 | - AntExChuQuery antExChuQuery = new AntExChuQuery(); | |
980 | - antExChuQuery.setParentId(id); | |
981 | - antExChuQuery.setYn(YnEnums.YES.getId()); | |
982 | - //获取初诊记录 | |
983 | - List<AntExChuModel> antExChulist = antenatalExaminationService.queryAntExChu(antExChuQuery); | |
984 | - String hospital = autoMatchFacade.getHospitalId(userId); | |
985 | - Patients patients = yunBookbuildingService.findOneById(id); | |
986 | 979 | |
987 | -// if (CollectionUtils.isNotEmpty(antExChulist)) | |
988 | - if (!deleteProcessHandler.deleteBookBuild(patients.getPid(), patients.getBookbuildingDate(), hospital)) { | |
989 | - return new BaseResponse().setErrorcode(ErrorCodeConstants.DONT_DELETE).setErrormsg("孕妇存在检查记录,不能删除建档"); | |
980 | + if(org.apache.commons.lang.StringUtils.isNotEmpty(id)){ | |
981 | + //获取初诊记录 | |
982 | + String hospital = autoMatchFacade.getHospitalId(userId); | |
983 | + Patients patients = yunBookbuildingService.findOneById(id); | |
984 | + | |
985 | + if (!deleteProcessHandler.deleteBookBuild(patients.getPid(), patients.getBookbuildingDate(), hospital)) { | |
986 | + return new BaseResponse().setErrorcode(ErrorCodeConstants.DONT_DELETE).setErrormsg("孕妇存在检查记录,不能删除建档"); | |
987 | + } | |
988 | + yunBookbuildingService.deletePregnantById(id); | |
989 | + //删除建档需要删除产筛数据 | |
990 | + SieveQuery sieveQuery = new SieveQuery(); | |
991 | + sieveQuery.setYn(YnEnums.YES.getId()); | |
992 | + sieveQuery.setParentId(id); | |
993 | + sieveService.deleteById(sieveQuery); | |
994 | + | |
995 | + PatientCheckTicketQuery patientCheckTicketQuery=new PatientCheckTicketQuery(); | |
996 | + patientCheckTicketQuery.setPatientId(id); | |
997 | + | |
998 | + PatientCheckTicket patientCheckTicket=new PatientCheckTicket(); | |
999 | + patientCheckTicket.setStatus(4); | |
1000 | + patientCheckTicket.setPatientId(id); | |
1001 | + patientCheckTicketService.findAndModify(patientCheckTicketQuery,patientCheckTicket); | |
990 | 1002 | } |
991 | - yunBookbuildingService.deletePregnantById(id); | |
992 | - //删除建档需要删除产筛数据 | |
993 | - SieveQuery sieveQuery = new SieveQuery(); | |
994 | - sieveQuery.setYn(YnEnums.YES.getId()); | |
995 | - sieveQuery.setParentId(id); | |
996 | - sieveService.deleteById(sieveQuery); | |
1003 | + | |
997 | 1004 | return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); |
998 | 1005 | } |
999 | 1006 |