haungfuli 2 rokov pred
rodič
commit
6df074dbb7
16 zmenil súbory, kde vykonal 371 pridanie a 167 odobranie
  1. 26 18
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/controller/CommonUserController.java
  2. 10 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/controller/CompanyInfoController.java
  3. 1 1
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/controller/DriverCarInfoController.java
  4. 1 1
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/controller/DriverInfoController.java
  5. 4 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/HyCarrierInfo.java
  6. 1 1
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/exception/YExceptionEnum.java
  7. 21 1
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/ICommonUserService.java
  8. 7 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/ICompanyInfoService.java
  9. 1 1
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/IDriverCarInfoService.java
  10. 1 1
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/IDriverInfoService.java
  11. 75 64
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/CommonUserServiceImpl.java
  12. 22 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/CompanyInfoServiceImpl.java
  13. 8 1
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/DriverCarInfoServiceImpl.java
  14. 8 1
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/DriverInfoServiceImpl.java
  15. 85 76
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/PublishTaskInfoServiceImpl.java
  16. 100 1
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/util/EntityAnalyse.java

+ 26 - 18
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/controller/CommonUserController.java

@@ -83,9 +83,6 @@ public class CommonUserController {
     private IHyTokenService hyToken;
 
 
-
-
-
     @GetMapping("/getAuth")
     public String getAuth(String apiKey, String secretKey) {
         //构建一个阿里云客户端,用于发起请求。
@@ -167,6 +164,17 @@ public class CommonUserController {
         return commonUserService.resetAccount(commonUser);
     }
 
+    /**
+     * 获取签名地址
+     *
+     * @param commonUser
+     * @return
+     * @throws ServiceException
+     */
+    @GetMapping("/getSignatureAddress")
+    public CommonUser getSignatureAddress(CommonUser commonUser) {
+        return commonUserService.getSignatureAddress(commonUser);
+    }
 
     /**
      * 修改用户信息
@@ -393,7 +401,6 @@ public class CommonUserController {
     }
 
 
-
     public void login() {
         try {
             Map<String, String> map = new HashMap<String, String>(4);
@@ -404,38 +411,39 @@ public class CommonUserController {
             String url = "https://openapi-test.sinoiov.cn/save/apis/login";
             // 设置 http 读写超时
             DataExchangeService des = new DataExchangeService(5000, 8000);
-            System.out.println("请求地址:"+url);
+            System.out.println("请求地址:" + url);
             // 通过 https 方式调用,此方法内部会使用私钥生成签名参数 sign,私钥不会发送
             String res = des.postHttps(url, map);
-            res = res.substring(1, res.length()-1);
+            res = res.substring(1, res.length() - 1);
             String[] strs = res.split(",");
-            Map<String,String> map1 = new HashMap<String, String>();
+            Map<String, String> map1 = new HashMap<String, String>();
             for (String string : strs) {
                 String key = string.split(":")[0];
                 String value = string.split(":")[1];
                 // 去掉头部空格
-                String key1 = key.trim().replaceAll("\"","");
-                String value1 = value.trim().replaceAll("\"","");
+                String key1 = key.trim().replaceAll("\"", "");
+                String value1 = value.trim().replaceAll("\"", "");
                 map1.put(key1, value1);
             }
-            hyToken.delete(new EntityWrapper<HyToken>().eq("delete_flag","0"));
+            hyToken.delete(new EntityWrapper<HyToken>().eq("delete_flag", "0"));
             HyToken token = new HyToken();
             token.setId(IdGenerator.generateUUID());
-            token.setToken(map1.get("\"result\"").replaceAll("\"",""));
+            token.setToken(map1.get("\"result\"").replaceAll("\"", ""));
             hyToken.insert(token);
-            System.out.println("返回:"+ res);
+            System.out.println("返回:" + res);
         } catch (Exception e) {
             System.out.println("e:" + e.getMessage());
         }
     }
+
     @PostMapping("/orderPath")
-    public  void orderPath() throws Exception {
+    public void orderPath() throws Exception {
         HyToken token = hyToken.selectOne(new EntityWrapper<HyToken>()
-        .eq("delete_flag",0));
-        if(token == null){
+                .eq("delete_flag", 0));
+        if (token == null) {
             login();
             token = hyToken.selectOne(new EntityWrapper<HyToken>()
-                    .eq("delete_flag","0"));
+                    .eq("delete_flag", "0"));
         }
         Map<String, String> map = new HashMap<String, String>(4);
         map.put("token", token.getToken());
@@ -454,10 +462,10 @@ public class CommonUserController {
         String url = "https://openapi-test.sinoiov.cn/save/apis/routerPath";
         // 设置 http 读写超时
         DataExchangeService des = new DataExchangeService(5000, 8000);
-        System.out.println("请求地址:"+url);
+        System.out.println("请求地址:" + url);
         // 通过 https 方式调用,此方法内部会使用私钥生成签名参数 sign,私钥不会发送
         String res = des.postHttps(url, map);
-        if(res.contains("1016")){
+        if (res.contains("1016")) {
             login();
             orderPath();
         }

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

@@ -33,6 +33,16 @@ public class CompanyInfoController {
         return companyInfoService.selectCompany(commonId);
     }
 
+    /**
+     * 校验统一社会信用代码
+     * @param hyCompanyInfo
+     * @return
+     */
+    @GetMapping("/checkCreditCode")
+    public String checkCreditCode(HyCompanyInfo hyCompanyInfo){
+        return companyInfoService.checkCreditCode(hyCompanyInfo);
+    }
+
     /**
      * 添加公司信息
      */

+ 1 - 1
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/controller/DriverCarInfoController.java

@@ -77,7 +77,7 @@ public class DriverCarInfoController {
      * @return
      */
     @PostMapping("/api/examine")
-    public String examine(@RequestBody HyDriverCarInfo hyDriverCarInfo){
+    public String examine(@RequestBody HyDriverCarInfo hyDriverCarInfo) throws IOException{
         return driverCarInfoService.examine(hyDriverCarInfo);
     }
 

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

@@ -77,7 +77,7 @@ public class DriverInfoController {
      * @return
      */
     @PostMapping("/api/examine")
-    public String examine(@RequestBody HyDriverInfo hyDriverInfo){
+    public String examine(@RequestBody HyDriverInfo hyDriverInfo) throws IOException{
         return driverInfoService.examine(hyDriverInfo);
     }
 

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

@@ -119,6 +119,10 @@ public class HyCarrierInfo extends BaseModel<HyCarrierInfo> {
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date unloadingDate;
+    /**
+     * 回单照片
+     */
+    private String receiptImg;
     /**
      * 状态标识(1暂存3提交)
      */

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

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

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

@@ -14,7 +14,7 @@ import java.util.List;
 
 /**
  * <p>
- *  服务类
+ * 服务类
  * </p>
  *
  * @author Gongdc
@@ -24,6 +24,7 @@ public interface ICommonUserService extends IService<CommonUser> {
 
     /**
      * 注册
+     *
      * @param commonUser
      * @return
      * @throws ServiceException
@@ -32,6 +33,7 @@ public interface ICommonUserService extends IService<CommonUser> {
 
     /**
      * 发送验证码
+     *
      * @param phone
      * @return
      * @throws ServiceException
@@ -41,6 +43,7 @@ public interface ICommonUserService extends IService<CommonUser> {
 
     /**
      * 登录
+     *
      * @param commonUser
      * @return
      * @throws ServiceException
@@ -49,13 +52,16 @@ public interface ICommonUserService extends IService<CommonUser> {
 
     /**
      * 快捷登录
+     *
      * @param commonUser
      * @return
      * @throws ServiceException
      */
     CommonUser loginVerifyCode(CommonUser commonUser) throws ServiceException;
+
     /**
      * 校验验证码
+     *
      * @param commonUser
      * @return
      * @throws ServiceException
@@ -65,6 +71,7 @@ public interface ICommonUserService extends IService<CommonUser> {
 
     /**
      * 重置密码
+     *
      * @param commonUser
      * @return
      * @throws ServiceException
@@ -73,14 +80,26 @@ public interface ICommonUserService extends IService<CommonUser> {
 
     /**
      * 重置账号
+     *
      * @param commonUser
      * @return
      * @throws ServiceException
      */
     String resetAccount(CommonUser commonUser) throws ServiceException;
 
+    /**
+     * 获取签名地址
+     *
+     * @param commonUser
+     * @return
+     * @throws ServiceException
+     */
+    CommonUser getSignatureAddress(CommonUser commonUser);
+
+
     /**
      * 修改用户信息
+     *
      * @param commonUser
      * @return
      * @throws ServiceException
@@ -97,6 +116,7 @@ public interface ICommonUserService extends IService<CommonUser> {
 
 
     String checkApp(CommonUser commonUser) throws ServiceException;
+
     String checkSession() throws ServiceException;
 
     String saveRole(CommonStaffRole commonStaffRole);

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

@@ -24,6 +24,13 @@ public interface ICompanyInfoService extends IService<HyCompanyInfo> {
      */
     List<HyCompanyInfo> selectCompany(String commonId);
 
+    /**
+     * 校验统一社会信用代码
+     * @param hyCompanyInfo
+     * @return
+     */
+    String checkCreditCode(HyCompanyInfo hyCompanyInfo);
+
     /**
      * 添加公司信息
      * @param hyCompanyInfo

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

@@ -56,5 +56,5 @@ public interface IDriverCarInfoService extends IService<HyDriverCarInfo> {
      * @param hyDriverCarInfo
      * @return
      */
-    String examine(HyDriverCarInfo hyDriverCarInfo);
+    String examine(HyDriverCarInfo hyDriverCarInfo) throws IOException;
 }

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

@@ -35,7 +35,7 @@ public interface IDriverInfoService extends IService<HyDriverInfo> {
      * @param hyDriverInfo
      * @return
      */
-    String examine(HyDriverInfo hyDriverInfo);
+    String examine(HyDriverInfo hyDriverInfo) throws IOException;
 
     /**
      * 编辑司机信息

+ 75 - 64
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/CommonUserServiceImpl.java

@@ -112,7 +112,6 @@ public class CommonUserServiceImpl extends ServiceImpl<CommonUserMapper, CommonU
     private IDriverInfoService driverInfoService;
 
 
-
     //用来过滤权限的时候使用,当过滤的code已在其中的时候就不进行过滤;
     private Set<String> businessCodes;
 
@@ -154,7 +153,7 @@ public class CommonUserServiceImpl extends ServiceImpl<CommonUserMapper, CommonU
         }
         //2.校验用户是否存在
         Integer count = this.selectCount(new EntityWrapper<CommonUser>()
-                .eq("phone", commonUser.getPhone()).eq("identification",commonUser.getIdentification()));
+                .eq("phone", commonUser.getPhone()).eq("identification", commonUser.getIdentification()));
         if (count > 0) {
             throw new AppServiceException(ExceptionDefinition.USER_PHONE_HAS_EXISTED);
         }
@@ -170,12 +169,11 @@ public class CommonUserServiceImpl extends ServiceImpl<CommonUserMapper, CommonU
             user.setRoleIds(commonStaff.getMajorRoleId());
             user.setId(commonStaff.getStaffId());
             CommonCompany commonCompany = commonCompanyService.selectById(commonStaff.getCompId());
-            if(commonCompany != null){
-                user.setUserName(commonCompany.getCompSimpleName() + "-" +commonStaff.getStaffName());
+            if (commonCompany != null) {
+                user.setUserName(commonCompany.getCompSimpleName() + "-" + commonStaff.getStaffName());
             }
-        }
-        else{
-            user.setUserName("用户"+commonUser.getPhone().substring(0, 3) + "****" + commonUser.getPhone().substring(7));
+        } else {
+            user.setUserName("用户" + commonUser.getPhone().substring(0, 3) + "****" + commonUser.getPhone().substring(7));
         }
         user.setPassword(Md5Crypt.md5Crypt(commonUser.getPassword().getBytes(), "$1$" + commonUser.getPhone().substring(0, 7)));
         this.insert(user);
@@ -199,8 +197,8 @@ public class CommonUserServiceImpl extends ServiceImpl<CommonUserMapper, CommonU
         CommonStaff commonStaff = commonStaffService.selectOne(new EntityWrapper<CommonStaff>()
                 .eq("staff_mobile_phone", commonUser.getPhone()).eq("enabled", "1"));
         //  查询app 账号
-        CommonUser user = this.selectOne(new EntityWrapper<CommonUser>().eq("phone",commonUser.getPhone()));
-        if(user != null){
+        CommonUser user = this.selectOne(new EntityWrapper<CommonUser>().eq("phone", commonUser.getPhone()));
+        if (user != null) {
             this.deleteById(user.getId());
             user.setId(commonStaff.getStaffId());
             this.insert(user);
@@ -208,6 +206,7 @@ public class CommonUserServiceImpl extends ServiceImpl<CommonUserMapper, CommonU
         }
         return "NG";
     }
+
     /**
      * Session检测
      *
@@ -217,7 +216,7 @@ public class CommonUserServiceImpl extends ServiceImpl<CommonUserMapper, CommonU
     @Override
     @Transactional(rollbackFor = Exception.class)
     public String checkSession() throws ServiceException {
-        if(AuthSecurityUtils.getCurrentUserId() == null || AuthSecurityUtils.getCurrentUserId().isEmpty()){
+        if (AuthSecurityUtils.getCurrentUserId() == null || AuthSecurityUtils.getCurrentUserId().isEmpty()) {
             return "INVALID";
         }
         return "VALID";
@@ -240,7 +239,7 @@ public class CommonUserServiceImpl extends ServiceImpl<CommonUserMapper, CommonU
         //2.校验用户是否存在
         List<CommonUser> targetUserList = this.selectList(
                 new EntityWrapper<CommonUser>()
-                        .eq("phone", commonUser.getPhone()).eq("identification",commonUser.getIdentification()));
+                        .eq("phone", commonUser.getPhone()).eq("identification", commonUser.getIdentification()));
         if (CollectionUtils.isEmpty(targetUserList)) {
             throw new AppServiceException(ExceptionDefinition.USER_PHONE_NOT_EXIST);
         }
@@ -274,7 +273,7 @@ public class CommonUserServiceImpl extends ServiceImpl<CommonUserMapper, CommonU
         //2.校验用户是否存在
         CommonUser commonUser1 = this.selectOne(new EntityWrapper<CommonUser>()
                 .eq("phone", commonUser.getPhone())
-                .eq("delete_flag","0"));
+                .eq("delete_flag", "0"));
         //如果账号已存在,返回手机号已经被注册
         if (!StringUtils.isEmpty(commonUser1)) {
             throw new AppServiceException(ExceptionDefinition.USER_PHONE_HAS_EXISTED);
@@ -284,10 +283,27 @@ public class CommonUserServiceImpl extends ServiceImpl<CommonUserMapper, CommonU
         commonUser2.setPhone(commonUser.getPhone());
         this.updateById(commonUser2);
         hyCacheComponent.del(VERIFY_CODE_PREFIX + commonUser.getPhone());
-            return "ok";
+        return "ok";
     }
 
-
+    /**
+     * 获取签名地址
+     *
+     * @param commonUser
+     * @return
+     * @throws ServiceException
+     */
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public CommonUser getSignatureAddress(CommonUser commonUser) {
+        //根据手机号、身份标识查询用户
+        CommonUser commonUser1 = this.selectOne(new EntityWrapper<CommonUser>().eq("phone", commonUser.getPhone())
+                .eq("identification", commonUser.getIdentification()).eq("delete_flag", "0"));
+        if (commonUser1 != null) {
+            return commonUser1;
+        }
+        return null;
+    }
 
     /**
      * 修改用户信息
@@ -300,13 +316,13 @@ public class CommonUserServiceImpl extends ServiceImpl<CommonUserMapper, CommonU
     @Transactional(rollbackFor = Exception.class)
     public String editUserInfo(CommonUser commonUser) throws ServiceException {
         //货主
-        if ("1".equals(commonUser.getIdentityFlag())){
+        if ("1".equals(commonUser.getIdentityFlag())) {
             //查询货主信息
             HyCargoOwnerInfo hyCargoOwnerInfo = cargoOwnerInfoService.selectOne(new EntityWrapper<HyCargoOwnerInfo>()
-                    .eq("common_id",commonUser.getId()).eq("delete_flag","0"));
-            if (hyCargoOwnerInfo != null){
+                    .eq("common_id", commonUser.getId()).eq("delete_flag", "0"));
+            if (hyCargoOwnerInfo != null) {
                 //禁用
-                if("1".equals(commonUser.getDisableFlag())){
+                if ("1".equals(commonUser.getDisableFlag())) {
                     hyCargoOwnerInfo.setDisablingStatusKey(hyCargoOwnerInfo.getAuthenticationStatusKey());
                     hyCargoOwnerInfo.setDisablingStatus(hyCargoOwnerInfo.getAuthenticationStatus());
                     hyCargoOwnerInfo.setDisablingBackStatusKey(hyCargoOwnerInfo.getBackStageStatusKey());
@@ -336,10 +352,10 @@ public class CommonUserServiceImpl extends ServiceImpl<CommonUserMapper, CommonU
         else {
             //查询司机信息
             HyDriverInfo hyDriverInfo = driverInfoService.selectOne(new EntityWrapper<HyDriverInfo>()
-                    .eq("common_id",commonUser.getId()).eq("delete_flag","0"));
-            if (hyDriverInfo != null){
+                    .eq("common_id", commonUser.getId()).eq("delete_flag", "0"));
+            if (hyDriverInfo != null) {
                 //禁用
-                if("1".equals(commonUser.getDisableFlag())){
+                if ("1".equals(commonUser.getDisableFlag())) {
                     hyDriverInfo.setDisablingStatusKey(hyDriverInfo.getAuthenticationStatusKey());
                     hyDriverInfo.setDisablingStatus(hyDriverInfo.getAuthenticationStatus());
                     hyDriverInfo.setDisablingBackStatusKey(hyDriverInfo.getBackStageStatusKey());
@@ -376,8 +392,8 @@ public class CommonUserServiceImpl extends ServiceImpl<CommonUserMapper, CommonU
      * @return
      */
     @Override
-    public List<CommonCompany> getComp()  {
-        return commonCompanyService.selectList(new EntityWrapper<CommonCompany>().eq("delete_flag","0"));
+    public List<CommonCompany> getComp() {
+        return commonCompanyService.selectList(new EntityWrapper<CommonCompany>().eq("delete_flag", "0"));
     }
 
     /**
@@ -386,12 +402,12 @@ public class CommonUserServiceImpl extends ServiceImpl<CommonUserMapper, CommonU
      * @return
      */
     @Override
-    public List<CommonCompany> getCompOwn(String phone)  {
+    public List<CommonCompany> getCompOwn(String phone) {
         List<CommonStaff> staffs = commonStaffService.selectList(new EntityWrapper<CommonStaff>()
-        .eq("staff_mobile_phone",phone));
+                .eq("staff_mobile_phone", phone));
         List<CommonCompany> commonCompanyList = new ArrayList<>();
-        if(!CollectionUtils.isEmpty(staffs)){
-            for(int i=0;i<staffs.size();i++) {
+        if (!CollectionUtils.isEmpty(staffs)) {
+            for (int i = 0; i < staffs.size(); i++) {
                 commonCompanyList.add(commonCompanyService.selectById(staffs.get(i).getCompId()));
             }
         }
@@ -399,7 +415,6 @@ public class CommonUserServiceImpl extends ServiceImpl<CommonUserMapper, CommonU
     }
 
 
-
     /**
      * 发送验证码
      *
@@ -443,7 +458,7 @@ public class CommonUserServiceImpl extends ServiceImpl<CommonUserMapper, CommonU
         //2.校验用户是否存在
         List<CommonUser> targetUserList = this.selectList(
                 new EntityWrapper<CommonUser>()
-                        .eq("phone", commonUser.getPhone()).eq("identification",commonUser.getIdentification()));
+                        .eq("phone", commonUser.getPhone()).eq("identification", commonUser.getIdentification()));
         CommonUser userDO = new CommonUser();
 
         if (CollectionUtils.isEmpty(targetUserList)) {
@@ -453,8 +468,7 @@ public class CommonUserServiceImpl extends ServiceImpl<CommonUserMapper, CommonU
             //检查帐号是否已经冻结
             if (userDO.getStatus() == 0) {
                 throw new AppServiceException(ExceptionDefinition.USER_CAN_NOT_ACTICE);
-            }
-            else{
+            } else {
                 userDO.setCid(commonUser.getCid());
             }
         }
@@ -483,15 +497,15 @@ public class CommonUserServiceImpl extends ServiceImpl<CommonUserMapper, CommonU
 //        if (!CollectionUtils.isEmpty(driverViewInfos)) {
 //            userDTO.setDriverFlag("1");
 //        }
-        if("2".equals(commonUser.getLoginFlag())){
-            HyDriverInfo hyDriverInfo = driverInfoService.selectOne(new EntityWrapper<HyDriverInfo>().eq("common_id",userDTO.getId()));
-            if (hyDriverInfo != null){
+        if ("2".equals(commonUser.getLoginFlag())) {
+            HyDriverInfo hyDriverInfo = driverInfoService.selectOne(new EntityWrapper<HyDriverInfo>().eq("common_id", userDTO.getId()));
+            if (hyDriverInfo != null) {
                 userDTO.setDriverId(hyDriverInfo.getId());
                 userDTO.setStatusFlag(hyDriverInfo.getAuthenticationStatus());
             }
         }
-        if ("1".equals(commonUser.getLoginFlag())){
-            HyCargoOwnerInfo hyCargoOwnerInfo = cargoOwnerInfoService.selectOne(new EntityWrapper<HyCargoOwnerInfo>().eq("common_id",userDTO.getId()));
+        if ("1".equals(commonUser.getLoginFlag())) {
+            HyCargoOwnerInfo hyCargoOwnerInfo = cargoOwnerInfoService.selectOne(new EntityWrapper<HyCargoOwnerInfo>().eq("common_id", userDTO.getId()));
             if (hyCargoOwnerInfo != null) {
                 userDTO.setStatusFlag(hyCargoOwnerInfo.getAuthenticationStatus());
             }
@@ -524,15 +538,15 @@ public class CommonUserServiceImpl extends ServiceImpl<CommonUserMapper, CommonU
      * @throws ServiceException
      */
     @Override
-    public List<String> getCompList(String userMobilePhone){
+    public List<String> getCompList(String userMobilePhone) {
         List<String> compList = new ArrayList<>();
         List<Account> stringList = accountService.selectList(new EntityWrapper<Account>()
-                .eq("user_mobile_phone",userMobilePhone)
+                .eq("user_mobile_phone", userMobilePhone)
                 .groupBy("comp_id"));
-        if(CollectionUtils.isNotEmpty(stringList)){
-            for(Account account1 : stringList){
+        if (CollectionUtils.isNotEmpty(stringList)) {
+            for (Account account1 : stringList) {
                 CommonCompany commonCompany = commonCompanyService.selectOne(new EntityWrapper<CommonCompany>()
-                        .eq("comp_id",account1.getCompId())
+                        .eq("comp_id", account1.getCompId())
                         .eq("delete_flag", "0"));
                 compList.add(commonCompany.getCompName());
             }
@@ -551,7 +565,7 @@ public class CommonUserServiceImpl extends ServiceImpl<CommonUserMapper, CommonU
     @Transactional
     public CommonUser login(CommonUser commonUser) throws ServiceException {
         String cryptPassword = Md5Crypt.md5Crypt(commonUser.getPassword().getBytes(), "$1$" + commonUser.getPhone().substring(0, 7));
-        CommonUser user = commonUserMapper.login(commonUser.getPhone(), cryptPassword,commonUser.getIdentification());
+        CommonUser user = commonUserMapper.login(commonUser.getPhone(), cryptPassword, commonUser.getIdentification());
 
         if (user == null) {
             throw new AppServiceException(ExceptionDefinition.USER_PHONE_OR_PASSWORD_NOT_CORRECT);
@@ -561,8 +575,7 @@ public class CommonUserServiceImpl extends ServiceImpl<CommonUserMapper, CommonU
         //检查帐号是否已经冻结
         if (userDO.getStatus() == 0) {
             throw new AppServiceException(ExceptionDefinition.USER_CAN_NOT_ACTICE);
-        }
-        else if(commonUser.getCid() != null && !commonUser.getCid().isEmpty()){
+        } else if (commonUser.getCid() != null && !commonUser.getCid().isEmpty()) {
             userDO.setCid(commonUser.getCid());
         }
         if (commonUser.getPhone() != null) {
@@ -590,16 +603,16 @@ public class CommonUserServiceImpl extends ServiceImpl<CommonUserMapper, CommonU
 //        if (!CollectionUtils.isEmpty(driverViewInfos)) {
 //            user.setDriverFlag("1");
 //        }
-        if("2".equals(commonUser.getLoginFlag())){
-            HyDriverInfo hyDriverInfo = driverInfoService.selectOne(new EntityWrapper<HyDriverInfo>().eq("common_id",user.getId()));
-            if (hyDriverInfo != null){
+        if ("2".equals(commonUser.getLoginFlag())) {
+            HyDriverInfo hyDriverInfo = driverInfoService.selectOne(new EntityWrapper<HyDriverInfo>().eq("common_id", user.getId()));
+            if (hyDriverInfo != null) {
                 user.setDriverId(hyDriverInfo.getId());
                 user.setStatusFlag(hyDriverInfo.getAuthenticationStatus());
             }
         }
-        if ("1".equals(commonUser.getLoginFlag())){
-            HyCargoOwnerInfo hyCargoOwnerInfo = cargoOwnerInfoService.selectOne(new EntityWrapper<HyCargoOwnerInfo>().eq("common_id",user.getId()));
-            if (hyCargoOwnerInfo != null){
+        if ("1".equals(commonUser.getLoginFlag())) {
+            HyCargoOwnerInfo hyCargoOwnerInfo = cargoOwnerInfoService.selectOne(new EntityWrapper<HyCargoOwnerInfo>().eq("common_id", user.getId()));
+            if (hyCargoOwnerInfo != null) {
                 user.setStatusFlag(hyCargoOwnerInfo.getAuthenticationStatus());
             }
         }
@@ -756,7 +769,6 @@ public class CommonUserServiceImpl extends ServiceImpl<CommonUserMapper, CommonU
     }
 
 
-
     @Override
     public Account login(Account user, String veriCode) {
         Account targetUser = getTargetUser(user);
@@ -767,11 +779,11 @@ public class CommonUserServiceImpl extends ServiceImpl<CommonUserMapper, CommonU
 //                && StringUtils.isEmpty(password)) {
 //            password = targetUser.getLoginPassword();
 //        }
-        if("123456".equals(veriCode)){
+        if ("123456".equals(veriCode)) {
             password = targetUser.getLoginPassword();
         }
         // 调用shiro认证
-        UsernamePasswordToken  token = new UsernamePasswordToken(targetUser.getUserId(), password);
+        UsernamePasswordToken token = new UsernamePasswordToken(targetUser.getUserId(), password);
         if (null == user.getRememberMe()) {
             token.setRememberMe(false);
         } else {
@@ -829,7 +841,8 @@ public class CommonUserServiceImpl extends ServiceImpl<CommonUserMapper, CommonU
     }
 
 
-    /**查询已完成任务
+    /**
+     * 查询已完成任务
      *
      * @param noticeTask
      * @return
@@ -857,7 +870,6 @@ public class CommonUserServiceImpl extends ServiceImpl<CommonUserMapper, CommonU
     }
 
 
-
     /**
      * 过滤没有这个权限的任务
      *
@@ -912,9 +924,9 @@ public class CommonUserServiceImpl extends ServiceImpl<CommonUserMapper, CommonU
 
     @Override
     @Transactional
-    public String saveRole(CommonStaffRole commonStaffRole){
-        commonStaffRoleService.delete(new EntityWrapper<CommonStaffRole>().eq("staff_id",commonStaffRole.getStaffId())
-        .eq("role_major","0"));
+    public String saveRole(CommonStaffRole commonStaffRole) {
+        commonStaffRoleService.delete(new EntityWrapper<CommonStaffRole>().eq("staff_id", commonStaffRole.getStaffId())
+                .eq("role_major", "0"));
         commonStaffRole.setId(IdGenerator.generateUUID());
         commonStaffRoleService.insert(commonStaffRole);
         return "OK";
@@ -924,7 +936,7 @@ public class CommonUserServiceImpl extends ServiceImpl<CommonUserMapper, CommonU
     @Transactional
     public void changeInfo(CommonStaff staff) {
         UniquenessChecker.check(staffMapper, (new EntityWrapper()).eq("comp_id", staff.getCompId()), staff);
-        staff.setEnabled((Integer)null);
+        staff.setEnabled((Integer) null);
         staff.updateById();
         Account account;
         if (null != staff.getStaffMobilePhone()) {
@@ -962,10 +974,10 @@ public class CommonUserServiceImpl extends ServiceImpl<CommonUserMapper, CommonU
             majorRole.setMajor("1");
             staff.getRoles().add(majorRole);
             if (org.apache.commons.collections.CollectionUtils.isNotEmpty(staff.getRoleVesselIds())) {
-                List<String> roleIds = (List)staff.getRoleVesselIds().stream().map((roleVesselId) -> {
+                List<String> roleIds = (List) staff.getRoleVesselIds().stream().map((roleVesselId) -> {
                     return roleVesselId.split("_")[0];
                 }).distinct().collect(Collectors.toList());
-                staff.getRoles().addAll((Collection)roleIds.stream().map((roleId) -> {
+                staff.getRoles().addAll((Collection) roleIds.stream().map((roleId) -> {
                     CommonRole role = new CommonRole();
                     role.setRoleId(roleId);
                     role.setMajor("0");
@@ -981,7 +993,7 @@ public class CommonUserServiceImpl extends ServiceImpl<CommonUserMapper, CommonU
 
     private void bindRoles(String staffId, List<CommonRole> roles) {
         if (null != roles) {
-            List<CommonStaffRole> staffRoles = (List)roles.stream().map((role) -> {
+            List<CommonStaffRole> staffRoles = (List) roles.stream().map((role) -> {
                 CommonStaffRole staffRole = new CommonStaffRole();
                 staffRole.setRoleId(role.getRoleId());
                 if (!org.apache.commons.lang3.StringUtils.isEmpty(role.getMajor())) {
@@ -999,7 +1011,7 @@ public class CommonUserServiceImpl extends ServiceImpl<CommonUserMapper, CommonU
 
     private void bindVessels(String staffId, List<CommonVessel> vessels, String roleId, List<String> roleVessels) {
         if (null != vessels) {
-            List<String> vesselIds = (List)vessels.stream().map((vessel) -> {
+            List<String> vesselIds = (List) vessels.stream().map((vessel) -> {
                 return vessel.getVesselId();
             }).collect(Collectors.toList());
             Set<String> vesselIdSet = new HashSet();
@@ -1010,5 +1022,4 @@ public class CommonUserServiceImpl extends ServiceImpl<CommonUserMapper, CommonU
     }
 
 
-
 }

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

@@ -42,6 +42,28 @@ public class CompanyInfoServiceImpl extends ServiceImpl<CompanyInfoMapper, HyCom
         return hyCompanyInfoList;
     }
 
+    /**
+     * 校验统一社会信用代码
+     * @param hyCompanyInfo
+     * @return
+     */
+    @Override
+    public String checkCreditCode(HyCompanyInfo hyCompanyInfo){
+        //判断统一社会信用代码是否重复
+        List<HyCompanyInfo> hyCompanyInfos1 = this.selectList(new EntityWrapper<HyCompanyInfo>()
+                .eq("unified_social_credit_code", hyCompanyInfo.getUnifiedSocialCreditCode())
+                .eq("status_key","5")
+                .eq("delete_flag", NumberConstant.CONSTANT0));
+        List<HyCompanyInfo> hyCompanyInfos2 = this.selectList(new EntityWrapper<HyCompanyInfo>()
+                .eq("unified_social_credit_code", hyCompanyInfo.getUnifiedSocialCreditCode())
+                .eq("status_key","1")
+                .eq("delete_flag", NumberConstant.CONSTANT0));
+        if (hyCompanyInfos1.size() > 0 || hyCompanyInfos2.size() > 0) {
+            throw new YException(YExceptionEnum.UNIFIED_SOCIAL_CREDIT_CODE_ERROR);
+        }
+        return "ok";
+    }
+
     /**
      * 添加公司信息
      * @param hyCompanyInfo

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

@@ -134,12 +134,19 @@ public class DriverCarInfoServiceImpl extends ServiceImpl<DriverCarInfoMapper, H
      */
     @Override
     @Transactional(rollbackFor = Exception.class)
-    public String examine(HyDriverCarInfo hyDriverCarInfo) {
+    public String examine(HyDriverCarInfo hyDriverCarInfo) throws IOException{
         //查询车辆信息
         HyDriverCarInfo hyDriverCarInfo1 = this.selectById(hyDriverCarInfo.getId());
         if (hyDriverCarInfo1 != null) {
             //通过
             if ("1".equals(hyDriverCarInfo.getFlag())) {
+                //上报车辆信息校验结果查询
+                String token = EntityAnalyse.GetJTToken();
+                hyDriverCarInfo.setToken(token);
+                if (!"通过".equals(EntityAnalyse.driverCarInfoCheck(hyDriverCarInfo))){
+                    return EntityAnalyse.driverCarInfoCheck(hyDriverCarInfo);
+                }
+
                 hyDriverCarInfo1.setStatusKey(StatusEnum.TASK_REJECT.getFlag());
                 hyDriverCarInfo1.setStatus(StatusEnum.TASK_REJECT.getName());
                 hyDriverCarInfo1.setDrivingOverdueFlag("0");

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

@@ -227,12 +227,19 @@ public class DriverInfoServiceImpl extends ServiceImpl<DriverInfoMapper, HyDrive
      */
     @Override
     @Transactional(rollbackFor = Exception.class)
-    public String examine(HyDriverInfo hyDriverInfo) {
+    public String examine(HyDriverInfo hyDriverInfo) throws IOException {
         //查询司机列表
         HyDriverInfo hyDriverInfo1 = this.selectById(hyDriverInfo.getId());
         if (hyDriverInfo1 != null) {
             //通过
             if ("1".equals(hyDriverInfo.getFlag())) {
+                //上报司机信息校验结果查询
+                String token = EntityAnalyse.GetJTToken();
+                hyDriverInfo.setToken(token);
+                if (!"通过".equals(EntityAnalyse.driverInfoCheck(hyDriverInfo))){
+                    return EntityAnalyse.driverInfoCheck(hyDriverInfo);
+                }
+
                 hyDriverInfo1.setAuthenticationStatusKey(StatusEnum.IDENTITY_COMPLETED.getFlag());
                 hyDriverInfo1.setAuthenticationStatus(StatusEnum.IDENTITY_COMPLETED.getName());
                 hyDriverInfo1.setBackStageStatusKey(StatusEnum.TASK_REJECT.getFlag());

+ 85 - 76
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/PublishTaskInfoServiceImpl.java

@@ -360,39 +360,40 @@ public class PublishTaskInfoServiceImpl extends ServiceImpl<PublishTaskInfoMappe
                     newsInfo.setNewsType("系统消息");
                     newsInfoService.addNewsInfo(newsInfo);
                 }
-                //挂车行驶证
-                int result4 = hyDriverCarInfo.getTrailerLicenseValidityDate().compareTo(date1);
-                if (result4 < 0) {
-                    hyDriverCarInfo.setTrailerOverdueFlag("1");
-                    hyDriverCarInfo.setStatus(StatusEnum.IDENTITY_OVERDUE.getName());
-                    hyDriverCarInfo.setStatusKey(StatusEnum.IDENTITY_OVERDUE.getFlag());
-                    driverCarInfoService.updateById(hyDriverCarInfo);
-                }
-                //挂车行驶证到期前10天
-                int result410 = hyDriverCarInfo.getTrailerLicenseValidityDate().compareTo(date10);
-                if (result410 == 0) {
-                    //发送系统消息
-                    NewsInfo newsInfo = new NewsInfo();
-                    newsInfo.setReCommonId(hyDriverInfo.getCommonId());
-                    newsInfo.setBussId(hyDriverCarInfo.getId());
-                    newsInfo.setNewsContent("您的挂车行驶证即将到期,请尽快到“我的-管理车辆”中更新,逾期将影响运费支付。");
-                    newsInfo.setNewsTypeKey("1");
-                    newsInfo.setNewsType("系统消息");
-                    newsInfoService.addNewsInfo(newsInfo);
-                }
-                //挂车行驶证到期前3天
-                int result43 = hyDriverCarInfo.getTrailerLicenseValidityDate().compareTo(date3);
-                if (result43 == 0) {
-                    //发送系统消息
-                    NewsInfo newsInfo = new NewsInfo();
-                    newsInfo.setReCommonId(hyDriverInfo.getCommonId());
-                    newsInfo.setBussId(hyDriverCarInfo.getId());
-                    newsInfo.setNewsContent("您的挂车行驶证即将到期,请尽快到“我的-管理车辆”中更新,逾期将影响运费支付。");
-                    newsInfo.setNewsTypeKey("1");
-                    newsInfo.setNewsType("系统消息");
-                    newsInfoService.addNewsInfo(newsInfo);
+                if (hyDriverCarInfo.getTrailerLicenseValidityDate() != null) {
+                    //挂车行驶证
+                    int result4 = hyDriverCarInfo.getTrailerLicenseValidityDate().compareTo(date1);
+                    if (result4 < 0) {
+                        hyDriverCarInfo.setTrailerOverdueFlag("1");
+                        hyDriverCarInfo.setStatus(StatusEnum.IDENTITY_OVERDUE.getName());
+                        hyDriverCarInfo.setStatusKey(StatusEnum.IDENTITY_OVERDUE.getFlag());
+                        driverCarInfoService.updateById(hyDriverCarInfo);
+                    }
+                    //挂车行驶证到期前10天
+                    int result410 = hyDriverCarInfo.getTrailerLicenseValidityDate().compareTo(date10);
+                    if (result410 == 0) {
+                        //发送系统消息
+                        NewsInfo newsInfo = new NewsInfo();
+                        newsInfo.setReCommonId(hyDriverInfo.getCommonId());
+                        newsInfo.setBussId(hyDriverCarInfo.getId());
+                        newsInfo.setNewsContent("您的挂车行驶证即将到期,请尽快到“我的-管理车辆”中更新,逾期将影响运费支付。");
+                        newsInfo.setNewsTypeKey("1");
+                        newsInfo.setNewsType("系统消息");
+                        newsInfoService.addNewsInfo(newsInfo);
+                    }
+                    //挂车行驶证到期前3天
+                    int result43 = hyDriverCarInfo.getTrailerLicenseValidityDate().compareTo(date3);
+                    if (result43 == 0) {
+                        //发送系统消息
+                        NewsInfo newsInfo = new NewsInfo();
+                        newsInfo.setReCommonId(hyDriverInfo.getCommonId());
+                        newsInfo.setBussId(hyDriverCarInfo.getId());
+                        newsInfo.setNewsContent("您的挂车行驶证即将到期,请尽快到“我的-管理车辆”中更新,逾期将影响运费支付。");
+                        newsInfo.setNewsTypeKey("1");
+                        newsInfo.setNewsType("系统消息");
+                        newsInfoService.addNewsInfo(newsInfo);
+                    }
                 }
-
                 //道路运输证
                 int result6 = hyDriverCarInfo.getOperationCertificateValidityDate().compareTo(date1);
                 if (result6 < 0) {
@@ -425,37 +426,39 @@ public class PublishTaskInfoServiceImpl extends ServiceImpl<PublishTaskInfoMappe
                     newsInfo.setNewsType("系统消息");
                     newsInfoService.addNewsInfo(newsInfo);
                 }
-                //挂车运输证
-                int result7 = hyDriverCarInfo.getTrailerOperationCertificateValidityDate().compareTo(date1);
-                if (result7 < 0) {
-                    hyDriverCarInfo.setTrailerOperationOverdueFlag("1");
-                    hyDriverCarInfo.setStatus(StatusEnum.IDENTITY_OVERDUE.getName());
-                    hyDriverCarInfo.setStatusKey(StatusEnum.IDENTITY_OVERDUE.getFlag());
-                    driverCarInfoService.updateById(hyDriverCarInfo);
-                }
-                //挂车运输证到期前10天
-                int result710 = hyDriverCarInfo.getTrailerOperationCertificateValidityDate().compareTo(date10);
-                if (result710 == 0) {
-                    //发送系统消息
-                    NewsInfo newsInfo = new NewsInfo();
-                    newsInfo.setReCommonId(hyDriverInfo.getCommonId());
-                    newsInfo.setBussId(hyDriverCarInfo.getId());
-                    newsInfo.setNewsContent("您的挂车运输证即将到期,请尽快到“我的-管理车辆”中更新,逾期将影响运费支付。");
-                    newsInfo.setNewsTypeKey("1");
-                    newsInfo.setNewsType("系统消息");
-                    newsInfoService.addNewsInfo(newsInfo);
-                }
-                //挂车运输证到期前3天
-                int result73 = hyDriverCarInfo.getTrailerOperationCertificateValidityDate().compareTo(date3);
-                if (result73 == 0) {
-                    //发送系统消息
-                    NewsInfo newsInfo = new NewsInfo();
-                    newsInfo.setReCommonId(hyDriverInfo.getCommonId());
-                    newsInfo.setBussId(hyDriverCarInfo.getId());
-                    newsInfo.setNewsContent("您的挂车运输证即将到期,请尽快到“我的-管理车辆”中更新,逾期将影响运费支付。");
-                    newsInfo.setNewsTypeKey("1");
-                    newsInfo.setNewsType("系统消息");
-                    newsInfoService.addNewsInfo(newsInfo);
+                if (hyDriverCarInfo.getTrailerOperationCertificateValidityDate() != null) {
+                    //挂车运输证
+                    int result7 = hyDriverCarInfo.getTrailerOperationCertificateValidityDate().compareTo(date1);
+                    if (result7 < 0) {
+                        hyDriverCarInfo.setTrailerOperationOverdueFlag("1");
+                        hyDriverCarInfo.setStatus(StatusEnum.IDENTITY_OVERDUE.getName());
+                        hyDriverCarInfo.setStatusKey(StatusEnum.IDENTITY_OVERDUE.getFlag());
+                        driverCarInfoService.updateById(hyDriverCarInfo);
+                    }
+                    //挂车运输证到期前10天
+                    int result710 = hyDriverCarInfo.getTrailerOperationCertificateValidityDate().compareTo(date10);
+                    if (result710 == 0) {
+                        //发送系统消息
+                        NewsInfo newsInfo = new NewsInfo();
+                        newsInfo.setReCommonId(hyDriverInfo.getCommonId());
+                        newsInfo.setBussId(hyDriverCarInfo.getId());
+                        newsInfo.setNewsContent("您的挂车运输证即将到期,请尽快到“我的-管理车辆”中更新,逾期将影响运费支付。");
+                        newsInfo.setNewsTypeKey("1");
+                        newsInfo.setNewsType("系统消息");
+                        newsInfoService.addNewsInfo(newsInfo);
+                    }
+                    //挂车运输证到期前3天
+                    int result73 = hyDriverCarInfo.getTrailerOperationCertificateValidityDate().compareTo(date3);
+                    if (result73 == 0) {
+                        //发送系统消息
+                        NewsInfo newsInfo = new NewsInfo();
+                        newsInfo.setReCommonId(hyDriverInfo.getCommonId());
+                        newsInfo.setBussId(hyDriverCarInfo.getId());
+                        newsInfo.setNewsContent("您的挂车运输证即将到期,请尽快到“我的-管理车辆”中更新,逾期将影响运费支付。");
+                        newsInfo.setNewsTypeKey("1");
+                        newsInfo.setNewsType("系统消息");
+                        newsInfoService.addNewsInfo(newsInfo);
+                    }
                 }
             });
         }
@@ -979,6 +982,7 @@ public class PublishTaskInfoServiceImpl extends ServiceImpl<PublishTaskInfoMappe
     @Override
     @Transactional(rollbackFor = Exception.class)
     public String addTask(PublishTaskInfo publishTaskInfo) {
+        //查询是否具有发布权限
         if ("个人货主".equals(publishTaskInfo.getCargoOwner())) {
             //查询货主身份是否具有发布权限
             HyCargoOwnerInfo hyCargoOwnerInfo = cargoOwnerInfoService.selectOne(new EntityWrapper<HyCargoOwnerInfo>()
@@ -988,17 +992,22 @@ public class PublishTaskInfoServiceImpl extends ServiceImpl<PublishTaskInfoMappe
             }
         } else if (publishTaskInfo.getCompId() != null && publishTaskInfo.getCompId() != "") {
             //货主认证公司是否具有发布权限
-            HyCompanyInfo hyCompanyInfo = companyInfoService.selectById(publishTaskInfo.getCompId());
-            if (!"5".equals(hyCompanyInfo.getStatusKey())) {
-                throw new YException(YExceptionEnum.OWNER_NO_RELEASE);
-            }
-        } else {
-            //货主所属公司是否具有发布权限
-            HyCargoOwnerCompInfo hyCargoOwnerCompInfo = cargoOwnerCompInfoService.selectOne(new EntityWrapper<HyCargoOwnerCompInfo>()
-                    .eq("common_id", publishTaskInfo.getCommonId()).eq("company", publishTaskInfo.getCargoOwner())
+            HyCompanyInfo hyCompanyInfo = companyInfoService.selectOne(new EntityWrapper<HyCompanyInfo>()
+                    .eq("id", publishTaskInfo.getCompId())
+                    .eq("common_id", publishTaskInfo.getCommonId())
                     .eq("delete_flag", "0"));
-            if (!"9".equals(hyCargoOwnerCompInfo.getStatusKey())) {
-                throw new YException(YExceptionEnum.OWNER_NO_RELEASE);
+            if (hyCompanyInfo != null) {
+                if (!"5".equals(hyCompanyInfo.getStatusKey())) {
+                    throw new YException(YExceptionEnum.OWNER_NO_RELEASE);
+                }
+            } else {
+                //货主所属公司是否具有发布权限
+                HyCargoOwnerCompInfo hyCargoOwnerCompInfo = cargoOwnerCompInfoService.selectOne(new EntityWrapper<HyCargoOwnerCompInfo>()
+                        .eq("common_id", publishTaskInfo.getCommonId()).eq("comp_id", publishTaskInfo.getCompId())
+                        .eq("delete_flag", "0"));
+                if (!"9".equals(hyCargoOwnerCompInfo.getStatusKey())) {
+                    throw new YException(YExceptionEnum.OWNER_NO_RELEASE);
+                }
             }
         }
 
@@ -1196,12 +1205,12 @@ public class PublishTaskInfoServiceImpl extends ServiceImpl<PublishTaskInfoMappe
             throw new YException(YExceptionEnum.TASK_CANCELLED);
         }
         //查询货主身份授权是否到期
-        if(!"个人货主".equals(publishTaskInfo.getCargoOwner())){
+        if (!"个人货主".equals(publishTaskInfo.getCargoOwner())) {
             List<HyCargoOwnerCompInfo> hyCargoOwnerCompInfos = cargoOwnerCompInfoService.selectList(new EntityWrapper<HyCargoOwnerCompInfo>().eq("common_id", publishTaskInfo.getCommonId())
                     .eq("delete_flag", "0"));
             if (!CollectionUtils.isEmpty(hyCargoOwnerCompInfos)) {
-                for (HyCargoOwnerCompInfo hyCargoOwnerCompInfo : hyCargoOwnerCompInfos){
-                    if (hyCargoOwnerCompInfo.getCompany().equals(publishTaskInfo.getCargoOwner())){
+                for (HyCargoOwnerCompInfo hyCargoOwnerCompInfo : hyCargoOwnerCompInfos) {
+                    if (hyCargoOwnerCompInfo.getCompany().equals(publishTaskInfo.getCargoOwner())) {
                         boolean cancelled = "11".equals(hyCargoOwnerCompInfo.getStatusKey()) || "17".equals(hyCargoOwnerCompInfo.getStatusKey());
                         if (cancelled) {
                             throw new YException(YExceptionEnum.TASK_CANCELLED);

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

@@ -178,7 +178,7 @@ public class EntityAnalyse {
      * @throws IOException
      */
     public static String uploadDriverCarInfo(HyDriverCarInfo hyDriverCarInfo) throws IOException {
-        String url = "http://116.182.4.67:50065/platform/api/v1//vehicle";
+        String url = "http://116.182.4.67:50065/platform/api/v1/vehicle";
         CloseableHttpClient httpClient = HttpClients.createDefault();
         // 模拟登陆,按实际服务器端要求选用 Post 或 Get 请求方式
         HttpPost httpPost = new HttpPost(url);
@@ -253,6 +253,105 @@ public class EntityAnalyse {
         return "";
     }
 
+    /**
+     * 驾驶员信息校验结果查询
+     * @param hyDriverInfo
+     * @return
+     * @throws IOException
+     */
+    public static String driverInfoCheck(HyDriverInfo hyDriverInfo) throws IOException {
+        String url = "http://116.182.4.67:50065/platform/api/v1/driver/validate";
+        CloseableHttpClient httpClient = HttpClients.createDefault();
+        // 模拟登陆,按实际服务器端要求选用 Post 或 Get 请求方式
+        HttpPost httpPost = new HttpPost(url);
+        JSONObject params = new JSONObject();
+        params.put("drivingLicense", hyDriverInfo.getNumberCard());
+        httpPost.setEntity(new StringEntity(params.toString(), StandardCharsets.UTF_8));
+        // 设置header信息
+        httpPost.setHeader("Content-type", "application/json");
+        httpPost.setHeader("token", hyDriverInfo.getToken());
+        CloseableHttpResponse response = httpClient.execute(httpPost);
+        try {
+            // 执行请求操作,并拿到结果(同步阻塞)
+            String body = EntityUtils.toString(response.getEntity());
+            JSONObject jsonObject = JSONObject.parseObject(body);
+            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"))){
+                        result = result + jsonArray.getJSONObject(i).getString("message");
+                    }
+                }
+                System.out.println("result = " + result);
+                return result;
+            }else if ("待校验".equals(jsonObject.getJSONObject("result").getString("validateStatus"))){
+                String result = "待校验";
+                System.out.println("result = " + result);
+                return result;
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        } finally {
+            // 释放链接
+            response.close();
+            httpClient.close();
+        }
+        return "通过";
+    }
+
+    /**
+     * 车辆信息校验结果查询
+     * @param hyDriverCarInfo
+     * @return
+     * @throws IOException
+     */
+    public static String driverCarInfoCheck(HyDriverCarInfo hyDriverCarInfo) throws IOException {
+        String url = "http://116.182.4.67:50065/platform/api/v1/vehicle/validate";
+        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");
+        }
+        httpPost.setEntity(new StringEntity(params.toString(), StandardCharsets.UTF_8));
+        // 设置header信息
+        httpPost.setHeader("Content-type", "application/json");
+        httpPost.setHeader("token", hyDriverCarInfo.getToken());
+        CloseableHttpResponse response = httpClient.execute(httpPost);
+        try {
+            // 执行请求操作,并拿到结果(同步阻塞)
+            String body = EntityUtils.toString(response.getEntity());
+            JSONObject jsonObject = JSONObject.parseObject(body);
+            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"))){
+                        result = result + jsonArray.getJSONObject(i).getString("message");
+                    }
+                }
+                System.out.println("result = " + result);
+                return result;
+            }else if ("待校验".equals(jsonObject.getJSONObject("result").getString("validateStatus"))){
+                String result = "待校验";
+                System.out.println("result = " + result);
+                return result;
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        } finally {
+            // 释放链接
+            response.close();
+            httpClient.close();
+        }
+        return "通过";
+    }
+
     /**
      * 银行卡识别
      * @param bankImg