根据母亲查母婴关系使用集合,可能多个宝宝

master
wyb 2 years ago
parent 235e9b69f8
commit bf5cf3bcad

@ -174,13 +174,16 @@ public class SdBusinessServiceImpl implements SdBusinessService {
TBasic tBasic = tBasicMapper.getTBasicInfo(parentPatientId);
// 查医院患者索引
String parentIndex = tBasicMapper.getSdRyIndex(parentPatientId);
List<String> babyPatientIds = new ArrayList<>();
// 查母婴关联关系
MaternalInfantRelationship maternalInfantRelationship = tBasicMapper.getMiRelationByPatientIndexAndAdmissTimes(parentIndex, tBasic.getAdmissTimes().toString());
// 根据宝宝的患者索引查病案主键,进行补偿
String babyPatientId = tBasicMapper.getPatientIdBySdRyIndex(maternalInfantRelationship.getBabyId());
List<String> patientIds = Collections.singletonList(babyPatientId);
log.info("补偿婴儿任务 patientIds:{} collectId:{}", patientIds, babyCollectorIds);
compensateTask(patientIds, babyCollectorIds);
List<MaternalInfantRelationship> maternalInfantRelationship = tBasicMapper.getMiRelationByPatientIndexAndAdmissTimes(parentIndex, tBasic.getAdmissTimes().toString());
// 根据宝宝的患者索引查病案主键,进行补偿,可能多个宝宝
for (MaternalInfantRelationship infantRelationship : maternalInfantRelationship) {
String babyPatientId = tBasicMapper.getPatientIdBySdRyIndex(infantRelationship.getBabyId());
babyPatientIds.add(babyPatientId);
}
log.info("补偿婴儿任务 patientIds:{} collectId:{}", babyPatientIds, babyCollectorIds);
compensateTask(babyPatientIds, babyCollectorIds);
}
} catch (Exception ex) {
log.error("判断是否产科与生成婴儿任务错误了patientId" + parentPatientId, ex);
@ -190,7 +193,8 @@ public class SdBusinessServiceImpl implements SdBusinessService {
/**
*
* @param patientId
*
* @param patientId
* @param haveBabyQuery
* @return
*/

@ -139,7 +139,7 @@ public interface TBasicMapper {
* @param parentTimes
* @return
*/
MaternalInfantRelationship getMiRelationByPatientIndexAndAdmissTimes(@Param("parentIndex")String parentIndex, @Param("parentTimes") String parentTimes);
List<MaternalInfantRelationship> getMiRelationByPatientIndexAndAdmissTimes(@Param("parentIndex")String parentIndex, @Param("parentTimes") String parentTimes);
/**
*

Loading…
Cancel
Save