haungfuli 2 年之前
父节点
当前提交
b2fe4404be
共有 15 个文件被更改,包括 351 次插入147 次删除
  1. 3 2
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/controller/DriverInfoController.java
  2. 10 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/controller/HyCargoOwnerCapitalInfoController.java
  3. 21 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/HyCargoOwnerCapitalInfo.java
  4. 6 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/HyDriverCarInfo.java
  5. 1 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/exception/YExceptionEnum.java
  6. 0 1
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/ICommonSysParameterService.java
  7. 3 2
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/IDriverInfoService.java
  8. 7 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/IHyCargoOwnerCapitalInfoService.java
  9. 8 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/CompanyInfoServiceImpl.java
  10. 15 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/DriverCarInfoServiceImpl.java
  11. 3 2
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/DriverInfoServiceImpl.java
  12. 18 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/HyCargoOwnerCapitalInfoServiceImpl.java
  13. 253 140
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/util/EntityAnalyse.java
  14. 1 0
      winsea-haixin-plugin-wangluohuoyun/src/main/resources/mapper/DriverCarInfoMapper.xml
  15. 2 0
      winsea-haixin-plugin-wangluohuoyun/src/main/resources/mapper/HyCargoOwnerCapitalInfoMapper.xml

+ 3 - 2
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/controller/DriverInfoController.java

@@ -10,6 +10,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
 import java.io.IOException;
+import java.text.ParseException;
 
 /**
  * <p>
@@ -51,7 +52,7 @@ public class DriverInfoController {
      * 添加信息
      */
     @PostMapping("/api/addInfo")
-    public String addInfo(@RequestBody HyDriverInfo hyDriverInfo) throws IOException{
+    public String addInfo(@RequestBody HyDriverInfo hyDriverInfo) throws IOException, ParseException {
         return driverInfoService.addInfo(hyDriverInfo);
     }
 
@@ -59,7 +60,7 @@ public class DriverInfoController {
      * 编辑信息
      */
     @PostMapping("/api/editInfo")
-    public String editInfo(@RequestBody HyDriverInfo hyDriverInfo) throws IOException {
+    public String editInfo(@RequestBody HyDriverInfo hyDriverInfo) throws IOException , ParseException {
         return driverInfoService.editInfo(hyDriverInfo);
     }
 

+ 10 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/controller/HyCargoOwnerCapitalInfoController.java

@@ -43,5 +43,15 @@ public class HyCargoOwnerCapitalInfoController {
     public String withdrawal(@RequestBody HyCargoOwnerCapitalInfo hyCargoOwnerCapitalInfo){
         return hyCargoOwnerCapitalInfoService.withdrawal(hyCargoOwnerCapitalInfo);
     }
+
+    /**
+     * 详情
+     * @param hyCargoOwnerCapitalInfo
+     * @return
+     */
+    @GetMapping("/gethyCargoOwnerCapitalInfo")
+    public HyCargoOwnerCapitalInfo gethyCargoOwnerCapitalInfo(HyCargoOwnerCapitalInfo hyCargoOwnerCapitalInfo){
+        return hyCargoOwnerCapitalInfoService.gethyCargoOwnerCapitalInfo(hyCargoOwnerCapitalInfo);
+    }
 }
 

+ 21 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/HyCargoOwnerCapitalInfo.java

@@ -76,6 +76,27 @@ public class HyCargoOwnerCapitalInfo extends BaseModel<HyCargoOwnerCapitalInfo>
      * 开户支行
      */
     private String bankDepositBranch;
+    /**
+     * 流水号
+     */
+    private String serialNumber;
+    /**
+     * 提现到账时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date paymentDate;
+    /**
+     * 状态key(1审核中3已驳回5已通过7已到账)
+     */
+    private String statusKey;
+    /**
+     * 状态
+     */
+    private String status;
+
+
+
     /**
      * 筛选开始日期
      */

+ 6 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/HyDriverCarInfo.java

@@ -312,9 +312,15 @@ public class HyDriverCarInfo extends BaseModel<HyDriverCarInfo> {
      */
     @TableField(exist = false)
     private String avatarUrl;
+
     @TableField(exist = false)
     private String token;
 
+    /**
+     * 车辆类型key值
+     */
+    @TableField(exist = false)
+    private String vehicleTypeKey;
     @Override
     protected Serializable pkVal() {
         return this.id;

+ 1 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/exception/YExceptionEnum.java

@@ -16,6 +16,7 @@ public enum YExceptionEnum {
 	DRIVER_CAR_ERROR("ERROR005", "车牌号重复,不可添加!"),
 	COMPANY_NAME_ERROR("ERROR006", "企业名称重复,不可添加!"),
 	UNIFIED_SOCIAL_CREDIT_CODE_ERROR("ERROR007", "统一社会信用代码重复"),
+	BANK_CARD_ERROR("ERROR023", "银行卡号重复"),
 	REFRESH_TIMES_UPPER_LIMIT("ERROR008", "今日刷新次数已达上限!"),
 	DRIVER_IDENTITY_AUTHENTICATION("ERROR009", "请完成司机身份认证!"),
 	CERTIFICATE_EXPIRED("ERROR010", "相关证件已过期,请到“我的-司机认证”中更新证件。"),

+ 0 - 1
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/ICommonSysParameterService.java

@@ -28,5 +28,4 @@ public interface ICommonSysParameterService extends IService<HyCommonSysParamete
      * @param
      */
     List<CommonStaff> getStaffInfo(String roleId);
-
 }

+ 3 - 2
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/IDriverInfoService.java

@@ -5,6 +5,7 @@ import com.yh.saas.plugin.yiliangyiyun.entity.HyDriverInfo;
 import com.baomidou.mybatisplus.service.IService;
 
 import java.io.IOException;
+import java.text.ParseException;
 
 /**
  * <p>
@@ -28,7 +29,7 @@ public interface IDriverInfoService extends IService<HyDriverInfo> {
      * @param hyDriverInfo
      * @return
      */
-    String addInfo(HyDriverInfo hyDriverInfo) throws IOException;
+    String addInfo(HyDriverInfo hyDriverInfo) throws IOException, ParseException ;
 
     /**
      * 审核
@@ -42,7 +43,7 @@ public interface IDriverInfoService extends IService<HyDriverInfo> {
      * @param hyDriverInfo
      * @return
      */
-    String editInfo(HyDriverInfo hyDriverInfo) throws IOException;
+    String editInfo(HyDriverInfo hyDriverInfo) throws IOException, ParseException;
 
     /**
      * 编辑垫付比例

+ 7 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/IHyCargoOwnerCapitalInfoService.java

@@ -28,4 +28,11 @@ public interface IHyCargoOwnerCapitalInfoService extends IService<HyCargoOwnerCa
      * @return
      */
     String withdrawal(HyCargoOwnerCapitalInfo hyCargoOwnerCapitalInfo);
+
+    /**
+     * 详情
+     * @param hyCargoOwnerCapitalInfo
+     * @return
+     */
+    HyCargoOwnerCapitalInfo gethyCargoOwnerCapitalInfo(HyCargoOwnerCapitalInfo hyCargoOwnerCapitalInfo);
 }

+ 8 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/CompanyInfoServiceImpl.java

@@ -87,6 +87,14 @@ public class CompanyInfoServiceImpl extends ServiceImpl<CompanyInfoMapper, HyCom
         if (hyCompanyInfos1.size() > 0) {
             throw new YException(YExceptionEnum.UNIFIED_SOCIAL_CREDIT_CODE_ERROR);
         }
+        //判断银行卡号是否重复
+        List<HyCompanyInfo> hyCompanyInfos2 = this.selectList(new EntityWrapper<HyCompanyInfo>()
+                .eq("company_name", hyCompanyInfo.getCompanyName())
+                .eq("bank_card",hyCompanyInfo.getBankCard())
+                .eq("delete_flag", NumberConstant.CONSTANT0));
+        if (hyCompanyInfos.size() > 0) {
+            throw new YException(YExceptionEnum.BANK_CARD_ERROR);
+        }
         hyCompanyInfo.setStatus(StatusEnum.IDENTITY_REVIEWED.getName());
         hyCompanyInfo.setStatusKey(StatusEnum.IDENTITY_REVIEWED.getFlag());
         hyCompanyInfo.setBackStageStatus(StatusEnum.TO_BE_REVIEWED.getName());

+ 15 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/DriverCarInfoServiceImpl.java

@@ -6,13 +6,16 @@ import com.google.common.collect.Lists;
 import com.yh.saas.common.support.util.IdGenerator;
 import com.yh.saas.plugin.yiliangyiyun.constant.NumberConstant;
 import com.yh.saas.plugin.yiliangyiyun.constant.StatusEnum;
+import com.yh.saas.plugin.yiliangyiyun.entity.HyCommonSysParameter;
 import com.yh.saas.plugin.yiliangyiyun.entity.HyDriverCarInfo;
 import com.yh.saas.plugin.yiliangyiyun.exception.YException;
 import com.yh.saas.plugin.yiliangyiyun.exception.YExceptionEnum;
 import com.yh.saas.plugin.yiliangyiyun.mapper.DriverCarInfoMapper;
+import com.yh.saas.plugin.yiliangyiyun.service.ICommonSysParameterService;
 import com.yh.saas.plugin.yiliangyiyun.service.IDriverCarInfoService;
 import com.baomidou.mybatisplus.service.impl.ServiceImpl;
 import com.yh.saas.plugin.yiliangyiyun.util.EntityAnalyse;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
@@ -32,6 +35,10 @@ import java.util.Map;
 @Service
 public class DriverCarInfoServiceImpl extends ServiceImpl<DriverCarInfoMapper, HyDriverCarInfo> implements IDriverCarInfoService {
 
+    @Autowired
+    private ICommonSysParameterService commonSysParameterService;
+
+
     /**
      *后台管理车辆列表
      * @param hyDriverCarInfo
@@ -94,6 +101,10 @@ public class DriverCarInfoServiceImpl extends ServiceImpl<DriverCarInfoMapper, H
         hyDriverCarInfo.setStatusKey(StatusEnum.IDENTITY_REVIEWED.getFlag());
         this.insert(hyDriverCarInfo);
 
+        //查询车辆类型key值
+        HyCommonSysParameter hyCommonSysParameter = commonSysParameterService.selectOne(new EntityWrapper<HyCommonSysParameter>()
+                .eq("const_id", "CAR1").eq("const_value", hyDriverCarInfo.getVehicleType()));
+        hyDriverCarInfo.setVehicleTypeKey(hyCommonSysParameter.getConstKey());
         String token = EntityAnalyse.GetJTToken();
         hyDriverCarInfo.setToken(token);
         EntityAnalyse.uploadDriverCarInfo(hyDriverCarInfo);
@@ -110,6 +121,10 @@ public class DriverCarInfoServiceImpl extends ServiceImpl<DriverCarInfoMapper, H
         hyDriverCarInfo.setStatus(StatusEnum.IDENTITY_REVIEWED.getName());
         hyDriverCarInfo.setStatusKey(StatusEnum.IDENTITY_REVIEWED.getFlag());
 
+        //查询车辆类型key值
+        HyCommonSysParameter hyCommonSysParameter = commonSysParameterService.selectOne(new EntityWrapper<HyCommonSysParameter>()
+                .eq("const_id", "CAR1").eq("const_value", hyDriverCarInfo.getVehicleType()));
+        hyDriverCarInfo.setVehicleTypeKey(hyCommonSysParameter.getConstKey());
         String token = EntityAnalyse.GetJTToken();
         hyDriverCarInfo.setToken(token);
         EntityAnalyse.uploadDriverCarInfo(hyDriverCarInfo);

+ 3 - 2
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/DriverInfoServiceImpl.java

@@ -36,6 +36,7 @@ import org.springframework.web.client.RestTemplate;
 
 import java.io.IOException;
 import java.nio.charset.StandardCharsets;
+import java.text.ParseException;
 import java.util.*;
 
 /**
@@ -124,7 +125,7 @@ public class DriverInfoServiceImpl extends ServiceImpl<DriverInfoMapper, HyDrive
      */
     @Override
     @Transactional(rollbackFor = Exception.class)
-    public String addInfo(HyDriverInfo hyDriverInfo) throws IOException {
+    public String addInfo(HyDriverInfo hyDriverInfo) throws IOException , ParseException {
         //新增主键id
         hyDriverInfo.setId(IdGenerator.generateUUID());
         hyDriverInfo.setFirstFlag("1");
@@ -185,7 +186,7 @@ public class DriverInfoServiceImpl extends ServiceImpl<DriverInfoMapper, HyDrive
      */
     @Override
     @Transactional(rollbackFor = Exception.class)
-    public String editInfo(HyDriverInfo hyDriverInfo) throws IOException {
+    public String editInfo(HyDriverInfo hyDriverInfo) throws IOException , ParseException {
         hyDriverInfo.setAuthenticationStatusKey(StatusEnum.IDENTITY_REVIEWED.getFlag());
         hyDriverInfo.setAuthenticationStatus(StatusEnum.IDENTITY_REVIEWED.getName());
         hyDriverInfo.setBackStageStatusKey(StatusEnum.TO_BE_REVIEWED.getFlag());

+ 18 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/HyCargoOwnerCapitalInfoServiceImpl.java

@@ -3,6 +3,7 @@ package com.yh.saas.plugin.yiliangyiyun.service.impl;
 import com.baomidou.mybatisplus.plugins.Page;
 import com.google.common.collect.Lists;
 import com.yh.saas.common.support.util.IdGenerator;
+import com.yh.saas.plugin.yiliangyiyun.constant.StatusEnum;
 import com.yh.saas.plugin.yiliangyiyun.entity.HyCargoOwnerCapitalInfo;
 import com.yh.saas.plugin.yiliangyiyun.entity.HyCargoOwnerInfo;
 import com.yh.saas.plugin.yiliangyiyun.entity.HyCompanyInfo;
@@ -75,6 +76,8 @@ public class HyCargoOwnerCapitalInfoServiceImpl extends ServiceImpl<HyCargoOwner
         //新增账单信息
         hyCargoOwnerCapitalInfo.setId(IdGenerator.generateUUID());
         hyCargoOwnerCapitalInfo.setTypes("提现");
+        hyCargoOwnerCapitalInfo.setStatusKey(StatusEnum.IDENTITY_REVIEWED.getFlag());
+        hyCargoOwnerCapitalInfo.setStatus(StatusEnum.IDENTITY_REVIEWED.getName());
         boolean one = this.insert(hyCargoOwnerCapitalInfo);
         if ("1".equals(hyCargoOwnerCapitalInfo.getFlag())){
             //查询个人货主信息
@@ -108,4 +111,19 @@ public class HyCargoOwnerCapitalInfoServiceImpl extends ServiceImpl<HyCargoOwner
             }
         }
     }
+
+
+    /**
+     * 详情
+     * @param hyCargoOwnerCapitalInfo
+     * @return
+     */
+    @Override
+    public HyCargoOwnerCapitalInfo gethyCargoOwnerCapitalInfo(HyCargoOwnerCapitalInfo hyCargoOwnerCapitalInfo){
+       HyCargoOwnerCapitalInfo hyCargoOwnerCapitalInfo1 = this.selectById(hyCargoOwnerCapitalInfo.getId());
+       if (hyCargoOwnerCapitalInfo1 != null){
+           return hyCargoOwnerCapitalInfo1;
+       }
+       return null;
+    }
 }

+ 253 - 140
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/util/EntityAnalyse.java

@@ -3,7 +3,6 @@ package com.yh.saas.plugin.yiliangyiyun.util;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.aliyun.oss.ServiceException;
-import com.baomidou.mybatisplus.MybatisSqlSessionTemplate;
 import com.baomidou.mybatisplus.mapper.EntityWrapper;
 import com.yh.saas.plugin.yiliangyiyun.entity.HyCommonSysParameter;
 import com.yh.saas.plugin.yiliangyiyun.entity.HyDriverCarInfo;
@@ -17,34 +16,34 @@ import org.apache.http.NameValuePair;
 import org.apache.http.client.entity.UrlEncodedFormEntity;
 import org.apache.http.client.methods.CloseableHttpResponse;
 import org.apache.http.client.methods.HttpPost;
-import org.apache.http.entity.FileEntity;
+import org.apache.http.entity.ContentType;
 import org.apache.http.entity.StringEntity;
+import org.apache.http.entity.mime.HttpMultipartMode;
+import org.apache.http.entity.mime.MultipartEntityBuilder;
+import org.apache.http.entity.mime.content.FileBody;
 import org.apache.http.impl.client.CloseableHttpClient;
 import org.apache.http.impl.client.HttpClients;
 import org.apache.http.message.BasicNameValuePair;
 import org.apache.http.util.EntityUtils;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
 
 import java.io.*;
 import java.net.HttpURLConnection;
 import java.net.URL;
-import java.net.URLConnection;
 import java.net.URLEncoder;
 import java.nio.charset.StandardCharsets;
 import java.text.DecimalFormat;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.*;
 
 public class EntityAnalyse {
 
-    @Autowired
-    public static ICommonSysParameterService commonSysParameterService;
-
 
     /**
      * 获取交投系统token
+     *
      * @return
      * @throws IOException
      */
@@ -65,7 +64,7 @@ public class EntityAnalyse {
             // 执行请求操作,并拿到结果(同步阻塞)
             String body = EntityUtils.toString(response.getEntity());
             JSONObject jsonObject = JSONObject.parseObject(body);
-            if(jsonObject.getString("status").equals("1001")){
+            if (jsonObject.getString("status").equals("1001")) {
                 String token = jsonObject.getJSONObject("result").getString("token");
                 System.out.println("token = " + token);
                 return token;
@@ -82,18 +81,34 @@ public class EntityAnalyse {
 
     /**
      * 上传文件
+     *
      * @param image
      * @return
      * @throws IOException
      */
-    public static String uploadImage(File image,String token) throws IOException {
+    public static String uploadImage(File image, String token) throws IOException {
         String url = "http://116.182.4.67:50065/platform/file/uploadImage";
         CloseableHttpClient httpClient = HttpClients.createDefault();
         // 模拟登陆,按实际服务器端要求选用 Post 或 Get 请求方式
         HttpPost httpPost = new HttpPost(url);
-        httpPost.setEntity(new FileEntity(image));
+        // 设置请求头 boundary边界不可重复,重复会导致提交失败
+        String boundary = "-------------------------" + UUID.randomUUID().toString();
+        httpPost.setHeader("Content-Type", "multipart/form-data; boundary=" + boundary);
+        // 创建MultipartEntityBuilder
+        MultipartEntityBuilder builder = MultipartEntityBuilder.create();
+        // 设置字符编码
+        builder.setCharset(StandardCharsets.UTF_8);
+        // 模拟浏览器
+        builder.setMode(HttpMultipartMode.BROWSER_COMPATIBLE);
+        // 设置边界
+        builder.setBoundary(boundary);
+        // 设置multipart/form-data流文件
+        builder.addPart("multipartFile", new FileBody(image));
+        // application/octet-stream代表不知道是什么格式的文件
+        builder.addBinaryBody("image", image, ContentType.create("application/octet-stream"), "tmp.jpg");
+        HttpEntity entity = builder.build();
+        httpPost.setEntity(entity);
         // 设置header信息
-        httpPost.setHeader("Content-type", "application/json");
         httpPost.setHeader("token", token);
         CloseableHttpResponse response = httpClient.execute(httpPost);
         try {
@@ -116,12 +131,14 @@ public class EntityAnalyse {
 
     /**
      * 上报驾驶员信息
+     *
      * @param hyDriverInfo
      * @return
      * @throws IOException
      */
-    public static String uploadDriverInfo(HyDriverInfo hyDriverInfo) throws IOException {
+    public static String uploadDriverInfo(HyDriverInfo hyDriverInfo) throws IOException, ParseException {
         String url = "http://116.182.4.67:50065/platform/api/v1/driver";
+        SimpleDateFormat f = new SimpleDateFormat("yyyy-MM-dd");//设置日期格式
         CloseableHttpClient httpClient = HttpClients.createDefault();
         // 模拟登陆,按实际服务器端要求选用 Post 或 Get 请求方式
         HttpPost httpPost = new HttpPost(url);
@@ -130,25 +147,33 @@ public class EntityAnalyse {
         params.put("drivingLicense", hyDriverInfo.getNumberCard());
         params.put("vehicleClass", hyDriverInfo.getQuasiDrivingVehicle());
         params.put("issuingOrganizations", hyDriverInfo.getLssuingAuthority());
-        params.put("validPeriodFrom", hyDriverInfo.getDriverLicenseValidityStartDate());
-        params.put("validPeriodTo", hyDriverInfo.getDriverLicenseValidityDate());
+        params.put("validPeriodFrom", f.format(hyDriverInfo.getDriverLicenseValidityStartDate()));
+        params.put("validPeriodTo", f.format(hyDriverInfo.getDriverLicenseValidityDate()));
         params.put("qualificationCertificate", hyDriverInfo.getQualificationCertificateNumber());
         params.put("telephone", hyDriverInfo.getDriverPhone());
         params.put("remark", hyDriverInfo.getDriverName() + hyDriverInfo.getDriverPhone());
-        params.put("idCardFrontImg", EntityAnalyse.uploadImage(EntityAnalyse.urlToFile(new URL(hyDriverInfo.getCardAddressUrl())),hyDriverInfo.getToken()));
-        params.put("idCardBackImg", EntityAnalyse.uploadImage(EntityAnalyse.urlToFile(new URL(hyDriverInfo.getCardBackAddressUrl())),hyDriverInfo.getToken()));
-        params.put("driverLicenseFirstSheetImg", EntityAnalyse.uploadImage(EntityAnalyse.urlToFile(new URL(hyDriverInfo.getDriverLicenseHomePage())),hyDriverInfo.getToken()));
-        params.put("driverLicenseSecondSheetImg", EntityAnalyse.uploadImage(EntityAnalyse.urlToFile(new URL(hyDriverInfo.getDriverLicenseBackPage())),hyDriverInfo.getToken()));
-        params.put("transportCertificationImg", EntityAnalyse.uploadImage(EntityAnalyse.urlToFile(new URL(hyDriverInfo.getQualificationCertificate())),hyDriverInfo.getToken()));
-        params.put("idCardValidPeriodTo", hyDriverInfo.getCardValidityDate());
-        params.put("transportCertificationValidPeriodTo", hyDriverInfo.getQualificationCertificateValidityDate());
-        if ("男".equals(hyDriverInfo.getDriverSex())){
-            params.put("driverSex", "1");
-        }else {
-            params.put("driverSex", "2");
+        params.put("idCardFrontImg", EntityAnalyse.uploadImage(EntityAnalyse.urlToFile(new URL(hyDriverInfo.getCardAddressUrl())), hyDriverInfo.getToken()));
+        params.put("idCardBackImg", EntityAnalyse.uploadImage(EntityAnalyse.urlToFile(new URL(hyDriverInfo.getCardBackAddressUrl())), hyDriverInfo.getToken()));
+        params.put("driverLicenseFirstSheetImg", EntityAnalyse.uploadImage(EntityAnalyse.urlToFile(new URL(hyDriverInfo.getDriverLicenseHomePage())), hyDriverInfo.getToken()));
+        params.put("driverLicenseSecondSheetImg", EntityAnalyse.uploadImage(EntityAnalyse.urlToFile(new URL(hyDriverInfo.getDriverLicenseBackPage())), hyDriverInfo.getToken()));
+        params.put("transportCertificationImg", EntityAnalyse.uploadImage(EntityAnalyse.urlToFile(new URL(hyDriverInfo.getQualificationCertificate())), hyDriverInfo.getToken()));
+        if ("长期".equals(hyDriverInfo.getCardValidityDate())) {
+            params.put("idCardValidPeriodTo", "2099-12-31");
+        } else {
+            params.put("idCardValidPeriodTo", hyDriverInfo.getCardValidityDate());
         }
-        params.put("driverBirthday", hyDriverInfo.getDriverBirthday());
-        httpPost.setEntity(new StringEntity(params.toString(), StandardCharsets.UTF_8));
+        params.put("transportCertificationValidPeriodTo", f.format(hyDriverInfo.getQualificationCertificateValidityDate()));
+        if ("男".equals(hyDriverInfo.getDriverSex())) {
+            params.put("driverSex", 1);
+        } else {
+            params.put("driverSex", 2);
+        }
+        String s = hyDriverInfo.getDriverBirthday().substring(0, hyDriverInfo.getDriverBirthday().length() - 1);
+        String s1 = s.replace("年", "-");
+        String s2 = s1.replace("月", "-");
+        Date date = f.parse(s2);
+        params.put("driverBirthday", f.format(date));
+        httpPost.setEntity(new StringEntity("[" + params.toString() + "]", StandardCharsets.UTF_8));
         // 设置header信息
         httpPost.setHeader("Content-type", "application/json");
         httpPost.setHeader("token", hyDriverInfo.getToken());
@@ -172,65 +197,75 @@ public class EntityAnalyse {
 
     /**
      * 上报车辆信息
+     *
      * @param hyDriverCarInfo
      * @return
      * @throws IOException
      */
     public static String uploadDriverCarInfo(HyDriverCarInfo hyDriverCarInfo) throws IOException {
         String url = "http://116.182.4.67:50065/platform/api/v1/vehicle";
+        SimpleDateFormat f = new SimpleDateFormat("yyyy-MM-dd");//设置日期格式
         CloseableHttpClient httpClient = HttpClients.createDefault();
         // 模拟登陆,按实际服务器端要求选用 Post 或 Get 请求方式
         HttpPost httpPost = new HttpPost(url);
         JSONObject params = new JSONObject();
         params.put("vehicleNumber", hyDriverCarInfo.getCarNumber());
-        if ("黄色".equals(hyDriverCarInfo.getCarNumberColour())){
-            params.put("vehiclePlateColorCode", "2");
-        }else if ("蓝色".equals(hyDriverCarInfo.getCarNumberColour())){
-            params.put("vehiclePlateColorCode", "1");
+        if ("黄色".equals(hyDriverCarInfo.getCarNumberColour())) {
+            params.put("vehiclePlateColorCode", 2);
+        } else if ("蓝色".equals(hyDriverCarInfo.getCarNumberColour())) {
+            params.put("vehiclePlateColorCode", 1);
         }
-        HyCommonSysParameter hyCommonSysParameter = commonSysParameterService.selectOne(new EntityWrapper<HyCommonSysParameter>()
-                .eq("const_id","CAR1").eq("const_value",hyDriverCarInfo.getVehicleType()));
-        params.put("vehicleType", hyCommonSysParameter.getConstKey());
+        params.put("vehicleType", hyDriverCarInfo.getVehicleTypeKey());
         params.put("owner", hyDriverCarInfo.getOwner());
         params.put("useCharacter", hyDriverCarInfo.getUseNature());
         params.put("vin", hyDriverCarInfo.getCarCode());
         params.put("issuingOrganizations", hyDriverCarInfo.getLssuingAuthority());
-        params.put("vehicleLength", hyDriverCarInfo.getCarLong());
-        params.put("vehicleWidth", hyDriverCarInfo.getCarWidth());
-        params.put("vehicleHeight", hyDriverCarInfo.getCarHeight());
-        params.put("registerDate", hyDriverCarInfo.getDrivingLicenseRegistrationDate());
-        params.put("issueDate", hyDriverCarInfo.getDrivingLicenseIssueDate());
-        if ("汽油".equals(hyDriverCarInfo.getEnergyType())){
+        params.put("vehicleLength", new Double(hyDriverCarInfo.getCarLong()).intValue());
+        params.put("vehicleWidth", new Double(hyDriverCarInfo.getCarWidth()).intValue());
+        params.put("vehicleHeight", new Double(hyDriverCarInfo.getCarHeight()).intValue());
+        params.put("registerDate", f.format(hyDriverCarInfo.getDrivingLicenseRegistrationDate()));
+        params.put("issueDate", f.format(hyDriverCarInfo.getDrivingLicenseIssueDate()));
+        if ("汽油".equals(hyDriverCarInfo.getEnergyType())) {
             params.put("vehicleEnergyType", "A");
-        }else if ("柴油".equals(hyDriverCarInfo.getEnergyType())){
+        } else if ("柴油".equals(hyDriverCarInfo.getEnergyType())) {
             params.put("vehicleEnergyType", "B");
-        }else if ("油电混合".equals(hyDriverCarInfo.getEnergyType())){
+        } else if ("油电混合".equals(hyDriverCarInfo.getEnergyType())) {
             params.put("vehicleEnergyType", "O");
-        }else if ("纯电动".equals(hyDriverCarInfo.getEnergyType())){
+        } else if ("纯电动".equals(hyDriverCarInfo.getEnergyType())) {
             params.put("vehicleEnergyType", "C");
-        }else if ("插电式混合动力".equals(hyDriverCarInfo.getEnergyType())){
+        } else if ("插电式混合动力".equals(hyDriverCarInfo.getEnergyType())) {
             params.put("vehicleEnergyType", "O");
-        }else if ("增程式".equals(hyDriverCarInfo.getEnergyType())){
+        } else if ("增程式".equals(hyDriverCarInfo.getEnergyType())) {
             params.put("vehicleEnergyType", "Z");
         }
-        params.put("vehicleTonnage", new DecimalFormat("#.00").format(hyDriverCarInfo.getCarApprovedWeight()*100000));
-        if ("非挂车".equals(hyDriverCarInfo.getCarCategory())){
-            params.put("grossMass", new DecimalFormat("#.00").format(hyDriverCarInfo.getCarTotalWeight()*100000));
-        }else {
-            params.put("grossMass", new DecimalFormat("#.00").format(hyDriverCarInfo.getServicingWeight()*100000));
+        Double doubleValue = Double.parseDouble(new DecimalFormat("#.00").format(hyDriverCarInfo.getCarApprovedWeight())) / 10;
+        int intValue = doubleValue.intValue();
+        params.put("vehicleTonnage", intValue);
+        if ("非挂车".equals(hyDriverCarInfo.getCarCategory())) {
+            Double doubleValue1 = Double.parseDouble(new DecimalFormat("#.00").format(hyDriverCarInfo.getCarTotalWeight())) / 10;
+            int intValue1 = doubleValue1.intValue();
+            params.put("grossMass", intValue1);
+        } else {
+            Double doubleValue1 = Double.parseDouble(new DecimalFormat("#.00").format(hyDriverCarInfo.getServicingWeight())) / 10;
+            int intValue1 = doubleValue1.intValue();
+            params.put("grossMass", intValue1);
         }
         params.put("roadTransportCertificateNumber", hyDriverCarInfo.getOperationCertificateNumber());
-        if (hyDriverCarInfo.getGuaCarNumber() != null){
+        if (hyDriverCarInfo.getGuaCarNumber() != null) {
             params.put("trailerVehiclePlateNumber", hyDriverCarInfo.getGuaCarNumber());
         }
-        params.put("licenseValidPeriodTo", hyDriverCarInfo.getDrivingLicenseValidityDate());
-        params.put("transportValidPeriodTo", hyDriverCarInfo.getOperationCertificateValidityDate());
-        params.put("vehicleLicenseFirstSheetImg", EntityAnalyse.uploadImage(EntityAnalyse.urlToFile(new URL(hyDriverCarInfo.getDrivingLicenseHomePage())),hyDriverCarInfo.getToken()));
-        params.put("vehicleLicenseSecondSheetImg", EntityAnalyse.uploadImage(EntityAnalyse.urlToFile(new URL(hyDriverCarInfo.getDrivingLicenseBackPage())),hyDriverCarInfo.getToken()));
-        params.put("transportLicenseFirstSheetImg", EntityAnalyse.uploadImage(EntityAnalyse.urlToFile(new URL(hyDriverCarInfo.getOperationCertificate())),hyDriverCarInfo.getToken()));
-        params.put("vehicleDriverImg", EntityAnalyse.uploadImage(EntityAnalyse.urlToFile(new URL(hyDriverCarInfo.getAddressUrl())),hyDriverCarInfo.getToken()));
+        if ("长期".equals(hyDriverCarInfo.getDrivingLicenseValidityDate())) {
+            params.put("licenseValidPeriodTo", "2099-12-31");
+        } else {
+            params.put("licenseValidPeriodTo", f.format(hyDriverCarInfo.getDrivingLicenseValidityDate()));
+        }
+        params.put("transportValidPeriodTo", f.format(hyDriverCarInfo.getOperationCertificateValidityDate()));
+        params.put("vehicleLicenseFirstSheetImg", EntityAnalyse.uploadImage(EntityAnalyse.urlToFile(new URL(hyDriverCarInfo.getDrivingLicenseHomePage())), hyDriverCarInfo.getToken()));
+        params.put("vehicleLicenseSecondSheetImg", EntityAnalyse.uploadImage(EntityAnalyse.urlToFile(new URL(hyDriverCarInfo.getDrivingLicenseBackPage())), hyDriverCarInfo.getToken()));
+        params.put("transportLicenseFirstSheetImg", EntityAnalyse.uploadImage(EntityAnalyse.urlToFile(new URL(hyDriverCarInfo.getOperationCertificate())), hyDriverCarInfo.getToken()));
+        params.put("vehicleDriverImg", EntityAnalyse.uploadImage(EntityAnalyse.urlToFile(new URL(hyDriverCarInfo.getAddressUrl())), hyDriverCarInfo.getToken()));
 
-        httpPost.setEntity(new StringEntity(params.toString(), StandardCharsets.UTF_8));
+        httpPost.setEntity(new StringEntity("[" + params.toString() + "]", StandardCharsets.UTF_8));
         // 设置header信息
         httpPost.setHeader("Content-type", "application/json");
         httpPost.setHeader("token", hyDriverCarInfo.getToken());
@@ -254,6 +289,7 @@ public class EntityAnalyse {
 
     /**
      * 驾驶员信息校验结果查询
+     *
      * @param hyDriverInfo
      * @return
      * @throws IOException
@@ -265,7 +301,7 @@ public class EntityAnalyse {
         HttpPost httpPost = new HttpPost(url);
         JSONObject params = new JSONObject();
         params.put("drivingLicense", hyDriverInfo.getNumberCard());
-        httpPost.setEntity(new StringEntity(params.toString(), StandardCharsets.UTF_8));
+        httpPost.setEntity(new StringEntity("[" + params.toString() + "]", StandardCharsets.UTF_8));
         // 设置header信息
         httpPost.setHeader("Content-type", "application/json");
         httpPost.setHeader("token", hyDriverInfo.getToken());
@@ -274,20 +310,24 @@ public class EntityAnalyse {
             // 执行请求操作,并拿到结果(同步阻塞)
             String body = EntityUtils.toString(response.getEntity());
             JSONObject jsonObject = JSONObject.parseObject(body);
-            if("异常".equals(jsonObject.getJSONObject("result").getString("validateStatus"))){
+            if ("异常".equals(jsonObject.getJSONObject("result").getString("validateStatus"))) {
                 JSONArray jsonArray = jsonObject.getJSONObject("result").getJSONArray("validateResult");
                 String result = "";
                 for (int i = 0; i < jsonArray.size(); i++) {
-                    if ("异常".equals(jsonArray.getJSONObject(i).getString("flag"))){
+                    if ("异常".equals(jsonArray.getJSONObject(i).getString("flag"))) {
                         result = result + jsonArray.getJSONObject(i).getString("message");
                     }
                 }
                 System.out.println("result = " + result);
                 return result;
-            }else if ("待校验".equals(jsonObject.getJSONObject("result").getString("validateStatus"))){
+            } else if ("待校验".equals(jsonObject.getJSONObject("result").getString("validateStatus"))) {
                 String result = "待校验";
                 System.out.println("result = " + result);
                 return result;
+            } else if ("通过".equals(jsonObject.getJSONObject("result").getString("validateStatus"))) {
+                String result = jsonObject.getJSONObject("result").getString("validateStatus");
+                System.out.println("result = " + result);
+                return result;
             }
         } catch (Exception e) {
             e.printStackTrace();
@@ -301,6 +341,7 @@ public class EntityAnalyse {
 
     /**
      * 车辆信息校验结果查询
+     *
      * @param hyDriverCarInfo
      * @return
      * @throws IOException
@@ -312,12 +353,12 @@ public class EntityAnalyse {
         HttpPost httpPost = new HttpPost(url);
         JSONObject params = new JSONObject();
         params.put("vehicleNumber", hyDriverCarInfo.getCarNumber());
-        if ("黄色".equals(hyDriverCarInfo.getCarNumberColour())){
+        if ("黄色".equals(hyDriverCarInfo.getCarNumberColour())) {
             params.put("vehiclePlateColorCode", "2");
-        }else if ("蓝色".equals(hyDriverCarInfo.getCarNumberColour())){
+        } else if ("蓝色".equals(hyDriverCarInfo.getCarNumberColour())) {
             params.put("vehiclePlateColorCode", "1");
         }
-        httpPost.setEntity(new StringEntity(params.toString(), StandardCharsets.UTF_8));
+        httpPost.setEntity(new StringEntity("[" + params.toString() + "]", StandardCharsets.UTF_8));
         // 设置header信息
         httpPost.setHeader("Content-type", "application/json");
         httpPost.setHeader("token", hyDriverCarInfo.getToken());
@@ -326,20 +367,24 @@ public class EntityAnalyse {
             // 执行请求操作,并拿到结果(同步阻塞)
             String body = EntityUtils.toString(response.getEntity());
             JSONObject jsonObject = JSONObject.parseObject(body);
-            if("异常".equals(jsonObject.getJSONObject("result").getString("validateStatus"))){
+            if ("异常".equals(jsonObject.getJSONObject("result").getString("validateStatus"))) {
                 JSONArray jsonArray = jsonObject.getJSONObject("result").getJSONArray("validateResult");
                 String result = "";
                 for (int i = 0; i < jsonArray.size(); i++) {
-                    if ("异常".equals(jsonArray.getJSONObject(i).getString("flag"))){
+                    if ("异常".equals(jsonArray.getJSONObject(i).getString("flag"))) {
                         result = result + jsonArray.getJSONObject(i).getString("message");
                     }
                 }
                 System.out.println("result = " + result);
                 return result;
-            }else if ("待校验".equals(jsonObject.getJSONObject("result").getString("validateStatus"))){
+            } else if ("待校验".equals(jsonObject.getJSONObject("result").getString("validateStatus"))) {
                 String result = "待校验";
                 System.out.println("result = " + result);
                 return result;
+            } else if ("通过".equals(jsonObject.getJSONObject("result").getString("validateStatus"))) {
+                String result = jsonObject.getJSONObject("result").getString("validateStatus");
+                System.out.println("result = " + result);
+                return result;
             }
         } catch (Exception e) {
             e.printStackTrace();
@@ -353,6 +398,7 @@ public class EntityAnalyse {
 
     /**
      * 银行卡识别
+     *
      * @param bankImg
      * @return
      * @throws ServiceException
@@ -376,7 +422,7 @@ public class EntityAnalyse {
             String body = EntityUtils.toString(response.getEntity());
             System.out.println(body);
             JSONObject jsonObject = JSONObject.parseObject(body);
-            if(jsonObject.getString("ret").equals("200")){
+            if (jsonObject.getString("ret").equals("200")) {
                 JSONObject data = JSONObject.parseObject(jsonObject.getString("data"));
                 DistinguishView distinguishView = new DistinguishView();
                 distinguishView.setBankNo(data.getString("number"));
@@ -395,14 +441,14 @@ public class EntityAnalyse {
                     body = EntityUtils.toString(response.getEntity());
                     System.out.println(body);
                     jsonObject = JSONObject.parseObject(body);
-                    if(jsonObject.getString("code").equals("0")){
+                    if (jsonObject.getString("code").equals("0")) {
                         data = JSONObject.parseObject(jsonObject.getString("data"));
                         JSONObject detail = JSONObject.parseObject(data.getString("detail"));
                         distinguishView.setBankName(detail.getString("bankName"));
                         String[] area = detail.getString("area").split(" - ");
                         String province = "";
                         String city = "";
-                        if(area.length > 1){
+                        if (area.length > 1) {
                             province = area[0];
                             city = area[1];
                         }
@@ -427,10 +473,10 @@ public class EntityAnalyse {
                             jsonObject = JSONObject.parseObject(body);
                             JSONObject jsonData = jsonObject.getJSONObject("data");
                             JSONObject res = jsonObject.getJSONObject("resp");
-                            if(res.get("RespCode").equals("200")){
+                            if (res.get("RespCode").equals("200")) {
                                 JSONArray jsonArray = jsonData.getJSONArray("record");
                                 List<String> bankList = new ArrayList<>();
-                                for(int i=0;i<jsonArray.size();i++) {
+                                for (int i = 0; i < jsonArray.size(); i++) {
                                     bankList.add(jsonArray.getJSONObject(i).get("lName").toString());
                                 }
                                 distinguishView.setBankNameZhihang(bankList);
@@ -443,8 +489,7 @@ public class EntityAnalyse {
                     e.printStackTrace();
                 }
                 return distinguishView;
-            }
-            else{
+            } else {
                 System.out.println(jsonObject.getString("msg"));
             }
         } catch (Exception e) {
@@ -453,14 +498,14 @@ public class EntityAnalyse {
         return null;
     }
 
-    public static DistinguishView personShibie(String personImg,String flag) throws ServiceException {
+    public static DistinguishView personShibie(String personImg, String flag) throws ServiceException {
         String appcode = "2d59bfa794994f5f94d1d98b7b5bd102";
         //API产品路径
         String requestUrl = "https://personcard.market.alicloudapi.com/ai_market/ai_ocr_universal/shen_fen_zheng/ch/v1";
         //阿里云APPCODE
         DistinguishView distinguishView = new DistinguishView();
         CloseableHttpClient httpClient = null;
-        try{
+        try {
             httpClient = HttpClients.createDefault();
             List<NameValuePair> params = new ArrayList<NameValuePair>();
             //启用URL方式进行识别
@@ -470,7 +515,7 @@ public class EntityAnalyse {
 
             // 创建一个HttpPost实例
             HttpPost httpPost = new HttpPost(requestUrl);
-            httpPost.addHeader("Authorization","APPCODE " + appcode);
+            httpPost.addHeader("Authorization", "APPCODE " + appcode);
             httpPost.addHeader("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8");
 
             // 设置请求参数
@@ -488,16 +533,13 @@ public class EntityAnalyse {
             String body = EntityUtils.toString(entity);
             System.out.println(body);
             JSONObject jsonObject = JSONObject.parseObject(body);
-            if("1".equals(flag))
-            {
+            if ("1".equals(flag)) {
                 //身份证正面
                 distinguishView.setRecPerson(jsonObject.getJSONObject("身份证识别实体信息").getJSONObject("身份证人像面实体信息").getString("姓名"));
                 distinguishView.setRecPersonNo(jsonObject.getJSONObject("身份证识别实体信息").getJSONObject("身份证人像面实体信息").getString("身份证号"));
                 distinguishView.setRecPersonAddr(jsonObject.getJSONObject("身份证识别实体信息").getJSONObject("身份证人像面实体信息").getString("住址"));
                 distinguishView.setRecPersonBrithday(jsonObject.getJSONObject("身份证识别实体信息").getJSONObject("身份证人像面实体信息").getString("出生日期"));
-            }
-            else if("2".equals(flag))
-            {
+            } else if ("2".equals(flag)) {
                 //身份证反面
                 distinguishView.setIdCardValidity(jsonObject.getJSONObject("身份证识别实体信息").getJSONObject("身份证国徽面实体信息").getString("有效期限"));
             }
@@ -510,6 +552,7 @@ public class EntityAnalyse {
 
     /**
      * 营业执照识别
+     *
      * @param licenseImg
      * @return
      * @throws ServiceException
@@ -526,7 +569,7 @@ public class EntityAnalyse {
         //根据API的要求,定义相对应的Content-Type
         headers.put("Content-Type", "application/json; charset=UTF-8");
         Map<String, String> querys = new HashMap<String, String>();
-        String bodys = "{\"image\":\""+licenseImg+"\"}";
+        String bodys = "{\"image\":\"" + licenseImg + "\"}";
         //阿里云APPCODE
         DistinguishView distinguishView = new DistinguishView();
         try {
@@ -556,6 +599,7 @@ public class EntityAnalyse {
 
     /**
      * 驾驶证识别
+     *
      * @param image
      * @return
      * @throws ServiceException
@@ -573,7 +617,7 @@ public class EntityAnalyse {
         headers.put("Content-Type", "application/json; charset=UTF-8");
         Map<String, String> querys = new HashMap<String, String>();
         String bodys = "";
-        bodys = "{\"image\":\""+image+"\", \"configure\": {\"side\":\"face\"}}";
+        bodys = "{\"image\":\"" + image + "\", \"configure\": {\"side\":\"face\"}}";
 
         //阿里云APPCODE
         DistinguishView distinguishView = new DistinguishView();
@@ -593,7 +637,7 @@ public class EntityAnalyse {
             JSONObject jsonObject = JSONObject.parseObject(body);
             distinguishView.setDriverEndDate(jsonObject.getString("end_date"));
             String s = jsonObject.getString("vehicle_type");
-            if (s == "A2" || s == "B2"){
+            if (s == "A2" || s == "B2") {
                 distinguishView.setAllowCar(s);
             }
             distinguishView.setIssuingAuthority(jsonObject.getString("issue_organization"));
@@ -606,11 +650,12 @@ public class EntityAnalyse {
 
     /**
      * 行驶证识别
+     *
      * @param image
      * @return
      * @throws ServiceException
      */
-    public static DistinguishView driveringLicenseShibie(String image,String flag) throws ServiceException {
+    public static DistinguishView driveringLicenseShibie(String image, String flag) throws ServiceException {
 
         String host = "https://dm-53.data.aliyun.com";
         String path = "/rest/160601/ocr/ocr_vehicle.json";
@@ -624,12 +669,12 @@ public class EntityAnalyse {
         Map<String, String> querys = new HashMap<String, String>();
         String bodys = "";
         //正面
-        if ("1".equals(flag)){
-            bodys = "{\"image\":\""+image+"\", \"configure\": {\"side\":\"face\"}}";
+        if ("1".equals(flag)) {
+            bodys = "{\"image\":\"" + image + "\", \"configure\": {\"side\":\"face\"}}";
         }
         //反面
         else {
-            bodys = "{\"image\":\""+image+"\", \"configure\": {\"side\":\"back\"}}";
+            bodys = "{\"image\":\"" + image + "\", \"configure\": {\"side\":\"back\"}}";
         }
 
         //阿里云APPCODE
@@ -648,26 +693,26 @@ public class EntityAnalyse {
             String body = EntityUtils.toString(response.getEntity());
             System.out.println(body);
             JSONObject jsonObject = JSONObject.parseObject(body);
-            if("1".equals(flag)){
+            if ("1".equals(flag)) {
                 distinguishView.setCarNum(jsonObject.getString("plate_num"));
                 distinguishView.setOwner(jsonObject.getString("owner"));
                 String s = jsonObject.getString("register_date");
-                String s1 = s.substring(0,4);
-                String s2 = s.substring(4,6);
-                String s3 = s.substring(6,8);
+                String s1 = s.substring(0, 4);
+                String s2 = s.substring(4, 6);
+                String s3 = s.substring(6, 8);
                 distinguishView.setLicenseRegistrationDate(s1 + "-" + s2 + "-" + s3);
                 String t = jsonObject.getString("issue_date");
-                String t1 = t.substring(0,4);
-                String t2 = t.substring(4,6);
-                String t3 = t.substring(6,8);
+                String t1 = t.substring(0, 4);
+                String t2 = t.substring(4, 6);
+                String t3 = t.substring(6, 8);
                 distinguishView.setLicenseIssueDate(t1 + "-" + t2 + "-" + t3);
                 distinguishView.setLssuingAuthority(jsonObject.getString("issue_organization"));
                 distinguishView.setVehicleType(jsonObject.getString("vehicle_type"));
                 distinguishView.setCarCode(jsonObject.getString("vin"));
-            }else {
+            } else {
                 String s = jsonObject.getString("inspection_record");
-                String s3 = s.substring(6,13);
-                String s1 = s3.replace("年","-");
+                String s3 = s.substring(6, 13);
+                String s1 = s3.replace("年", "-");
                 distinguishView.setDriveringEndDate(s1 + "-01");
                 distinguishView.setDriveringNum(jsonObject.getString("file_no"));
                 distinguishView.setSize(jsonObject.getString("overall_dimension"));
@@ -684,6 +729,7 @@ public class EntityAnalyse {
 
     /**
      * 道路运输证证识别
+     *
      * @param image
      * @return
      * @throws ServiceException
@@ -722,9 +768,9 @@ public class EntityAnalyse {
             JSONObject jsonObject = JSONObject.parseObject(body);
             distinguishView.setTranNumber(jsonObject.getJSONObject("道路运输经营许可证实体信息").getString("道路运输经营许可证编号"));
             String s = jsonObject.getJSONObject("道路运输经营许可证实体信息").getString("有效期限至");
-            String s1 = s.replace("年","-");
-            String s2 = s1.replace("月","-");
-            String s3 = s2.replace("日","-");
+            String s1 = s.replace("年", "-");
+            String s2 = s1.replace("月", "-");
+            String s3 = s2.replace("日", "-");
             distinguishView.setTranEndDate(s3);
             return distinguishView;
         } catch (Exception e) {
@@ -735,6 +781,7 @@ public class EntityAnalyse {
 
     /**
      * 从业资格证识别
+     *
      * @param image
      * @return
      * @throws ServiceException
@@ -777,7 +824,7 @@ public class EntityAnalyse {
         } catch (Exception e) {
             e.printStackTrace();
         }
-        if(distinguishView.getQualificationCertificate() == null || distinguishView.getQualificationCertificate().isEmpty()){
+        if (distinguishView.getQualificationCertificate() == null || distinguishView.getQualificationCertificate().isEmpty()) {
             String host1 = "https://dlyzcy.market.alicloudapi.com";
             String path1 = "/ai_ocr/dao_lu_xin_ban_new/v1";
             Map<String, String> headers1 = new HashMap<String, String>();
@@ -812,8 +859,7 @@ public class EntityAnalyse {
             } catch (Exception e) {
                 e.printStackTrace();
             }
-        }
-        else{
+        } else {
             return distinguishView;
         }
         return null;
@@ -821,11 +867,12 @@ public class EntityAnalyse {
 
     /**
      * 银行卡三要素识别
+     *
      * @param
      * @return
      * @throws ServiceException
      */
-    public static DistinguishView bankCradShibie(String name,String idCard,String accountNo) throws ServiceException {
+    public static DistinguishView bankCradShibie(String name, String idCard, String accountNo) throws ServiceException {
 
         String host = "https://bcard3and4.market.alicloudapi.com";
         String path = "/bank3CheckNew";
@@ -833,7 +880,7 @@ public class EntityAnalyse {
         //阿里云APPCODE
         DistinguishView distinguishView = new DistinguishView();
         try {
-            String urlSend = host + path + "?idCard=" + idCard + "&name="+ URLEncoder.encode(name, "UTF-8") + "&accountNo="+ accountNo;  //
+            String urlSend = host + path + "?idCard=" + idCard + "&name=" + URLEncoder.encode(name, "UTF-8") + "&accountNo=" + accountNo;  //
             URL url = new URL(urlSend);
             HttpURLConnection httpURLCon = (HttpURLConnection) url.openConnection();
             httpURLCon.setRequestProperty("Authorization", "APPCODE " + appcode);// 格式Authorization:APPCODE (中间是英文空格)
@@ -865,44 +912,110 @@ public class EntityAnalyse {
         br.close();
         return sb.toString();
     }
+
     /**
      * url资源转化为file流
+     *
      * @param url
      * @return
      */
     public static File urlToFile(URL url) {
-        InputStream is = null;
-        File file = null;
-        FileOutputStream fos = null;
+        return writeImageToDisk(getImageFromNetByUrl(url));
+//        InputStream is = null;
+//        File file = null;
+//        FileOutputStream fos = null;
+//        try {
+//            String tmp = "templates" + File.separator + "tmp.jpg";
+//            file = new File( new String(tmp.getBytes(StandardCharsets.UTF_8), StandardCharsets.UTF_8));
+////            file = File.createTempFile("tmp", null);
+//            URLConnection urlConn = null;
+//            urlConn = url.openConnection();
+//            is = urlConn.getInputStream();
+//            fos = new FileOutputStream(file);
+//            byte[] buffer = new byte[4096];
+//            int length;
+//            while ((length = is.read(buffer)) > 0) {
+//                fos.write(buffer, 0, length);
+//            }
+//            return file;
+//        } catch (IOException e) {
+//            return null;
+//        } finally {
+//            if (is != null) {
+//                try {
+//                    is.close();
+//                } catch (IOException e) {
+//                }
+//            }
+//            if (fos != null) {
+//                try {
+//                    fos.close();
+//                } catch (IOException e) {
+//                }
+//            }
+//        }
+    }
+
+    /**
+     * 将获取的字节数组保存为文件写入硬盘
+     *
+     * @param data
+     */
+    public static File writeImageToDisk(byte[] data) {
         try {
-            String tmp = "templates" + File.separator + "tmp.jpg";
-            file = new File( new String(tmp.getBytes(StandardCharsets.UTF_8), StandardCharsets.UTF_8));
-//            file = File.createTempFile("tmp", null);
-            URLConnection urlConn = null;
-            urlConn = url.openConnection();
-            is = urlConn.getInputStream();
-            fos = new FileOutputStream(file);
-            byte[] buffer = new byte[4096];
-            int length;
-            while ((length = is.read(buffer)) > 0) {
-                fos.write(buffer, 0, length);
+            File file = new File("templates" + File.separator + "tmp.jpg"); // 本地目录
+            File fileParent = file.getParentFile();
+            if (!fileParent.exists()) {
+                fileParent.mkdirs();
+                file.createNewFile();
             }
+            FileOutputStream fops = new FileOutputStream(file);
+            fops.write(data);
+            fops.flush();
+            fops.close();
             return file;
-        } catch (IOException e) {
-            return null;
-        } finally {
-            if (is != null) {
-                try {
-                    is.close();
-                } catch (IOException e) {
-                }
-            }
-            if (fos != null) {
-                try {
-                    fos.close();
-                } catch (IOException e) {
-                }
-            }
+        } catch (Exception e) {
+            e.printStackTrace();
         }
+        return null;
     }
+
+
+    /**
+     * 获取远程http地址视图片
+     *
+     * @return
+     */
+    public static byte[] getImageFromNetByUrl(URL url) {
+        try {
+            HttpURLConnection conn = (HttpURLConnection) url.openConnection();
+            conn.setRequestMethod("GET");
+            conn.setConnectTimeout(5 * 1000);
+            InputStream inStream = conn.getInputStream();
+            byte[] btData = readInputStream(inStream);
+            return btData;
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return null;
+    }
+
+    /**
+     * 读取流
+     *
+     * @param inStream
+     * @return
+     * @throws Exception
+     */
+    public static byte[] readInputStream(InputStream inStream) throws Exception {
+        ByteArrayOutputStream outStream = new ByteArrayOutputStream();
+        byte[] buffer = new byte[1024];
+        int len = 0;
+        while ((len = inStream.read(buffer)) != -1) {
+            outStream.write(buffer, 0, len);
+        }
+        inStream.close();
+        return outStream.toByteArray();
+    }
+
 }

+ 1 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/resources/mapper/DriverCarInfoMapper.xml

@@ -46,6 +46,7 @@
         c.car_type as carType,
         c.car_category as carCategory,
         c.car_number as carNumber,
+        c.car_number_colour as carNumberColour,
         c.gua_car_number as guaCarNumber,
         c.driving_license_home_page as drivingLicenseHomePage,
         c.driving_license_back_page as drivingLicenseBackPage,

+ 2 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/resources/mapper/HyCargoOwnerCapitalInfoMapper.xml

@@ -35,6 +35,8 @@
         amount_money as amountMoney,
         order_id as orderId,
         order_no as orderNo,
+        status_key as statusKey,
+        status,
         create_date as createDate
         FROM hy_cargo_owner_capital_info
         WHERE