|
|
@ -30,13 +30,17 @@ import cn.hutool.core.date.DateUtil; |
|
|
|
import com.alibaba.fastjson.JSON; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
import com.google.common.util.concurrent.ThreadFactoryBuilder; |
|
|
|
import com.yxt.anrui.base.api.basevehicle.BaseVehicle; |
|
|
|
import com.yxt.anrui.base.api.basevehicle.BaseVehicleFeign; |
|
|
|
import com.yxt.anrui.base.api.basevehicleout.BaseVehicleOutFeign; |
|
|
|
import com.yxt.anrui.base.common.utils.Rule; |
|
|
|
import com.yxt.anrui.buscenter.api.busdeliveredapply.BusDeliveredApplyFeign; |
|
|
|
import com.yxt.anrui.buscenter.api.bussalesorder.BusSalesOrder; |
|
|
|
import com.yxt.anrui.buscenter.api.bussalesorder.app.order.AppOrderDetailsVo; |
|
|
|
import com.yxt.anrui.buscenter.api.bussalesordervehicle.BusOrderAndVehInfo; |
|
|
|
import com.yxt.anrui.buscenter.api.bussalesordervehicle.BusSalesOrderVehicleFeign; |
|
|
|
import com.yxt.anrui.buscenter.api.common.BusSalesOrderConstantUtils; |
|
|
|
import com.yxt.anrui.crm.api.crmcustomertemp.CrmCustomerTempFeign; |
|
|
|
import com.yxt.anrui.fin.api.finpaymentrecord.FinPaymentrecordSourceLCVo; |
|
|
|
import com.yxt.anrui.fin.api.kingdee.FinKingDeeFeign; |
|
|
@ -86,6 +90,7 @@ import com.yxt.messagecenter.api.message.MessageFlowableQuery; |
|
|
|
import com.yxt.messagecenter.api.messagelist.MessageList; |
|
|
|
import com.yxt.messagecenter.api.messagelist.MessageListFeign; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.apache.tomcat.util.threads.ThreadPoolExecutor; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
@ -93,6 +98,7 @@ import java.math.BigDecimal; |
|
|
|
import java.text.ParseException; |
|
|
|
import java.text.SimpleDateFormat; |
|
|
|
import java.util.*; |
|
|
|
import java.util.concurrent.*; |
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
import static java.util.Comparator.comparing; |
|
|
@ -675,12 +681,33 @@ public class ScmVehRebateWithApplyService extends MybatisBaseService<ScmVehRebat |
|
|
|
UpdateFlowFieldVo ufVo = resultBean.getData(); |
|
|
|
updateFlowFiled(BeanUtil.beanToMap(resultBean.getData())); |
|
|
|
if ("Event_end".equals(resultBean.getData().getTaskDefKey())) { |
|
|
|
/* |
|
|
|
for (String vehRebateSid : vehRebateSids) { |
|
|
|
scmVehRebateService.updateState(vehRebateSid, 2); |
|
|
|
scmVehRebateService.updateWithholdingDateBySid(vehRebateSid, scmVehRebateWithApply.getWithApply()); |
|
|
|
} |
|
|
|
//推送单车返利预提凭证
|
|
|
|
pushVehRebateWithVoucher(bv.getBusinessSid()); |
|
|
|
*/ |
|
|
|
try { |
|
|
|
ThreadFactory namedThreadFactory = new ThreadFactoryBuilder() |
|
|
|
.setNameFormat("demo-pool-%d").build(); |
|
|
|
ExecutorService pool = new ThreadPoolExecutor(1, 10, |
|
|
|
1000, TimeUnit.MILLISECONDS, |
|
|
|
new LinkedBlockingQueue<Runnable>(1024), namedThreadFactory, new ThreadPoolExecutor.AbortPolicy()); |
|
|
|
ScmVehRebateWithApply finalScmVehRebateWithApply = scmVehRebateWithApply; |
|
|
|
Future future1 = pool.submit(() -> { |
|
|
|
for (String vehRebateSid : vehRebateSids) { |
|
|
|
scmVehRebateService.updateState(vehRebateSid, 2); |
|
|
|
scmVehRebateService.updateWithholdingDateBySid(vehRebateSid, finalScmVehRebateWithApply.getWithApply()); |
|
|
|
} |
|
|
|
//推送单车返利预提凭证
|
|
|
|
pushVehRebateWithVoucher(bv.getBusinessSid()); |
|
|
|
|
|
|
|
}); |
|
|
|
} catch (Exception e) { |
|
|
|
e.printStackTrace(); |
|
|
|
} |
|
|
|
} else { |
|
|
|
//极光推送
|
|
|
|
scmVehRebateWithApply = fetchBySid(bv.getBusinessSid()); |
|
|
|