Browse Source

20211125后端更新代码_1

mashengyi 3 years ago
parent
commit
1490e29d02

+ 8 - 10
src/main/java/com/jkcredit/invoice/credit/custInterface/NoCarInterServiceImpl.java

@@ -1,8 +1,6 @@
 package com.jkcredit.invoice.credit.custInterface;
 
-import cn.com.taiji.sdk.model.comm.protocol.tts.trade.service.CardTradeModel;
 import cn.com.taiji.sdk.model.comm.protocol.tts.vehicle.VehicleQueryResponse;
-import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.jkcredit.invoice.common.DataResult;
 import com.jkcredit.invoice.mapper.Binvoce.BillInvoiceMapper;
@@ -17,8 +15,6 @@ import com.jkcredit.invoice.model.entity.manager.Param;
 import com.jkcredit.invoice.model.entity.waybill.NoCarWayBill;
 import com.jkcredit.invoice.service.customer.CustomerRecService;
 import com.jkcredit.invoice.service.lowerService.NoCarService;
-import com.jkcredit.invoice.service.lowerService.SelfCarServiceL;
-import com.jkcredit.invoice.service.lowerService.vo.*;
 import com.jkcredit.invoice.service.manager.ParamService;
 import com.jkcredit.invoice.service.nocar.NoCarBillWayImportService;
 import com.jkcredit.invoice.util.DateUtil;
@@ -99,14 +95,16 @@ public class NoCarInterServiceImpl implements NoCarInterService {
             CustomerCarRec customerCarRec = new CustomerCarRec();
             customerCarRec.setCustomerName(appKey);
             if(StringUtils.isEmpty(companyName)){
-                String companyNum = paramService.getParamsByParamName("REQUEST_COMPANY_NUM").getParamValue();
-                String appKeyDemo = paramService.getParamsByParamName("REQUEST_COMPANY_NAME").getParamValue();
+            //    String companyNum = paramService.getParamsByParamName("REQUEST_COMPANY_NUM").getParamValue();
+            //    String appKeyDemo = paramService.getParamsByParamName("REQUEST_COMPANY_NAME").getParamValue();
+                Customer cust = customerMapper.selectByCustomerName(appKey);
+
                 CustomerRec customerRec = new CustomerRec();
-                customerRec.setCustomerName(appKeyDemo);
-                customerRec.setCompanyNum(companyNum);
-                CustomerRec customerRec1 =  customerRecMapper.selectByCustomerNameAndCompanyNum(customerRec);
+                customerRec.setCustomerName(appKey);
+                customerRec.setCompanyName(cust.getCompany());
+                CustomerRec customerRec1 =  customerRecMapper.selectByCustomerNameAndCompanyConcat(customerRec);
                 customerCarRec.setCompanyName(customerRec1.getCompanyName());
-                customerCarRec.setCustomerName(appKeyDemo);
+                customerCarRec.setCustomerName(customerRec1.getCustomerName());
             }else {
                 customerCarRec.setCompanyName(companyName);
             }

+ 2 - 0
src/main/java/com/jkcredit/invoice/service/customer/CustomerRecService.java

@@ -20,4 +20,6 @@ public interface CustomerRecService {
     CustomerRec selectByCustomerNameAndCompanyReference(CustomerRec record);
 
     CustomerRec selectByCustomerNameAndCompanyNum(CustomerRec customerRec);
+
+    CustomerRec selectByCustomerNameAndCompanyConcat(CustomerRec customerRec);
 }

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

@@ -66,4 +66,9 @@ public class CustomerRecServiceImpl extends ServiceImpl<CustomerRecMapper,Custom
         if(customerRec == null || customerRec.getRecStatus()!=1){customerRec = null;}
         return customerRec;
     }
+
+    @Override
+    public  CustomerRec selectByCustomerNameAndCompanyConcat(CustomerRec record) {
+        return customerRecMapper.selectByCustomerNameAndCompanyConcat(record);
+    }
 }