提交 9a2fc573 authored 作者: douxy's avatar douxy

CP计划小程序改造,修改照片保存失败问题

上级 aa21b0f6
......@@ -463,7 +463,7 @@ public class ActivityToFeishuSheetServiceImpl implements ActivityToFeishuSheetSe
*/
private String calculateWorkDuration(TemporaryActivityClockDO clockDo) {
// 基础校验:上班/下班时间为空,直接返回0
if (Objects.isNull(clockDo.getClockInTime()) || Objects.isNull(clockDo.getClockOutTime())) {
if (Objects.isNull(clockDo.getClockInTime())) {
return "0";
}
......@@ -488,7 +488,12 @@ public class ActivityToFeishuSheetServiceImpl implements ActivityToFeishuSheetSe
// 上班→午休下班
long morningMinutes = DateUtil.between(clockIn, noonClockOut, DateUnit.MINUTE);
// 午休上班→下班
long afternoonMinutes = DateUtil.between(noonClockIn, clockOut, DateUnit.MINUTE);
long afternoonMinutes;
if (Objects.isNull(clockDo.getClockOutTime())){
afternoonMinutes = 0 ;
}else {
afternoonMinutes = DateUtil.between(noonClockIn, clockOut, DateUnit.MINUTE);
}
totalMinutes = morningMinutes + afternoonMinutes;
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论