Commit 77de259f228876a3008fb98cf9f1fb292ccf72ae
1 parent
3f65a7d59b
Exists in
luanping
and in
1 other branch
解决小程序录入复诊时,PC更改,小程序不更新问题
Showing 1 changed file with 18 additions and 8 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntExRecordFacade.java
View file @
77de259
... | ... | @@ -1770,6 +1770,13 @@ |
1770 | 1770 | fhrList.add(s); |
1771 | 1771 | } |
1772 | 1772 | } |
1773 | + List<String> riskFactorlist = new ArrayList<>(); | |
1774 | + if(StringUtils.isNotEmpty(riskFactor)){ | |
1775 | + String[] split = riskFactor.split(","); | |
1776 | + for(String s : split){ | |
1777 | + riskFactorlist.add(s); | |
1778 | + } | |
1779 | + } | |
1773 | 1780 | if (StringUtils.isNotEmpty(pid) && StringUtils.isNotEmpty(hospitalId)) { |
1774 | 1781 | if (isOpenAutoSaveAntenatal(hospitalId)) { |
1775 | 1782 | |
... | ... | @@ -1803,13 +1810,8 @@ |
1803 | 1810 | |
1804 | 1811 | model.setCheckDoctor(doctorId); |
1805 | 1812 | model.setEdema(edema); |
1806 | - if(StringUtils.isNotEmpty(riskFactor)){ | |
1807 | - String[] split = riskFactor.split(","); | |
1808 | - List<String> list = new ArrayList<>(); | |
1809 | - for(String s : split){ | |
1810 | - list.add(s); | |
1811 | - } | |
1812 | - model.setRiskFactor(JsonUtil.array2JsonString(list)); | |
1813 | + if(CollectionUtils.isNotEmpty(riskFactorlist)){ | |
1814 | + model.setRiskFactor(JsonUtil.array2JsonString(riskFactorlist)); | |
1813 | 1815 | } |
1814 | 1816 | antenatalExaminationService.updateOneAnt(model, model.getId()); |
1815 | 1817 | |
... | ... | @@ -1827,7 +1829,15 @@ |
1827 | 1829 | recordService.updateOne(model1,model1.getId()); |
1828 | 1830 | } |
1829 | 1831 | } |
1830 | - | |
1832 | + Patients patients = mongoTemplate.findOne(Query.query(Criteria.where("pid").is(pid).and("hospitalId").is(hospitalId).and("type").is(1).and("yn").is(1)), Patients.class); | |
1833 | + if(StringUtils.isNotEmpty(nextTime)){ | |
1834 | + patients.setNextCheckTime(DateUtil.parseYMD(nextTime)); | |
1835 | + } | |
1836 | + if(CollectionUtils.isNotEmpty(riskFactorlist)){ | |
1837 | + patients.setRiskFactorId(riskFactorlist); | |
1838 | + } | |
1839 | + patients.setModified(new Date()); | |
1840 | + patientsService.updatePatient(patients); | |
1831 | 1841 | |
1832 | 1842 | falg = false; |
1833 | 1843 | break; |