68 lines
1.7 KiB
Java
68 lines
1.7 KiB
Java
|
|
package com.engine.kq.biz;
|
|||
|
|
|
|||
|
|
import com.engine.kq.log.KQLog;
|
|||
|
|
import weaver.conn.RecordSet;
|
|||
|
|
|
|||
|
|
public class KQFormatThread extends com.weaver.util.threadPool.entity.LocalRunnable {
|
|||
|
|
private String id;
|
|||
|
|
private String resourceid;
|
|||
|
|
private String kqdate;
|
|||
|
|
|
|||
|
|
private int formatType;
|
|||
|
|
private KQLog kqLog = new KQLog();
|
|||
|
|
|
|||
|
|
@Override
|
|||
|
|
public void execute() {
|
|||
|
|
RecordSet rs = new RecordSet();
|
|||
|
|
//更新已处理的记录
|
|||
|
|
String key = this.kqdate+ "|"+ this.resourceid;
|
|||
|
|
try {
|
|||
|
|
kqLog.info("执行KQFormatThread this.resourceid=="+this.resourceid+"this.kqdate=="+this.kqdate);
|
|||
|
|
KQFormatData kqFormatData = new KQFormatData();
|
|||
|
|
//-1: 其他; 11:右键重新计算考勤数据; 12: 考勤自动和手动同步;13:钉钉同步或者导入; 14:云桥考勤同步 15: 考勤导入;16:排班更新
|
|||
|
|
//打卡数据这些要更新,11和16不能更新,
|
|||
|
|
kqFormatData.formatKqDateByLock(this.resourceid, this.kqdate,this.formatType);
|
|||
|
|
|
|||
|
|
boolean isremove = KQFormatJob.kqformatIds.remove(key);
|
|||
|
|
if(isremove){
|
|||
|
|
rs.executeUpdate("update kq_format_pool set status=1 where id=?",this.id);
|
|||
|
|
}
|
|||
|
|
} catch (Exception e) {
|
|||
|
|
KQFormatJob.kqformatIds.remove(key);
|
|||
|
|
kqLog.info(e);
|
|||
|
|
writeLog(e);
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public String getId() {
|
|||
|
|
return id;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public void setId(String id) {
|
|||
|
|
this.id = id;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public String getResourceid() {
|
|||
|
|
return resourceid;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public void setResourceid(String resourceid) {
|
|||
|
|
this.resourceid = resourceid;
|
|||
|
|
}
|
|||
|
|
public int getFormatType() {
|
|||
|
|
return formatType;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public void setFormatType(int formatType) {
|
|||
|
|
this.formatType = formatType;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public String getKqdate() {
|
|||
|
|
return kqdate;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public void setKqdate(String kqdate) {
|
|||
|
|
this.kqdate = kqdate;
|
|||
|
|
}
|
|||
|
|
}
|