|
@@ -101,6 +101,8 @@ import com.fs.hisStore.service.IFsUserInformationCollectionService;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
import org.springframework.util.CollectionUtils;
|
|
import org.springframework.util.CollectionUtils;
|
|
|
|
|
|
|
|
|
|
+import static com.fs.his.utils.PhoneUtil.encryptPhone;
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 用户信息采集Service业务层处理
|
|
* 用户信息采集Service业务层处理
|
|
|
*
|
|
*
|
|
@@ -489,7 +491,10 @@ public class FsUserInformationCollectionServiceImpl extends ServiceImpl<FsUserIn
|
|
|
}
|
|
}
|
|
|
fsPrescribe.setPatientId(param.getPatientInfo().getPatientId());
|
|
fsPrescribe.setPatientId(param.getPatientInfo().getPatientId());
|
|
|
fsPrescribe.setPatientName(param.getPatientInfo().getPatientName());
|
|
fsPrescribe.setPatientName(param.getPatientInfo().getPatientName());
|
|
|
- fsPrescribe.setPatientTel(param.getPatientInfo().getMobile());
|
|
|
|
|
|
|
+ if (param.getPatientInfo().getMobile() != null){
|
|
|
|
|
+ //存储加密字符串到处方表
|
|
|
|
|
+ fsPrescribe.setPatientTel(encryptPhone(param.getPatientInfo().getMobile()));
|
|
|
|
|
+ }
|
|
|
fsPrescribe.setPatientGender(String.valueOf(param.getPatientInfo().getSex()));
|
|
fsPrescribe.setPatientGender(String.valueOf(param.getPatientInfo().getSex()));
|
|
|
return fsPrescribe;
|
|
return fsPrescribe;
|
|
|
}
|
|
}
|
|
@@ -1722,15 +1727,28 @@ public class FsUserInformationCollectionServiceImpl extends ServiceImpl<FsUserIn
|
|
|
log.error("信息采集id:{}存在必填备注未填写,请完善后再提交", param.getId());//为了不影响业务正常执行这里暂时就不抛异常了
|
|
log.error("信息采集id:{}存在必填备注未填写,请完善后再提交", param.getId());//为了不影响业务正常执行这里暂时就不抛异常了
|
|
|
sourceInfo.setCompleteStatus(0);
|
|
sourceInfo.setCompleteStatus(0);
|
|
|
}
|
|
}
|
|
|
- //如果待完善用户使用患者信息的是"默认就诊人",则需要更新对应处方中的患者信息
|
|
|
|
|
if (sourceInfo.getPrescribeId()!=null){
|
|
if (sourceInfo.getPrescribeId()!=null){
|
|
|
|
|
+ //获取这个信息采集对应的处方信息
|
|
|
FsPrescribe fsPrescribe = fsPrescribeMapper.selectFsPrescribeByPrescribeId(sourceInfo.getPrescribeId());
|
|
FsPrescribe fsPrescribe = fsPrescribeMapper.selectFsPrescribeByPrescribeId(sourceInfo.getPrescribeId());
|
|
|
- fsPrescribe.setPatientBirthday(param.getPatientInfo().getBirthday());
|
|
|
|
|
- fsPrescribe.setPatientId(param.getPatientInfo().getPatientId());
|
|
|
|
|
- fsPrescribe.setPatientName(param.getPatientInfo().getPatientName());
|
|
|
|
|
- fsPrescribe.setPatientTel(param.getPatientInfo().getMobile());
|
|
|
|
|
- fsPrescribe.setPatientGender(param.getPatientInfo().getSex());
|
|
|
|
|
- fsPrescribeMapper.updateFsPrescribe(fsPrescribe);
|
|
|
|
|
|
|
+ if (fsPrescribe!=null){
|
|
|
|
|
+ if (DEFAULT_PATIENT_NAME.equals(fsPrescribe.getPatientName())){
|
|
|
|
|
+ //如果待完善用户的信息采集对应的处方中使用患者名称是"默认就诊人",则需要更新对应处方中的患者信息
|
|
|
|
|
+ fsPrescribe.setPatientBirthday(param.getPatientInfo().getBirthday());
|
|
|
|
|
+ fsPrescribe.setPatientId(param.getPatientInfo().getPatientId());
|
|
|
|
|
+ fsPrescribe.setPatientName(param.getPatientInfo().getPatientName());
|
|
|
|
|
+ if (param.getPatientInfo().getMobile()!=null&¶m.getPatientInfo().getMobile().length()==11){
|
|
|
|
|
+ //说明传入的是未加密的手机号,则需要加密后再存储
|
|
|
|
|
+ fsPrescribe.setPatientTel(encryptPhone(param.getPatientInfo().getMobile()));
|
|
|
|
|
+ } else if (param.getPatientInfo().getMobile()!=null&¶m.getPatientInfo().getMobile().length()>11) {
|
|
|
|
|
+ //说明传入的是加密后的字符串,无需加密直接赋值
|
|
|
|
|
+ fsPrescribe.setPatientTel(param.getPatientInfo().getMobile());
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ fsPrescribe.setPatientGender(param.getPatientInfo().getSex());
|
|
|
|
|
+ fsPrescribeMapper.updateFsPrescribe(fsPrescribe);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
fsUserInformationCollectionMapper.updateFsUserInformationCollection(sourceInfo);
|
|
fsUserInformationCollectionMapper.updateFsUserInformationCollection(sourceInfo);
|
|
|
}
|
|
}
|
|
@@ -1937,6 +1955,18 @@ public class FsUserInformationCollectionServiceImpl extends ServiceImpl<FsUserIn
|
|
|
return fsUserInformationCollectionMapper.resetCIDCollection(collectionId);
|
|
return fsUserInformationCollectionMapper.resetCIDCollection(collectionId);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public List<FsUserInformationCollectionOverviewVo> selectUserInformationCollectionByPhone(String phone) {
|
|
|
|
|
+ if (StringUtils.isEmpty(phone)){
|
|
|
|
|
+ throw new CustomException("手机号不能为空");
|
|
|
|
|
+ }
|
|
|
|
|
+ List<FsUserInformationCollectionOverviewVo> fsUserInformationCollections =fsUserInformationCollectionMapper.selectFsUserInformationCollectionByPhone(phone);
|
|
|
|
|
+ if (CollectionUtils.isEmpty(fsUserInformationCollections)){
|
|
|
|
|
+ return Collections.emptyList();
|
|
|
|
|
+ }
|
|
|
|
|
+ return fsUserInformationCollections;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 校验必填备注:对于 open=true 且被勾选的选项,必须填写备注文本
|
|
* 校验必填备注:对于 open=true 且被勾选的选项,必须填写备注文本
|
|
|
*
|
|
*
|