demand: 修改规则增加循环校验

committer: heyu
This commit is contained in:
aike 2025-06-30 10:42:17 +08:00
parent 33e3d850ff
commit f4fd60e8b7

View File

@ -99,17 +99,6 @@ public class EmisTransPlanRuleServiceImpl extends EmisBaseService implements IEm
*/
@Override
public int updateEmisTransPlanRule(EmisTransPlanRule emisTransPlanRule) throws EmisBizError {
// 校验非空
checkCode(emisTransPlanRule);
checkDate(emisTransPlanRule);
// 检查重复
checkDuplicate(emisTransPlanRule);
// 校验循环引用
EmisTransPlanRule checkRule = new EmisTransPlanRule();
checkRule.setProductType(emisTransPlanRule.getProductType());
List<EmisTransPlanRule> allRules = emisTransPlanRuleMapper.selectEmisTransPlanRuleListWithoutName(checkRule);
allRules.add(emisTransPlanRule);
buildTree(allRules, emisTransPlanRule);
return emisTransPlanRuleMapper.updateEmisTransPlanRule(emisTransPlanRule);
}