liupeng 3 年之前
父节点
当前提交
f09f4fc7e1

+ 5 - 9
code/sapparent/sapservice/src/main/java/org/fouram/core/plugin/weixin/cp/util/WXCpOaUtil.java

@@ -19,7 +19,6 @@ import me.chanjar.weixin.cp.bean.oa.WxCpApprovalInfoQueryFilter;
 import me.chanjar.weixin.cp.bean.oa.WxCpApprovalInfoQueryFilter.KEY;
 import me.chanjar.weixin.cp.bean.oa.WxCpCheckinData;
 import me.chanjar.weixin.cp.bean.oa.WxCpCheckinOption;
-import me.chanjar.weixin.cp.bean.oa.WxCpCheckinOption.CheckinTime;
 import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
 
 /**
@@ -92,13 +91,10 @@ public class WXCpOaUtil {
 	}
 
 	public static void main(String[] args) throws Exception {
-		List<Date> datetimes = Lists.newArrayList();
-		datetimes.add(DateUtil.sdfTime.parse("2020-12-29 00:00:00"));
-		for (WxCpCheckinOption option : getCheckinOption(datetimes, Lists.newArrayList("1245", "1242"))) {
-			if (option.getGroup() != null && !option.getGroup().getCheckinDate().isEmpty()) {
-				CheckinTime checkinTime = option.getGroup().getCheckinDate().get(0).getCheckinTime()[0];
-				System.out.println(checkinTime);
-			}
-		}
+		Date startDate = DateUtil.sdfTime.parse("2021-04-01 00:00:00");
+		Date endDate = DateUtil.sdfTime.parse("2021-04-01 23:59:59");
+		List<WxCpCheckinData> checkinDatas = WXCpOaUtil.getCheckinData(startDate, endDate, Lists.newArrayList("1230"));
+		System.out.println(checkinDatas);
+		System.out.println(new Date(1617284825000L));
 	}
 }