|
@@ -21,7 +21,9 @@ import com.hotent.project.resp.CostProjectApprovalDetailResp;
|
|
|
import com.hotent.surveyinfo.manager.CostSurveyTemplateUploadManager;
|
|
import com.hotent.surveyinfo.manager.CostSurveyTemplateUploadManager;
|
|
|
import com.hotent.surveyinfo.model.CostSurveyTemplateUpload;
|
|
import com.hotent.surveyinfo.model.CostSurveyTemplateUpload;
|
|
|
import com.hotent.uc.api.model.IUser;
|
|
import com.hotent.uc.api.model.IUser;
|
|
|
|
|
+import com.hotent.uc.manager.OrgManager;
|
|
|
import com.hotent.uc.manager.UserManager;
|
|
import com.hotent.uc.manager.UserManager;
|
|
|
|
|
+import com.hotent.uc.model.Org;
|
|
|
import com.hotent.uc.model.User;
|
|
import com.hotent.uc.model.User;
|
|
|
import com.hotent.uc.util.ContextUtil;
|
|
import com.hotent.uc.util.ContextUtil;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -30,6 +32,8 @@ import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
+import static com.hotent.base.util.AuthenticationUtil.getCurrentUserMainOrgId;
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 项目任务表 服务实现类
|
|
* 项目任务表 服务实现类
|
|
|
*
|
|
*
|
|
@@ -67,7 +71,8 @@ public class CostProjectTaskManagerImpl extends BaseManagerImpl<CostProjectTaskD
|
|
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private CostProjectTaskLogManager costProjectTaskLogManager;
|
|
private CostProjectTaskLogManager costProjectTaskLogManager;
|
|
|
-
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private OrgManager orgManager;
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
@@ -293,6 +298,11 @@ public class CostProjectTaskManagerImpl extends BaseManagerImpl<CostProjectTaskD
|
|
|
task.setCurrentNode(NodeConstant.clcs.getNodeKey());
|
|
task.setCurrentNode(NodeConstant.clcs.getNodeKey());
|
|
|
task.setStatus(TaskStatusConstant.AUDITING.getStatusCode());
|
|
task.setStatus(TaskStatusConstant.AUDITING.getStatusCode());
|
|
|
this.updateById(task);
|
|
this.updateById(task);
|
|
|
|
|
+ // 3. 父任务也修改
|
|
|
|
|
+ CostProjectTask parentTask = this.getById(task.getPid());
|
|
|
|
|
+ parentTask.setCurrentNode(NodeConstant.clcs.getNodeKey());
|
|
|
|
|
+ parentTask.setStatus(TaskStatusConstant.AUDITING.getStatusCode());
|
|
|
|
|
+ this.updateById(parentTask);
|
|
|
|
|
|
|
|
return "任务提交成功,已进入材料初审阶段";
|
|
return "任务提交成功,已进入材料初审阶段";
|
|
|
}
|
|
}
|
|
@@ -396,7 +406,9 @@ public class CostProjectTaskManagerImpl extends BaseManagerImpl<CostProjectTaskD
|
|
|
// 操作人
|
|
// 操作人
|
|
|
String content = "[" + NodeConstant.getNodeValueByKey(task.getCurrentNode()) + "]" + AuthenticationUtil.getCurrentUserFullname() + "已通过" + task.getAuditedUnitName() + "的项目(" + task.getProjectName() + ")";
|
|
String content = "[" + NodeConstant.getNodeValueByKey(task.getCurrentNode()) + "]" + AuthenticationUtil.getCurrentUserFullname() + "已通过" + task.getAuditedUnitName() + "的项目(" + task.getProjectName() + ")";
|
|
|
String enterpriseId = task.getAuditedUnitId() == null ? "" : task.getAuditedUnitId();
|
|
String enterpriseId = task.getAuditedUnitId() == null ? "" : task.getAuditedUnitId();
|
|
|
- String noticeSource = "系统";
|
|
|
|
|
|
|
+ String orgId = getCurrentUserMainOrgId();
|
|
|
|
|
+ Org org = orgManager.getById(orgId);
|
|
|
|
|
+ String noticeSource = (org.getName()) + " " + AuthenticationUtil.getCurrentUserFullname();
|
|
|
String sendTarget = task.getCreateBy() == null ? "" : task.getCreateBy();
|
|
String sendTarget = task.getCreateBy() == null ? "" : task.getCreateBy();
|
|
|
costNoticeManager.sendNotice(task.getProjectId(), task.getId(), "1", title, content, enterpriseId, noticeSource, sendTarget);
|
|
costNoticeManager.sendNotice(task.getProjectId(), task.getId(), "1", title, content, enterpriseId, noticeSource, sendTarget);
|
|
|
|
|
|
|
@@ -414,7 +426,9 @@ public class CostProjectTaskManagerImpl extends BaseManagerImpl<CostProjectTaskD
|
|
|
// 通知内容组装
|
|
// 通知内容组装
|
|
|
String title = NodeConstant.getNodeValueByKey(task.getCurrentNode()) + "退回";
|
|
String title = NodeConstant.getNodeValueByKey(task.getCurrentNode()) + "退回";
|
|
|
String enterpriseId = task.getAuditedUnitId() == null ? "" : task.getAuditedUnitId();
|
|
String enterpriseId = task.getAuditedUnitId() == null ? "" : task.getAuditedUnitId();
|
|
|
- String noticeSource = "系统";
|
|
|
|
|
|
|
+ String orgId = getCurrentUserMainOrgId();
|
|
|
|
|
+ Org org = orgManager.getById(orgId);
|
|
|
|
|
+ String noticeSource = (org.getName()) + " " + AuthenticationUtil.getCurrentUserFullname();
|
|
|
String sendTarget = task.getCreateBy() == null ? "" : task.getCreateBy();
|
|
String sendTarget = task.getCreateBy() == null ? "" : task.getCreateBy();
|
|
|
|
|
|
|
|
String content = "[" + NodeConstant.getNodeValueByKey(task.getCurrentNode()) + "]" + AuthenticationUtil.getCurrentUserFullname() + "已退回" + task.getAuditedUnitName() + "的项目(" + task.getProjectName() + ")";
|
|
String content = "[" + NodeConstant.getNodeValueByKey(task.getCurrentNode()) + "]" + AuthenticationUtil.getCurrentUserFullname() + "已退回" + task.getAuditedUnitName() + "的项目(" + task.getProjectName() + ")";
|
|
@@ -443,7 +457,9 @@ public class CostProjectTaskManagerImpl extends BaseManagerImpl<CostProjectTaskD
|
|
|
String title = NodeConstant.getNodeValueByKey(task.getCurrentNode()) + TaskStatusConstant.getStatusNameByCode(status);
|
|
String title = NodeConstant.getNodeValueByKey(task.getCurrentNode()) + TaskStatusConstant.getStatusNameByCode(status);
|
|
|
String content = "[" + NodeConstant.getNodeValueByKey(task.getCurrentNode()) + "]" + AuthenticationUtil.getCurrentUserFullname() + "已" + TaskStatusConstant.getStatusNameByCode(status) + task.getAuditedUnitName() + "的项目(" + task.getProjectName() + ")";
|
|
String content = "[" + NodeConstant.getNodeValueByKey(task.getCurrentNode()) + "]" + AuthenticationUtil.getCurrentUserFullname() + "已" + TaskStatusConstant.getStatusNameByCode(status) + task.getAuditedUnitName() + "的项目(" + task.getProjectName() + ")";
|
|
|
String enterpriseId = task.getAuditedUnitId() == null ? "" : task.getAuditedUnitId();
|
|
String enterpriseId = task.getAuditedUnitId() == null ? "" : task.getAuditedUnitId();
|
|
|
- String noticeSource = "系统";
|
|
|
|
|
|
|
+ String orgId = getCurrentUserMainOrgId();
|
|
|
|
|
+ Org org = orgManager.getById(orgId);
|
|
|
|
|
+ String noticeSource = (org.getName()) + " " + AuthenticationUtil.getCurrentUserFullname();
|
|
|
String sendTarget = task.getCreateBy() == null ? "" : task.getCreateBy();
|
|
String sendTarget = task.getCreateBy() == null ? "" : task.getCreateBy();
|
|
|
costNoticeManager.sendNotice(task.getProjectId(), task.getId(), "1", title, content, enterpriseId, noticeSource, sendTarget);
|
|
costNoticeManager.sendNotice(task.getProjectId(), task.getId(), "1", title, content, enterpriseId, noticeSource, sendTarget);
|
|
|
|
|
|
|
@@ -456,7 +472,9 @@ public class CostProjectTaskManagerImpl extends BaseManagerImpl<CostProjectTaskD
|
|
|
private String supplementMaterial(CostProjectTask task, CostTaskPageReq req) {
|
|
private String supplementMaterial(CostProjectTask task, CostTaskPageReq req) {
|
|
|
String currentNode = task.getCurrentNode();
|
|
String currentNode = task.getCurrentNode();
|
|
|
String title = NodeConstant.getNodeValueByKey(currentNode) + TaskStatusConstant.BCCL.getStatusName();
|
|
String title = NodeConstant.getNodeValueByKey(currentNode) + TaskStatusConstant.BCCL.getStatusName();
|
|
|
- String noticeSource = "系统";
|
|
|
|
|
|
|
+ String orgId = getCurrentUserMainOrgId();
|
|
|
|
|
+ Org org = orgManager.getById(orgId);
|
|
|
|
|
+ String noticeSource = (org.getName()) + " " + AuthenticationUtil.getCurrentUserFullname();
|
|
|
|
|
|
|
|
switch (currentNode) {
|
|
switch (currentNode) {
|
|
|
// 集体审议节点:支持指定多个子任务补充材料
|
|
// 集体审议节点:支持指定多个子任务补充材料
|
|
@@ -530,7 +548,7 @@ public class CostProjectTaskManagerImpl extends BaseManagerImpl<CostProjectTaskD
|
|
|
.eq(CostProjectTask::getIsDeleted, "0")
|
|
.eq(CostProjectTask::getIsDeleted, "0")
|
|
|
);
|
|
);
|
|
|
|
|
|
|
|
- // 根据退回后的节点,设置子任务状态(参考completeTask的逻辑)
|
|
|
|
|
|
|
+ // 根据退回后的节点,设置子任务状态
|
|
|
String childStatus = "";
|
|
String childStatus = "";
|
|
|
switch (prevNodeStatus) {
|
|
switch (prevNodeStatus) {
|
|
|
case "yjfk":
|
|
case "yjfk":
|
|
@@ -546,16 +564,20 @@ public class CostProjectTaskManagerImpl extends BaseManagerImpl<CostProjectTaskD
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
for (CostProjectTask child : children) {
|
|
for (CostProjectTask child : children) {
|
|
|
- child.setStatus(childStatus);
|
|
|
|
|
- child.setCurrentNode(prevNodeStatus);
|
|
|
|
|
- costProjectTaskManager.updateById(child);
|
|
|
|
|
|
|
+ if (!child.getStatus().equals(TaskStatusConstant.SUSPENDED.getStatusCode())) {
|
|
|
|
|
+ child.setStatus(childStatus);
|
|
|
|
|
+ child.setCurrentNode(prevNodeStatus);
|
|
|
|
|
+ costProjectTaskManager.updateById(child);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+
|
|
|
// 通知内容组装
|
|
// 通知内容组装
|
|
|
String title = NodeConstant.getNodeValueByKey(prevNodeStatus) + "退回上一步";
|
|
String title = NodeConstant.getNodeValueByKey(prevNodeStatus) + "退回上一步";
|
|
|
String enterpriseId = task.getAuditedUnitId() == null ? "" : task.getAuditedUnitId();
|
|
String enterpriseId = task.getAuditedUnitId() == null ? "" : task.getAuditedUnitId();
|
|
|
- String noticeSource = "系统";
|
|
|
|
|
- String sendTarget = task.getCreateBy() == null ? "" : task.getCreateBy();
|
|
|
|
|
|
|
+ String orgId = getCurrentUserMainOrgId();
|
|
|
|
|
+ Org org = orgManager.getById(orgId);
|
|
|
|
|
+ String noticeSource = (org.getName()) + " " + AuthenticationUtil.getCurrentUserFullname(); String sendTarget = task.getCreateBy() == null ? "" : task.getCreateBy();
|
|
|
costNoticeManager.sendNotice(task.getProjectId(), task.getId(), "1", title, req.getContent(), enterpriseId, noticeSource, sendTarget);
|
|
costNoticeManager.sendNotice(task.getProjectId(), task.getId(), "1", title, req.getContent(), enterpriseId, noticeSource, sendTarget);
|
|
|
|
|
|
|
|
return title;
|
|
return title;
|
|
@@ -612,7 +634,9 @@ public class CostProjectTaskManagerImpl extends BaseManagerImpl<CostProjectTaskD
|
|
|
// 通知内容组装
|
|
// 通知内容组装
|
|
|
String title = NodeConstant.getNodeValueByKey(task.getCurrentNode()) + "扭转至下一步";
|
|
String title = NodeConstant.getNodeValueByKey(task.getCurrentNode()) + "扭转至下一步";
|
|
|
String enterpriseId = task.getAuditedUnitId() == null ? "" : task.getAuditedUnitId();
|
|
String enterpriseId = task.getAuditedUnitId() == null ? "" : task.getAuditedUnitId();
|
|
|
- String noticeSource = "系统";
|
|
|
|
|
|
|
+ String orgId = getCurrentUserMainOrgId();
|
|
|
|
|
+ Org org = orgManager.getById(orgId);
|
|
|
|
|
+ String noticeSource = (org.getName()) + " " + AuthenticationUtil.getCurrentUserFullname();
|
|
|
String sendTarget = task.getCreateBy() == null ? "" : task.getCreateBy();
|
|
String sendTarget = task.getCreateBy() == null ? "" : task.getCreateBy();
|
|
|
costNoticeManager.sendNotice(task.getProjectId(), task.getId(), "1", title, req.getContent(), enterpriseId, noticeSource, sendTarget);
|
|
costNoticeManager.sendNotice(task.getProjectId(), task.getId(), "1", title, req.getContent(), enterpriseId, noticeSource, sendTarget);
|
|
|
|
|
|