|
|
@ -38,6 +38,8 @@ public class MessageVo { |
|
|
|
private Long operatorId; |
|
|
|
@ApiModelProperty("任务id") |
|
|
|
private Long taskId; |
|
|
|
@ApiModelProperty("操作类型(0-默认,1-上传,2-修改,3-删除,4-通过,5-驳回)") |
|
|
|
private Byte doType; |
|
|
|
@ApiModelProperty("消息列表") |
|
|
|
private List<Message> messages = new ArrayList<>(); |
|
|
|
|
|
|
@ -55,10 +57,23 @@ public class MessageVo { |
|
|
|
this.taskId = taskId; |
|
|
|
} |
|
|
|
|
|
|
|
public Inform(Long projectId, Long operatorId, Byte doType) { |
|
|
|
this.projectId = projectId; |
|
|
|
this.operatorId = operatorId; |
|
|
|
this.doType = doType; |
|
|
|
} |
|
|
|
|
|
|
|
public Inform appendMessage(Message message) { |
|
|
|
messages.add(message); |
|
|
|
return this; |
|
|
|
} |
|
|
|
|
|
|
|
public Inform(Long projectId, Long operatorId, Long taskId, Byte doType) { |
|
|
|
this.projectId = projectId; |
|
|
|
this.operatorId = operatorId; |
|
|
|
this.taskId = taskId; |
|
|
|
this.doType = doType; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@Data |
|
|
@ -148,8 +163,8 @@ public class MessageVo { |
|
|
|
* @param deliverName |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
public static Inform addDeliver(Long userId, String userName, Long projectId, String projectName, String taskName, String deliverName) { |
|
|
|
MessageVo.Inform inform = new MessageVo.Inform(projectId, userId); |
|
|
|
public static Inform addDeliver(Long userId, String userName, Long projectId, String projectName, String taskName, String deliverName,Byte doType) { |
|
|
|
MessageVo.Inform inform = new MessageVo.Inform(projectId, userId,doType); |
|
|
|
inform.appendMessage(new MessageVo.Message(WebConstant.TemplateParam.Operator.value, userName)) |
|
|
|
.appendMessage(new MessageVo.Message(WebConstant.TemplateParam.ProjectName.value, projectName, WebConstant.Message.TYPE_LINK, Message.getProjectSettings(projectId))) |
|
|
|
.appendMessage(new MessageVo.Message(WebConstant.TemplateParam.Deliverable.value, deliverName)) |
|
|
@ -168,8 +183,8 @@ public class MessageVo { |
|
|
|
* @param deliverName |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
public static Inform checkDeliver(Long userId, String userName, Long projectId, String projectName, String taskName, String principalName, String deliverName) { |
|
|
|
MessageVo.Inform inform = new MessageVo.Inform(projectId, userId); |
|
|
|
public static Inform checkDeliver(Long userId, String userName, Long projectId, String projectName, String taskName, String principalName, String deliverName,Byte doType) { |
|
|
|
MessageVo.Inform inform = new MessageVo.Inform(projectId, userId,doType); |
|
|
|
inform.appendMessage(new MessageVo.Message(WebConstant.TemplateParam.Operator.value, userName)) |
|
|
|
.appendMessage(new MessageVo.Message(WebConstant.TemplateParam.ProjectName.value, projectName, WebConstant.Message.TYPE_LINK, Message.getProjectSettings(projectId))) |
|
|
|
.appendMessage(new MessageVo.Message(WebConstant.TemplateParam.Deliverable.value, deliverName)) |
|
|
@ -178,8 +193,8 @@ public class MessageVo { |
|
|
|
return inform; |
|
|
|
} |
|
|
|
|
|
|
|
public static Inform deleteDeliver(Long userId, String userName, Long projectId, String projectName, String taskName, String deliverName) { |
|
|
|
MessageVo.Inform inform = new MessageVo.Inform(projectId, userId); |
|
|
|
public static Inform deleteDeliver(Long userId, String userName, Long projectId, String projectName, String taskName, String deliverName,Byte doType) { |
|
|
|
MessageVo.Inform inform = new MessageVo.Inform(projectId, userId,doType); |
|
|
|
inform.appendMessage(new MessageVo.Message(WebConstant.TemplateParam.Operator.value, userName)) |
|
|
|
.appendMessage(new MessageVo.Message(WebConstant.TemplateParam.ProjectName.value, projectName, WebConstant.Message.TYPE_LINK, Message.getProjectSettings(projectId))) |
|
|
|
.appendMessage(new MessageVo.Message(WebConstant.TemplateParam.Deliverable.value, deliverName)) |
|
|
@ -222,8 +237,8 @@ public class MessageVo { |
|
|
|
* @param taskName |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
public static Inform uploadForDocComment(Long userId, String userName, Long projectId, String projectName, String taskName,String deliverName,Long taskId) { |
|
|
|
MessageVo.Inform inform = new MessageVo.Inform(projectId, userId,taskId); |
|
|
|
public static Inform uploadForDocComment(Long userId, String userName, Long projectId, String projectName, String taskName,String deliverName,Long taskId,Byte doType) { |
|
|
|
MessageVo.Inform inform = new MessageVo.Inform(projectId, userId,taskId,doType); |
|
|
|
inform.appendMessage(new MessageVo.Message(WebConstant.TemplateParam.Operator.value, userName)) |
|
|
|
.appendMessage(new MessageVo.Message(WebConstant.TemplateParam.ProjectName.value, projectName, WebConstant.Message.TYPE_LINK, Message.getProjectSettings(projectId))) |
|
|
|
.appendMessage(new MessageVo.Message(WebConstant.TemplateParam.TaskName.value,taskName)) |
|
|
@ -240,8 +255,8 @@ public class MessageVo { |
|
|
|
* @param taskName |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
public static Inform delDocComment(Long userId, String userName, Long projectId, String projectName, String taskName,String deliverName,Long taskId) { |
|
|
|
MessageVo.Inform inform = new MessageVo.Inform(projectId, userId,taskId); |
|
|
|
public static Inform delDocComment(Long userId, String userName, Long projectId, String projectName, String taskName,String deliverName,Long taskId,Byte doType) { |
|
|
|
MessageVo.Inform inform = new MessageVo.Inform(projectId, userId,taskId,doType); |
|
|
|
inform.appendMessage(new MessageVo.Message(WebConstant.TemplateParam.Operator.value, userName)) |
|
|
|
.appendMessage(new MessageVo.Message(WebConstant.TemplateParam.ProjectName.value, projectName, WebConstant.Message.TYPE_LINK, Message.getProjectSettings(projectId))) |
|
|
|
.appendMessage(new MessageVo.Message(WebConstant.TemplateParam.TaskName.value,taskName)) |
|
|
@ -258,8 +273,8 @@ public class MessageVo { |
|
|
|
* @param taskName |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
public static Inform updateDocRemarkComment(Long userId, String userName, Long projectId, String projectName, String taskName,String deliverName,Long taskId) { |
|
|
|
MessageVo.Inform inform = new MessageVo.Inform(projectId, userId,taskId); |
|
|
|
public static Inform updateDocRemarkComment(Long userId, String userName, Long projectId, String projectName, String taskName,String deliverName,Long taskId,Byte doType) { |
|
|
|
MessageVo.Inform inform = new MessageVo.Inform(projectId, userId,taskId,doType); |
|
|
|
inform.appendMessage(new MessageVo.Message(WebConstant.TemplateParam.Operator.value, userName)) |
|
|
|
.appendMessage(new MessageVo.Message(WebConstant.TemplateParam.ProjectName.value, projectName, WebConstant.Message.TYPE_LINK, Message.getProjectSettings(projectId))) |
|
|
|
.appendMessage(new MessageVo.Message(WebConstant.TemplateParam.TaskName.value,taskName)) |
|
|
|