|
|
@@ -227,6 +227,9 @@ public class FsUserInformationCollectionServiceImpl extends ServiceImpl<FsUserIn
|
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
public Long insertFsUserInformationCollection(FsUserInformationCollectionParam param) {
|
|
|
+ if (!getSalesProxyFillConfig()){
|
|
|
+ throw new CustomException("当前不可代填写患者问题信息,请刷新页面后重试");
|
|
|
+ }
|
|
|
if (param.getIsPackage() != null && param.getIsPackage() == 1) {
|
|
|
FsPackage fsPackage = packageMapper.selectFsPackageByPackageId(param.getPackageId());
|
|
|
if (fsPackage != null && !(fsPackage.getProductType() == 1 || fsPackage.getProductType() == 2 || fsPackage.getProductType() == 3)) {
|
|
|
@@ -265,6 +268,9 @@ public class FsUserInformationCollectionServiceImpl extends ServiceImpl<FsUserIn
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
public Long updateFsUserInformationCollection(FsUserInformationCollectionParam param)
|
|
|
{
|
|
|
+ if (!getSalesProxyFillConfig()){
|
|
|
+ throw new CustomException("当前不可代填写患者问题信息,请刷新页面后重试");
|
|
|
+ }
|
|
|
if (param.getId() == null || param.getId() < 1) {
|
|
|
throw new CustomException("参数错误");
|
|
|
}
|
|
|
@@ -326,6 +332,9 @@ public class FsUserInformationCollectionServiceImpl extends ServiceImpl<FsUserIn
|
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
public Long createSimpleUserInfo(FsUserInformationCollectionParam param) {
|
|
|
+ if (!getSalesProxyFillConfig()){
|
|
|
+ throw new CustomException("当前不可代填写患者问题信息,请刷新页面后重试");
|
|
|
+ }
|
|
|
if (param.getIsPackage() != null && param.getIsPackage() == 1) {
|
|
|
FsPackage fsPackage = packageMapper.selectFsPackageByPackageId(param.getPackageId());
|
|
|
if (fsPackage != null && !(fsPackage.getProductType() == 1 || fsPackage.getProductType() == 2 || fsPackage.getProductType() == 3)) {
|
|
|
@@ -723,6 +732,7 @@ public class FsUserInformationCollectionServiceImpl extends ServiceImpl<FsUserIn
|
|
|
}
|
|
|
logger.info("采集信息id:{},采集信息用户id{},当前登录用户id{}",param.getId(),collection.getUserId(),param.getUserId());
|
|
|
if (!Objects.equals(collection.getUserId(), param.getUserId())) {
|
|
|
+ log.error("当前用户userId:{},信息采集表实际userId:{}",param.getUserId(),collection.getUserId());
|
|
|
return R.error("用户信息不匹配,无法确认");
|
|
|
}
|
|
|
if (collection.getIsPackage() == 1) {
|
|
|
@@ -1342,6 +1352,11 @@ public class FsUserInformationCollectionServiceImpl extends ServiceImpl<FsUserIn
|
|
|
if (informationCollection== null){
|
|
|
throw new CustomException("用户采集信息不存在");
|
|
|
}
|
|
|
+ //校验填写用户与信息采集信息用户是否一致
|
|
|
+ if (!param.getUserId().equals(informationCollection.getUserId())){
|
|
|
+ log.error("信息采集用户信息不一致,当前用户userId:{},信息采集表实际userId:{}",param.getUserId(),informationCollection.getUserId());
|
|
|
+ throw new CustomException("用户信息不一致,请检查");
|
|
|
+ }
|
|
|
int result=0;
|
|
|
//根据前端传递的填写结果判断是否更新标识符
|
|
|
if (informationCollection.getFillFlag()==0 &&!CollectionUtils.isEmpty(param.getAnswers())) {
|