|
|
|
@ -329,7 +329,7 @@ public class RulexController extends JeecgController<Rulex, IRulexService> { |
|
|
|
|
if (ruleVoList.size() <= 0 || ruleVoList == null) { |
|
|
|
|
message.put("isVisible", "false"); |
|
|
|
|
webSocketUtils.sendMessage(loginUser.getId(), message); |
|
|
|
|
return Result.error("文件导入失败,模板不匹配"); |
|
|
|
|
return Result.error("文件导入失败,模板不匹配有空值"); |
|
|
|
|
} |
|
|
|
|
// 将总的记录数传递给前端
|
|
|
|
|
message.put("records", String.valueOf(ruleVoList.size())); |
|
|
|
@ -421,31 +421,44 @@ public class RulexController extends JeecgController<Rulex, IRulexService> { |
|
|
|
|
} |
|
|
|
|
rulex.setWorkLevel(integer); |
|
|
|
|
String workStatus = ruleVo.getWorkStatus(); |
|
|
|
|
LambdaQueryWrapper<SysDictItem> sysDictItemLambdaQueryWrapper = new LambdaQueryWrapper<>(); |
|
|
|
|
sysDictItemLambdaQueryWrapper.eq(SysDictItem::getItemText, workStatus).eq(SysDictItem::getDictId, "1645268542514421762"); |
|
|
|
|
SysDictItem sysDictItem = sysDictItemMapper.selectOne(sysDictItemLambdaQueryWrapper); |
|
|
|
|
if (sysDictItem == null) { |
|
|
|
|
// LambdaQueryWrapper<SysDictItem> sysDictItemLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
|
|
|
|
// sysDictItemLambdaQueryWrapper.eq(SysDictItem::getItemText, workStatus).eq(SysDictItem::getDictId, "1645268542514421762");
|
|
|
|
|
// SysDictItem sysDictItem = sysDictItemMapper.selectOne(sysDictItemLambdaQueryWrapper);
|
|
|
|
|
|
|
|
|
|
if (workStatus.equals("未发布")) |
|
|
|
|
rulex.setWorkStatus(0); |
|
|
|
|
else if (workStatus.equals("已发布")) |
|
|
|
|
rulex.setWorkStatus(1); |
|
|
|
|
else if (workStatus.equals("开发中")) |
|
|
|
|
rulex.setWorkStatus(2); |
|
|
|
|
else if(workStatus.equals("已完成")) |
|
|
|
|
rulex.setWorkStatus(3); |
|
|
|
|
else if(workStatus.equals("已撤回")) |
|
|
|
|
rulex.setWorkStatus(4); |
|
|
|
|
else if(workStatus.equals("DEBUG")) |
|
|
|
|
rulex.setWorkStatus(9); |
|
|
|
|
else { |
|
|
|
|
iRuleVoService.remove(null); |
|
|
|
|
message.put("isVisible", "false"); |
|
|
|
|
webSocketUtils.sendMessage(loginUser.getId(), message); |
|
|
|
|
return Result.error("任务状态输入错误,请核对"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
rulex.setWorkStatus(Integer.valueOf(sysDictItem.getItemValue())); |
|
|
|
|
|
|
|
|
|
String status = ruleVo.getStatus(); |
|
|
|
|
LambdaQueryWrapper<SysDictItem> sysDictItemLambdaQueryWrapper2 = new LambdaQueryWrapper<>(); |
|
|
|
|
sysDictItemLambdaQueryWrapper2.eq(SysDictItem::getItemText, status).eq(SysDictItem::getDictId, "1645264493205491713"); |
|
|
|
|
SysDictItem sysDictItem2 = sysDictItemMapper.selectOne(sysDictItemLambdaQueryWrapper2); |
|
|
|
|
if (sysDictItem2 == null) { |
|
|
|
|
// LambdaQueryWrapper<SysDictItem> sysDictItemLambdaQueryWrapper2 = new LambdaQueryWrapper<>();
|
|
|
|
|
// sysDictItemLambdaQueryWrapper2.eq(SysDictItem::getItemText, status).eq(SysDictItem::getDictId, "1645264493205491713");
|
|
|
|
|
// SysDictItem sysDictItem2 = sysDictItemMapper.selectOne(sysDictItemLambdaQueryWrapper2);
|
|
|
|
|
if (status.equals("正常")) |
|
|
|
|
rulex.setStatus(1); |
|
|
|
|
else if (status.equals("停用")) |
|
|
|
|
rulex.setStatus(0); |
|
|
|
|
else if (status.equals("废弃")) |
|
|
|
|
rulex.setStatus(9); |
|
|
|
|
else { |
|
|
|
|
iRuleVoService.remove(null); |
|
|
|
|
message.put("isVisible", "false"); |
|
|
|
|
webSocketUtils.sendMessage(loginUser.getId(), message); |
|
|
|
|
return Result.error("规则状态输入错误,请核对"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
rulex.setStatus(Integer.valueOf(sysDictItem2.getItemValue())); |
|
|
|
|
String verisonStatus = ruleVo.getVerisonStatus(); |
|
|
|
|
LambdaQueryWrapper<SysDictItem> sysDictItemLambdaQueryWrapper3 = new LambdaQueryWrapper<>(); |
|
|
|
|
sysDictItemLambdaQueryWrapper3.eq(SysDictItem::getItemText, verisonStatus); |
|
|
|
|