diff --git a/platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/PatientsService.java b/platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/PatientsService.java index 0fa970f..463b684 100644 --- a/platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/PatientsService.java +++ b/platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/PatientsService.java @@ -114,7 +114,7 @@ public class PatientsService { public void updatePatientOneCol(String id,Object colValue) { - iPatientDao.updatePatientOneCol(id,colValue); + iPatientDao.updatePatientOneCol(id, colValue); } public void updatePatientLastCheckEmployeeIdOne(String id, String lastCheckEmployeeId) { @@ -275,21 +275,24 @@ public class PatientsService { private void updateExRecord(Patients patients){ AntExRecordQuery antExRecordQuery=new AntExRecordQuery(); antExRecordQuery.setParentId(patients.getId()); - AntExRecordModel antExRecordModel=new AntExRecordModel(); - antExRecordModel.setLastMenses(patients.getLastMenses()); - antExRecordModel.setBuildTime(patients.getBookbuildingDate()); - antExRecordModel.setDueDate(patients.getDueDate()); - antExRecordModel.setName(patients.getUsername()); - antExRecordModel.setBrith(patients.getBirth()); - Patients dbPatients = findOnePatientById(patients.getId()); - if(dbPatients.getType()==1){ - antExRecordModel.setStatus(2); - }else { - antExRecordModel.setStatus(1); - } - antExRecordModel.setModified(new Date()); - iAntExRecordDao.batchUpdateRecord(antExRecordModel, antExRecordQuery.convertToQuery()); + if(iAntExRecordDao.count(antExRecordQuery.convertToQuery())>0){ + AntExRecordModel antExRecordModel=new AntExRecordModel(); + antExRecordModel.setLastMenses(patients.getLastMenses()); + antExRecordModel.setBuildTime(patients.getBookbuildingDate()); + antExRecordModel.setDueDate(patients.getDueDate()); + antExRecordModel.setName(patients.getUsername()); + antExRecordModel.setBrith(patients.getBirth()); + Patients dbPatients = findOnePatientById(patients.getId()); + if(dbPatients.getType()==1){ + antExRecordModel.setStatus(2); + }else { + antExRecordModel.setStatus(1); + } + antExRecordModel.setModified(new Date()); + + iAntExRecordDao.batchUpdateRecord(antExRecordModel, antExRecordQuery.convertToQuery()); + } } /** * 修改产筛数据