update code

dev_xds
haha 2024-03-14 22:36:26 +08:00
parent 82c0269d22
commit 9566d0e9c6
1 changed files with 9 additions and 9 deletions

View File

@ -33,11 +33,12 @@ public class AttendanceHuazhuTask {
@Autowired
ISurProjectAttendanceGroupService attendanceGroupService;
/*
public static void main1(String[] args) {
public static void main(String[] args) {
//String host="http://tapi.huazhukeji.cn:82/hz-labour";
String host="http://api.1357.cn/hz-labour";
String path="/api/open/labour/findWorkerTypeByPage";
//String path="/api/open/labour/findWorkerTypeByPage";
String path="/api/open/labour/findCardRecordByPage";
HttpUrl.Builder urlBuilder = Objects.requireNonNull(HttpUrl.parse(host + path))
.newBuilder();
@ -46,11 +47,11 @@ public class AttendanceHuazhuTask {
headerParams.put("appSecret","2070308b49399d94b401d98adeaa5b342aa81627");
headerParams.put("Content-Type","application/json");
Map<String, String> params = new HashMap<>();
Map<String, Object> params = new HashMap<>();
params.put("orgId","1666339529033805825");
params.put("tenantId","1666337067184893953");
params.put("size","200");
params.put("current","1");
params.put("current","174");
Request request = new Request.Builder()
.url(urlBuilder.build())
.post(toFormBody(params)).headers(setHeaderParams(headerParams))
@ -59,14 +60,13 @@ public class AttendanceHuazhuTask {
System.out.println(data);
}
*/
//380649600000
public static void main2(String[] args) {
//String s= DateUtil.format(DateUtil.date(1704167341751l),"yyyy-MM-dd HH:mm:ss");
System.out.println(DateUtil.current());
}
public static void main(String[] args) {
public static void main3(String[] args) {
String path="/api/open/labour/findLabourWorkerByPage";
Map<String,String> map=new HashMap<>();
map.put("appId","8024283707153666851");
@ -111,7 +111,7 @@ public class AttendanceHuazhuTask {
*/
public void syncLastWeekAttendanceData() {
long endTime=DateUtil.current();
long startTime=endTime-3600*1000*24*7;
long startTime=endTime-3600*1000*24*90;
syncAttendanceData(startTime);
}
@ -217,7 +217,7 @@ public class AttendanceHuazhuTask {
}
}
private void doSyncAttendanceData(JSONObject jdata,long page,SurProjectAttendanceCfg it,Map<String,Object> ps){
String path="/api/open/labour/findUnitProjectByPage";
String path="/api/open/labour/findCardRecordByPage";
Request request=getRequest(path,jdata,page,ps);
String data=AttendanceTask.getResult(request);
JSONObject jo= JSON.parseObject(data);