|
|
@@ -928,7 +928,7 @@ public class SysUserServiceImpl implements ISysUserService
|
|
|
amount = amount.add(BigDecimal.valueOf(e.getCheckDuration()));
|
|
|
}
|
|
|
UserRecord userRecord = userRecordMapper.selectByPrimaryKey(in.getId());
|
|
|
- if (amount.compareTo(BigDecimal.valueOf(userRecord.getSumDuration())) > 0){
|
|
|
+ if (amount.compareTo(BigDecimal.valueOf(userRecord.getCheckDuration())) > 0){
|
|
|
throw new ServiceException(String.format("核算统计[%s]间超过打卡工时[%s],请重新输入!",amount,userRecord.getSumDuration()));
|
|
|
}
|
|
|
for (ProjectStaffRecord projectStaffRecord : in.getList()) {
|
|
|
@@ -1023,7 +1023,6 @@ public class SysUserServiceImpl implements ISysUserService
|
|
|
if (!list2.isEmpty()){
|
|
|
//判定多打卡状态是否正常
|
|
|
for (UserRecord e : list2) {
|
|
|
- if (e.getStatus()==0){
|
|
|
e.getRecordTime().toInstant();
|
|
|
LocalDateTime localDateTime = LocalDateTime.ofInstant(e.getRecordTime().toInstant(), ZoneId.systemDefault());
|
|
|
LocalDate localDate = localDateTime.toLocalDate();
|
|
|
@@ -1032,12 +1031,11 @@ public class SysUserServiceImpl implements ISysUserService
|
|
|
for (ProjectStaffRecord e2 : list3) {
|
|
|
sum = sum.add(BigDecimal.valueOf(e2.getCheckDuration()));
|
|
|
}
|
|
|
- BigDecimal sum2 = BigDecimal.valueOf(e.getSumDuration());
|
|
|
+ BigDecimal sum2 = BigDecimal.valueOf(e.getCheckDuration());
|
|
|
if (sum.compareTo(sum2) != 0){
|
|
|
String dateStr = DateUtils.parseStrYYYYnMMyDD(e.getRecordTime());
|
|
|
return AjaxResult.error(String.format("[%S]考勤[%S]多打卡时间[%s != %s],请处理后再提交",e.getName(),dateStr,sum,sum2));
|
|
|
}
|
|
|
- }
|
|
|
}
|
|
|
}
|
|
|
return AjaxResult.success();
|