ysh il y a 3 ans
Parent
commit
6dc3a53cc2

+ 3 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/viewClockIn/controller/viewClockInController.java

@@ -227,6 +227,9 @@ public class viewClockInController extends JeecgController<ViewClockIn, IviewClo
 					if(!StringUtil.isNullOrEmpty(o.getHolidayTimeSj()) && !o.getHolidayTimeSj().equals("0")){
 						workDay = workDay.subtract(new BigDecimal(o.getHolidayTimeSj()));
 					}
+					if(!StringUtil.isNullOrEmpty(o.getMissingNum()) && !o.getMissingNum().equals("0")){
+						workDay = workDay.subtract(new BigDecimal(o.getMissingNum()));
+					}
 					o.setWorkDayReal(workDay.toString());//真实考勤天数
 
 				}

+ 2 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/viewClockIn/entity/bdClockinMonth.java

@@ -52,6 +52,8 @@ public class bdClockinMonth {
 	private String syFund;//公积金账号
 	private String category;//人员类别
 
+	private String missingNum;//缺卡天数
+
 	private String years;//年度
 
 	private String months;//月份

+ 4 - 2
jeecg-boot-module-system/src/main/java/org/jeecg/modules/viewClockIn/mapper/xml/bdClockinMonthMapper.xml

@@ -7,10 +7,10 @@
         select m.sy_u8, c.depart_ids departId,c.category,c.sy_fund,c.is_salary,c.is_attendance,c.id personId,c.work_no personCode,
                c.realname personName,c.depart_ids,c.wages_one basePay,
                c.wages_two,c.security,c.wages_base,B.duration
-             ,sj.holiday_time_sj,bj.holiday_time_bj
+             ,sj.holiday_time_sj,bj.holiday_time_bj,b.missingNum
         from sys_user C left join  (
         select a.view_date monthTime,a.years,a.months,a.realname personName,a.user_id personId,a.username personCode,
-        sum(a.lateTime_s) latetimeS,sum(a.lateTime_x) latetimeX ,sum(a.duration) duration,sum(a.sj_time) holidayTime
+        sum(a.lateTime_s) latetimeS,sum(a.lateTime_x) latetimeX ,sum(a.duration) duration,sum(a.sj_time) holidayTime,sum(a.missingNum) missingNum
         from (
         select realname,user_id,username,DATE_FORMAT(view_date,'%Y-%m') view_date,
         DATE_FORMAT(view_date,'%Y') years,
@@ -25,6 +25,8 @@
         end lateTime_x,
         case when set_info ='付薪' then duration else 0 end
         duration,
+        case when shift_name is not null and (goto_time is null or goto_time = '') then 1 else 0 end missingNum,
+
         TIMESTAMPDIFF(hour,holiday_start_date,holiday_end_date)/24 sj_time,
         holiday_type,holiday_start_date,holiday_end_date from view_clock_in_1
         where DATE_FORMAT(view_date,'%Y-%m') = #{nowDate}

+ 6 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/viewClockIn/mapper/xml/viewClockInMapper.xml

@@ -45,7 +45,11 @@
         select A.depart_name,count(b.username) errornum from sys_depart A left join (
         select b.username,b.depart_names from view_clock_in_1 b
         where DATE_FORMAT(b.view_date,'%Y-%m') = #{viewDate}
-        and (b.lateTime_s &lt; 0 or b.lateTime_x > 0 || b.shift_real_time_s is null || b.shift_real_time_s = '' || (b.ifwork !=0 and attendance_Count &lt; 2))
+        and (b.lateTime_s &lt; 0 or b.lateTime_x > 0 || b.shift_real_time_s is null || b.shift_real_time_s = '' || (b.ifwork !=0 and attendance_Count &lt; 2)
+            || (b.name is not null and (b.goto_time is null || b.goto_time = '' ||  b.goto_time = null))
+
+            )
+
         and (b.set_info is null or b.set_info = '')
         group by b.username,b.depart_names
 
@@ -63,6 +67,7 @@
         select b.username,count(1) as errornum from view_clock_in_1 b
         where DATE_FORMAT(b.view_date,'%Y-%m') = #{viewDate}
         and (b.lateTime_s &lt; 0 or b.lateTime_x > 0 || b.shift_real_time_s is null || b.shift_real_time_s = '' || (b.ifwork !=0 and attendance_Count &lt; 2))
+            || (b.name is not null and b.name != '' and (b.goto_time is null || b.goto_time = '' ||  b.goto_time = null))
         and (b.set_info is null or b.set_info = '')
         group by b.username
         ) B