|
|
|
@ -342,18 +342,21 @@ public class RulexController extends JeecgController<Rulex, IRulexService> { |
|
|
|
|
RuleVo ruleVo = ruleVoList.get(i); |
|
|
|
|
//对应字段
|
|
|
|
|
String fieldId = ruleVo.getFieldId(); |
|
|
|
|
LambdaQueryWrapper<Fieldx> rulexLambdaQueryWrapper = new LambdaQueryWrapper<>(); |
|
|
|
|
rulexLambdaQueryWrapper.eq(Fieldx::getFieldName, fieldId); |
|
|
|
|
Fieldx byId = iFieldxService.getOne(rulexLambdaQueryWrapper); |
|
|
|
|
if (byId == null) { |
|
|
|
|
iRuleVoService.remove(null); |
|
|
|
|
message.put("isError", "true"); |
|
|
|
|
message.put("closeable","true"); |
|
|
|
|
message.put("status","第"+(i + 1) + "条数据,对应字段输入错误,请核对"); |
|
|
|
|
webSocketUtils.sendMessage(loginUser.getId(), message); |
|
|
|
|
return Result.error("第"+(i + 1) +"条数据,对应字段输入错误,请核对"); |
|
|
|
|
if(fieldId!=null){ |
|
|
|
|
LambdaQueryWrapper<Fieldx> rulexLambdaQueryWrapper = new LambdaQueryWrapper<>(); |
|
|
|
|
rulexLambdaQueryWrapper.eq(Fieldx::getFieldName, fieldId); |
|
|
|
|
Fieldx byId = iFieldxService.getOne(rulexLambdaQueryWrapper); |
|
|
|
|
if (byId == null) { |
|
|
|
|
iRuleVoService.remove(null); |
|
|
|
|
message.put("isError", "true"); |
|
|
|
|
message.put("closeable","true"); |
|
|
|
|
message.put("status","第"+(i + 1) + "条数据,对应字段输入错误,请核对"); |
|
|
|
|
webSocketUtils.sendMessage(loginUser.getId(), message); |
|
|
|
|
return Result.error("第"+(i + 1) +"条数据,对应字段输入错误,请核对"); |
|
|
|
|
} |
|
|
|
|
rulex.setFieldId(byId.getId()); |
|
|
|
|
} |
|
|
|
|
rulex.setFieldId(byId.getId()); |
|
|
|
|
|
|
|
|
|
//对应功能
|
|
|
|
|
String functionName = ruleVo.getFunctionId(); |
|
|
|
|
LambdaQueryWrapper<Functionx> functionxLambdaQueryWrapper = new LambdaQueryWrapper<Functionx>(); |
|
|
|
|