Commit 3863658f2d7794d70c02fd0586ba4f2aad339aa6
1 parent
8133eee686
Exists in
master
and in
8 other branches
增加自动分娩产妇
Showing 3 changed files with 34 additions and 0 deletions
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/PatientsService.java
View file @
3863658
| ... | ... | @@ -146,8 +146,29 @@ |
| 146 | 146 | }**/ |
| 147 | 147 | } |
| 148 | 148 | |
| 149 | + /** | |
| 150 | + * 删除过期产筛的数据 | |
| 151 | + */ | |
| 149 | 152 | private void delSieve(){ |
| 150 | 153 | |
| 154 | + } | |
| 155 | + | |
| 156 | + /** | |
| 157 | + * 自动分娩产妇的 | |
| 158 | + */ | |
| 159 | + public void autoMatDeliver(){ | |
| 160 | + Date endDate = DateUtil.addDay(new Date(), -293); | |
| 161 | + PatientsQuery patientsQuery=new PatientsQuery(); | |
| 162 | + patientsQuery.setYn(YnEnums.YES.getId()); | |
| 163 | + patientsQuery.setType(1); | |
| 164 | + patientsQuery.setLastMensesStart(endDate); | |
| 165 | + List<Patients> patientses = queryPatient(patientsQuery); | |
| 166 | + for(Patients patients:patientses){ | |
| 167 | + patients.setType(3); | |
| 168 | + patients.setFmDate(new Date()); | |
| 169 | + patients.setModified(new Date()); | |
| 170 | + updatePatient(patients); | |
| 171 | + } | |
| 151 | 172 | } |
| 152 | 173 | /** |
| 153 | 174 | * 孕妇建档时调用的方法 |
platform-data-api/src/main/java/com/lyms/platform/data/controller/TaskController.java
View file @
3863658
| ... | ... | @@ -110,6 +110,9 @@ |
| 110 | 110 | }else if("addSieveJob".equals(sid)){ |
| 111 | 111 | patientsService.addSieveJob(); |
| 112 | 112 | writeString(response, "success"); |
| 113 | + }else if("autoMatDeliver".equals(sid)){ | |
| 114 | + patientsService.autoMatDeliver(); | |
| 115 | + writeString(response, "success"); | |
| 113 | 116 | } |
| 114 | 117 | |
| 115 | 118 | else { |
platform-data-api/src/main/webapp/WEB-INF/vm/task/index.vm
View file @
3863658
| ... | ... | @@ -57,6 +57,16 @@ |
| 57 | 57 | <button class="btn btn-sm btn-danger" onclick="execOne('addSieveJob')">执行</button> |
| 58 | 58 | </td> |
| 59 | 59 | </tr> |
| 60 | + | |
| 61 | + <tr> | |
| 62 | + <td>自动分娩产妇</td> | |
| 63 | + <td></td> | |
| 64 | + <td>无</td> | |
| 65 | + <td> | |
| 66 | + <button class="btn btn-sm btn-danger" onclick="execOne('autoMatDeliver')">执行</button> | |
| 67 | + </td> | |
| 68 | + </tr> | |
| 69 | + | |
| 60 | 70 | </table> |
| 61 | 71 | |
| 62 | 72 | <script> |