|
|
|
@ -39,11 +39,10 @@ import org.springframework.web.servlet.ModelAndView; |
|
|
|
|
import javax.annotation.Resource; |
|
|
|
|
import javax.servlet.http.HttpServletRequest; |
|
|
|
|
import javax.servlet.http.HttpServletResponse; |
|
|
|
|
import java.math.BigDecimal; |
|
|
|
|
import java.text.ParseException; |
|
|
|
|
import java.text.SimpleDateFormat; |
|
|
|
|
import java.util.Arrays; |
|
|
|
|
import java.util.Date; |
|
|
|
|
import java.util.List; |
|
|
|
|
import java.util.Optional; |
|
|
|
|
import java.util.*; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* @Description: 任务管理 |
|
|
|
@ -62,6 +61,14 @@ public class TaskController extends JeecgController<Task, ITaskService> { |
|
|
|
|
private static final String ADMIN = "admin"; |
|
|
|
|
private static final String FORMAT = "yyyy/MM/dd HH:mm:ss"; |
|
|
|
|
|
|
|
|
|
private static final long DAYWORKTIME = 35*60*60*100*2; |
|
|
|
|
private static final long DAYTIME = 24*60*60*1000; |
|
|
|
|
|
|
|
|
|
private static final String MORINGSTART = " 08:30:00"; |
|
|
|
|
private static final String MORINGEND = " 12:00:00"; |
|
|
|
|
private static final String AFTERNOONSTART = " 14:30:00"; |
|
|
|
|
private static final String AFTERNOONEND= " 18:00:00"; |
|
|
|
|
|
|
|
|
|
@Resource |
|
|
|
|
private IProjectxService iProjectxService; |
|
|
|
|
|
|
|
|
@ -91,17 +98,114 @@ public class TaskController extends JeecgController<Task, ITaskService> { |
|
|
|
|
@ApiOperation(value = "任务管理-分页列表查询", notes = "任务管理-分页列表查询") |
|
|
|
|
@GetMapping(value = "/list") |
|
|
|
|
public Result<?> queryPageList(Task task, |
|
|
|
|
@RequestParam(name = "type", required = false) List<String> type, |
|
|
|
|
@RequestParam(name = "userName", defaultValue = "") String userName, |
|
|
|
|
@RequestParam(name = "time", required = false) Integer time, |
|
|
|
|
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, |
|
|
|
|
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, |
|
|
|
|
HttpServletRequest req) { |
|
|
|
|
QueryWrapper<Task> queryWrapper = QueryGenerator.initQueryWrapper(task, req.getParameterMap()); |
|
|
|
|
HttpServletRequest req) throws ParseException { |
|
|
|
|
QueryWrapper<Task> queryWrapper = new QueryWrapper<>(); |
|
|
|
|
Page<Task> page = new Page<Task>(pageNo, pageSize); |
|
|
|
|
|
|
|
|
|
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); |
|
|
|
|
if (!StringUtils.equals(ADMIN, user.getUsername())) { |
|
|
|
|
queryWrapper.like("manager_users", user.getId()); |
|
|
|
|
} |
|
|
|
|
queryWrapper.orderByDesc("create_time"); |
|
|
|
|
if (type != null && type.size() > 0) |
|
|
|
|
queryWrapper.and(qw -> { |
|
|
|
|
for (int i = 0; i < type.size(); i++) { |
|
|
|
|
qw.eq("type_id", type.get(i)); |
|
|
|
|
if (i != type.size() - 1) |
|
|
|
|
qw.or(); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
// projectId
|
|
|
|
|
Calendar now = Calendar.getInstance(); |
|
|
|
|
int year = now.get(Calendar.YEAR); |
|
|
|
|
int month = now.get(Calendar.MONTH) + 1; |
|
|
|
|
int day = now.get(Calendar.DAY_OF_MONTH); |
|
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
|
|
|
|
if (time != null) { |
|
|
|
|
switch (time) { |
|
|
|
|
case 1: {//当前天
|
|
|
|
|
Date startTime = sdf.parse(year + "-" + month + "-" + day + " 00:00:00"); |
|
|
|
|
Date endTime = sdf.parse(year + "-" + month + "-" + day + " 23:59:59"); |
|
|
|
|
queryWrapper.ge("start_time", startTime); |
|
|
|
|
queryWrapper.le("start_time", endTime); |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
case 2: {//当前周
|
|
|
|
|
Calendar now1 = Calendar.getInstance(); |
|
|
|
|
now1.set(Calendar.DAY_OF_WEEK, 2); |
|
|
|
|
int year1 = now1.get(Calendar.YEAR); |
|
|
|
|
int month1 = now1.get(Calendar.MONTH) + 1; |
|
|
|
|
int day1 = now1.get(Calendar.DAY_OF_MONTH); |
|
|
|
|
now1.set(Calendar.DATE, now1.get(Calendar.DATE) + 6); |
|
|
|
|
int year2 = now1.get(Calendar.YEAR); |
|
|
|
|
int month2 = now1.get(Calendar.MONTH) + 1; |
|
|
|
|
int day2 = now1.get(Calendar.DAY_OF_MONTH); |
|
|
|
|
Date startTime = sdf.parse(year1 + "-" + month1 + "-" + day1 + " 00:00:00"); |
|
|
|
|
Date endTime = sdf.parse(year2 + "-" + month2 + "-" + day2 + " 23:59:59"); |
|
|
|
|
queryWrapper.ge("start_time", startTime); |
|
|
|
|
queryWrapper.le("start_time", endTime); |
|
|
|
|
} |
|
|
|
|
case 3: {//当前月
|
|
|
|
|
int minDay = now.getActualMinimum(Calendar.DAY_OF_MONTH); |
|
|
|
|
int lastDay = now.getActualMaximum(Calendar.DAY_OF_MONTH); |
|
|
|
|
Date startTime = sdf.parse(year + "-" + month + "-" + minDay + " 00:00:00"); |
|
|
|
|
Date endTime = sdf.parse(year + "-" + month + "-" + lastDay + " 23:59:59"); |
|
|
|
|
queryWrapper.ge("start_time", startTime); |
|
|
|
|
queryWrapper.le("start_time", endTime); |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
// case 4: {
|
|
|
|
|
// Date startTime = sdf.parse(year + "-" + month + "-" + day + " 00:00:00");
|
|
|
|
|
// Date endTime = sdf.parse(year + "-" + month + "-" + day + " 23:59:59");
|
|
|
|
|
// queryWrapper.ge("create_time", startTime);
|
|
|
|
|
// queryWrapper.le("create_time", endTime);
|
|
|
|
|
// break;
|
|
|
|
|
// }
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if (task != null && StringUtils.isNotBlank(task.getModuleId())) { |
|
|
|
|
String moduleId = task.getModuleId(); |
|
|
|
|
queryWrapper.like("module_id", moduleId); |
|
|
|
|
} |
|
|
|
|
if (task != null && StringUtils.isNotBlank(task.getProjectId())) { |
|
|
|
|
String projectId = task.getProjectId(); |
|
|
|
|
queryWrapper.like("project_id", projectId); |
|
|
|
|
} |
|
|
|
|
if (task != null && StringUtils.isNotBlank(task.getTypeId())) { |
|
|
|
|
String typeId = task.getTypeId(); |
|
|
|
|
queryWrapper.like("type_id", typeId); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (task != null && StringUtils.isNotBlank(task.getManagerUsers())) { |
|
|
|
|
String managerUsers = task.getManagerUsers(); |
|
|
|
|
queryWrapper.like("manager_users", managerUsers); |
|
|
|
|
} |
|
|
|
|
// List<SysUser> sysUsers = taskService.UserIdByUserName(userName);
|
|
|
|
|
// queryWrapper.and(qw -> {
|
|
|
|
|
// for (int i = 0; i < sysUsers.size(); i++) {
|
|
|
|
|
// qw.like("manager_users", sysUsers.get(i).getId());
|
|
|
|
|
// if (i != sysUsers.size() - 1)
|
|
|
|
|
// qw.or();
|
|
|
|
|
// }
|
|
|
|
|
// });
|
|
|
|
|
if (task != null && StringUtils.isNotBlank(task.getTaskName())) { |
|
|
|
|
String tas = task.getTaskName(); |
|
|
|
|
if (tas.startsWith("*") && tas.endsWith("*")) |
|
|
|
|
tas = tas.substring(1, tas.length() - 1); |
|
|
|
|
queryWrapper.like("task_name", tas); |
|
|
|
|
} |
|
|
|
|
if (task != null && task.getWorkStatus() != null && (task.getWorkStatus() == 0 || task.getWorkStatus() == 1)) { |
|
|
|
|
queryWrapper.in("work_status", 0, 1); |
|
|
|
|
} else if (task != null && task.getWorkStatus() != null && (task.getWorkStatus() == 2 || task.getWorkStatus() == 9)) { |
|
|
|
|
queryWrapper.in("work_status", 2, 9); |
|
|
|
|
} else if (task != null && task.getWorkStatus() != null) { |
|
|
|
|
queryWrapper.eq("work_status", task.getWorkStatus()); |
|
|
|
|
} |
|
|
|
|
queryWrapper.orderByDesc("update_time"); |
|
|
|
|
IPage<Task> pageList = taskService.page(page, queryWrapper); |
|
|
|
|
pageList.getRecords().stream().forEach(e -> { |
|
|
|
|
String startDate = DateUtils.date2Str(e.getStartTime(), new SimpleDateFormat(FORMAT)); |
|
|
|
@ -128,18 +232,89 @@ public class TaskController extends JeecgController<Task, ITaskService> { |
|
|
|
|
e.setUpperTaskName(taskUpper.getTaskName()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if (e.getTaskFile()!=null&& !e.getTaskFile().equals("")){ |
|
|
|
|
if (e.getTaskFile() != null && !e.getTaskFile().equals("")) { |
|
|
|
|
e.setContentType("file"); |
|
|
|
|
}else if(e.getTaskPic()!=null&& !e.getTaskPic().equals("")){ |
|
|
|
|
} else if (e.getTaskPic() != null && !e.getTaskPic().equals("")) { |
|
|
|
|
e.setContentType("image"); |
|
|
|
|
}else{ |
|
|
|
|
} else { |
|
|
|
|
e.setContentType("text"); |
|
|
|
|
} |
|
|
|
|
String managerUsers = e.getManagerUsers(); |
|
|
|
|
if (managerUsers!=null&&!managerUsers.equals("")) { |
|
|
|
|
SysUser byId = iSysUserService.getById(managerUsers); |
|
|
|
|
if (byId!=null) |
|
|
|
|
e.setHeadpic(byId.getAvatar()); |
|
|
|
|
if (managerUsers != null && !managerUsers.equals("")) { |
|
|
|
|
String[] managerUsers1 = managerUsers.split(","); |
|
|
|
|
StringBuilder avatars = new StringBuilder(); |
|
|
|
|
for (String managerUser : managerUsers1) { |
|
|
|
|
SysUser byId = iSysUserService.getById(managerUser); |
|
|
|
|
if (byId != null) |
|
|
|
|
|
|
|
|
|
avatars.append(byId.getAvatar()).append(","); |
|
|
|
|
} |
|
|
|
|
avatars = new StringBuilder(avatars.substring(0, avatars.length() - 1)); |
|
|
|
|
e.setHeadpic(avatars.toString()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
return Result.OK(pageList); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@AutoLog(value = "任务管理-分页列表查询") |
|
|
|
|
@ApiOperation(value = "任务管理-分页列表查询", notes = "任务管理-分页列表查询") |
|
|
|
|
@GetMapping(value = "/list1") |
|
|
|
|
public Result<?> queryPageList1(Task task, |
|
|
|
|
@RequestParam(name = "userId") String userId, |
|
|
|
|
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, |
|
|
|
|
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, |
|
|
|
|
HttpServletRequest req) { |
|
|
|
|
QueryWrapper<Task> queryWrapper = QueryGenerator.initQueryWrapper(task, req.getParameterMap()); |
|
|
|
|
Page<Task> page = new Page<Task>(pageNo, pageSize); |
|
|
|
|
queryWrapper.like("manager_users", userId); |
|
|
|
|
queryWrapper.like("work_status", 3); |
|
|
|
|
queryWrapper.orderByDesc("update_time"); |
|
|
|
|
IPage<Task> pageList = taskService.page(page, queryWrapper); |
|
|
|
|
pageList.getRecords().stream().forEach(e -> { |
|
|
|
|
String startDate = DateUtils.date2Str(e.getStartTime(), new SimpleDateFormat(FORMAT)); |
|
|
|
|
String endDate = DateUtils.date2Str(e.getExpectedEndTime(), new SimpleDateFormat(FORMAT)); |
|
|
|
|
String startEndTime = startDate + "-" + endDate; |
|
|
|
|
e.setStartEndTime(startEndTime); |
|
|
|
|
Projectx projectx = iProjectxService.getById(e.getProjectId()); |
|
|
|
|
e.setUnion(projectx.getProjectName()); |
|
|
|
|
if (StringUtils.isNotBlank(e.getModuleId())) { |
|
|
|
|
Modulex modulex = iModulexService.getById(e.getModuleId()); |
|
|
|
|
e.setUnion(e.getUnion() + "-" + modulex.getModuleName()); |
|
|
|
|
} |
|
|
|
|
if (StringUtils.isNotBlank(e.getFunctionId())) { |
|
|
|
|
Functionx functionx = iFunctionxService.getById(e.getFunctionId()); |
|
|
|
|
e.setUnion(e.getUnion() + "-" + functionx.getFunctionName()); |
|
|
|
|
} |
|
|
|
|
if (StringUtils.isNotBlank(e.getRuleId())) { |
|
|
|
|
Rulex rulex = iRulexService.getById(e.getRuleId()); |
|
|
|
|
e.setUnion(e.getUnion() + "-" + rulex.getRuleCode()); |
|
|
|
|
} |
|
|
|
|
if (StringUtils.isNotBlank(e.getUpperId())) { |
|
|
|
|
Task taskUpper = taskService.getById(e.getUpperId()); |
|
|
|
|
if (ObjectUtils.isNotEmpty(taskUpper)) { |
|
|
|
|
e.setUpperTaskName(taskUpper.getTaskName()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if (e.getTaskFile() != null && !e.getTaskFile().equals("")) { |
|
|
|
|
e.setContentType("file"); |
|
|
|
|
} else if (e.getTaskPic() != null && !e.getTaskPic().equals("")) { |
|
|
|
|
e.setContentType("image"); |
|
|
|
|
} else { |
|
|
|
|
e.setContentType("text"); |
|
|
|
|
} |
|
|
|
|
String managerUsers = e.getManagerUsers(); |
|
|
|
|
if (managerUsers != null && !managerUsers.equals("")) { |
|
|
|
|
String[] managerUsers1 = managerUsers.split(","); |
|
|
|
|
StringBuilder avatars = new StringBuilder(); |
|
|
|
|
for (String managerUser : managerUsers1) { |
|
|
|
|
SysUser byId = iSysUserService.getById(managerUser); |
|
|
|
|
if (byId != null) |
|
|
|
|
|
|
|
|
|
avatars.append(byId.getAvatar()).append(","); |
|
|
|
|
} |
|
|
|
|
avatars = new StringBuilder(avatars.substring(0, avatars.length() - 1)); |
|
|
|
|
e.setHeadpic(avatars.toString()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}); |
|
|
|
@ -174,31 +349,138 @@ public class TaskController extends JeecgController<Task, ITaskService> { |
|
|
|
|
@ApiOperation(value = "任务管理-编辑", notes = "任务管理-编辑") |
|
|
|
|
@PutMapping(value = "/edit") |
|
|
|
|
public Result<?> edit(@RequestBody Task task) { |
|
|
|
|
String taskDescribe = task.getTaskDescribe(); |
|
|
|
|
boolean st = taskDescribe.contains("data:image/png;base64"); |
|
|
|
|
if (st) |
|
|
|
|
return Result.error("不能直接将图片放入任务描述中,因为图片将会进行base64转码,数据库中text字段不一定存下"); |
|
|
|
|
taskService.updateById(task); |
|
|
|
|
|
|
|
|
|
return Result.OK("编辑成功!"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 提交任务,更新状态,同时计算实际任务时长 |
|
|
|
|
* 计算一整天、一上午、一下午的工作时间;计算有多个个这样的整段时间,之后算头和尾时间 |
|
|
|
|
* 计算一整天,之后算头和尾时间 |
|
|
|
|
* @param task |
|
|
|
|
* @return |
|
|
|
|
*/ |
|
|
|
|
@ApiOperation(value = "任务管理-更新状态", notes = "任务管理-更新状态") |
|
|
|
|
@PutMapping(value = "/updateWorkStatus") |
|
|
|
|
public Result<?> updateWorkStatus(@RequestBody Task task) { |
|
|
|
|
Date time = new Date(); |
|
|
|
|
|
|
|
|
|
if (task.getWorkStatus() == 3){ |
|
|
|
|
//获取数据
|
|
|
|
|
Task oldTask = taskService.query().eq("id", task.getId()).one(); |
|
|
|
|
Date startTime = oldTask.getStartTime(); |
|
|
|
|
Date endTime = new Date(); |
|
|
|
|
long realTime = 0; |
|
|
|
|
try { |
|
|
|
|
realTime = realDuration(startTime, time); |
|
|
|
|
} catch (ParseException e) { |
|
|
|
|
throw new RuntimeException(e); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//更新数据
|
|
|
|
|
task.setUpdateTime(endTime); |
|
|
|
|
task.setSubmitTime(endTime); |
|
|
|
|
//设置更新数据
|
|
|
|
|
double realTimeHour = (double)realTime/(60*60*1000); |
|
|
|
|
realTimeHour = new BigDecimal(realTimeHour).setScale(1, BigDecimal.ROUND_HALF_UP).doubleValue(); |
|
|
|
|
task.setRealDuration(realTimeHour); |
|
|
|
|
task.setSubmitTime(time); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
task.setUpdateTime(time); |
|
|
|
|
taskService.updateById(task); |
|
|
|
|
return Result.OK("编辑成功!"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//计算真实时间, 单位:小时
|
|
|
|
|
private long realDuration(Date startTime, Date endTime) throws ParseException { |
|
|
|
|
long workTime = 0; |
|
|
|
|
long millisecond = endTime.getTime() - startTime.getTime(); |
|
|
|
|
//统计整天时间
|
|
|
|
|
workTime += (millisecond / DAYTIME) * DAYWORKTIME; |
|
|
|
|
millisecond = millisecond % DAYTIME; |
|
|
|
|
|
|
|
|
|
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd"); |
|
|
|
|
SimpleDateFormat sdf1 = new SimpleDateFormat("HH:mm:ss"); |
|
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss"); |
|
|
|
|
String time = dateFormat.format(new Date()); |
|
|
|
|
String start = sdf1.format(startTime); |
|
|
|
|
String time0 = time + " " + start; |
|
|
|
|
|
|
|
|
|
startTime = sdf.parse(time0); |
|
|
|
|
String time1 = time + MORINGSTART; |
|
|
|
|
String time2 = time + MORINGEND; |
|
|
|
|
String time3 = time + AFTERNOONSTART; |
|
|
|
|
String time4 = time + AFTERNOONEND; |
|
|
|
|
Date date3 = sdf.parse(time3); |
|
|
|
|
Date date2 = sdf.parse(time2); |
|
|
|
|
Date date1 = sdf.parse(time1); |
|
|
|
|
Date date4 = sdf.parse(time4); |
|
|
|
|
|
|
|
|
|
//从start往后推到end,要判断大量情况
|
|
|
|
|
if (startTime.compareTo(endTime) > 0){ |
|
|
|
|
//时间跨度两天,但总时间不超过24小时
|
|
|
|
|
if (startTime.compareTo(date1) <= 0) |
|
|
|
|
startTime = date1; //任务发布在8点前,从8点开始算
|
|
|
|
|
if (startTime.compareTo(date2) <= 0){ |
|
|
|
|
//早上有工作时间
|
|
|
|
|
workTime += date2.getTime() - startTime.getTime(); |
|
|
|
|
//跨度两天,下午必有任务时间
|
|
|
|
|
workTime += DAYWORKTIME/2; |
|
|
|
|
//第二天下午必没有工作时间,判断第二天早上是否有部分工作时间
|
|
|
|
|
if (endTime.compareTo(date1) > 0) |
|
|
|
|
workTime += endTime.getTime() - date1.getTime(); //第二天早上有工作时间
|
|
|
|
|
return workTime; //计算完成,返回结果
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//上午没有工作时间
|
|
|
|
|
if (startTime.compareTo(date3) <= 0) |
|
|
|
|
startTime = date3; //任务发布时间在12点后,14点前
|
|
|
|
|
if (startTime.compareTo(date4) <= 0) //下午有工作时间
|
|
|
|
|
workTime += date4.getTime() - startTime.getTime(); |
|
|
|
|
if (endTime.compareTo(date1) <= 0) |
|
|
|
|
return workTime; //第二天没有工作时间
|
|
|
|
|
if (endTime.compareTo(date2) <= 0){ |
|
|
|
|
workTime += endTime.getTime() - date1.getTime(); //第二天上午有部分工作时间
|
|
|
|
|
return workTime; //必然下午没有工作时间
|
|
|
|
|
} |
|
|
|
|
workTime += DAYWORKTIME/2; //第二天上午工作时间占满
|
|
|
|
|
if (endTime.compareTo(date3) <= 0) |
|
|
|
|
return workTime; //下午没有工作时间
|
|
|
|
|
if (endTime.compareTo(date4) >= 0) |
|
|
|
|
endTime = date4; //下午干满了
|
|
|
|
|
workTime += endTime.getTime() - date3.getTime(); |
|
|
|
|
return workTime; |
|
|
|
|
}else { |
|
|
|
|
//时间跨度没有超过两天
|
|
|
|
|
if (startTime.compareTo(date1) <= 0) |
|
|
|
|
startTime = date1; //发布任务在8点之前
|
|
|
|
|
if (startTime.compareTo(date2) <= 0){ |
|
|
|
|
//上午发布的任务
|
|
|
|
|
if (endTime.compareTo(date2) <= 0){ |
|
|
|
|
//上午提交的任务
|
|
|
|
|
workTime += endTime.getTime() - startTime.getTime(); |
|
|
|
|
return workTime; |
|
|
|
|
} |
|
|
|
|
workTime += date2.getTime() - startTime.getTime(); //上午没有提交任务
|
|
|
|
|
if (endTime.compareTo(date3) <= 0) |
|
|
|
|
return workTime; //中午12点后14点前提交任务
|
|
|
|
|
if (endTime.compareTo(date4) >= 0) |
|
|
|
|
endTime = date4; //时间偏移
|
|
|
|
|
workTime += endTime.getTime() - date3.getTime(); //下午工作时间
|
|
|
|
|
return workTime; |
|
|
|
|
}else { |
|
|
|
|
//下午发布的任务
|
|
|
|
|
if (startTime.compareTo(date3) <= 0) |
|
|
|
|
startTime = date3; //12点之后,14点之前发布任务
|
|
|
|
|
if (endTime.compareTo(date4) >= 0) |
|
|
|
|
endTime = date4; //时间偏移
|
|
|
|
|
workTime += endTime.getTime() - startTime.getTime(); |
|
|
|
|
return workTime; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 通过id删除 |
|
|
|
|
* |
|
|
|
|