标签没修改 不写操作日志,跟进任务编辑状态判断

This commit is contained in:
zhangchenbiao
2023-08-23 19:29:05 +08:00
parent 5db08d9752
commit 00ee314e13
3 changed files with 9 additions and 1 deletions

View File

@@ -53,6 +53,11 @@ public class UpdateFollowTaskRequest {
result.setCommunicationType(request.getCommunicationType()); result.setCommunicationType(request.getCommunicationType());
result.setDeadline(request.getDeadline()); result.setDeadline(request.getDeadline());
result.setCommunicationContent(request.getCommunicationContent()); result.setCommunicationContent(request.getCommunicationContent());
if(request.getDeadline().getTime() > System.currentTimeMillis()){
result.setTaskStatus(FollowTaskStatusEnum.TODO.getCode());
}else{
result.setTaskStatus(FollowTaskStatusEnum.OVERDUE.getCode());
}
return result; return result;
} }

View File

@@ -149,7 +149,7 @@ public class FollowTaskServiceImpl implements FollowTaskService {
@Override @Override
public Integer updateFollowTask(UpdateFollowTaskRequest request, String userId) { public Integer updateFollowTask(UpdateFollowTaskRequest request, String userId) {
HyFollowTaskDO followTask = hyFollowTaskDAO.getFollowTask(request.getFollowTaskId()); HyFollowTaskDO followTask = hyFollowTaskDAO.getFollowTask(request.getFollowTaskId());
if(!FollowTaskStatusEnum.TODO.getCode().equals(followTask.getTaskStatus())){ if(FollowTaskStatusEnum.FINISHED.getCode().equals(followTask.getTaskStatus()) || FollowTaskStatusEnum.CANCELLED.getCode().equals(followTask.getTaskStatus())){
throw new ServiceException(ErrorCodeEnum.TASK_STATUS_NOT_ALLOW_OPERATE); throw new ServiceException(ErrorCodeEnum.TASK_STATUS_NOT_ALLOW_OPERATE);
} }
if(Objects.nonNull(request.getDeadline()) && request.getDeadline().getTime() < System.currentTimeMillis()){ if(Objects.nonNull(request.getDeadline()) && request.getDeadline().getTime() < System.currentTimeMillis()){

View File

@@ -111,6 +111,9 @@ public class HyPartnerBaseInfoServiceImpl implements HyPartnerBaseInfoService {
List<String> removeLabels = new ArrayList<>(oldLabels); List<String> removeLabels = new ArrayList<>(oldLabels);
addLabels.removeAll(oldLabels); addLabels.removeAll(oldLabels);
removeLabels.removeAll(newLabels); removeLabels.removeAll(newLabels);
if(CollectionUtils.isEmpty(addLabels) && CollectionUtils.isEmpty(removeLabels)){
return Boolean.TRUE;
}
LineLogInfo lineLogInfo = new LineLogInfo(line.getPartnerId(), line.getId(), user.getUserId(), LineLogInfo lineLogInfo = new LineLogInfo(line.getPartnerId(), line.getId(), user.getUserId(),
user.getName(), OperateTypeEnum.ADD_TAGS, user.getName(), OperateTypeEnum.ADD_TAGS,
WorkflowStageEnum.getWorkflowStageByCode(line.getWorkflowStage()), WorkflowStageEnum.getWorkflowStageByCode(line.getWorkflowStage()),