二开 班别出勤工时&请假时长计算扣减

csxg
dxfeng 2 years ago
parent dee3855003
commit cf8841a775

@ -13,6 +13,7 @@ import com.google.common.collect.Maps;
import com.googlecode.aviator.AviatorEvaluator;
import com.googlecode.aviator.Expression;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import weaver.common.DateUtil;
import weaver.conn.BatchRecordSet;
import weaver.conn.RecordSet;
@ -660,8 +661,27 @@ public class KQFormatData extends BaseBean {
if(this.writeLog) {
logInfo.put(""+weaver.systeminfo.SystemEnv.getHtmlLabelName(10005301,weaver.general.ThreadVarLanguage.getLang())+"",kqShiftRuleEntity);
}
// 考勤二开 设置第二次打卡允许迟到239分钟
if (workTime.getWorkMins() == 1440 && lsWorkTime.size() == 2 && lsWorkTime.get(1).getBeginTime().equals("24:00") && i == 1) {
WorkTimeEntity cusWorkTimeEntity = new WorkTimeEntity();
BeanUtils.copyProperties(workTime,cusWorkTimeEntity);
Map<String, Object> shiftRuleInfo = cusWorkTimeEntity.getShiftRuleInfo();
RecordSet rs = new RecordSet();
rs.executeQuery("select mins_next from kq_ShiftOnOffWorkSections where record ='1' and onoffworktype = 'start' and serialid = ?", workTime.getSerialId());
String mins_next = "";
if (rs.next()) {
mins_next = rs.getString("mins_next");
}
shiftRuleInfo.put("permitlatestatus", "1");
shiftRuleInfo.put("permitlateminutes", StringUtils.isNotBlank(mins_next) ? mins_next : "239");
//人性化规则
kqShiftRuleEntity = kqFormatShiftRule.doShiftRule(cusWorkTimeEntity, kqShiftRuleEntity);
} else {
//人性化规则
kqShiftRuleEntity = kqFormatShiftRule.doShiftRule(workTime, kqShiftRuleEntity);
}
//人性化规则
kqShiftRuleEntity = kqFormatShiftRule.doShiftRule(workTime,kqShiftRuleEntity);
//kqShiftRuleEntity = kqFormatShiftRule.doShiftRule(workTime,kqShiftRuleEntity);
kqLog.info("人性化规则处理后数据" + JSONObject.toJSONString(kqShiftRuleEntity));
if(this.writeLog) {
logInfo.put(""+weaver.systeminfo.SystemEnv.getHtmlLabelName(10005302,weaver.general.ThreadVarLanguage.getLang())+"",kqShiftRuleEntity);

Loading…
Cancel
Save