Commit cb60020cfafa36a35c98a507577cc20abef027c0

Authored by wtt
1 parent 456f7f9e88

update

Showing 2 changed files with 20 additions and 3 deletions

platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientFacade.java View file @ cb60020
... ... @@ -66,6 +66,8 @@
66 66 @Autowired
67 67 private BasicConfigService basicConfigService;
68 68 @Autowired
  69 + private TrackDownRecordService trackDownRecordService;
  70 + @Autowired
69 71 private AutoMatchFacade autoMatchFacade;
70 72 @Autowired
71 73 private AntenatalExaminationService antExService;
... ... @@ -1531,7 +1533,7 @@
1531 1533 if (end > patientses.size()) {
1532 1534 end = patientses.size();
1533 1535 }
1534   - listFuture.add(commonThreadPool.submit(new QuanWeightWorker(patientses.subList(i, end),mongoTemplate,commonService,basicConfigService)));
  1536 + listFuture.add(commonThreadPool.submit(new QuanWeightWorker(patientses.subList(i, end),mongoTemplate,commonService,basicConfigService,trackDownRecordService)));
1535 1537 }
1536 1538 for (Future f : listFuture) {
1537 1539 try {
platform-operate-api/src/main/java/com/lyms/platform/operate/web/worker/QuanWeightWorker.java View file @ cb60020
... ... @@ -2,6 +2,7 @@
2 2  
3 3 import com.lyms.platform.biz.service.BasicConfigService;
4 4 import com.lyms.platform.biz.service.CommonService;
  5 +import com.lyms.platform.biz.service.TrackDownRecordService;
5 6 import com.lyms.platform.common.enums.YnEnums;
6 7 import com.lyms.platform.common.utils.DateUtil;
7 8 import com.lyms.platform.common.utils.StringUtils;
8 9  
... ... @@ -9,8 +10,10 @@
9 10 import com.lyms.platform.pojo.MaternalDeliverModel;
10 11 import com.lyms.platform.pojo.PatientWeight;
11 12 import com.lyms.platform.pojo.Patients;
  13 +import com.lyms.platform.pojo.TrackDownRecord;
12 14 import com.lyms.platform.query.AntExChuQuery;
13 15 import com.lyms.platform.query.AntExQuery;
  16 +import com.lyms.platform.query.TrackDownRecordQuery;
14 17 import org.apache.commons.collections.CollectionUtils;
15 18 import org.slf4j.Logger;
16 19 import org.slf4j.LoggerFactory;
17 20  
18 21  
... ... @@ -35,16 +38,18 @@
35 38 private MongoTemplate mongoTemplate;
36 39 private CommonService commonService;
37 40 private BasicConfigService basicConfigService;
38   -
  41 + private TrackDownRecordService trackDownRecordService;
39 42 public QuanWeightWorker(List<Patients> patientses,
40 43 MongoTemplate mongoTemplate,
41 44 CommonService commonService,
42   - BasicConfigService basicConfigService
  45 + BasicConfigService basicConfigService,
  46 + TrackDownRecordService trackDownRecordService
43 47 ) {
44 48 this.patientses = patientses;
45 49 this.mongoTemplate = mongoTemplate;
46 50 this.commonService = commonService;
47 51 this.basicConfigService = basicConfigService;
  52 + this.trackDownRecordService = trackDownRecordService;
48 53 }
49 54  
50 55 @Override
... ... @@ -58,6 +63,16 @@
58 63 if (patientWeight != null && com.lyms.platform.common.utils.StringUtils.isNotEmpty(patientWeight.getBmi())) {
59 64 Map map = new HashMap();
60 65 puliMap(patients, patientWeight, map);
  66 + //列表中冗余上追访管理--孕期检查列表id
  67 + TrackDownRecordQuery query = new TrackDownRecordQuery();
  68 + query.setParentId(patients.getId());
  69 + List <TrackDownRecord> trackDownRecords = trackDownRecordService.queryTrackDown(query);
  70 + if(CollectionUtils.isNotEmpty(trackDownRecords)){
  71 + TrackDownRecord trackDownRecord = trackDownRecords.get(0);
  72 + if (StringUtils.isNotEmpty(trackDownRecord.getId())){
  73 + map.put("trackDownRecId", trackDownRecord.getId());
  74 + }
  75 + }
61 76 data.add(map);
62 77 }
63 78