|
|
@@ -2,6 +2,8 @@ package com.usoftchina.qywx.sdk.test;
|
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.usoftchina.qywx.sdk.OaSdk;
|
|
|
+import com.usoftchina.qywx.sdk.dto.GetCheckinDataReq;
|
|
|
+import com.usoftchina.qywx.sdk.dto.GetCheckinDataResp;
|
|
|
import com.usoftchina.qywx.sdk.dto.GetCheckinOptionReq;
|
|
|
import com.usoftchina.qywx.sdk.dto.GetCheckinOptionResp;
|
|
|
import org.junit.Test;
|
|
|
@@ -26,9 +28,19 @@ public class OaSdkTest extends BaseTest {
|
|
|
@Test
|
|
|
public void getCheckinOption() {
|
|
|
List<GetCheckinOptionResp.CheckinOption> options = sdk.getCheckinOption(new GetCheckinOptionReq(LocalDate.now().atStartOfDay(ZoneId.systemDefault()).toInstant().toEpochMilli() / 1000,
|
|
|
- Arrays.asList("YingPeng")));
|
|
|
+ Arrays.asList("U0308")));
|
|
|
if (!CollectionUtils.isEmpty(options)) {
|
|
|
System.out.println(JSON.toJSONString(options));
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ @Test
|
|
|
+ public void getCheckinData() {
|
|
|
+ List<GetCheckinDataResp.CheckinData> dataList = sdk.getCheckinData(new GetCheckinDataReq(
|
|
|
+ GetCheckinDataReq.CheckinType.ALL, LocalDate.now().atStartOfDay(ZoneId.systemDefault()).toInstant().toEpochMilli() / 1000,
|
|
|
+ System.currentTimeMillis() / 1000, Arrays.asList("U0308")));
|
|
|
+ if (!CollectionUtils.isEmpty(dataList)) {
|
|
|
+ System.out.println(JSON.toJSONString(dataList));
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|