#离职人员对接得力系统
parent
0aba0978ac
commit
cab70ec6dc
@ -0,0 +1,42 @@
|
||||
package weaver.interfaces.shuzhi.cronjob;
|
||||
|
||||
import com.time.util.DateUtil;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import weaver.conn.RecordSet;
|
||||
import weaver.general.Util;
|
||||
import weaver.interfaces.schedule.BaseCronJob;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 人员离职 推送得力系统 调用得力人员离职接口计划任务(默认将上月离职人员推送)
|
||||
*
|
||||
* @author wangj
|
||||
* @version 1.00版本
|
||||
* @Date 2024-11-29
|
||||
*/
|
||||
|
||||
public class HrmResignDeliJob extends BaseCronJob {
|
||||
private String month;
|
||||
|
||||
@Override
|
||||
public void execute() {
|
||||
String lzmonth = "";
|
||||
if (StringUtils.isNotBlank(month)) {
|
||||
lzmonth = month;
|
||||
} else {
|
||||
Date date = DateUtil.getDateAfterMonths(new Date(), -1);
|
||||
lzmonth = DateUtil.formatDate(date, "yyyy-MM");
|
||||
}
|
||||
String sql = "select b.id,b.lzry,c.lastname,b.jhlzrq,a.gdrq from uf_lzblcxbd a left join uf_lzblcxbd_dt1 b on a.id = b.mainid left join hrmresource c on c.id = b.lzry where jhlzrq like '" + lzmonth + "%'";
|
||||
RecordSet rs = new RecordSet();
|
||||
rs.execute(sql);
|
||||
while (rs.next()) {
|
||||
String userid = Util.null2String(rs.getString("lzry"));
|
||||
|
||||
EcologyToDelicloudUtil EcologyToDelicloudUtil = new EcologyToDelicloudUtil();
|
||||
EcologyToDelicloudUtil.updateEmployeeResign(userid);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue