|
@@ -83,9 +83,18 @@ public class MQTask implements InitializingBean {
|
|
|
private Object lock = new Object();
|
|
|
private Object lock1 = new Object();
|
|
|
|
|
|
- public void afterPropertiesSet() throws Exception {
|
|
|
+ private static boolean isDebug = false;
|
|
|
+
|
|
|
+ static {
|
|
|
+ String debug = System.getProperty("isDebug");
|
|
|
+ if ("true".equalsIgnoreCase(debug)) {
|
|
|
+ isDebug = true;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public void afterPropertiesSet() throws Exception {}
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
@@ -230,109 +239,6 @@ public class MQTask implements InitializingBean {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
|
|
|
|
|
|
|
|
@@ -372,95 +278,15 @@ public class MQTask implements InitializingBean {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-
|
|
|
- * 查询省市县id
|
|
|
- * @param
|
|
|
- */
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
|
|
|
|
|
|
|
|
|
@Scheduled(cron = "0 0 9 * * ?")
|
|
|
public void postageRemind()throws Exception{
|
|
|
-
|
|
|
+ if (isDebug) {
|
|
|
+ logger.info("debug模式,无法运行正式任务");
|
|
|
+ return;
|
|
|
+ }
|
|
|
Map<Integer,Integer> map = new HashMap<Integer,Integer>();
|
|
|
|
|
|
List<CompanyInfo> companyInfoList = companyInfoService.listCompanyInfo(new CompanyInfo());
|
|
@@ -556,6 +382,10 @@ public class MQTask implements InitializingBean {
|
|
|
@Scheduled(cron = "0 50 8 * * ?")
|
|
|
|
|
|
public void detectTimeoutNotice() throws Exception {
|
|
|
+ if (isDebug) {
|
|
|
+ logger.info("debug模式,无法运行正式任务");
|
|
|
+ return;
|
|
|
+ }
|
|
|
logger.info("---------------- 询维修超时数据并短信通知开始 ---------------");
|
|
|
|
|
|
List<ComplaintDetectInfo> listMaintenanceCut = complaintDetectInfoService.listMaintenanceCutNotice();
|
|
@@ -587,12 +417,12 @@ public class MQTask implements InitializingBean {
|
|
|
logger.info("---------------- 询维修超时数据并短信通知结束 ---------------");
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
@Scheduled(cron = "0 0/30 * * * ?")
|
|
|
public void orderCaseDate(){
|
|
|
+ if (isDebug) {
|
|
|
+ logger.info("debug模式,无法运行正式任务");
|
|
|
+ return;
|
|
|
+ }
|
|
|
logger.info("查询订单揽件时间");
|
|
|
List<SalesOrder> salesOrderList = salesOrderService.orderAfterCaseDate();
|
|
|
if (salesOrderList == null || salesOrderList.isEmpty()) {
|
|
@@ -628,6 +458,10 @@ public class MQTask implements InitializingBean {
|
|
|
|
|
|
@Scheduled(cron = "0 0/10 * * * ?")
|
|
|
public void syncXytOrder(){
|
|
|
+ if (isDebug) {
|
|
|
+ logger.info("debug模式,无法运行正式任务");
|
|
|
+ return;
|
|
|
+ }
|
|
|
logger.info("-----定时拉取小亚通订单-开始----");
|
|
|
Integer num = orderSyncLogService.syncXYTOrder(1,"20",null);
|
|
|
logger.info("-----定时拉取小亚通订单,拉取订单数量:"+ num +"-结束----");
|
|
@@ -639,9 +473,12 @@ public class MQTask implements InitializingBean {
|
|
|
|
|
|
@Scheduled(fixedDelay = 3_600_000, initialDelay = 3_000)
|
|
|
public void syncXytOrderPostNum(){
|
|
|
+ if (isDebug) {
|
|
|
+ logger.info("debug模式,无法运行正式任务");
|
|
|
+ return;
|
|
|
+ }
|
|
|
logger.info("-----定时拉取拉取京东自发订单的发货状态-开始----");
|
|
|
SalesOrder salesOrder = new SalesOrder();
|
|
|
-
|
|
|
salesOrder.setSalesSendType(3);
|
|
|
List<SalesOrder> salesOrderList = salesOrderService.getSalesOrderListConcise(salesOrder);
|
|
|
for (SalesOrder so:salesOrderList) {
|
|
@@ -657,6 +494,10 @@ public class MQTask implements InitializingBean {
|
|
|
*/
|
|
|
@Scheduled(fixedDelay = 3_600_000, initialDelay = 3_000)
|
|
|
public void syncXytOrderByJd(){
|
|
|
+ if (isDebug) {
|
|
|
+ logger.info("debug模式,无法运行正式任务");
|
|
|
+ return;
|
|
|
+ }
|
|
|
logger.info("-----定时拉取拉取京东仓已发货订单-开始----");
|
|
|
Integer flag = orderSyncLogService.syncXYTOrderByJD(1);
|
|
|
logger.info("-----定时拉取拉取京东仓已发货订单-结束----");
|