فهرست منبع

加上空指针判断

yusm 21 ساعت پیش
والد
کامیت
2190be5f96

+ 1 - 1
fhKeeper/formulahousekeeper/management-workshop/src/main/java/com/management/platform/service/impl/AttendanceStaffServiceImpl.java

@@ -1260,7 +1260,7 @@ public class AttendanceStaffServiceImpl extends ServiceImpl<AttendanceStaffMappe
                                 .append("-").append(applyForm.getEndTime().format(formatter2));
                         if (applyForm.getType()==3) {
                             stringBuilder.append(applyForm.getApplyBillName());
-                            if ((applyForm.getStartTime().getHour()==8||applyForm.getEndTime().getHour()==17)&&staff.getAttendanceTypeName().equals("班次异常")){
+                            if (applyForm.getStartTime() != null && applyForm.getEndTime() != null && staff.getAttendanceTypeName() != null && (applyForm.getStartTime().getHour() == 8 || applyForm.getEndTime().getHour() == 17) && staff.getAttendanceTypeName().equals("班次异常")){
                                 staff.setAttendanceType(QING_JIA);
                                 if (applyForm.getStartTime().getHour()==8) {
                                     staff.setClockStartTime(LocalDateTime.of(clockDate, LocalTime.of(8, 0)));