Przeglądaj źródła

无车优化,自有车接口返回

Administrator 2 lat temu
rodzic
commit
024122dbf2
18 zmienionych plików z 193 dodań i 96 usunięć
  1. 9 2
      src/main/java/com/jkcredit/invoice/controller/business/CustomerController.java
  2. 22 0
      src/main/java/com/jkcredit/invoice/controller/business/SelfCarController.java
  3. 7 3
      src/main/java/com/jkcredit/invoice/controller/interserver/SelfCarServiceController.java
  4. 11 0
      src/main/java/com/jkcredit/invoice/credit/InterfaceCheckServer.java
  5. 2 1
      src/main/java/com/jkcredit/invoice/credit/SimpleCORSFilter.java
  6. 2 0
      src/main/java/com/jkcredit/invoice/credit/interserver/SelfCarInterService.java
  7. 63 0
      src/main/java/com/jkcredit/invoice/credit/interserver/SelfCarInterServiceImpl.java
  8. 2 1
      src/main/java/com/jkcredit/invoice/mapper/customer/CustomerChangeInfoMapper.java
  9. 5 0
      src/main/java/com/jkcredit/invoice/service/customer/CustomerChangeInfoService.java
  10. 8 0
      src/main/java/com/jkcredit/invoice/service/customer/impl/CustomerChangeInfoServiceImpl.java
  11. 4 5
      src/main/java/com/jkcredit/invoice/service/lowerservice/SelfCarServiceL.java
  12. 4 79
      src/main/java/com/jkcredit/invoice/service/lowerservice/impl/SelfCarServiceLImpl.java
  13. 11 0
      src/main/java/com/jkcredit/invoice/service/lowerservice/vo/ApplQueryInvVo.java
  14. 12 0
      src/main/java/com/jkcredit/invoice/service/selfcar/SelfCarApplyService.java
  15. 20 0
      src/main/java/com/jkcredit/invoice/service/selfcar/impl/SelfCarApplyServiceImpl.java
  16. 1 1
      src/main/resources/logback-spring.xml
  17. 9 3
      src/main/resources/mapper/customer/CustomerChangeInfoMapper.xml
  18. 1 1
      src/main/resources/mapper/invoice/SelfCarApplMapper.xml

+ 9 - 2
src/main/java/com/jkcredit/invoice/controller/business/CustomerController.java

@@ -443,11 +443,18 @@ public class CustomerController {
      * @param customerEtcChangeInfo
      * @return
      */
-    @PostMapping("/customerEtcChangeInfo")
-    @ApiOperation(value="用户换卡信息查询", notes="用户换卡信息查询")
+    @PostMapping("/customerChangeList")
+    @ApiOperation(value="用户换卡信息列表查询", notes="用户换卡信息列表查询")
     @LoginRequired
     public RespR customeChangeInfoListByPage(Page page, CustomerEtcChangeInfo customerEtcChangeInfo){
         IPage ipage = customerChangeInfoService.findAllCustomerChangeInfo(page, customerEtcChangeInfo);
         return new RespR(ipage);
     }
+    @PostMapping("/customerChangeInfo")
+    @ApiOperation(value="用户换卡信息查询", notes="用户换卡信息查询")
+    @LoginRequired
+    public RespR customerChangeInfo(String applyId){
+        List<Map<String,String>> cards = customerChangeInfoService.selectChangeCards(applyId);
+        return new RespR(cards);
+    }
 }

+ 22 - 0
src/main/java/com/jkcredit/invoice/controller/business/SelfCarController.java

@@ -12,6 +12,7 @@ import com.jkcredit.invoice.mapper.waybill.SellCarTradeMapper;
 import com.jkcredit.invoice.model.entity.calculate.SelfCarCalculateInfor;
 import com.jkcredit.invoice.model.entity.customer.CustomerCarRec;
 import com.jkcredit.invoice.model.entity.customer.CustomerRec;
+import com.jkcredit.invoice.model.entity.invoice.SelfCarAppl;
 import com.jkcredit.invoice.model.entity.invoice.SelfCarInvoice;
 import com.jkcredit.invoice.model.entity.waybill.SelfCarTrade;
 import com.jkcredit.invoice.model.vo.CardAndTradeVo;
@@ -20,6 +21,7 @@ import com.jkcredit.invoice.service.calculateinfor.SelfCarCalculateInfoService;
 import com.jkcredit.invoice.service.customer.CustomerService;
 import com.jkcredit.invoice.service.lowerservice.SelfCarServiceL;
 import com.jkcredit.invoice.service.lowerservice.vo.*;
+import com.jkcredit.invoice.service.selfcar.SelfCarApplyService;
 import com.jkcredit.invoice.service.selfcar.SelfCarInvoiceService;
 import com.jkcredit.invoice.service.selfcar.SelfCarService;
 import com.jkcredit.invoice.service.selfcar.SelfCarTradeService;
@@ -300,6 +302,26 @@ public class SelfCarController {
             return new RespR(false,e.getMessage());
         }
     }
+    @Autowired
+    SelfCarApplyService selfCarApplyService;
+    /**
+     * 分页查询自有车申请信息
+     *
+     * @param page    参数集
+     * @return 用户集合
+     */
+    @PostMapping("/findSelfcarAppls")
+    @ApiOperation(value="分页查询自有车申请信息", notes="分页查询自有车申请信息")
+    @LoginRequired
+    public RespR findSelfcarAppls(Page page, SelfCarAppl selfCarAppl) {
+        try {
+            RespR respR = new RespR(selfCarApplyService.findByPageAndInvoice(page,selfCarAppl));
+            return respR;
+        }catch (Exception e){
+            e.printStackTrace();
+            return new RespR(false,e.getMessage());
+        }
+    }
     /**
      * 分页查询自有车计费信息
      *

+ 7 - 3
src/main/java/com/jkcredit/invoice/controller/interserver/SelfCarServiceController.java

@@ -7,6 +7,7 @@ import com.jkcredit.invoice.service.lowerservice.vo.*;
 import com.jkcredit.invoice.util.RespR;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
@@ -83,13 +84,16 @@ public class SelfCarServiceController {
         return selfCarService.getInvoicePackge(invoicePackageVo);
     }
     /**
-     * @param ApplQueryInvVo
+     * @param applQueryInvVo
      * @return
      */
     @PostMapping("/getSelfCarInvoicesByAppl")
     @ApiOperation(value="按申请id查询发票", notes="按申请id查询发票")
-    public RespR getSelfCarInvoicesByAppl(@RequestBody ApplQueryInvVo ApplQueryInvVo){
-        return selfCarService.getSelfCarInvoicesByApplyIds(ApplQueryInvVo);
+    public RespR getSelfCarInvoicesByAppl(ApplQueryInvVo applQueryInvVo){
+        if(StringUtils.isEmpty(applQueryInvVo.getApplId()) || StringUtils.isEmpty(applQueryInvVo.getCompanyNum()) || StringUtils.isEmpty(applQueryInvVo.getEtcNum())){
+            return new RespR(false,"参数不能为空");
+        }
+        return selfCarService.getSelfCarInvoicesByApplyIds(applQueryInvVo);
     }
     /**
      * @param etcQueryVo

+ 11 - 0
src/main/java/com/jkcredit/invoice/credit/InterfaceCheckServer.java

@@ -154,6 +154,17 @@ public class InterfaceCheckServer {
                     statisRequestIdTimeComp.removeReQuestIdAndTime(requestid);
                 }
                 break;
+
+            case "B2B_INVOICE_APPL_QUERY_V1"://自有车 已开发票查询接口 根据开票id进行查询。
+                if(StatisRequestIdTimeComp.isLimit){
+                    log.info("InterfaceCheckServer.doJumpHandler,appKey=" + appKey + " ,api="+api + " ,data=" + data + " ,requestid=" + requestid +"=被拒绝");
+                    result = resultTimeOut;
+                }else{
+                    statisRequestIdTimeComp.putReQuestIdAndTime(requestid);
+                    result = selfCarInterService.getSelfCarInvoicesByTime(appKey,api,data,requestid);
+                    statisRequestIdTimeComp.removeReQuestIdAndTime(requestid);
+                }
+                break;
             case "B2B_INVOICE_PACKAGE_V1"://自有车 发票下载 渠道通过此接口可以下载某公司某个月份开具的发票。
                 if(StatisRequestIdTimeComp.isLimit){
                     log.info("InterfaceCheckServer.doJumpHandler,appKey=" + appKey + " ,api="+api + " ,data=" + data + " ,requestid=" + requestid +"=被拒绝");

+ 2 - 1
src/main/java/com/jkcredit/invoice/credit/SimpleCORSFilter.java

@@ -118,7 +118,8 @@ public class SimpleCORSFilter implements Filter {
             "/customer/findCustomerRecTimeList",
             "/customer/findCustomerMoney",
             "/customer/customeRecQueryListByPage",
-            "/customer/customeChangeInfoListByPage",
+            "/customer/customerChangeList",
+            "/customer/customerChangeInfo",
             "/customer/customeRecQueryUpper",
             "/customer/contractStatusFail",
             "/customer/contractStatusProcess",

+ 2 - 0
src/main/java/com/jkcredit/invoice/credit/interserver/SelfCarInterService.java

@@ -26,6 +26,8 @@ public interface SelfCarInterService {
     //自有车 已开发票查询接口 渠道通过此接口可以根据该公司绑定的单张卡查询此卡在某个月开具的发票。
     DataResult getSelfCarInvoicesByTime(String appKey, String api, String data, String requestid);
 
+    //自有车 已开发票查询接口 渠道通过此接口可以根据该公司的申请信息查询开票信息
+    DataResult getSelfCarInvoicesByAppl(String appKey, String api, String data, String requestid);
     //自有车 发票下载 渠道通过此接口可以下载某公司某个月份开具的发票。
     DataResult getSelfCarInvoicePackage(String appKey, String api, String data, String requestid);
 

+ 63 - 0
src/main/java/com/jkcredit/invoice/credit/interserver/SelfCarInterServiceImpl.java

@@ -578,7 +578,70 @@ public class SelfCarInterServiceImpl implements SelfCarInterService {
     }
 
 
+    @Override
+    public DataResult getSelfCarInvoicesByAppl(String appKey, String api, String data, String requestid) {
+        long costtimestart = System.currentTimeMillis();
+
+        DataResult result = new DataResult();
+
+        result.setData(3);
+        result.setCode(200);
+        result.setRequestid(requestid);
+        result.setMsg("无法认证");
+
+        try {
+            log.info("[-SelfCarInterServiceImpl.getSelfCarInvoicesByAppl-] request appKey=" + appKey + " ,api=" + api + " ,data=" +data+ " ,requestid=" +requestid);
+            JSONObject jsonObject = JSONObject.parseObject(data);
+            String companyNum =  jsonObject.getString("companyNum");//企业编号 必输
+            String cardId =  jsonObject.getString("cardId");//卡号 必输
+            String applyId =  jsonObject.getString("applyId");//申请id 必输
+            if(StringUtils.isEmpty(data)|| null == jsonObject || StringUtils.isEmpty(companyNum)
+                    || StringUtils.isEmpty(cardId)
+                    || StringUtils.isEmpty(applyId)
+                    ){
+                result.setCode(200);
+                result.setMsg("必传参数有为空情况,请核实后再试");
+                return  result;
+            }
 
+            CustomerRec customerRec = new CustomerRec();
+            customerRec.setCustomerName(appKey);
+            customerRec.setCompanyNum(companyNum);
+            CustomerRec customerRec1 = customerRecMapper.selectByCustomerNameAndCompanyNum(customerRec);
+            if (null == customerRec1){
+                result.setCode(200);
+                result.setMsg("该企业编号在平台中不存在,请联系管理员核实!");
+                return result;
+            }
+            ApplQueryInvVo applQueryInvVo  = new ApplQueryInvVo();
+            applQueryInvVo.setApplId(applyId);
+            applQueryInvVo.setEtcNum(cardId);
+            applQueryInvVo.setCompanyNum(companyNum);
+            RespR rs = selfCarService.getSelfCarInvoicesByApplyIds(applQueryInvVo);
+            long costtimeend = System.currentTimeMillis();
+            log.info("[-SelfCarInterServiceImpl.getSelfCarInvoicesByAppl-] result is "
+                    + rs.toString() + ", request is " + data + " ,costtime="
+                    + (costtimeend - costtimestart));
+            if(null != rs && rs.getCode() == 0){
+                result.setData(1);
+                result.setCode(200);
+                result.setMsg(rs.getMsg());
+                return result;
+            } else {
+                result.setData(3);
+                if("未查得".equals(rs.getMsg())){
+                    result.setData(2);
+                }
+                result.setCode(200);
+                result.setMsg(rs.getMsg());
+                return result;
+            }
+        } catch (Exception e) {
+            log.error("[-SelfCarInterServiceImpl.getSelfCarInvoicesByAppl-] get httpclient exception is "
+                    + e + ", request is " + data);
+        }
+        return result;
+    }
 
     /**
      * 自有车 已开发票查询接口 渠道通过此接口可以根据该公司绑定的单张卡查询此卡在某个月开具的发票

+ 2 - 1
src/main/java/com/jkcredit/invoice/mapper/customer/CustomerChangeInfoMapper.java

@@ -7,12 +7,13 @@ import org.apache.ibatis.annotations.Param;
 import org.springframework.stereotype.Repository;
 
 import java.util.List;
+import java.util.Map;
 
 @Repository
 public interface CustomerChangeInfoMapper extends BaseMapper<CustomerEtcChangeInfo> {
     void insertCardChangeInfo(CustomerEtcChangeInfo custometEtcChangeInfo);
 
     void insertChangeCard(@Param("applyId") String applyId, @Param("cardId") String cardId);
-
+    List<Map<String,String>> selectChangeCards(String applyId);
     IPage<List<CustomerEtcChangeInfo>> selectAllByPage(Page page, @Param("custometEtcChangeInfo") CustomerEtcChangeInfo custometEtcChangeInfo);
 }

+ 5 - 0
src/main/java/com/jkcredit/invoice/service/customer/CustomerChangeInfoService.java

@@ -4,7 +4,12 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.jkcredit.invoice.model.entity.customer.CustomerEtcChangeInfo;
 
+import java.util.List;
+import java.util.Map;
+
 public interface CustomerChangeInfoService {
 
     IPage findAllCustomerChangeInfo(Page page, CustomerEtcChangeInfo custometEtcChangeInfo);
+
+    List<Map<String,String>> selectChangeCards(String applyId);
 }

+ 8 - 0
src/main/java/com/jkcredit/invoice/service/customer/impl/CustomerChangeInfoServiceImpl.java

@@ -9,6 +9,9 @@ import com.jkcredit.invoice.service.customer.CustomerChangeInfoService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.util.List;
+import java.util.Map;
+
 @Service("customerChangeInfoService")
 public class CustomerChangeInfoServiceImpl extends ServiceImpl<CustomerChangeInfoMapper,CustomerEtcChangeInfo> implements CustomerChangeInfoService{
 
@@ -18,4 +21,9 @@ public class CustomerChangeInfoServiceImpl extends ServiceImpl<CustomerChangeInf
     public IPage findAllCustomerChangeInfo(Page page, CustomerEtcChangeInfo custometEtcChangeInfo) {
         return customerChangeInfoMapper.selectAllByPage(page,custometEtcChangeInfo);
     }
+
+    @Override
+    public List<Map<String,String>> selectChangeCards(String applyId) {
+        return customerChangeInfoMapper.selectChangeCards(applyId);
+    }
 }

+ 4 - 5
src/main/java/com/jkcredit/invoice/service/lowerservice/SelfCarServiceL.java

@@ -1,6 +1,8 @@
 package com.jkcredit.invoice.service.lowerservice;
 
 import cn.com.taiji.sdk.model.comm.protocol.tts.invoice.server.B2BInvoiceListModel;
+import cn.com.taiji.sdk.model.comm.protocol.tts.invoice.server.B2BInvoiceQueryByApplyModel;
+import cn.com.taiji.sdk.model.comm.protocol.tts.invoice.server.B2BInvoiceQueryByApplyResponse;
 import cn.com.taiji.sdk.model.comm.protocol.tts.invoice.server.B2bInvoicePackageModel;
 import cn.com.taiji.sdk.model.comm.protocol.tts.trade.service.CardTradeModel;
 import com.jkcredit.invoice.credit.dto.CardChangeDto;
@@ -36,12 +38,9 @@ public interface SelfCarServiceL {
     /**
      *按申请id取发票
      */
-    RespR<List<SelfCarInvoice>> getSelfCarInvoicesByApplyIds(ApplQueryInvVo applQueryInvVo);
+    RespR<List<B2BInvoiceQueryByApplyModel>> getSelfCarInvoicesByApplyIds(ApplQueryInvVo applQueryInvVo);
+
 
-    /**
-     *按申请id取发票
-     */
-    void getSelfCarInvoicesByApplyIds(SelfCarAppl applQueryInvVo);
 
     /**
      *已开发票查询接口

+ 4 - 79
src/main/java/com/jkcredit/invoice/service/lowerservice/impl/SelfCarServiceLImpl.java

@@ -227,96 +227,21 @@ public class SelfCarServiceLImpl implements SelfCarServiceL {
     }
 
     @Override
-    public RespR<List<SelfCarInvoice>> getSelfCarInvoicesByApplyIds(ApplQueryInvVo applQueryInvVo) {
+    public RespR<List<B2BInvoiceQueryByApplyModel>> getSelfCarInvoicesByApplyIds(ApplQueryInvVo applQueryInvVo) {
         log.info("申请开票开始SelfCarServiceLImpl.getSelfCarInvoicesByApplyIds{}",applQueryInvVo);
-        if(!customerService.checkMoneyEnough(applQueryInvVo.getCustomerName())){
-            return new RespR(false,"余额不足");
-        }
         B2BInvoiceQueryByApplyRequest b2BInvoiceQueryRequest = new B2BInvoiceQueryByApplyRequest();
-        Customer customer = customerMapper.selectByCustomerName(applQueryInvVo.getCustomerName());
-        if(customer == null || customer.getAccstatus().intValue() == 1){
-            return new RespR(false,"客户已经停用");
-        }
-        CustomerRec customerRec = new CustomerRec();
-        customerRec.setCustomerName(applQueryInvVo.getCustomerName());
-        customerRec.setCompanyName(applQueryInvVo.getCompanyName());
-        customerRec = customerRecMapper.selectByCustomerNameAndCompany(customerRec);
-        if(customerRec == null || customerRec.getRecStatus().intValue() !=1 ){
-            return new RespR(false,"客户未备案");
-        }
         b2BInvoiceQueryRequest.setCardId(applQueryInvVo.getEtcNum());
-        b2BInvoiceQueryRequest.setCompanyNum(customerRec.getCompanyNum());
+        b2BInvoiceQueryRequest.setCompanyNum(applQueryInvVo.getCompanyNum());
         b2BInvoiceQueryRequest.setApplyId(applQueryInvVo.getApplId());
         RespR<B2BInvoiceQueryByApplyResponse> responseRespR = selfCarInterface.b2bContractQuery(b2BInvoiceQueryRequest);
+        //返回相应的发票
         if(responseRespR.getCode() == 1){
             log.info("申请开票失败SelfCarServiceLImpl.getSelfCarInvoicesByApplyIds{},msg{}",applQueryInvVo,responseRespR.getMsg());
             return new RespR(false,responseRespR.getMsg());
         }else{
-            B2BInvoiceQueryByApplyResponse response = responseRespR.getData();
-            List<B2BInvoiceQueryByApplyModel> b2BInvoiceQueryByApplyModels = response.getResult();
-            for(B2BInvoiceQueryByApplyModel b2BInvoiceQueryByApplyModel:b2BInvoiceQueryByApplyModels){
-                SelfCarInvoice selfCarInvoice = new SelfCarInvoice();
-                BeanUtils.copyProperties(b2BInvoiceQueryByApplyModel,selfCarInvoice);
-                selfCarInvoice.setCompanyName(customerRec.getCompanyName());
-                selfCarInvoice.setCompanyNum(customerRec.getCompanyNum());
-                selfCarInvoice.setCustomerName(customerRec.getCustomerName());
-                selfCarInvoice.setBuyerTaxpayerCode(customerRec.getCompanyReferencenum());
-                selfCarInvoice.setExStation(b2BInvoiceQueryByApplyModel.getExStationName());
-                selfCarInvoice.setEnStation(b2BInvoiceQueryByApplyModel.getEnStationName());
-                selfCarInvoice.setInvoiceMakeTime(DateUtil.tTimeToDate(selfCarInvoice.getInvoiceMakeTime()));
-                selfCarInvoice.setExTime(DateUtil.tTimeToDate(selfCarInvoice.getExTime()));
-                if(selfCarInvoiceMapper.selectByTradeAndInvoiceMakeTime(selfCarInvoice)==null || selfCarInvoiceMapper.selectByTradeAndInvoiceMakeTime(selfCarInvoice).size()==0){
-                    selfCarInvoiceMapper.insert(selfCarInvoice);
-                }
-
-            }
-            //返回相应的发票
-            return new RespR(b2BInvoiceQueryByApplyModels);
+            return new RespR(responseRespR.getData().getResult(),responseRespR.getData().getResult().toString());
         }
-    }
-    @Override
-    public void getSelfCarInvoicesByApplyIds(SelfCarAppl applQueryInvVo) {
-        log.info("申请开票开始SelfCarServiceLImpl.getSelfCarInvoicesByApplyIds{}",applQueryInvVo);
-        if(!customerService.checkMoneyEnough(applQueryInvVo.getCustomId())){
-            log.info("余额不足{}",applQueryInvVo);
-            return ;
-        }
-        CustomerRec customerRecParam = new CustomerRec();
-        customerRecParam.setCustomerName(applQueryInvVo.getCustomId());
-        customerRecParam.setCompanyName(applQueryInvVo.getCompanyNum());
-        CustomerRec customerRec = customerRecMapper.selectByCustomerNameAndCompanyNum(customerRecParam);
-        if(customerRec == null || customerRec.getRecStatus() != 1){
-            log.info("备案信息不存在{}",applQueryInvVo);
-            return;
-        }
-        B2BInvoiceQueryByApplyRequest b2BInvoiceQueryRequest = new B2BInvoiceQueryByApplyRequest();
 
-        b2BInvoiceQueryRequest.setCardId(applQueryInvVo.getCardId());
-        b2BInvoiceQueryRequest.setCompanyNum(applQueryInvVo.getCompanyNum());
-        b2BInvoiceQueryRequest.setApplyId(applQueryInvVo.getApplId());
-        RespR<B2BInvoiceQueryByApplyResponse> responseRespR = selfCarInterface.b2bContractQuery(b2BInvoiceQueryRequest);
-        if(responseRespR.getCode() == 1){
-            log.info("申请开票失败SelfCarServiceLImpl.getSelfCarInvoicesByApplyIds{},msg{}",applQueryInvVo,responseRespR.getMsg());
-        }else{
-            B2BInvoiceQueryByApplyResponse response = responseRespR.getData();
-            List<B2BInvoiceQueryByApplyModel> b2BInvoiceQueryByApplyModels = response.getResult();
-            for(B2BInvoiceQueryByApplyModel b2BInvoiceQueryByApplyModel:b2BInvoiceQueryByApplyModels){
-                SelfCarInvoice selfCarInvoice = new SelfCarInvoice();
-                BeanUtils.copyProperties(b2BInvoiceQueryByApplyModel,selfCarInvoice);
-                selfCarInvoice.setCompanyName(customerRec.getCompanyName());
-                selfCarInvoice.setCompanyNum(applQueryInvVo.getCompanyNum());
-                selfCarInvoice.setCustomerName(applQueryInvVo.getCustomId());
-                selfCarInvoice.setBuyerTaxpayerCode(customerRec.getCompanyReferencenum());
-                selfCarInvoice.setExStation(b2BInvoiceQueryByApplyModel.getExStationName());
-                selfCarInvoice.setEnStation(b2BInvoiceQueryByApplyModel.getEnStationName());
-                selfCarInvoice.setInvoiceMakeTime(DateUtil.tTimeToDate(selfCarInvoice.getInvoiceMakeTime()));
-                selfCarInvoice.setExTime(DateUtil.tTimeToDate(selfCarInvoice.getExTime()));
-                if(selfCarInvoiceMapper.selectByTradeAndInvoiceMakeTime(selfCarInvoice)==null || selfCarInvoiceMapper.selectByTradeAndInvoiceMakeTime(selfCarInvoice).size()==0){
-                    selfCarInvoiceMapper.insert(selfCarInvoice);
-                }
-
-            }
-        }
     }
     @Override
     public RespR<List<B2BInvoiceListModel>> getSelfCarInvoicesByTime(SelfCarDueQueryVo selfCarDueQueryVo,CustomerRec customerRec) {

+ 11 - 0
src/main/java/com/jkcredit/invoice/service/lowerservice/vo/ApplQueryInvVo.java

@@ -11,6 +11,9 @@ public class ApplQueryInvVo {
      */
     private String customerName;
 
+
+    private String companyNum;
+
     /**
      * 申请id
      */
@@ -53,6 +56,14 @@ public class ApplQueryInvVo {
         this.etcNum = etcNum;
     }
 
+    public String getCompanyNum() {
+        return companyNum;
+    }
+
+    public void setCompanyNum(String companyNum) {
+        this.companyNum = companyNum;
+    }
+
     @Override
     public String toString() {
         return "ApplQueryInvVo{" +

+ 12 - 0
src/main/java/com/jkcredit/invoice/service/selfcar/SelfCarApplyService.java

@@ -0,0 +1,12 @@
+package com.jkcredit.invoice.service.selfcar;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.jkcredit.invoice.mapper.binvoce.SelfCarApplMapper;
+import com.jkcredit.invoice.model.entity.invoice.SelfCarAppl;
+
+import java.util.List;
+
+public interface SelfCarApplyService {
+    IPage<List<SelfCarAppl>> findByPageAndInvoice(Page page, SelfCarAppl selfCarInvoice);
+}

+ 20 - 0
src/main/java/com/jkcredit/invoice/service/selfcar/impl/SelfCarApplyServiceImpl.java

@@ -0,0 +1,20 @@
+package com.jkcredit.invoice.service.selfcar.impl;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.jkcredit.invoice.mapper.binvoce.SelfCarApplMapper;
+import com.jkcredit.invoice.model.entity.invoice.SelfCarAppl;
+import com.jkcredit.invoice.service.selfcar.SelfCarApplyService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+@Service
+public class SelfCarApplyServiceImpl  implements SelfCarApplyService{
+    @Autowired
+    SelfCarApplMapper selfCarApplMapper;
+    @Override
+    public IPage<List<SelfCarAppl>> findByPageAndInvoice(Page page, SelfCarAppl selfCarAppl) {
+        return selfCarApplMapper.selectAllByPage(page,selfCarAppl);
+    }
+}

+ 1 - 1
src/main/resources/logback-spring.xml

@@ -23,7 +23,7 @@
             <!-- 文件名:log/sys.2017-12-05.0.log -->
             <fileNamePattern>${log.path}/logs/system.log.%d{yyyy-MM-dd}.%i.log.gz</fileNamePattern>
             <!-- 每产生一个日志文件,该日志文件的保存期限为30天 -->
-            <maxHistory>30</maxHistory>
+            <maxHistory>60</maxHistory>
             <maxFileSize>1000MB</maxFileSize>
         </rollingPolicy>
             <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">

+ 9 - 3
src/main/resources/mapper/customer/CustomerChangeInfoMapper.xml

@@ -6,7 +6,7 @@
     <result column="companyName" jdbcType="VARCHAR" property="companyName" />
     <result column="companyNum" jdbcType="VARCHAR" property="companyNum" />
     <result column="targetCompanyName" jdbcType="VARCHAR" property="targetCompanyName" />
-    <result column="targetcompanyNum" jdbcType="VARCHAR" property="targetcompanyNum" />
+    <result column="targetCompanyNum" jdbcType="VARCHAR" property="targetCompanyNum" />
     <result column="applyId" jdbcType="VARCHAR" property="applyId" />
     <result column="changeTime" jdbcType="VARCHAR" property="changeTime" />
     <result column="info" jdbcType="VARCHAR" property="info" />
@@ -19,7 +19,7 @@
         <include refid="Base_Column_List" />
         from t_change_card_info
         <where>
-            <if test="custometEtcChangeInfo.customerId != null and customer.customerId != ''">
+            <if test="custometEtcChangeInfo.customerId != null and custometEtcChangeInfo.customerId != ''">
                 and  customerId = BINARY #{custometEtcChangeInfo.customerId}
             </if>
 
@@ -28,10 +28,16 @@
             </if>
         </where>
     </select>
+    <resultMap id="cardsMap" type="java.util.Map">
+        <result column="cardId" jdbcType="VARCHAR" property="cardId" />
+    </resultMap>
+    <select id="selectChangeCards" parameterType="java.lang.String" resultMap="cardsMap">
+        select cardId from t_change_card where applyId = BINARY #{applyId}
+    </select>
   <insert id="insertCardChangeInfo" parameterType="com.jkcredit.invoice.model.entity.customer.CustomerEtcChangeInfo">
       insert into t_change_card_info (customerId,companyName,companyNum,targetCompanyName,targetcompanyNum,applyId,changeTime,info)
       values (#{customerId,jdbcType=VARCHAR},#{companyName,jdbcType=VARCHAR}, #{companyNum,jdbcType=VARCHAR}, #{targetCompanyName,jdbcType=VARCHAR},
-      #{targetcompanyNum,jdbcType=VARCHAR}, #{applyId,jdbcType=VARCHAR}, #{changeTime,jdbcType=VARCHAR},
+      #{targetCompanyNum,jdbcType=VARCHAR}, #{applyId,jdbcType=VARCHAR}, #{changeTime,jdbcType=VARCHAR},
       #{info,jdbcType=VARCHAR})
   </insert>
 

+ 1 - 1
src/main/resources/mapper/invoice/SelfCarApplMapper.xml

@@ -30,7 +30,7 @@
     <select id="selectAllByPage" resultMap="BaseResultMap">
         select
         <include refid="baseSql" />
-        from t_SelfCarAppl ORDER by id desc;
+        from t_SelfCarAppl;
     </select>
     <select id="selectAllNoRec" resultMap="BaseResultMap">
         select