Browse Source

优化代码提交

mashengyi 3 years ago
parent
commit
d847c1c030
23 changed files with 192 additions and 34 deletions
  1. 42 16
      src/main/java/com/jkcredit/invoice/credit/custInterface/SelfCarInterServiceImpl.java
  2. 3 0
      src/main/java/com/jkcredit/invoice/mapper/Binvoce/BillInvoiceMapper.java
  3. 2 0
      src/main/java/com/jkcredit/invoice/mapper/Binvoce/SelfCarInvoiceMapper.java
  4. 3 0
      src/main/java/com/jkcredit/invoice/mapper/calculateInfor/NoCarCalculateInforMapper.java
  5. 2 0
      src/main/java/com/jkcredit/invoice/mapper/calculateInfor/SelfCarCalculateInforMapper.java
  6. 5 0
      src/main/java/com/jkcredit/invoice/mapper/customer/CustomerCarRecMapper.java
  7. 2 0
      src/main/java/com/jkcredit/invoice/mapper/customer/CustomerRecMapper.java
  8. 2 1
      src/main/java/com/jkcredit/invoice/mapper/waybill/NoCarWaybillImprtMapper.java
  9. 2 1
      src/main/java/com/jkcredit/invoice/mapper/waybill/NoCarWaybillMapper.java
  10. 3 0
      src/main/java/com/jkcredit/invoice/mapper/waybill/SellCarTradeMapper.java
  11. 32 0
      src/main/java/com/jkcredit/invoice/model/vo/CompanyVo.java
  12. 46 2
      src/main/java/com/jkcredit/invoice/service/lowerService/impl/CustomerLowerServiceImpl.java
  13. 10 11
      src/main/java/com/jkcredit/invoice/service/lowerService/impl/SelfCarServiceLImpl.java
  14. 1 0
      src/main/java/com/jkcredit/invoice/util/DateUtil.java
  15. 3 0
      src/main/resources/mapper/calculateInfor/NoCarCalculateInforMapper.xml
  16. 4 0
      src/main/resources/mapper/calculateInfor/SefCarCalculateInforMapper.xml
  17. 8 0
      src/main/resources/mapper/customer/CustomerCarRecMapper.xml
  18. 6 0
      src/main/resources/mapper/customer/CustomerRecMapper.xml
  19. 4 0
      src/main/resources/mapper/invoice/BillInvoiceMapper.xml
  20. 3 0
      src/main/resources/mapper/invoice/SelfCarInvoiceMapper.xml
  21. 3 1
      src/main/resources/mapper/waybill/NoCarWaybillImportMapper.xml
  22. 3 1
      src/main/resources/mapper/waybill/NoCarWaybillMapper.xml
  23. 3 1
      src/main/resources/mapper/waybill/SellCarTradeMapper.xml

+ 42 - 16
src/main/java/com/jkcredit/invoice/credit/custInterface/SelfCarInterServiceImpl.java

@@ -59,15 +59,19 @@ public class SelfCarInterServiceImpl implements SelfCarInterService {
         String plateNum = jsonObject.getString("plateNum");//车牌号 非必输
         Integer plateColor = jsonObject.getInteger("plateColor");//车牌颜色 非必输
         if(StringUtils.isEmpty(data)|| null == jsonObject || StringUtils.isEmpty(companyNum)){
+            result.setData(2);
+            result.setMsg("请输入必输项!");
             return  result;
         }
 
         CustomerRec customerRec = new CustomerRec();
         customerRec.setCustomerName(appKey);
         customerRec.setCompanyNum(companyNum);
+        customerRec.setInterType(0);
         CustomerRec customerRec1 = customerRecMapper.selectByCustomerNameAndCompanyNum(customerRec);
             if (null == customerRec1){
-                result.setMsg("该企业编号未注册企业!");
+                result.setCode(2);
+                result.setMsg("该企业编号在平台中不存在,请联系管理员核实!");
                 return result;
             }
 
@@ -88,7 +92,7 @@ public class SelfCarInterServiceImpl implements SelfCarInterService {
            result.setMsg(rs.getData().toString());
            return result;
         } else {
-            result.setData(3);
+            result.setData(2);
             result.setCode(200);
             result.setMsg(rs.getMsg());
             return result;
@@ -134,6 +138,8 @@ public class SelfCarInterServiceImpl implements SelfCarInterService {
             if(StringUtils.isEmpty(data)|| null == jsonObject || StringUtils.isEmpty(companyNum)
                     || null == vehicleList
                      ){
+                result.setCode(2);
+                result.setMsg("必传参数有为空情况,请核实后再试");
                 return  result;
             }
 
@@ -143,7 +149,7 @@ public class SelfCarInterServiceImpl implements SelfCarInterService {
             CustomerRec customerRec1 = customerRecMapper.selectByCustomerNameAndCompanyNum(customerRec);
 
             if (null == customerRec1){
-                result.setMsg("该企业编号未注册企业!");
+                result.setMsg("该企业编号在平台中不存在,请联系管理员核实!");
                 return result;
             }
 
@@ -180,7 +186,7 @@ public class SelfCarInterServiceImpl implements SelfCarInterService {
                 result.setMsg(rs.getData().toString());
                 return result;
             } else {
-                result.setData(3);
+                result.setData(2);
                 result.setCode(200);
                 result.setMsg(rs.getMsg());
                 return result;
@@ -228,6 +234,8 @@ public class SelfCarInterServiceImpl implements SelfCarInterService {
                     || null == cardIdList
 
             ){
+                result.setCode(2);
+                result.setMsg("必传参数有为空情况,请核实后再试");
                 return  result;
             }
 
@@ -236,7 +244,8 @@ public class SelfCarInterServiceImpl implements SelfCarInterService {
             customerRec.setCompanyNum(companyNum);
             CustomerRec customerRec1 = customerRecMapper.selectByCustomerNameAndCompanyNum(customerRec);
             if (null == customerRec1){
-                result.setMsg("该企业编号未注册企业!");
+                result.setCode(2);
+                result.setMsg("该企业编号在平台中不存在,请联系管理员核实!");
                 return result;
             }
             EtcBindVo etcQueryVo = new EtcBindVo();
@@ -250,6 +259,8 @@ public class SelfCarInterServiceImpl implements SelfCarInterService {
 
                 if(null == jb || StringUtils.isEmpty(cardId)
                 ){
+                    result.setCode(2);
+                    result.setMsg("用户卡为空!");
                     return  result;
                 }
 
@@ -270,7 +281,7 @@ public class SelfCarInterServiceImpl implements SelfCarInterService {
                 result.setMsg(rs.getData().toString());
                 return result;
             } else {
-                result.setData(3);
+                result.setData(2);
                 result.setCode(200);
                 result.setMsg(rs.getMsg());
                 return result;
@@ -315,6 +326,8 @@ public class SelfCarInterServiceImpl implements SelfCarInterService {
                     || StringUtils.isEmpty(validCode)
 
             ){
+                result.setCode(2);
+                result.setMsg("必传参数有为空情况,请核实后再试");
                 return  result;
             }
 
@@ -323,7 +336,8 @@ public class SelfCarInterServiceImpl implements SelfCarInterService {
             customerRec.setCompanyNum(companyNum);
             CustomerRec customerRec1 = customerRecMapper.selectByCustomerNameAndCompanyNum(customerRec);
             if (null == customerRec1){
-                result.setMsg("该企业编号未注册企业!");
+                result.setCode(2);
+                result.setMsg("该企业编号在平台中不存在,请联系管理员核实!");
                 return result;
             }
             EtcValidVo etcValidVo  = new EtcValidVo();
@@ -344,7 +358,7 @@ public class SelfCarInterServiceImpl implements SelfCarInterService {
                 result.setMsg(rs.getData().toString());
                 return result;
             } else {
-                result.setData(3);
+                result.setData(2);
                 result.setCode(200);
                 result.setMsg(rs.getMsg());
                 return result;
@@ -394,6 +408,8 @@ public class SelfCarInterServiceImpl implements SelfCarInterService {
                     || StringUtils.isEmpty(endExTime)
 
             ){
+                result.setCode(2);
+                result.setMsg("必传参数有为空情况,请核实后再试");
                 return  result;
             }
 
@@ -402,7 +418,8 @@ public class SelfCarInterServiceImpl implements SelfCarInterService {
             customerRec.setCompanyNum(companyNum);
             CustomerRec customerRec1 = customerRecMapper.selectByCustomerNameAndCompanyNum(customerRec);
             if (null == customerRec1){
-                result.setMsg("该企业编号未注册企业!");
+                result.setCode(2);
+                result.setMsg("该企业编号在平台中不存在,请联系管理员核实!");
                 return result;
             }
             TradeRequestVo tradeRequestVo  = new TradeRequestVo();
@@ -449,7 +466,7 @@ public class SelfCarInterServiceImpl implements SelfCarInterService {
                 result.setMsg(rs.getData().toString());
                 return result;
             } else {
-                result.setData(3);
+                result.setData(2);
                 result.setCode(200);
                 result.setMsg(rs.getMsg());
                 return result;
@@ -499,6 +516,8 @@ public class SelfCarInterServiceImpl implements SelfCarInterService {
                     || StringUtils.isEmpty(endExTime)
 
             ){
+                result.setCode(2);
+                result.setMsg("必传参数有为空情况,请核实后再试");
                 return  result;
             }
 
@@ -507,7 +526,8 @@ public class SelfCarInterServiceImpl implements SelfCarInterService {
             customerRec.setCompanyNum(companyNum);
             CustomerRec customerRec1 = customerRecMapper.selectByCustomerNameAndCompanyNum(customerRec);
             if (null == customerRec1 ){
-                result.setMsg("该企业编号未注册企业!");
+                result.setCode(2);
+                result.setMsg("该企业编号在平台中不存在,请联系管理员核实!");
                 return result;
             }
             InvoiceApplVo invoiceApplVo  = new InvoiceApplVo();
@@ -540,7 +560,7 @@ public class SelfCarInterServiceImpl implements SelfCarInterService {
                 result.setMsg(rs.getData().toString());
                 return result;
             } else {
-                result.setData(3);
+                result.setData(2);
                 result.setCode(200);
                 result.setMsg(rs.getMsg());
                 return result;
@@ -587,6 +607,8 @@ public class SelfCarInterServiceImpl implements SelfCarInterService {
                     || StringUtils.isEmpty(endInvoiceMakeTime)
 
             ){
+                result.setCode(2);
+                result.setMsg("必传参数有为空情况,请核实后再试");
                 return  result;
             }
 
@@ -595,7 +617,8 @@ public class SelfCarInterServiceImpl implements SelfCarInterService {
             customerRec.setCompanyNum(companyNum);
             CustomerRec customerRec1 = customerRecMapper.selectByCustomerNameAndCompanyNum(customerRec);
             if (null == customerRec1){
-                result.setMsg("该企业编号未注册企业!");
+                result.setCode(2);
+                result.setMsg("该企业编号在平台中不存在,请联系管理员核实!");
                 return result;
             }
             SelfCarDueQueryVo selfCarDueQueryVo  = new SelfCarDueQueryVo();
@@ -616,7 +639,7 @@ public class SelfCarInterServiceImpl implements SelfCarInterService {
                 result.setMsg(rs.getMsg());
                 return result;
             } else {
-                result.setData(3);
+                result.setData(2);
                 result.setCode(200);
                 result.setMsg(rs.getMsg());
                 return result;
@@ -660,6 +683,8 @@ public class SelfCarInterServiceImpl implements SelfCarInterService {
                     || StringUtils.isEmpty(makeMonth)
 
             ){
+                result.setCode(2);
+                result.setMsg("必传参数有为空情况,请核实后再试");
                 return  result;
             }
 
@@ -668,7 +693,8 @@ public class SelfCarInterServiceImpl implements SelfCarInterService {
             customerRec.setCompanyNum(companyNum);
             CustomerRec customerRec1 = customerRecMapper.selectByCustomerNameAndCompanyNum(customerRec);
             if (null == customerRec1){
-                result.setMsg("该企业编号未注册企业!");
+                result.setCode(2);
+                result.setMsg("该企业编号在平台中不存在,请联系管理员核实!");
                 return result;
             }
             InvoicePackageVo invoicePackageVo  = new InvoicePackageVo();
@@ -687,7 +713,7 @@ public class SelfCarInterServiceImpl implements SelfCarInterService {
                 result.setMsg(rs.getData().toString());
                 return result;
             } else {
-                result.setData(3);
+                result.setData(2);
                 result.setCode(200);
                 result.setMsg(rs.getMsg());
                 return result;

+ 3 - 0
src/main/java/com/jkcredit/invoice/mapper/Binvoce/BillInvoiceMapper.java

@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.jkcredit.invoice.model.entity.invoice.BillInvoice;
+import com.jkcredit.invoice.model.vo.CompanyVo;
 import org.apache.ibatis.annotations.Param;
 import org.springframework.stereotype.Repository;
 
@@ -30,4 +31,6 @@ public interface BillInvoiceMapper extends BaseMapper<BillInvoice>{
     Map<String,String> findInvoiceStatics(@Param("billInvoice") BillInvoice billInvoice);
 
     List<BillInvoice> selectNoCarNoVoiceQuery(String customerName);
+
+    int upDateCompany(CompanyVo companyVo);
 }

+ 2 - 0
src/main/java/com/jkcredit/invoice/mapper/Binvoce/SelfCarInvoiceMapper.java

@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.jkcredit.invoice.model.entity.invoice.SelfCarInvoice;
+import com.jkcredit.invoice.model.vo.CompanyVo;
 import org.apache.ibatis.annotations.Param;
 import org.springframework.stereotype.Repository;
 
@@ -20,4 +21,5 @@ public interface SelfCarInvoiceMapper extends BaseMapper<SelfCarInvoice> {
     List<SelfCarInvoice> selectByCardId(String cardId);
 
     List<SelfCarInvoice> selectByTradeAndInvoiceMakeTime(SelfCarInvoice record);
+    int upDateCompany(CompanyVo companyVo);
 }

+ 3 - 0
src/main/java/com/jkcredit/invoice/mapper/calculateInfor/NoCarCalculateInforMapper.java

@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.jkcredit.invoice.model.entity.Calculate.NoCarCalculateInfor;
+import com.jkcredit.invoice.model.vo.CompanyVo;
 import org.apache.ibatis.annotations.Param;
 import org.springframework.stereotype.Repository;
 
@@ -19,4 +20,6 @@ public interface NoCarCalculateInforMapper extends BaseMapper<NoCarCalculateInfo
     NoCarCalculateInfor selectByTradeId(String tradeId);
 
     List<Map<String,String>> selectforStatis(@Param("calculateInfor") NoCarCalculateInfor record);
+
+    int upDateCompany(CompanyVo companyVo);
 }

+ 2 - 0
src/main/java/com/jkcredit/invoice/mapper/calculateInfor/SelfCarCalculateInforMapper.java

@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.jkcredit.invoice.model.entity.Calculate.NoCarCalculateInfor;
 import com.jkcredit.invoice.model.entity.Calculate.SelfCarCalculateInfor;
+import com.jkcredit.invoice.model.vo.CompanyVo;
 import org.apache.ibatis.annotations.Param;
 import org.springframework.stereotype.Repository;
 
@@ -21,4 +22,5 @@ public interface SelfCarCalculateInforMapper extends BaseMapper<SelfCarCalculate
 
     List<Map<String,String>> findSelfcarCalculateInfoSta(SelfCarCalculateInfor selfCarCalculateInfor);
 
+    int upDateCompany(CompanyVo companyVo);
 }

+ 5 - 0
src/main/java/com/jkcredit/invoice/mapper/customer/CustomerCarRecMapper.java

@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.jkcredit.invoice.model.entity.customer.CustomerCarRec;
+import com.jkcredit.invoice.model.vo.CompanyVo;
 import org.apache.ibatis.annotations.Param;
 import org.springframework.stereotype.Repository;
 
@@ -35,4 +36,8 @@ public interface CustomerCarRecMapper extends BaseMapper<CustomerCarRec> {
     int updateWaitETCStatus(CustomerCarRec record);
     List<CustomerCarRec> selectAllBindEtcNoGetInvoice();
     IPage<List<CustomerCarRec>> selectAllByPage(Page page, @Param("query") CustomerCarRec customerCarRec);
+
+    int upDateCompanySelf(CompanyVo companyVo);
+
+    int upDateCompanyNo(CompanyVo companyVo);
 }

+ 2 - 0
src/main/java/com/jkcredit/invoice/mapper/customer/CustomerRecMapper.java

@@ -25,6 +25,8 @@ public interface CustomerRecMapper extends BaseMapper<CustomerRec> {
     CustomerRec selectByCustomerNameAndCompany(CustomerRec record);
     CustomerRec selectByCustomerNameAndCompanyConcat(CustomerRec record);
     CustomerRec selectByCustomerNameAndCompanyReference(CustomerRec record);
+    CustomerRec selectByCustomerNameAndCompanyReferenceAll(CustomerRec record);
+
     List<CustomerRec> selectByCompanyReference(String companyReference);
     //根据客户名称和 企业编码查询唯一数据
     CustomerRec selectByCustomerNameAndCompanyNum(CustomerRec record);

+ 2 - 1
src/main/java/com/jkcredit/invoice/mapper/waybill/NoCarWaybillImprtMapper.java

@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.jkcredit.invoice.model.entity.waybill.NoCarWayBill;
+import com.jkcredit.invoice.model.vo.CompanyVo;
 import org.apache.ibatis.annotations.Param;
 import org.springframework.stereotype.Repository;
 
@@ -26,6 +27,6 @@ public interface NoCarWaybillImprtMapper extends BaseMapper<NoCarWayBill>{
 
     List<NoCarWayBill> selectByHisFlagAndBillStatus(NoCarWayBill noCarWayBill);
 
-
+    int upDateCompany(CompanyVo companyVo);
     List<NoCarWayBill> getNoCarNoVoiceQuery(String customerName);
 }

+ 2 - 1
src/main/java/com/jkcredit/invoice/mapper/waybill/NoCarWaybillMapper.java

@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.jkcredit.invoice.model.entity.waybill.NoCarWayBill;
+import com.jkcredit.invoice.model.vo.CompanyVo;
 import org.apache.ibatis.annotations.Param;
 import org.springframework.stereotype.Repository;
 
@@ -26,6 +27,6 @@ public interface NoCarWaybillMapper extends BaseMapper<NoCarWayBill>{
 
     List<NoCarWayBill> selectByHisFlagAndBillStatus(NoCarWayBill noCarWayBill);
 
-
+    int upDateCompany(CompanyVo companyVo);
     List<NoCarWayBill> getNoCarNoVoiceQuery(String customerName);
 }

+ 3 - 0
src/main/java/com/jkcredit/invoice/mapper/waybill/SellCarTradeMapper.java

@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.jkcredit.invoice.model.entity.waybill.SelfCarTrade;
+import com.jkcredit.invoice.model.vo.CompanyVo;
 import org.apache.ibatis.annotations.Param;
 import org.springframework.stereotype.Repository;
 
@@ -22,4 +23,6 @@ public interface SellCarTradeMapper extends BaseMapper<SelfCarTrade> {
 
     List<SelfCarTrade> selectByCardId(String cardId);
 
+    int upDateCompany(CompanyVo companyVo);
+
 }

+ 32 - 0
src/main/java/com/jkcredit/invoice/model/vo/CompanyVo.java

@@ -0,0 +1,32 @@
+package com.jkcredit.invoice.model.vo;
+
+/**
+ * 用于企业更新
+ */
+public class CompanyVo {
+    /**
+     * 旧企业名称
+     */
+    private String oldCompanyName;
+
+    /**
+     * 新企业名称
+     */
+    private String newCompanyName;
+
+    public String getOldCompanyName() {
+        return oldCompanyName;
+    }
+
+    public void setOldCompanyName(String oldCompanyName) {
+        this.oldCompanyName = oldCompanyName;
+    }
+
+    public String getNewCompanyName() {
+        return newCompanyName;
+    }
+
+    public void setNewCompanyName(String newCompanyName) {
+        this.newCompanyName = newCompanyName;
+    }
+}

File diff suppressed because it is too large
+ 46 - 2
src/main/java/com/jkcredit/invoice/service/lowerService/impl/CustomerLowerServiceImpl.java


+ 10 - 11
src/main/java/com/jkcredit/invoice/service/lowerService/impl/SelfCarServiceLImpl.java

@@ -125,11 +125,7 @@ public class SelfCarServiceLImpl implements SelfCarServiceL {
                 };
             }
 
-            if(tradeRequestVo.getInterType() == 0){
-                return new RespR(resp.getData());
-            }else{
-                return new RespR(result);
-            }
+            return new RespR(result);
 
         }
     }
@@ -217,7 +213,7 @@ public class SelfCarServiceLImpl implements SelfCarServiceL {
                 }
             }
             //SelfCarTrade selfCarTrade =  sellCarTradeMapper.selectByTradeId(cardTradeModel.getTradeId());
-            return new RespR<>(respR.getMsg());
+            return new RespR(respR.getData());
         }
 
     }
@@ -366,7 +362,7 @@ public class SelfCarServiceLImpl implements SelfCarServiceL {
                     }
                 }
             }
-            return new RespR(b2BInvoiceListModels,responseRespR.getData().toString());
+            return new RespR(b2BInvoiceListModels,responseRespR.getData().getResult().toString());
         }
     }
 
@@ -420,6 +416,9 @@ public class SelfCarServiceLImpl implements SelfCarServiceL {
         cardQueryCardToBRequest.setPlateNum(etcQueryVo.getPlateNum());//车牌号,非必输
         cardQueryCardToBRequest.setPalteColor(etcQueryVo.getPlateColor());//车牌颜色.非必输
         RespR<CardBindQueryListToBResponse> respR = selfCarInterface.cardBindQueryListToB(cardQueryCardToBRequest);
+        if(customerRec.getInterType() == 0){
+            return respR;
+        }
         if(respR.getCode() == 1){
             MIX_LOG.info("获取etc信息失败:SelfCarServiceLImpl.getEtcInfo{},msg{}",etcQueryVo,respR.getMsg());
             return new RespR(false,respR.getMsg());
@@ -462,7 +461,7 @@ public class SelfCarServiceLImpl implements SelfCarServiceL {
         }
         if(respR.getData().getResult() == null){
             MIX_LOG.info("获取etc信息失败:SelfCarServiceLImpl.queryEtcInfo{},msg{}",etcBindVo,"没有etc卡");
-            return new RespR(false,"没有etc卡");
+            return new RespR(false,"未查到");
         }
         return new RespR(respR.getData().getResult());
 
@@ -505,7 +504,7 @@ public class SelfCarServiceLImpl implements SelfCarServiceL {
         RespR<CardBindingToBResponse> respR1 = selfCarInterface.cardBindingToB(cardBindingToBRequest);
         if(respR1.getCode() == 1){
             MIX_LOG.info("etc注册失败:SelfCarServiceLImpl.customerEtcRec{},msg{}",etcBindVo,respR1.getMsg());
-            return new RespR(false,"注册失败:"+respR1.getMsg());
+            return new RespR(false,respR1.getMsg());
         }else{
             return new RespR(respR1.getData());
         }
@@ -547,7 +546,7 @@ public class SelfCarServiceLImpl implements SelfCarServiceL {
         RespR<CardValidCodeToBResponse> respR = selfCarInterface.cardValidCodeToB(cardValidCodeToBRequest);
         if(respR.getCode() == 1){
             MIX_LOG.info("etc注册校验失败:SelfCarServiceLImpl.customerEtcRecValid{},msg",etcValidVo,respR.getMsg());
-            return new RespR(false,"验证失败:"+respR.getMsg());
+            return new RespR(false,respR.getMsg());
         }else{
             /**
              * 绑定的etc卡入库
@@ -567,7 +566,7 @@ public class SelfCarServiceLImpl implements SelfCarServiceL {
                 customerCarRec.setInterType(etcValidVo.getInterType());
                 updateETCRec(customerCarRec);
             });
-            return new RespR(respR.getData().toString());
+            return new RespR(respR.getData().getResult().toString());
         }
     }
     @Override

+ 1 - 0
src/main/java/com/jkcredit/invoice/util/DateUtil.java

@@ -66,6 +66,7 @@ public class DateUtil {
             formatDate =  sdf.format(sdf2.parse(time).getTime());
         } catch (ParseException e) {
             e.printStackTrace();
+            return time;
         }
         return formatDate;
     }

+ 3 - 0
src/main/resources/mapper/calculateInfor/NoCarCalculateInforMapper.xml

@@ -114,4 +114,7 @@
         ,#{buyerName,jdbcType=VARCHAR},#{buyerTaxpayerCode,jdbcType=VARCHAR},#{invoiceMakeTime,jdbcType=VARCHAR},#{companyLongName,jdbcType=VARCHAR}
         )
     </insert>
+    <update id="upDateCompany" parameterType="com.jkcredit.invoice.model.vo.CompanyVo">
+        UPDATE t_CalculateInfor set companyName = #{newCompanyName} where companyName = #{oldCompanyName}
+    </update>
 </mapper>

+ 4 - 0
src/main/resources/mapper/calculateInfor/SefCarCalculateInforMapper.xml

@@ -140,4 +140,8 @@
         <include refid="baseSql" />
         from t_SelfCalculateInfor
     </select>
+
+    <update id="upDateCompany" parameterType="com.jkcredit.invoice.model.vo.CompanyVo">
+        UPDATE t_SelfCalculateInfor set companyName = #{newCompanyName} where companyName = #{oldCompanyName}
+    </update>
 </mapper>

+ 8 - 0
src/main/resources/mapper/customer/CustomerCarRecMapper.xml

@@ -293,4 +293,12 @@
     inter_type = #{interType,jdbcType=INTEGER}
     where  etc_num = BINARY #{etcNum,jdbcType=VARCHAR} and bussiness_type=0
   </update>
+
+  <update id="upDateCompanySelf" parameterType="com.jkcredit.invoice.model.vo.CompanyVo">
+    UPDATE t_customer_carRec set companyName = #{newCompanyName} where companyName = #{oldCompanyName} and  and bussiness_type=0
+  </update>
+
+  <update id="upDateCompanyNo" parameterType="com.jkcredit.invoice.model.vo.CompanyVo">
+    UPDATE t_customer_carRec set companyName = #{newCompanyName} where companyName = #{oldCompanyName} and  and bussiness_type=2
+  </update>
 </mapper>

+ 6 - 0
src/main/resources/mapper/customer/CustomerRecMapper.xml

@@ -125,6 +125,12 @@
     from t_customer_rec
     where  customerName = BINARY #{customerName,jdbcType=VARCHAR} AND  company_referenceNum = BINARY #{companyReferencenum,jdbcType=VARCHAR} and rec_status =1
   </select>
+  <select id="selectByCustomerNameAndCompanyReferenceAll" resultMap="BaseResultMap" parameterType="com.jkcredit.invoice.model.entity.customer.CustomerRec" >
+    select
+    <include refid="Base_Column_List" />
+    from t_customer_rec
+    where  customerName = BINARY #{customerName,jdbcType=VARCHAR} AND  company_referenceNum = BINARY #{companyReferencenum,jdbcType=VARCHAR}
+  </select>
     <select id="selectByCompanyReference" resultMap="BaseResultMap" parameterType="java.lang.String" >
         select
         <include refid="Base_Column_List" />

+ 4 - 0
src/main/resources/mapper/invoice/BillInvoiceMapper.xml

@@ -317,4 +317,8 @@
         from t_billInvoice
         where  customerName = BINARY #{customerName,jdbcType=VARCHAR}
     </select>
+
+    <update id="upDateCompany" parameterType="com.jkcredit.invoice.model.vo.CompanyVo">
+        UPDATE t_billInvoice set companyName = #{newCompanyName} where companyName = #{oldCompanyName}
+    </update>
 </mapper>

+ 3 - 0
src/main/resources/mapper/invoice/SelfCarInvoiceMapper.xml

@@ -173,4 +173,7 @@
         from t_SelfCarInvoice
         where  tradeId = BINARY #{tradeId,jdbcType=VARCHAR} and invoiceMakeTime = #{invoiceMakeTime,jdbcType=VARCHAR} and  invoiceUrl= BINARY #{invoiceUrl,jdbcType=VARCHAR}
     </select>
+    <update id="upDateCompany" parameterType="com.jkcredit.invoice.model.vo.CompanyVo">
+        UPDATE t_SelfCarInvoice set companyName = #{newCompanyName} where companyName = #{oldCompanyName}
+    </update>
 </mapper>

+ 3 - 1
src/main/resources/mapper/waybill/NoCarWaybillImportMapper.xml

@@ -222,6 +222,8 @@
         where  customerName = BINARY #{customerName,jdbcType=VARCHAR}
     </select>
 
-
+    <update id="upDateCompany" parameterType="com.jkcredit.invoice.model.vo.CompanyVo">
+        UPDATE t_waybill_Import set companyName = #{newCompanyName} where companyName = #{oldCompanyName}
+    </update>
 
 </mapper>

+ 3 - 1
src/main/resources/mapper/waybill/NoCarWaybillMapper.xml

@@ -238,6 +238,8 @@
         where  customerName = BINARY #{customerName,jdbcType=VARCHAR}
     </select>
 
-
+    <update id="upDateCompany" parameterType="com.jkcredit.invoice.model.vo.CompanyVo">
+        UPDATE t_waybill_no set companyName = #{newCompanyName} where companyName = #{oldCompanyName}
+    </update>
 
 </mapper>

+ 3 - 1
src/main/resources/mapper/waybill/SellCarTradeMapper.xml

@@ -135,6 +135,8 @@
     </select>
 
 
-
+    <update id="upDateCompany" parameterType="com.jkcredit.invoice.model.vo.CompanyVo">
+        UPDATE t_SellCarTrade set companyName = #{newCompanyName} where companyName = #{oldCompanyName}
+    </update>
 
 </mapper>