Commit a574a42e9a5eed6184cb141005c6da4c8528c1c1
1 parent
5a8a84b318
Exists in
master
and in
1 other branch
修改新电子病历
Showing 1 changed file with 11 additions and 4 deletions
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/PatientsService.java
View file @
a574a42
| ... | ... | @@ -14,6 +14,7 @@ |
| 14 | 14 | import com.lyms.platform.pojo.SieveModel; |
| 15 | 15 | import com.lyms.platform.query.AntExQuery; |
| 16 | 16 | import com.lyms.platform.query.PatientsQuery; |
| 17 | +import com.lyms.platform.query.SieveApplyOrderQuery; | |
| 17 | 18 | import com.lyms.platform.query.SieveQuery; |
| 18 | 19 | import org.apache.commons.collections.CollectionUtils; |
| 19 | 20 | import org.apache.commons.lang.StringUtils; |
| ... | ... | @@ -36,7 +37,8 @@ |
| 36 | 37 | private IPatientDao iPatientDao; |
| 37 | 38 | @Autowired |
| 38 | 39 | private ISieveDao sieveDao; |
| 39 | - | |
| 40 | + @Autowired | |
| 41 | + private ISieveApplyOrderDao sieveApplyOrderDao; | |
| 40 | 42 | public Patients addPatient(Patients obj) { |
| 41 | 43 | return iPatientDao.addPatient(obj); |
| 42 | 44 | } |
| 43 | 45 | |
| ... | ... | @@ -159,14 +161,19 @@ |
| 159 | 161 | public void delSieve(){ |
| 160 | 162 | SieveQuery sieveQuery = new SieveQuery(); |
| 161 | 163 | sieveQuery.setYn(YnEnums.YES.getId()); |
| 162 | - sieveQuery.setFrom("0"); | |
| 163 | 164 | Date endDate = DateUtil.addDay(new Date(), -146); |
| 164 | 165 | sieveQuery.setLastMensesStart(endDate); |
| 165 | 166 | List<SieveModel> list = sieveDao.queryList(sieveQuery.convertToQuery()); |
| 166 | 167 | if(CollectionUtils.isNotEmpty(list)){ |
| 167 | 168 | for(SieveModel sieveModel:list) { |
| 168 | - sieveModel.setYn(YnEnums.NO.getId()); | |
| 169 | - sieveDao.updateChanQianSieve(sieveModel); | |
| 169 | + SieveApplyOrderQuery sieveApplyOrderQuery=new SieveApplyOrderQuery(); | |
| 170 | + sieveApplyOrderQuery.setParentId(sieveModel.getParentId()); | |
| 171 | + sieveApplyOrderQuery.setYn(YnEnums.YES.getId()); | |
| 172 | + List list1 = sieveApplyOrderDao.queryList(sieveApplyOrderQuery.convertToQuery()); | |
| 173 | + if(CollectionUtils.isEmpty(list1)){ | |
| 174 | + sieveModel.setYn(YnEnums.NO.getId()); | |
| 175 | + sieveDao.updateChanQianSieve(sieveModel); | |
| 176 | + } | |
| 170 | 177 | } |
| 171 | 178 | } |
| 172 | 179 | } |