Commit e22179f200215adc276f6b6d5bef3626729a5ee0
1 parent
7ba2b8fab8
Exists in
master
and in
6 other branches
1
Showing 1 changed file with 13 additions and 3 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/TestController.java
View file @
e22179f
... | ... | @@ -247,7 +247,7 @@ |
247 | 247 | int batchSize = 1000; |
248 | 248 | if (patientCount > 100000) { |
249 | 249 | batchSize = 30000; |
250 | - }else if(patientCount > 10000){ | |
250 | + } else if (patientCount > 10000) { | |
251 | 251 | batchSize = 10000; |
252 | 252 | } |
253 | 253 | |
254 | 254 | |
... | ... | @@ -1471,8 +1471,9 @@ |
1471 | 1471 | |
1472 | 1472 | @Autowired |
1473 | 1473 | private SieveFacade sieveFacade; |
1474 | + @Autowired | |
1475 | + private AntenatalExaminationFacade atFacade; | |
1474 | 1476 | |
1475 | - | |
1476 | 1477 | /** |
1477 | 1478 | * 更新新版高危因素 |
1478 | 1479 | * |
1479 | 1480 | |
... | ... | @@ -1517,11 +1518,20 @@ |
1517 | 1518 | public void run() { |
1518 | 1519 | if (CollectionUtils.isNotEmpty(tempList)) { |
1519 | 1520 | for (Patients pat : tempList) { |
1520 | - List<String> patientRisk = pat.getRiskFactorId(); | |
1521 | + List<String> patientRisk = null; | |
1522 | + HighScoreResult result =null; | |
1523 | + if (StringUtils.isNotEmpty(pat.getPid())) { | |
1524 | + result=atFacade.findLastRisk(pat.getPid(), true); | |
1525 | + } | |
1526 | + patientRisk = pat.getRiskFactorId(); | |
1527 | + | |
1521 | 1528 | if (CollectionUtils.isNotEmpty(patientRisk)) { |
1522 | 1529 | int modCount = doRiskHandle(patientRisk); |
1523 | 1530 | if (modCount > 0) { |
1524 | 1531 | pat.setRiskFactorId(patientRisk); |
1532 | + if(null!=result){ | |
1533 | + pat.setRiskLevelId(JsonUtil.array2JsonString(result.getLevelId())); | |
1534 | + } | |
1525 | 1535 | patientsService.updatePatient(pat); |
1526 | 1536 | } |
1527 | 1537 | } |