|
@@ -210,7 +210,8 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} catch (NullPointerException e) {
|
|
} catch (NullPointerException e) {
|
|
- httpRespMsg.setError("验证失败");
|
|
|
|
|
|
+ //httpRespMsg.setError("验证失败");
|
|
|
|
+ httpRespMsg.setError(MessageUtils.message("access.verificationError"));
|
|
return httpRespMsg;
|
|
return httpRespMsg;
|
|
}
|
|
}
|
|
return httpRespMsg;
|
|
return httpRespMsg;
|
|
@@ -437,7 +438,8 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
httpRespMsg.data = map;
|
|
httpRespMsg.data = map;
|
|
} catch (NullPointerException e) {
|
|
} catch (NullPointerException e) {
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
- httpRespMsg.setError("验证失败");
|
|
|
|
|
|
+ //httpRespMsg.setError("验证失败");
|
|
|
|
+ httpRespMsg.setError(MessageUtils.message("access.verificationError"));
|
|
return httpRespMsg;
|
|
return httpRespMsg;
|
|
}
|
|
}
|
|
return httpRespMsg;
|
|
return httpRespMsg;
|
|
@@ -499,7 +501,8 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
if (id == null) {
|
|
if (id == null) {
|
|
//新增项目
|
|
//新增项目
|
|
if (name == null) {
|
|
if (name == null) {
|
|
- httpRespMsg.setError("请填写项目名称");
|
|
|
|
|
|
+ //httpRespMsg.setError("请填写项目名称");
|
|
|
|
+ httpRespMsg.setError(MessageUtils.message("project.fillNameError"));
|
|
} else {
|
|
} else {
|
|
//检查项目编号不能重复
|
|
//检查项目编号不能重复
|
|
Integer count = 0;
|
|
Integer count = 0;
|
|
@@ -507,7 +510,8 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
count = projectMapper.selectCount(new QueryWrapper<Project>().eq("company_id", companyId).eq("project_code", code));
|
|
count = projectMapper.selectCount(new QueryWrapper<Project>().eq("company_id", companyId).eq("project_code", code));
|
|
}
|
|
}
|
|
if (count > 0) {
|
|
if (count > 0) {
|
|
- httpRespMsg.setError("提交失败:项目编号已存在");
|
|
|
|
|
|
+ //httpRespMsg.setError("提交失败:项目编号已存在");
|
|
|
|
+ httpRespMsg.setError(MessageUtils.message("project.submitFailByNoRepeat"));
|
|
} else {
|
|
} else {
|
|
Project project = new Project().setProjectName(name).setCompanyId(companyId).setProjectCode(code).setInchargerId(inchargerId)
|
|
Project project = new Project().setProjectName(name).setCompanyId(companyId).setProjectCode(code).setInchargerId(inchargerId)
|
|
.setLevel(level)
|
|
.setLevel(level)
|
|
@@ -556,7 +560,8 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
project.setCustomerName("");
|
|
project.setCustomerName("");
|
|
}
|
|
}
|
|
if (projectMapper.insert(project) == 0) {
|
|
if (projectMapper.insert(project) == 0) {
|
|
- httpRespMsg.setError("操作失败");
|
|
|
|
|
|
+ //httpRespMsg.setError("操作失败");
|
|
|
|
+ httpRespMsg.setError(MessageUtils.message("other.operationFail"));
|
|
} else {
|
|
} else {
|
|
if (projectBaseCostData != null) {
|
|
if (projectBaseCostData != null) {
|
|
updateProjectBaseCostData(projectBaseCostData, project.getId());
|
|
updateProjectBaseCostData(projectBaseCostData, project.getId());
|
|
@@ -607,7 +612,8 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
count = projectMapper.selectCount(new QueryWrapper<Project>().eq("company_id", companyId).eq("project_code", code).ne("id", id));
|
|
count = projectMapper.selectCount(new QueryWrapper<Project>().eq("company_id", companyId).eq("project_code", code).ne("id", id));
|
|
}
|
|
}
|
|
if (count > 0) {
|
|
if (count > 0) {
|
|
- httpRespMsg.setError("提交失败:项目编号已存在");
|
|
|
|
|
|
+ //httpRespMsg.setError("提交失败:项目编号已存在");
|
|
|
|
+ httpRespMsg.setError(MessageUtils.message("project.submitFailByNoRepeat"));
|
|
} else {
|
|
} else {
|
|
Project project = projectMapper.selectById(id);
|
|
Project project = projectMapper.selectById(id);
|
|
Project p = new Project();
|
|
Project p = new Project();
|
|
@@ -675,7 +681,8 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
p.setCustomerName("");
|
|
p.setCustomerName("");
|
|
}
|
|
}
|
|
if (projectMapper.updateById(p) == 0) {
|
|
if (projectMapper.updateById(p) == 0) {
|
|
- httpRespMsg.setError("操作失败");
|
|
|
|
|
|
+ //httpRespMsg.setError("操作失败");
|
|
|
|
+ httpRespMsg.setError(MessageUtils.message("other.operationFail"));
|
|
} else {
|
|
} else {
|
|
|
|
|
|
if (customerId == null) {
|
|
if (customerId == null) {
|
|
@@ -918,7 +925,8 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
if(first.isPresent()){
|
|
if(first.isPresent()){
|
|
ProjectCurrentcost projectCurrentcost = first.get();
|
|
ProjectCurrentcost projectCurrentcost = first.get();
|
|
if(projectCurrentcost.getBaseAmount()>projectBasecost.getBaseAmount()){
|
|
if(projectCurrentcost.getBaseAmount()>projectBasecost.getBaseAmount()){
|
|
- httpRespMsg.setError("成本基线"+projectBasecost.getBaseName()+"预算小于当前基线预算");
|
|
|
|
|
|
+ //httpRespMsg.setError("成本基线"+projectBasecost.getBaseName()+"预算小于当前基线预算");
|
|
|
|
+ httpRespMsg.setError(MessageUtils.message("project.costBaseline",projectBasecost.getBaseName()));
|
|
return httpRespMsg;
|
|
return httpRespMsg;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -959,7 +967,8 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
deleteProData(id);
|
|
deleteProData(id);
|
|
} else {
|
|
} else {
|
|
if (reportMapper.selectCount(new QueryWrapper<Report>().eq("project_id", id)) > 0) {
|
|
if (reportMapper.selectCount(new QueryWrapper<Report>().eq("project_id", id)) > 0) {
|
|
- httpRespMsg.setError("检测到该项目存在相关日报,确定要删除全部数据吗");
|
|
|
|
|
|
+ //httpRespMsg.setError("检测到该项目存在相关日报,确定要删除全部数据吗");
|
|
|
|
+ httpRespMsg.setError(MessageUtils.message("project.dailyDataDel"));
|
|
httpRespMsg.code = "reconfirm";
|
|
httpRespMsg.code = "reconfirm";
|
|
} else {
|
|
} else {
|
|
deleteProData(id);
|
|
deleteProData(id);
|
|
@@ -1139,7 +1148,8 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
}
|
|
}
|
|
} catch (NullPointerException e) {
|
|
} catch (NullPointerException e) {
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
- httpRespMsg.setError("验证失败");
|
|
|
|
|
|
+ //httpRespMsg.setError("验证失败");
|
|
|
|
+ httpRespMsg.setError(MessageUtils.message("access.verificationError"));
|
|
return httpRespMsg;
|
|
return httpRespMsg;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1350,7 +1360,8 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
httpRespMsg.data = resp;
|
|
httpRespMsg.data = resp;
|
|
} catch (NullPointerException e) {
|
|
} catch (NullPointerException e) {
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
- httpRespMsg.setError("验证失败");
|
|
|
|
|
|
+ //httpRespMsg.setError("验证失败");
|
|
|
|
+ httpRespMsg.setError(MessageUtils.message("access.verificationError"));
|
|
return httpRespMsg;
|
|
return httpRespMsg;
|
|
}
|
|
}
|
|
return httpRespMsg;
|
|
return httpRespMsg;
|
|
@@ -1366,7 +1377,8 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
//更新进度
|
|
//更新进度
|
|
projectMapper.updateById(project);
|
|
projectMapper.updateById(project);
|
|
} else {
|
|
} else {
|
|
- httpRespMsg.setError("无权操作");
|
|
|
|
|
|
+ //httpRespMsg.setError("无权操作");
|
|
|
|
+ httpRespMsg.setError(MessageUtils.message("access.operationError"));
|
|
}
|
|
}
|
|
return httpRespMsg;
|
|
return httpRespMsg;
|
|
}
|
|
}
|
|
@@ -1386,7 +1398,8 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
//更新状态
|
|
//更新状态
|
|
projectMapper.updateById(project);
|
|
projectMapper.updateById(project);
|
|
} else {
|
|
} else {
|
|
- httpRespMsg.setError("无权操作");
|
|
|
|
|
|
+ //httpRespMsg.setError("无权操作");
|
|
|
|
+ httpRespMsg.setError(MessageUtils.message("access.operationError"));
|
|
}
|
|
}
|
|
return httpRespMsg;
|
|
return httpRespMsg;
|
|
}
|
|
}
|
|
@@ -1484,7 +1497,8 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
Integer id = project.getId();
|
|
Integer id = project.getId();
|
|
Double contractAmount = projectMapper.selectById(id).getContractAmount();
|
|
Double contractAmount = projectMapper.selectById(id).getContractAmount();
|
|
if (contractAmount == 0) {
|
|
if (contractAmount == 0) {
|
|
- msg.setError("请先设置项目合同金额");
|
|
|
|
|
|
+ //msg.setError("请先设置项目合同金额");
|
|
|
|
+ msg.setError(MessageUtils.message("project.contractAmount"));
|
|
return msg;
|
|
return msg;
|
|
}
|
|
}
|
|
//计算项目总成本
|
|
//计算项目总成本
|
|
@@ -1500,7 +1514,8 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
if(first.isPresent()){
|
|
if(first.isPresent()){
|
|
ProjectCurrentcost projectCurrentcost = first.get();
|
|
ProjectCurrentcost projectCurrentcost = first.get();
|
|
if(projectCurrentcost.getBaseAmount()>cost.getBaseAmount()){
|
|
if(projectCurrentcost.getBaseAmount()>cost.getBaseAmount()){
|
|
- msg.setError("成本基线"+cost.getBaseName()+"预算小于当前基线预算");
|
|
|
|
|
|
+ //msg.setError("成本基线"+cost.getBaseName()+"预算小于当前基线预算");
|
|
|
|
+ msg.setError(MessageUtils.message("project.costBaseline",cost.getBaseName()));
|
|
return msg;
|
|
return msg;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -1565,7 +1580,8 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
}
|
|
}
|
|
//首先查看有无浏览权限
|
|
//首先查看有无浏览权限
|
|
if (!projectMapper.selectById(projectId).getCompanyId().equals(companyId)) {
|
|
if (!projectMapper.selectById(projectId).getCompanyId().equals(companyId)) {
|
|
- httpRespMsg.setError("无权查看其他公司的项目详情");
|
|
|
|
|
|
+ //httpRespMsg.setError("无权查看其他公司的项目详情");
|
|
|
|
+ httpRespMsg.setError(MessageUtils.message("access.otherCompanyProject"));
|
|
} else {
|
|
} else {
|
|
TimeType timeType = timeTypeMapper.selectById(companyId);
|
|
TimeType timeType = timeTypeMapper.selectById(companyId);
|
|
if (timeType.getFixMonthcost() == 0) {
|
|
if (timeType.getFixMonthcost() == 0) {
|
|
@@ -1636,7 +1652,8 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} catch (NullPointerException e) {
|
|
} catch (NullPointerException e) {
|
|
- httpRespMsg.setError("验证失败");
|
|
|
|
|
|
+ //httpRespMsg.setError("验证失败");
|
|
|
|
+ httpRespMsg.setError(MessageUtils.message("access.verificationError"));
|
|
return httpRespMsg;
|
|
return httpRespMsg;
|
|
}
|
|
}
|
|
return httpRespMsg;
|
|
return httpRespMsg;
|
|
@@ -1649,7 +1666,8 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
Integer companyId = userMapper.selectById(request.getHeader("Token")).getCompanyId();
|
|
Integer companyId = userMapper.selectById(request.getHeader("Token")).getCompanyId();
|
|
//首先查看有无浏览权限
|
|
//首先查看有无浏览权限
|
|
if (!projectMapper.selectById(projectId).getCompanyId().equals(companyId)) {
|
|
if (!projectMapper.selectById(projectId).getCompanyId().equals(companyId)) {
|
|
- httpRespMsg.setError("无权查看其他公司的项目详情");
|
|
|
|
|
|
+ //httpRespMsg.setError("无权查看其他公司的项目详情");
|
|
|
|
+ httpRespMsg.setError(MessageUtils.message("access.otherCompanyProject"));
|
|
} else {
|
|
} else {
|
|
Map<String, Object> resultMap = new HashMap<>();
|
|
Map<String, Object> resultMap = new HashMap<>();
|
|
List<Map<String, Object>> list = projectMapper.getCostInStage(startDate, endDate, projectId);
|
|
List<Map<String, Object>> list = projectMapper.getCostInStage(startDate, endDate, projectId);
|
|
@@ -1666,7 +1684,8 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
httpRespMsg.data = resultMap;
|
|
httpRespMsg.data = resultMap;
|
|
}
|
|
}
|
|
} catch (NullPointerException e) {
|
|
} catch (NullPointerException e) {
|
|
- httpRespMsg.setError("验证失败");
|
|
|
|
|
|
+ //httpRespMsg.setError("验证失败");
|
|
|
|
+ httpRespMsg.setError(MessageUtils.message("access.verificationError"));
|
|
return httpRespMsg;
|
|
return httpRespMsg;
|
|
}
|
|
}
|
|
return httpRespMsg;
|
|
return httpRespMsg;
|
|
@@ -1680,7 +1699,8 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
Integer companyId = userMapper.selectById(request.getHeader("Token")).getCompanyId();
|
|
Integer companyId = userMapper.selectById(request.getHeader("Token")).getCompanyId();
|
|
//首先查看有无浏览权限
|
|
//首先查看有无浏览权限
|
|
if (projectId != null && !projectMapper.selectById(projectId).getCompanyId().equals(companyId)) {
|
|
if (projectId != null && !projectMapper.selectById(projectId).getCompanyId().equals(companyId)) {
|
|
- httpRespMsg.setError("无权查看其他公司的项目详情");
|
|
|
|
|
|
+ //httpRespMsg.setError("无权查看其他公司的项目详情");
|
|
|
|
+ httpRespMsg.setError(MessageUtils.message("access.otherCompanyProject"));
|
|
} else {
|
|
} else {
|
|
Map<String, Object> resultMap = new HashMap<>();
|
|
Map<String, Object> resultMap = new HashMap<>();
|
|
List<Map<String, Object>> list = projectMapper.getAllMembCost(startDate, endDate, projectId, companyId);
|
|
List<Map<String, Object>> list = projectMapper.getAllMembCost(startDate, endDate, projectId, companyId);
|
|
@@ -1698,7 +1718,8 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
}
|
|
}
|
|
} catch (NullPointerException e) {
|
|
} catch (NullPointerException e) {
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
- httpRespMsg.setError("验证失败");
|
|
|
|
|
|
+ //httpRespMsg.setError("验证失败");
|
|
|
|
+ httpRespMsg.setError(MessageUtils.message("access.verificationError"));
|
|
return httpRespMsg;
|
|
return httpRespMsg;
|
|
}
|
|
}
|
|
return httpRespMsg;
|
|
return httpRespMsg;
|
|
@@ -2875,7 +2896,8 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
|
|
|
httpRespMsg.data = resp;
|
|
httpRespMsg.data = resp;
|
|
} catch (NullPointerException e) {
|
|
} catch (NullPointerException e) {
|
|
- httpRespMsg.setError("验证失败"+e.getMessage());
|
|
|
|
|
|
+ //httpRespMsg.setError("验证失败"+e.getMessage());
|
|
|
|
+ httpRespMsg.setError(MessageUtils.message("access.verificationErrorByParam",e.getMessage()));
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
return httpRespMsg;
|
|
return httpRespMsg;
|
|
}
|
|
}
|
|
@@ -3124,12 +3146,14 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- msg.data = "成功导入"+importCount+"条数据。";
|
|
|
|
|
|
+ //msg.data = "成功导入"+importCount+"条数据。";
|
|
|
|
+ msg.data = MessageUtils.message("data.importSucRow",importCount);
|
|
if (existCodeList.size() > 0) {
|
|
if (existCodeList.size() > 0) {
|
|
String collect = existCodeList.stream().collect(Collectors.joining(","));
|
|
String collect = existCodeList.stream().collect(Collectors.joining(","));
|
|
if(key==1){
|
|
if(key==1){
|
|
- msg.data += "自动更新"+existCodeList.size()+"条已存在项目编码:"+collect;
|
|
|
|
- }else msg.data += "自动跳过"+existCodeList.size()+"条已存在项目编码:"+collect;
|
|
|
|
|
|
+ //msg.data += "自动更新"+existCodeList.size()+"条已存在项目编码:"+collect;
|
|
|
|
+ msg.data += MessageUtils.message("data.upSkip",existCodeList.size(),collect);
|
|
|
|
+ }else msg.data += MessageUtils.message("data.upSkip",existCodeList.size(),collect);
|
|
}
|
|
}
|
|
OperationRecord operationRecord=new OperationRecord();
|
|
OperationRecord operationRecord=new OperationRecord();
|
|
operationRecord.setCompanyId(user.getCompanyId());
|
|
operationRecord.setCompanyId(user.getCompanyId());
|
|
@@ -3380,7 +3404,8 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
if (plate12 != null)plate12.setCellType(CellType.STRING);
|
|
if (plate12 != null)plate12.setCellType(CellType.STRING);
|
|
|
|
|
|
if (nameCell == null) {//项目名称为空的直接跳过
|
|
if (nameCell == null) {//项目名称为空的直接跳过
|
|
- throw new Exception("项目名称不能为空");
|
|
|
|
|
|
+ //throw new Exception("项目名称不能为空");
|
|
|
|
+ throw new Exception(MessageUtils.message("project.emptyNameError"));
|
|
}
|
|
}
|
|
Project project = new Project();
|
|
Project project = new Project();
|
|
boolean exists=false;
|
|
boolean exists=false;
|
|
@@ -3389,11 +3414,13 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
if (code.equals("项目编号") && rowIndex == 0) {
|
|
if (code.equals("项目编号") && rowIndex == 0) {
|
|
//检查是否有子项目列
|
|
//检查是否有子项目列
|
|
if (subNameCell!=null&&!subNameCell.getStringCellValue().trim().startsWith("子项目")&&timeType.getMainProjectState()!=1) {
|
|
if (subNameCell!=null&&!subNameCell.getStringCellValue().trim().startsWith("子项目")&&timeType.getMainProjectState()!=1) {
|
|
- throw new Exception("缺少子项目列,请下载最新模板");
|
|
|
|
|
|
+ //throw new Exception("缺少子项目列,请下载最新模板");
|
|
|
|
+ throw new Exception(MessageUtils.message("Template.lackSonProject"));
|
|
}
|
|
}
|
|
//检查是否有主项目列
|
|
//检查是否有主项目列
|
|
if (mainNameCell!=null&&!mainNameCell.getStringCellValue().trim().startsWith("主项目")&&timeType.getMainProjectState()==1) {
|
|
if (mainNameCell!=null&&!mainNameCell.getStringCellValue().trim().startsWith("主项目")&&timeType.getMainProjectState()==1) {
|
|
- throw new Exception("缺少主项目列,请下载最新模板");
|
|
|
|
|
|
+ //throw new Exception("缺少主项目列,请下载最新模板");
|
|
|
|
+ throw new Exception(MessageUtils.message("Template.lackMasterRow"));
|
|
}
|
|
}
|
|
//跳过第一行标题
|
|
//跳过第一行标题
|
|
continue;
|
|
continue;
|
|
@@ -3487,7 +3514,8 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
if(!StringUtils.isEmpty(stringCellValue)){
|
|
if(!StringUtils.isEmpty(stringCellValue)){
|
|
Optional<Department> first = departmentList.stream().filter(dl -> dl.getDepartmentName().equals(stringCellValue)).findFirst();
|
|
Optional<Department> first = departmentList.stream().filter(dl -> dl.getDepartmentName().equals(stringCellValue)).findFirst();
|
|
if(!first.isPresent()){
|
|
if(!first.isPresent()){
|
|
- msg.setError("部门["+stringCellValue+"]不存在");
|
|
|
|
|
|
+ //msg.setError("部门["+stringCellValue+"]不存在");
|
|
|
|
+ msg.setError(MessageUtils.message("department.notExist",stringCellValue));
|
|
return msg;
|
|
return msg;
|
|
}else {
|
|
}else {
|
|
project.setDeptId(first.get().getDepartmentId());
|
|
project.setDeptId(first.get().getDepartmentId());
|
|
@@ -3502,7 +3530,8 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
if(!StringUtils.isEmpty(cellStringCellValue)){
|
|
if(!StringUtils.isEmpty(cellStringCellValue)){
|
|
Optional<CustomerInfo> first = customerInfoList.stream().filter(ci -> ci.getCustomerName().equals(cellStringCellValue)).findFirst();
|
|
Optional<CustomerInfo> first = customerInfoList.stream().filter(ci -> ci.getCustomerName().equals(cellStringCellValue)).findFirst();
|
|
if(!first.isPresent()){
|
|
if(!first.isPresent()){
|
|
- msg.setError("客户["+cellStringCellValue+"]不存在");
|
|
|
|
|
|
+ //msg.setError("客户["+cellStringCellValue+"]不存在");
|
|
|
|
+ msg.setError(MessageUtils.message("expense.notExist",cellStringCellValue));
|
|
return msg;
|
|
return msg;
|
|
}else {
|
|
}else {
|
|
project.setCustomerId(first.get().getId());
|
|
project.setCustomerId(first.get().getId());
|
|
@@ -3537,7 +3566,8 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
String curProviderName = split[i1].trim();
|
|
String curProviderName = split[i1].trim();
|
|
Optional<ProviderInfo> first = providerInfoList.stream().filter(pd -> pd.getProviderName().equals(curProviderName)&&pd.getProviderCategoryId().equals(categoryId)).findFirst();
|
|
Optional<ProviderInfo> first = providerInfoList.stream().filter(pd -> pd.getProviderName().equals(curProviderName)&&pd.getProviderCategoryId().equals(categoryId)).findFirst();
|
|
if(!first.isPresent()){
|
|
if(!first.isPresent()){
|
|
- msg.setError("供应商["+curProviderName+"]在供应商分类["+providerCategoryList.get(j).getProviderCategoryName()+"]不存在");
|
|
|
|
|
|
+ //msg.setError("供应商["+curProviderName+"]在供应商分类["+providerCategoryList.get(j).getProviderCategoryName()+"]不存在");
|
|
|
|
+ msg.setError(MessageUtils.message("supplier.noExist",curProviderName,providerCategoryList.get(j).getProviderCategoryName()));
|
|
return msg;
|
|
return msg;
|
|
}else {
|
|
}else {
|
|
if(i1==split.length-1){
|
|
if(i1==split.length-1){
|
|
@@ -3609,7 +3639,8 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
project.setCategory(first.get().getCategoryId());
|
|
project.setCategory(first.get().getCategoryId());
|
|
project.setCategoryName(first.get().getCategoryName());
|
|
project.setCategoryName(first.get().getCategoryName());
|
|
}else {
|
|
}else {
|
|
- msg.setError("主项目["+mainName+"]不存在");
|
|
|
|
|
|
+ //msg.setError("主项目["+mainName+"]不存在");
|
|
|
|
+ msg.setError(MessageUtils.message("project.masterProjectNull",mainName));
|
|
return msg;
|
|
return msg;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -3979,12 +4010,14 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- msg.data = "成功导入"+importCount+"条数据。";
|
|
|
|
|
|
+ //msg.data = "成功导入"+importCount+"条数据。";
|
|
|
|
+ msg.data = MessageUtils.message("data.importSucRow",importCount);
|
|
if (existCodeList.size() > 0) {
|
|
if (existCodeList.size() > 0) {
|
|
String collect = existCodeList.stream().collect(Collectors.joining(","));
|
|
String collect = existCodeList.stream().collect(Collectors.joining(","));
|
|
if(key==1){
|
|
if(key==1){
|
|
- msg.data += "自动更新"+existCodeList.size()+"条已存在项目编码:"+collect;
|
|
|
|
- }else msg.data += "自动跳过"+existCodeList.size()+"条已存在项目编码:"+collect;
|
|
|
|
|
|
+ //msg.data += "自动更新"+existCodeList.size()+"条已存在项目编码:"+collect;
|
|
|
|
+ msg.data += MessageUtils.message("data.upSkip",existCodeList.size(),collect);
|
|
|
|
+ }else msg.data += MessageUtils.message("data.upSkip",existCodeList.size(),collect);
|
|
}
|
|
}
|
|
OperationRecord operationRecord=new OperationRecord();
|
|
OperationRecord operationRecord=new OperationRecord();
|
|
operationRecord.setCompanyId(user.getCompanyId());
|
|
operationRecord.setCompanyId(user.getCompanyId());
|
|
@@ -3996,22 +4029,27 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
}
|
|
}
|
|
} catch (IOException e) {
|
|
} catch (IOException e) {
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
- msg.setError("文件处理出错");
|
|
|
|
|
|
+ //msg.setError("文件处理出错");
|
|
|
|
+ msg.setError(MessageUtils.message("file.error"));
|
|
return msg;
|
|
return msg;
|
|
} catch (NullPointerException e) {
|
|
} catch (NullPointerException e) {
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
- msg.setError("数据格式有误或存在空数据 导入失败");
|
|
|
|
|
|
+ //msg.setError("数据格式有误或存在空数据 导入失败");
|
|
|
|
+ msg.setError(MessageUtils.message("file.dataFormatError"));
|
|
return msg;
|
|
return msg;
|
|
}catch (InvalidFormatException e) {
|
|
}catch (InvalidFormatException e) {
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
- msg.setError("文件格式错误,如果安装了加密软件需要先解密再上传");
|
|
|
|
|
|
+ //msg.setError("文件格式错误,如果安装了加密软件需要先解密再上传");
|
|
|
|
+ msg.setError(MessageUtils.message("file.FormatErrorAndDecrypt"));
|
|
}catch (EncryptedDocumentException e) {
|
|
}catch (EncryptedDocumentException e) {
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
- msg.setError("文件加密状态,需要先解除加密状态再上传");
|
|
|
|
|
|
+ //msg.setError("文件加密状态,需要先解除加密状态再上传");
|
|
|
|
+ msg.setError(MessageUtils.message("file.encryption"));
|
|
return msg;
|
|
return msg;
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
- msg.setError("上传失败:"+e.getMessage());
|
|
|
|
|
|
+ //msg.setError("上传失败:"+e.getMessage());
|
|
|
|
+ msg.setError(MessageUtils.message("file.uploadError",e.getMessage()));
|
|
return msg;
|
|
return msg;
|
|
} finally {
|
|
} finally {
|
|
//关闭流
|
|
//关闭流
|
|
@@ -4323,7 +4361,8 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
httpRespMsg.data = resultMap;
|
|
httpRespMsg.data = resultMap;
|
|
|
|
|
|
} catch (NullPointerException e) {
|
|
} catch (NullPointerException e) {
|
|
- httpRespMsg.setError("验证失败");
|
|
|
|
|
|
+ //httpRespMsg.setError("验证失败");
|
|
|
|
+ httpRespMsg.setError(MessageUtils.message("access.verificationError"));
|
|
return httpRespMsg;
|
|
return httpRespMsg;
|
|
}
|
|
}
|
|
return httpRespMsg;
|
|
return httpRespMsg;
|
|
@@ -4409,7 +4448,8 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
httpRespMsg.data = resp;
|
|
httpRespMsg.data = resp;
|
|
} catch (NullPointerException e) {
|
|
} catch (NullPointerException e) {
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
- httpRespMsg.setError("验证失败");
|
|
|
|
|
|
+ //httpRespMsg.setError("验证失败");
|
|
|
|
+ httpRespMsg.setError(MessageUtils.message("access.verificationError"));
|
|
return httpRespMsg;
|
|
return httpRespMsg;
|
|
}
|
|
}
|
|
return httpRespMsg;
|
|
return httpRespMsg;
|
|
@@ -4539,10 +4579,12 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
project.setAssociateDegreeNames(associateDegreeNames);
|
|
project.setAssociateDegreeNames(associateDegreeNames);
|
|
projectMapper.update(project, new QueryWrapper<Project>().in("id", array));
|
|
projectMapper.update(project, new QueryWrapper<Project>().in("id", array));
|
|
} else {
|
|
} else {
|
|
- msg.setError("项目不能为空");
|
|
|
|
|
|
+ //msg.setError("项目不能为空");
|
|
|
|
+ msg.setError(MessageUtils.message("project.emptyError"));
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
- msg.setError("项目不能为空");
|
|
|
|
|
|
+ //msg.setError("项目不能为空");
|
|
|
|
+ msg.setError(MessageUtils.message("project.emptyError"));
|
|
}
|
|
}
|
|
|
|
|
|
return msg;
|
|
return msg;
|
|
@@ -4616,10 +4658,12 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
updateBatchById(proUpdateList);
|
|
updateBatchById(proUpdateList);
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
- msg.setError("项目不能为空");
|
|
|
|
|
|
+ //msg.setError("项目不能为空");
|
|
|
|
+ msg.setError(MessageUtils.message("project.emptyError"));
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
- msg.setError("项目不能为空");
|
|
|
|
|
|
+ //msg.setError("项目不能为空");
|
|
|
|
+ msg.setError(MessageUtils.message("project.emptyError"));
|
|
}
|
|
}
|
|
|
|
|
|
return msg;
|
|
return msg;
|
|
@@ -5020,7 +5064,8 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
|
|
|
|
|
|
|
|
} catch (NullPointerException e) {
|
|
} catch (NullPointerException e) {
|
|
- httpRespMsg.setError("验证失败");
|
|
|
|
|
|
+ //httpRespMsg.setError("验证失败");
|
|
|
|
+ httpRespMsg.setError(MessageUtils.message("access.verificationError"));
|
|
return httpRespMsg;
|
|
return httpRespMsg;
|
|
}
|
|
}
|
|
return httpRespMsg;
|
|
return httpRespMsg;
|
|
@@ -5172,7 +5217,8 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
httpRespMsg.data = resp;
|
|
httpRespMsg.data = resp;
|
|
} catch (NullPointerException e) {
|
|
} catch (NullPointerException e) {
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
- httpRespMsg.setError("验证失败");
|
|
|
|
|
|
+ //httpRespMsg.setError("验证失败");
|
|
|
|
+ httpRespMsg.setError(MessageUtils.message("access.verificationError"));
|
|
return httpRespMsg;
|
|
return httpRespMsg;
|
|
}
|
|
}
|
|
return httpRespMsg;
|
|
return httpRespMsg;
|
|
@@ -5683,7 +5729,8 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
//校验项目归属
|
|
//校验项目归属
|
|
Integer companyId = projectMapper.selectById(integer).getCompanyId();
|
|
Integer companyId = projectMapper.selectById(integer).getCompanyId();
|
|
if (companyId.intValue() != user.getCompanyId().intValue()) {
|
|
if (companyId.intValue() != user.getCompanyId().intValue()) {
|
|
- httpRespMsg.setError("无权操作");
|
|
|
|
|
|
+ //httpRespMsg.setError("无权操作");
|
|
|
|
+ httpRespMsg.setError(MessageUtils.message("access.operationError"));
|
|
} else {
|
|
} else {
|
|
for (Integer id : array) {
|
|
for (Integer id : array) {
|
|
System.out.println("删除项目id=="+id);
|
|
System.out.println("删除项目id=="+id);
|
|
@@ -5708,7 +5755,8 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
contractModifyRecord.setReason(reason);
|
|
contractModifyRecord.setReason(reason);
|
|
contractModifyRecord.setEditUserId(user.getId());
|
|
contractModifyRecord.setEditUserId(user.getId());
|
|
if(contractModifyRecordMapper.insert(contractModifyRecord)<=0){
|
|
if(contractModifyRecordMapper.insert(contractModifyRecord)<=0){
|
|
- httpRespMsg.setError("验证失败");
|
|
|
|
|
|
+ //httpRespMsg.setError("验证失败");
|
|
|
|
+ httpRespMsg.setError(MessageUtils.message("access.verificationError"));
|
|
return httpRespMsg;
|
|
return httpRespMsg;
|
|
}
|
|
}
|
|
return httpRespMsg;
|
|
return httpRespMsg;
|
|
@@ -5851,7 +5899,8 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
}
|
|
}
|
|
} catch (NullPointerException e) {
|
|
} catch (NullPointerException e) {
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
- httpRespMsg.setError("验证失败");
|
|
|
|
|
|
+ //httpRespMsg.setError("验证失败");
|
|
|
|
+ httpRespMsg.setError(MessageUtils.message("access.verificationError"));
|
|
return httpRespMsg;
|
|
return httpRespMsg;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -5865,7 +5914,8 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
Integer companyId = userMapper.selectById(request.getHeader("Token")).getCompanyId();
|
|
Integer companyId = userMapper.selectById(request.getHeader("Token")).getCompanyId();
|
|
//首先查看有无浏览权限
|
|
//首先查看有无浏览权限
|
|
if (!projectMapper.selectById(projectId).getCompanyId().equals(companyId)) {
|
|
if (!projectMapper.selectById(projectId).getCompanyId().equals(companyId)) {
|
|
- httpRespMsg.setError("无权查看其他公司的项目详情");
|
|
|
|
|
|
+ //httpRespMsg.setError("无权查看其他公司的项目详情");
|
|
|
|
+ httpRespMsg.setError(MessageUtils.message("access.otherCompanyProject"));
|
|
} else {
|
|
} else {
|
|
Map<String, Object> resultMap = new HashMap<>();
|
|
Map<String, Object> resultMap = new HashMap<>();
|
|
List<Map<String, Object>> list = projectMapper.getCostByGroup(startDate, endDate, projectId);
|
|
List<Map<String, Object>> list = projectMapper.getCostByGroup(startDate, endDate, projectId);
|
|
@@ -5882,7 +5932,8 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
httpRespMsg.data = resultMap;
|
|
httpRespMsg.data = resultMap;
|
|
}
|
|
}
|
|
} catch (NullPointerException e) {
|
|
} catch (NullPointerException e) {
|
|
- httpRespMsg.setError("验证失败");
|
|
|
|
|
|
+ //httpRespMsg.setError("验证失败");
|
|
|
|
+ httpRespMsg.setError(MessageUtils.message("access.verificationError"));
|
|
return httpRespMsg;
|
|
return httpRespMsg;
|
|
}
|
|
}
|
|
return httpRespMsg;
|
|
return httpRespMsg;
|
|
@@ -6260,7 +6311,8 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
if (!StringUtils.isEmpty(code)) {
|
|
if (!StringUtils.isEmpty(code)) {
|
|
int cnt = projectMapper.selectCount(new QueryWrapper<Project>().eq("project_code", code).eq("company_id", user.getCompanyId()));
|
|
int cnt = projectMapper.selectCount(new QueryWrapper<Project>().eq("project_code", code).eq("company_id", user.getCompanyId()));
|
|
if (cnt <= 0) {
|
|
if (cnt <= 0) {
|
|
- msg.setError("项目编号["+code+"]不存在");
|
|
|
|
|
|
+ //msg.setError("项目编号["+code+"]不存在");
|
|
|
|
+ msg.setError(MessageUtils.message("project.idOrNameNoExist",code));
|
|
return msg;
|
|
return msg;
|
|
}
|
|
}
|
|
List<Project> projectList = projectMapper.selectList(new QueryWrapper<Project>().eq("project_code", code).eq("company_id", user.getCompanyId()));
|
|
List<Project> projectList = projectMapper.selectList(new QueryWrapper<Project>().eq("project_code", code).eq("company_id", user.getCompanyId()));
|
|
@@ -6269,14 +6321,16 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
if(nameCell!=null){
|
|
if(nameCell!=null){
|
|
String name = nameCell.getStringCellValue();
|
|
String name = nameCell.getStringCellValue();
|
|
if(StringUtils.isEmpty(name)){
|
|
if(StringUtils.isEmpty(name)){
|
|
- msg.setError("项目编号为["+code+"]的项目名称为["+name+"]的项目不存在");
|
|
|
|
|
|
+ //msg.setError("项目编号为["+code+"]的项目名称为["+name+"]的项目不存在");
|
|
|
|
+ msg.setError(MessageUtils.message("project.nameAndIdNoExist",code,name));
|
|
return msg;
|
|
return msg;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if(groupCell!=null){
|
|
if(groupCell!=null){
|
|
List<TaskGroup> groupList = taskGroupMapper.selectList(new QueryWrapper<TaskGroup>().eq("project_id", project.getId()).eq("name", groupCell.getStringCellValue()));
|
|
List<TaskGroup> groupList = taskGroupMapper.selectList(new QueryWrapper<TaskGroup>().eq("project_id", project.getId()).eq("name", groupCell.getStringCellValue()));
|
|
if(groupList.size()<=0){
|
|
if(groupList.size()<=0){
|
|
- msg.setError("项目名称为["+project.getProjectName()+"]的任务分组["+groupCell.getStringCellValue()+"]不存在");
|
|
|
|
|
|
+ //msg.setError("项目名称为["+project.getProjectName()+"]的任务分组["+groupCell.getStringCellValue()+"]不存在");
|
|
|
|
+ msg.setError(MessageUtils.message("project.nameAndGroupNoExist",project.getProjectName(),groupCell.getStringCellValue()));
|
|
return msg;
|
|
return msg;
|
|
}
|
|
}
|
|
TaskGroup taskGroup = groupList.get(0);
|
|
TaskGroup taskGroup = groupList.get(0);
|
|
@@ -6313,13 +6367,15 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
List<Project> projectList = projectMapper.selectList(new QueryWrapper<Project>().eq("project_name", name).eq("company_id", user.getCompanyId()));
|
|
List<Project> projectList = projectMapper.selectList(new QueryWrapper<Project>().eq("project_name", name).eq("company_id", user.getCompanyId()));
|
|
Project project = projectList.get(0);
|
|
Project project = projectList.get(0);
|
|
if(StringUtils.isEmpty(name)){
|
|
if(StringUtils.isEmpty(name)){
|
|
- msg.setError("项目名称为["+name+"]的项目不存在");
|
|
|
|
|
|
+ //msg.setError("项目名称为["+name+"]的项目不存在");
|
|
|
|
+ msg.setError(MessageUtils.message("project.idOrNameNoExist",name));
|
|
return msg;
|
|
return msg;
|
|
}
|
|
}
|
|
if(groupCell!=null){
|
|
if(groupCell!=null){
|
|
List<TaskGroup> groupList = taskGroupMapper.selectList(new QueryWrapper<TaskGroup>().eq("project_id", project.getId()).eq("name", groupCell.getStringCellValue()));
|
|
List<TaskGroup> groupList = taskGroupMapper.selectList(new QueryWrapper<TaskGroup>().eq("project_id", project.getId()).eq("name", groupCell.getStringCellValue()));
|
|
if(groupList.size()<=0){
|
|
if(groupList.size()<=0){
|
|
- msg.setError("项目名称为["+project.getProjectName()+"]的任务分组["+groupCell.getStringCellValue()+"]不存在");
|
|
|
|
|
|
+ //msg.setError("项目名称为["+project.getProjectName()+"]的任务分组["+groupCell.getStringCellValue()+"]不存在");
|
|
|
|
+ msg.setError(MessageUtils.message("project.nameAndGroupNoExist",project.getProjectName(),groupCell.getStringCellValue()));
|
|
return msg;
|
|
return msg;
|
|
}
|
|
}
|
|
TaskGroup taskGroup = groupList.get(0);
|
|
TaskGroup taskGroup = groupList.get(0);
|
|
@@ -6351,25 +6407,31 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- msg.data = "成功导入" + importCount + "条数据。";
|
|
|
|
|
|
+ //msg.data = "成功导入" + importCount + "条数据。";
|
|
|
|
+ msg.data = MessageUtils.message("data.importSucRow",importCount);
|
|
}catch(IOException e){
|
|
}catch(IOException e){
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
- msg.setError("文件处理出错");
|
|
|
|
|
|
+ //msg.setError("文件处理出错");
|
|
|
|
+ msg.setError(MessageUtils.message("file.error"));
|
|
return msg;
|
|
return msg;
|
|
} catch(NullPointerException e){
|
|
} catch(NullPointerException e){
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
- msg.setError("数据格式有误或存在空数据 导入失败");
|
|
|
|
|
|
+ //msg.setError("数据格式有误或存在空数据 导入失败");
|
|
|
|
+ msg.setError(MessageUtils.message("file.dataFormatError"));
|
|
return msg;
|
|
return msg;
|
|
}catch(InvalidFormatException e){
|
|
}catch(InvalidFormatException e){
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
- msg.setError("文件格式错误,如果安装了加密软件需要先解密再上传");
|
|
|
|
|
|
+ //msg.setError("文件格式错误,如果安装了加密软件需要先解密再上传");
|
|
|
|
+ msg.setError(MessageUtils.message("file.FormatErrorAndDecrypt"));
|
|
}catch(EncryptedDocumentException e){
|
|
}catch(EncryptedDocumentException e){
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
- msg.setError("文件加密状态,需要先解除加密状态再上传");
|
|
|
|
|
|
+ //msg.setError("文件加密状态,需要先解除加密状态再上传");
|
|
|
|
+ msg.setError(MessageUtils.message("file.encryption"));
|
|
return msg;
|
|
return msg;
|
|
} catch(Exception e){
|
|
} catch(Exception e){
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
- msg.setError("上传失败:" + e.getMessage());
|
|
|
|
|
|
+ //msg.setError("上传失败:" + e.getMessage());
|
|
|
|
+ msg.setError(MessageUtils.message("file.uploadError",e.getMessage()));
|
|
return msg;
|
|
return msg;
|
|
} finally{
|
|
} finally{
|
|
//关闭流
|
|
//关闭流
|
|
@@ -6403,7 +6465,8 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
for (Project project : projectList) {
|
|
for (Project project : projectList) {
|
|
project.setInchargerId(inchargerId);
|
|
project.setInchargerId(inchargerId);
|
|
if(projectMapper.updateById(project)<=0){
|
|
if(projectMapper.updateById(project)<=0){
|
|
- httpRespMsg.setError("操作失败");
|
|
|
|
|
|
+ //httpRespMsg.setError("操作失败");
|
|
|
|
+ httpRespMsg.setError(MessageUtils.message("other.operationFail"));
|
|
return httpRespMsg;
|
|
return httpRespMsg;
|
|
}
|
|
}
|
|
boolean b = participationList.stream().anyMatch(pl -> pl.getProjectId().equals(project.getId()) && pl.getUserId().equals(inchargerId));
|
|
boolean b = participationList.stream().anyMatch(pl -> pl.getProjectId().equals(project.getId()) && pl.getUserId().equals(inchargerId));
|
|
@@ -6494,12 +6557,14 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
HttpRespMsg msg=new HttpRespMsg();
|
|
HttpRespMsg msg=new HttpRespMsg();
|
|
List<ThirdPartyInterface> thirdPartyInterfaceList = thirdPartyInterfaceService.list(new QueryWrapper<ThirdPartyInterface>().eq("token", token));
|
|
List<ThirdPartyInterface> thirdPartyInterfaceList = thirdPartyInterfaceService.list(new QueryWrapper<ThirdPartyInterface>().eq("token", token));
|
|
if(thirdPartyInterfaceList.size()==0){
|
|
if(thirdPartyInterfaceList.size()==0){
|
|
- msg.setError("token错误");
|
|
|
|
|
|
+ //msg.setError("token错误");
|
|
|
|
+ msg.setError(MessageUtils.message("other.tokenError"));
|
|
return msg;
|
|
return msg;
|
|
}
|
|
}
|
|
ThirdPartyInterface thirdPartyInterface = thirdPartyInterfaceList.get(0);
|
|
ThirdPartyInterface thirdPartyInterface = thirdPartyInterfaceList.get(0);
|
|
if(LocalDateTime.now().isAfter(thirdPartyInterface.getExpireTime())){
|
|
if(LocalDateTime.now().isAfter(thirdPartyInterface.getExpireTime())){
|
|
- msg.setError("token过期失效");
|
|
|
|
|
|
+ //msg.setError("token过期失效");
|
|
|
|
+ msg.setError(MessageUtils.message("other.tokenOverdue"));
|
|
return msg;
|
|
return msg;
|
|
}
|
|
}
|
|
List<Project> allProject = projectMapper.selectList(new QueryWrapper<Project>().eq("company_id", thirdPartyInterface.getCompanyId()));
|
|
List<Project> allProject = projectMapper.selectList(new QueryWrapper<Project>().eq("company_id", thirdPartyInterface.getCompanyId()));
|
|
@@ -6514,12 +6579,14 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if(updateBatchById(changeProjectList)){
|
|
if(updateBatchById(changeProjectList)){
|
|
- message+="成功更新"+changeProjectList.size()+"条项目数据";
|
|
|
|
|
|
+ //message+="成功更新"+changeProjectList.size()+"条项目数据";
|
|
|
|
+ message+=MessageUtils.message("project.upDataSuc",changeProjectList.size());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if(projectSeparateList!=null&&projectSeparateList.size()>0){
|
|
if(projectSeparateList!=null&&projectSeparateList.size()>0){
|
|
if(projectSeparateService.updateBatchById(projectSeparateList)){
|
|
if(projectSeparateService.updateBatchById(projectSeparateList)){
|
|
- message+="成功更新"+projectSeparateList.size()+"条项目子表数据";
|
|
|
|
|
|
+ //message+="成功更新"+projectSeparateList.size()+"条项目子表数据";
|
|
|
|
+ message+=MessageUtils.message("project.upSonSuc",projectSeparateList.size());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
msg.data=message;
|
|
msg.data=message;
|