|
|
|
@ -21,8 +21,7 @@ import weaver.systeminfo.SystemEnv;
|
|
|
|
|
|
|
|
|
|
import java.time.LocalDate;
|
|
|
|
|
import java.util.*;
|
|
|
|
|
import java.util.concurrent.ExecutorService;
|
|
|
|
|
import java.util.concurrent.Executors;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @Author: sy
|
|
|
|
@ -45,12 +44,15 @@ public class AttendanceSummaryServiceImpl extends Service implements AttendanceS
|
|
|
|
|
bs.writeLog("params : " + params);
|
|
|
|
|
String mainIds = Util.null2String(params.get("mainIds"));
|
|
|
|
|
bs.writeLog("mainIds : " + mainIds);
|
|
|
|
|
ExecutorService taskExecutor = Executors.newCachedThreadPool();
|
|
|
|
|
taskExecutor.execute(() -> {
|
|
|
|
|
Thread thread1 = new Thread(() -> {
|
|
|
|
|
List<String> mainIdList = new ArrayList<>();
|
|
|
|
|
if (!mainIds.equals("")) {
|
|
|
|
|
mainIdList = Arrays.asList(mainIds.split(","));
|
|
|
|
|
}
|
|
|
|
|
//更新汇总主表的汇总状态字段为汇总中
|
|
|
|
|
String startUpdateSql = "update uf_jcl_kq_cqhz set hzzt = 1 where id in (" + mainIds + ")";
|
|
|
|
|
DbTools.update(startUpdateSql);
|
|
|
|
|
try {
|
|
|
|
|
for (String mainId : mainIdList) {
|
|
|
|
|
List<Map<String, String>> addList = new ArrayList<>();
|
|
|
|
|
//查询出勤汇总主表信息
|
|
|
|
@ -114,7 +116,17 @@ public class AttendanceSummaryServiceImpl extends Service implements AttendanceS
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//更新汇总主表的汇总状态字段为汇总中
|
|
|
|
|
String endUpdateSql = "update uf_jcl_kq_cqhz set hzzt = 2 where id in (" + mainIds + ")";
|
|
|
|
|
DbTools.update(endUpdateSql);
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
//更新汇总主表的汇总状态字段为未汇总
|
|
|
|
|
String endUpdateSql = "update uf_jcl_kq_cqhz set hzzt = 0 where id in (" + mainIds + ")";
|
|
|
|
|
DbTools.update(endUpdateSql);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
thread1.start();
|
|
|
|
|
return new HashMap<>();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|