|
|
@ -28,12 +28,13 @@ public class KqCalulateUtil {
|
|
|
|
public static List<KqFormatTotal> abnormalAttendance(String resourceId,String fromDate,String toDate) {
|
|
|
|
public static List<KqFormatTotal> abnormalAttendance(String resourceId,String fromDate,String toDate) {
|
|
|
|
RecordSet rs = new RecordSet();
|
|
|
|
RecordSet rs = new RecordSet();
|
|
|
|
List<KqFormatTotal> kqFormatTotalList = new ArrayList<>();
|
|
|
|
List<KqFormatTotal> kqFormatTotalList = new ArrayList<>();
|
|
|
|
rs.executeQuery("select resourceid, forgotCheck, absenteeism, beLateMins, gravebeLateMins, leaveEearly, " +
|
|
|
|
rs.executeQuery("select resourceid, forgotCheck,forgotbeginworkcheck, absenteeism, beLateMins, gravebeLateMins, leaveEearly, " +
|
|
|
|
" graveLeaveEarly from kq_format_total where resourceid = ? and kqdate >= '"+fromDate+"' and kqdate <= '"+toDate+"'",resourceId);
|
|
|
|
" graveLeaveEarly from kq_format_total where resourceid = ? and kqdate >= '"+fromDate+"' and kqdate <= '"+toDate+"'",resourceId);
|
|
|
|
while (rs.next()) {
|
|
|
|
while (rs.next()) {
|
|
|
|
boolean isAbsence;
|
|
|
|
boolean isAbsence;
|
|
|
|
int absenteeism = Util.getIntValue(rs.getString("absenteeism"));
|
|
|
|
int absenteeism = Util.getIntValue(rs.getString("absenteeism"));
|
|
|
|
int forgotCheck = Util.getIntValue(rs.getString("forgotCheck"));
|
|
|
|
int forgotCheck = Util.getIntValue(rs.getString("forgotCheck"));
|
|
|
|
|
|
|
|
int forgotbeginworkcheck = Util.getIntValue(rs.getString("forgotbeginworkcheck"));
|
|
|
|
int beLateMins = Util.getIntValue(rs.getString("beLateMins"),0);
|
|
|
|
int beLateMins = Util.getIntValue(rs.getString("beLateMins"),0);
|
|
|
|
int gravebeLateMins = Util.getIntValue(rs.getString("gravebeLateMins"),0);
|
|
|
|
int gravebeLateMins = Util.getIntValue(rs.getString("gravebeLateMins"),0);
|
|
|
|
int leaveEearly = Util.getIntValue(rs.getString("leaveEearly"));
|
|
|
|
int leaveEearly = Util.getIntValue(rs.getString("leaveEearly"));
|
|
|
@ -42,6 +43,7 @@ public class KqCalulateUtil {
|
|
|
|
//规则1
|
|
|
|
//规则1
|
|
|
|
isAbsence = isPositive(absenteeism) ||
|
|
|
|
isAbsence = isPositive(absenteeism) ||
|
|
|
|
isPositive(forgotCheck) ||
|
|
|
|
isPositive(forgotCheck) ||
|
|
|
|
|
|
|
|
isPositive(forgotbeginworkcheck) ||
|
|
|
|
sumPositive(leaveEearly, graveLeaveEarly) > 0;
|
|
|
|
sumPositive(leaveEearly, graveLeaveEarly) > 0;
|
|
|
|
|
|
|
|
|
|
|
|
kqFormatTotalList.add(KqFormatTotal.builder()
|
|
|
|
kqFormatTotalList.add(KqFormatTotal.builder()
|
|
|
|