40c81b58 by 肖初晴

【DAOP-1.0】企业认证

【功能点】测试问题处理
1 parent 3a05cbff
......@@ -170,6 +170,20 @@ public class DemandServiceImpl extends FlowAbstractImpl implements DemandService
afterSave(entity, rqVO);
}
private void checkProductGuid(String dataProductGuid){
if (StringUtils.isBlank(dataProductGuid)) {
throw new CsbrSystemException(SystemError.DATA_INPUT_ERROR, "产品不能为空");
}
//此产品审批中的需求只能有1个
LambdaQueryWrapper<MfDemand> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(MfDemand::getDataProductGuid,dataProductGuid);
wrapper.eq(MfDemand::getBizApproveState,"A");
List<MfDemand> list = mfDemandService.list(wrapper);
if(CollectionUtils.isNotEmpty(list)){
throw new CsbrSystemException(SystemError.DATA_INPUT_ERROR, "该数据产品已在审批中,请勿重复提交!");
}
}
/**
* 数据需求数据修改
* @author xcq
......@@ -396,6 +410,9 @@ public class DemandServiceImpl extends FlowAbstractImpl implements DemandService
//endregion 2.1.业务合规性验证
//region 2.2.业务数据验证
if(rqVO.getImmediateApprove()){
checkProductGuid(rqVO.getDataProductGuid());
}
//endregion 2.2.业务数据验证
//endregion 2.数据验证特殊处理
......@@ -467,7 +484,9 @@ public class DemandServiceImpl extends FlowAbstractImpl implements DemandService
throw new CsbrSystemException(SystemError.DATA_NOT_EXISTS, messageSourceUtil.notExistsToUpdateMessage(FUNCTION_NAME));
}
//endregion 2.2.业务数据验证
if(rqVO.getImmediateApprove()){
checkProductGuid(rqVO.getDataProductGuid());
}
//endregion 2.数据验证特殊处理
//region 3.数据转换处理
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!