|
@@ -104,8 +104,8 @@ public class ProjectTemController extends BaseController {
|
|
|
wbsItem.setId(id);
|
|
|
//分析保存
|
|
|
String str = projectService.save(file[i],wbsItem);
|
|
|
- if(str.equals(BashInfo.INVALIDFORMAT)){
|
|
|
- throw new RuntimeException(str);
|
|
|
+ if(str.equals(BashInfo.PROJECT_TYPE_ERROR)){
|
|
|
+ throw new RuntimeException(BashInfo.PROJECT_TYPE_ERROR_MSG);
|
|
|
}
|
|
|
}
|
|
|
} catch (Exception e){
|
|
@@ -138,8 +138,8 @@ public class ProjectTemController extends BaseController {
|
|
|
try {
|
|
|
// 保存数据到数据库
|
|
|
String str = projectService.save(file,wbsItem);
|
|
|
- if(str.equals(BashInfo.INVALIDFORMAT)){
|
|
|
- throw new RuntimeException(str);
|
|
|
+ if(str.equals(BashInfo.PROJECT_TYPE_ERROR)){
|
|
|
+ throw new RuntimeException(BashInfo.PROJECT_TYPE_ERROR_MSG);
|
|
|
}
|
|
|
addMessage(redirectAttributes, "导入成功");
|
|
|
return "redirect:/a/jkxl/list?id="+id+"&type="+str+"&projectId="+projectId;
|