|
|
@@ -208,7 +208,25 @@ public class FsPrescribeServiceImpl implements IFsPrescribeService
|
|
|
|
|
|
@Override
|
|
|
public List<FsPrescribeListVO> selectFsPrescribeListVOWithConfirm(FsPrescribeParam fsPrescribe) {
|
|
|
- return fsPrescribeMapper.selectFsPrescribeListVOWithConfirm(fsPrescribe);
|
|
|
+ List<FsPrescribeListVO> fsPrescribeListVOS = fsPrescribeMapper.selectFsPrescribeListVOWithConfirm(fsPrescribe);
|
|
|
+ if (CollectionUtils.isEmpty(fsPrescribeListVOS)){
|
|
|
+ return Collections.emptyList();
|
|
|
+ }
|
|
|
+ //设置处方来源标识 医生在开方时要求区分处方的来源 哪些是信息采集表产生的
|
|
|
+ List<String> orderCodes=fsPrescribeListVOS.stream().map(FsPrescribeListVO::getOrderCode).collect(Collectors.toList());
|
|
|
+ //通过订单号批量查询信息采集进度表
|
|
|
+ List<FsUserInformationCollectionSchedule> schedules = scheduleMapper.selectCollectionScheduleListByOrderCodeList(orderCodes);
|
|
|
+ if (CollectionUtils.isEmpty(schedules)){
|
|
|
+ return fsPrescribeListVOS;
|
|
|
+ }
|
|
|
+ Set<String> existingOrderCodes = schedules.stream().map(FsUserInformationCollectionSchedule::getOrderCode).filter(Objects::nonNull).collect(Collectors.toSet());
|
|
|
+ //从信息采集进度表查询匹配的数据,对于匹配的,将处方来源标识设置为1
|
|
|
+ for(FsPrescribeListVO vo:fsPrescribeListVOS){
|
|
|
+ if (existingOrderCodes.contains(vo.getOrderCode())){
|
|
|
+ vo.setPrescribeSource(1);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return fsPrescribeListVOS;
|
|
|
}
|
|
|
|
|
|
@Override
|