|
|
@ -168,18 +168,18 @@ public class FunctionXTestServiceImpl extends ServiceImpl<FunctionxTestMapper, F |
|
|
|
|
|
|
|
|
|
|
|
LambdaQueryWrapper<FunctionxTest> queryWrapper = new LambdaQueryWrapper<>(); |
|
|
|
LambdaQueryWrapper<FunctionxTest> queryWrapper = new LambdaQueryWrapper<>(); |
|
|
|
queryWrapper.eq(username != null, FunctionxTest::getCreatName, username); |
|
|
|
queryWrapper.eq(username != null, FunctionxTest::getCreatName, username); |
|
|
|
List<FunctionxTest> list = this.list(queryWrapper); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int isSaveTestSuccess = saveTest(listVo); |
|
|
|
int isSaveTestSuccess = saveTest(listVo); |
|
|
|
if (isSaveTestSuccess != -1){ |
|
|
|
List<FunctionxTest> list = this.list(queryWrapper); |
|
|
|
this.remove(queryWrapper); |
|
|
|
// if (isSaveTestSuccess != -1){
|
|
|
|
message.put("isError", "true"); |
|
|
|
// this.remove(queryWrapper);
|
|
|
|
message.put("status", "第" + (isSaveTestSuccess+1) + "行中文名或英文名有重复"); |
|
|
|
// message.put("isError", "true");
|
|
|
|
message.put("closeable", "true"); |
|
|
|
// message.put("status", "第" + (isSaveTestSuccess+1) + "行中文名或英文名有重复");
|
|
|
|
webSocketUtils.sendMessage(loginUser.getId(), message); |
|
|
|
// message.put("closeable", "true");
|
|
|
|
return Result.error("中文名或英文名有重复"); |
|
|
|
// webSocketUtils.sendMessage(loginUser.getId(), message);
|
|
|
|
} |
|
|
|
// return Result.error("中文名或英文名有重复");
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
message.put("status", "数据校验"); |
|
|
|
message.put("status", "数据校验"); |
|
|
|
webSocketUtils.sendMessage(loginUser.getId(), message); |
|
|
|
webSocketUtils.sendMessage(loginUser.getId(), message); |
|
|
@ -669,7 +669,7 @@ public class FunctionXTestServiceImpl extends ServiceImpl<FunctionxTestMapper, F |
|
|
|
return Result.OK("导入成功"); |
|
|
|
return Result.OK("导入成功"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Transactional |
|
|
|
|
|
|
|
int saveTest(List<FunctionxTest> listVo) { |
|
|
|
int saveTest(List<FunctionxTest> listVo) { |
|
|
|
for (int i = 0; i < listVo.size(); i++) { |
|
|
|
for (int i = 0; i < listVo.size(); i++) { |
|
|
|
try { |
|
|
|
try { |
|
|
|