考勤上线后问题处理

dev-chenwnj
chenwei 1 year ago
parent 2a6faf096e
commit 5337fba611

@ -135,13 +135,14 @@ public class KQFormatData extends BaseBean {
lsParam.addAll(format(userId, kqDate, workTime, workFlowInfo,uuid));
}
bb.writeLog("lsParam: " + lsParam);
if (lsParam.size() > 0) {
sql = " insert into kq_format_detail( " +
" resourceid,kqdate,groupid,serialid,serialnumber,workbegindate,workbegintime,workenddate,workendtime,workmins," +
" signindate,signintime,signinid,signoutdate,signouttime,signoutid,signMins," +
" attendanceMins,belatemins,graveBeLateMins,leaveearlymins,graveLeaveEarlyMins,absenteeismmins,forgotcheckMins," +
" leaveMins,leaveinfo,evectionMins,outMins,forgotbeginworkcheckmins,otherinfo,zeropoint"+(definedField.length()>0?","+definedField+"":"")+") " +
" values(?,?,?,?,?,?,?,?,?,?, ?,?,?,?,?,?,?, ?,?,?,?,?,?,?,?,?,?,?,?,?"+(definedField.length()>0?","+definedParam+"":"")+")";
" values(?,?,?,?,?,?,?,?,?,?, ?,?,?,?,?,?,?, ?,?,?,?,?,?,?,?,?,?,?,?,?,?"+(definedField.length()>0?","+definedParam+"":"")+")";
for (int i = 0; i < lsParam.size(); i++) {
List<Object> param = lsParam.get(i);
boolean isok = rs.executeUpdate(sql, param);
@ -163,7 +164,7 @@ public class KQFormatData extends BaseBean {
" sum(case when absenteeismmins> 0 then 1 else 0 end) as absenteeism,sum(absenteeismmins) as absenteeismmins," +
" sum(case when forgotcheckmins> 0 then 1 else 0 end) as forgotcheck,sum(forgotcheckmins) as forgotcheckmins,sum(leaveMins) as leaveMins," +
" sum(evectionMins) as evectionMins,sum(outMins) as outMins, " +
" sum(case when forgotbeginworkcheckmins> 0 then 1 else 0 end) as forgotbeginworkcheck,sum(forgotbeginworkcheckmins) as forgotbeginworkcheckmins,zeropoint " +
" sum(case when forgotbeginworkcheckmins> 0 then 1 else 0 end) as forgotbeginworkcheck,sum(forgotbeginworkcheckmins) as forgotbeginworkcheckmins,sum(zeropoint) as zeropoint " +
(definedField.length()>0?","+definedParamSum+"":"")+
" from kq_format_detail a, hrmresource b" +
" where a.resourceid = b.id and resourceid = ? and kqdate=?" +
@ -911,7 +912,7 @@ public class KQFormatData extends BaseBean {
String serialid = Util.null2String(workTime.getSerialId());
/*考勤二开--零点补助start*/
String zeroPointSub = "0";
int zeroPointSub = 0;
RecordSet rs = new RecordSet();
Map<String, Object> groupMap = new HashMap<>();
String acqSql = "select kqgroup, grouptype from uf_ZeroPointSubSft";
@ -942,7 +943,7 @@ public class KQFormatData extends BaseBean {
String subsidyTime = kqDate + " 23:00:00";
String outTime = signDate + " " + signTime;
if (outTime.compareTo(subsidyTime) > 0 ) {
zeroPointSub = "1";
zeroPointSub = 1;
}
}
}
@ -957,7 +958,7 @@ public class KQFormatData extends BaseBean {
String subsidyTime = kqDate + " 00:00:00";
String outTime = signDate + " " + signTime;
if (outTime.compareTo(subsidyTime) > 0 ) {
zeroPointSub = "1";
zeroPointSub = 1;
}
}
}

@ -290,6 +290,12 @@ public class PunchOutButtonCmd extends AbstractCommonCommand<Map<String, Object>
if ( StringUtils.isNotBlank(evectionTableName) && StringUtils.isNotBlank(outTableName) ) {
Integer number = -1;
String sqlDate = "";
if (StringUtils.isNotBlank(belongdate)) {
sqlDate = belongdate;
} else {
sqlDate = signDate;
}
String acqEvecAndOutSql = " select sum(a.number) as number " +
" from ( " +
" SELECT " +
@ -297,19 +303,19 @@ public class PunchOutButtonCmd extends AbstractCommonCommand<Map<String, Object>
" FROM " +
" workflow_requestbase " +
" WHERE " +
" requestid IN ( SELECT requestid FROM " + evectionTableName + " WHERE sqr = '" + userId + "' and ksrq <='" + belongdate + "' and yjjsrq >='" + belongdate + "' ) " +
" AND currentnodetype = 3 " +
" requestid IN ( SELECT requestid FROM " + evectionTableName + " WHERE sqr = '" + userId + "' and ksrq <='" + sqlDate + "' and yjjsrq >='" + sqlDate + "' ) " +
// " AND currentnodetype = 3 " +
" UNION all " +
" SELECT " +
" count(*) as number " +
" FROM " +
" workflow_requestbase " +
" WHERE " +
" requestid IN ( SELECT requestid FROM " + outTableName + " WHERE sqr = '" + userId + "' and ksrq <='" + belongdate + "' and yjjsrq >='" + belongdate + "') " +
" requestid IN ( SELECT requestid FROM " + outTableName + " WHERE sqr = '" + userId + "' and ksrq <='" + sqlDate + "' and yjjsrq >='" + sqlDate + "') " +
// " AND currentnodetype = 3 " +
") a ";
rs.executeQuery(acqEvecAndOutSql);
// bb.writeLog("acqEvecAndOutSql: " + acqEvecAndOutSql);
bb.writeLog("acqEvecAndOutSql: " + acqEvecAndOutSql);
while (rs.next()) {
number = Util.getIntValue(Util.null2String(rs.getString("number")));

Loading…
Cancel
Save