|
|
|
|
|
|
|
|
|
|
|
import com.engine.attendance.attendanceanalysis.cmd.AbsenteeismCmd;
|
|
|
|
import com.engine.attendance.enums.SystemItemEnum;
|
|
|
|
import com.engine.common.util.DateUtil;
|
|
|
|
import com.google.common.collect.Maps;
|
|
|
|
|
|
|
|
import java.time.LocalDate;
|
|
|
|
import java.time.temporal.ChronoUnit;
|
|
|
|
import java.util.*;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public class Test {
|
|
|
|
public static void main(String[] args) {
|
|
|
|
// Map<String,Object> params = Maps.newHashMap();
|
|
|
|
// List<Map<String,Object>> attendanceItems = new ArrayList<>();
|
|
|
|
// Map<String,Object> map = new HashMap<>();
|
|
|
|
// map.put("xmlx","1");
|
|
|
|
// map.put("zysd","1");
|
|
|
|
// map.put("zxhsl","60");
|
|
|
|
// map.put("zdhsl","180");
|
|
|
|
// Map<String,Object> map2 = new HashMap<>();
|
|
|
|
// map2.put("xmlx","2");
|
|
|
|
// map2.put("zysd","1");
|
|
|
|
// map2.put("zxhsl","60");
|
|
|
|
// map2.put("zdhsl","180");
|
|
|
|
// Map<String,Object> map3 = new HashMap<>();
|
|
|
|
// map3.put("xmlx","2");
|
|
|
|
// map3.put("zysd","1");
|
|
|
|
// map3.put("zxhsl","0");
|
|
|
|
// map3.put("zdhsl","60");
|
|
|
|
// attendanceItems.add(map);
|
|
|
|
// attendanceItems.add(map2);
|
|
|
|
// attendanceItems.add(map3);
|
|
|
|
// params.put("attendanceItems",attendanceItems);
|
|
|
|
// params.put("workfor","1");
|
|
|
|
// params.put("time","50");
|
|
|
|
// new AbsenteeismCmd(params).execute(null);
|
|
|
|
|
|
|
|
|
|
|
|
System.out.println(DateUtil.AfterDay("2023-10-27",1));
|
|
|
|
// List<Map<String,Object>> personGroupOrganizationList = Lists.newArrayList();
|
|
|
|
// personGroupOrganizationList.add(new HashMap(){{put("dx","4-夜班人员");}});
|
|
|
|
// personGroupOrganizationList.add(new HashMap(){{put("dx","8-测试条件录入");}});
|
|
|
|
// Set<String> personGroupIds = personGroupOrganizationList.stream().map(e -> Util.null2String(e.get("dx")).split("-")[0]).collect(Collectors.toSet());
|
|
|
|
// System.out.println(String.join(",",personGroupIds));
|
|
|
|
}
|
|
|
|
|
|
|
|
public static int getDaysBetween(String date1, String date2) {
|
|
|
|
LocalDate startDate = LocalDate.parse(date1);
|
|
|
|
LocalDate endDate = LocalDate.parse(date2);
|
|
|
|
|
|
|
|
long daysBetween = ChronoUnit.DAYS.between(startDate, endDate);
|
|
|
|
return Math.toIntExact(daysBetween);
|
|
|
|
}
|
|
|
|
}
|