zhoulisky 5 months ago
parent
commit
6409c588e6

+ 3 - 0
kd-service/kd-scientific/src/main/java/org/sky/scientific/service/impl/XmTechnicianHoursServiceImpl.java

@@ -257,6 +257,9 @@ public class XmTechnicianHoursServiceImpl extends BaseServiceImpl<XmTechnicianHo
 			if (attendanceHours <= 0) {
 				throw new ServiceException(dailyAttendance.getWorkDate() + "当天无考勤数据");
 			}
+			if(dailyAttendance.getWorkHours() == null){
+				dailyAttendance.setWorkHours(0.0);
+			}
 			//查询一天所有项目的工时总和
 			double hoursTotal = dbList.stream().filter(e -> Objects.equals(e.getWorkDate(), dailyAttendance.getWorkDate())).mapToDouble(XmTechnicianHours::getWorkHours).sum();