|
@@ -1,16 +1,23 @@
|
|
|
package com.jkcredit.invoice.task;
|
|
|
|
|
|
import com.jkcredit.invoice.mapper.Binvoce.SelfCarApplMapper;
|
|
|
+import com.jkcredit.invoice.mapper.customer.CustomerCarRecMapper;
|
|
|
import com.jkcredit.invoice.mapper.waybill.NoCarWaybillMapper;
|
|
|
+import com.jkcredit.invoice.model.entity.customer.CustomerCarRec;
|
|
|
import com.jkcredit.invoice.model.entity.invoice.SelfCarAppl;
|
|
|
import com.jkcredit.invoice.model.entity.waybill.NoCarWayBill;
|
|
|
import com.jkcredit.invoice.service.lowerService.NoCarService;
|
|
|
import com.jkcredit.invoice.service.lowerService.SelfCarServiceL;
|
|
|
+import com.jkcredit.invoice.service.lowerService.vo.SelfCarDueQueryVo;
|
|
|
+import com.jkcredit.invoice.util.DateUtil;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.scheduling.annotation.Scheduled;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
+import java.text.DateFormat;
|
|
|
+import java.text.SimpleDateFormat;
|
|
|
+import java.util.Date;
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
@@ -33,6 +40,9 @@ public class ScheduledBillTask {
|
|
|
|
|
|
@Autowired
|
|
|
SelfCarServiceL selfCarService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ CustomerCarRecMapper customerCarRecMapper;
|
|
|
|
|
|
* 实时运单开票(每天23点开始)
|
|
|
*/
|
|
@@ -69,13 +79,37 @@ public class ScheduledBillTask {
|
|
|
|
|
|
@Scheduled(cron = "0 0 23 * * ?", zone = "Asia/Shanghai")
|
|
|
public void getSefCarInvoice() {
|
|
|
- try {
|
|
|
+
|
|
|
+ * 1.查询所有的etc卡
|
|
|
+ * 2.按照etc卡号取最近两天的发票
|
|
|
+ */
|
|
|
+ List<CustomerCarRec> lst = customerCarRecMapper.selectAllBindEtc();
|
|
|
+
|
|
|
+ lst.stream().forEach(customerCarRec -> {
|
|
|
+ try {
|
|
|
+ SelfCarDueQueryVo selfCarDueQueryVo = new SelfCarDueQueryVo();
|
|
|
+ selfCarDueQueryVo.setCompanyName(customerCarRec.getCompanyName());
|
|
|
+ selfCarDueQueryVo.setCardId(customerCarRec.getEtcNum());
|
|
|
+ selfCarDueQueryVo.setCustomername(customerCarRec.getCustomerName());
|
|
|
+ DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
+ String curr = dateFormat.format(new Date());
|
|
|
+ String befor = DateUtil.getDateAfterDays(curr,-1);
|
|
|
+ String after = DateUtil.getDateAfterDays(curr,+1);
|
|
|
+ selfCarDueQueryVo.setStartTime(befor+" 00:00:00");
|
|
|
+ selfCarDueQueryVo.setEndTime(after+"00:00:00");
|
|
|
+ selfCarService.getSelfCarInvoicesByTime(selfCarDueQueryVo);
|
|
|
+ }catch (Exception e){
|
|
|
+ e.printStackTrace();
|
|
|
+ log.info(customerCarRec.getEtcNum());
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
List<SelfCarAppl> selfCarAppls = selfCarApplMapper.selectAllNoRec();
|
|
|
selfCarAppls.forEach(selfCarAppl -> {
|
|
|
selfCarService.getSelfCarInvoicesByApplyIds(selfCarAppl);
|
|
|
});
|
|
|
}catch (Exception e){
|
|
|
e.printStackTrace();
|
|
|
- }
|
|
|
+ }*/
|
|
|
}
|
|
|
}
|