|
@@ -24,6 +24,41 @@ public class settlementJob {
|
|
|
private IKuaishouSupplyChainService ikuaishouSupplyChainService;
|
|
|
|
|
|
|
|
|
+ public static void main(String[] args) {
|
|
|
+ String nowDate = DateUtils.getNowDate("yyyy-MM-dd");
|
|
|
+ String startDate = DateUtils.getAnotherDay("yyyy-MM-dd", nowDate, -31);
|
|
|
+ System.err.println(startDate);
|
|
|
+ }
|
|
|
+
|
|
|
+ @XxlJob("refreshCourierNumber")
|
|
|
+ public void refreshCourierNumber() throws Exception {
|
|
|
+ String nowDate = DateUtils.getNowDate("yyyy-MM-dd");
|
|
|
+ String startDate = DateUtils.getAnotherDay("yyyy-MM-dd", nowDate, -31);
|
|
|
+ List<JSONObject> list = ikuaishouSupplyChainService.getSamplesData(startDate);
|
|
|
+ if (Check.isNull(list)) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ for (JSONObject jsonObject : list) {
|
|
|
+ Long id = jsonObject.getLong("id");
|
|
|
+ String courierNumber = jsonObject.getString("courierNumber");
|
|
|
+ if (Check.isNull(courierNumber)) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ String companyCode = jsonObject.getString("companyCode");
|
|
|
+ if (Check.isNull(companyCode)) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ Map<String, Object> map = new HashMap<>();
|
|
|
+ map.put("id", id);
|
|
|
+ map.put("courierNumber", courierNumber);
|
|
|
+ map.put("companyCode", companyCode);
|
|
|
+ HttpUtils.httpGet("http://ruixuan.api.tjyourong.com.cn/itemCollectSamples/refreshCourierNumber", map, null);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
/**
|
|
|
* 自定义创建监测链接预警
|
|
|
*/
|