丽知:成套件插件修改
This commit is contained in:
parent
87e1c530fd
commit
26e7023674
|
@ -1,5 +1,7 @@
|
||||||
package com.hzya.frame.plugin.lets.plugin.base;
|
package com.hzya.frame.plugin.lets.plugin.base;
|
||||||
|
|
||||||
|
import cn.hutool.core.date.DateField;
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
import cn.hutool.core.lang.Assert;
|
import cn.hutool.core.lang.Assert;
|
||||||
import cn.hutool.json.JSONUtil;
|
import cn.hutool.json.JSONUtil;
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
|
@ -133,6 +135,26 @@ public class KitPluginInitializer extends PluginBaseEntity {
|
||||||
|
|
||||||
public void start() {
|
public void start() {
|
||||||
try {
|
try {
|
||||||
|
//获取当前时间
|
||||||
|
Date currentDate = new Date();
|
||||||
|
Date startTime = DateUtil.offset(currentDate, DateField.MINUTE, -10);
|
||||||
|
Date endTime = DateUtil.offset(currentDate, DateField.MINUTE, -2);
|
||||||
|
String startTimeStr = DateUtil.format(startTime, "yyyy-MM-dd HH:mm:ss");
|
||||||
|
String endTimeStr = DateUtil.format(endTime, "yyyy-MM-dd HH:mm:ss");
|
||||||
|
QueryOfsKitRequestVO queryOfsKitRequestVO = new QueryOfsKitRequestVO();
|
||||||
|
queryOfsKitRequestVO.setLastUpdated_start(startTimeStr);
|
||||||
|
queryOfsKitRequestVO.setLastUpdated_end(endTimeStr);
|
||||||
|
List<OfsKitOrderSearchResponse.OfsKit> ofsKits = queryOfsKits(queryOfsKitRequestVO);
|
||||||
|
if (ofsKits.size() == 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
//过滤
|
||||||
|
List<OfsKitOrderSearchResponse.OfsKit> filterKits = filterData(ofsKits);
|
||||||
|
if(filterKits.size()==0){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
//实现
|
||||||
|
implement(filterKits);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error("丽知:OFS实物组套--->U8C成套件档案,start()方法报错:", e);
|
logger.error("丽知:OFS实物组套--->U8C成套件档案,start()方法报错:", e);
|
||||||
}
|
}
|
||||||
|
@ -158,8 +180,26 @@ public class KitPluginInitializer extends PluginBaseEntity {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void start(String startTime, String endTim) {
|
public void start(String startTime, String endTime) {
|
||||||
try {
|
try {
|
||||||
|
Date business_start = DateUtil.parse(startTime);
|
||||||
|
Date business_end = DateUtil.parse(endTime);
|
||||||
|
String start = DateUtil.format(business_start, "yyyy-MM-dd") + " 00:00:00";
|
||||||
|
String end = DateUtil.format(business_end, "yyyy-MM-dd") + " 23:59:59";
|
||||||
|
QueryOfsKitRequestVO queryOfsKitRequestVO = new QueryOfsKitRequestVO();
|
||||||
|
queryOfsKitRequestVO.setLastUpdated_start(start);
|
||||||
|
queryOfsKitRequestVO.setLastUpdated_end(end);
|
||||||
|
List<OfsKitOrderSearchResponse.OfsKit> ofsKits = queryOfsKits(queryOfsKitRequestVO);
|
||||||
|
if(ofsKits.size()==0){
|
||||||
|
Assert.state(false, "丽知:OFS实物组套--->U8C成套件档案根据日期期间[开始时间]-[结束时间]:{}-{},未查询到OFS实物组套", startTime, endTime);
|
||||||
|
}
|
||||||
|
//过滤
|
||||||
|
List<OfsKitOrderSearchResponse.OfsKit> filterKits = filterData(ofsKits);
|
||||||
|
if(filterKits.size()==0){
|
||||||
|
Assert.state(false, "丽知:OFS实物组套--->U8C成套件档案根据日期期间[开始时间]-[结束时间]:{}-{},该期间OFS实物组套已被推送成功,请勿重新推送", startTime, endTime);
|
||||||
|
}
|
||||||
|
//实现
|
||||||
|
implement(filterKits);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error("丽知:OFS实物组套--->U8C成套件档案,start(String startTime, String endTim)方法报错:", e);
|
logger.error("丽知:OFS实物组套--->U8C成套件档案,start(String startTime, String endTim)方法报错:", e);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue