|
@@ -29,12 +29,12 @@ public class UpdateWorkMinuteTask {
|
|
|
for (WorkScheduleAttendance wsa : list) {
|
|
|
int workMinutes = 0;
|
|
|
|
|
|
- List<WorkScheduleAttendance> onWorkList = workScheduleAttendanceService.findByPersonScheduleIdAndClassify(wsa.getPersonScheduleId(), wsa.getWorkShiftId(), "1");
|
|
|
+ try {
|
|
|
+ List<WorkScheduleAttendance> onWorkList = workScheduleAttendanceService.findByPersonScheduleIdAndClassify(wsa.getPersonScheduleId(), wsa.getWorkShiftId(), "1");
|
|
|
|
|
|
- if(onWorkList.size()>0){
|
|
|
- WorkScheduleAttendance workStartAttendance = onWorkList.get(0);
|
|
|
+ if(onWorkList.size()>0){
|
|
|
+ WorkScheduleAttendance workStartAttendance = onWorkList.get(0);
|
|
|
|
|
|
- try {
|
|
|
if (StringUtils.isNotEmpty(workStartAttendance.getResult())
|
|
|
&& !"0".equals(workStartAttendance.getResult())
|
|
|
&& workStartAttendance.getRecordTime() != null
|
|
@@ -44,14 +44,14 @@ public class UpdateWorkMinuteTask {
|
|
|
.getMinutes();
|
|
|
}
|
|
|
}
|
|
|
- catch (Exception ex){
|
|
|
- log.error(ex.getMessage(),ex);
|
|
|
- }
|
|
|
- }
|
|
|
|
|
|
- wsa.setWorkMinute(new BigDecimal(workMinutes));
|
|
|
- wsa.setUpdateTime(new Date());
|
|
|
- workScheduleAttendanceService.updateWorkMinute(wsa);
|
|
|
+ wsa.setWorkMinute(new BigDecimal(workMinutes));
|
|
|
+ wsa.setUpdateTime(new Date());
|
|
|
+ workScheduleAttendanceService.updateWorkMinute(wsa);
|
|
|
+ }
|
|
|
+ catch (Exception ex){
|
|
|
+ log.error(ex.getMessage(),ex);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|