update code
parent
ff10ce3e8c
commit
09fe898087
|
@ -16,16 +16,16 @@ import org.springframework.web.bind.annotation.GetMapping;
|
|||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
import java.io.IOException;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
//@Component("attendanceJgwTask")
|
||||
@RestController
|
||||
@RequestMapping("/jgw")
|
||||
@Component("attendanceJgwTask")
|
||||
//@RestController
|
||||
//@RequestMapping("/jgw")
|
||||
public class AttendanceJgwTask {
|
||||
static String host="http://api.gongyoumishu.com:80/gomeetapi/";
|
||||
static String appId="6a6f24fe35b04ee0bcf31cfb46ed1051";
|
||||
|
@ -59,7 +59,7 @@ public class AttendanceJgwTask {
|
|||
/**
|
||||
* 参建单位同步
|
||||
*/
|
||||
@GetMapping("/asyncProContractor")
|
||||
//@GetMapping("/asyncProContractor")
|
||||
public AjaxResult asyncProContractor(){
|
||||
String token=getToken();
|
||||
if(StrUtil.isBlank(token)){
|
||||
|
@ -96,7 +96,7 @@ public class AttendanceJgwTask {
|
|||
/**
|
||||
* 队伍信息同步
|
||||
*/
|
||||
@GetMapping("/asyncGroup")
|
||||
//@GetMapping("/asyncGroup")
|
||||
public AjaxResult asyncGroup(){
|
||||
JSONArray unitList=getUnitList();
|
||||
JSONArray groupList=getGroupList();
|
||||
|
@ -275,7 +275,7 @@ public class AttendanceJgwTask {
|
|||
/**
|
||||
* 班组信息同步
|
||||
*/
|
||||
@GetMapping("/asyncTeam")
|
||||
//@GetMapping("/asyncTeam")
|
||||
public AjaxResult asyncTeam(){
|
||||
String token=getToken();
|
||||
if(StrUtil.isBlank(token)){
|
||||
|
@ -352,7 +352,7 @@ public class AttendanceJgwTask {
|
|||
/**
|
||||
* 人员信息同步
|
||||
*/
|
||||
@GetMapping("/asyncWorker")
|
||||
//@GetMapping("/asyncWorker")
|
||||
public AjaxResult asyncWorker(){
|
||||
String token=getToken();
|
||||
if(StrUtil.isBlank(token)){
|
||||
|
@ -431,7 +431,7 @@ public class AttendanceJgwTask {
|
|||
/**
|
||||
* 同步当天数据
|
||||
*/
|
||||
@GetMapping("/asyncAttendanceData")
|
||||
//@GetMapping("/asyncAttendanceData")
|
||||
public AjaxResult asyncAttendanceData(){
|
||||
String dtStart= DateUtil.format(new Date(),"yyyy-MM-dd");
|
||||
String dtEnd=dtStart;
|
||||
|
@ -442,7 +442,7 @@ public class AttendanceJgwTask {
|
|||
/**
|
||||
* 同步7天之内数据
|
||||
*/
|
||||
@GetMapping("/syncLastWeekAttendanceData")
|
||||
//@GetMapping("/syncLastWeekAttendanceData")
|
||||
public void syncLastWeekAttendanceData(){
|
||||
String dtEnd=DateUtil.format(new Date(),"yyyy-MM-dd");
|
||||
String dtStart=DateUtil.format(DateUtil.offsetDay(new Date(),-7),"yyyy-MM-dd");
|
||||
|
@ -453,7 +453,7 @@ public class AttendanceJgwTask {
|
|||
/**
|
||||
* 同步30天内数据
|
||||
*/
|
||||
@GetMapping("/syncLast30DayAttendanceData")
|
||||
//@GetMapping("/syncLast30DayAttendanceData")
|
||||
public void syncLast30DayAttendanceData(){
|
||||
String dtEnd=DateUtil.format(new Date(),"yyyy-MM-dd");
|
||||
String dtStart=DateUtil.format(DateUtil.offsetDay(new Date(),-300),"yyyy-MM-dd");
|
||||
|
@ -461,7 +461,7 @@ public class AttendanceJgwTask {
|
|||
syncAttendanceData(dtStart,dtEnd,userList);
|
||||
}
|
||||
|
||||
@GetMapping("/syncLast202406to202410DayAttendanceData")
|
||||
//@GetMapping("/syncLast202406to202410DayAttendanceData")
|
||||
public void syncLast202406to202410DayAttendanceData(){
|
||||
String dtStart="2024-06-01";
|
||||
String dtEnd="2024-07-01";
|
||||
|
|
Loading…
Reference in New Issue