|
|
|
@ -668,14 +668,6 @@ public class ModulexServiceImpl extends ServiceImpl<ModulexMapper, Modulex> impl |
|
|
|
|
webSocketUtils.sendMessage(loginUser.getId(), message); |
|
|
|
|
return Result.error("导入失败,英文名称不能为空"); |
|
|
|
|
}modulex.setModuleEnName(moduleEnName); |
|
|
|
|
// String moduleCode = modulexTemplate.getModuleCode();
|
|
|
|
|
// if(moduleCode==null||moduleCode.length()>30){
|
|
|
|
|
// message.put("isError", "true");
|
|
|
|
|
// message.put("status","导入失败,第" + (i+4) +"行" +"模块编码不能为空或者模块编码过长");
|
|
|
|
|
// message.put("closeable","true");
|
|
|
|
|
// webSocketUtils.sendMessage(loginUser.getId(), message);
|
|
|
|
|
// return Result.error("导入失败,模块编码不能为空或者模块编码过长");
|
|
|
|
|
// }
|
|
|
|
|
String modulecode = null; |
|
|
|
|
LambdaQueryWrapper<Projectx> queryWrapper = new LambdaQueryWrapper<>(); |
|
|
|
|
queryWrapper.eq(Projectx::getProjectName,projectId); |
|
|
|
@ -690,13 +682,6 @@ public class ModulexServiceImpl extends ServiceImpl<ModulexMapper, Modulex> impl |
|
|
|
|
return Result.error("导入失败,模块对应的项目编码不存在,请完善对应项目里的项目编码后,重新导入"); |
|
|
|
|
} |
|
|
|
|
modulecode = projectCode + firstChar; |
|
|
|
|
// if(!modulecode.equals(moduleCode)){
|
|
|
|
|
// message.put("isError", "true");
|
|
|
|
|
// message.put("status","导入失败,第" + (i+4) +"行" +"模块编码不规范,导入失败");
|
|
|
|
|
// message.put("closeable","true");
|
|
|
|
|
// webSocketUtils.sendMessage(loginUser.getId(), message);
|
|
|
|
|
// return Result.error("模块编码不规范,导入失败");
|
|
|
|
|
// }
|
|
|
|
|
modulex.setModuleCode(modulecode); |
|
|
|
|
String pmDescribe = modulexTemplate.getPmDescribe(); |
|
|
|
|
if(StringUtils.isBlank(pmDescribe)){ |
|
|
|
@ -715,7 +700,7 @@ public class ModulexServiceImpl extends ServiceImpl<ModulexMapper, Modulex> impl |
|
|
|
|
modulex.setManagerUsers(null); |
|
|
|
|
}else { |
|
|
|
|
LambdaQueryWrapper<SysUser> sysUserLambdaQueryWrapper = new LambdaQueryWrapper<>(); |
|
|
|
|
String[] split = managerUsers.split(","); |
|
|
|
|
String[] split = managerUsers.split("\\s+|,|;|,|、"); |
|
|
|
|
List<String> managerUserName= Arrays.stream(split).map(String::valueOf).collect(Collectors.toList()); |
|
|
|
|
sysUserLambdaQueryWrapper.in(SysUser::getUsername,managerUserName); |
|
|
|
|
List<SysUser> iSysUserServiceOne = iSysUserService.list(sysUserLambdaQueryWrapper); |
|
|
|
@ -734,7 +719,6 @@ public class ModulexServiceImpl extends ServiceImpl<ModulexMapper, Modulex> impl |
|
|
|
|
webSocketUtils.sendMessage(loginUser.getId(), message); |
|
|
|
|
return Result.error("导入失败,责任人信息查询不到"); |
|
|
|
|
} |
|
|
|
|
// String strip = org.apache.commons.lang.StringUtils.strip(list.toString(), "[]");
|
|
|
|
|
String s = ""; |
|
|
|
|
for (int j = 0; j < list.size(); j++) { |
|
|
|
|
s = s + list.get(j); |
|
|
|
|