|
|
@ -409,25 +409,24 @@ public class ModulexServiceImpl extends ServiceImpl<ModulexMapper, Modulex> impl |
|
|
|
String name = formatter.formatCellValue(cell,evaluator); |
|
|
|
String name = formatter.formatCellValue(cell,evaluator); |
|
|
|
propertyNames.add(name); |
|
|
|
propertyNames.add(name); |
|
|
|
} |
|
|
|
} |
|
|
|
if(propertyNames.size()!=19 || !propertyNames.get(0).equals("上级模块名称") |
|
|
|
if(propertyNames.size()!=18 || !propertyNames.get(0).equals("上级模块名称") |
|
|
|
|| !propertyNames.get(1).equals("项目名称") |
|
|
|
|| !propertyNames.get(1).equals("项目名称") |
|
|
|
|| !propertyNames.get(2).equals("中文名称") |
|
|
|
|| !propertyNames.get(2).equals("中文名称") |
|
|
|
|| !propertyNames.get(3).equals("英文名称") |
|
|
|
|| !propertyNames.get(3).equals("英文名称") |
|
|
|
|| !propertyNames.get(4).equals("模块编码") |
|
|
|
|| !propertyNames.get(4).equals("内容描述") |
|
|
|
|| !propertyNames.get(5).equals("内容描述") |
|
|
|
|| !propertyNames.get(5).equals("责任人") |
|
|
|
|| !propertyNames.get(6).equals("责任人") |
|
|
|
|| !propertyNames.get(6).equals("任务等级") |
|
|
|
|| !propertyNames.get(7).equals("任务等级") |
|
|
|
|| !propertyNames.get(7).equals("任务状态") |
|
|
|
|| !propertyNames.get(8).equals("任务状态") |
|
|
|
|| !propertyNames.get(8).equals("发布时间") |
|
|
|
|| !propertyNames.get(9).equals("发布时间") |
|
|
|
|| !propertyNames.get(9).equals("任务时长") |
|
|
|
|| !propertyNames.get(10).equals("任务时长") |
|
|
|
|| !propertyNames.get(10).equals("开始时间") |
|
|
|
|| !propertyNames.get(11).equals("开始时间") |
|
|
|
|| !propertyNames.get(11).equals("提交时间") |
|
|
|
|| !propertyNames.get(12).equals("提交时间") |
|
|
|
|| !propertyNames.get(12).equals("实际时长") |
|
|
|
|| !propertyNames.get(13).equals("实际时长") |
|
|
|
|| !propertyNames.get(13).equals("用户角色") |
|
|
|
|| !propertyNames.get(14).equals("用户角色") |
|
|
|
|| !propertyNames.get(14).equals("关联实体") |
|
|
|
|| !propertyNames.get(15).equals("关联实体") |
|
|
|
|| !propertyNames.get(15).equals("模块状态") |
|
|
|
|| !propertyNames.get(16).equals("模块状态") |
|
|
|
|| !propertyNames.get(16).equals("版本状态") |
|
|
|
|| !propertyNames.get(17).equals("版本状态") |
|
|
|
|| !propertyNames.get(17).equals("版本号")){ |
|
|
|
|| !propertyNames.get(18).equals("版本号")){ |
|
|
|
|
|
|
|
message.put("isError", "true"); |
|
|
|
message.put("isError", "true"); |
|
|
|
message.put("status", "模块管理execl表格不规范,请对比模板重新上传"); |
|
|
|
message.put("status", "模块管理execl表格不规范,请对比模板重新上传"); |
|
|
|
message.put("closeable","true"); |
|
|
|
message.put("closeable","true"); |
|
|
@ -459,48 +458,52 @@ public class ModulexServiceImpl extends ServiceImpl<ModulexMapper, Modulex> impl |
|
|
|
modulexVo.setModuleEnName(value); |
|
|
|
modulexVo.setModuleEnName(value); |
|
|
|
break; |
|
|
|
break; |
|
|
|
case 4: |
|
|
|
case 4: |
|
|
|
modulexVo.setModuleCode(value); |
|
|
|
if(value.length()>500){ |
|
|
|
break; |
|
|
|
message.put("isError", "true"); |
|
|
|
case 5: |
|
|
|
message.put("status","导入失败,第" + (i+4) +"行" +"内容描述过长"); |
|
|
|
|
|
|
|
message.put("closeable","true"); |
|
|
|
|
|
|
|
webSocketUtils.sendMessage(loginUser.getId(), message); |
|
|
|
|
|
|
|
return Result.error("内容描述过长,"+"请重新导入"); |
|
|
|
|
|
|
|
} |
|
|
|
modulexVo.setPmDescribe(value); |
|
|
|
modulexVo.setPmDescribe(value); |
|
|
|
break; |
|
|
|
break; |
|
|
|
case 6: |
|
|
|
case 5: |
|
|
|
modulexVo.setManagerUsers(value); |
|
|
|
modulexVo.setManagerUsers(value); |
|
|
|
break; |
|
|
|
break; |
|
|
|
case 7: |
|
|
|
case 6: |
|
|
|
modulexVo.setWorkLevel(value); |
|
|
|
modulexVo.setWorkLevel(value); |
|
|
|
break; |
|
|
|
break; |
|
|
|
case 8: |
|
|
|
case 7: |
|
|
|
modulexVo.setWorkStatus(value); |
|
|
|
modulexVo.setWorkStatus(value); |
|
|
|
break; |
|
|
|
break; |
|
|
|
case 9: |
|
|
|
case 8: |
|
|
|
modulexVo.setPublishTime(value); |
|
|
|
modulexVo.setPublishTime(value); |
|
|
|
break; |
|
|
|
break; |
|
|
|
case 10: |
|
|
|
case 9: |
|
|
|
modulexVo.setDuration(value); |
|
|
|
modulexVo.setDuration(value); |
|
|
|
break; |
|
|
|
break; |
|
|
|
case 11: |
|
|
|
case 10: |
|
|
|
modulexVo.setStartTime(value); |
|
|
|
modulexVo.setStartTime(value); |
|
|
|
break; |
|
|
|
break; |
|
|
|
case 12: |
|
|
|
case 11: |
|
|
|
modulexVo.setSubmitTime(value); |
|
|
|
modulexVo.setSubmitTime(value); |
|
|
|
break; |
|
|
|
break; |
|
|
|
case 13: |
|
|
|
case 12: |
|
|
|
modulexVo.setRealDuration(value); |
|
|
|
modulexVo.setRealDuration(value); |
|
|
|
break; |
|
|
|
break; |
|
|
|
case 14: |
|
|
|
case 13: |
|
|
|
modulexVo.setUserRole(value); |
|
|
|
modulexVo.setUserRole(value); |
|
|
|
break; |
|
|
|
break; |
|
|
|
case 15: |
|
|
|
case 14: |
|
|
|
modulexVo.setRelatedBean(value); |
|
|
|
modulexVo.setRelatedBean(value); |
|
|
|
break; |
|
|
|
break; |
|
|
|
case 16: |
|
|
|
case 15: |
|
|
|
modulexVo.setStatus(value); |
|
|
|
modulexVo.setStatus(value); |
|
|
|
break; |
|
|
|
break; |
|
|
|
case 17: |
|
|
|
case 16: |
|
|
|
modulexVo.setVerisonStatus(value); |
|
|
|
modulexVo.setVerisonStatus(value); |
|
|
|
break; |
|
|
|
break; |
|
|
|
case 18: |
|
|
|
case 17: |
|
|
|
modulexVo.setVerison(value); |
|
|
|
modulexVo.setVerison(value); |
|
|
|
break; |
|
|
|
break; |
|
|
|
default: |
|
|
|
default: |
|
|
@ -660,14 +663,14 @@ 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(); |
|
|
|
// String moduleCode = modulexTemplate.getModuleCode();
|
|
|
|
if(moduleCode==null||moduleCode.length()>30){ |
|
|
|
// if(moduleCode==null||moduleCode.length()>30){
|
|
|
|
message.put("isError", "true"); |
|
|
|
// message.put("isError", "true");
|
|
|
|
message.put("status","导入失败,第" + (i+4) +"行" +"模块编码不能为空或者模块编码过长"); |
|
|
|
// message.put("status","导入失败,第" + (i+4) +"行" +"模块编码不能为空或者模块编码过长");
|
|
|
|
message.put("closeable","true"); |
|
|
|
// message.put("closeable","true");
|
|
|
|
webSocketUtils.sendMessage(loginUser.getId(), message); |
|
|
|
// webSocketUtils.sendMessage(loginUser.getId(), message);
|
|
|
|
return Result.error("导入失败,模块编码不能为空或者模块编码过长"); |
|
|
|
// 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); |
|
|
@ -676,20 +679,20 @@ public class ModulexServiceImpl extends ServiceImpl<ModulexMapper, Modulex> impl |
|
|
|
String projectCode = projectx.getProjectCode(); |
|
|
|
String projectCode = projectx.getProjectCode(); |
|
|
|
if(projectCode==null){ |
|
|
|
if(projectCode==null){ |
|
|
|
message.put("isError", "true"); |
|
|
|
message.put("isError", "true"); |
|
|
|
message.put("status","导入失败,第" + (i+4) +"行" +"项目编码不存在,请重新填写"); |
|
|
|
message.put("status","导入失败,第" + (i+4) +"行" +"模块对应的项目编码不存在,请完善对应项目里的项目编码后,重新导入"); |
|
|
|
message.put("closeable","true"); |
|
|
|
message.put("closeable","true"); |
|
|
|
webSocketUtils.sendMessage(loginUser.getId(), message); |
|
|
|
webSocketUtils.sendMessage(loginUser.getId(), message); |
|
|
|
return Result.error("项目编码不存在,请重新填写"); |
|
|
|
return Result.error("导入失败,模块对应的项目编码不存在,请完善对应项目里的项目编码后,重新导入"); |
|
|
|
} |
|
|
|
} |
|
|
|
modulecode = projectCode + firstChar; |
|
|
|
modulecode = projectCode + firstChar; |
|
|
|
if(!modulecode.equals(moduleCode)){ |
|
|
|
// if(!modulecode.equals(moduleCode)){
|
|
|
|
message.put("isError", "true"); |
|
|
|
// message.put("isError", "true");
|
|
|
|
message.put("status","导入失败,第" + (i+4) +"行" +"模块编码不规范,导入失败"); |
|
|
|
// message.put("status","导入失败,第" + (i+4) +"行" +"模块编码不规范,导入失败");
|
|
|
|
message.put("closeable","true"); |
|
|
|
// message.put("closeable","true");
|
|
|
|
webSocketUtils.sendMessage(loginUser.getId(), message); |
|
|
|
// webSocketUtils.sendMessage(loginUser.getId(), message);
|
|
|
|
return Result.error("模块编码不规范,导入失败"); |
|
|
|
// 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)){ |
|
|
|
modulex.setPmDescribe(null); |
|
|
|
modulex.setPmDescribe(null); |
|
|
@ -829,6 +832,13 @@ public class ModulexServiceImpl extends ServiceImpl<ModulexMapper, Modulex> impl |
|
|
|
webSocketUtils.sendMessage(loginUser.getId(), message); |
|
|
|
webSocketUtils.sendMessage(loginUser.getId(), message); |
|
|
|
return Result.error("导入失败,任务时长不规范"); |
|
|
|
return Result.error("导入失败,任务时长不规范"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if(parseDouble<0){ |
|
|
|
|
|
|
|
message.put("isError", "true"); |
|
|
|
|
|
|
|
message.put("status","导入失败,第" + (i+4) +"行" +"任务时长不规范"); |
|
|
|
|
|
|
|
message.put("closeable","true"); |
|
|
|
|
|
|
|
webSocketUtils.sendMessage(loginUser.getId(), message); |
|
|
|
|
|
|
|
return Result.error("导入失败,任务时长不规范"); |
|
|
|
|
|
|
|
} |
|
|
|
modulex.setDuration(parseDouble); |
|
|
|
modulex.setDuration(parseDouble); |
|
|
|
} |
|
|
|
} |
|
|
|
String startTime = modulexTemplate.getStartTime(); |
|
|
|
String startTime = modulexTemplate.getStartTime(); |
|
|
@ -865,11 +875,7 @@ public class ModulexServiceImpl extends ServiceImpl<ModulexMapper, Modulex> impl |
|
|
|
} |
|
|
|
} |
|
|
|
String realDuration = modulexTemplate.getRealDuration(); |
|
|
|
String realDuration = modulexTemplate.getRealDuration(); |
|
|
|
if(StringUtils.isBlank(realDuration)){ |
|
|
|
if(StringUtils.isBlank(realDuration)){ |
|
|
|
message.put("isError", "true"); |
|
|
|
modulex.setRealDuration(null); |
|
|
|
message.put("status","导入失败,第" + (i+4) +"行" +"实际时长不能为空"); |
|
|
|
|
|
|
|
message.put("closeable","true"); |
|
|
|
|
|
|
|
webSocketUtils.sendMessage(loginUser.getId(), message); |
|
|
|
|
|
|
|
return Result.error("导入失败,实际时长不能为空"); |
|
|
|
|
|
|
|
}else { |
|
|
|
}else { |
|
|
|
double parseDouble = 0; |
|
|
|
double parseDouble = 0; |
|
|
|
try { |
|
|
|
try { |
|
|
@ -883,10 +889,10 @@ public class ModulexServiceImpl extends ServiceImpl<ModulexMapper, Modulex> impl |
|
|
|
} |
|
|
|
} |
|
|
|
if(parseDouble<0.1){ |
|
|
|
if(parseDouble<0.1){ |
|
|
|
message.put("isError", "true"); |
|
|
|
message.put("isError", "true"); |
|
|
|
message.put("status","导入失败,第" + (i+4) +"行" +"最小时间0.1小时"); |
|
|
|
message.put("status","导入失败,第" + (i+4) +"行" +"实际时长最小时间0.1小时"); |
|
|
|
message.put("closeable","true"); |
|
|
|
message.put("closeable","true"); |
|
|
|
webSocketUtils.sendMessage(loginUser.getId(), message); |
|
|
|
webSocketUtils.sendMessage(loginUser.getId(), message); |
|
|
|
return Result.error("导入失败,最小时间0.1小时"); |
|
|
|
return Result.error("导入失败,实际时长最小时间0.1小时"); |
|
|
|
} |
|
|
|
} |
|
|
|
modulex.setRealDuration(parseDouble); |
|
|
|
modulex.setRealDuration(parseDouble); |
|
|
|
} |
|
|
|
} |
|
|
@ -992,6 +998,13 @@ public class ModulexServiceImpl extends ServiceImpl<ModulexMapper, Modulex> impl |
|
|
|
webSocketUtils.sendMessage(loginUser.getId(), message); |
|
|
|
webSocketUtils.sendMessage(loginUser.getId(), message); |
|
|
|
return Result.error("导入失败,版本号不能为空"); |
|
|
|
return Result.error("导入失败,版本号不能为空"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if(parseInt<0){ |
|
|
|
|
|
|
|
message.put("isError", "true"); |
|
|
|
|
|
|
|
message.put("status","导入失败,第" + (i+4) +"行" + "版本号不能规范"); |
|
|
|
|
|
|
|
message.put("closeable","true"); |
|
|
|
|
|
|
|
webSocketUtils.sendMessage(loginUser.getId(), message); |
|
|
|
|
|
|
|
return Result.error("导入失败,版本号不规范"); |
|
|
|
|
|
|
|
} |
|
|
|
modulex.setVerison(parseInt); |
|
|
|
modulex.setVerison(parseInt); |
|
|
|
} |
|
|
|
} |
|
|
|
modulexList.add(modulex); |
|
|
|
modulexList.add(modulex); |
|
|
|