Commit bd3bf8c87b30b228051663eab4470af94b18af35
1 parent
18e9af0117
Exists in
master
and in
8 other branches
增加是否通知
Showing 3 changed files with 16 additions and 7 deletions
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/ApplyOrderService.java
View file @
bd3bf8c
... | ... | @@ -50,6 +50,7 @@ |
50 | 50 | // return iReferralApplyOrderDao.queryList(babyQuery.convertToQuery()); |
51 | 51 | } |
52 | 52 | public SieveApplyOrderModel addOneSieveApplyOrder(SieveApplyOrderModel obj){ |
53 | + obj.setStatus(0); | |
53 | 54 | return iSieveApplyOrderDao.addApplyOrder(obj); |
54 | 55 | } |
55 | 56 | public List<SieveApplyOrderModel> querySieveApplyOrderWithQuery(SieveApplyOrderQuery sieveApplyOrderQuery){ |
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/PatientsService.java
View file @
bd3bf8c
... | ... | @@ -16,6 +16,7 @@ |
16 | 16 | import com.lyms.platform.query.AntExQuery; |
17 | 17 | import com.lyms.platform.query.PatientsQuery; |
18 | 18 | import com.lyms.platform.query.SieveApplyOrderQuery; |
19 | +import com.lyms.platform.query.SieveQuery; | |
19 | 20 | import org.apache.commons.collections.CollectionUtils; |
20 | 21 | import org.apache.commons.lang.StringUtils; |
21 | 22 | import org.apache.commons.lang.math.NumberUtils; |
22 | 23 | |
23 | 24 | |
24 | 25 | |
... | ... | @@ -126,19 +127,20 @@ |
126 | 127 | List<String> idList = new ArrayList<>(); |
127 | 128 | for (SieveApplyOrderModel orderModel : list) { |
128 | 129 | if (null != orderModel.getParentId()) { |
129 | - Patients patients= iPatientDao.getPatient(orderModel.getId()); | |
130 | - if(null!=patients){ | |
130 | + Patients patients = iPatientDao.getPatient(orderModel.getId()); | |
131 | + if (null != patients) { | |
131 | 132 | SieveModel sieveModel = convertToModel(patients); |
132 | 133 | sieveDao.addChanQianSieve(sieveModel); |
133 | 134 | } |
134 | 135 | idList.add(orderModel.getId()); |
135 | 136 | } |
136 | 137 | } |
137 | - SieveApplyOrderModel sieveApplyOrderModel=new SieveApplyOrderModel(); | |
138 | + SieveApplyOrderModel sieveApplyOrderModel = new SieveApplyOrderModel(); | |
138 | 139 | sieveApplyOrderModel.setStatus(1); |
139 | - for(String str:idList){ | |
140 | + for (String str : idList) { | |
140 | 141 | sieveApplyOrderModel.setId(str); |
141 | 142 | sieveApplyOrderModel.setModified(new Date()); |
143 | + sieveApplyOrderModel.setStatus(1); | |
142 | 144 | iSieveApplyOrderDao.updateSieve(sieveApplyOrderModel); |
143 | 145 | } |
144 | 146 | } |
145 | 147 | |
... | ... | @@ -181,9 +183,15 @@ |
181 | 183 | @Override |
182 | 184 | public void run() { |
183 | 185 | LogUtil.taskInfo("add sieve PatientWorker job :" + getName() + " start."); |
186 | + SieveQuery sieveQuery = new SieveQuery(); | |
187 | + sieveQuery.setYn(YnEnums.YES.getId()); | |
184 | 188 | for (Patients patient : patientses) { |
185 | - SieveModel sieveModel = convertToModel(patient); | |
186 | - sieveDao.addChanQianSieve(sieveModel); | |
189 | + sieveQuery.setParentId(patient.getId()); | |
190 | + List<SieveModel> list = sieveDao.queryList(sieveQuery.convertToQuery()); | |
191 | + if (CollectionUtils.isEmpty(list)) { | |
192 | + SieveModel sieveModel = convertToModel(patient); | |
193 | + sieveDao.addChanQianSieve(sieveModel); | |
194 | + } | |
187 | 195 | } |
188 | 196 | LogUtil.taskInfo("add sieve PatientWorker job :" + getName() + " end.costTime :" + (System.currentTimeMillis() - startTime) + " ms."); |
189 | 197 | } |
platform-dal/src/main/java/com/lyms/platform/pojo/SieveApplyOrderModel.java
View file @
bd3bf8c