|
|
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.hotent.base.manager.impl.BaseManagerImpl;
|
|
|
+import com.hotent.base.util.AuthenticationUtil;
|
|
|
import com.hotent.base.util.StringUtil;
|
|
|
import com.hotent.baseInfo.req.CostTaskSearchReq;
|
|
|
import com.hotent.constant.BaseConstant;
|
|
|
@@ -29,7 +30,6 @@ import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
-
|
|
|
/**
|
|
|
* 项目任务表 服务实现类
|
|
|
*
|
|
|
@@ -341,10 +341,8 @@ public class CostProjectTaskManagerImpl extends BaseManagerImpl<CostProjectTaskD
|
|
|
|
|
|
// 发送通知
|
|
|
String title = NodeConstant.getNodeValueByKey(task.getCurrentNode())+"通过";
|
|
|
- String auditedUnit = task.getAuditedUnitName() == null ? "" : task.getAuditedUnitName();
|
|
|
- String projectName = task.getProjectName() == null ? "" : task.getProjectName();
|
|
|
- String year = task.getYear() == null ? "" : task.getYear();
|
|
|
- String content = String.format("%s%s%s%s。", year, projectName, auditedUnit,title);
|
|
|
+ // 操作人
|
|
|
+ String content = "["+ NodeConstant.getNodeValueByKey(task.getCurrentNode()) +"]"+AuthenticationUtil.getCurrentUserFullname() + "已通过" + task.getAuditedUnitName() + "的项目(" + task.getProjectName() +")";
|
|
|
String enterpriseId = task.getAuditedUnitId() == null ? "" : task.getAuditedUnitId();
|
|
|
String noticeSource = "系统";
|
|
|
String sendTarget = task.getCreateBy() == null ? "" : task.getCreateBy();
|
|
|
@@ -366,7 +364,9 @@ public class CostProjectTaskManagerImpl extends BaseManagerImpl<CostProjectTaskD
|
|
|
String enterpriseId = task.getAuditedUnitId() == null ? "" : task.getAuditedUnitId();
|
|
|
String noticeSource = "系统";
|
|
|
String sendTarget = task.getCreateBy() == null ? "" : task.getCreateBy();
|
|
|
- costNoticeManager.sendNotice(task.getProjectId(),task.getId(), "1", title, req.getContent(), enterpriseId, noticeSource, sendTarget);
|
|
|
+
|
|
|
+ String content = "["+ NodeConstant.getNodeValueByKey(task.getCurrentNode()) +"]"+AuthenticationUtil.getCurrentUserFullname() + "已退回" + task.getAuditedUnitName() + "的项目(" + task.getProjectName() +")";
|
|
|
+ costNoticeManager.sendNotice(task.getProjectId(),task.getId(), "1", title, content, enterpriseId, noticeSource, sendTarget);
|
|
|
|
|
|
// 更新任务的当前节点和状态
|
|
|
task.setStatus(TaskStatusConstant.NOT_PASSED.getStatusCode());
|
|
|
@@ -389,10 +389,11 @@ public class CostProjectTaskManagerImpl extends BaseManagerImpl<CostProjectTaskD
|
|
|
|
|
|
// 通知内容组装
|
|
|
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 enterpriseId = task.getAuditedUnitId() == null ? "" : task.getAuditedUnitId();
|
|
|
String noticeSource = "系统";
|
|
|
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, content, enterpriseId, noticeSource, sendTarget);
|
|
|
|
|
|
return title;
|
|
|
}
|
|
|
@@ -425,9 +426,10 @@ public class CostProjectTaskManagerImpl extends BaseManagerImpl<CostProjectTaskD
|
|
|
childTask.setStatus(TaskStatusConstant.BCCL.getStatusCode());
|
|
|
costProjectTaskManager.updateById(childTask);
|
|
|
// 通知内容组装(针对子任务对应的单位)
|
|
|
+ String childContent = "["+ NodeConstant.getNodeValueByKey(task.getCurrentNode()) +"]"+AuthenticationUtil.getCurrentUserFullname() + "要求" + childTask.getAuditedUnitName() + "补充材料,项目(" + task.getProjectName() +")";
|
|
|
String childEnterpriseId = childTask.getAuditedUnitId() == null ? "" : childTask.getAuditedUnitId();
|
|
|
String childSendTarget = childTask.getCreateBy() == null ? "" : childTask.getCreateBy();
|
|
|
- costNoticeManager.sendNotice(task.getProjectId(),task.getId(), "1", title, req.getContent(), childEnterpriseId, noticeSource, childSendTarget);
|
|
|
+ costNoticeManager.sendNotice(task.getProjectId(),task.getId(), "1", title, childContent, childEnterpriseId, noticeSource, childSendTarget);
|
|
|
// 收集单位名称
|
|
|
if (StringUtil.isNotEmpty(childTask.getAuditedUnitName())) {
|
|
|
unitNames.add(childTask.getAuditedUnitName());
|
|
|
@@ -440,9 +442,10 @@ public class CostProjectTaskManagerImpl extends BaseManagerImpl<CostProjectTaskD
|
|
|
default:
|
|
|
task.setStatus(TaskStatusConstant.BCCL.getStatusCode());
|
|
|
costProjectTaskManager.updateById(task);
|
|
|
+ String content = "["+ NodeConstant.getNodeValueByKey(task.getCurrentNode()) +"]"+AuthenticationUtil.getCurrentUserFullname() + "要求" + task.getAuditedUnitName() + "补充材料,项目(" + task.getProjectName() +")";
|
|
|
String enterpriseId = task.getAuditedUnitId() == null ? "" : task.getAuditedUnitId();
|
|
|
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, content, enterpriseId, noticeSource, sendTarget);
|
|
|
return title;
|
|
|
}
|
|
|
}
|