Commit fb71678541bcbd3514643f8c86500d9e4609dcd0
Exists in
master
and in
8 other branches
Merge remote-tracking branch 'origin/master'
Showing 18 changed files
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/AntenatalExaminationService.java
- platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/UsersServiceImpl.java
- platform-common/src/main/java/com/lyms/platform/common/enums/FyTypeEnums.java
- platform-dal/src/main/java/com/lyms/platform/pojo/HighRiskSmsModel.java
- platform-dal/src/main/java/com/lyms/platform/query/BabyModelQuery.java
- platform-dal/src/main/java/com/lyms/platform/query/HighRiskSmsQuery.java
- platform-data-api/src/main/java/com/lyms/platform/data/pojo/MessageContent.java
- platform-data-api/src/main/java/com/lyms/platform/data/service/impl/SmsServiceImpl.java
- platform-data-api/src/main/java/com/lyms/platform/data/util/AmsMessageService.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ApplyOrderFacade.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/CorrectDataFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/BabyApplyOrderResult.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/worker/CorrectDataWorker.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/worker/QuanPatientWorker.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/worker/WorkHR.java
- platform-operate-api/src/main/resources/config.properties
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/AntenatalExaminationService.java
View file @
fb71678
| ... | ... | @@ -142,5 +142,10 @@ |
| 142 | 142 | public List<AntenatalExaminationModel> queryYuyueAntenatalExamination(Date startDate,String hospitalId,String pid) { |
| 143 | 143 | return iAntenatalExaminationDao.queryYuyueAntenatalExamination(startDate, hospitalId,pid); |
| 144 | 144 | } |
| 145 | + | |
| 146 | + | |
| 147 | + public List<AntenatalExaminationModel> queryLastAntenatalExamination(MongoQuery query) { | |
| 148 | + return iAntenatalExaminationDao.queryAntenatalExamination(query.addOrder(Sort.Direction.DESC, "created")); | |
| 149 | + } | |
| 145 | 150 | } |
platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/UsersServiceImpl.java
View file @
fb71678
| ... | ... | @@ -28,16 +28,16 @@ |
| 28 | 28 | @Autowired |
| 29 | 29 | private ISyncDataDao iSyncDataDao; |
| 30 | 30 | |
| 31 | - private LoadingCache<Integer, Users> cached = null; | |
| 31 | +// private LoadingCache<Integer, Users> cached = null; | |
| 32 | 32 | |
| 33 | 33 | public UsersServiceImpl() { |
| 34 | 34 | //cache size 为400 缓存3分钟 |
| 35 | - cached = CacheHelper.cached(new CacheLoader<Integer, Users>() { | |
| 36 | - @Override | |
| 37 | - public Users load(Integer key) throws Exception { | |
| 38 | - return usersMapper.getUsers(key); | |
| 39 | - } | |
| 40 | - }, 400, 3); | |
| 35 | +// cached = CacheHelper.cached(new CacheLoader<Integer, Users>() { | |
| 36 | +// @Override | |
| 37 | +// public Users load(Integer key) throws Exception { | |
| 38 | +// return usersMapper.getUsers(key); | |
| 39 | +// } | |
| 40 | +// }, 400, 3); | |
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | |
| ... | ... | @@ -50,6 +50,9 @@ |
| 50 | 50 | @Override |
| 51 | 51 | public void updateUsers(Users obj) { |
| 52 | 52 | usersMapper.updateUsers(obj); |
| 53 | +// if(null!=obj.getId()){ | |
| 54 | +// cached.invalidate(obj.getId()); | |
| 55 | +// } | |
| 53 | 56 | iSyncDataDao.addSyncData("MysqlUpdate", obj, obj.getId().toString()); |
| 54 | 57 | } |
| 55 | 58 | |
| ... | ... | @@ -61,10 +64,10 @@ |
| 61 | 64 | |
| 62 | 65 | @Override |
| 63 | 66 | public Users getUsers(final Integer id) { |
| 64 | - try { | |
| 65 | - return cached.get(id); | |
| 66 | - }catch (Exception e){ | |
| 67 | - } | |
| 67 | +// try { | |
| 68 | +// return cached.get(id); | |
| 69 | +// }catch (Exception e){ | |
| 70 | +// } | |
| 68 | 71 | return usersMapper.getUsers(id); |
| 69 | 72 | } |
| 70 | 73 |
platform-common/src/main/java/com/lyms/platform/common/enums/FyTypeEnums.java
View file @
fb71678
| ... | ... | @@ -14,7 +14,7 @@ |
| 14 | 14 | */ |
| 15 | 15 | public enum FyTypeEnums { |
| 16 | 16 | |
| 17 | - FQ(0,"父亲"),MQ(1,"母亲"),ZF(2,"祖父"),ZM(3,"祖母"),WZF(4,"祖父"),WZM(5,"祖母"),QT(6,"其它"); | |
| 17 | + FQ(0,"父亲"),MQ(1,"母亲"),ZF(2,"祖父"),ZM(3,"祖母"),WZF(4,"外祖父"),WZM(5,"外祖母"),QT(6,"其它"); | |
| 18 | 18 | |
| 19 | 19 | private FyTypeEnums(int id, String name) { |
| 20 | 20 | this.id = id; |
platform-dal/src/main/java/com/lyms/platform/pojo/HighRiskSmsModel.java
View file @
fb71678
| ... | ... | @@ -33,6 +33,15 @@ |
| 33 | 33 | private Date modified; |
| 34 | 34 | |
| 35 | 35 | private String phone; |
| 36 | + private String messageId; | |
| 37 | + | |
| 38 | + public String getMessageId() { | |
| 39 | + return messageId; | |
| 40 | + } | |
| 41 | + | |
| 42 | + public void setMessageId(String messageId) { | |
| 43 | + this.messageId = messageId; | |
| 44 | + } | |
| 36 | 45 | |
| 37 | 46 | public String getId() { |
| 38 | 47 | return id; |
platform-dal/src/main/java/com/lyms/platform/query/BabyModelQuery.java
View file @
fb71678
| ... | ... | @@ -29,7 +29,7 @@ |
| 29 | 29 | |
| 30 | 30 | private String mphone; |
| 31 | 31 | private String mname; |
| 32 | - private String communityId; | |
| 32 | + private String communityId; | |
| 33 | 33 | |
| 34 | 34 | private Integer buildType; |
| 35 | 35 | |
| ... | ... | @@ -374,7 +374,6 @@ |
| 374 | 374 | @Override |
| 375 | 375 | public MongoQuery convertToQuery() { |
| 376 | 376 | MongoCondition condition = MongoCondition.newInstance(); |
| 377 | - boolean isAddStart = Boolean.FALSE; | |
| 378 | 377 | |
| 379 | 378 | if (-1 != visitstatus) { |
| 380 | 379 | condition = condition.and("visitstatus", visitstatus, MongoOper.IS); |
| 381 | 380 | |
| 382 | 381 | |
| 383 | 382 | |
| 384 | 383 | |
| 385 | 384 | |
| 386 | 385 | |
| 387 | 386 | |
| 388 | 387 | |
| ... | ... | @@ -391,38 +390,38 @@ |
| 391 | 390 | if (null != areaId) { |
| 392 | 391 | condition = condition.and("areaId", areaId, MongoOper.IS); |
| 393 | 392 | } |
| 394 | - if(null!=communityId){ | |
| 395 | - condition=condition.and("communityId",communityId,MongoOper.IS); | |
| 393 | + if (null != communityId) { | |
| 394 | + condition = condition.and("communityId", communityId, MongoOper.IS); | |
| 396 | 395 | } |
| 397 | - if(null!=isNull){ | |
| 398 | - condition=condition.and("communityId", null, MongoOper.IS); | |
| 396 | + if (null != isNull) { | |
| 397 | + condition = condition.and("communityId", null, MongoOper.IS); | |
| 399 | 398 | } |
| 400 | 399 | |
| 401 | - if(!StringUtils.isEmpty(mcertNo)){ | |
| 402 | - condition=condition.and("mcertNo", mcertNo, MongoOper.IS); | |
| 400 | + if (!StringUtils.isEmpty(mcertNo)) { | |
| 401 | + condition = condition.and("mcertNo", mcertNo, MongoOper.IS); | |
| 403 | 402 | } |
| 404 | - if(!StringUtils.isEmpty(cardNo)){ | |
| 405 | - condition=condition.and("cardNo", cardNo, MongoOper.IS); | |
| 403 | + if (!StringUtils.isEmpty(cardNo)) { | |
| 404 | + condition = condition.and("cardNo", cardNo, MongoOper.IS); | |
| 406 | 405 | } |
| 407 | 406 | |
| 408 | - if(!StringUtils.isEmpty(vcCardNo)){ | |
| 409 | - condition=condition.and("vcCardNo", vcCardNo, MongoOper.IS); | |
| 407 | + if (!StringUtils.isEmpty(vcCardNo)) { | |
| 408 | + condition = condition.and("vcCardNo", vcCardNo, MongoOper.IS); | |
| 410 | 409 | } |
| 411 | 410 | |
| 412 | - if(null!=hospitalId){ | |
| 413 | - condition=condition.and("hospitalId", hospitalId, MongoOper.IS); | |
| 411 | + if (null != hospitalId) { | |
| 412 | + condition = condition.and("hospitalId", hospitalId, MongoOper.IS); | |
| 414 | 413 | } |
| 415 | - if(!StringUtils.isEmpty(lastDiagnose)){ | |
| 416 | - condition=condition.and("lastDiagnose", lastDiagnose, MongoOper.IN); | |
| 414 | + if (!StringUtils.isEmpty(lastDiagnose)) { | |
| 415 | + condition = condition.and("lastDiagnose", lastDiagnose, MongoOper.IN); | |
| 417 | 416 | } |
| 418 | 417 | |
| 419 | - if(!StringUtils.isEmpty(phoneId) || !StringUtils.isEmpty(cardId)){ | |
| 418 | + if (!StringUtils.isEmpty(phoneId) || !StringUtils.isEmpty(cardId)) { | |
| 420 | 419 | MongoCondition con1 = MongoCondition.newInstance("phoneId", phoneId, MongoOper.LIKE); |
| 421 | 420 | MongoCondition con = MongoCondition.newInstance("cardId", cardId, MongoOper.LIKE); |
| 422 | 421 | condition = condition.orCondition(new MongoCondition[]{con1, con}); |
| 423 | 422 | } |
| 424 | 423 | |
| 425 | - if(null != buildTypeList) { | |
| 424 | + if (null != buildTypeList) { | |
| 426 | 425 | MongoCondition mongoCondition = MongoCondition.newInstance("buildType", 3, MongoOper.IS); |
| 427 | 426 | MongoCondition condition1 = mongoCondition.and("enable", "1", MongoOper.IS); |
| 428 | 427 | |
| 429 | 428 | |
| 430 | 429 | |
| 431 | 430 | |
| 432 | 431 | |
| 433 | 432 | |
| 434 | 433 | |
| ... | ... | @@ -431,32 +430,32 @@ |
| 431 | 430 | condition = condition.orCondition(new MongoCondition[]{condition1, condition2}); |
| 432 | 431 | } |
| 433 | 432 | |
| 434 | - if(null!=sex){ | |
| 435 | - condition=condition.and("sex", sex, MongoOper.IS); | |
| 433 | + if (null != sex) { | |
| 434 | + condition = condition.and("sex", sex, MongoOper.IS); | |
| 436 | 435 | } |
| 437 | 436 | |
| 438 | - if(null!=lastHighRisk){ | |
| 439 | - condition=condition.and("lastHighRisk", lastHighRisk, MongoOper.IS); | |
| 437 | + if (null != lastHighRisk) { | |
| 438 | + condition = condition.and("lastHighRisk", lastHighRisk, MongoOper.IS); | |
| 440 | 439 | } |
| 441 | 440 | |
| 442 | 441 | |
| 443 | - if(null!=serviceStatus){ | |
| 444 | - condition=condition.and("serviceStatus", serviceStatus, MongoOper.IS); | |
| 442 | + if (null != serviceStatus) { | |
| 443 | + condition = condition.and("serviceStatus", serviceStatus, MongoOper.IS); | |
| 445 | 444 | } |
| 446 | - if(null!=serviceType){ | |
| 447 | - condition=condition.and("serviceType", serviceType, MongoOper.IS); | |
| 445 | + if (null != serviceType) { | |
| 446 | + condition = condition.and("serviceType", serviceType, MongoOper.IS); | |
| 448 | 447 | } |
| 449 | 448 | |
| 450 | 449 | if (null != orServiceStatus && orServiceStatus.length > 1) { |
| 451 | - Criteria c = Criteria.where("serviceStatus").in(orServiceStatus[0],orServiceStatus[1]); | |
| 452 | - condition.andCondition( new MongoCondition(c)); | |
| 450 | + Criteria c = Criteria.where("serviceStatus").in(orServiceStatus[0], orServiceStatus[1]); | |
| 451 | + condition.andCondition(new MongoCondition(c)); | |
| 453 | 452 | } |
| 454 | 453 | |
| 455 | 454 | if (null != keyword) { |
| 456 | 455 | if (null != keyword) { |
| 457 | - MongoCondition con1 = MongoCondition.newInstance("mphone", "^"+keyword, MongoOper.LIKE); | |
| 456 | + MongoCondition con1 = MongoCondition.newInstance("mphone", "^" + keyword, MongoOper.LIKE); | |
| 458 | 457 | MongoCondition con |
| 459 | - = MongoCondition.newInstance("mname", "^"+keyword, MongoOper.LIKE); | |
| 458 | + = MongoCondition.newInstance("mname", "^" + keyword, MongoOper.LIKE); | |
| 460 | 459 | condition = condition.orCondition(new MongoCondition[]{con1, con}); |
| 461 | 460 | } |
| 462 | 461 | } |
| 463 | 462 | |
| ... | ... | @@ -492,10 +491,9 @@ |
| 492 | 491 | Criteria c = null; |
| 493 | 492 | if (null != birthStart) { |
| 494 | 493 | c = Criteria.where("birth").gte(birthStart); |
| 495 | - isAddStart = Boolean.TRUE; | |
| 496 | 494 | } |
| 497 | 495 | |
| 498 | - if (null != nextDateStart && nextDateEnd != null) { | |
| 496 | + if (null != nextDateStart && nextDateEnd != null) { | |
| 499 | 497 | |
| 500 | 498 | Criteria cr = Criteria.where("nextDate").gte(nextDateStart).lte(nextDateEnd); |
| 501 | 499 | condition.andCondition(new MongoCondition(cr)); |
| 502 | 500 | |
| 503 | 501 | |
| 504 | 502 | |
| ... | ... | @@ -503,22 +501,21 @@ |
| 503 | 501 | } |
| 504 | 502 | |
| 505 | 503 | if (null != gteModified && null != gteCreated) { |
| 506 | - MongoCondition mongoCondition = new MongoCondition("modified", gteModified, MongoOper.GTE); | |
| 504 | + MongoCondition mongoCondition = new MongoCondition("modified", gteModified, MongoOper.GTE); | |
| 507 | 505 | MongoCondition condition2 = new MongoCondition("created", gteCreated, MongoOper.GTE); |
| 508 | 506 | condition = condition.orCondition(new MongoCondition[]{mongoCondition, condition2}); |
| 509 | 507 | } |
| 510 | 508 | |
| 511 | 509 | if (null != birthEnd) { |
| 512 | - if (isAddStart) { | |
| 510 | + if (null != c) { | |
| 513 | 511 | c = c.lte(birthEnd); |
| 514 | 512 | } else { |
| 515 | 513 | c = Criteria.where("birth").lte(birthEnd); |
| 516 | 514 | } |
| 517 | - isAddStart = Boolean.TRUE; | |
| 518 | 515 | } |
| 519 | 516 | |
| 520 | 517 | |
| 521 | - if(null!=buildDateStart){ | |
| 518 | + if (null != buildDateStart) { | |
| 522 | 519 | if (null != c) { |
| 523 | 520 | c = c.and("buildDate").gte(buildDateStart); |
| 524 | 521 | } else { |
| ... | ... | @@ -526,7 +523,7 @@ |
| 526 | 523 | } |
| 527 | 524 | } |
| 528 | 525 | |
| 529 | - if(null!=buildDateEnd){ | |
| 526 | + if (null != buildDateEnd) { | |
| 530 | 527 | if (null != c) { |
| 531 | 528 | c = c.lte(buildDateEnd); |
| 532 | 529 | } else { |
| ... | ... | @@ -534,7 +531,7 @@ |
| 534 | 531 | } |
| 535 | 532 | } |
| 536 | 533 | |
| 537 | - if (isAddStart) { | |
| 534 | + if (c != null) { | |
| 538 | 535 | return new MongoCondition(c.andOperator(condition.getCriteria())).toMongoQuery(); |
| 539 | 536 | } |
| 540 | 537 | return condition.toMongoQuery(); |
platform-dal/src/main/java/com/lyms/platform/query/HighRiskSmsQuery.java
View file @
fb71678
| ... | ... | @@ -31,6 +31,16 @@ |
| 31 | 31 | |
| 32 | 32 | private String phone; |
| 33 | 33 | |
| 34 | + private String messageId; | |
| 35 | + | |
| 36 | + public String getMessageId() { | |
| 37 | + return messageId; | |
| 38 | + } | |
| 39 | + | |
| 40 | + public void setMessageId(String messageId) { | |
| 41 | + this.messageId = messageId; | |
| 42 | + } | |
| 43 | + | |
| 34 | 44 | @Override |
| 35 | 45 | public MongoQuery convertToQuery() { |
| 36 | 46 | MongoCondition condition = MongoCondition.newInstance(); |
| ... | ... | @@ -40,6 +50,8 @@ |
| 40 | 50 | |
| 41 | 51 | if (null != patientId) { |
| 42 | 52 | condition = condition.and("patientId", patientId, MongoOper.IS); |
| 53 | + } if (null != messageId) { | |
| 54 | + condition = condition.and("messageId", messageId, MongoOper.IS); | |
| 43 | 55 | } |
| 44 | 56 | if(null!=highId){ |
| 45 | 57 | condition=condition.and("highId",highId,MongoOper.IS); |
platform-data-api/src/main/java/com/lyms/platform/data/pojo/MessageContent.java
View file @
fb71678
| ... | ... | @@ -12,6 +12,16 @@ |
| 12 | 12 | private String content; |
| 13 | 13 | private String title; |
| 14 | 14 | private List<Tag> tags; |
| 15 | + private String highRiskId; | |
| 16 | + | |
| 17 | + public String getHighRiskId() { | |
| 18 | + return highRiskId; | |
| 19 | + } | |
| 20 | + | |
| 21 | + public void setHighRiskId(String highRiskId) { | |
| 22 | + this.highRiskId = highRiskId; | |
| 23 | + } | |
| 24 | + | |
| 15 | 25 | public String getId() { |
| 16 | 26 | return id; |
| 17 | 27 | } |
platform-data-api/src/main/java/com/lyms/platform/data/service/impl/SmsServiceImpl.java
View file @
fb71678
| ... | ... | @@ -95,54 +95,47 @@ |
| 95 | 95 | |
| 96 | 96 | if (CollectionUtils.isNotEmpty(configs)) |
| 97 | 97 | { |
| 98 | - for(SmsConfigModel config : configs) | |
| 99 | - { | |
| 98 | + for(SmsConfigModel config : configs) { | |
| 100 | 99 | String hospitalId = config.getHospitalId(); |
| 101 | - if (StringUtils.isEmpty(hospitalId)) | |
| 102 | - { | |
| 100 | + if (StringUtils.isEmpty(hospitalId)) { | |
| 103 | 101 | continue; |
| 104 | 102 | } |
| 105 | 103 | |
| 106 | 104 | //每周几发送的指导短信 |
| 107 | 105 | String timeStr = config.getGuideTime(); |
| 108 | - if (StringUtils.isEmpty(timeStr)) | |
| 109 | - { | |
| 106 | + if (StringUtils.isEmpty(timeStr)) { | |
| 110 | 107 | continue; |
| 111 | 108 | } |
| 112 | 109 | |
| 113 | 110 | List<String> guideTimes = JsonUtil.toList(timeStr, String.class); |
| 114 | - if (guideTimes == null || guideTimes.size() != 2) | |
| 115 | - { | |
| 111 | + if (guideTimes == null || guideTimes.size() != 2) { | |
| 116 | 112 | continue; |
| 117 | 113 | } |
| 118 | 114 | |
| 119 | 115 | //判断医院是否运行 |
| 120 | - if (!isRunning(hospitalId)) | |
| 121 | - { | |
| 116 | + if (!isRunning(hospitalId)) { | |
| 122 | 117 | continue; |
| 123 | 118 | } |
| 124 | 119 | |
| 125 | 120 | String strService = config.getSmsService(); |
| 126 | 121 | |
| 127 | 122 | //判断消息服务是否启动 |
| 128 | - boolean isStart = isStartService(SmsServiceEnums.YBZD.getId(),strService); | |
| 129 | - if (!isStart) | |
| 130 | - { | |
| 123 | + boolean isStart = isStartService(SmsServiceEnums.YBZD.getId(), strService); | |
| 124 | + if (!isStart) { | |
| 131 | 125 | continue; |
| 132 | 126 | } |
| 133 | 127 | |
| 134 | - //通过医院id先从缓存中取 如果没有取到就调用ams获取该医院短信 并保存到amsSmses中 | |
| 135 | - Map<String, List<MessageContent>> amsSmses = amsSmsCache.get(hospitalId); | |
| 136 | - if (amsSmses == null || amsSmses.size() == 0) | |
| 137 | - { | |
| 138 | - // 查询模板短信 从ams平台配置的短信通过医院ID | |
| 139 | - amsSmses = AmsMessageService | |
| 128 | + //通过医院id先从缓存中取 如果没有取到就调用ams获取该医院短信 并保存到amsSmses中 | |
| 129 | + Map<String, List<MessageContent>> amsSmses = amsSmsCache.get(hospitalId); | |
| 130 | + if (amsSmses == null || amsSmses.size() == 0) | |
| 131 | + { | |
| 132 | + // 查询模板短信 从ams平台配置的短信通过医院ID | |
| 133 | + amsSmses = AmsMessageService | |
| 140 | 134 | .getMessageTemplateMap(hospitalId, |
| 141 | 135 | AmsServiceTypeEnum.YUN_GUIDE); |
| 142 | - amsSmsCache.put(String.valueOf(hospitalId),amsSmses); | |
| 136 | + amsSmsCache.put(hospitalId,amsSmses); | |
| 137 | + } | |
| 143 | 138 | |
| 144 | - } | |
| 145 | - | |
| 146 | 139 | PatientsQuery patientsQuery = new PatientsQuery(); |
| 147 | 140 | patientsQuery.setYn(YnEnums.YES.getId()); |
| 148 | 141 | patientsQuery.setHospitalId(hospitalId); |
| 149 | 142 | |
| 150 | 143 | |
| 151 | 144 | |
| 152 | 145 | |
| 153 | 146 | |
| 154 | 147 | |
| 155 | 148 | |
| 156 | 149 | |
| 157 | 150 | |
| 158 | 151 | |
| 159 | 152 | |
| ... | ... | @@ -247,52 +240,73 @@ |
| 247 | 240 | List risks = findLastRisk(pat.getPid()); |
| 248 | 241 | if (CollectionUtils.isNotEmpty(risks)) |
| 249 | 242 | { |
| 243 | + List<MessageContent> highRiskContents = new ArrayList(); | |
| 244 | + //把多种高危因素的短信合并在一起 | |
| 250 | 245 | for (Object obj : risks) |
| 251 | 246 | { |
| 252 | 247 | Map<String,Object> riskMap = (Map<String,Object>)obj; |
| 253 | - | |
| 254 | - HighRiskSmsQuery hquery = new HighRiskSmsQuery(); | |
| 255 | - hquery.setHighId(String.valueOf(riskMap.get("id"))); | |
| 256 | - hquery.setPhone(pat.getPhone()); | |
| 257 | - hquery.setPatientId(pat.getId()); | |
| 258 | - int count = highRiskService.queryHighRiskCount(hquery); | |
| 259 | - if (count > 0) | |
| 260 | - { | |
| 261 | - continue; | |
| 262 | - } | |
| 263 | - | |
| 264 | 248 | String name = String.valueOf(riskMap.get("name")); |
| 265 | 249 | List<MessageContent> messageContents = amsSmses.get(name); |
| 266 | 250 | if (CollectionUtils.isNotEmpty(messageContents)) |
| 267 | 251 | { |
| 268 | 252 | for (MessageContent message : messageContents) |
| 269 | 253 | { |
| 270 | - String messageContent = "【"+messagePrefix+"】" + message.getContent(); | |
| 254 | + message.setHighRiskId(String.valueOf(riskMap.get("id"))); | |
| 255 | + } | |
| 256 | + highRiskContents.addAll(messageContents); | |
| 257 | + } | |
| 271 | 258 | |
| 272 | - MessageRequest request = getMessageRequest( messageContent,pat.getPhone(),ServiceObjEnums.YUNOBJ.getId(), SmsServiceEnums.GWZD.getId(), | |
| 273 | - pat.getHospitalId(),message.getId(),pat.getId()); | |
| 259 | + } | |
| 260 | + if (CollectionUtils.isNotEmpty(highRiskContents)) | |
| 261 | + { | |
| 262 | + //可以发送的高危短信 | |
| 263 | + List<MessageContent> sendMessageContents = new ArrayList<>(); | |
| 274 | 264 | |
| 265 | + for (MessageContent message : highRiskContents) | |
| 266 | + { | |
| 267 | + | |
| 268 | + HighRiskSmsQuery hquery = new HighRiskSmsQuery(); | |
| 269 | + hquery.setMessageId(message.getId()); | |
| 270 | + hquery.setHighId(message.getHighRiskId()); | |
| 271 | + hquery.setPhone(pat.getPhone()); | |
| 272 | + hquery.setPatientId(pat.getId()); | |
| 273 | + | |
| 274 | + int count = highRiskService.queryHighRiskCount(hquery); | |
| 275 | + if (count > 0) | |
| 276 | + { | |
| 277 | + continue; | |
| 278 | + } | |
| 279 | + //把未发送过的添加到集合中 | |
| 280 | + sendMessageContents.add(message); | |
| 281 | + } | |
| 282 | + | |
| 283 | + if (CollectionUtils.isNotEmpty(sendMessageContents)) { | |
| 284 | + | |
| 285 | + //根据集合的长度随机一个数字 | |
| 286 | + int index = (int)(Math.random()*sendMessageContents.size()); | |
| 287 | + | |
| 288 | + //从集合中随机取一个发送 | |
| 289 | + MessageContent message =sendMessageContents.get(index); | |
| 290 | + String messageContent = "【" + messagePrefix + "】" + message.getContent(); | |
| 291 | + MessageRequest request = getMessageRequest(messageContent, pat.getPhone(), ServiceObjEnums.YUNOBJ.getId(), SmsServiceEnums.GWZD.getId(), | |
| 292 | + pat.getHospitalId(), message.getId(), pat.getId()); | |
| 275 | 293 | messages.add(request); |
| 276 | - isRisk = true; | |
| 277 | 294 | |
| 278 | - HighRiskSmsModel highRiskSmsModel = new HighRiskSmsModel(); | |
| 295 | + HighRiskSmsModel highRiskSmsModel = new HighRiskSmsModel(); | |
| 279 | 296 | highRiskSmsModel.setPatientId(pat.getId()); |
| 280 | - highRiskSmsModel.setHighId(String.valueOf(riskMap.get("id"))); | |
| 297 | + highRiskSmsModel.setHighId(message.getHighRiskId()); | |
| 281 | 298 | highRiskSmsModel.setPhone(pat.getPhone()); |
| 282 | 299 | highRiskSmsModel.setHospitalId(pat.getHospitalId()); |
| 283 | 300 | highRiskSmsModel.setCreated(new Date()); |
| 284 | 301 | highRiskSmsModel.setModified(new Date()); |
| 302 | + highRiskSmsModel.setMessageId(message.getId()); | |
| 285 | 303 | highRiskService.addHighRiskSmsModel(highRiskSmsModel); |
| 286 | 304 | |
| 287 | - break; | |
| 288 | - } | |
| 305 | + isRisk = true; | |
| 289 | 306 | |
| 290 | - if (isRisk) | |
| 291 | - { | |
| 292 | - break; | |
| 293 | 307 | } |
| 294 | 308 | } |
| 295 | - } | |
| 309 | + | |
| 296 | 310 | } |
| 297 | 311 | } |
| 298 | 312 | |
| ... | ... | @@ -309,7 +323,7 @@ |
| 309 | 323 | { |
| 310 | 324 | for(MessageContent message : messageContents) |
| 311 | 325 | { |
| 312 | -// //判断当前短信是否已经发送 通过短信ID和孕妇ID | |
| 326 | + //判断当前短信是否已经发送 通过短信ID和孕妇ID | |
| 313 | 327 | boolean isExist = SaveMessageService.isExistSms(pat.getId(), message.getId()); |
| 314 | 328 | if (isExist) |
| 315 | 329 | { |
| ... | ... | @@ -712,6 +726,9 @@ |
| 712 | 726 | continue; |
| 713 | 727 | } |
| 714 | 728 | |
| 729 | + try { | |
| 730 | + | |
| 731 | + | |
| 715 | 732 | //循环每一个模板,根据模板条件查询到用户 发送短信 |
| 716 | 733 | for (SmsTemplateModel template : templates) |
| 717 | 734 | { |
| 718 | 735 | |
| ... | ... | @@ -1806,12 +1823,15 @@ |
| 1806 | 1823 | sendSms(list); |
| 1807 | 1824 | } |
| 1808 | 1825 | } |
| 1809 | - | |
| 1826 | + } | |
| 1827 | + catch (Exception e) | |
| 1828 | + { | |
| 1829 | + System.out.println("模板生成异常"+e); | |
| 1830 | + e.printStackTrace(); | |
| 1831 | + continue; | |
| 1832 | + } | |
| 1810 | 1833 | } |
| 1811 | 1834 | } |
| 1812 | - | |
| 1813 | - | |
| 1814 | - | |
| 1815 | 1835 | for (MessageRequest msg :allMsgs) |
| 1816 | 1836 | { |
| 1817 | 1837 | System.out.println("=======" + msg.getContent()); |
| ... | ... | @@ -2218,6 +2238,18 @@ |
| 2218 | 2238 | for (AntenatalExaminationModel f : fuzs) |
| 2219 | 2239 | { |
| 2220 | 2240 | idset.add(f.getId()); //这里的id就是parentid |
| 2241 | +// AntExQuery antExQuery = new AntExQuery(); | |
| 2242 | +// antExQuery.setYn(YnEnums.YES.getId()); | |
| 2243 | +// antExQuery.setParentId(f.getId()); | |
| 2244 | +// | |
| 2245 | +// List<AntenatalExaminationModel> list = antenatalExaminationService.queryLastAntenatalExamination(antExQuery.convertToQuery()); | |
| 2246 | +// if (CollectionUtils.isNotEmpty(list)) | |
| 2247 | +// { | |
| 2248 | +// if (list.get(0).getNextCheckTime() != null) | |
| 2249 | +// { | |
| 2250 | +// idset.add(f.getId()); //这里的id就是parentid | |
| 2251 | +// } | |
| 2252 | +// } | |
| 2221 | 2253 | } |
| 2222 | 2254 | return idset; |
| 2223 | 2255 | } |
| ... | ... | @@ -2263,7 +2295,20 @@ |
| 2263 | 2295 | |
| 2264 | 2296 | for (AntenatalExaminationModel f : fuzs) |
| 2265 | 2297 | { |
| 2266 | - idset.add(f.getParentId()); | |
| 2298 | + idset.add(f.getId()); //这里的id就是parentid | |
| 2299 | + | |
| 2300 | +// AntExQuery antExQuery = new AntExQuery(); | |
| 2301 | +// antExQuery.setYn(YnEnums.YES.getId()); | |
| 2302 | +// antExQuery.setParentId(f.getId()); | |
| 2303 | +// | |
| 2304 | +// List<AntenatalExaminationModel> list = antenatalExaminationService.queryLastAntenatalExamination(antExQuery.convertToQuery()); | |
| 2305 | +// if (CollectionUtils.isNotEmpty(list)) | |
| 2306 | +// { | |
| 2307 | +// if (list.get(0).getNextCheckTime() != null) | |
| 2308 | +// { | |
| 2309 | +// idset.add(f.getId()); //这里的id就是parentid | |
| 2310 | +// } | |
| 2311 | +// } | |
| 2267 | 2312 | } |
| 2268 | 2313 | return idset.size() > 0; |
| 2269 | 2314 | } |
platform-data-api/src/main/java/com/lyms/platform/data/util/AmsMessageService.java
View file @
fb71678
| ... | ... | @@ -82,13 +82,13 @@ |
| 82 | 82 | params.put("limit", "9999"); |
| 83 | 83 | String str = HttpRequest.sendGet(AMS_URL, |
| 84 | 84 | params, headers); |
| 85 | - System.out.println(str); | |
| 85 | +// System.out.println(str); | |
| 86 | 86 | ObjectMapper om = new ObjectMapper(); |
| 87 | 87 | MessageResponseEntity mre = null; |
| 88 | 88 | Map<String,List<MessageContent>> map = new HashMap<String, List<MessageContent>>(); |
| 89 | 89 | try { |
| 90 | 90 | mre = om.readValue(str, MessageResponseEntity.class); |
| 91 | - System.out.println(mre); | |
| 91 | +// System.out.println(mre); | |
| 92 | 92 | } catch (JsonParseException e) { |
| 93 | 93 | e.printStackTrace(); |
| 94 | 94 | } catch (JsonMappingException e) { |
| ... | ... | @@ -124,8 +124,9 @@ |
| 124 | 124 | } |
| 125 | 125 | } |
| 126 | 126 | }else{//失败 |
| 127 | - logger.error("error info :errorcode="+mre.getErrorcode() | |
| 128 | - +" errormsg="+mre.getErrormsg()); | |
| 127 | + System.out.println("hospitalId="+hospitalId+"---"+mre); | |
| 128 | + logger.error("error info :errorcode=" + mre.getErrorcode() | |
| 129 | + + " errormsg=" + mre.getErrormsg()); | |
| 129 | 130 | } |
| 130 | 131 | }else{ |
| 131 | 132 | logger.error("接口调用失败!!!"); |
| ... | ... | @@ -182,8 +183,18 @@ |
| 182 | 183 | |
| 183 | 184 | |
| 184 | 185 | public static void main(String[] args) { |
| 185 | -// getMessageTemplateMap("8be01f59-ad25-4ae6-968d-8450c9421e0b", | |
| 186 | -// AmsServiceTypeEnum.CHILD_GUIDE); | |
| 186 | + Map<String,List<MessageContent>> list = getMessageTemplateMap("221", | |
| 187 | + AmsServiceTypeEnum.CHILD_GUIDE); | |
| 188 | + | |
| 189 | + List<MessageContent> msgs = list.get("甲亢"); | |
| 190 | + | |
| 191 | + System.out.println(msgs); | |
| 192 | + | |
| 193 | +// for (int i = 0;i< 100 ;i++) | |
| 194 | +// { | |
| 195 | +// int index = (int)(Math.random()*8); | |
| 196 | +// System.out.println(index); | |
| 197 | +// } | |
| 187 | 198 | |
| 188 | 199 | // String result = "头:9.5|胸:10.0|腹:10.0"; |
| 189 | 200 | // String b = ""; |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java
View file @
fb71678
| ... | ... | @@ -67,7 +67,7 @@ |
| 67 | 67 | */ |
| 68 | 68 | private void setLashCTimes(String hospitalId, String id, int type) { |
| 69 | 69 | |
| 70 | - Patients patients = patientsService.findOnePatientById(id); | |
| 70 | + /* Patients patients = patientsService.findOnePatientById(id); | |
| 71 | 71 | List<Date> list = new ArrayList<>(); |
| 72 | 72 | if (type == 2) { |
| 73 | 73 | AntExQuery antExQuery = new AntExQuery(); |
| 74 | 74 | |
| 75 | 75 | |
| ... | ... | @@ -91,24 +91,28 @@ |
| 91 | 91 | list.add(antEx.getCheckTime()); |
| 92 | 92 | } |
| 93 | 93 | } |
| 94 | - } | |
| 95 | - | |
| 96 | - if (CollectionUtils.isNotEmpty(list)) { | |
| 97 | - Collections.sort(list, new Comparator<Date>() { | |
| 98 | - @Override | |
| 99 | - public int compare(Date o1, Date o2) { | |
| 100 | - if (o1 != null && o1.after(o2)) { | |
| 101 | - return -1; | |
| 102 | - } | |
| 103 | - if (o1 != null && o1.before(o2)) { | |
| 104 | - return 1; | |
| 105 | - } | |
| 106 | - return 0; | |
| 94 | + }*/ | |
| 95 | + AntExQuery antExQuery = new AntExQuery(); | |
| 96 | + antExQuery.setParentId(id); | |
| 97 | + antExQuery.setYn(YnEnums.YES.getId()); | |
| 98 | + Date date=null; | |
| 99 | + List<AntenatalExaminationModel> antEx = antenatalExaminationService.queryAntenatalExamination(antExQuery.convertToQuery().addOrder(Sort.Direction.DESC, "checkDate")); | |
| 100 | + if (CollectionUtils.isNotEmpty(antEx)) { | |
| 101 | + date= antEx.get(0).getCheckDate(); | |
| 102 | + } else { | |
| 103 | + AntExChuQuery antExChuQuery = new AntExChuQuery(); | |
| 104 | + antExChuQuery.setParentId(id); | |
| 105 | + antExChuQuery.setYn(YnEnums.YES.getId()); | |
| 106 | + List<AntExChuModel> antExChu = antenatalExaminationService.queryAntExChu(antExChuQuery); | |
| 107 | + if (CollectionUtils.isNotEmpty(antExChu)) { | |
| 108 | + date= antExChu.get(0).getCheckTime(); | |
| 107 | 109 | } |
| 108 | - }); | |
| 110 | + } | |
| 111 | + | |
| 112 | + if (null!=date) { | |
| 109 | 113 | Patients patients1 = new Patients(); |
| 110 | - patients1.setLastCTime(list.get(0)); | |
| 111 | - patients1.setId(patients.getId()); | |
| 114 | + patients1.setLastCTime(date); | |
| 115 | + patients1.setId(id); | |
| 112 | 116 | patientsService.updatePatient(patients1); |
| 113 | 117 | } |
| 114 | 118 | } |
| ... | ... | @@ -131,9 +135,6 @@ |
| 131 | 135 | |
| 132 | 136 | Patients patients = patientsService.findOnePatientById(antExAddRequest.getParentId()); |
| 133 | 137 | |
| 134 | - //修改最后一次检查时间 | |
| 135 | - setLashCTimes(hospitalId, antExAddRequest.getParentId(), 2); | |
| 136 | - | |
| 137 | 138 | patients.setLastCheckEmployeeId(antExAddRequest.getCheckDoctor()); |
| 138 | 139 | |
| 139 | 140 | patientsService.updatePatient(patients); |
| ... | ... | @@ -142,6 +143,8 @@ |
| 142 | 143 | |
| 143 | 144 | //修改本院最后一次定义高危 |
| 144 | 145 | updateLastRhTime(patients.getId(), hospitalId); |
| 146 | + //修改最后一次检查时间 | |
| 147 | + setLashCTimes(hospitalId, antExAddRequest.getParentId(), 2); | |
| 145 | 148 | } else { |
| 146 | 149 | AntenatalExaminationModel model = antExAddRequest.convertToDataModel(); |
| 147 | 150 | model.setOperator(userId); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ApplyOrderFacade.java
View file @
fb71678
| ... | ... | @@ -446,7 +446,12 @@ |
| 446 | 446 | referralApplyOrderQuery.setServiceType(applyOrderQueryRequest.getServiceType()); |
| 447 | 447 | String hospital = autoMatchFacade.getHospitalId(userId); |
| 448 | 448 | referralApplyOrderQuery.setHospitalId(hospital); |
| 449 | - referralApplyOrderQuery.setHospitalName(organizationService.getOrganization(Integer.valueOf(hospital)).getName()); | |
| 449 | + if (null != hospital) { | |
| 450 | + Organization org = organizationService.getOrganization(Integer.valueOf(hospital)); | |
| 451 | + if (null != org) { | |
| 452 | + referralApplyOrderQuery.setHospitalName(org.getName()); | |
| 453 | + } | |
| 454 | + } | |
| 450 | 455 | //1 转入 0转出 |
| 451 | 456 | if ("1".equals(applyOrderQueryRequest.getAction())) { |
| 452 | 457 | referralApplyOrderQuery.setTransferredHospital(hospital); |
| ... | ... | @@ -552,6 +557,18 @@ |
| 552 | 557 | } |
| 553 | 558 | } |
| 554 | 559 | babyApplyOrderResult.convert(applyOrderModel, zhuanCName, zhuanRname); |
| 560 | + | |
| 561 | + BabyModel babyModel = babyService.getOneBabyById(applyOrderModel.getParentId()); | |
| 562 | + if (null != babyModel) { | |
| 563 | + babyApplyOrderResult.setVcCardNo(babyModel.getVcCardNo()); | |
| 564 | + if (StringUtils.isNotEmpty(babyModel.getParentId())) { | |
| 565 | + Patients patients = patientsService.findOnePatientById(babyModel.getParentId()); | |
| 566 | + if (null != patients) { | |
| 567 | + babyApplyOrderResult.setmCardNo(patients.getCardNo()); | |
| 568 | + } | |
| 569 | + } | |
| 570 | + } | |
| 571 | + | |
| 555 | 572 | String diagnose = ""; |
| 556 | 573 | if (CollectionUtils.isNotEmpty(diagnoseList)) { |
| 557 | 574 | diagnose = ""; |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java
View file @
fb71678
| ... | ... | @@ -1585,10 +1585,17 @@ |
| 1585 | 1585 | if(org.apache.commons.lang.StringUtils.isNotEmpty(request.getDateRange())){ |
| 1586 | 1586 | String[] dates = request.getDateRange().split(" - "); |
| 1587 | 1587 | babyQuery.setBuildDateStart(DateUtil.parseYMD(dates[0])); |
| 1588 | - babyQuery.setBuildDateEnd(DateUtil.parseYMD(dates[1])); | |
| 1588 | + if(dates.length>=2){ | |
| 1589 | + Date date= DateUtil.parseYMD(dates[1]); | |
| 1590 | + if(dates[0].equals(dates[1])){ | |
| 1591 | + long d = DateUtil.parseYMD(dates[1]).getTime() + 86398000; | |
| 1592 | + date = new Date(d); | |
| 1593 | + } | |
| 1594 | + babyQuery.setBuildDateEnd(date); | |
| 1595 | + } | |
| 1589 | 1596 | } |
| 1590 | 1597 | |
| 1591 | - List<BabyModel> models = babyBookbuildingService.queryBabyBuildByCond(babyQuery); | |
| 1598 | + List<BabyModel> models = babyBookbuildingService.queryBabyBuildByCond(babyQuery, "modified", Sort.Direction.DESC); | |
| 1592 | 1599 | |
| 1593 | 1600 | return models; |
| 1594 | 1601 | } |
| ... | ... | @@ -1792,7 +1799,7 @@ |
| 1792 | 1799 | if (CollectionUtils.isNotEmpty(models)) { |
| 1793 | 1800 | for (BabyModel model : models) { |
| 1794 | 1801 | Map<String, Object> data = new HashMap<>(); |
| 1795 | - if (model.getHighRisk() == null || model.getHighRisk() == 0) { | |
| 1802 | + if (model.getLastHighRisk() == null || model.getLastHighRisk() == 0) { | |
| 1796 | 1803 | data.put("highRisk", "健康"); |
| 1797 | 1804 | } else { |
| 1798 | 1805 | data.put("highRisk", "高危"); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/CorrectDataFacade.java
View file @
fb71678
| ... | ... | @@ -54,16 +54,14 @@ |
| 54 | 54 | if(CollectionUtils.isNotEmpty(patientses)){ |
| 55 | 55 | int batchSize = 400; |
| 56 | 56 | int end = 0; |
| 57 | - CountDownLatch countDownLatch=new CountDownLatch(patientses.size()); | |
| 58 | 57 | java.util.concurrent.atomic.AtomicLong counter=new AtomicLong(); |
| 59 | 58 | for (int i = 0; i < patientses.size(); i += batchSize) { |
| 60 | 59 | end = (end + batchSize); |
| 61 | 60 | if (end > patientses.size()) { |
| 62 | 61 | end = patientses.size(); |
| 63 | 62 | } |
| 64 | - threadPoolExecutor.submit(new CorrectDataWorker(patientses.subList(i, end),postReviewService,patientsService,anExService,antExFacade,countDownLatch,counter)); | |
| 63 | + threadPoolExecutor.submit(new CorrectDataWorker(patientses.subList(i, end),postReviewService,patientsService,anExService,antExFacade,counter)); | |
| 65 | 64 | } |
| 66 | - countDownLatch.await(); | |
| 67 | 65 | logger.info("hand hospitalId :" +hospitalId+", update count "+counter.get()); |
| 68 | 66 | } |
| 69 | 67 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/BabyApplyOrderResult.java
View file @
fb71678
| ... | ... | @@ -17,6 +17,11 @@ |
| 17 | 17 | public static final String SPIT = "-"; |
| 18 | 18 | private String id; |
| 19 | 19 | private String pid; |
| 20 | + //母亲身份证 | |
| 21 | + private String mCardNo; | |
| 22 | + //儿童就诊卡 | |
| 23 | + private String vcCardNo; | |
| 24 | + | |
| 20 | 25 | //名字 |
| 21 | 26 | private String name; |
| 22 | 27 | //高危转诊 |
| ... | ... | @@ -72,6 +77,22 @@ |
| 72 | 77 | return SPIT; |
| 73 | 78 | } |
| 74 | 79 | return recDoctor; |
| 80 | + } | |
| 81 | + | |
| 82 | + public String getmCardNo() { | |
| 83 | + return mCardNo; | |
| 84 | + } | |
| 85 | + | |
| 86 | + public void setmCardNo(String mCardNo) { | |
| 87 | + this.mCardNo = mCardNo; | |
| 88 | + } | |
| 89 | + | |
| 90 | + public String getVcCardNo() { | |
| 91 | + return vcCardNo; | |
| 92 | + } | |
| 93 | + | |
| 94 | + public void setVcCardNo(String vcCardNo) { | |
| 95 | + this.vcCardNo = vcCardNo; | |
| 75 | 96 | } |
| 76 | 97 | |
| 77 | 98 | public void setRecDoctor(String recDoctor) { |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/worker/CorrectDataWorker.java
View file @
fb71678
| ... | ... | @@ -37,24 +37,20 @@ |
| 37 | 37 | |
| 38 | 38 | private List<Patients> patientses; |
| 39 | 39 | |
| 40 | - private CountDownLatch countDownLatch; | |
| 40 | + private java.util.concurrent.atomic.AtomicLong counter; | |
| 41 | 41 | |
| 42 | - private java.util.concurrent.atomic.AtomicLong counter; | |
| 43 | - | |
| 44 | 42 | public CorrectDataWorker(List<Patients> patientses, |
| 45 | 43 | PostReviewService postReviewService, |
| 46 | 44 | PatientsService patientsService, |
| 47 | 45 | AntenatalExaminationService antExService, |
| 48 | 46 | AntenatalExaminationFacade antExFacade, |
| 49 | - CountDownLatch countDownLatch, | |
| 50 | - java.util.concurrent.atomic.AtomicLong counter) { | |
| 47 | + java.util.concurrent.atomic.AtomicLong counter) { | |
| 51 | 48 | this.patientses = patientses; |
| 52 | 49 | this.patientsService = patientsService; |
| 53 | 50 | this.postReviewService = postReviewService; |
| 54 | - this.antExService=antExService; | |
| 55 | - this.antExFacade=antExFacade; | |
| 56 | - this.countDownLatch=countDownLatch; | |
| 57 | - this.counter=counter; | |
| 51 | + this.antExService = antExService; | |
| 52 | + this.antExFacade = antExFacade; | |
| 53 | + this.counter = counter; | |
| 58 | 54 | } |
| 59 | 55 | |
| 60 | 56 | @Override |
| 61 | 57 | |
| ... | ... | @@ -66,11 +62,11 @@ |
| 66 | 62 | //本院产后复查次数 |
| 67 | 63 | //Integer postViewTimes; |
| 68 | 64 | try { |
| 69 | - for(Patients patients:patientses){ | |
| 70 | - Patients patients1=new Patients(); | |
| 65 | + for (Patients patients : patientses) { | |
| 66 | + Patients patients1 = new Patients(); | |
| 71 | 67 | patients1.setId(patients.getId()); |
| 72 | 68 | //产后复查次数 |
| 73 | - PostReviewQuery postReviewQuery=new PostReviewQuery(); | |
| 69 | + PostReviewQuery postReviewQuery = new PostReviewQuery(); | |
| 74 | 70 | postReviewQuery.setHospitalId(patients.getHospitalId()); |
| 75 | 71 | postReviewQuery.setYn(YnEnums.YES.getId()); |
| 76 | 72 | postReviewQuery.setParentId(patients.getId()); |
| 77 | 73 | |
| 78 | 74 | |
| 79 | 75 | |
| 80 | 76 | |
| ... | ... | @@ -81,34 +77,32 @@ |
| 81 | 77 | |
| 82 | 78 | patientsService.updatePatient(patients1); |
| 83 | 79 | //修改最后一次定义高危时间 |
| 84 | - antExFacade.updateLastRhTime(patients.getId(),patients.getHospitalId()); | |
| 80 | + antExFacade.updateLastRhTime(patients.getId(), patients.getHospitalId()); | |
| 85 | 81 | //修改高危 |
| 86 | 82 | antExFacade.updateLastRisk(patients.getId()); |
| 87 | 83 | |
| 88 | 84 | counter.incrementAndGet(); |
| 89 | 85 | } |
| 90 | - }catch (Exception e){ | |
| 91 | - ExceptionUtils.catchException(e,"CorrectDataWorker Error."); | |
| 92 | - }finally { | |
| 93 | - countDownLatch.countDown(); | |
| 86 | + } catch (Exception e) { | |
| 87 | + ExceptionUtils.catchException(e, "CorrectDataWorker Error."); | |
| 94 | 88 | } |
| 95 | 89 | } |
| 96 | 90 | |
| 97 | 91 | |
| 98 | - private Date findLastCTime(String id){ | |
| 99 | - AntExQuery antExQuery=new AntExQuery(); | |
| 92 | + private Date findLastCTime(String id) { | |
| 93 | + AntExQuery antExQuery = new AntExQuery(); | |
| 100 | 94 | antExQuery.setParentId(id); |
| 101 | 95 | antExQuery.setYn(YnEnums.YES.getId()); |
| 102 | 96 | |
| 103 | - List<AntenatalExaminationModel> antEx= antExService.queryAntenatalExamination(antExQuery.convertToQuery().addOrder(Sort.Direction.DESC, "checkDate")); | |
| 104 | - if(CollectionUtils.isNotEmpty(antEx)){ | |
| 105 | - return antEx.get(0).getCheckDate(); | |
| 106 | - }else{ | |
| 107 | - AntExChuQuery antExChuQuery=new AntExChuQuery(); | |
| 97 | + List<AntenatalExaminationModel> antEx = antExService.queryAntenatalExamination(antExQuery.convertToQuery().addOrder(Sort.Direction.DESC, "checkDate")); | |
| 98 | + if (CollectionUtils.isNotEmpty(antEx)) { | |
| 99 | + return antEx.get(0).getCheckDate(); | |
| 100 | + } else { | |
| 101 | + AntExChuQuery antExChuQuery = new AntExChuQuery(); | |
| 108 | 102 | antExChuQuery.setParentId(id); |
| 109 | 103 | antExChuQuery.setYn(YnEnums.YES.getId()); |
| 110 | - List<AntExChuModel> antExChu= antExService.queryAntExChu(antExChuQuery); | |
| 111 | - if(CollectionUtils.isNotEmpty(antExChu)){ | |
| 104 | + List<AntExChuModel> antExChu = antExService.queryAntExChu(antExChuQuery); | |
| 105 | + if (CollectionUtils.isNotEmpty(antExChu)) { | |
| 112 | 106 | return antExChu.get(0).getCheckTime(); |
| 113 | 107 | } |
| 114 | 108 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/worker/QuanPatientWorker.java
View file @
fb71678
| ... | ... | @@ -168,7 +168,7 @@ |
| 168 | 168 | } |
| 169 | 169 | Patients patients1=new Patients(); |
| 170 | 170 | patients1.setId(patients.getId()); |
| 171 | - patients1.setLastCTime(list.get(0).getNextCheckTime()); | |
| 171 | + patients1.setLastCTime(list.get(0).getCheckTime()); | |
| 172 | 172 | patientsService.updatePatient(patients1); |
| 173 | 173 | } |
| 174 | 174 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/worker/WorkHR.java
View file @
fb71678
| ... | ... | @@ -155,7 +155,7 @@ |
| 155 | 155 | } |
| 156 | 156 | Patients patients1=new Patients(); |
| 157 | 157 | patients1.setId(patients.getId()); |
| 158 | - patients1.setLastCTime(list.get(0).getNextCheckTime()); | |
| 158 | + patients1.setLastCTime(list.get(0).getCheckTime()); | |
| 159 | 159 | patientsService.updatePatient(patients1); |
| 160 | 160 | } |
| 161 | 161 | } |
platform-operate-api/src/main/resources/config.properties
View file @
fb71678