Commit 90699db8d1e1544e5385beb62623ac005f5c99f0
Exists in
master
and in
6 other branches
Merge remote-tracking branch 'origin/master'
Showing 3 changed files
platform-common/src/main/java/com/lyms/platform/common/enums/RemoteServerEnmus.java
View file @
90699db
| ... | ... | @@ -17,7 +17,8 @@ |
| 17 | 17 | // KF("https://area-kaifeng-api.healthbaby.com.cn:12356", "开封"), |
| 18 | 18 | CY("https://area-changyi-api.healthbaby.com.cn:12356", "昌邑"), |
| 19 | 19 | XT("https://area-xtrm-api.healthbaby.com.cn:12356", "邢台人民医院系统"), |
| 20 | - RC("https://area-rongcheng-api.healthbaby.com.cn:12356", "荣成"); | |
| 20 | + RC("https://area-rongcheng-api.healthbaby.com.cn:12356", "荣成"), | |
| 21 | + ZCRM("https://area-zhuchengrenmin-api.healthbaby.com.cn:12356", "诸城人民医院"); | |
| 21 | 22 | |
| 22 | 23 | |
| 23 | 24 | private String address; |
platform-common/src/main/java/com/lyms/platform/common/utils/DateUtil.java
View file @
90699db
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/TestController.java
View file @
90699db
| ... | ... | @@ -3181,7 +3181,6 @@ |
| 3181 | 3181 | patientQuery.setNeed("y"); |
| 3182 | 3182 | patientQuery.setPerType(1); |
| 3183 | 3183 | patientQuery.setLimit(1000); |
| 3184 | - | |
| 3185 | 3184 | while (true) |
| 3186 | 3185 | { |
| 3187 | 3186 | System.out.println("page index " + page); |
| 3188 | 3187 | |
| 3189 | 3188 | |
| 3190 | 3189 | |
| 3191 | 3190 | |
| ... | ... | @@ -3194,33 +3193,48 @@ |
| 3194 | 3193 | } |
| 3195 | 3194 | else |
| 3196 | 3195 | { |
| 3197 | - for (PatientService patientService : patientServices) | |
| 3198 | - { | |
| 3199 | - if (patientService.getSerStatus() != null && patientService.getSerStatus() == 1 && patientService.getServiceWeek() == null && patientService.getParentid() != null) | |
| 3200 | - { | |
| 3201 | - System.out.println("service record id " + patientService.getId()); | |
| 3202 | - | |
| 3203 | - Patients patients = patientsService.findOnePatientById(patientService.getParentid()); | |
| 3204 | - if (patients != null && patients.getLastMenses() != null) | |
| 3205 | - { | |
| 3206 | - patientService.setSerStartTime(patients.getLastMenses()); | |
| 3207 | - patientService.setSerEndTime(DateUtil.addWeek(patients.getLastMenses(),42)); | |
| 3208 | - patientService.setSerStartWeek(0); | |
| 3209 | - patientService.setSerEndWeek(42); | |
| 3210 | - patientService.setServiceWeek(42); | |
| 3211 | - if (StringUtils.isNotEmpty(patientService.getSerDoct())) | |
| 3196 | + int batchSize = 200; | |
| 3197 | + int end = 0; | |
| 3198 | + for (int i = 0; i < patientServices.size(); i += batchSize) { | |
| 3199 | + end = (end + batchSize); | |
| 3200 | + if (end > patientServices.size()) { | |
| 3201 | + end = patientServices.size(); | |
| 3202 | + } | |
| 3203 | + System.out.println("start:" + i + ",end:" + end); | |
| 3204 | + final List<PatientService> serviceRecords = patientServices.subList(i, end); | |
| 3205 | + commonThreadPool.execute(new Runnable() { | |
| 3206 | + @Override | |
| 3207 | + public void run() { | |
| 3208 | + for (PatientService patientService : serviceRecords) | |
| 3212 | 3209 | { |
| 3213 | - patientService.setDoctorWeek(42); | |
| 3214 | - patientService.setDocStartWeek(0); | |
| 3215 | - patientService.setDocEndWeek(42); | |
| 3210 | + if (patientService.getSerStatus() != null && patientService.getSerStatus() == 1 && patientService.getServiceWeek() == null && patientService.getParentid() != null) | |
| 3211 | + { | |
| 3212 | + System.out.println("service record id " + patientService.getId()); | |
| 3216 | 3213 | |
| 3217 | - patientService.setDocEndTime(DateUtil.addWeek(patients.getLastMenses(),42)); | |
| 3218 | - patientService.setDocStartTime(patients.getLastMenses()); | |
| 3214 | + Patients patients = patientsService.findOnePatientById(patientService.getParentid()); | |
| 3215 | + if (patients != null && patients.getLastMenses() != null) | |
| 3216 | + { | |
| 3217 | + patientService.setSerStartTime(patients.getLastMenses()); | |
| 3218 | + patientService.setSerEndTime(DateUtil.addWeek(patients.getLastMenses(),42)); | |
| 3219 | + patientService.setSerStartWeek(0); | |
| 3220 | + patientService.setSerEndWeek(42); | |
| 3221 | + patientService.setServiceWeek(42); | |
| 3222 | + if (StringUtils.isNotEmpty(patientService.getSerDoct())) | |
| 3223 | + { | |
| 3224 | + patientService.setDoctorWeek(42); | |
| 3225 | + patientService.setDocStartWeek(0); | |
| 3226 | + patientService.setDocEndWeek(42); | |
| 3227 | + | |
| 3228 | + patientService.setDocEndTime(DateUtil.addWeek(patients.getLastMenses(),42)); | |
| 3229 | + patientService.setDocStartTime(patients.getLastMenses()); | |
| 3230 | + } | |
| 3231 | + System.out.println("update service id " + patientService.getId()); | |
| 3232 | + patientServiceService.updatePatientService(patientService); | |
| 3233 | + } | |
| 3234 | + } | |
| 3219 | 3235 | } |
| 3220 | - System.out.println("update service id " + patientService.getId()); | |
| 3221 | - patientServiceService.updatePatientService(patientService); | |
| 3222 | 3236 | } |
| 3223 | - } | |
| 3237 | + }); | |
| 3224 | 3238 | } |
| 3225 | 3239 | } |
| 3226 | 3240 | page++; |