考勤封账
parent
6f6b4b5a82
commit
f1e5bf5e01
@ -0,0 +1,43 @@
|
||||
package weaver.interfaces.aisin.cron;
|
||||
|
||||
import weaver.conn.RecordSet;
|
||||
import weaver.general.Util;
|
||||
import weaver.interfaces.schedule.BaseCronJob;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
|
||||
/**
|
||||
* @Author liang.cheng
|
||||
* @Date 2024/11/26 2:44 PM
|
||||
* @Description: ATBP 考勤封账 每月1号主数据创建 uf_atbpkqfz
|
||||
* @Version 1.0
|
||||
*/
|
||||
public class KqCloseAccountCreateCrob extends BaseCronJob {
|
||||
|
||||
@Override
|
||||
public void execute() {
|
||||
RecordSet rs = new RecordSet();
|
||||
|
||||
String kqMonth = getKqMonth();
|
||||
|
||||
//1.数据是否存在
|
||||
rs.executeQuery("select count(1) as sums from uf_atbpkqfz where fzny = ?",kqMonth);
|
||||
rs.next();
|
||||
int sums = Util.getIntValue(rs.getString("sums"));
|
||||
|
||||
//2.若不存在
|
||||
if (sums == 0) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
private String getKqMonth() {
|
||||
LocalDate currentDate = LocalDate.now();
|
||||
LocalDate previousMonthDate = currentDate.minusMonths(1);
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM");
|
||||
return previousMonthDate.format(formatter);
|
||||
}
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
package weaver.interfaces.aisin.cron;
|
||||
|
||||
import weaver.interfaces.schedule.BaseCronJob;
|
||||
|
||||
/**
|
||||
* @Author liang.cheng
|
||||
* @Date 2024/11/26 2:44 PM
|
||||
* @Description: ATBP 考勤封账 数据更新
|
||||
* @Version 1.0
|
||||
*/
|
||||
public class KqCloseAccountUpdateCrob extends BaseCronJob {
|
||||
|
||||
@Override
|
||||
public void execute() {
|
||||
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue