|
@@ -1,5 +1,7 @@
|
|
|
package com.jkcredit.invoice.task;
|
|
|
|
|
|
+import cn.com.taiji.sdk.model.comm.protocol.tts.trade.service.TradeApplyQueryRequest;
|
|
|
+import cn.com.taiji.sdk.model.comm.protocol.tts.trade.service.TradeApplyQueryResponse;
|
|
|
import com.jkcredit.invoice.mapper.binvoce.SelfCarApplMapper;
|
|
|
import com.jkcredit.invoice.mapper.customer.CustomerCarRecMapper;
|
|
|
import com.jkcredit.invoice.mapper.waybill.NoCarWaybillMapper;
|
|
@@ -14,12 +16,15 @@ import com.jkcredit.invoice.service.lowerservice.vo.SelfCarDueQueryVo;
|
|
|
import com.jkcredit.invoice.service.manager.ParamService;
|
|
|
import com.jkcredit.invoice.service.selfcar.SelfCarTradeService;
|
|
|
import com.jkcredit.invoice.service.thead.ThreadPoolFactory;
|
|
|
+import com.jkcredit.invoice.service.upservice.SelfCarInterface;
|
|
|
import com.jkcredit.invoice.util.DateUtil;
|
|
|
+import com.jkcredit.invoice.util.RespR;
|
|
|
import com.mchange.v1.identicator.IdHashSet;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.scheduling.annotation.Scheduled;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
+import org.springframework.util.StringUtils;
|
|
|
|
|
|
import java.net.InetAddress;
|
|
|
import java.text.DateFormat;
|
|
@@ -149,12 +154,13 @@ public class ScheduledBillTask {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+ @Autowired
|
|
|
+ SelfCarInterface selfCarInterface;
|
|
|
/**
|
|
|
* @Scheduled(cron = "0 0 23 * * ?", zone = "Asia/Shanghai")
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
- @Scheduled(cron = "0 55 23 * * ?", zone = "Asia/Shanghai")
|
|
|
+ @Scheduled(cron = "0 58 23 * * ?", zone = "Asia/Shanghai")
|
|
|
public void getSefCarInvoice() throws Exception {
|
|
|
InetAddress addr = InetAddress.getLocalHost();
|
|
|
String ip = paramService.getParamsByParamName("CURR_SELF_IP").getParamValue();
|
|
@@ -183,6 +189,18 @@ public class ScheduledBillTask {
|
|
|
applQueryInvVo.setCompanyName(selfCarTrade.getCompanyName());
|
|
|
applQueryInvVo.setCustomerName(selfCarTrade.getCustomId());
|
|
|
applQueryInvVo.setCompanyReferencenum(selfCarTrade.getCompanyReferencenum());
|
|
|
+ if(StringUtils.isEmpty(selfCarTrade.getApplId())){
|
|
|
+ //1.获取到交易id
|
|
|
+ TradeApplyQueryRequest tradeApplyQueryRequest = new TradeApplyQueryRequest();
|
|
|
+ tradeApplyQueryRequest.setCompanyNum(selfCarTrade.getCompanyNum());
|
|
|
+ tradeApplyQueryRequest.setCardId(selfCarTrade.getCardId());
|
|
|
+ tradeApplyQueryRequest.setTradeId(selfCarTrade.getTradeId());
|
|
|
+ RespR<TradeApplyQueryResponse> respR = selfCarInterface.queryApplyQueryByTradeId(tradeApplyQueryRequest);
|
|
|
+ if(respR.getCode()!=1){
|
|
|
+ selfCarTrade.setApplId(respR.getData().getApplyId());
|
|
|
+ selfCarTrade.setAclTime(DateUtil.getCurrentDateStr());
|
|
|
+ }
|
|
|
+ }
|
|
|
applQueryInvVo.setApplId(selfCarTrade.getApplId());
|
|
|
map.put(selfCarTrade.getApplId(),applQueryInvVo);
|
|
|
});
|
|
@@ -199,4 +217,4 @@ public class ScheduledBillTask {
|
|
|
selfCarTradeService.updateTradesDb(lst);
|
|
|
log.info("getSefCarInvoice处理完成");
|
|
|
}
|
|
|
-}
|
|
|
+}
|