|
@@ -8263,26 +8263,11 @@ public class WorkProjectNotifyController extends BaseController {
|
|
return "modules/signatureManagement/electronicSignature/directorApplicationModify";
|
|
return "modules/signatureManagement/electronicSignature/directorApplicationModify";
|
|
}
|
|
}
|
|
} else if ("310".equals(workProjectNotify.getType())) {//提资需求
|
|
} else if ("310".equals(workProjectNotify.getType())) {//提资需求
|
|
- getCapitalDemand(workProjectNotify.getNotifyId(),model);
|
|
|
|
-
|
|
|
|
- if (workProjectNotify.getRemarks().contains("待通知") || "view".equals(workProjectNotify.getView())) {
|
|
|
|
- return "modules/externalUnit/capitalDemandFormView";
|
|
|
|
- } else if (workProjectNotify.getRemarks().contains("待审批") && !"1".equals(workProjectNotify.getStatus())) {
|
|
|
|
- return "modules/externalUnit/capitalDemandFormAudit";
|
|
|
|
- } else if (workProjectNotify.getRemarks().contains("重新申请") && !"1".equals(workProjectNotify.getStatus())) {
|
|
|
|
- return "modules/externalUnit/capitalDemandFormModify";
|
|
|
|
- }
|
|
|
|
|
|
+ String url = getCapitalDemand(workProjectNotify,model);
|
|
|
|
+ return url;
|
|
}else if ("311".equals(workProjectNotify.getType())) {//意见反馈
|
|
}else if ("311".equals(workProjectNotify.getType())) {//意见反馈
|
|
- getFeedback(workProjectNotify.getNotifyId(),model);
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- if (workProjectNotify.getRemarks().contains("待通知") || "view".equals(workProjectNotify.getView())) {
|
|
|
|
- return "modules/externalUnit/feedbackFormView";
|
|
|
|
- } else if (workProjectNotify.getRemarks().contains("待审批") && !"1".equals(workProjectNotify.getStatus())) {
|
|
|
|
- return "modules/externalUnit/feedbackFormAudit";
|
|
|
|
- } else if (workProjectNotify.getRemarks().contains("重新申请") && !"1".equals(workProjectNotify.getStatus())) {
|
|
|
|
- return "modules/externalUnit/feedbackFormModify";
|
|
|
|
- }
|
|
|
|
|
|
+ String url = getFeedback(workProjectNotify,model);
|
|
|
|
+ return url;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -8315,37 +8300,106 @@ public class WorkProjectNotifyController extends BaseController {
|
|
return "modules/workprojectnotify/workProjectNotifyForm";
|
|
return "modules/workprojectnotify/workProjectNotifyForm";
|
|
}
|
|
}
|
|
|
|
|
|
- private void getFeedback(String notifyId, Model model) {
|
|
|
|
- ExternalUnitFeedback feedback = feedbackService.get(notifyId);
|
|
|
|
- feedback.setHome("home");
|
|
|
|
- feedback.setAct(getByAct(feedback.getProcessInstanceId()));
|
|
|
|
- model.addAttribute("feedback", feedback);
|
|
|
|
|
|
+ private String getFeedback(WorkProjectNotify workProjectNotify, Model model) {
|
|
|
|
+ try {
|
|
|
|
+ ExternalUnitFeedback feedback = feedbackService.get(workProjectNotify.getNotifyId());
|
|
|
|
+ feedback.setHome("home");
|
|
|
|
+ feedback.setAct(getByAct(feedback.getProcessInstanceId()));
|
|
|
|
+ model.addAttribute("feedback", feedback);
|
|
|
|
+
|
|
|
|
+ model.addAttribute("processInstanceId", feedback.getProcessInstanceId());
|
|
|
|
+ if (workProjectNotify.getRemarks().contains("待通知") || "view".equals(workProjectNotify.getView())) {
|
|
|
|
+ return "modules/externalUnit/feedbackFormView";
|
|
|
|
+ } else if (workProjectNotify.getRemarks().contains("待审批") && !"1".equals(workProjectNotify.getStatus())) {
|
|
|
|
+ return "modules/externalUnit/feedbackFormAudit";
|
|
|
|
+ } else if (workProjectNotify.getRemarks().contains("重新申请") && !"1".equals(workProjectNotify.getStatus())) {
|
|
|
|
+ return "modules/externalUnit/feedbackFormModify";
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ catch (Exception e) {
|
|
|
|
+ String strTemp = e.getStackTrace().toString();
|
|
|
|
+ StackTraceElement stackTraceElement = e.getStackTrace()[0];
|
|
|
|
+
|
|
|
|
+ if ("待审批".equals(workProjectNotify.getRemarks())) {
|
|
|
|
+ WorkProjectNotifyRecover workProjectNotifyRecover = new WorkProjectNotifyRecover();
|
|
|
|
+ try {
|
|
|
|
+ //将报错信息保存到待办报错库表中
|
|
|
|
+ MyBeanUtils.copyBeanNotNull2Bean(workProjectNotify, workProjectNotifyRecover);//将编辑表单中的非NULL值覆盖数据库记录中的值
|
|
|
|
+ String exceptionDetails = "报错类=" + stackTraceElement.getFileName() + "; 报错行=" + stackTraceElement.getLineNumber() + "; 报错方法=" + stackTraceElement.getMethodName() + "; 报错内容" + e.toString();
|
|
|
|
+ workProjectNotifyRecover.setExceptionDetails(exceptionDetails);
|
|
|
|
+ workProjectNotifyRecover.setNotifyId(workProjectNotify.getId());
|
|
|
|
+ workProjectNotifyRecover.setCompanyId(UserUtils.getUser().getCompany().getId());
|
|
|
|
+ workProjectNotifyRecoverService.save(workProjectNotifyRecover);
|
|
|
|
+ } catch (Exception exception) {
|
|
|
|
+ exception.printStackTrace();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
|
|
- model.addAttribute("processInstanceId", feedback.getProcessInstanceId());
|
|
|
|
|
|
+ workProjectNotify.setStatus("1");
|
|
|
|
+ workProjectNotify.preUpdate();
|
|
|
|
+ workProjectNotifyService.save(workProjectNotify);
|
|
|
|
+ model.addAttribute("errorMsg", "关联记录已经被删除!!!");
|
|
|
|
+ }
|
|
|
|
+ model.addAttribute("workProjectNotify", workProjectNotify);
|
|
|
|
+ return "modules/workprojectnotify/workProjectNotifyForm";
|
|
}
|
|
}
|
|
|
|
|
|
- private void getCapitalDemand(String notifyId, Model model) {
|
|
|
|
- ExternalUnitCapitalDemand capitalDemand = capitalDemandService.get(notifyId);
|
|
|
|
- capitalDemand.setHome("home");
|
|
|
|
- capitalDemand.setAct(getByAct(capitalDemand.getProcessInstanceId()));
|
|
|
|
- model.addAttribute("capitalDemand", capitalDemand);
|
|
|
|
- //项目组成员
|
|
|
|
- ArrayList<User> users = new ArrayList<>();
|
|
|
|
- String members = capitalDemand.getProject().getProjectMember();
|
|
|
|
- if (StringUtils.isNotBlank(members)) {
|
|
|
|
- if (members.contains(",")) {
|
|
|
|
- String[] split = members.split(",");
|
|
|
|
- for (String s : split) {
|
|
|
|
- User user = UserUtils.get(s);
|
|
|
|
|
|
+ private String getCapitalDemand(WorkProjectNotify workProjectNotify, Model model) {
|
|
|
|
+ try {
|
|
|
|
+ ExternalUnitCapitalDemand capitalDemand = capitalDemandService.get(workProjectNotify.getNotifyId());
|
|
|
|
+ capitalDemand.setHome("home");
|
|
|
|
+ capitalDemand.setAct(getByAct(capitalDemand.getProcessInstanceId()));
|
|
|
|
+ model.addAttribute("capitalDemand", capitalDemand);
|
|
|
|
+ //项目组成员
|
|
|
|
+ ArrayList<User> users = new ArrayList<>();
|
|
|
|
+ String members = capitalDemand.getProject().getProjectMember();
|
|
|
|
+ if (StringUtils.isNotBlank(members)) {
|
|
|
|
+ if (members.contains(",")) {
|
|
|
|
+ String[] split = members.split(",");
|
|
|
|
+ for (String s : split) {
|
|
|
|
+ User user = UserUtils.get(s);
|
|
|
|
+ users.add(user);
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ User user = UserUtils.get(members);
|
|
users.add(user);
|
|
users.add(user);
|
|
}
|
|
}
|
|
- } else {
|
|
|
|
- User user = UserUtils.get(members);
|
|
|
|
- users.add(user);
|
|
|
|
}
|
|
}
|
|
|
|
+ model.addAttribute("projectMembers", users);
|
|
|
|
+ model.addAttribute("processInstanceId", capitalDemand.getProcessInstanceId());
|
|
|
|
+ if (workProjectNotify.getRemarks().contains("待通知") || "view".equals(workProjectNotify.getView())) {
|
|
|
|
+ return "modules/externalUnit/capitalDemandFormView";
|
|
|
|
+ } else if (workProjectNotify.getRemarks().contains("待审批") && !"1".equals(workProjectNotify.getStatus())) {
|
|
|
|
+ return "modules/externalUnit/capitalDemandFormAudit";
|
|
|
|
+ } else if (workProjectNotify.getRemarks().contains("重新申请") && !"1".equals(workProjectNotify.getStatus())) {
|
|
|
|
+ return "modules/externalUnit/capitalDemandFormModify";
|
|
|
|
+ }
|
|
|
|
+ }catch (Exception e) {
|
|
|
|
+ String strTemp = e.getStackTrace().toString();
|
|
|
|
+ StackTraceElement stackTraceElement = e.getStackTrace()[0];
|
|
|
|
+
|
|
|
|
+ if ("待审批".equals(workProjectNotify.getRemarks())) {
|
|
|
|
+ WorkProjectNotifyRecover workProjectNotifyRecover = new WorkProjectNotifyRecover();
|
|
|
|
+ try {
|
|
|
|
+ //将报错信息保存到待办报错库表中
|
|
|
|
+ MyBeanUtils.copyBeanNotNull2Bean(workProjectNotify, workProjectNotifyRecover);//将编辑表单中的非NULL值覆盖数据库记录中的值
|
|
|
|
+ String exceptionDetails = "报错类=" + stackTraceElement.getFileName() + "; 报错行=" + stackTraceElement.getLineNumber() + "; 报错方法=" + stackTraceElement.getMethodName() + "; 报错内容" + e.toString();
|
|
|
|
+ workProjectNotifyRecover.setExceptionDetails(exceptionDetails);
|
|
|
|
+ workProjectNotifyRecover.setNotifyId(workProjectNotify.getId());
|
|
|
|
+ workProjectNotifyRecover.setCompanyId(UserUtils.getUser().getCompany().getId());
|
|
|
|
+ workProjectNotifyRecoverService.save(workProjectNotifyRecover);
|
|
|
|
+ } catch (Exception exception) {
|
|
|
|
+ exception.printStackTrace();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ workProjectNotify.setStatus("1");
|
|
|
|
+ workProjectNotify.preUpdate();
|
|
|
|
+ workProjectNotifyService.save(workProjectNotify);
|
|
|
|
+ model.addAttribute("errorMsg", "关联记录已经被删除!!!");
|
|
}
|
|
}
|
|
- model.addAttribute("projectMembers", users);
|
|
|
|
- model.addAttribute("processInstanceId", capitalDemand.getProcessInstanceId());
|
|
|
|
|
|
+ model.addAttribute("workProjectNotify", workProjectNotify);
|
|
|
|
+ return "modules/workprojectnotify/workProjectNotifyForm";
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|