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

master
wyb 2 years ago
parent 235e9b69f8
commit bf5cf3bcad

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

@ -139,7 +139,7 @@ public interface TBasicMapper {
* @param parentTimes * @param parentTimes
* @return * @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