模块管理导入功能交互

dev^2
lijinyu 1 year ago
parent 5c6a761b33
commit 7d4a33b80d
  1. 18
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/modulex/service/impl/ModulexServiceImpl.java

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

Loading…
Cancel
Save