Commit b38398ffedd77d2f7ae8bfb8093d000a692be4ac
1 parent
06759553e7
Exists in
master
and in
6 other branches
1
Showing 2 changed files with 29 additions and 1 deletions
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/ApplyOrderService.java
View file @
b38398f
... | ... | @@ -63,6 +63,10 @@ |
63 | 63 | iSieveApplyOrderDao.updateSieve(sieveApplyOrderModel); |
64 | 64 | } |
65 | 65 | |
66 | + public int queryCount(ReferralApplyOrderQuery babyQuery){ | |
67 | + return iReferralApplyOrderDao.count(babyQuery.convertToQuery()); | |
68 | + } | |
69 | + | |
66 | 70 | public void updateByParentId(ReferralApplyOrderQuery referralApplyOrderQuery, ReferralApplyOrderModel orderModel) { |
67 | 71 | iReferralApplyOrderDao.findAndModify(referralApplyOrderQuery.convertToQuery(), orderModel); |
68 | 72 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/TestController.java
View file @
b38398f
... | ... | @@ -1525,7 +1525,9 @@ |
1525 | 1525 | if (StringUtils.isNotEmpty(pat.getPid())) { |
1526 | 1526 | atFacade.updateLastRisk(pat.getId()); |
1527 | 1527 | } |
1528 | - patientRisk = patientsService.findOnePatientById(pat.getId()).getRiskFactorId(); | |
1528 | + Patients loa = patientsService.findOnePatientById(pat.getId()); | |
1529 | + patientRisk = loa | |
1530 | + .getRiskFactorId(); | |
1529 | 1531 | |
1530 | 1532 | if (CollectionUtils.isNotEmpty(patientRisk)) { |
1531 | 1533 | int modCount = doRiskHandle(patientRisk); |
... | ... | @@ -1606,6 +1608,23 @@ |
1606 | 1608 | } |
1607 | 1609 | |
1608 | 1610 | antExRecordModels.clear(); |
1611 | + | |
1612 | + ReferralApplyOrderQuery applyOrderQuery = new ReferralApplyOrderQuery(); | |
1613 | + applyOrderQuery.setParentId(pat.getId()); | |
1614 | + if (applyOrderService.queryCount(applyOrderQuery) > 0) { | |
1615 | + ReferralApplyOrderModel referralApplyOrderModel = new ReferralApplyOrderModel(); | |
1616 | + referralApplyOrderModel.setrRisk(Arrays.asList(commonService.resloveFactor(loa.getRiskFactorId()).split(","))); | |
1617 | + List lsit = new ArrayList(); | |
1618 | + List<Map> list = commonService.findRiskLevel(loa.getRiskLevelId()); | |
1619 | + for (Map<String, String> map : list) { | |
1620 | + String name = map.get("name"); | |
1621 | + if (!lsit.contains(name)) { | |
1622 | + lsit.add(name); | |
1623 | + } | |
1624 | + } | |
1625 | + referralApplyOrderModel.setrLevel(lsit); | |
1626 | + applyOrderService.updateByParentId(applyOrderQuery, referralApplyOrderModel); | |
1627 | + } | |
1609 | 1628 | } |
1610 | 1629 | } |
1611 | 1630 | } |
... | ... | @@ -1616,6 +1635,11 @@ |
1616 | 1635 | } |
1617 | 1636 | return "upateNewHighRisk finish"; |
1618 | 1637 | } |
1638 | + | |
1639 | + @Autowired | |
1640 | + private CommonService commonService; | |
1641 | + @Autowired | |
1642 | + private ApplyOrderService applyOrderService; | |
1619 | 1643 | |
1620 | 1644 | private int doRiskHandle(List<String> patientRisk) { |
1621 | 1645 | int modCount = 0; |