|
@@ -6481,95 +6481,91 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
|
|
|
} else if (String.valueOf(map.get("state")).equals("-1")) {
|
|
|
item.add("导入待审核");
|
|
|
} else {
|
|
|
- //部门审核
|
|
|
- if (String.valueOf(map.get("isDeptAudit")).equals("1") && timeType.getReportAuditType() != 7) {
|
|
|
- String deptAuditorId = map.get("deptAuditorName") + "";
|
|
|
- String departmentName = map.get("departmentName") + "";
|
|
|
- for (User userItem : userList) {
|
|
|
- if (userItem.getId().equals(deptAuditorId)) {
|
|
|
- if (needCorpWxTranslate) {
|
|
|
- String deptAuditorName = "$userName=" + userItem.getCorpwxRealUserid() + "$";
|
|
|
- departmentName = "$departmentName=" + departmentName + "$";
|
|
|
- if (timeType.getReportAuditType() == 4) {
|
|
|
- departmentName = map.get("buDepartmentName") + "";
|
|
|
- departmentName = "$departmentName=" + departmentName + "$";
|
|
|
- item.add("待项目所属BU[" + departmentName + "](" + deptAuditorName + ")审核");
|
|
|
- } else {
|
|
|
- item.add("待" + departmentName + "(" + deptAuditorName + ")审核");
|
|
|
- }
|
|
|
- }else if (dingding!=null&&dingding.getContactNeedTranslate()==1) {
|
|
|
- String deptAuditorName = "$userName=" + userItem.getDingdingUserid() + "$";
|
|
|
- departmentName = "$departmentName=" + departmentName + "$";
|
|
|
- if (timeType.getReportAuditType() == 4) {
|
|
|
- departmentName = map.get("buDepartmentName") + "";
|
|
|
- departmentName = "$departmentName=" + departmentName + "$";
|
|
|
- item.add("待项目所属BU[" + departmentName + "](" + deptAuditorName + ")审核");
|
|
|
- } else {
|
|
|
- item.add("待" + departmentName + "(" + deptAuditorName + ")审核");
|
|
|
+ //项目和部门并行审核模式
|
|
|
+ if (timeType.getReportAuditType() == 7) {
|
|
|
+ String str = "待";
|
|
|
+ if (String.valueOf(map.get("projectAuditState")).equals("0")) {
|
|
|
+ String projectAuditorName = map.get("projectAuditorName") + "";
|
|
|
+ if (needCorpWxTranslate) {
|
|
|
+ for (User userItem : userList) {
|
|
|
+ if (userItem.getId().equals(map.get("projectAuditorId"))) {
|
|
|
+ projectAuditorName = "$userName=" + userItem.getCorpwxRealUserid() + "$";
|
|
|
+ break;
|
|
|
}
|
|
|
- } else {
|
|
|
- if (timeType.getReportAuditType() == 4) {
|
|
|
- departmentName = map.get("buDepartmentName") + "";
|
|
|
- item.add("待项目所属BU[" + departmentName + "](" + userItem.getName() + ")审核");
|
|
|
- } else {
|
|
|
- item.add("待" + departmentName + "(" + userItem.getName() + ")审核");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ str += "项目审核人("+projectAuditorName+")";
|
|
|
+ }
|
|
|
+ if (String.valueOf(map.get("departmentAuditState")).equals("0")) {
|
|
|
+ String deptAuditorId = map.get("deptAuditorName") + "";
|
|
|
+ for (User userItem : userList) {
|
|
|
+ if (userItem.getId().equals(deptAuditorId)) {
|
|
|
+ String deptAuditorName = userItem.getName();
|
|
|
+ if (needCorpWxTranslate) {
|
|
|
+ deptAuditorName = "$userName=" + userItem.getCorpwxRealUserid() + "$";
|
|
|
}
|
|
|
+ if (str.length() > 1) str += "、";
|
|
|
+ str += "部门审核人("+deptAuditorName+")";
|
|
|
+ break;
|
|
|
}
|
|
|
- break;
|
|
|
}
|
|
|
}
|
|
|
+ str += "审核";
|
|
|
+ item.add(str);
|
|
|
} else {
|
|
|
- //项目审核或分组审核
|
|
|
- if (timeType.getReportAuditType() == 7) {
|
|
|
- //项目和部门并行审核模式
|
|
|
- String str = "待";
|
|
|
- if (String.valueOf(map.get("projectAuditState")).equals("0")) {
|
|
|
- String projectAuditorName = map.get("projectAuditorName") + "";
|
|
|
- if (needCorpWxTranslate) {
|
|
|
- for (User userItem : userList) {
|
|
|
- if (userItem.getId().equals(map.get("projectAuditorId"))) {
|
|
|
- projectAuditorName = "$userName=" + userItem.getCorpwxRealUserid() + "$";
|
|
|
- break;
|
|
|
+ if (String.valueOf(map.get("isDeptAudit")).equals("1")) {
|
|
|
+ String deptAuditorId = map.get("deptAuditorName") + "";
|
|
|
+ String departmentName = map.get("departmentName") + "";
|
|
|
+ for (User userItem : userList) {
|
|
|
+ if (userItem.getId().equals(deptAuditorId)) {
|
|
|
+ if (needCorpWxTranslate) {
|
|
|
+ String deptAuditorName = "$userName=" + userItem.getCorpwxRealUserid() + "$";
|
|
|
+ departmentName = "$departmentName=" + departmentName + "$";
|
|
|
+ if (timeType.getReportAuditType() == 4) {
|
|
|
+ departmentName = map.get("buDepartmentName") + "";
|
|
|
+ departmentName = "$departmentName=" + departmentName + "$";
|
|
|
+ item.add("待项目所属BU[" + departmentName + "](" + deptAuditorName + ")审核");
|
|
|
+ } else {
|
|
|
+ item.add("待" + departmentName + "(" + deptAuditorName + ")审核");
|
|
|
+ }
|
|
|
+ }else if (dingding!=null&&dingding.getContactNeedTranslate()==1) {
|
|
|
+ String deptAuditorName = "$userName=" + userItem.getDingdingUserid() + "$";
|
|
|
+ departmentName = "$departmentName=" + departmentName + "$";
|
|
|
+ if (timeType.getReportAuditType() == 4) {
|
|
|
+ departmentName = map.get("buDepartmentName") + "";
|
|
|
+ departmentName = "$departmentName=" + departmentName + "$";
|
|
|
+ item.add("待项目所属BU[" + departmentName + "](" + deptAuditorName + ")审核");
|
|
|
+ } else {
|
|
|
+ item.add("待" + departmentName + "(" + deptAuditorName + ")审核");
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (timeType.getReportAuditType() == 4) {
|
|
|
+ departmentName = map.get("buDepartmentName") + "";
|
|
|
+ item.add("待项目所属BU[" + departmentName + "](" + userItem.getName() + ")审核");
|
|
|
+ } else {
|
|
|
+ item.add("待" + departmentName + "(" + userItem.getName() + ")审核");
|
|
|
}
|
|
|
}
|
|
|
+ break;
|
|
|
}
|
|
|
- str += "项目审核人("+projectAuditorName+")";
|
|
|
}
|
|
|
- if (String.valueOf(map.get("departmentAuditState")).equals("0")) {
|
|
|
- String deptAuditorId = map.get("deptAuditorName") + "";
|
|
|
+ } else if (String.valueOf(map.get("projectAuditState")).equals("0") || String.valueOf(map.get("groupAuditState")).equals("0")) {
|
|
|
+ String projectAuditorName = map.get("projectAuditorName") + "";
|
|
|
+ String projectAuditorId = map.get("projectAuditorId") + "";
|
|
|
+ if (needCorpWxTranslate||(dingding!=null&&dingding.getContactNeedTranslate()==1)) {
|
|
|
for (User userItem : userList) {
|
|
|
- if (userItem.getId().equals(deptAuditorId)) {
|
|
|
- String deptAuditorName = userItem.getName();
|
|
|
- if (needCorpWxTranslate) {
|
|
|
- deptAuditorName = "$userName=" + userItem.getCorpwxRealUserid() + "$";
|
|
|
+ if (userItem.getId().equals(projectAuditorId)) {
|
|
|
+ if(needCorpWxTranslate){
|
|
|
+ projectAuditorName = "$userName=" + userItem.getCorpwxUserid() + "$";
|
|
|
+ }else if(dingding!=null&&dingding.getContactNeedTranslate()==1){
|
|
|
+ projectAuditorName = "$userName=" + userItem.getDingdingUserid() + "$";
|
|
|
}
|
|
|
- if (str.length() > 1) str += "、";
|
|
|
- str += "部门审核人("+deptAuditorName+")";
|
|
|
+ item.add("待"+(companyId == 469?"部门主管":"项目审核人") + "(" + projectAuditorName + ")审核");
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
- str += "审核";
|
|
|
- item.add(str);
|
|
|
- } else {
|
|
|
- if (String.valueOf(map.get("projectAuditState")).equals("0") || String.valueOf(map.get("groupAuditState")).equals("0")) {
|
|
|
- String projectAuditorName = map.get("projectAuditorName") + "";
|
|
|
- String projectAuditorId = map.get("projectAuditorId") + "";
|
|
|
- if (needCorpWxTranslate||(dingding!=null&&dingding.getContactNeedTranslate()==1)) {
|
|
|
- for (User userItem : userList) {
|
|
|
- if (userItem.getId().equals(projectAuditorId)) {
|
|
|
- if(needCorpWxTranslate){
|
|
|
- projectAuditorName = "$userName=" + userItem.getCorpwxUserid() + "$";
|
|
|
- }else if(dingding!=null&&dingding.getContactNeedTranslate()==1){
|
|
|
- projectAuditorName = "$userName=" + userItem.getDingdingUserid() + "$";
|
|
|
- }
|
|
|
- item.add("待"+(companyId == 469?"部门主管":"项目审核人") + "(" + projectAuditorName + ")审核");
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
- } else {
|
|
|
- item.add("待"+(companyId == 469?"部门主管":"项目审核人") + "(" + projectAuditorName + ")审核");
|
|
|
- }
|
|
|
+ } else {
|
|
|
+ item.add("待"+(companyId == 469?"部门主管":"项目审核人") + "(" + projectAuditorName + ")审核");
|
|
|
}
|
|
|
}
|
|
|
}
|