haungfuli 3 лет назад
Родитель
Сommit
6004b6cac5
31 измененных файлов с 511 добавлено и 157 удалено
  1. BIN
      templates/Contract1.pdf
  2. 2 0
      winsea-haixin-platform-backend/src/main/resources/application.yml
  3. 1 1
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/controller/CargoOwnerInfoController.java
  4. 40 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/controller/HyDriverCapitalInfoController.java
  5. 4 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/CommonUser.java
  6. 3 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/FeedbackReport.java
  7. 20 4
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/HyCargoOwnerInfo.java
  8. 1 1
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/HyCompanyInfo.java
  9. 80 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/HyDriverCapitalInfo.java
  10. 2 2
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/HyDriverCarInfo.java
  11. 23 3
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/HyDriverInfo.java
  12. 1 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/exception/YExceptionEnum.java
  13. 1 1
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/mapper/CommonUserMapper.java
  14. 16 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/mapper/HyDriverCapitalInfoMapper.java
  15. 25 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/IHyDriverCapitalInfoService.java
  16. 13 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/CargoOwnerInfoServiceImpl.java
  17. 9 24
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/CommonUserServiceImpl.java
  18. 1 10
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/DriverInfoServiceImpl.java
  19. 0 1
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/DriverPayeeInfoServiceImpl.java
  20. 1 1
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/FeedbackReportServiceImpl.java
  21. 35 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/HyDriverCapitalInfoServiceImpl.java
  22. 20 2
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/OrderInfoServiceImpl.java
  23. 5 3
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/PublishTaskInfoServiceImpl.java
  24. 54 34
      winsea-haixin-plugin-wangluohuoyun/src/main/resources/mapper/CargoOwnerInfoMapper.xml
  25. 1 1
      winsea-haixin-plugin-wangluohuoyun/src/main/resources/mapper/CommonUserMapper.xml
  26. 12 7
      winsea-haixin-plugin-wangluohuoyun/src/main/resources/mapper/CompanyInfoMapper.xml
  27. 53 16
      winsea-haixin-plugin-wangluohuoyun/src/main/resources/mapper/DriverCarInfoMapper.xml
  28. 80 43
      winsea-haixin-plugin-wangluohuoyun/src/main/resources/mapper/DriverInfoMapper.xml
  29. 2 2
      winsea-haixin-plugin-wangluohuoyun/src/main/resources/mapper/FeedbackReportMapper.xml
  30. 1 1
      winsea-haixin-plugin-wangluohuoyun/src/main/resources/mapper/FleetInfoMapper.xml
  31. 5 0
      winsea-haixin-plugin-wangluohuoyun/src/main/resources/mapper/HyDriverCapitalInfoMapper.xml

BIN
templates/Contract1.pdf


+ 2 - 0
winsea-haixin-platform-backend/src/main/resources/application.yml

@@ -80,6 +80,8 @@ auth:
     - /driverCarInfo/**/*
     - /driverPayeeInfo/*
     - /driverPayeeInfo/**/*
+    - /hyDriverCapitalInfo/*
+    - /hyDriverCapitalInfo/**/*
     - /publishTaskInfo/*
     - /publishTaskInfo/**/*
     - /cargoOwnerInfo/*

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

@@ -26,7 +26,7 @@ public class CargoOwnerInfoController {
     private ICargoOwnerInfoService cargoOwnerInfoService;
 
     /**
-     * 第一次认证
+     * 根据手机号查询货主信息
      * @param phone
      * @return
      */

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

@@ -0,0 +1,40 @@
+package com.yh.saas.plugin.yiliangyiyun.controller;
+
+
+import com.yh.saas.plugin.yiliangyiyun.entity.HyDriverCapitalInfo;
+import com.yh.saas.plugin.yiliangyiyun.service.IHyDriverCapitalInfoService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+/**
+ * <p>
+ * 记录司机资金流水信息 前端控制器
+ * </p>
+ *
+ * @author Gdc
+ * @since 2022-06-24
+ */
+@RestController
+@RequestMapping("/hyDriverCapitalInfo")
+public class HyDriverCapitalInfoController {
+
+    @Autowired
+    private IHyDriverCapitalInfoService hyDriverCapitalInfoService;
+
+
+    /**
+     * 账单列表
+     * @param hyDriverCapitalInfo
+     * @return
+     */
+    @GetMapping("/billList")
+    public List<HyDriverCapitalInfo> billList(HyDriverCapitalInfo hyDriverCapitalInfo){
+        return hyDriverCapitalInfoService.billList(hyDriverCapitalInfo);
+    }
+}
+

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

@@ -42,6 +42,10 @@ public class CommonUser extends BaseModel<CommonUser> {
      * 密码
      */
     private String password;
+    /**
+     * 身份标识(1司机2货主)
+     */
+    private String identification;
     /**
      * 角色ID
      */

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

@@ -28,6 +28,9 @@ public class FeedbackReport extends BaseModel<FeedbackReport> {
 
     private static final long serialVersionUID = 1L;
 
+    /**
+     * 主键
+     */
     @TableId(type = IdType.UUID)
     private String id;
     /**

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

@@ -82,7 +82,7 @@ public class HyCargoOwnerInfo extends BaseModel<HyCargoOwnerInfo> {
      */
     private String cardValidityDate;
     /**
-     * 认证状态key(1审核中3已驳回5已通过7已禁用9已过期)
+     * 认证状态key(1审核中3已驳回5已通过7已禁用9已过期11已注销
      */
     private String authenticationStatusKey;
     /**
@@ -101,6 +101,22 @@ public class HyCargoOwnerInfo extends BaseModel<HyCargoOwnerInfo> {
      * 第一次认证标识
      */
     private String firstFlag;
+    /**
+     * 垫付比例
+     */
+    private Double advancePayment;
+    /**
+     * 发运次数
+     */
+    private Long shipmentsNumber;
+    /**
+     * 好评率%
+     */
+    private Integer favorableRate;
+    /**
+     * 累计支付运费(元)
+     */
+    private Double accumulatedFreight;
 
     @TableField(exist = false)
     private List<HyCargoOwnerCompInfo> hyCargoOwnerCompInfoList;
@@ -109,7 +125,7 @@ public class HyCargoOwnerInfo extends BaseModel<HyCargoOwnerInfo> {
     private HyCargoOwnerCompInfo hyCargoOwnerCompInfo;
 
     /**
-     * 查询类型
+     * 查询类型(1待审核2已通过3已驳回4已过期5未认证6已注销7已禁用)
      */
     @TableField(exist = false)
     private String searchType;
@@ -124,10 +140,10 @@ public class HyCargoOwnerInfo extends BaseModel<HyCargoOwnerInfo> {
     @TableField(exist = false)
     private String searchKeyWord;
     /**
-     * 头像
+     * 代理身份
      */
     @TableField(exist = false)
-    private String avatarUrl;
+    private String proxyIdentity;
 
     @Override
     protected Serializable pkVal() {

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

@@ -132,7 +132,7 @@ public class HyCompanyInfo extends BaseModel<HyCompanyInfo> {
     @TableField(exist = false)
     private String searchKeyWord;
     /**
-     * 查询类型
+     * 查询类型(1待审核2已通过3已驳回4已过期)
      */
     @TableField(exist = false)
     private String searchType;

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

@@ -0,0 +1,80 @@
+package com.yh.saas.plugin.yiliangyiyun.entity;
+
+
+import java.io.Serializable;
+
+import com.baomidou.mybatisplus.annotations.TableId;
+import com.baomidou.mybatisplus.annotations.TableName;
+
+
+import com.baomidou.mybatisplus.enums.IdType;
+import com.yh.saas.common.support.entity.BaseModel;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+/**
+ * <p>
+ * 记录司机资金流水信息
+ * </p>
+ *
+ * @author Gdc
+ * @since 2022-06-24
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@Accessors(chain = true)
+@TableName("hy_driver_capital_info")
+public class HyDriverCapitalInfo extends BaseModel<HyDriverCapitalInfo> {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(type = IdType.UUID)
+    private String id;
+    /**
+     * 用户id
+     */
+    private String commonId;
+    /**
+     * 类型
+     */
+    private String types;
+    /**
+     * 金额(元)
+     */
+    private Double amountMoney;
+    /**
+     * 订单id
+     */
+    private String orderId;
+    /**
+     * 订单编号
+     */
+    private String orderNo;
+    /**
+     * 银行卡号码
+     */
+    private String bankCard;
+    /**
+     * 收款人姓名
+     */
+    private String payeeName;
+    /**
+     * 开户行
+     */
+    private String bankDeposit;
+    /**
+     * 开户支行
+     */
+    private String bankDepositBranch;
+
+
+    @Override
+    protected Serializable pkVal() {
+        return this.id;
+    }
+
+}

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

@@ -244,7 +244,7 @@ public class HyDriverCarInfo extends BaseModel<HyDriverCarInfo> {
      */
     private String trailerOperationOverdueFlag;
     /**
-     * 认证状态key(1审核中3未通过5已通过9已过期)
+     * 认证状态key(1审核中3未通过5已通过9已过期11已注销
      */
     private String statusKey;
     /**
@@ -256,7 +256,7 @@ public class HyDriverCarInfo extends BaseModel<HyDriverCarInfo> {
      */
     private String rejectReasonDescription;
     /**
-     * 查询类型
+     * 查询类型(1待审核2已通过3已驳回4已删除5已注销)
      */
     @TableField(exist = false)
     private String searchType;

+ 23 - 3
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/HyDriverInfo.java

@@ -122,7 +122,7 @@ public class HyDriverInfo extends BaseModel<HyDriverInfo> {
      */
     private String qualificationCertificateNumber;
     /**
-     * 认证状态key(1审核中3未通过5已认证7已禁用9已过期)
+     * 认证状态key(1审核中3未通过5已认证7已禁用9已过期11已注销
      */
     private String authenticationStatusKey;
     /**
@@ -154,9 +154,29 @@ public class HyDriverInfo extends BaseModel<HyDriverInfo> {
      */
     private String rejectReasonDescription;
     /**
-     * 预付款比例
+     * 垫付比例
      */
     private Double advancePayment;
+    /**
+     * 承运次数
+     */
+    private Long shipmentsNumber;
+    /**
+     * 好评率%
+     */
+    private Integer favorableRate;
+    /**
+     * 被投诉数
+     */
+    private Long complaintsNumber;
+    /**
+     * 被举报数
+     */
+    private Long reportedNumber;
+    /**
+     * 累计支付运费(元)
+     */
+    private Double accumulatedFreight;
     /**
      * 审核标识
      */
@@ -169,7 +189,7 @@ public class HyDriverInfo extends BaseModel<HyDriverInfo> {
     @TableField(exist = false)
     private List<HyDriverPayeeInfo> hyDriverPayeeInfoList;
     /**
-     * 查询类型
+     * 查询类型(1待审核2已通过3已驳回4已过期5已注销6已禁用7未认证8重点关注)
      */
     @TableField(exist = false)
     private String searchType;

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

@@ -34,6 +34,7 @@ public enum YExceptionEnum {
 	PAYEENAME_NOT("ERROR14", "收款人须为司机本人!"),
 	QUALITY_NO_ERROR("ERROR", "业务编号已存在,不可重复!"),
 	INSUFFICIENT_ACCOUNT_BALANCE("ERROR15", "账户余额不足!"),
+	OWNER_ALREADY_EXISTS("ERROR16", "货主身份已存在,不可添加!"),
 	;
 	@Getter
 	private String value;

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

@@ -19,7 +19,7 @@ import java.util.Map;
 public interface CommonUserMapper extends BaseMapper<CommonUser> {
 
 
-    CommonUser login(@Param("phone") String phone, @Param("cryptPassword") String cryptPassword);
+    CommonUser login(@Param("phone") String phone, @Param("cryptPassword") String cryptPassword,@Param("identification") String identification);
 
     /**
      * 根据条件查询总数

+ 16 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/mapper/HyDriverCapitalInfoMapper.java

@@ -0,0 +1,16 @@
+package com.yh.saas.plugin.yiliangyiyun.mapper;
+
+import com.yh.saas.plugin.yiliangyiyun.entity.HyDriverCapitalInfo;
+import com.baomidou.mybatisplus.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 记录司机资金流水信息 Mapper 接口
+ * </p>
+ *
+ * @author Gdc
+ * @since 2022-06-24
+ */
+public interface HyDriverCapitalInfoMapper extends BaseMapper<HyDriverCapitalInfo> {
+
+}

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

@@ -0,0 +1,25 @@
+package com.yh.saas.plugin.yiliangyiyun.service;
+
+import com.yh.saas.plugin.yiliangyiyun.entity.HyDriverCapitalInfo;
+import com.baomidou.mybatisplus.service.IService;
+
+import java.util.List;
+
+/**
+ * <p>
+ * 记录司机资金流水信息 服务类
+ * </p>
+ *
+ * @author Gdc
+ * @since 2022-06-24
+ */
+public interface IHyDriverCapitalInfoService extends IService<HyDriverCapitalInfo> {
+
+    /**
+     * 账单列表
+     * @param hyDriverCapitalInfo
+     * @return
+     */
+    List<HyDriverCapitalInfo> billList(HyDriverCapitalInfo hyDriverCapitalInfo);
+
+}

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

@@ -109,6 +109,13 @@ public class CargoOwnerInfoServiceImpl extends ServiceImpl<CargoOwnerInfoMapper,
     public String addCargoOwner(HyCargoOwnerInfo hyCargoOwnerInfo){
             //新增主键id
             hyCargoOwnerInfo.setId(IdGenerator.generateUUID());
+            hyCargoOwnerInfo.setAdvancePayment(0.7d);
+            //判断是否存在货主身份
+            HyCargoOwnerInfo hyCargoOwnerInfo1 = this.selectOne(new EntityWrapper<HyCargoOwnerInfo>().eq("phone",hyCargoOwnerInfo.getPhone())
+            .eq("card_number",hyCargoOwnerInfo.getCardNumber()).eq("delete_flag", NumberConstant.CONSTANT0));
+            if (hyCargoOwnerInfo1 != null) {
+                throw new YException(YExceptionEnum.OWNER_ALREADY_EXISTS);
+            }
             //判断货主身份证号是否唯一
             List<HyCargoOwnerInfo> hyCargoOwnerInfoList = this.selectList(new EntityWrapper<HyCargoOwnerInfo>()
                         .eq("card_number", hyCargoOwnerInfo.getCardNumber())
@@ -138,6 +145,12 @@ public class CargoOwnerInfoServiceImpl extends ServiceImpl<CargoOwnerInfoMapper,
         else{
             //新增主键id
             hyCargoOwnerInfo.setId(IdGenerator.generateUUID());
+            //判断是否存在货主身份
+            HyCargoOwnerInfo hyCargoOwnerInfo2 = this.selectOne(new EntityWrapper<HyCargoOwnerInfo>().eq("phone",hyCargoOwnerInfo.getPhone())
+                    .eq("card_number",hyCargoOwnerInfo.getCardNumber()).eq("delete_flag", NumberConstant.CONSTANT0));
+            if (hyCargoOwnerInfo2 != null) {
+                throw new YException(YExceptionEnum.OWNER_ALREADY_EXISTS);
+            }
             //判断货主身份证号是否唯一
             List<HyCargoOwnerInfo> hyCargoOwnerInfoList = this.selectList(new EntityWrapper<HyCargoOwnerInfo>()
                     .eq("card_number", hyCargoOwnerInfo.getCardNumber())

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

@@ -111,6 +111,7 @@ public class CommonUserServiceImpl extends ServiceImpl<CommonUserMapper, CommonU
     private IDriverInfoService driverInfoService;
 
 
+
     //用来过滤权限的时候使用,当过滤的code已在其中的时候就不进行过滤;
     private Set<String> businessCodes;
 
@@ -151,15 +152,15 @@ public class CommonUserServiceImpl extends ServiceImpl<CommonUserMapper, CommonU
             checkVerifyCode(commonUser.getPhone(), commonUser.getVerifyCode());
         }
         //2.校验用户是否存在
-        Integer count = this.selectCount(
-                new EntityWrapper<CommonUser>()
-                        .eq("phone", commonUser.getPhone()));
+        Integer count = this.selectCount(new EntityWrapper<CommonUser>()
+                .eq("phone", commonUser.getPhone()).eq("identification",commonUser.getIdentification()));
         if (count > 0) {
             throw new AppServiceException(ExceptionDefinition.USER_PHONE_HAS_EXISTED);
         }
         //3.校验成功,注册用户
         CommonUser user = new CommonUser();
         user.setPhone(commonUser.getPhone());
+        user.setIdentification(commonUser.getIdentification());
         //  查询pc 是否有账号
         CommonStaff commonStaff = commonStaffService.selectOne(new EntityWrapper<CommonStaff>()
                 .eq("staff_mobile_phone", commonUser.getPhone()).eq("enabled", "1"));
@@ -237,7 +238,7 @@ public class CommonUserServiceImpl extends ServiceImpl<CommonUserMapper, CommonU
         //2.校验用户是否存在
         List<CommonUser> targetUserList = this.selectList(
                 new EntityWrapper<CommonUser>()
-                        .eq("phone", commonUser.getPhone()));
+                        .eq("phone", commonUser.getPhone()).eq("identification",commonUser.getIdentification()));
         if (CollectionUtils.isEmpty(targetUserList)) {
             throw new AppServiceException(ExceptionDefinition.USER_PHONE_NOT_EXIST);
         }
@@ -374,28 +375,11 @@ public class CommonUserServiceImpl extends ServiceImpl<CommonUserMapper, CommonU
         //2.校验用户是否存在
         List<CommonUser> targetUserList = this.selectList(
                 new EntityWrapper<CommonUser>()
-                        .eq("phone", commonUser.getPhone()));
+                        .eq("phone", commonUser.getPhone()).eq("identification",commonUser.getIdentification()));
         CommonUser userDO = new CommonUser();
 
         if (CollectionUtils.isEmpty(targetUserList)) {
-            //  查询pc 是否有账号
-//            CommonStaff commonStaff = commonStaffService.selectOne(new EntityWrapper<CommonStaff>()
-//                    .eq("staff_mobile_phone", commonUser.getPhone()).eq("enabled", "1"));
-//            if (commonStaff != null) {
-//                userDO.setRoleIds(commonStaff.getMajorRoleId());
-//                userDO.setId(commonStaff.getStaffId());
-//                CommonCompany commonCompany = commonCompanyService.selectById(commonStaff.getCompId());
-//                if(commonCompany != null){
-//                    userDO.setUserName(commonCompany.getCompSimpleName() + "-" +commonStaff.getStaffName());
-//                }
-//            }
-//            else{
-//                userDO.setUserName("用户"+commonUser.getPhone().substring(0, 3) + "****" + commonUser.getPhone().substring(7));
-//            }
-//            userDO.setPhone(commonUser.getPhone());
-//            userDO.setCid(commonUser.getCid());
-//            userDO.setPassword(Md5Crypt.md5Crypt("123456".getBytes(), "$1$" + commonUser.getPhone().substring(0, 7)));
-//            this.insert(userDO);
+            throw new AppServiceException(ExceptionDefinition.USER_PHONE_NOT_EXIST);
         } else {
             userDO = targetUserList.get(0);
             //检查帐号是否已经冻结
@@ -499,7 +483,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 user = commonUserMapper.login(commonUser.getPhone(), cryptPassword,commonUser.getIdentification());
 
         if (user == null) {
             throw new AppServiceException(ExceptionDefinition.USER_PHONE_OR_PASSWORD_NOT_CORRECT);
@@ -959,4 +943,5 @@ public class CommonUserServiceImpl extends ServiceImpl<CommonUserMapper, CommonU
     }
 
 
+
 }

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

@@ -55,7 +55,6 @@ public class DriverInfoServiceImpl extends ServiceImpl<DriverInfoMapper, HyDrive
         pageView.put("startRecord", (driverViewInfo.getCurrentPage() - 1)
                 * driverViewInfo.getPageSize());
         //公司id
-        pageView.put("compId", driverViewInfo.getCompId());
         pageView.put("commonId", driverViewInfo.getCommonId());
         pageView.put("searchType", driverViewInfo.getSearchType());
         pageView.put("searchKeyWord", driverViewInfo.getSearchKeyWord());
@@ -64,14 +63,6 @@ public class DriverInfoServiceImpl extends ServiceImpl<DriverInfoMapper, HyDrive
         // 查询司机总数
         Integer dataCount = baseMapper.getCountByCondition(pageView);
         List<HyDriverInfo> dataList = baseMapper.getListByCondition(pageView);
-        dataList.forEach(driverViewInfo1 -> {
-            driverViewInfo1.setHyDriverCarInfoList(driverCarInfoService.selectList(new EntityWrapper<HyDriverCarInfo>()
-                    .eq(HyDriverCarInfo.QueryFiles.DRIVER_ID, driverViewInfo1.getId())
-                    .eq(HyDriverCarInfo.QueryFiles.DELETE_FLAG, NumberConstant.CONSTANT0)));
-            driverViewInfo1.setHyDriverPayeeInfoList(driverPayeeInfoService.selectList(new EntityWrapper<HyDriverPayeeInfo>()
-                    .eq(HyDriverPayeeInfo.QueryFiles.DRIVER_ID, driverViewInfo1.getId())
-                    .eq(HyDriverPayeeInfo.QueryFiles.DELETE_FLAG, NumberConstant.CONSTANT0)));
-        });
         Page<HyDriverInfo> page = new Page<>();
         page.setRecords(dataList == null ? Lists.newArrayList() : dataList);
         page.setTotal(dataCount == null ? 0 : dataCount);
@@ -105,7 +96,7 @@ public class DriverInfoServiceImpl extends ServiceImpl<DriverInfoMapper, HyDrive
         //新增主键id
         hyDriverInfo.setId(IdGenerator.generateUUID());
         hyDriverInfo.setFirstFlag("1");
-        hyDriverInfo.setAdvancePayment(0.5d);
+        hyDriverInfo.setAdvancePayment(0.7d);
         hyDriverInfo.setAuthenticationStatusKey(StatusEnum.IDENTITY_REVIEWED.getFlag());
         hyDriverInfo.setAuthenticationStatus(StatusEnum.IDENTITY_REVIEWED.getName());
         //判断司机电话是否唯一

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

@@ -44,7 +44,6 @@ public class DriverPayeeInfoServiceImpl extends ServiceImpl<DriverPayeeInfoMappe
         List<HyDriverPayeeInfo> hyDriverPayeeInfoList = this.selectList(new EntityWrapper<HyDriverPayeeInfo>()
                 .eq(HyDriverPayeeInfo.QueryFiles.DRIVER_ID, hyDriverPayeeInfo.getDriverId())
                 .eq(HyDriverPayeeInfo.QueryFiles.DELETE_FLAG, NumberConstant.CONSTANT0));
-
         return hyDriverPayeeInfoList;
     }
 

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

@@ -129,7 +129,7 @@ public class FeedbackReportServiceImpl extends ServiceImpl<FeedbackReportMapper,
             this.updateById(feedbackReport);
         }
         //回复
-        else {
+        else if ("2".equals(feedbackReport.getEditFlag())){
             //编辑投诉举报信息
             feedbackReport.setStatusKey(StatusEnum.PROCESSED.getFlag());
             feedbackReport.setStatus(StatusEnum.PROCESSED.getName());

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

@@ -0,0 +1,35 @@
+package com.yh.saas.plugin.yiliangyiyun.service.impl;
+
+import com.baomidou.mybatisplus.mapper.EntityWrapper;
+import com.yh.saas.plugin.yiliangyiyun.entity.HyDriverCapitalInfo;
+import com.yh.saas.plugin.yiliangyiyun.mapper.HyDriverCapitalInfoMapper;
+import com.yh.saas.plugin.yiliangyiyun.service.IHyDriverCapitalInfoService;
+import com.baomidou.mybatisplus.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * <p>
+ * 记录司机资金流水信息 服务实现类
+ * </p>
+ *
+ * @author Gdc
+ * @since 2022-06-24
+ */
+@Service
+public class HyDriverCapitalInfoServiceImpl extends ServiceImpl<HyDriverCapitalInfoMapper, HyDriverCapitalInfo> implements IHyDriverCapitalInfoService {
+
+    /**
+     * 账单列表
+     * @param hyDriverCapitalInfo
+     * @return
+     */
+    @Override
+    public List<HyDriverCapitalInfo> billList(HyDriverCapitalInfo hyDriverCapitalInfo){
+        //根据用户id查询司机账单list
+        List<HyDriverCapitalInfo> hyDriverCapitalInfoList = this.selectList(new EntityWrapper<HyDriverCapitalInfo>()
+                .eq("common_id",hyDriverCapitalInfo.getCommonId()).eq("delete_flag","0"));
+        return hyDriverCapitalInfoList;
+    }
+}

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

@@ -69,6 +69,8 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
     private IDriverInfoService driverInfoService;
     @Autowired
     private PdfUtil pdfUtil;
+    @Autowired
+    private ICargoOwnerInfoService cargoOwnerInfoService;
 
     /**
      * 司机订单列表
@@ -404,6 +406,22 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
             orderInfo1.setCargoOwnerStatus(StatusEnum.OWNER_ORDER_FINISH.getName());
             this.updateById(orderInfo1);
         }
+        //司机承运次数+1
+        HyDriverInfo hyDriverInfo = driverInfoService.selectOne(new EntityWrapper<HyDriverInfo>()
+            .eq("common_id",orderInfo1.getCommonId()).eq("delete_flag","0"));
+        if (hyDriverInfo != null){
+            Long count = hyDriverInfo.getShipmentsNumber() + 1;
+            hyDriverInfo.setShipmentsNumber(count);
+            driverInfoService.updateById(hyDriverInfo);
+        }
+        //货主发运次数+1
+        HyCargoOwnerInfo hyCargoOwnerInfo = cargoOwnerInfoService.selectOne(new EntityWrapper<HyCargoOwnerInfo>()
+                .eq("common_id",orderInfo1.getCargoCommonId()).eq("delete_flag","0"));
+        if (hyCargoOwnerInfo != null){
+            Long count = hyCargoOwnerInfo.getShipmentsNumber() + 1;
+            hyCargoOwnerInfo.setShipmentsNumber(count);
+            cargoOwnerInfoService.updateById(hyCargoOwnerInfo);
+        }
         return "ok";
     }
 
@@ -544,8 +562,8 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
                     //确认卸车更改订单状态
                     orderInfo1.setOrderStatus(StatusEnum.DRIVER_ORDER_SETTLEMENT.getName());
                     orderInfo1.setOrderStatusKey(StatusEnum.DRIVER_ORDER_SETTLEMENT.getFlag());
-                    orderInfo1.setCargoOwnerStatus(StatusEnum.DRIVER_ORDER_SETTLEMENT.getName());
-                    orderInfo1.setCargoOwnerStatusKey(StatusEnum.DRIVER_ORDER_SETTLEMENT.getFlag());
+                    orderInfo1.setCargoOwnerStatus(StatusEnum.OWNER_ORDER_SETTLEMENTED.getName());
+                    orderInfo1.setCargoOwnerStatusKey(StatusEnum.OWNER_ORDER_SETTLEMENTED.getFlag());
                 } else {
                     //驳回卸车更改订单状态
                     orderInfo1.setOrderStatus(StatusEnum.PLATFORM_REJECT_UNLOAD.getName());

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

@@ -1131,9 +1131,11 @@ public class PublishTaskInfoServiceImpl extends ServiceImpl<PublishTaskInfoMappe
         //查询货主身份授权是否到期
         HyCargoOwnerCompInfo hyCargoOwnerCompInfo = cargoOwnerCompInfoService.selectOne(new EntityWrapper<HyCargoOwnerCompInfo>().eq("common_id",publishTaskInfo.getCommonId())
                 .eq("delete_flag", "0"));
-        boolean cancelled = "11".equals(hyCargoOwnerCompInfo.getStatusKey()) || "17".equals(hyCargoOwnerCompInfo.getStatusKey());
-        if (cancelled) {
-            throw new YException(YExceptionEnum.TASK_CANCELLED);
+        if (hyCargoOwnerCompInfo != null){
+            boolean cancelled = "11".equals(hyCargoOwnerCompInfo.getStatusKey()) || "17".equals(hyCargoOwnerCompInfo.getStatusKey());
+            if (cancelled) {
+                throw new YException(YExceptionEnum.TASK_CANCELLED);
+            }
         }
         //获取当前年月日
         SimpleDateFormat f = new SimpleDateFormat("yyyyMMdd");//设置日期格式

+ 54 - 34
winsea-haixin-plugin-wangluohuoyun/src/main/resources/mapper/CargoOwnerInfoMapper.xml

@@ -5,30 +5,37 @@
     <!-- 获得货主总数 -->
     <select id="getCountByCondition" parameterType="Map" resultType="java.lang.Integer">
         select
-        count(id)
-        FROM hy_cargo_owner_info
-        WHERE
-        delete_flag = '0'
+        count(c.id)
+        FROM common_user c
+        LEFT JOIN hy_cargo_owner_info o on c.id = o.common_id and o.delete_flag = 0
+        WHERE c.delete_flag = '0'
+        AND c.identification = '2'
         <if test="searchType != null and searchType != ''">
             <if test="searchType == 1">
-                AND authentication_status_key = '1'
+                AND o.authentication_status_key = '1'
             </if>
             <if test="searchType == 2">
-                AND authentication_status_key = '3'
+                AND o.authentication_status_key = '5'
             </if>
             <if test="searchType == 3">
-                AND authentication_status_key = '5'
+                AND o.authentication_status_key = '3'
             </if>
             <if test="searchType == 4">
-                AND authentication_status_key = '7'
+                AND o.authentication_status_key = '9'
             </if>
             <if test="searchType == 5">
-                AND authentication_status_key = '9'
+                AND ISNULL(o.id)
+            </if>
+            <if test="searchType == 6">
+                AND o.authentication_status_key = '11'
+            </if>
+            <if test="searchType == 7">
+                AND o.authentication_status_key = '7'
             </if>
         </if>
         <if test="searchKeyWord != null and searchKeyWord != ''">
-            AND (lower(name) like lower(CONCAT('%',#{searchKeyWord},'%'))
-            OR lower(phone) like lower(CONCAT('%',#{searchKeyWord},'%')))
+            AND (lower(o.name) like lower(CONCAT('%',#{searchKeyWord},'%'))
+            OR lower(o.phone) like lower(CONCAT('%',#{searchKeyWord},'%')))
         </if>
     </select>
 
@@ -38,44 +45,57 @@
     <select id="getListByCondition" parameterType="Map"
             resultType="com.yh.saas.plugin.yiliangyiyun.entity.HyCargoOwnerInfo">
         SELECT
-        c.id,
-        c.name,
-        c.common_id as commonId,
-        c.comp_id as compId,
-        c.card_address_url as cardAddressUrl,
-        c.card_back_address_url as cardBackAddressUrl,
-        c.phone,
-        c.card_number as cardNumber,
-        c.card_validity_date as cardValidityDate,
-        c.authentication_status_key as authenticationStatusKey,
-        c.authentication_status as authenticationStatus,
-        c.update_date as updateDate,
-        cu.avatar_url as avatarUrl
-        FROM hy_cargo_owner_info c
-        LEFT JOIN common_user cu on cu.id = c.common_id and cu.delete_flag = 0
+        o.id,
+        o.common_id as commonId,
+        case when o.name is null then c.user_name else o.name end as name,
+        c.phone as phone,
+        o.card_number as cardNumber,
+        o.card_address_url as cardAddressUrl,
+        o.card_back_address_url as cardBackAddressUrl,
+        o.card_validity_date as cardValidityDate,
+        o.shipments_number as shipmentsNumber,
+        o.favorable_rate as favorableRate,
+        o.advance_payment as advancePayment,
+        o.accumulated_freight as accumulatedFreight,
+        GROUP_CONCAT(co.company) as proxyIdentity,
+        o.authentication_status_key as authenticationStatusKey,
+        case when o.authentication_status is null then '未认证' else o.authentication_status end as authenticationStatus,
+        o.create_date as createDate,
+        o.update_date as updateDate
+        FROM common_user c
+        LEFT JOIN hy_cargo_owner_info o on c.id = o.common_id and o.delete_flag = '0'
+        LEFT JOIN hy_cargo_owner_comp_info co on o.id = co.cargo_owner_id and co.delete_flag = '0'
         WHERE c.delete_flag = '0'
+        AND c.identification = '2'
         <if test="searchType != null and searchType != ''">
             <if test="searchType == 1">
-                AND c.authentication_status_key = '1'
+                AND o.authentication_status_key = '1'
             </if>
             <if test="searchType == 2">
-                AND c.authentication_status_key = '3'
+                AND o.authentication_status_key = '5'
             </if>
             <if test="searchType == 3">
-                AND c.authentication_status_key = '5'
+                AND o.authentication_status_key = '3'
             </if>
             <if test="searchType == 4">
-                AND c.authentication_status_key = '7'
+                AND o.authentication_status_key = '9'
             </if>
             <if test="searchType == 5">
-                AND c.authentication_status_key = '9'
+                AND ISNULL(o.id)
+            </if>
+            <if test="searchType == 6">
+                AND o.authentication_status_key = '11'
+            </if>
+            <if test="searchType == 7">
+                AND o.authentication_status_key = '7'
             </if>
         </if>
         <if test="searchKeyWord != null and searchKeyWord != ''">
-            AND (lower(c.name) like lower(CONCAT('%',#{searchKeyWord},'%'))
-            OR lower(c.phone) like lower(CONCAT('%',#{searchKeyWord},'%')))
+            AND (lower(o.name) like lower(CONCAT('%',#{searchKeyWord},'%'))
+            OR lower(o.phone) like lower(CONCAT('%',#{searchKeyWord},'%')))
         </if>
-        ORDER BY c.update_date DESC
+        GROUP BY o.common_id
+        ORDER BY o.authentication_status_key ASC,o.update_date DESC
         <if test="currentPage != null and currentPage != ''">
             LIMIT ${startRecord}, ${pageSize}
         </if>

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

@@ -13,7 +13,7 @@
         FROM
             common_user
         WHERE
-            phone = #{phone} AND `password` = #{cryptPassword}
+            phone = #{phone} AND `password` = #{cryptPassword} AND `identification` = #{identification}
             and
             delete_flag ='0'
     </select>

+ 12 - 7
winsea-haixin-plugin-wangluohuoyun/src/main/resources/mapper/CompanyInfoMapper.xml

@@ -45,10 +45,13 @@
                 AND c.status_key = '1'
             </if>
             <if test="searchType == 2">
-                AND c.status_key = '3'
+                AND c.status_key = '5'
             </if>
             <if test="searchType == 3">
-                AND c.status_key = '5'
+                AND c.status_key = '3'
+            </if>
+            <if test="searchType == 4">
+                AND c.status_key = '7'
             </if>
         </if>
         <if test="searchKeyWord != null and searchKeyWord != ''">
@@ -57,6 +60,7 @@
             OR lower(cu.phone) like lower(CONCAT('%',#{searchKeyWord},'%')))
         </if>
     </select>
+
     <!-- 获得公司列表后台管理 -->
     <select id="getListByConditions" parameterType="Map"
             resultType="com.yh.saas.plugin.yiliangyiyun.entity.HyCompanyInfo">
@@ -65,6 +69,8 @@
         c.company_name as companyName,
         c.unified_social_credit_code as unifiedSocialCreditCode,
         c.legal_person_name as legalPersonName,
+        c.account_balance as accountBalance,
+        c.frozen_amount as frozenAmount,
         c.phone,
         c.land_ownership as landOwnership,
         c.site_lease_date as siteLeaseDate,
@@ -77,8 +83,7 @@
         c.status,
         c.create_date as createDate,
         c.update_date as updateDate,
-        cu.phone as accountNumber,
-        cu.avatar_url as avatarUrl
+        cu.phone as accountNumber
         FROM hy_company_info c
         LEFT JOIN common_user cu on cu.id = c.common_id and cu.delete_flag = 0
         WHERE c.delete_flag = '0'
@@ -87,10 +92,10 @@
                 AND c.status_key = '1'
             </if>
             <if test="searchType == 2">
-                AND c.status_key = '3'
+                AND c.status_key = '5'
             </if>
             <if test="searchType == 3">
-                AND c.status_key = '5'
+                AND c.status_key = '3'
             </if>
             <if test="searchType == 4">
                 AND c.status_key = '7'
@@ -101,7 +106,7 @@
             OR lower(c.company_name) like lower(CONCAT('%',#{searchKeyWord},'%'))
             OR lower(cu.phone) like lower(CONCAT('%',#{searchKeyWord},'%')))
         </if>
-        ORDER BY c.create_date DESC
+        ORDER BY c.status_key ASC,c.create_date DESC
         <if test="currentPage != null and currentPage != ''">
             LIMIT ${startRecord}, ${pageSize}
         </if>

+ 53 - 16
winsea-haixin-plugin-wangluohuoyun/src/main/resources/mapper/DriverCarInfoMapper.xml

@@ -6,17 +6,27 @@
         select
         count(c.id)
         FROM hy_driver_info d
-        left join hy_driver_car_info c on d.id=c.driver_id and c.delete_flag = 0
+        left join hy_driver_car_info c on d.id=c.driver_id
         WHERE d.delete_flag = '0'
         <if test="searchType != null and searchType != ''">
             <if test="searchType == 1">
                 AND c.status_key = '1'
+                AND c.delete_flag = '0'
             </if>
             <if test="searchType == 2">
-                AND c.status_key = '3'
+                AND c.status_key = '5'
+                AND c.delete_flag = '0'
             </if>
             <if test="searchType == 3">
-                AND c.status_key = '5'
+                AND c.status_key = '3'
+                AND c.delete_flag = '0'
+            </if>
+            <if test="searchType == 4">
+                AND c.delete_flag = '1'
+            </if>
+            <if test="searchType == 5">
+                AND c.status_key = '11'
+                AND c.delete_flag = '0'
             </if>
         </if>
         <if test="searchKeyWord != null and searchKeyWord != ''">
@@ -33,36 +43,63 @@
         d.driver_name as driverName,
         d.driver_phone as driverPhone,
         d.number_card as numberCard,
+        c.car_type as carType,
+        c.car_category as carCategory,
         c.car_number as carNumber,
-        c.address_url as addressUrl,
-        d.card_address_url as cardAddressUrl,
-        d.card_back_address_url as cardBackAddressUrl,
-        c.operation_certificate as operationCertificate,
-        c.trailer_operation_certificate as trailerOperationCertificate,
+        c.gua_car_number as guaCarNumber,
         c.driving_license_home_page as drivingLicenseHomePage,
         c.driving_license_back_page as drivingLicenseBackPage,
+        c.driving_license_number as drivingLicenseNumber,
+        c.driving_license_registration_date as drivingLicenseRegistrationDate,
+        c.driving_license_issue_date as drivingLicenseIssueDate,
+        c.driving_license_validity_date as drivingLicenseValidityDate,
+        c.lssuing_authority as lssuingAuthority,
         c.trailer_license_home_page as trailerLicenseHomePage,
         c.trailer_license_back_page as trailerLicenseBackPage,
+        c.trailer_license_number as trailerLicenseNumber,
+        c.trailer_license_registration_date as trailerLicenseRegistrationDate,
+        c.trailer_license_issue_date as trailerLicenseIssueDate,
+        c.trailer_license_validity_date as trailerLicenseValidityDate,
+        c.gua_lssuing_authority as guaLssuingAuthority,
+        c.operation_certificate as operationCertificate,
+        c.trailer_operation_certificate as trailerOperationCertificate,
+        c.operation_certificate_number as operationCertificateNumber,
+        c.operation_certificate_validity_date as operationCertificateValidityDate,
+        c.trailer_operation_certificate_number as trailerOperationCertificateNumber,
+        c.trailer_operation_certificate_validity_date as trailerOperationCertificateValidityDate,
+        c.address_url as addressUrl,
+        c.gua_address_url as guaAddressUrl,
+        d.card_address_url as cardAddressUrl,
+        d.card_back_address_url as cardBackAddressUrl,
         c.driving_overdue_flag as drivingOverdueFlag,
         c.trailer_overdue_flag as trailerOverdueFlag,
         c.operation_overdue_flag as operationOverdueFlag,
         c.trailer_operation_overdue_flag as trailerOperationOverdueFlag,
-        c.status,
-        c.update_date as updateDate,
-        cu.avatar_url as avatarUrl
+        case when c.delete_flag = '1' then '已删除' else c.status end as status,
+        c.create_date as createDate,
+        c.update_date as updateDate
         FROM hy_driver_info d
-        left join hy_driver_car_info c on d.id=c.driver_id and c.delete_flag = 0
-        LEFT JOIN common_user cu on cu.id = d.common_id and cu.delete_flag = 0
+        left join hy_driver_car_info c on d.id=c.driver_id
         WHERE d.delete_flag = '0'
         <if test="searchType != null and searchType != ''">
             <if test="searchType == 1">
                 AND c.status_key = '1'
+                AND c.delete_flag = '0'
             </if>
             <if test="searchType == 2">
-                AND c.status_key = '3'
+                AND c.status_key = '5'
+                AND c.delete_flag = '0'
             </if>
             <if test="searchType == 3">
-                AND c.status_key = '5'
+                AND c.status_key = '3'
+                AND c.delete_flag = '0'
+            </if>
+            <if test="searchType == 4">
+                AND c.delete_flag = '1'
+            </if>
+            <if test="searchType == 5">
+                AND c.status_key = '11'
+                AND c.delete_flag = '0'
             </if>
         </if>
         <if test="searchKeyWord != null and searchKeyWord != ''">
@@ -70,7 +107,7 @@
             OR lower(d.driver_phone) like lower(CONCAT('%',#{searchKeyWord},'%'))
             OR lower(c.car_number) like lower(CONCAT('%',#{searchKeyWord},'%')))
         </if>
-        ORDER BY c.update_date DESC
+        ORDER BY c.status_key ASC,c.update_date DESC
         <if test="currentPage != null and currentPage != ''">
             LIMIT ${startRecord}, ${pageSize}
         </if>

+ 80 - 43
winsea-haixin-plugin-wangluohuoyun/src/main/resources/mapper/DriverInfoMapper.xml

@@ -5,34 +5,47 @@
 
     <!-- 获得司机总数 -->
     <select id="getCountByCondition" parameterType="Map" resultType="java.lang.Integer">
-    select
-    count(id)
-    FROM hy_driver_info
-    WHERE
-    delete_flag = '0'
-    <if test="searchType != null and searchType != ''">
-        <if test="searchType == 1">
-            AND authentication_status_key = '1'
-        </if>
-        <if test="searchType == 2">
-            AND authentication_status_key = '3'
-        </if>
-        <if test="searchType == 3">
-            AND authentication_status_key = '5'
-        </if>
-        <if test="searchType == 4">
-            AND authentication_status_key = '7'
+        select
+        count(c.id)
+        FROM common_user c
+        LEFT JOIN hy_driver_info d on c.id = d.common_id and d.delete_flag = 0
+        WHERE c.delete_flag = '0'
+        AND c.identification = '1'
+        <if test="searchType != null and searchType != ''">
+            <if test="searchType == 1">
+                AND d.authentication_status_key = '1'
+            </if>
+            <if test="searchType == 2">
+                AND d.authentication_status_key = '5'
+            </if>
+            <if test="searchType == 3">
+                AND d.authentication_status_key = '3'
+            </if>
+            <if test="searchType == 4">
+                AND d.authentication_status_key = '9'
+            </if>
+            <if test="searchType == 5">
+                AND d.authentication_status_key = '11'
+            </if>
+            <if test="searchType == 6">
+                AND d.authentication_status_key = '7'
+            </if>
+            <if test="searchType == 7">
+                AND ISNULL(d.id)
+            </if>
+            <if test="searchType == 8">
+                AND (((select COUNT(DISTINCT f.common_id) FROM hy_feedback_report f where f.passive_common_id = d.common_id and f.delete_flag = 0
+                and f.object_flag = 1 and DATE_SUB(NOW(),INTERVAL 1 YEAR)) >= 3)
+                OR (d.complaints_number + d.reported_number) >= 10)
+            </if>
         </if>
-        <if test="searchType == 5">
-            AND authentication_status_key = '9'
+        <if test="searchKeyWord != null and searchKeyWord != ''">
+            AND (lower(d.driver_name) like lower(CONCAT('%',#{searchKeyWord},'%'))
+            OR lower(d.driver_phone) like lower(CONCAT('%',#{searchKeyWord},'%'))
+            OR lower(d.number_card) like lower(CONCAT('%',#{searchKeyWord},'%'))
+            OR lower(c.user_name) like lower(CONCAT('%',#{searchKeyWord},'%'))
+            OR lower(c.phone) like lower(CONCAT('%',#{searchKeyWord},'%')))
         </if>
-    </if>
-    <if test="searchKeyWord != null and searchKeyWord != ''">
-        AND (lower(driver_name) like lower(CONCAT('%',#{searchKeyWord},'%'))
-        OR lower(driver_phone) like lower(CONCAT('%',#{searchKeyWord},'%'))
-        OR lower(number_card) like lower(CONCAT('%',#{searchKeyWord},'%'))
-        OR lower(number_card) like lower(CONCAT('%',#{searchKeyWord},'%')))
-    </if>
     </select>
 
 
@@ -43,49 +56,73 @@
         SELECT
         d.id,
         d.common_id as commonId,
-        d.driver_name as driverName,
-        d.driver_phone as driverPhone,
+        case when d.driver_name is null then c.user_name else d.driver_name end as driverName,
+        case when d.driver_phone is null then c.phone else d.driver_phone end as driverPhone,
         d.number_card as numberCard,
+        d.shipments_number as shipmentsNumber,
+        d.favorable_rate as favorableRate,
+        d.complaints_number as complaintsNumber,
+        d.reported_number as reportedNumber,
+        d.accumulated_freight as accumulatedFreight,
+        d.advance_payment as advancePayment,
         d.card_address_url as cardAddressUrl,
         d.card_back_address_url as cardBackAddressUrl,
+        d.card_validity_date as cardValidityDate,
         d.driver_license_home_page as driverLicenseHomePage,
         d.driver_license_back_page as driverLicenseBackPage,
+        d.driver_license_validity_date as driverLicenseValidityDate,
+        d.quasi_driving_vehicle as quasiDrivingVehicle,
+        d.lssuing_authority as lssuingAuthority,
         d.qualification_certificate as qualificationCertificate,
-        d.authentication_status_key as authenticationStatusKey,
-        d.authentication_status as authenticationStatus,
-        d.create_date as createDate,
-        d.update_date as updateDate,
+        d.qualification_certificate_validity_date as qualificationCertificateValidityDate,
+        d.qualification_certificate_number as qualificationCertificateNumber,
         d.overdue_flag as overdueFlag,
         d.driver_overdue_flag as driverOverdueFlag,
         d.qualification_overdue_flag as qualificationOverdueFlag,
-        d.advance_payment as advancePayment,
-        c.avatar_url as avatarUrl
-        FROM hy_driver_info d
-        LEFT JOIN common_user c on c.id = d.common_id and c.delete_flag = 0
-        WHERE d.delete_flag = '0'
+        d.authentication_status_key as authenticationStatusKey,
+        case when d.authentication_status is null then '未认证' else d.authentication_status end as authenticationStatus,
+        d.create_date as createDate,
+        d.update_date as updateDate
+        FROM common_user c
+        LEFT JOIN hy_driver_info d on c.id = d.common_id and d.delete_flag = 0
+        WHERE c.delete_flag = '0'
+        AND c.identification = '1'
         <if test="searchType != null and searchType != ''">
             <if test="searchType == 1">
                 AND d.authentication_status_key = '1'
             </if>
             <if test="searchType == 2">
-                AND d.authentication_status_key = '3'
+                AND d.authentication_status_key = '5'
             </if>
             <if test="searchType == 3">
-                AND d.authentication_status_key = '5'
+                AND d.authentication_status_key = '3'
             </if>
             <if test="searchType == 4">
-                AND d.authentication_status_key = '7'
+                AND d.authentication_status_key = '9'
             </if>
             <if test="searchType == 5">
-                AND d.authentication_status_key = '9'
+                AND d.authentication_status_key = '11'
+            </if>
+            <if test="searchType == 6">
+                AND d.authentication_status_key = '7'
+            </if>
+            <if test="searchType == 7">
+                AND ISNULL(d.id)
+            </if>
+            <if test="searchType == 8">
+                AND (((select COUNT(DISTINCT f.common_id) FROM hy_feedback_report f where f.passive_common_id = d.common_id and f.delete_flag = 0
+                and f.object_flag = 1 and DATE_SUB(NOW(),INTERVAL 1 YEAR)) >= 3)
+                OR (d.complaints_number + d.reported_number) >= 10)
             </if>
         </if>
         <if test="searchKeyWord != null and searchKeyWord != ''">
             AND (lower(d.driver_name) like lower(CONCAT('%',#{searchKeyWord},'%'))
             OR lower(d.driver_phone) like lower(CONCAT('%',#{searchKeyWord},'%'))
-            OR lower(d.number_card) like lower(CONCAT('%',#{searchKeyWord},'%')))
+            OR lower(d.number_card) like lower(CONCAT('%',#{searchKeyWord},'%'))
+            OR lower(c.user_name) like lower(CONCAT('%',#{searchKeyWord},'%'))
+            OR lower(c.phone) like lower(CONCAT('%',#{searchKeyWord},'%')))
         </if>
-        ORDER BY d.create_date DESC
+        ORDER BY d.authentication_status_key ASC,d.create_date DESC
         <if test="currentPage != null and currentPage != ''">
             LIMIT ${startRecord}, ${pageSize}
         </if>

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

@@ -46,7 +46,7 @@
         SELECT
         id,
         number,
-        common_id as driverName,
+        common_id as commonId,
         initiator,
         initiator_number as initiatorNumber,
         passive_common_id as passiveCommonId,
@@ -80,7 +80,7 @@
             OR lower(passive_number) like lower(CONCAT('%',#{searchKeyWord},'%'))
             OR lower(content) like lower(CONCAT('%',#{searchKeyWord},'%')))
         </if>
-        ORDER BY status_key DESC,create_date DESC
+        ORDER BY status_key ASC,create_date DESC
         <if test="currentPage != null and currentPage != ''">
             LIMIT ${startRecord}, ${pageSize}
         </if>

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

@@ -125,7 +125,7 @@
             OR lower(d.driver_phone) like lower(CONCAT('%',#{searchKeyWord},'%'))
             OR lower(f.fleet_name) like lower(CONCAT('%',#{searchKeyWord},'%')))
         </if>
-        ORDER BY f.status_key DESC,f.update_date DESC
+        ORDER BY f.status_key ASC,f.update_date DESC
         <if test="currentPage != null and currentPage != ''">
             LIMIT ${startRecord}, ${pageSize}
         </if>

+ 5 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/resources/mapper/HyDriverCapitalInfoMapper.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.yh.saas.plugin.yiliangyiyun.mapper.HyDriverCapitalInfoMapper">
+
+</mapper>