Commit dfdedc8f306fbe5b3be49278d22582b5e7b923e5
Exists in
master
and in
6 other branches
Merge remote-tracking branch 'origin/master'
Showing 7 changed files
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/IBabyCheckDao.java
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/impl/BabyCheckDaoImpl.java
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/BabyCheckService.java
- platform-operate-api/src/main/java/com/lyms/hospitalapi/qhdfy/QhdfyHisService.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyCheckFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/utils/HiskCountTask.java
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/IBabyCheckDao.java
View file @
dfdedc8
| ... | ... | @@ -2,6 +2,7 @@ |
| 2 | 2 | |
| 3 | 3 | import com.lyms.platform.common.dao.operator.MongoQuery; |
| 4 | 4 | import com.lyms.platform.pojo.BabyCheckModel; |
| 5 | +import com.lyms.platform.pojo.BabyModel; | |
| 5 | 6 | |
| 6 | 7 | import java.util.HashMap; |
| 7 | 8 | import java.util.List; |
| ... | ... | @@ -27,5 +28,7 @@ |
| 27 | 28 | List<HashMap> babyStatisticsManagerCheckDoctorGroup(MongoQuery mongoQuery); |
| 28 | 29 | |
| 29 | 30 | List<HashMap> babyStatisticsManagerWeekAgeGroup(MongoQuery mongoQuery); |
| 31 | + | |
| 32 | + void updateBabyCheckBirthByBuild(BabyModel babyModel); | |
| 30 | 33 | } |
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/impl/BabyCheckDaoImpl.java
View file @
dfdedc8
| ... | ... | @@ -92,6 +92,12 @@ |
| 92 | 92 | return result.getMappedResults(); |
| 93 | 93 | } |
| 94 | 94 | |
| 95 | + @Override | |
| 96 | + public void updateBabyCheckBirthByBuild(BabyModel babyModel) { | |
| 97 | + this.mongoTemplate.updateMulti(new Query(Criteria.where("buildId").is(babyModel.getId())), | |
| 98 | + Update.update("birth", babyModel.getBirth()), BabyCheckModel.class); | |
| 99 | + } | |
| 100 | + | |
| 95 | 101 | |
| 96 | 102 | } |
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/BabyCheckService.java
View file @
dfdedc8
| ... | ... | @@ -9,6 +9,7 @@ |
| 9 | 9 | import com.lyms.platform.common.enums.YnEnums; |
| 10 | 10 | import com.lyms.platform.pojo.AwModel; |
| 11 | 11 | import com.lyms.platform.pojo.BabyCheckModel; |
| 12 | +import com.lyms.platform.pojo.BabyModel; | |
| 12 | 13 | import com.lyms.platform.pojo.HwModel; |
| 13 | 14 | import com.lyms.platform.query.BabyCheckModelQuery; |
| 14 | 15 | import org.apache.commons.lang.StringUtils; |
| ... | ... | @@ -107,6 +108,11 @@ |
| 107 | 108 | |
| 108 | 109 | public List<HashMap> babyStatisticsManagerWeekAgeGroup(BabyCheckModelQuery babyCheckModelQuery) { |
| 109 | 110 | return babyCheckDao.babyStatisticsManagerWeekAgeGroup(babyCheckModelQuery.convertToQuery()); |
| 111 | + } | |
| 112 | + | |
| 113 | + public void updateBabyCheckBirthByBuild(BabyModel babyModel) { | |
| 114 | + | |
| 115 | + babyCheckDao.updateBabyCheckBirthByBuild(babyModel); | |
| 110 | 116 | } |
| 111 | 117 | } |
platform-operate-api/src/main/java/com/lyms/hospitalapi/qhdfy/QhdfyHisService.java
View file @
dfdedc8
| ... | ... | @@ -10,6 +10,7 @@ |
| 10 | 10 | import com.lyms.platform.common.dao.operator.MongoOper; |
| 11 | 11 | import com.lyms.platform.common.enums.YnEnums; |
| 12 | 12 | import com.lyms.platform.common.utils.DateUtil; |
| 13 | +import com.lyms.platform.common.utils.ExceptionUtils; | |
| 13 | 14 | import com.lyms.platform.common.utils.JsonUtil; |
| 14 | 15 | import com.lyms.platform.pojo.*; |
| 15 | 16 | import com.lyms.platform.query.LisReportQuery; |
| 16 | 17 | |
| 17 | 18 | |
| ... | ... | @@ -339,9 +340,18 @@ |
| 339 | 340 | |
| 340 | 341 | public List<Map<String,Object>> getPatientInfoList(String cardNo){ |
| 341 | 342 | List<Map<String,Object>> result = new ArrayList<>(); |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 342 | 346 | if (StringUtils.isNotBlank(cardNo)) { |
| 347 | + long start = System.currentTimeMillis(); | |
| 348 | + | |
| 343 | 349 | Connection conn = com.lyms.hospitalapi.qhdfy.ConnTools.makeHisConnection(); |
| 344 | 350 | QueryRunner queryRunner = new QueryRunner(); |
| 351 | + | |
| 352 | + long end = System.currentTimeMillis(); | |
| 353 | + | |
| 354 | + System.out.println("times3 = " + (end - start)); | |
| 345 | 355 | try { |
| 346 | 356 | List<PregPatientinfo> list = queryRunner.query(conn, "select top 1 patid as P_ID,hzxm as P_NAME, sex as P_SEX, birth as BIRTH, sfzh as P_CARDNO, lxdh as P_MOBILEPHONE from SF_BRXXK where cardno= '"+cardNo+"'", new BeanListHandler<PregPatientinfo>(PregPatientinfo.class)); |
| 347 | 357 | if (list.size() > 0) { |
| 348 | 358 | |
| ... | ... | @@ -361,9 +371,12 @@ |
| 361 | 371 | result.add(map); |
| 362 | 372 | } |
| 363 | 373 | } |
| 374 | + long end1 = System.currentTimeMillis(); | |
| 375 | + System.out.println("times4 = " + (end1 - end)); | |
| 364 | 376 | DbUtils.closeQuietly(conn); |
| 365 | 377 | } catch (SQLException e) { |
| 366 | 378 | DbUtils.closeQuietly(conn); |
| 379 | + ExceptionUtils.catchException(e,"qhd his exception "); | |
| 367 | 380 | e.printStackTrace(); |
| 368 | 381 | } |
| 369 | 382 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java
View file @
dfdedc8
| ... | ... | @@ -1297,9 +1297,10 @@ |
| 1297 | 1297 | } |
| 1298 | 1298 | } |
| 1299 | 1299 | |
| 1300 | - puerperaQuery.setCardNo(param.getCardNo()); | |
| 1300 | + puerperaQuery.setPhoneOrCert(param.getCardNo()); | |
| 1301 | 1301 | } else if (param.getHospitalId() != null & !StringUtils.isEmpty(param.getVcCardNo())) { |
| 1302 | 1302 | |
| 1303 | + long start = System.currentTimeMillis(); | |
| 1303 | 1304 | BabyModelQuery babyQuery = new BabyModelQuery(); |
| 1304 | 1305 | babyQuery.setYn(YnEnums.YES.getId()); |
| 1305 | 1306 | babyQuery.setVcCardNo(param.getVcCardNo()); |
| 1306 | 1307 | |
| 1307 | 1308 | |
| ... | ... | @@ -1311,8 +1312,15 @@ |
| 1311 | 1312 | } |
| 1312 | 1313 | |
| 1313 | 1314 | babyQuery.setHospitalIdList(groupsFacade.findGroupHospital(userId,false)); |
| 1315 | + long end = System.currentTimeMillis(); | |
| 1314 | 1316 | |
| 1317 | + System.out.println("times1 === " + (end - start)); | |
| 1318 | + | |
| 1315 | 1319 | List<BabyModel> babyModels = babyBookbuildingService.queryBabyBuildByCond(babyQuery); |
| 1320 | + | |
| 1321 | + long end1 = System.currentTimeMillis(); | |
| 1322 | + | |
| 1323 | + System.out.println("times2 === "+( end1 -end)); | |
| 1316 | 1324 | if (CollectionUtils.isNotEmpty(babyModels)) { |
| 1317 | 1325 | BabyModel model = babyModels.get(0); |
| 1318 | 1326 | if (model != null) { |
| ... | ... | @@ -1384,7 +1392,11 @@ |
| 1384 | 1392 | } |
| 1385 | 1393 | } |
| 1386 | 1394 | |
| 1387 | - Patients patients = patientsService.findOnePatientByCardNo(puerperaQuery); | |
| 1395 | + Patients patients = null; | |
| 1396 | + if (StringUtils.isNotEmpty(puerperaQuery.getCardNo())) | |
| 1397 | + { | |
| 1398 | + patients = patientsService.findOnePatientByCardNo(puerperaQuery); | |
| 1399 | + } | |
| 1388 | 1400 | map.put("patients", patients); |
| 1389 | 1401 | map.put("records", results); |
| 1390 | 1402 | map.put("buildInfo", buildInfo == null ? null : getBabyBuildResult(buildInfo)); |
| ... | ... | @@ -2035,7 +2047,7 @@ |
| 2035 | 2047 | |
| 2036 | 2048 | BabyModelQuery babyQuery = new BabyModelQuery(); |
| 2037 | 2049 | babyQuery.setYn(YnEnums.YES.getId()); |
| 2038 | - babyQuery.setMcertNo(cardNo); | |
| 2050 | + babyQuery.setPhoneOrcardNo(cardNo); | |
| 2039 | 2051 | //获取最近一次的建档记录 |
| 2040 | 2052 | List<BabyModel> models = babyBookbuildingService.queryBabyBuildByCond(babyQuery); |
| 2041 | 2053 | if (CollectionUtils.isNotEmpty(models)) { |
| ... | ... | @@ -2060,7 +2072,7 @@ |
| 2060 | 2072 | |
| 2061 | 2073 | result.setFatherProfessionTypeId(babyModel.getFproTypeId()); |
| 2062 | 2074 | } else { |
| 2063 | - patientsQuery.setCardNo(cardNo); | |
| 2075 | + patientsQuery.setPhoneOrCert(cardNo); | |
| 2064 | 2076 | List<Patients> patients = yunBookbuildingService.queryPregnantWithQuery(patientsQuery); |
| 2065 | 2077 | if (CollectionUtils.isNotEmpty(patients)) { |
| 2066 | 2078 | Patients patient = patients.get(0); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyCheckFacade.java
View file @
dfdedc8
| ... | ... | @@ -108,6 +108,10 @@ |
| 108 | 108 | if (autoMatchFacade.checkBStatus(userId)) { |
| 109 | 109 | babyBookbuildingService.updateBaseData(bm); |
| 110 | 110 | } |
| 111 | + | |
| 112 | + babyCheckService.updateBabyCheckBirthByBuild(list.get(0)); | |
| 113 | + | |
| 114 | + | |
| 111 | 115 | } |
| 112 | 116 | updateLastGrowth(model); |
| 113 | 117 | |
| ... | ... | @@ -208,6 +212,7 @@ |
| 208 | 212 | List<BabyModel> babyModelList = babyBookbuildingService.queryBabyBuildByCond(babyModelQuery); |
| 209 | 213 | if (CollectionUtils.isNotEmpty(babyModelList)) { |
| 210 | 214 | model.setCheckMonth(DateUtil.getBabyAgeMonth(babyModelList.get(0).getBirth(), DateUtil.parseYMD(request.getCheckDate()))); |
| 215 | + model.setBirth(babyModelList.get(0).getBirth()); | |
| 211 | 216 | } |
| 212 | 217 | } |
| 213 | 218 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/utils/HiskCountTask.java
View file @
dfdedc8
| ... | ... | @@ -25,7 +25,7 @@ |
| 25 | 25 | */ |
| 26 | 26 | public class HiskCountTask implements Callable { |
| 27 | 27 | |
| 28 | - private static ExecutorService pool = Executors.newFixedThreadPool(4); | |
| 28 | + private static ExecutorService pool = Executors.newFixedThreadPool(6); | |
| 29 | 29 | |
| 30 | 30 | private PatientsService patientsService; |
| 31 | 31 | private BasicConfigService basicConfigService; |
| ... | ... | @@ -57,7 +57,7 @@ |
| 57 | 57 | |
| 58 | 58 | if (CollectionUtils.isNotEmpty(riskConfig)) { |
| 59 | 59 | |
| 60 | - int batchSize = 3; | |
| 60 | + int batchSize = 2; | |
| 61 | 61 | int end = 0; |
| 62 | 62 | List<Future> futures = new ArrayList<>(); |
| 63 | 63 | for (int i = 0; i < riskConfig.size(); i += batchSize) { |