|
@@ -136,19 +136,10 @@ public class OaJbdDocumentServiceImpl extends AbstractCrudService<OaJbdDocumentM
|
|
|
throw new BusinessException("加班开始时间或结束时间输入异常!请确保开始时间不晚于结束时间");
|
|
|
}
|
|
|
|
|
|
- if (oaJbdDocument.getDuration() == null || oaJbdDocument.getDuration() <= 0) {
|
|
|
+ if (duration == null || duration <= 0) {
|
|
|
throw new BusinessException("加班时长必须大于0!");
|
|
|
}
|
|
|
|
|
|
- long hours = ChronoUnit.HOURS.between(startTime, endTime);
|
|
|
- long days = ChronoUnit.DAYS.between(startTime, endTime);
|
|
|
- if (days > 0) {
|
|
|
- hours -= days * 16;
|
|
|
- }
|
|
|
- if (hours != duration) {
|
|
|
- throw new BusinessException("加班时长与实际时长不一致,请重试!");
|
|
|
- }
|
|
|
-
|
|
|
if (StringUtils.isBlank(oaJbdDocument.getReason())) {
|
|
|
throw new BusinessException("加班原因不能为空!");
|
|
|
} else if (oaJbdDocument.getReason().length() > 255) {
|