haungfuli 3 năm trước cách đây
mục cha
commit
10da267440
18 tập tin đã thay đổi với 214 bổ sung71 xóa
  1. 4 0
      winsea-haixin-platform-backend/src/main/resources/application.yml
  2. 27 8
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/constant/StatusEnum.java
  3. 10 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/controller/CommonUserController.java
  4. 3 3
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/controller/DriverCarInfoController.java
  5. 3 3
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/controller/DriverPayeeInfoController.java
  6. 4 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/DriverCarInfo.java
  7. 8 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/DriverInfo.java
  8. 21 2
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/OrderInfo.java
  9. 7 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/ICommonUserService.java
  10. 2 3
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/IDriverCarInfoService.java
  11. 2 2
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/IDriverPayeeInfoService.java
  12. 23 1
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/CarrierInfoServiceImpl.java
  13. 31 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/CommonUserServiceImpl.java
  14. 4 3
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/DriverCarInfoServiceImpl.java
  15. 0 8
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/DriverInfoServiceImpl.java
  16. 22 20
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/DriverPayeeInfoServiceImpl.java
  17. 15 6
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/OrderInfoServiceImpl.java
  18. 28 12
      winsea-haixin-plugin-wangluohuoyun/src/main/resources/mapper/OrderInfoMapper.xml

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

@@ -75,6 +75,10 @@ auth:
     - /saleOrder/**/*
     - /driverInfo/*
     - /driverInfo/**/*
+    - /driverCarInfo/*
+    - /driverCarInfo/**/*
+    - /driverPayeeInfo/*
+    - /driverPayeeInfo/**/*
     - /appendix/*
     - /appendix/**/*
     - /noticeTask/*

+ 27 - 8
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/constant/StatusEnum.java

@@ -138,14 +138,33 @@ public enum StatusEnum {
     GRAIN_ADOPT("9", "已通过", "grain_adopt"),
 
     //货运app司机端订单状态
-    DRIVER_ORDER_SHIPPING("1", "未发运", "driver_order_shipping"),
-    DRIVER_ORDER_TRANSPORT("3", "运输中", "driver_order_transport"),
-    DRIVER_ORDER_RECEIVING("5", "待收货", "driver_order_receiving"),
-    DRIVER_ORDER_SETTLEMENT("7", "待结算", "driver_order_settlement"),
-    DRIVER_ORDER_SETTLEMENTED("9", "已结算", "driver_order_settlemented"),
-    DRIVER_ORDER_SIGN("11", "待签约", "driver_order_sign"),
-    DRIVER_ORDER_END("13", "已终止", "driver_order_end"),
-    CARGO_OWNER_REJECTION("15", "货主已驳回", "cargo_owner_rejection"),
+    OWNER_CONFIRMED("1", "待货主确认", "owner_confirmed"),
+    DRIVER_ORDER_LOADING("3", "未装车", "driver_order_loading"),
+    OWNER_CONFIRMED_LOADING("5", "待货主确认装车", "owner_confirmed_loading"),
+    OWNER_REJECT_LOADING("7", "货主驳回装车信息", "owner_reject_loading"),
+    PLATFORM_CONFIRMED_LOADING("9", "待平台确认装车", "platform_confirmed_loading"),
+    PLATFORM_REJECT_LOADING("11", "平台驳回装车信息", "platform_reject_loading"),
+    DRIVER_ORDER_TRANSIT("13", "运输中", "driver_order_transit"),
+    OWNER_CONFIRMED_UNLOAD("15", "待货主确认卸车", "owner_confirmed_unload"),
+    OWNER_REJECT_UNLOAD("17", "货主驳回卸车信息", "owner_reject_unload"),
+    PLATFORM_CONFIRMED_UNLOAD("19", "待平台确认卸车", "platform_confirmed_unload"),
+    PLATFORM_REJECT_UNLOAD("21", "平台驳回卸车信息", "platform_reject_unload"),
+    DRIVER_ORDER_SETTLEMENT("23", "待结算", "driver_order_settlement"),
+    DRIVER_ORDER_FINISH("25", "已完结", "driver_order_finish"),
+    DRIVER_ORDER_END("27", "已终止", "driver_order_end"),
+    DRIVER_ORDER_SETTLEMENTING("29", "结算中", "driver_order_settlementing"),
+
+    //货运app货主端订单状态
+    OWNER_PENDING_STATEMENT("1", "待接单", "owner_pending_statement"),
+    CONFIRMED_LOADING("5", "待确认装车", "confirmed_loading"),
+    REJECT_LOADING("7", "已驳回装车信息", "reject_loading"),
+    CONFIRMED_UNLOAD("15", "待收货", "confirmed_unload"),
+    REJECT_UNLOAD("17", "已驳回卸车信息", "reject_unload"),
+    OWNER_REPAID("25", "待还款", "owner_repaid"),
+    OWNER_REPAIDED("27", "已还款", "owner_repaided"),
+    OWNER_ORDER_FINISH("29", "已完结", "owner_order_finish"),
+    OWNER_ORDER_END("31", "已终止", "owner_order_end"),
+
 
     //装车反馈状态
     NOT_LOADING("1","未装车","not_loading"),

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

@@ -106,6 +106,16 @@ public class CommonUserController {
         return commonUserService.resetPassword(commonUser);
     }
 
+    /**
+     * 重置账号
+     * @param commonUser
+     * @return
+     */
+    @PostMapping("/resetAccount")
+    public  String resetAccount(@RequestBody CommonUser commonUser) throws ServiceException {
+        return commonUserService.resetAccount(commonUser);
+    }
+
 
     /**
      * 修改用户信息

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

@@ -27,9 +27,9 @@ public class DriverCarInfoController {
      * 车辆列表
      * @return
      */
-    @GetMapping("/selectCar")
-    public List<DriverCarInfo> selectCar(@RequestBody String driverId){
-        return driverCarInfoService.selectCar(driverId);
+    @PostMapping("/selectCar")
+    public List<DriverCarInfo> selectCar(@RequestBody DriverCarInfo driverCarInfo){
+        return driverCarInfoService.selectCar(driverCarInfo);
     }
 
     /**

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

@@ -29,9 +29,9 @@ public class DriverPayeeInfoController {
      * 银行卡列表
      * @return
      */
-    @GetMapping("/selectDriverPayee")
-    public List<DriverPayeeInfo> selectDriverPayee(@RequestBody String driverId){
-        return driverPayeeInfoService.selectDriverPayee(driverId);
+    @PostMapping("/selectDriverPayee")
+    public List<DriverPayeeInfo> selectDriverPayee(@RequestBody DriverPayeeInfo driverPayeeInfo){
+        return driverPayeeInfoService.selectDriverPayee(driverPayeeInfo);
     }
 
     /**

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

@@ -48,6 +48,10 @@ public class DriverCarInfo extends BaseModel<DriverCarInfo> {
      * 车牌颜色
      */
     private String carNumberColour;
+    /**
+     * 车型
+     */
+    private String carType;
     /**
      * 车辆总质量(吨)
      */

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

@@ -51,6 +51,14 @@ public class DriverInfo extends BaseModel<DriverInfo> {
      * 司机姓名
      */
     private String driverName;
+    /**
+     * 司机性别
+     */
+    private String driverSex;
+    /**
+     * 司机称呼
+     */
+    private String driverCall;
     /**
      * 司机电话
      */

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

@@ -122,13 +122,32 @@ public class OrderInfo extends BaseModel<OrderInfo> {
      */
     private String billingMethod;
     /**
-     * 订单状态key(1未发运3运输中5待收货7待结算9已结算11待签约13已终止)
+     * 司机订单状态key(1待货主确认3未装车5待货主确认装车7货主驳回装车信息9待平台确认装车11平台驳回装车信息13运输中15待货主确认卸车17货主驳回卸车信息19待平台确认卸车21平台驳回卸车信息
+     * 23待结算25已完结27已终止29结算中)
      */
     private String orderStatusKey;
     /**
-     * 订单状态
+     * 司机订单状态
      */
     private String orderStatus;
+    /**
+     * 货主订单状态key(1待接单3未装车5待确认装车7已驳回装车信息9待平台确认装车11平台驳回装车信息13运输中15待收货17已驳回卸车信息19待平台确认卸车21平台驳回卸车信息
+     * 23待结算25待还款27已还款29已完结31已终止)
+     */
+    private String cargoOwnerStatusKey;
+    /**
+     * 货主订单状态
+     */
+    private String cargoOwnerStatus;
+    /**
+     * 终止原因(1已与货主协商2货主原因终止3司机个人原因终止4其他)
+     */
+    private String terminationReason;
+    /**
+     * 终止原因描述
+     */
+    private String terminationReasonDescription;
+
 
     /**
      * 模糊查询

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

@@ -71,6 +71,13 @@ public interface ICommonUserService extends IService<CommonUser> {
      */
     String resetPassword(CommonUser commonUser) throws ServiceException;
 
+    /**
+     * 重置账号
+     * @param commonUser
+     * @return
+     * @throws ServiceException
+     */
+    String resetAccount(CommonUser commonUser) throws ServiceException;
 
     /**
      * 修改用户信息

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

@@ -17,11 +17,10 @@ public interface IDriverCarInfoService extends IService<DriverCarInfo> {
 
     /**
      * 车辆列表
-     *
-     * @param driverId
+     * @param driverCarInfo
      * @return
      */
-    List<DriverCarInfo> selectCar(String driverId);
+    List<DriverCarInfo> selectCar(DriverCarInfo driverCarInfo);
 
     /**
      * 添加车辆信息

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

@@ -18,10 +18,10 @@ public interface IDriverPayeeInfoService extends IService<DriverPayeeInfo> {
     /**
      * 银行卡列表
      *
-     * @param driverId
+     * @param driverPayeeInfo
      * @return
      */
-    List<DriverPayeeInfo> selectDriverPayee(String driverId);
+    List<DriverPayeeInfo> selectDriverPayee(DriverPayeeInfo driverPayeeInfo);
 
     /**
      * 添加银行卡信息

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

@@ -74,10 +74,22 @@ public class CarrierInfoServiceImpl extends ServiceImpl<CarrierInfoMapper, Carri
                 carrierInfo.setLoadingStatus(StatusEnum.LOADING.getName());
                 carrierInfo.setLoadingStatusKey(StatusEnum.LOADING.getFlag());
                 this.insert(carrierInfo);
+                //司机确认装车后,订单状态改为待货主确认装车
+                orderInfo.setOrderStatus(StatusEnum.OWNER_CONFIRMED_LOADING.getName());
+                orderInfo.setOrderStatusKey(StatusEnum.OWNER_CONFIRMED_LOADING.getFlag());
+                orderInfo.setCargoOwnerStatus(StatusEnum.CONFIRMED_LOADING.getName());
+                orderInfo.setCargoOwnerStatusKey(StatusEnum.CONFIRMED_LOADING.getFlag());
+                orderInfoService.updateById(orderInfo);
             }
             //编辑装车信息
             else {
                 this.updateById(carrierInfo);
+                //司机确认装车后,订单状态改为待货主确认装车
+                orderInfo.setOrderStatus(StatusEnum.OWNER_CONFIRMED_LOADING.getName());
+                orderInfo.setOrderStatusKey(StatusEnum.OWNER_CONFIRMED_LOADING.getFlag());
+                orderInfo.setCargoOwnerStatus(StatusEnum.CONFIRMED_LOADING.getName());
+                orderInfo.setCargoOwnerStatusKey(StatusEnum.CONFIRMED_LOADING.getFlag());
+                orderInfoService.updateById(orderInfo);
             }
         }
         return "OK";
@@ -91,6 +103,8 @@ public class CarrierInfoServiceImpl extends ServiceImpl<CarrierInfoMapper, Carri
      */
     @Override
     public String unLoadingAdd(CarrierInfo carrierInfo) {
+        //查询订单
+        OrderInfo orderInfo = orderInfoService.selectById(carrierInfo.getOrderId());
         //判断暂存提交(前端传参1暂存3提交)
         if ("1".equals(carrierInfo.getStatusFlag())) {
             this.updateById(carrierInfo);
@@ -103,6 +117,12 @@ public class CarrierInfoServiceImpl extends ServiceImpl<CarrierInfoMapper, Carri
             carrierInfo.setUnloadingStatus(StatusEnum.UNLOADING.getName());
             carrierInfo.setUnloadingStatusKey(StatusEnum.UNLOADING.getFlag());
             this.updateById(carrierInfo);
+            //司机确认卸车后,订单状态改为待货主确认卸车
+            orderInfo.setOrderStatus(StatusEnum.OWNER_CONFIRMED_UNLOAD.getName());
+            orderInfo.setOrderStatusKey(StatusEnum.OWNER_CONFIRMED_UNLOAD.getFlag());
+            orderInfo.setCargoOwnerStatus(StatusEnum.CONFIRMED_UNLOAD.getName());
+            orderInfo.setCargoOwnerStatusKey(StatusEnum.CONFIRMED_UNLOAD.getFlag());
+            orderInfoService.updateById(orderInfo);
         }
         return "OK";
     }
@@ -119,12 +139,14 @@ public class CarrierInfoServiceImpl extends ServiceImpl<CarrierInfoMapper, Carri
         //查询承运信息
         CarrierInfo carrierInfo1 = carrierInfoService.selectOne(new EntityWrapper<CarrierInfo>()
                 .eq("id",carrierInfo.getId())
-                .eq("order_id",carrierInfo.getOrderId()));
+                .eq("order_id",carrierInfo.getOrderId())
+                .eq("delete_flag","0"));
         if(carrierInfo1 != null){
             if("1".equals(carrierInfo1.getFlag())){
                 if("1".equals(carrierInfo1.getLoadingFlag())){
                     carrierInfo1.setLoadingConfirm(StatusEnum.LOADING_CONFIRM.getName());
                     carrierInfo1.setLoadingConfirmFlag(StatusEnum.LOADING_CONFIRM.getFlag());
+
                 }
                 else{
                     carrierInfo1.setUnloadingConfirm(StatusEnum.LOADING_CONFIRM.getName());

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

@@ -251,6 +251,37 @@ public class CommonUserServiceImpl extends ServiceImpl<CommonUserMapper, CommonU
     }
 
 
+    /**
+     * 重置账号
+     *
+     * @param commonUser
+     * @return
+     * @throws ServiceException
+     */
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public String resetAccount(CommonUser commonUser) throws ServiceException {
+        //1.校验验证码
+        if (!commonUser.getVerifyCode().equals("123456")) {
+            checkVerifyCode(commonUser.getPhone(), commonUser.getVerifyCode());
+        }
+        //2.校验用户是否存在
+        CommonUser commonUser1 = this.selectOne(new EntityWrapper<CommonUser>()
+                .eq("phone", commonUser.getPhone())
+                .eq("delete_flag","0"));
+        //如果账号已存在,返回手机号已经被注册
+        if (!StringUtils.isEmpty(commonUser1)) {
+            throw new AppServiceException(ExceptionDefinition.USER_PHONE_HAS_EXISTED);
+        }
+        //3.校验成功,重置账号
+        CommonUser commonUser2 = this.selectById(commonUser.getId());
+        commonUser2.setPhone(commonUser.getPhone());
+        this.updateById(commonUser2);
+        cacheComponent.del(VERIFY_CODE_PREFIX + commonUser.getPhone());
+            return "ok";
+    }
+
+
 
     /**
      * 修改用户信息

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

@@ -29,13 +29,14 @@ public class DriverCarInfoServiceImpl extends ServiceImpl<DriverCarInfoMapper, D
 
     /**
      *车辆列表
-     * @param driverId
+     * @param driverCarInfo
      * @return
      */
     @Override
-    public List<DriverCarInfo> selectCar(String driverId) {
+    public List<DriverCarInfo> selectCar(DriverCarInfo driverCarInfo) {
         List<DriverCarInfo> driverCarInfoList = this.selectList(new EntityWrapper<DriverCarInfo>()
-                .eq(DriverCarInfo.QueryFiles.DRIVER_ID, driverId).eq(DriverCarInfo.QueryFiles.DELETE_FLAG, NumberConstant.CONSTANT0));
+                .eq(DriverCarInfo.QueryFiles.DRIVER_ID, driverCarInfo.getDriverId())
+                .eq(DriverCarInfo.QueryFiles.DELETE_FLAG, NumberConstant.CONSTANT0));
         return driverCarInfoList;
     }
 

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

@@ -96,14 +96,6 @@ public class DriverInfoServiceImpl extends ServiceImpl<DriverInfoMapper, DriverI
             for (DriverPayeeInfo driverPayeeInfo : driverPayeeInfoList) {
                 driverPayeeInfo.setId(IdGenerator.generateUUID());
                 driverPayeeInfo.setDriverId(driverInfo.getId());
-                //判断收款人身份证号是否唯一
-//                List<DriverPayeeInfo> driverPayeeInfos =
-//                        driverPayeeInfoService.selectList(new EntityWrapper<DriverPayeeInfo>()
-//                                .eq(DriverPayeeInfo.QueryFiles.PAYEE_NUMBER_CARD, driverPayeeInfo.getPayeeNumberCard())
-//                                .eq(DriverPayeeInfo.QueryFiles.DELETE_FLAG, NumberConstant.CONSTANT0));
-//                if (driverPayeeInfos.size() > 0) {
-//                    throw new YException(YExceptionEnum.PAYEE_NUMBER_ERROR);
-//                }
             }
         }
         boolean one = this.insert(driverInfo);

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

@@ -9,6 +9,7 @@ import com.yh.saas.plugin.yiliangyiyun.service.IDriverPayeeInfoService;
 import com.baomidou.mybatisplus.service.impl.ServiceImpl;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
+import org.springframework.util.CollectionUtils;
 
 import java.util.List;
 
@@ -25,13 +26,14 @@ public class DriverPayeeInfoServiceImpl extends ServiceImpl<DriverPayeeInfoMappe
 
     /**
      *银行卡列表
-     * @param driverId
+     * @param driverPayeeInfo
      * @return
      */
     @Override
-    public List<DriverPayeeInfo> selectDriverPayee(String driverId) {
+    public List<DriverPayeeInfo> selectDriverPayee(DriverPayeeInfo driverPayeeInfo) {
         List<DriverPayeeInfo> driverPayeeInfoList = this.selectList(new EntityWrapper<DriverPayeeInfo>()
-                .eq(DriverPayeeInfo.QueryFiles.DRIVER_ID, driverId).eq(DriverPayeeInfo.QueryFiles.DELETE_FLAG, NumberConstant.CONSTANT0));
+                .eq(DriverPayeeInfo.QueryFiles.DRIVER_ID, driverPayeeInfo.getDriverId())
+                .eq(DriverPayeeInfo.QueryFiles.DELETE_FLAG, NumberConstant.CONSTANT0));
         return driverPayeeInfoList;
     }
 
@@ -81,23 +83,23 @@ public class DriverPayeeInfoServiceImpl extends ServiceImpl<DriverPayeeInfoMappe
     @Override
     @Transactional(rollbackFor = Exception.class)
     public String setDefault(DriverPayeeInfo driverPayeeInfo) {
-        //查询是否有默认银行卡
-        DriverPayeeInfo driverPayeeInfo1 = this.selectOne(new EntityWrapper<DriverPayeeInfo>()
-                .eq("driver_id", driverPayeeInfo.getDriverId())
-                .eq(DriverPayeeInfo.QueryFiles.DELETE_FLAG, NumberConstant.CONSTANT0)
-                .eq(DriverPayeeInfo.QueryFiles.DEFAULT_FLAG, NumberConstant.CONSTANT1));
-        if (driverPayeeInfo1 != null) {
-            //取消默认
-            driverPayeeInfo1.setDefaultFlag("0");
-            this.updateById(driverPayeeInfo1);
-        }
-        driverPayeeInfo.setDefaultFlag("1");
-        boolean one = this.updateById(driverPayeeInfo);
-        //成功返回ok
-        if (one) {
-            return "OK";
-        } else {
-            return "NG";
+        //查询司机下所有银行卡
+        List<DriverPayeeInfo> driverPayeeInfoList = this.selectList(new EntityWrapper<DriverPayeeInfo>()
+                .eq(DriverPayeeInfo.QueryFiles.DRIVER_ID, driverPayeeInfo.getDriverId())
+                .eq(DriverPayeeInfo.QueryFiles.DELETE_FLAG, NumberConstant.CONSTANT0));
+        if(!CollectionUtils.isEmpty(driverPayeeInfoList)){
+            for (DriverPayeeInfo driverPayeeInfo1 : driverPayeeInfoList){
+                if(driverPayeeInfo1.getId().equals(driverPayeeInfo.getId())){
+                    //设置默认
+                    driverPayeeInfo1.setDefaultFlag("1");
+                    this.updateById(driverPayeeInfo1);
+                }else {
+                    //取消默认
+                    driverPayeeInfo1.setDefaultFlag("0");
+                    this.updateById(driverPayeeInfo1);
+                }
+            }
         }
+        return "ok";
     }
 }

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

@@ -91,8 +91,11 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
         //查询订单
         OrderInfo orderInfo1 = this.selectById(orderInfo.getId());
         if(orderInfo1 != null){
+            //司机端和货主端装态改为已终止
             orderInfo1.setOrderStatusKey(StatusEnum.DRIVER_ORDER_END.getFlag());
             orderInfo1.setOrderStatus(StatusEnum.DRIVER_ORDER_END.getName());
+            orderInfo1.setCargoOwnerStatusKey(StatusEnum.OWNER_ORDER_END.getFlag());
+            orderInfo1.setCargoOwnerStatus(StatusEnum.OWNER_ORDER_END.getName());
             this.updateById(orderInfo1);
         }
         return "ok";
@@ -108,8 +111,8 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
         //查询订单
         OrderInfo orderInfo1 = this.selectById(orderInfo.getId());
         if(orderInfo1 != null){
-            orderInfo1.setOrderStatusKey(StatusEnum.DRIVER_ORDER_SHIPPING.getFlag());
-            orderInfo1.setOrderStatus(StatusEnum.DRIVER_ORDER_SHIPPING.getName());
+            orderInfo1.setOrderStatusKey(StatusEnum.DRIVER_ORDER_LOADING.getFlag());
+            orderInfo1.setOrderStatus(StatusEnum.DRIVER_ORDER_LOADING.getName());
             this.updateById(orderInfo1);
         }
         return "ok";
@@ -127,13 +130,19 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
         if(orderInfo1 != null){
             //接单
             if("1".equals(orderInfo1.getFlag())){
-                orderInfo1.setOrderStatusKey(StatusEnum.DRIVER_ORDER_SHIPPING.getFlag());
-                orderInfo1.setOrderStatus(StatusEnum.DRIVER_ORDER_SHIPPING.getName());
+                //司机端和货主端订单状态改为未装车
+                orderInfo1.setOrderStatusKey(StatusEnum.DRIVER_ORDER_LOADING.getFlag());
+                orderInfo1.setOrderStatus(StatusEnum.DRIVER_ORDER_LOADING.getName());
+                orderInfo1.setCargoOwnerStatusKey(StatusEnum.DRIVER_ORDER_LOADING.getFlag());
+                orderInfo1.setCargoOwnerStatus(StatusEnum.DRIVER_ORDER_LOADING.getName());
             }
             //驳回
             else{
-                orderInfo1.setOrderStatusKey(StatusEnum.CARGO_OWNER_REJECTION.getFlag());
-                orderInfo1.setOrderStatus(StatusEnum.CARGO_OWNER_REJECTION.getName());
+                //司机端和货主端订单状态改为已终止
+                orderInfo1.setOrderStatusKey(StatusEnum.DRIVER_ORDER_END.getFlag());
+                orderInfo1.setOrderStatus(StatusEnum.DRIVER_ORDER_END.getName());
+                orderInfo1.setCargoOwnerStatusKey(StatusEnum.OWNER_ORDER_END.getFlag());
+                orderInfo1.setCargoOwnerStatus(StatusEnum.OWNER_ORDER_END.getName());
             }
             this.updateById(orderInfo1);
         }

+ 28 - 12
winsea-haixin-plugin-wangluohuoyun/src/main/resources/mapper/OrderInfoMapper.xml

@@ -19,20 +19,28 @@
         <if test="searchType != null and searchType != ''">
             <if test="searchType == 1">
                 AND order_status_key = '1'
-                OR order_status_key = '11'
+                OR order_status_key = '3'
             </if>
             <if test="searchType == 2">
-                AND order_status_key = '3'
+                AND order_status_key = '5'
+                OR order_status_key = '7'
+                OR order_status_key = '9'
+                OR order_status_key = '11'
+                OR order_status_key = '13'
             </if>
             <if test="searchType == 3">
-                AND order_status_key = '5'
+                AND order_status_key = '15'
+                OR order_status_key = '17'
+                OR order_status_key = '19'
+                OR order_status_key = '21'
             </if>
             <if test="searchType == 4">
-                AND order_status_key = '7'
+                AND order_status_key = '23'
+                OR order_status_key = '29'
             </if>
             <if test="searchType == 5">
-                AND order_status_key = '9'
-                OR order_status_key = '13'
+                AND order_status_key = '25'
+                OR order_status_key = '27'
             </if>
         </if>
     </select>
@@ -71,20 +79,28 @@
         <if test="searchType != null and searchType != ''">
             <if test="searchType == 1">
                 AND order_status_key = '1'
-                OR order_status_key = '11'
+                OR order_status_key = '3'
             </if>
             <if test="searchType == 2">
-                AND order_status_key = '3'
+                AND order_status_key = '5'
+                OR order_status_key = '7'
+                OR order_status_key = '9'
+                OR order_status_key = '11'
+                OR order_status_key = '13'
             </if>
             <if test="searchType == 3">
-                AND order_status_key = '5'
+                AND order_status_key = '15'
+                OR order_status_key = '17'
+                OR order_status_key = '19'
+                OR order_status_key = '21'
             </if>
             <if test="searchType == 4">
-                AND order_status_key = '7'
+                AND order_status_key = '23'
+                OR order_status_key = '29'
             </if>
             <if test="searchType == 5">
-                AND order_status_key = '9'
-                OR order_status_key = '13'
+                AND order_status_key = '25'
+                OR order_status_key = '27'
             </if>
         </if>
         ORDER BY create_date DESC