|
|
|
@ -2468,18 +2468,19 @@ public class KQReportBiz extends BaseBean {
|
|
|
|
|
while(rs.next()){
|
|
|
|
|
int serialid = Util.getIntValue(rs.getString("serialid"));
|
|
|
|
|
double attendanceMins = Util.getDoubleValue(rs.getString("attendanceMins"),0.00);
|
|
|
|
|
attendanceMins = attendanceMins / 60;
|
|
|
|
|
double overTimeTotal = getOverTimeTotal(kqdate,userid);
|
|
|
|
|
double time = attendanceMins+overTimeTotal;
|
|
|
|
|
//1、 12小时工作制夜班、做六休一夜班有夜班补贴,并且出勤(上班时间+加班时间)>=8小时,统计一次
|
|
|
|
|
if(serialid == sixnight_serialid|| serialid == twelvehours_night_serialid){
|
|
|
|
|
if(serialid == sixnight_serialid || serialid == twelvehours_night_serialid){
|
|
|
|
|
if(time >= 8){
|
|
|
|
|
result = 1;
|
|
|
|
|
result ++;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//2、当一线人员排“夜休”班次,并且加班台账当天导入的加班时长>=8小时,统计一次。
|
|
|
|
|
if(serialid == night_rest_serialid){
|
|
|
|
|
if(overTimeTotal >= 8){
|
|
|
|
|
result += 1;
|
|
|
|
|
result ++;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -2498,19 +2499,32 @@ public class KQReportBiz extends BaseBean {
|
|
|
|
|
RecordSet rs = new RecordSet();
|
|
|
|
|
int sixnight_serialid = Integer.parseInt(rs.getPropValue("nbjh_ygdjblc","sixnight_serialid"));
|
|
|
|
|
int twelvehours_night_serialid = Integer.parseInt(rs.getPropValue("nbjh_ygdjblc","twelvehours_night_serialid"));
|
|
|
|
|
int night_rest_serialid = Integer.parseInt(rs.getPropValue("nbjh_ygdjblc","night_rest_serialid"));
|
|
|
|
|
rs.executeQuery("select * from kq_format_total where kqdate >= ? and kqdate <= ? and resourceid=?",fromDate,toDate,userid);
|
|
|
|
|
rs.writeLog("select * from kq_format_total where kqdate >= '"+ fromDate +"' and kqdate <= '"+ toDate +"' and resourceid="+ userid);
|
|
|
|
|
while(rs.next()){
|
|
|
|
|
int serialid = Util.getIntValue(rs.getString("serialid"));
|
|
|
|
|
String kqdate = Util.null2String(rs.getString("kqdate"));
|
|
|
|
|
double attendanceMins = Util.getDoubleValue(rs.getString("attendanceMins"),0.00);
|
|
|
|
|
attendanceMins = attendanceMins / 60;
|
|
|
|
|
rs.writeLog("========= getNightSubsidyTotal attendanceMins ========== "+ attendanceMins);
|
|
|
|
|
double overTimeTotal = getOverTimeTotal(kqdate,userid);
|
|
|
|
|
rs.writeLog("========= getNightSubsidyTotal overTimeTotal ========== "+ overTimeTotal);
|
|
|
|
|
double time = attendanceMins+overTimeTotal;
|
|
|
|
|
if(serialid == sixnight_serialid|| serialid == twelvehours_night_serialid){
|
|
|
|
|
rs.writeLog("========= getNightSubsidyTotal time ========== "+ time);
|
|
|
|
|
if(serialid == sixnight_serialid || serialid == twelvehours_night_serialid){
|
|
|
|
|
if(time >= 8){
|
|
|
|
|
result++;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
rs.writeLog("========= getNightSubsidyTotal result 111 ========== "+ result);
|
|
|
|
|
//2、当一线人员排“夜休”班次,并且加班台账当天导入的加班时长>=8小时,统计一次。
|
|
|
|
|
if(serialid == night_rest_serialid){
|
|
|
|
|
if(overTimeTotal >= 8){
|
|
|
|
|
result ++;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
rs.writeLog("========= getNightSubsidyTotal result 222 ========== "+ result);
|
|
|
|
|
}
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
@ -2545,11 +2559,10 @@ public class KQReportBiz extends BaseBean {
|
|
|
|
|
String tablename_dt = tablename+"_dt1";
|
|
|
|
|
rs.executeQuery("select b.* from "+ tablename +" a,"+ tablename_dt +" b,workflow_requestbase c " +
|
|
|
|
|
"where a.requestid = c.requestid and a.id=b.mainid and c.currentnodetype=3 " +
|
|
|
|
|
"and a.ksrq >=? and a.jsrq <=? and a.resourceId=?",fromDate,toDate,userid);
|
|
|
|
|
if(rs.next()){
|
|
|
|
|
|
|
|
|
|
"and a.detail_signdate >=? and a.detail_signdate <=? and a.resourceId=?",fromDate,toDate,userid);
|
|
|
|
|
while(rs.next()){
|
|
|
|
|
result++;
|
|
|
|
|
}
|
|
|
|
|
result = rs.getCounts();
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -2567,9 +2580,10 @@ public class KQReportBiz extends BaseBean {
|
|
|
|
|
rs.executeQuery("select b.* from "+ tablename +" a,"+ tablename_dt +" b,workflow_requestbase c " +
|
|
|
|
|
"where a.requestid = c.requestid and a.id=b.mainid and c.currentnodetype=3 " +
|
|
|
|
|
"and b.detail_signdate =? and a.resourceId=?",kqdate,userid);
|
|
|
|
|
if(rs.next()){
|
|
|
|
|
result = 1;
|
|
|
|
|
while(rs.next()){
|
|
|
|
|
result ++;
|
|
|
|
|
}
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|