Forráskód Böngészése

后端代码提交

mashengyi 3 éve
szülő
commit
61221c61f2

+ 11 - 2
src/main/java/com/jkcredit/invoice/common/ApiResult.java

@@ -119,6 +119,15 @@ public class ApiResult<T> implements Serializable {
         return failure(responseCode.getCode(), responseCode.getMsg(), responseCode.getData());
     }
 
+    /**
+     * 获取失败状态结果
+     *
+     * @param responseCode 返回状态码
+     * @return
+     */
+    public static ApiResult failure(ResponseCode responseCode,String requestid) {
+        return failure(responseCode.getData(),responseCode.getCode(), requestid, responseCode.getMsg());
+    }
 
 
 
@@ -167,10 +176,10 @@ public class ApiResult<T> implements Serializable {
      * @param data 返回结果
      * @return
      */
-    public static ApiResult failure( int data, int code, String requestid,String msg) {
+    public static ApiResult failure( int data, int code,String requestid, String msg) {
         ApiResult result = new ApiResult();
-        result.setCode(code);
         result.setData(data);
+        result.setCode(code);
         result.setRequestid(requestid);
         result.setMsg(msg);
         return result;

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

@@ -30,6 +30,9 @@ public class InterfaceCheckServer {
             case "COMPANY_ADD_V1"://无车、自有车企业注册
                 result = customerInterLowerService.customeInterRec(appKey,api,data,requestid);
                 break;
+            case "PROTOCOL_ADD_V1"://无车、自有车协议上传
+                result = customerInterLowerService.customeProtocolUpLoad(appKey,api,data,requestid);
+                break;
             case "COMPANY_QUERY_V1"://无车、自有车企业查询
                 result = customerInterLowerService.customeInterRecQuery(appKey,api,data,requestid);
                 break;

+ 8 - 5
src/main/java/com/jkcredit/invoice/credit/SimpleCORSFilter.java

@@ -53,6 +53,7 @@ public class SimpleCORSFilter implements Filter {
             //无车、自有车 公共下游客户调用接口
             put( "COMPANY_ADD_V1" ,  "1");//自有车 无车、企业注册
             put( "COMPANY_QUERY_V1" ,  "1");//自有车 无车、企业查询
+            put( "PROTOCOL_ADD_V1" ,  "1");//自有车 无车、协议上传
 
             //无车下游客户调用接口
             put( "VEHICLE_REGISTER" ,  "1");//车辆备案
@@ -227,6 +228,10 @@ public class SimpleCORSFilter implements Filter {
         }
         if (flag) {
 
+            // 创建客户唯一标识ID,以当前时间作为前缀,uuid为后缀
+            String requestid = new SimpleDateFormat("yyyyMMddHHmmssSSS").format(new Date()) + ","
+                    + UUID.randomUUID().toString();
+
             long startTime = System.currentTimeMillis();
             String flagUuid = UUID.randomUUID().toString();
 
@@ -237,14 +242,12 @@ public class SimpleCORSFilter implements Filter {
                 httpResponse.setContentType("application/json; charset=utf-8");
                 httpResponse.setCharacterEncoding("utf-8");
                 PrintWriter writer = httpResponse.getWriter();
-                writer.write(new ObjectMapper().writeValueAsString(ApiResult.failure(responseCode)));
+                writer.write(new ObjectMapper().writeValueAsString(ApiResult.failure(responseCode,requestid)));
                 log.error("[FILE - SimpleCORSFilter-] return result=" + responseCode.toString() + " , param is api="+  api + " , data=" + data + " , appKey=" + appKey + " , appSecret=" + appSecret +  " ,timeCost=" +(System.currentTimeMillis()-startTime) + "ms" +" , flag=" + flagUuid);
                 return;
             }else{
                 log.info("SUCCESS - SimpleCORSFilterWarn = {}", responseCode + " ,requestURI = {" + httpRequest.getRequestURI() +"}");
-                // 创建客户唯一标识ID,以当前时间作为前缀,uuid为后缀
-                String requestid = new SimpleDateFormat("yyyyMMddHHmmssSSS").format(new Date()) + ","
-                        + UUID.randomUUID().toString();
+
 
                 DataResult dataResult =  interfaceCheckServer.doJumpHandler(appKey,api,data,requestid);
                 if(null == dataResult){
@@ -371,7 +374,7 @@ public class SimpleCORSFilter implements Filter {
                 return ResponseCode.BALANCE_QUERY_ERROR;
             }
             if(!apiMaps.containsKey(api)){
-                return ResponseCode.API_QUERY_ERROR;
+                return ResponseCode.CUSTOMER_QUERY_ERROR;
             }
 
         } catch (Exception e) {

+ 2 - 0
src/main/java/com/jkcredit/invoice/credit/custInterface/CustomerInterLowerService.java

@@ -11,4 +11,6 @@ public interface CustomerInterLowerService {
     //自有车、无车 客户企业查询接口;
     DataResult customeInterRecQuery(String appKey, String api, String data,String requestid);
 
+    //无车 自有车协议上传
+    DataResult customeProtocolUpLoad(String appKey, String api, String data, String requestid);
 }

+ 158 - 41
src/main/java/com/jkcredit/invoice/credit/custInterface/CustomerInterLowerServiceImpl.java

@@ -3,9 +3,13 @@ package com.jkcredit.invoice.credit.custInterface;
 import com.alibaba.fastjson.JSONObject;
 import com.jkcredit.invoice.common.DataResult;
 import com.jkcredit.invoice.common.ResponseCode;
+import com.jkcredit.invoice.mapper.customer.CustomerMapper;
+import com.jkcredit.invoice.mapper.customer.CustomerRecMapper;
+import com.jkcredit.invoice.model.entity.customer.Customer;
 import com.jkcredit.invoice.model.entity.customer.CustomerRec;
 import com.jkcredit.invoice.service.customer.CustomerService;
 import com.jkcredit.invoice.service.lowerService.CustomeLowerService;
+import com.jkcredit.invoice.util.Base64Util;
 import com.jkcredit.invoice.util.RespR;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
@@ -30,6 +34,14 @@ public class CustomerInterLowerServiceImpl implements CustomerInterLowerService
     CustomerService customerService;
 
 
+    @Autowired
+    CustomerMapper customerMapper;
+
+
+    @Autowired
+    CustomerRecMapper customerRecMapper;
+
+
     /**
      * 无车 自有车 企业注册
      * @param appKey
@@ -54,9 +66,11 @@ public class CustomerInterLowerServiceImpl implements CustomerInterLowerService
             Integer interType =  0;//0-接口 1-平台 3.手工录入
 
             String  name = jsonObject.getString("name");//公司名称 companyName
-            String  taxpayerCode = jsonObject.getString("taxpayerCode");//企业税号 companyReferencenum
+            String  taxpayerCode = jsonObject.getString("taxplayerCode");//企业税号 companyReferencenum
             String  customerName = appKey;//客户名称
 
+            Customer cust = customerMapper.selectByCustomerName(customerName);
+
             /**
              * 所属类型:
              *1-行业用户  2-自营平台 3-合作商户
@@ -73,22 +87,17 @@ public class CustomerInterLowerServiceImpl implements CustomerInterLowerService
              * 运营范围
              */
             Integer  operatingRangeType = jsonObject.getInteger("operatingRangeType");
+            String  contact = jsonObject.getString("contact");//联系人
+            String  tel = jsonObject.getString("tel");//联系人电话
             String  emergencyContact = jsonObject.getString("emergencyContact");//紧急联系人  companyLeader
             String  emergencyTel = jsonObject.getString("emergencyTel");//紧急联系人电话 companyLeaderPhone
 
-            String  companyOpenbank = jsonObject.getString("companyOpenbank");//公司开户行
-            String  companyOpenbankAcc = jsonObject.getString("companyOpenbankAcc");//公司开户行电话
-            String  companyAdress = jsonObject.getString("companyAdress");//公司地址
-            String  companyPhone = jsonObject.getString("companyPhone");//公司电话
-            String  bussinessType = jsonObject.getString("bussinessType");//业务类型 0 -自有车 1-外协车 2-无车
-
-
-
-            String  serviceStartTime = jsonObject.getString("serviceStartTime");//服务开始时间
-            String  serviceEndTime = jsonObject.getString("serviceEndTime");//服务结束时间
-            Integer  serviceType = jsonObject.getInteger("serviceType");//协议类型
-            String  contractFileName = jsonObject.getString("contractFileName");//协议文件名
-            String  base64Str = jsonObject.getString("base64Str");//协议base64编码
+            String  buyerName = jsonObject.getString("buyerName");//购方客户名称
+            String  buyerTaxpayerCode = jsonObject.getString("buyerTaxpayerCode");//购方税号
+            String  buyerAddr = jsonObject.getString("buyerAddr");//购方单位地址
+            String  buyerTel = jsonObject.getString("buyerTel");//购方电话
+            String  buyerBank = jsonObject.getString("buyerBank");//购方开户行
+            String  buyerBankAccount = jsonObject.getString("buyerBankAccount");//购方银行账号
 
 
 
@@ -100,39 +109,37 @@ public class CustomerInterLowerServiceImpl implements CustomerInterLowerService
                     || null == operatingRangeType
                     || StringUtils.isEmpty(emergencyContact)
                     || StringUtils.isEmpty(emergencyTel)
-                    || StringUtils.isEmpty(companyOpenbank)
-                    || StringUtils.isEmpty(companyOpenbankAcc)
-                    || StringUtils.isEmpty(companyAdress)
-                    || StringUtils.isEmpty(companyPhone)
-                    || StringUtils.isEmpty(bussinessType)
-                    || StringUtils.isEmpty(serviceStartTime)
-                    || StringUtils.isEmpty(serviceEndTime)
-                    || null == serviceType
-                    || StringUtils.isEmpty(contractFileName)
-                    || StringUtils.isEmpty(base64Str)
+                    || StringUtils.isEmpty(contact)
+                    || StringUtils.isEmpty(tel)
+                    || StringUtils.isEmpty(buyerName)
+                    || StringUtils.isEmpty(buyerTaxpayerCode)
+                    || StringUtils.isEmpty(buyerAddr)
+                    || StringUtils.isEmpty(buyerTel)
+                    || StringUtils.isEmpty(buyerBank)
+                    || StringUtils.isEmpty(buyerBankAccount)
                     ){
                 return  result;
             }
 
             CustomerRec customerRec = new CustomerRec();
             customerRec.setCustomerName(customerName);//客户名称
-            customerRec.setCompanyLeader(emergencyContact);//紧急联系人
-            customerRec.setCompanyLeaderPhone(emergencyTel);//紧急联系人电话
+            customerRec.setCompanyLeader(contact);//紧急联系人
+            customerRec.setCompanyLeaderPhone(tel);//紧急联系人电话
             customerRec.setCompanyName(name);//企业名称
             customerRec.setCompanyReferencenum(taxpayerCode);//企业税号
-            customerRec.setCompanyOpenbank(companyOpenbank);//公司开户行
-            customerRec.setCompanyOpenbankAcc(companyOpenbankAcc);//公司开户行电话
-            customerRec.setCompanyAdress(companyAdress);//公司地址
-            customerRec.setCompanyPhone(companyPhone);//公司电话
+            customerRec.setCompanyOpenbank(buyerBank);//公司开户行
+            customerRec.setCompanyOpenbankAcc(buyerBankAccount);//公司开户行电话
+            customerRec.setCompanyAdress(buyerAddr);//公司地址
+            customerRec.setCompanyPhone(buyerTel);//公司电话
             customerRec.setInterType(interType);////0-接口 1-平台
-            customerRec.setBussinessType(bussinessType);//业务类型 0 -自有车 1-外协车 2-无车
+            customerRec.setBussinessType(String.valueOf(cust.getBussinessType()));//业务类型 0 -自有车 1-外协车 2-无车
             customerRec.setOperatingRangeType(operatingRangeType);//运用类型
             customerRec.setCompanyType(companyType);//所属类型
-            customerRec.setServiceStartTime(serviceStartTime);//服务开始时间
-            customerRec.setServiceEndTime(serviceEndTime);//服务结束时间
-            customerRec.setServiceType(serviceType);//协议类型
-            customerRec.setContractFileName(contractFileName);//协议名称
-            customerRec.setBase64Str(base64Str);//协议base64编码
+           // customerRec.setServiceStartTime(serviceStartTime);//服务开始时间
+          //  customerRec.setServiceEndTime(serviceEndTime);//服务结束时间
+          //  customerRec.setServiceType(serviceType);//协议类型
+           // customerRec.setContractFileName(contractFileName);//协议名称
+           // customerRec.setBase64Str(base64Str);//协议base64编码
 
             List<CustomerRec> customerRecs = new ArrayList<CustomerRec>();
             customerRecs.add(customerRec);
@@ -141,11 +148,29 @@ public class CustomerInterLowerServiceImpl implements CustomerInterLowerService
             log.info("[-CustomerInterLowerServiceImpl.customeInterRec-] 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;
+
+                RespR rs1 =  customerService.customeRec(customerRec);
+                log.info("[-CustomerInterLowerServiceImpl.customeInterRecRc1-] result is "
+                        + rs1.toString() + ", request is " + data + " ,costtime="
+                        + (System.currentTimeMillis() - costtimestart));
+
+
+                if(null != rs1 && rs1.getCode() == 0){
+                    result.setData(1);
+                    result.setCode(200);
+                    result.setMsg(rs1.getMsg());
+                    return result;
+
+                }else {
+                    result.setData(3);
+                    result.setCode(200);
+                    result.setMsg(rs1.getMsg());
+                    return result;
+                }
+
             } else {
                 result.setData(3);
                 result.setCode(200);
@@ -206,7 +231,7 @@ public class CustomerInterLowerServiceImpl implements CustomerInterLowerService
         } else {
             result.setData(3);
             result.setCode(200);
-            result.setMsg("无法认证");
+            result.setMsg(rs.getMsg());
             return result;
         }
         } catch (Exception e) {
@@ -215,4 +240,96 @@ public class CustomerInterLowerServiceImpl implements CustomerInterLowerService
         }
         return result;
     }
+
+    @Override
+    public DataResult customeProtocolUpLoad(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("[-CustomerInterLowerServiceImpl.customeProtocolUpLoad-] request appKey=" + appKey + " ,api=" + api + " ,data=" +data);
+            JSONObject jsonObject = JSONObject.parseObject(data);
+            String companyNum =  jsonObject.getString("companyNum");//公司编号
+            String serviceStartTime = jsonObject.getString("serviceStartTime");//服务开始时间
+            String serviceEndTime = jsonObject.getString("serviceEndTime");//服务结束时间
+            String contractFileName = jsonObject.getString("contractFileName");//协议文件名
+            String base64Str = jsonObject.getString("base64Str");//上传文件转换的base64
+            Integer serviceType = jsonObject.getInteger("serviceType");//协议类型
+            if(StringUtils.isEmpty(data)|| null == jsonObject){
+                return  result;
+            }
+            if( StringUtils.isEmpty(companyNum) || StringUtils.isEmpty(serviceStartTime)
+                    || StringUtils.isEmpty(serviceEndTime)
+                    || StringUtils.isEmpty(contractFileName)
+                    || StringUtils.isEmpty(base64Str)
+                    || null == serviceType){
+                return  result;
+            }
+
+
+
+
+            CustomerRec customerRec2 = new CustomerRec();
+            customerRec2.setCustomerName(appKey);
+            customerRec2.setCompanyNum(companyNum);
+            CustomerRec customerRec1 = customerRecMapper.selectByCustomerNameAndCompanyNum(customerRec2);
+            if (null == customerRec1 || customerRec1.getRecStatus() != 1){
+                result.setMsg("企业还未备案成功!");
+                return result;
+            }
+
+          /*  if((Base64Util.base64FileSize(base64Str)/1024)> 10){
+                result.setMsg("pdf不可超过10M!");
+                return  result;
+            }*/
+
+
+            String fileType = contractFileName.substring(contractFileName.lastIndexOf(".") + 1, contractFileName.length()).toLowerCase();
+            if(!fileType.equals("pdf")){
+                result.setMsg("必须是pdf文件!");
+                return  result;
+            }
+
+
+            CustomerRec customerRec = new CustomerRec();
+            customerRec.setServiceStartTime(serviceStartTime);//服务开始时间
+            customerRec.setServiceEndTime(serviceEndTime);//服务结束时间
+            customerRec.setServiceType(serviceType);//协议类型
+            customerRec.setLowerFileName(contractFileName);//协议名称
+            customerRec.setLowerBase64Str(base64Str);//协议base64编码
+            customerRec.setCustomerName(appKey);//客户名称
+            customerRec.setCompanyNum(companyNum);
+            customerRec.setInterType(0);//接口
+
+            List<CustomerRec> customerRecs = new ArrayList<CustomerRec>();
+            customerRecs.add(customerRec);
+            RespR rs = lowerService.customeRecUpload(customerRecs);
+            long costtimeend = System.currentTimeMillis();
+            log.info("[-CustomerInterLowerServiceImpl.customeProtocolUpLoad-] 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);
+                result.setCode(200);
+                result.setMsg(rs.getMsg());
+                return result;
+            }
+        } catch (Exception e) {
+            log.error("[-CustomerInterLowerServiceImpl.customeProtocolUpLoad-] get httpclient exception is "
+                    + e + ", request is " + data);
+        }
+
+        return result;
+    }
 }

+ 36 - 33
src/main/java/com/jkcredit/invoice/credit/custInterface/NoCarInterServiceImpl.java

@@ -19,6 +19,7 @@ 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.util.DateUtil;
 import com.jkcredit.invoice.util.RespR;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
@@ -43,6 +44,8 @@ public class NoCarInterServiceImpl implements NoCarInterService {
 
     @Autowired
     NoCarWaybillMapper noCarWaybillMapper;
+    @Autowired
+    CustomerRecMapper customerRecMapper;
 
 
     @Autowired
@@ -77,35 +80,35 @@ public class NoCarInterServiceImpl implements NoCarInterService {
         try {
             log.info("[-NoCarInterServiceImpl.customerCarRec-] request appKey=" + appKey + " ,api=" + api + " ,data=" +data);
             JSONObject jsonObject = JSONObject.parseObject(data);
-            String companyName =  jsonObject.getString("companyName");//企业名称 
+            String companyName =  jsonObject.getString("companyName");//企业名称 
             String plateNumber =  jsonObject.getString("plateNumber");//plateNumber 必输
             String plateColor =  jsonObject.getString("plateColor");//plateColor 必输
             if(StringUtils.isEmpty(data)|| null == jsonObject || StringUtils.isEmpty(plateNumber)
-                    || StringUtils.isEmpty(plateColor) || StringUtils.isEmpty(companyName)
+                    || StringUtils.isEmpty(plateColor)
 
             ){
                 return  result;
             }
 
-          /*  CustomerCarRec customerCarRec1 = customerCarRecMapper.selectByCarNum(plateNumber);
-
-            if (null == customerCarRec1){
-                return result;
-            }*/
 
             List<CustomerCarRec> customerCarRecList = new ArrayList<CustomerCarRec>();
             CustomerCarRec customerCarRec = new CustomerCarRec();
             customerCarRec.setCustomerName(appKey);
-            /*if(StringUtils.isEmpty(companyName)){
-                customerCarRec.setCompanyName(customerCarRec1.getCompanyName());
-            }else {*/
+            if(StringUtils.isEmpty(companyName)){
+                String companyNum = paramService.getParamsByParamName("REQUEST_COMPANY_NUM").getParamValue();
+                CustomerRec customerRec = new CustomerRec();
+                customerRec.setCustomerName(appKey);
+                customerRec.setCompanyNum(companyNum);
+                CustomerRec customerRec1 =  customerRecMapper.selectByCustomerNameAndCompanyNum(customerRec);
+                customerCarRec.setCompanyName(customerRec1.getCompanyName());
+            }else {
                 customerCarRec.setCompanyName(companyName);
-           // }
-
+            }
             customerCarRec.setBusinessType("2");//无车
             customerCarRec.setCarColor(plateColor);
             customerCarRec.setCarNum(plateNumber);
-          //  customerCarRec.setServiceOperation(customerCarRec1.getServiceOperation());
+            customerCarRec.setInterType(0);
+            customerCarRec.setServiceOperation(1);//默认运营车辆
 
             customerCarRecList.add(customerCarRec);
 
@@ -122,7 +125,7 @@ public class NoCarInterServiceImpl implements NoCarInterService {
             } else {
                 result.setData(3);
                 result.setCode(200);
-                result.setMsg("无法认证");
+                result.setMsg(rs.getMsg());
                 return result;
             }
         } catch (Exception e) {
@@ -166,10 +169,6 @@ public class NoCarInterServiceImpl implements NoCarInterService {
                 return  result;
             }
 
-           /* CustomerCarRec customerCarRec1 = customerCarRecMapper.selectByCarNum(plateNumber);
-            if (null == customerCarRec1){
-                return result;
-            }*/
 
             CustomerCarRec customerCarRec = new CustomerCarRec();
             Param param = paramService.getParamsByParamName("REQUEST_COMPANY_NUM");
@@ -177,7 +176,6 @@ public class NoCarInterServiceImpl implements NoCarInterService {
             customerCarRec.setCarColor(plateColor);
             customerCarRec.setCarNum(plateNumber);
             customerCarRec.setCustomerName(appKey);
-            //customerCarRec.setCompanyName(customerCarRec1.getCompanyName());
 
             RespR rs = noCarService.customerCarRecQueryUpper(customerCarRec);
             long costtimeend = System.currentTimeMillis();
@@ -188,11 +186,16 @@ public class NoCarInterServiceImpl implements NoCarInterService {
                 result.setData(1);
                 result.setCode(200);
                 result.setMsg(rs.getData().toString());
+                JSONObject jb = JSONObject.parseObject(rs.getData().toString());
+                if(null == jb.getJSONArray("result") || jb.getJSONArray("result").size() == 0){
+                    result.setData(2);
+                    result.setMsg("车辆未备案");
+                }
                 return result;
             } else {
                 result.setData(3);
                 result.setCode(200);
-                result.setMsg("无法认证");
+                result.setMsg(rs.getMsg());
                 return result;
             }
         } catch (Exception e) {
@@ -260,16 +263,15 @@ public class NoCarInterServiceImpl implements NoCarInterService {
             }
 
             NoCarWayBill noCarWayBill = new NoCarWayBill();
-            noCarWayBill.setStartTime(startTime);
             noCarWayBill.setCustomerName(appKey);
             noCarWayBill.setCompanyName(customerCarRec1.getCompanyName());
             noCarWayBill.setPlateNum(plateNumber);
             noCarWayBill.setBillNum(num);
             noCarWayBill.setPlateColor(plateColor);
-            noCarWayBill.setStartTime(startTime);
+            noCarWayBill.setStartTime(DateUtil.getDistanceHoursFormat(startTime));
             noCarWayBill.setSourceAddr(sourceAddr);
             noCarWayBill.setDestAddr(destAddr);
-            noCarWayBill.setPredictEndTime(predictEndTime);
+            noCarWayBill.setPredictEndTime(DateUtil.getDistanceHoursFormat(predictEndTime));
             noCarWayBill.setFee(fee.longValue());
             noCarWayBill.setTitleType(titleType);
             noCarWayBill.setTaxplayerCode(taxplayerCode);
@@ -288,7 +290,7 @@ public class NoCarInterServiceImpl implements NoCarInterService {
             } else {
                 result.setData(3);
                 result.setCode(200);
-                result.setMsg("无法认证");
+                result.setMsg(rs.getMsg());
                 return result;
             }
         } catch (Exception e) {
@@ -336,6 +338,7 @@ public class NoCarInterServiceImpl implements NoCarInterService {
 
             NoCarWayBill noCarWayBill1 = noCarWaybillMapper.selectByBillNum(num);
             if (null == noCarWayBill1){
+                result.setMsg("运单开始指令还未上传!");
                 return result;
             }
 
@@ -343,7 +346,7 @@ public class NoCarInterServiceImpl implements NoCarInterService {
             NoCarWayBill noCarWayBill = new NoCarWayBill();
             noCarWayBill.setBillNum(num);
             noCarWayBill.setDestAddr(realDestAddr);
-            noCarWayBill.setPredictEndTime(endTime);
+            noCarWayBill.setPredictEndTime(DateUtil.getDistanceHoursFormat(endTime));
             noCarWayBill.setStartTime(noCarWayBill1.getStartTime());
             noCarWayBill.setHisFlag(noCarWayBill1.getHisFlag());
 
@@ -360,7 +363,7 @@ public class NoCarInterServiceImpl implements NoCarInterService {
             } else {
                 result.setData(3);
                 result.setCode(200);
-                result.setMsg("无法认证");
+                result.setMsg(rs.getMsg());
                 return result;
             }
         } catch (Exception e) {
@@ -427,16 +430,15 @@ public class NoCarInterServiceImpl implements NoCarInterService {
             }
 
             NoCarWayBill noCarWayBill = new NoCarWayBill();
-            noCarWayBill.setStartTime(startTime);
             noCarWayBill.setCustomerName(appKey);
             noCarWayBill.setCompanyName(customerCarRec1.getCompanyName());
             noCarWayBill.setPlateNum(plateNumber);
             noCarWayBill.setBillNum(num);
             noCarWayBill.setPlateColor(plateColor);
-            noCarWayBill.setStartTime(startTime);
+            noCarWayBill.setStartTime(DateUtil.getDistanceHoursFormat(startTime));
             noCarWayBill.setSourceAddr(sourceAddr);
             noCarWayBill.setDestAddr(destAddr);
-            noCarWayBill.setPredictEndTime(predictEndTime);
+            noCarWayBill.setPredictEndTime(DateUtil.getDistanceHoursFormat(predictEndTime));
             noCarWayBill.setFee(fee.longValue());
             noCarWayBill.setTitleType(titleType);
             noCarWayBill.setTaxplayerCode(taxplayerCode);
@@ -455,7 +457,7 @@ public class NoCarInterServiceImpl implements NoCarInterService {
             } else {
                 result.setData(3);
                 result.setCode(200);
-                result.setMsg("无法认证");
+                result.setMsg(rs.getMsg());
                 return result;
             }
         } catch (Exception e) {
@@ -512,7 +514,7 @@ public class NoCarInterServiceImpl implements NoCarInterService {
             NoCarWayBill noCarWayBill = new NoCarWayBill();
             noCarWayBill.setBillNum(num);
             noCarWayBill.setDestAddr(realDestAddr);
-            noCarWayBill.setPredictEndTime(endTime);
+            noCarWayBill.setPredictEndTime(DateUtil.getDistanceHoursFormat(endTime));
             noCarWayBill.setStartTime(noCarWayBill1.getStartTime());
             noCarWayBill.setHisFlag(noCarWayBill1.getHisFlag());
 
@@ -529,7 +531,7 @@ public class NoCarInterServiceImpl implements NoCarInterService {
             } else {
                 result.setData(3);
                 result.setCode(200);
-                result.setMsg("无法认证");
+                result.setMsg(rs.getMsg());
                 return result;
             }
         } catch (Exception e) {
@@ -574,6 +576,7 @@ public class NoCarInterServiceImpl implements NoCarInterService {
 
             NoCarWayBill noCarWayBill1 = noCarWaybillMapper.selectByBillNum(num);
             if (null == noCarWayBill1){
+                result.setMsg("运单号异常,无法开票");
                 return result;
             }
 
@@ -598,7 +601,7 @@ public class NoCarInterServiceImpl implements NoCarInterService {
             } else {
                 result.setData(3);
                 result.setCode(200);
-                result.setMsg("无法认证");
+                result.setMsg(rs.getMsg());
                 return result;
             }
         } catch (Exception e) {

+ 19 - 10
src/main/java/com/jkcredit/invoice/credit/custInterface/SelfCarInterServiceImpl.java

@@ -67,6 +67,7 @@ public class SelfCarInterServiceImpl implements SelfCarInterService {
         customerRec.setCompanyNum(companyNum);
         CustomerRec customerRec1 = customerRecMapper.selectByCustomerNameAndCompanyNum(customerRec);
             if (null == customerRec1){
+                result.setMsg("该企业编号未注册企业!");
                 return result;
             }
 
@@ -89,7 +90,7 @@ public class SelfCarInterServiceImpl implements SelfCarInterService {
         } else {
             result.setData(3);
             result.setCode(200);
-            result.setMsg("无法认证");
+            result.setMsg(rs.getMsg());
             return result;
         }
         } catch (Exception e) {
@@ -142,6 +143,7 @@ public class SelfCarInterServiceImpl implements SelfCarInterService {
             CustomerRec customerRec1 = customerRecMapper.selectByCustomerNameAndCompanyNum(customerRec);
 
             if (null == customerRec1){
+                result.setMsg("该企业编号未注册企业!");
                 return result;
             }
 
@@ -180,7 +182,7 @@ public class SelfCarInterServiceImpl implements SelfCarInterService {
             } else {
                 result.setData(3);
                 result.setCode(200);
-                result.setMsg("无法认证");
+                result.setMsg(rs.getMsg());
                 return result;
             }
         } catch (Exception e) {
@@ -234,6 +236,7 @@ public class SelfCarInterServiceImpl implements SelfCarInterService {
             customerRec.setCompanyNum(companyNum);
             CustomerRec customerRec1 = customerRecMapper.selectByCustomerNameAndCompanyNum(customerRec);
             if (null == customerRec1){
+                result.setMsg("该企业编号未注册企业!");
                 return result;
             }
             EtcBindVo etcQueryVo = new EtcBindVo();
@@ -269,7 +272,7 @@ public class SelfCarInterServiceImpl implements SelfCarInterService {
             } else {
                 result.setData(3);
                 result.setCode(200);
-                result.setMsg("无法认证");
+                result.setMsg(rs.getMsg());
                 return result;
             }
         } catch (Exception e) {
@@ -320,6 +323,7 @@ public class SelfCarInterServiceImpl implements SelfCarInterService {
             customerRec.setCompanyNum(companyNum);
             CustomerRec customerRec1 = customerRecMapper.selectByCustomerNameAndCompanyNum(customerRec);
             if (null == customerRec1){
+                result.setMsg("该企业编号未注册企业!");
                 return result;
             }
             EtcValidVo etcValidVo  = new EtcValidVo();
@@ -342,7 +346,7 @@ public class SelfCarInterServiceImpl implements SelfCarInterService {
             } else {
                 result.setData(3);
                 result.setCode(200);
-                result.setMsg("无法认证");
+                result.setMsg(rs.getMsg());
                 return result;
             }
         } catch (Exception e) {
@@ -398,6 +402,7 @@ public class SelfCarInterServiceImpl implements SelfCarInterService {
             customerRec.setCompanyNum(companyNum);
             CustomerRec customerRec1 = customerRecMapper.selectByCustomerNameAndCompanyNum(customerRec);
             if (null == customerRec1){
+                result.setMsg("该企业编号未注册企业!");
                 return result;
             }
             TradeRequestVo tradeRequestVo  = new TradeRequestVo();
@@ -445,7 +450,7 @@ public class SelfCarInterServiceImpl implements SelfCarInterService {
             } else {
                 result.setData(3);
                 result.setCode(200);
-                result.setMsg("无法认证");
+                result.setMsg(rs.getMsg());
                 return result;
             }
         } catch (Exception e) {
@@ -501,6 +506,7 @@ public class SelfCarInterServiceImpl implements SelfCarInterService {
             customerRec.setCompanyNum(companyNum);
             CustomerRec customerRec1 = customerRecMapper.selectByCustomerNameAndCompanyNum(customerRec);
             if (null == customerRec1){
+                result.setMsg("该企业编号未注册企业!");
                 return result;
             }
             InvoiceApplVo invoiceApplVo  = new InvoiceApplVo();
@@ -534,7 +540,7 @@ public class SelfCarInterServiceImpl implements SelfCarInterService {
             } else {
                 result.setData(3);
                 result.setCode(200);
-                result.setMsg("无法认证");
+                result.setMsg(rs.getMsg());
                 return result;
             }
         } catch (Exception e) {
@@ -587,6 +593,7 @@ public class SelfCarInterServiceImpl implements SelfCarInterService {
             customerRec.setCompanyNum(companyNum);
             CustomerRec customerRec1 = customerRecMapper.selectByCustomerNameAndCompanyNum(customerRec);
             if (null == customerRec1){
+                result.setMsg("该企业编号未注册企业!");
                 return result;
             }
             SelfCarDueQueryVo selfCarDueQueryVo  = new SelfCarDueQueryVo();
@@ -604,12 +611,12 @@ public class SelfCarInterServiceImpl implements SelfCarInterService {
             if(null != rs && rs.getCode() == 0){
                 result.setData(1);
                 result.setCode(200);
-                result.setMsg(rs.getData().toString());
+                result.setMsg(rs.getMsg());
                 return result;
             } else {
                 result.setData(3);
                 result.setCode(200);
-                result.setMsg("无法认证");
+                result.setMsg(rs.getMsg());
                 return result;
             }
         } catch (Exception e) {
@@ -659,6 +666,7 @@ public class SelfCarInterServiceImpl implements SelfCarInterService {
             customerRec.setCompanyNum(companyNum);
             CustomerRec customerRec1 = customerRecMapper.selectByCustomerNameAndCompanyNum(customerRec);
             if (null == customerRec1){
+                result.setMsg("该企业编号未注册企业!");
                 return result;
             }
             InvoicePackageVo invoicePackageVo  = new InvoicePackageVo();
@@ -679,7 +687,7 @@ public class SelfCarInterServiceImpl implements SelfCarInterService {
             } else {
                 result.setData(3);
                 result.setCode(200);
-                result.setMsg("无法认证");
+                result.setMsg(rs.getMsg());
                 return result;
             }
         } catch (Exception e) {
@@ -729,6 +737,7 @@ public class SelfCarInterServiceImpl implements SelfCarInterService {
             customerRec.setCompanyNum(companyNum);
             CustomerRec customerRec1 = customerRecMapper.selectByCustomerNameAndCompanyNum(customerRec);
             if (null == customerRec1){
+                result.setMsg("该企业编号未注册企业!");
                 return result;
             }
             List<CustomerCarRec> customerCarRecList = new ArrayList<CustomerCarRec>();
@@ -752,7 +761,7 @@ public class SelfCarInterServiceImpl implements SelfCarInterService {
             } else {
                 result.setData(3);
                 result.setCode(200);
-                result.setMsg("无法认证");
+                result.setMsg(rs.getMsg());
                 return result;
             }
         } catch (Exception e) {

+ 3 - 3
src/main/java/com/jkcredit/invoice/service/customer/impl/CustomerServiceImpl.java

@@ -127,7 +127,7 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerMapper,Customer> im
         //customerRec = customerRecMapper.selectByCustomerNameAndCompanyConcat(customerRec);
         customerRecMapper.updateByPrimaryKeySelective(customerRec);
         //主动查询上游接口,如果已经备案则更新
-        RespR respR1 = customerService.customerRecQuery(customerRec);
+    /*    RespR respR1 = customerService.customerRecQuery(customerRec);
         if(respR1.getCode() == 0){
             log.info("客户注册查上游成功:CustomerServiceImpl.customeRec{}",customerRec);
             List<B2bCompanyModel> b2bCompanyModels = (List<B2bCompanyModel>)respR1.getData();
@@ -137,7 +137,7 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerMapper,Customer> im
                 customerRecMapper.updateByPrimaryKeySelective(customerRec);
                 return new RespR("注册成功");
             }
-        }
+        }*/
         CompanyAddRequest companyAddRequest = buildCompany(customerRec);
         log.info("开始客户上游注册:CustomerServiceImpl.customeRec{}",customerRec);
         //注册企业
@@ -157,7 +157,7 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerMapper,Customer> im
         customerRec.setCompanyNum(companyNum);
         customerRecMapper.updateByPrimaryKeySelective(customerRec);
         //contractAdd(customerRec);
-        return new RespR(true);
+        return new RespR(true,respR.getData().toString());
     };
 
     private CompanyAddRequest buildCompany(CustomerRec customerRec){

+ 4 - 0
src/main/java/com/jkcredit/invoice/service/lowerService/CustomeLowerService.java

@@ -32,4 +32,8 @@ public interface CustomeLowerService {
      * @return
      */
     RespR customeRecQuery(CustomerRec customerRec);
+
+
+    //协议上传 上传到本地库
+    RespR customeRecUpload(List<CustomerRec> customerRecs);
 }

+ 31 - 0
src/main/java/com/jkcredit/invoice/service/lowerService/impl/CustomerLowerServiceImpl.java

@@ -127,4 +127,35 @@ public class CustomerLowerServiceImpl implements CustomeLowerService {
         return new RespR(customerRecMapper.selectByCustomerNameAndCompany(customerRec));
     }
 
+
+
+
+
+    @Override
+    public RespR customeRecUpload(List<CustomerRec> customerRecs) {
+        log.info("客户协议上传信息:CustomerLowerServiceImpl.customeRecUpload{}",customerRecs);
+        if(customerRecs==null || customerRecs.size()<=0){return new RespR(false,"协议上传信息为空");};
+        StringBuffer res = new StringBuffer();
+        customerRecs.stream().forEach(customerRec -> {
+            Customer customer = customerMapper.selectByCustomerName(customerRec.getCustomerName());
+            if(customer == null || customer.getAccstatus()!=0){
+                res.append("#"+customerRec.getCustomerName()+"不存在或已经停用;#");
+                return;
+            }
+
+            //客户备案信息入表
+            CustomerRec customerRec1 = customerRecMapper.selectByCustomerNameAndCompanyNum(customerRec);
+            customerRec.setId(customerRec1.getId());
+            customerRecMapper.updateByPrimaryKeySelective(customerRec);
+
+        });
+        if(StringUtils.isEmpty(res.toString())){
+            log.info("客户协议上传成功信息" + ":CustomerLowerServiceImpl.customeRecUpload{}",customerRecs);
+            return new RespR(true,"协议上传成功");
+        }else{
+            log.info("客户协议上传失败信息:CustomerLowerServiceImpl.customeRecUpload{},msg{}",customerRecs,res.toString());
+            return new RespR(false,res.toString());
+        }
+
+    }
 }

+ 9 - 6
src/main/java/com/jkcredit/invoice/service/lowerService/impl/NoCarServiceImpl.java

@@ -98,6 +98,7 @@ public class NoCarServiceImpl implements NoCarService{
     public  RespR customerCarRecForNoCar(List<CustomerCarRec> customerCarRecs, StringBuffer res, CustomerRec customerRec) {
         try {
 
+            String respRResult = "";//上游成功返回结果
             for (CustomerCarRec customerCarRec : customerCarRecs) {
                 if(!customerRec.getBussinessType().equals(customerCarRec.getBusinessType())){
                     res.append("#客户:"+customerCarRec.getCustomerName()+"企业:"+customerCarRec.getCompanyName()+"车辆:"+customerCarRec.getCarNum()+"业务类型错误");
@@ -133,13 +134,15 @@ public class NoCarServiceImpl implements NoCarService{
                 vehicleRegisterRequest.setPlateNum(customerCarRec.getCarNum());
                 RespR<VehicleRegisterResponse> respR = noCarInterface.vehicleRegister(vehicleRegisterRequest);
                 if (respR.getCode() == 1) {
-                    res.append("#客户:" + customerCarRec.getCustomerName() + "企业:" + customerCarRec.getCompanyName() + "车辆:" + customerCarRec.getCarNum() + "注册失败,原因:" + respR.getMsg());
+                    res.append(respR.getMsg());
                     customerCarRec.setRecStatus(CommonConstants.REC_STATUS_FAIL);
                     customerCarRec.setFailReason(respR.getMsg());
                     customerCarRec.setFailTime(DateUtil.getCurrentDateStr());
                 } else {
                     customerCarRec.setRecStatus(CommonConstants.REC_STATUS_SUC);
                     customerCarRec.setSuccTime(DateUtil.getCurrentDateStr());
+
+                    respRResult = respR.getMsg();
                 }
                 //根据车牌号查询是新增还是更新
                 updateCustomerCarRec(customerCarRec);
@@ -147,7 +150,7 @@ public class NoCarServiceImpl implements NoCarService{
             }
             if(StringUtils.isEmpty(res.toString())){
                 log.info("车辆备案成功");
-                return new RespR("成功");
+                return new RespR(respRResult);
             }else {
                 log.info("车辆备案异常NoCarServiceImpl.customerCarRec{},msg{}",customerCarRecs,res.toString());
                 return new RespR(false,res.toString());
@@ -238,7 +241,7 @@ public class NoCarServiceImpl implements NoCarService{
             noCarWayBill.setBillwayStatus(1);
             insertOrUpdateBill(noCarWayBill);
         }
-        return new RespR("成功");
+        return new RespR(responseRespR.getData());
     }
     //插入或者更新运单
     public void insertOrUpdateBill(NoCarWayBill noCarWayBill){
@@ -346,7 +349,7 @@ public class NoCarServiceImpl implements NoCarService{
         noCarWayBill1.setBillwayStatus(2);
         noCarWayBill1.setUpdateTime(DateUtil.getCurrentDateStr());
         noCarWaybillMapper.updateByBillNum(noCarWayBill1);
-        return new RespR();
+        return new RespR(waybillEndResponseRespR.getData());
     }
 
     @Override
@@ -383,7 +386,7 @@ public class NoCarServiceImpl implements NoCarService{
             noCarWayBill.setBillwayStatus(1);
             insertOrUpdateBill(noCarWayBill);
         }
-        return new RespR(true);
+        return new RespR(responseRespR.getData());
     }
 
     public WaybillHistoryStartRequest BuildNoCarHisWaybill(NoCarWayBill noCarWayBill){
@@ -459,7 +462,7 @@ public class NoCarServiceImpl implements NoCarService{
         noCarWayBill1.setBillwayStatus(2);
         noCarWayBill1.setUpdateTime(DateUtil.getCurrentDateStr());
         noCarWaybillMapper.updateByBillNum(noCarWayBill1);
-        return new RespR();
+        return new RespR(waybillEndResponseRespR.getData());
     }
 
     @Override

+ 9 - 7
src/main/java/com/jkcredit/invoice/service/lowerService/impl/SelfCarServiceLImpl.java

@@ -166,7 +166,7 @@ public class SelfCarServiceLImpl implements SelfCarServiceL {
         RespR<B2BInvoiceApplyResponse> respR = selfCarInterface.b2BInvoiceApply(b2BInvoiceApplyRequest);
         if(respR.getCode()==1){
             log.info("申请开票失败SelfCarServiceLImpl.applInvoice{},msg{}",invoiceApplVo,respR.getMsg());
-            return new RespR(false,"申请失败");
+            return new RespR(false,respR.getMsg());
         }else{
             B2BInvoiceApplyResponse b2BInvoiceApplyResponse = respR.getData();
             SelfCarAppl selfCarAppl = new SelfCarAppl();
@@ -205,7 +205,7 @@ public class SelfCarServiceLImpl implements SelfCarServiceL {
                 }
             }
             //SelfCarTrade selfCarTrade =  sellCarTradeMapper.selectByTradeId(cardTradeModel.getTradeId());
-            return new RespR<>(b2BInvoiceApplyResponse.getApplyId());
+            return new RespR<>(respR.getMsg());
         }
 
     }
@@ -266,7 +266,7 @@ public class SelfCarServiceLImpl implements SelfCarServiceL {
             return ;
         }
         CustomerRec customerRec = customerRecMapper.selectByPrimaryKey(applQueryInvVo.getCompanyNum());
-        if(customerRec == null || customerRec.getRecStatus()!=1){
+        if(customerRec == null){
             log.info("备案信息不存在{}",applQueryInvVo);
             return;
         }
@@ -344,7 +344,7 @@ public class SelfCarServiceLImpl implements SelfCarServiceL {
                     }
                 }
             }
-            return new RespR(b2BInvoiceListModels);
+            return new RespR(b2BInvoiceListModels,responseRespR.getData().toString());
         }
     }
 
@@ -485,7 +485,7 @@ public class SelfCarServiceLImpl implements SelfCarServiceL {
             log.info("etc注册失败:SelfCarServiceLImpl.customerEtcRec{},msg{}",etcBindVo,respR1.getMsg());
             return new RespR(false,"注册失败:"+respR1.getMsg());
         }else{
-            return new RespR("已经发送绑定请求,请发送收到的验证码");
+            return new RespR(respR1.getData());
         }
     }
 
@@ -545,7 +545,7 @@ public class SelfCarServiceLImpl implements SelfCarServiceL {
                 customerCarRec.setInterType(etcValidVo.getInterType());
                 updateETCRec(customerCarRec);
             });
-            return new RespR(false,"校验成功");
+            return new RespR(respR.getData().toString());
         }
     }
     @Override
@@ -556,6 +556,7 @@ public class SelfCarServiceLImpl implements SelfCarServiceL {
         }
 
         StringBuffer res = new StringBuffer();
+        String resRespon = "";
         try {
             for(CustomerCarRec customerCarRec:customerCarRecs){
                 CustomerRec customerRecP = new CustomerRec();
@@ -573,11 +574,12 @@ public class SelfCarServiceLImpl implements SelfCarServiceL {
                     }else{
                         customerCarRec.setRecStatus(2);
                         customerCarRecMapper.updateETCByPrimaryKeySelective(customerCarRec);
+                        resRespon = respR.getData().toString();
                     }
                 }
             }
             if(org.springframework.util.StringUtils.isEmpty(res.toString())){
-                return new RespR("解绑成功");
+                return new RespR(resRespon);
             }else{
                 return new RespR(false,res.toString());
             }

+ 26 - 0
src/main/java/com/jkcredit/invoice/util/Base64Util.java

@@ -53,4 +53,30 @@ public class Base64Util {
         InputStream in = new FileInputStream(file);
         return in;
     }
+
+
+
+    /**
+     * 精确计算base64字符串文件大小(单位:B)
+     * @param base64String
+     * @return
+     */
+    public static double base64FileSize(String base64String) {
+        /**检测是否含有base64,文件头)*/
+        if (base64String.lastIndexOf(",") > 0) {
+            base64String = base64String.substring(base64String.lastIndexOf(",")+1);
+        }
+        /** 获取base64字符串长度(不含data:audio/wav;base64,文件头) */
+        int size0 = base64String.length();
+        /** 获取字符串的尾巴的最后10个字符,用于判断尾巴是否有等号,正常生成的base64文件'等号'不会超过4个 */
+        String tail = base64String.substring(size0 - 10);
+        /** 找到等号,把等号也去掉,(等号其实是空的意思,不能算在文件大小里面) */
+        int equalIndex = tail.indexOf("=");
+        if (equalIndex > 0) {
+            size0 = size0 - (10 - equalIndex);
+        }
+        /** 计算后得到的文件流大小,单位为字节 */
+        return size0 - ((double) size0 / 8) * 2;
+    }
+
 }

+ 29 - 2
src/main/java/com/jkcredit/invoice/util/DateUtil.java

@@ -286,9 +286,9 @@ public class DateUtil {
         DateFormat format = new SimpleDateFormat("yyyy-MM-dd");
         Date dateR = null;
         try {
-             dateR = format.parse(date);
+            dateR = format.parse(date);
         }catch (Exception e){
-
+            e.printStackTrace();
         }
 
         Calendar now = Calendar.getInstance();
@@ -303,4 +303,31 @@ public class DateUtil {
     public static void main(String [] args){
         System.out.print(getDateAfterDays("2021-10-31",1));;
     }
+
+
+    /**
+     * 判断时间格式化
+     * @param date
+     * @return
+     */
+    public static String getDistanceHoursFormat(String date) {
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");
+        SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+
+        String stringDate = "";
+        try {
+            //先将该字符串转换为Date类型:
+            Date applyDate = sdf.parse(date);
+             stringDate= sdf1.format(applyDate);
+
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return stringDate;
+    }
+
+
+
+
+
 }

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

@@ -298,6 +298,12 @@
       <if test="contrantNum != null" >
         contrantNum = #{contrantNum,jdbcType=VARCHAR},
       </if>
+      <if test="lowerFileName != null" >
+        lowerFileName = #{lowerFileName,jdbcType=VARCHAR},
+      </if>
+      <if test="lowerBase64Str != null" >
+        lowerBase64Str = #{lowerBase64Str,jdbcType=VARCHAR},
+      </if>
     </set>
     where id = #{id,jdbcType=INTEGER}
   </update>