任务模块

dev_4newlayout
shiji 1 year ago
parent 7f99b77244
commit ceecd86aa3
  1. 10
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/task/controller/TaskController.java

@ -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删除
*

Loading…
Cancel
Save