提交 025d5a2f authored 作者: 李炎's avatar 李炎

配置定时

上级 b018cd83
差异被折叠。
...@@ -8,7 +8,6 @@ import org.quartz.JobExecutionContext; ...@@ -8,7 +8,6 @@ import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException; import org.quartz.JobExecutionException;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.EnableScheduling; import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import java.io.IOException; import java.io.IOException;
......
...@@ -19,6 +19,7 @@ import com.alibaba.fastjson.JSON; ...@@ -19,6 +19,7 @@ import com.alibaba.fastjson.JSON;
import java.io.IOException; import java.io.IOException;
import java.text.ParseException; import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*; import java.util.*;
@Api(tags = "") @Api(tags = "")
...@@ -34,6 +35,18 @@ public class ApiTestContrller { ...@@ -34,6 +35,18 @@ public class ApiTestContrller {
LoanInterfaceWebapi loanInterfaceWebapi; LoanInterfaceWebapi loanInterfaceWebapi;
@GetMapping("/OA") @GetMapping("/OA")
public Object dtr() {
Map returnResult = new HashMap();
Map params = new LinkedHashMap() {{
put("method", "queryConcludeData");
put("type", "ER_ExpenseRequest");
put("date", beforeDayByNowDay());
}};
String responsejson = "";
responsejson = loanInterfaceApi.getSelect(params);//获取借款
return responsejson;
}
public Object tes() throws IOException, ParseException { public Object tes() throws IOException, ParseException {
Map returnResult = new HashMap(); Map returnResult = new HashMap();
Map params = new LinkedHashMap() {{ Map params = new LinkedHashMap() {{
...@@ -88,4 +101,10 @@ public class ApiTestContrller { ...@@ -88,4 +101,10 @@ public class ApiTestContrller {
} }
return returnList; return returnList;
} }
public String beforeDayByNowDay() {
Calendar calendar = Calendar.getInstance();
calendar.add(Calendar.DATE, -1); //得到前一天
String format = new SimpleDateFormat("yyyy-MM-dd").format(calendar.getTime());
return format;
}
} }
...@@ -24,7 +24,7 @@ import java.util.Date; ...@@ -24,7 +24,7 @@ import java.util.Date;
@TableName("oa_select_journal") @TableName("oa_select_journal")
@Accessors(chain = true) @Accessors(chain = true)
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
@ApiModel(value="对象", description="查询到OA-日志") @ApiModel(value="对象", description="查询OA信息-日志")
public class OaSelectJournal implements Serializable { public class OaSelectJournal implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/**主键*/ /**主键*/
......
...@@ -24,7 +24,7 @@ import java.util.Date; ...@@ -24,7 +24,7 @@ import java.util.Date;
@TableName("oa_update_journal") @TableName("oa_update_journal")
@Accessors(chain = true) @Accessors(chain = true)
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
@ApiModel(value="对象", description="传入OA-日志") @ApiModel(value="对象", description="更新OA信息-日志")
public class OaUpdateJournal implements Serializable { public class OaUpdateJournal implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/**主键*/ /**主键*/
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论