|
@@ -29,10 +29,8 @@ import com.fs.company.vo.RedPacketMoneyVO;
|
|
import com.fs.core.config.WxMaConfiguration;
|
|
import com.fs.core.config.WxMaConfiguration;
|
|
import com.fs.course.mapper.FsCourseRedPacketLogMapper;
|
|
import com.fs.course.mapper.FsCourseRedPacketLogMapper;
|
|
import com.fs.course.service.IFsCourseWatchLogService;
|
|
import com.fs.course.service.IFsCourseWatchLogService;
|
|
-import com.fs.course.service.IMarketPushService;
|
|
|
|
import com.fs.crm.param.SmsSendParam;
|
|
import com.fs.crm.param.SmsSendParam;
|
|
import com.fs.erp.domain.ErpDeliverys;
|
|
import com.fs.erp.domain.ErpDeliverys;
|
|
-import com.fs.erp.domain.ErpOrder;
|
|
|
|
import com.fs.erp.domain.ErpOrderQuery;
|
|
import com.fs.erp.domain.ErpOrderQuery;
|
|
import com.fs.erp.dto.*;
|
|
import com.fs.erp.dto.*;
|
|
import com.fs.erp.service.IErpOrderService;
|
|
import com.fs.erp.service.IErpOrderService;
|
|
@@ -68,7 +66,6 @@ import com.fs.qw.mapper.QwAppContactWayMapper;
|
|
import com.fs.qw.mapper.QwExternalContactTransferLogMapper;
|
|
import com.fs.qw.mapper.QwExternalContactTransferLogMapper;
|
|
import com.fs.qw.service.IQwAppContactWayService;
|
|
import com.fs.qw.service.IQwAppContactWayService;
|
|
import com.fs.qw.service.IQwExternalContactTransferLogService;
|
|
import com.fs.qw.service.IQwExternalContactTransferLogService;
|
|
-import com.fs.qw.service.IQwWorkTaskService;
|
|
|
|
import com.fs.qw.service.impl.QwAppContactWayServiceImpl;
|
|
import com.fs.qw.service.impl.QwAppContactWayServiceImpl;
|
|
import com.fs.qwApi.Result.QwSendMsgResult;
|
|
import com.fs.qwApi.Result.QwSendMsgResult;
|
|
import com.fs.qwApi.param.QwSendMsgParam;
|
|
import com.fs.qwApi.param.QwSendMsgParam;
|
|
@@ -123,8 +120,6 @@ import java.time.LocalDate;
|
|
import java.time.LocalDateTime;
|
|
import java.time.LocalDateTime;
|
|
import java.time.format.DateTimeFormatter;
|
|
import java.time.format.DateTimeFormatter;
|
|
import java.util.*;
|
|
import java.util.*;
|
|
-import java.util.concurrent.ExecutorService;
|
|
|
|
-import java.util.concurrent.Executors;
|
|
|
|
import java.util.logging.Logger;
|
|
import java.util.logging.Logger;
|
|
import java.util.regex.Pattern;
|
|
import java.util.regex.Pattern;
|
|
|
|
|
|
@@ -215,39 +210,18 @@ public class Task {
|
|
@Autowired
|
|
@Autowired
|
|
private IFsCourseWatchLogService fsCourseWatchLogService;
|
|
private IFsCourseWatchLogService fsCourseWatchLogService;
|
|
|
|
|
|
- @Autowired
|
|
|
|
- private IQwWorkTaskService qwWorkTaskService;
|
|
|
|
-
|
|
|
|
- @Autowired
|
|
|
|
- private IMarketPushService marketPushService;
|
|
|
|
-
|
|
|
|
public void tt() throws Exception
|
|
public void tt() throws Exception
|
|
{
|
|
{
|
|
- fsCourseWatchLogService.saveClickHouseAndDel();
|
|
|
|
- }
|
|
|
|
|
|
|
|
- public void qwWorkTask1() throws Exception
|
|
|
|
- {
|
|
|
|
- qwWorkTaskService.addQwWorkByCourse4();
|
|
|
|
- qwWorkTaskService.addQwWorkByCourseLastTime();
|
|
|
|
- }
|
|
|
|
- public void qwWorkTask2() throws Exception
|
|
|
|
- {
|
|
|
|
- qwWorkTaskService.addQwWorkByCourse();
|
|
|
|
- qwWorkTaskService.addQwWorkByFirstCourse();
|
|
|
|
- }
|
|
|
|
- public void qwWorkTask3() throws Exception
|
|
|
|
- {
|
|
|
|
- qwWorkTaskService.addQwWorkByConversionDay();
|
|
|
|
- }
|
|
|
|
- public void qwWorkTask4() throws Exception
|
|
|
|
- {
|
|
|
|
- qwWorkTaskService.delQwWorkTaskByOver();
|
|
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+
|
|
public void addPrescribeImg() throws Exception
|
|
public void addPrescribeImg() throws Exception
|
|
{
|
|
{
|
|
List<Long> ids= fsPrescribeService.selectFsPrescribeByPrescribeIdByOrderType();
|
|
List<Long> ids= fsPrescribeService.selectFsPrescribeByPrescribeIdByOrderType();
|
|
for (Long id : ids) {
|
|
for (Long id : ids) {
|
|
|
|
+ System.out.println(id);
|
|
fsPrescribeService.PrescribeStoreImg(id);
|
|
fsPrescribeService.PrescribeStoreImg(id);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -326,35 +300,31 @@ public class Task {
|
|
public void deliveryOp()
|
|
public void deliveryOp()
|
|
{
|
|
{
|
|
List<FsStoreOrder> orders = fsStoreOrderMapper.selectOmsOrderdeliveryOp();
|
|
List<FsStoreOrder> orders = fsStoreOrderMapper.selectOmsOrderdeliveryOp();
|
|
- ExecutorService executorService = Executors.newFixedThreadPool(50);
|
|
|
|
for(FsStoreOrder order:orders){
|
|
for(FsStoreOrder order:orders){
|
|
- executorService.submit(() -> ErpOrderDelivery(order.getExtendOrderId(),order.getOrderCode()));
|
|
|
|
- }
|
|
|
|
- executorService.shutdown(); // 关闭线程池,等待所有任务完成
|
|
|
|
- }
|
|
|
|
|
|
|
|
- private void ErpOrderDelivery(String extendOrderId, String orderCode) {
|
|
|
|
- ErpOrderQueryRequert request=new ErpOrderQueryRequert();
|
|
|
|
- request.setCode(extendOrderId);
|
|
|
|
- ErpOrderQueryResponse response=erpOrderService.getOrder(request);
|
|
|
|
- if(response.getOrders()!=null&& !response.getOrders().isEmpty()){
|
|
|
|
- for(ErpOrderQuery orderQuery : response.getOrders()){
|
|
|
|
- if(orderQuery.getDeliverys()!=null&& !orderQuery.getDeliverys().isEmpty()){
|
|
|
|
- for(ErpDeliverys delivery:orderQuery.getDeliverys()){
|
|
|
|
- if(delivery.getDelivery()&& StringUtils.isNotEmpty(delivery.getMail_no())){
|
|
|
|
- //更新商订单状态 删除REDIS
|
|
|
|
- fsStoreOrderService.deliveryOrder(orderCode,delivery.getMail_no(),delivery.getExpress_code(),delivery.getExpress_name());
|
|
|
|
- redisCache.deleteObject("delivery"+":"+extendOrderId);
|
|
|
|
|
|
+ ErpOrderQueryRequert request=new ErpOrderQueryRequert();
|
|
|
|
+
|
|
|
|
+ request.setCode(order.getExtendOrderId());
|
|
|
|
+ ErpOrderQueryResponse response=erpOrderService.getOrder(request);
|
|
|
|
+ if(response.getOrders()!=null&&response.getOrders().size()>0){
|
|
|
|
+ for(ErpOrderQuery orderQuery : response.getOrders()){
|
|
|
|
+ if(orderQuery.getDeliverys()!=null&&orderQuery.getDeliverys().size()>0){
|
|
|
|
+ for(ErpDeliverys delivery:orderQuery.getDeliverys()){
|
|
|
|
+ if(delivery.getDelivery()&& StringUtils.isNotEmpty(delivery.getMail_no())){
|
|
|
|
+ //更新商订单状态 删除REDIS
|
|
|
|
+ fsStoreOrderService.deliveryOrder(order.getOrderCode(),delivery.getMail_no(),delivery.getExpress_code(),delivery.getExpress_name());
|
|
|
|
+ redisCache.deleteObject("delivery"+":"+order.getExtendOrderId());
|
|
|
|
+ }
|
|
}
|
|
}
|
|
- }
|
|
|
|
|
|
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+ }
|
|
|
|
|
|
public void CreateOmsAndHis()
|
|
public void CreateOmsAndHis()
|
|
{
|
|
{
|