Commit fb4b50f172a9d48373179bf9852657e6db532dbe

Authored by jiangjiazhi
1 parent 635bc96250
Exists in master

修改产检删除

Showing 1 changed file with 18 additions and 15 deletions

platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/PatientsService.java View file @ fb4b50f
... ... @@ -114,7 +114,7 @@
114 114  
115 115 public void updatePatientOneCol(String id,Object colValue)
116 116 {
117   - iPatientDao.updatePatientOneCol(id,colValue);
  117 + iPatientDao.updatePatientOneCol(id, colValue);
118 118 }
119 119  
120 120 public void updatePatientLastCheckEmployeeIdOne(String id, String lastCheckEmployeeId) {
121 121  
... ... @@ -275,21 +275,24 @@
275 275 private void updateExRecord(Patients patients){
276 276 AntExRecordQuery antExRecordQuery=new AntExRecordQuery();
277 277 antExRecordQuery.setParentId(patients.getId());
278   - AntExRecordModel antExRecordModel=new AntExRecordModel();
279   - antExRecordModel.setLastMenses(patients.getLastMenses());
280   - antExRecordModel.setBuildTime(patients.getBookbuildingDate());
281   - antExRecordModel.setDueDate(patients.getDueDate());
282   - antExRecordModel.setName(patients.getUsername());
283   - antExRecordModel.setBrith(patients.getBirth());
284   - Patients dbPatients = findOnePatientById(patients.getId());
285   - if(dbPatients.getType()==1){
286   - antExRecordModel.setStatus(2);
287   - }else {
288   - antExRecordModel.setStatus(1);
289   - }
290   - antExRecordModel.setModified(new Date());
291 278  
292   - iAntExRecordDao.batchUpdateRecord(antExRecordModel, antExRecordQuery.convertToQuery());
  279 + if(iAntExRecordDao.count(antExRecordQuery.convertToQuery())>0){
  280 + AntExRecordModel antExRecordModel=new AntExRecordModel();
  281 + antExRecordModel.setLastMenses(patients.getLastMenses());
  282 + antExRecordModel.setBuildTime(patients.getBookbuildingDate());
  283 + antExRecordModel.setDueDate(patients.getDueDate());
  284 + antExRecordModel.setName(patients.getUsername());
  285 + antExRecordModel.setBrith(patients.getBirth());
  286 + Patients dbPatients = findOnePatientById(patients.getId());
  287 + if(dbPatients.getType()==1){
  288 + antExRecordModel.setStatus(2);
  289 + }else {
  290 + antExRecordModel.setStatus(1);
  291 + }
  292 + antExRecordModel.setModified(new Date());
  293 +
  294 + iAntExRecordDao.batchUpdateRecord(antExRecordModel, antExRecordQuery.convertToQuery());
  295 + }
293 296 }
294 297 /**
295 298 * 修改产筛数据