|
|
|
@ -328,7 +328,9 @@ public class TaskController extends JeecgController<Task, ITaskService> { |
|
|
|
|
|
|
|
|
|
avatars.append(byId.getAvatar()).append(","); |
|
|
|
|
} |
|
|
|
|
if (avatars.length() != 0) { |
|
|
|
|
avatars = new StringBuilder(avatars.substring(0, avatars.length() - 1)); |
|
|
|
|
} |
|
|
|
|
e.setHeadpic(avatars.toString()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -350,6 +352,9 @@ public class TaskController extends JeecgController<Task, ITaskService> { |
|
|
|
|
if (count > 0) { |
|
|
|
|
return Result.error("名字不能重复"); |
|
|
|
|
} |
|
|
|
|
task.setUpdateTime(new Date()); |
|
|
|
|
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
|
|
|
|
task.setUpdateBy(user.getUsername()); |
|
|
|
|
taskService.save(task); |
|
|
|
|
return Result.OK("添加成功!"); |
|
|
|
|
} |
|
|
|
@ -367,9 +372,11 @@ public class TaskController extends JeecgController<Task, ITaskService> { |
|
|
|
|
taskService.updateById(task); |
|
|
|
|
return Result.OK("编辑成功!"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 提交任务,更新状态,同时计算实际任务时长 |
|
|
|
|
* 计算一整天,之后算头和尾时间 |
|
|
|
|
* |
|
|
|
|
* @param task |
|
|
|
|
* @return |
|
|
|
|
*/ |
|
|
|
@ -492,6 +499,7 @@ public class TaskController extends JeecgController<Task, ITaskService> { |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 计算预计结束时间 |
|
|
|
|
* |
|
|
|
|
* @param task |
|
|
|
|
* @return |
|
|
|
|
*/ |
|
|
|
@ -510,6 +518,7 @@ public class TaskController extends JeecgController<Task, ITaskService> { |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 计算预计结束时间方法 |
|
|
|
|
* |
|
|
|
|
* @param startTime |
|
|
|
|
* @param expectedDuration |
|
|
|
|
* @return |
|
|
|
@ -567,6 +576,7 @@ public class TaskController extends JeecgController<Task, ITaskService> { |
|
|
|
|
millisecond -= tempTime; |
|
|
|
|
return new Date(startTime.getTime() + millisecond + DAYTIME * offset); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 通过id删除 |
|
|
|
|
* |
|
|
|
|