haungfuli 2 years ago
parent
commit
36ddb0defa
23 changed files with 1051 additions and 25 deletions
  1. 3 1
      winsea-haixin-platform-backend/src/main/resources/application.yml
  2. 1 1
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/GeneratorCodeByTables.java
  3. 19 2
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/controller/DriverCarInfoController.java
  4. 3 3
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/controller/DriverInfoController.java
  5. 45 2
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/controller/HyOperLogController.java
  6. 40 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/HyDriverCarInfo.java
  7. 33 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/HyOperLog.java
  8. 15 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/OrderInfo.java
  9. 2 1
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/exception/YExceptionEnum.java
  10. 18 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/mapper/DriverCarInfoMapper.java
  11. 19 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/mapper/HyOperLogMapper.java
  12. 15 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/IDriverCarInfoService.java
  13. 2 2
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/IDriverInfoService.java
  14. 25 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/IHyOperLogService.java
  15. 63 3
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/DriverCarInfoServiceImpl.java
  16. 1 1
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/DriverInfoServiceImpl.java
  17. 0 1
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/HyFreightSettlementInfoServiceImpl.java
  18. 500 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/HyOperLogServiceImpl.java
  19. 11 6
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/OrderInfoServiceImpl.java
  20. 58 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/util/EntityAnalyse.java
  21. 119 2
      winsea-haixin-plugin-wangluohuoyun/src/main/resources/mapper/DriverCarInfoMapper.xml
  22. 1 0
      winsea-haixin-plugin-wangluohuoyun/src/main/resources/mapper/DriverInfoMapper.xml
  23. 58 0
      winsea-haixin-plugin-wangluohuoyun/src/main/resources/mapper/HyOperLogMapper.xml

+ 3 - 1
winsea-haixin-platform-backend/src/main/resources/application.yml

@@ -14,7 +14,7 @@ spring:
     serialization:
     serialization:
       write_dates_as_timestamps: false
       write_dates_as_timestamps: false
   profiles:
   profiles:
-    active: prod
+    active: local
   resources:
   resources:
     static-locations: file:///winsea/static/
     static-locations: file:///winsea/static/
   thymeleaf:
   thymeleaf:
@@ -86,6 +86,8 @@ auth:
     - /driverPayeeInfo/**/*
     - /driverPayeeInfo/**/*
     - /hyDriverCapitalInfo/*
     - /hyDriverCapitalInfo/*
     - /hyDriverCapitalInfo/**/*
     - /hyDriverCapitalInfo/**/*
+    - /hyOperLog/*
+    - /hyOperLog/**/*
     - /hyFreightSettlementInfo/*
     - /hyFreightSettlementInfo/*
     - /hyFreightSettlementInfo/**/*
     - /hyFreightSettlementInfo/**/*
     - /hyOrderTravelPath/*
     - /hyOrderTravelPath/*

+ 1 - 1
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/GeneratorCodeByTables.java

@@ -53,7 +53,7 @@ public class GeneratorCodeByTables {
     }
     }
 
 
     public static void main(String[] args) throws IOException {
     public static void main(String[] args) throws IOException {
-        generateByTables("Gdc", "com.yh.saas.plugin.yiliangyiyun","hy_token");
+        generateByTables("Gdc", "com.yh.saas.plugin.yiliangyiyun","hy_oper_log");
     }
     }
 
 
     /**
     /**

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

@@ -1,7 +1,5 @@
 package com.yh.saas.plugin.yiliangyiyun.controller;
 package com.yh.saas.plugin.yiliangyiyun.controller;
 
 
-
-
 import com.baomidou.mybatisplus.plugins.Page;
 import com.baomidou.mybatisplus.plugins.Page;
 import com.yh.saas.plugin.yiliangyiyun.entity.HyDriverCarInfo;
 import com.yh.saas.plugin.yiliangyiyun.entity.HyDriverCarInfo;
 import com.yh.saas.plugin.yiliangyiyun.entity.view.DistinguishView;
 import com.yh.saas.plugin.yiliangyiyun.entity.view.DistinguishView;
@@ -12,6 +10,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.bind.annotation.*;
 
 
 import java.io.IOException;
 import java.io.IOException;
+import java.text.ParseException;
 import java.util.List;
 import java.util.List;
 
 
 /**
 /**
@@ -107,5 +106,23 @@ public class DriverCarInfoController {
     public DistinguishView tranLicenseShibie (String image){
     public DistinguishView tranLicenseShibie (String image){
         return EntityAnalyse.tranLicenseShibie(image);
         return EntityAnalyse.tranLicenseShibie(image);
     }
     }
+
+    /**
+     * 批量上报
+     */
+    @PostMapping("/api/batchSubmission")
+    public String batchSubmission(@RequestBody HyDriverCarInfo hyDriverCarInfo) throws IOException , ParseException {
+        return driverCarInfoService.batchSubmission(hyDriverCarInfo);
+    }
+
+    /**
+     * 后台管理车辆信息上报列表
+     * @param hyDriverCarInfo
+     * @return
+     */
+    @GetMapping("/selectCarInfoSubmission")
+    public Page<HyDriverCarInfo> selectCarInfoSubmission(HyDriverCarInfo hyDriverCarInfo){
+        return driverCarInfoService.selectCarInfoSubmission(hyDriverCarInfo);
+    }
 }
 }
 
 

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

@@ -153,13 +153,13 @@ public class DriverInfoController {
 
 
     /**
     /**
      * 后台管理司机信息上报列表
      * 后台管理司机信息上报列表
-     * @param driverViewInfo
+     * @param hyDriverInfo
      * @return
      * @return
      */
      */
     @Log(title = "后台管理司机信息上报列表")
     @Log(title = "后台管理司机信息上报列表")
     @GetMapping("/selectDriverInfoSubmission")
     @GetMapping("/selectDriverInfoSubmission")
-    public Page<HyDriverInfo> selectDriverInfoSubmission(HyDriverInfo driverViewInfo){
-        return driverInfoService.selectDriverInfoSubmission(driverViewInfo);
+    public Page<HyDriverInfo> selectDriverInfoSubmission(HyDriverInfo hyDriverInfo){
+        return driverInfoService.selectDriverInfoSubmission(hyDriverInfo);
     }
     }
 }
 }
 
 

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

@@ -1,9 +1,14 @@
 package com.yh.saas.plugin.yiliangyiyun.controller;
 package com.yh.saas.plugin.yiliangyiyun.controller;
 
 
 
 
-import org.springframework.web.bind.annotation.RequestMapping;
+import com.baomidou.mybatisplus.plugins.Page;
+import com.yh.saas.plugin.yiliangyiyun.entity.HyOperLog;
+import com.yh.saas.plugin.yiliangyiyun.service.IHyOperLogService;
+import com.yh.saas.plugin.yiliangyiyun.util.Log;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
 
 
-import org.springframework.web.bind.annotation.RestController;
+import javax.servlet.http.HttpServletResponse;
 
 
 /**
 /**
  * <p>
  * <p>
@@ -17,5 +22,43 @@ import org.springframework.web.bind.annotation.RestController;
 @RequestMapping("/hyOperLog")
 @RequestMapping("/hyOperLog")
 public class HyOperLogController {
 public class HyOperLogController {
 
 
+    @Autowired
+    private IHyOperLogService hyOperLogService;
+
+
+    /**
+     * 后台管理日志管理列表
+     *
+     * @param hyOperLog
+     * @return
+     */
+    @Log(title = "后台管理日志管理列表")
+    @GetMapping("/selectOperLog")
+    public Page<HyOperLog> selectOperLog(HyOperLog hyOperLog) {
+        return hyOperLogService.selectOperLog(hyOperLog);
+    }
+
+    /**
+     * 删除日志信息
+     *
+     * @param hyOperLog
+     */
+    @Log(title = "删除日志信息")
+    @PostMapping("/api/deleteOperLog")
+    public void deleteOperLog(@RequestBody HyOperLog hyOperLog) {
+        hyOperLogService.deleteOperLog(hyOperLog);
+    }
+
+    /**
+     * 后台管理日志导出
+     *
+     * @return
+     * @throws Exception
+     */
+    @Log(title = "后台管理日志信息导出")
+    @PostMapping("/api/export")
+    public void export(@RequestBody HyOperLog hyOperLog, HttpServletResponse response) throws Exception {
+        hyOperLogService.export(hyOperLog, response);
+    }
 }
 }
 
 

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

@@ -2,6 +2,7 @@ package com.yh.saas.plugin.yiliangyiyun.entity;
 
 
 import java.io.Serializable;
 import java.io.Serializable;
 import java.util.Date;
 import java.util.Date;
+import java.util.List;
 
 
 import com.baomidou.mybatisplus.annotations.TableField;
 import com.baomidou.mybatisplus.annotations.TableField;
 import com.baomidou.mybatisplus.annotations.TableId;
 import com.baomidou.mybatisplus.annotations.TableId;
@@ -268,8 +269,33 @@ public class HyDriverCarInfo extends BaseModel<HyDriverCarInfo> {
      * 驳回原因描述
      * 驳回原因描述
      */
      */
     private String rejectReasonDescription;
     private String rejectReasonDescription;
+    /**
+     * 上报时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date escalationDate;
+    /**
+     * 上报状态key(1平台审核中3未上报5园区审核中7交管审核中9未通过11已通过13已过期)
+     */
+    private String escalationStatusKey;
+    /**
+     * 上报状态
+     */
+    private String escalationStatus;
+    /**
+     * 上报失败原因
+     */
+    private String escalationFailureReason;
+    /**
+     * 上报list
+     */
+    @TableField(exist = false)
+    private List<HyDriverCarInfo> hyDriverCarInfoList;
+
     /**
     /**
      * 查询类型(1待审核2已通过3已驳回4已删除5已注销)
      * 查询类型(1待审核2已通过3已驳回4已删除5已注销)
+     * 上报列表(1待上报2审核中3已通过4已过期)
      */
      */
     @TableField(exist = false)
     @TableField(exist = false)
     private String searchType;
     private String searchType;
@@ -278,6 +304,20 @@ public class HyDriverCarInfo extends BaseModel<HyDriverCarInfo> {
      */
      */
     @TableField(exist = false)
     @TableField(exist = false)
     private String searchKeyWord;
     private String searchKeyWord;
+    /**
+     * 筛选开始日期
+     */
+    @TableField(exist = false)
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    private String startDate;
+    /**
+     * 筛选结束日期
+     */
+    @TableField(exist = false)
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    private String endDate;
     /**
     /**
      * 审核标识
      * 审核标识
      */
      */

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

@@ -2,14 +2,18 @@ package com.yh.saas.plugin.yiliangyiyun.entity;
 
 
 
 
 import java.io.Serializable;
 import java.io.Serializable;
+import java.util.List;
 
 
+import com.baomidou.mybatisplus.annotations.TableField;
 import com.baomidou.mybatisplus.annotations.TableId;
 import com.baomidou.mybatisplus.annotations.TableId;
 
 
 import com.baomidou.mybatisplus.enums.IdType;
 import com.baomidou.mybatisplus.enums.IdType;
+import com.fasterxml.jackson.annotation.JsonFormat;
 import com.yh.saas.common.support.entity.BaseModel;
 import com.yh.saas.common.support.entity.BaseModel;
 import lombok.Data;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.EqualsAndHashCode;
 import lombok.experimental.Accessors;
 import lombok.experimental.Accessors;
+import org.springframework.format.annotation.DateTimeFormat;
 
 
 /**
 /**
  * <p>
  * <p>
@@ -69,6 +73,35 @@ public class HyOperLog extends BaseModel<HyOperLog> {
     private String jsonResult;
     private String jsonResult;
 
 
 
 
+    /**
+     * 删除idlist
+     */
+    private List<HyOperLog> hyOperLogList;
+    /**
+     * 模糊查询
+     */
+    @TableField(exist = false)
+    private String searchKeyWord;
+    /**
+     * 筛选开始日期
+     */
+    @TableField(exist = false)
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    private String startDate;
+    /**
+     * 筛选结束日期
+     */
+    @TableField(exist = false)
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    private String endDate;
+    /**
+     * 操作人员
+     */
+    @TableField(exist = false)
+    private String operator;
+
     @Override
     @Override
     protected Serializable pkVal() {
     protected Serializable pkVal() {
         return this.id;
         return this.id;

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

@@ -530,6 +530,21 @@ public class OrderInfo extends BaseModel<OrderInfo> {
      */
      */
     @TableField(exist = false)
     @TableField(exist = false)
     private Double totalFreight;
     private Double totalFreight;
+    /**
+     * 车牌颜色
+     */
+    @TableField(exist = false)
+    private String carNumberColour;
+    /**
+     * 司机身份证号
+     */
+    @TableField(exist = false)
+    private String driverIdCard;
+    /**
+     * token
+     */
+    @TableField(exist = false)
+    private String token;
 
 
     @Override
     @Override
     protected Serializable pkVal() {
     protected Serializable pkVal() {

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

@@ -42,7 +42,8 @@ public enum YExceptionEnum {
 	BANKCARD_ADDED("ERROR20", "您已经添加过该银行卡,请勿重复添加!"),
 	BANKCARD_ADDED("ERROR20", "您已经添加过该银行卡,请勿重复添加!"),
 	OWNER_NO_RELEASE("ERROR21", "当前货主身份不可发布!"),
 	OWNER_NO_RELEASE("ERROR21", "当前货主身份不可发布!"),
 	COMP_OWNER_ALREADY("ERROR22", "您已经具备该公司货主身份"),
 	COMP_OWNER_ALREADY("ERROR22", "您已经具备该公司货主身份"),
-	CORRECT_DRIVING_LICENSE("ERROR23", "请上传正确的行驶证"),
+	CORRECT_DRIVING_LICENSE("ERROR23", "行驶证车辆类型输入错误"),
+	CAR_NOT_EXIST("ERROR23", "车辆不存在,请重新选择"),
 	;
 	;
 	@Getter
 	@Getter
 	private String value;
 	private String value;

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

@@ -2,6 +2,7 @@ package com.yh.saas.plugin.yiliangyiyun.mapper;
 
 
 import com.yh.saas.plugin.yiliangyiyun.entity.HyDriverCarInfo;
 import com.yh.saas.plugin.yiliangyiyun.entity.HyDriverCarInfo;
 import com.baomidou.mybatisplus.mapper.BaseMapper;
 import com.baomidou.mybatisplus.mapper.BaseMapper;
+import com.yh.saas.plugin.yiliangyiyun.entity.HyDriverInfo;
 
 
 import java.util.List;
 import java.util.List;
 import java.util.Map;
 import java.util.Map;
@@ -31,4 +32,21 @@ public interface DriverCarInfoMapper extends BaseMapper<HyDriverCarInfo> {
      * @return
      * @return
      */
      */
     List<HyDriverCarInfo> getListByCondition(Map<String, Object> pageView);
     List<HyDriverCarInfo> getListByCondition(Map<String, Object> pageView);
+
+
+    /**
+     * 根据条件查询车辆信息上报总数
+     *
+     * @param pageView
+     * @return
+     */
+    Integer getSubmissionCountByCondition(Map<String, Object> pageView);
+
+    /**
+     * 根据条件查询车辆信息上报列表
+     *
+     * @param pageView
+     * @return
+     */
+    List<HyDriverCarInfo> getSubmissionListByCondition(Map<String, Object> pageView);
 }
 }

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

@@ -1,8 +1,12 @@
 package com.yh.saas.plugin.yiliangyiyun.mapper;
 package com.yh.saas.plugin.yiliangyiyun.mapper;
 
 
+import com.yh.saas.plugin.yiliangyiyun.entity.HyDriverCarInfo;
 import com.yh.saas.plugin.yiliangyiyun.entity.HyOperLog;
 import com.yh.saas.plugin.yiliangyiyun.entity.HyOperLog;
 import com.baomidou.mybatisplus.mapper.BaseMapper;
 import com.baomidou.mybatisplus.mapper.BaseMapper;
 
 
+import java.util.List;
+import java.util.Map;
+
 /**
 /**
  * <p>
  * <p>
  * 记录token Mapper 接口
  * 记录token Mapper 接口
@@ -13,4 +17,19 @@ import com.baomidou.mybatisplus.mapper.BaseMapper;
  */
  */
 public interface HyOperLogMapper extends BaseMapper<HyOperLog> {
 public interface HyOperLogMapper extends BaseMapper<HyOperLog> {
 
 
+    /**
+     * 根据条件查询日志总数
+     *
+     * @param pageView
+     * @return
+     */
+    Integer getCountByCondition(Map<String, Object> pageView);
+
+    /**
+     * 根据条件查询日志列表
+     *
+     * @param pageView
+     * @return
+     */
+    List<HyOperLog> getListByCondition(Map<String, Object> pageView);
 }
 }

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

@@ -5,6 +5,7 @@ import com.yh.saas.plugin.yiliangyiyun.entity.HyDriverCarInfo;
 import com.baomidou.mybatisplus.service.IService;
 import com.baomidou.mybatisplus.service.IService;
 
 
 import java.io.IOException;
 import java.io.IOException;
+import java.text.ParseException;
 import java.util.List;
 import java.util.List;
 
 
 /**
 /**
@@ -57,4 +58,18 @@ public interface IDriverCarInfoService extends IService<HyDriverCarInfo> {
      * @return
      * @return
      */
      */
     String examine(HyDriverCarInfo hyDriverCarInfo) throws IOException;
     String examine(HyDriverCarInfo hyDriverCarInfo) throws IOException;
+
+    /**
+     * 批量上报
+     * @param hyDriverCarInfo
+     * @return
+     */
+    String batchSubmission(HyDriverCarInfo hyDriverCarInfo) throws IOException , ParseException;
+
+    /**
+     * 后台管理车辆信息上报列表
+     * @param  hyDriverCarInfo
+     * @return
+     */
+    Page<HyDriverCarInfo> selectCarInfoSubmission(HyDriverCarInfo hyDriverCarInfo);
 }
 }

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

@@ -75,8 +75,8 @@ public interface IDriverInfoService extends IService<HyDriverInfo> {
 
 
     /**
     /**
      * 后台管理司机信息上报列表
      * 后台管理司机信息上报列表
-     * @param  driverViewInfo
+     * @param  hyDriverInfo
      * @return
      * @return
      */
      */
-    Page<HyDriverInfo> selectDriverInfoSubmission(HyDriverInfo driverViewInfo);
+    Page<HyDriverInfo> selectDriverInfoSubmission(HyDriverInfo hyDriverInfo);
 }
 }

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

@@ -1,8 +1,11 @@
 package com.yh.saas.plugin.yiliangyiyun.service;
 package com.yh.saas.plugin.yiliangyiyun.service;
 
 
+import com.baomidou.mybatisplus.plugins.Page;
 import com.yh.saas.plugin.yiliangyiyun.entity.HyOperLog;
 import com.yh.saas.plugin.yiliangyiyun.entity.HyOperLog;
 import com.baomidou.mybatisplus.service.IService;
 import com.baomidou.mybatisplus.service.IService;
 
 
+import javax.servlet.http.HttpServletResponse;
+
 /**
 /**
  * <p>
  * <p>
  * 记录token 服务类
  * 记录token 服务类
@@ -13,4 +16,26 @@ import com.baomidou.mybatisplus.service.IService;
  */
  */
 public interface IHyOperLogService extends IService<HyOperLog> {
 public interface IHyOperLogService extends IService<HyOperLog> {
 
 
+    /**
+     * 后台管理日志管理列表
+     *
+     * @param hyOperLog
+     * @return
+     */
+    Page<HyOperLog> selectOperLog(HyOperLog hyOperLog);
+
+    /**
+     * 删除日志信息
+     *
+     * @param hyOperLog
+     */
+    void deleteOperLog(HyOperLog hyOperLog);
+
+    /**
+     * 后台管理日志导出
+     *
+     * @return
+     * @throws Exception
+     */
+    void export(HyOperLog hyOperLog, HttpServletResponse response) throws Exception;
 }
 }

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

@@ -8,6 +8,7 @@ import com.yh.saas.plugin.yiliangyiyun.constant.NumberConstant;
 import com.yh.saas.plugin.yiliangyiyun.constant.StatusEnum;
 import com.yh.saas.plugin.yiliangyiyun.constant.StatusEnum;
 import com.yh.saas.plugin.yiliangyiyun.entity.HyCommonSysParameter;
 import com.yh.saas.plugin.yiliangyiyun.entity.HyCommonSysParameter;
 import com.yh.saas.plugin.yiliangyiyun.entity.HyDriverCarInfo;
 import com.yh.saas.plugin.yiliangyiyun.entity.HyDriverCarInfo;
+import com.yh.saas.plugin.yiliangyiyun.entity.HyDriverInfo;
 import com.yh.saas.plugin.yiliangyiyun.exception.YException;
 import com.yh.saas.plugin.yiliangyiyun.exception.YException;
 import com.yh.saas.plugin.yiliangyiyun.exception.YExceptionEnum;
 import com.yh.saas.plugin.yiliangyiyun.exception.YExceptionEnum;
 import com.yh.saas.plugin.yiliangyiyun.mapper.DriverCarInfoMapper;
 import com.yh.saas.plugin.yiliangyiyun.mapper.DriverCarInfoMapper;
@@ -18,8 +19,11 @@ import com.yh.saas.plugin.yiliangyiyun.util.EntityAnalyse;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.transaction.annotation.Transactional;
+import org.springframework.util.CollectionUtils;
 
 
 import java.io.IOException;
 import java.io.IOException;
+import java.text.ParseException;
+import java.util.Date;
 import java.util.HashMap;
 import java.util.HashMap;
 import java.util.List;
 import java.util.List;
 import java.util.Map;
 import java.util.Map;
@@ -108,12 +112,13 @@ public class DriverCarInfoServiceImpl extends ServiceImpl<DriverCarInfoMapper, H
         hyDriverCarInfo.setStatus(StatusEnum.IDENTITY_REVIEWED.getName());
         hyDriverCarInfo.setStatus(StatusEnum.IDENTITY_REVIEWED.getName());
         hyDriverCarInfo.setStatusKey(StatusEnum.IDENTITY_REVIEWED.getFlag());
         hyDriverCarInfo.setStatusKey(StatusEnum.IDENTITY_REVIEWED.getFlag());
 
 
-        if(hyDriverCarInfo.getVehicleType() == null){
-            throw new YException(YExceptionEnum.CORRECT_DRIVING_LICENSE);
-        }
         //查询车辆类型key值
         //查询车辆类型key值
         HyCommonSysParameter hyCommonSysParameter = commonSysParameterService.selectOne(new EntityWrapper<HyCommonSysParameter>()
         HyCommonSysParameter hyCommonSysParameter = commonSysParameterService.selectOne(new EntityWrapper<HyCommonSysParameter>()
                 .eq("const_id", "CAR1").eq("const_value", hyDriverCarInfo.getVehicleType()));
                 .eq("const_id", "CAR1").eq("const_value", hyDriverCarInfo.getVehicleType()));
+        //校验车辆类型是否正确
+        if(hyCommonSysParameter == null){
+            throw new YException(YExceptionEnum.CORRECT_DRIVING_LICENSE);
+        }
         hyDriverCarInfo.setVehicleTypeKey(hyCommonSysParameter.getConstKey());
         hyDriverCarInfo.setVehicleTypeKey(hyCommonSysParameter.getConstKey());
         //车辆信息上报
         //车辆信息上报
         String token = EntityAnalyse.GetJTToken();
         String token = EntityAnalyse.GetJTToken();
@@ -201,4 +206,59 @@ public class DriverCarInfoServiceImpl extends ServiceImpl<DriverCarInfoMapper, H
         }
         }
         return "NG";
         return "NG";
     }
     }
+
+    /**
+     * 批量上报
+     * @param hyDriverCarInfo
+     * @return
+     * @throws IOException
+     * @throws ParseException
+     */
+    @Override
+    public String batchSubmission (HyDriverCarInfo hyDriverCarInfo) throws IOException , ParseException {
+        //获取token
+        String token = EntityAnalyse.GetJTToken();
+        if (!CollectionUtils.isEmpty(hyDriverCarInfo.getHyDriverCarInfoList())){
+            for (HyDriverCarInfo hyDriverCarInfo1 : hyDriverCarInfo.getHyDriverCarInfoList()){
+                //上报
+                hyDriverCarInfo1.setToken(token);
+                EntityAnalyse.uploadDriverCarInfo(hyDriverCarInfo1);
+                //更改上报状态
+                hyDriverCarInfo1.setEscalationDate(new Date());
+                hyDriverCarInfo1.setEscalationStatusKey(StatusEnum.PARK_UNDER_REVIEW.getFlag());
+                hyDriverCarInfo1.setEscalationStatus(StatusEnum.PARK_UNDER_REVIEW.getName());
+                this.updateById(hyDriverCarInfo1);
+            }
+        }
+        return "ok";
+    }
+
+    /**
+     * 后台管理车辆信息上报列表
+     *
+     * @param hyDriverCarInfo
+     * @return
+     */
+    @Override
+    public Page<HyDriverCarInfo> selectCarInfoSubmission(HyDriverCarInfo hyDriverCarInfo){
+        Map<String, Object> pageView = new HashMap<>(9);
+        pageView.put("startRecord", (hyDriverCarInfo.getCurrentPage() - 1)
+                * hyDriverCarInfo.getPageSize());
+        //公司id
+        pageView.put("searchType", hyDriverCarInfo.getSearchType());
+        pageView.put("searchKeyWord", hyDriverCarInfo.getSearchKeyWord());
+        pageView.put("startDate", hyDriverCarInfo.getStartDate());
+        pageView.put("endDate", hyDriverCarInfo.getEndDate());
+        pageView.put("pageSize", hyDriverCarInfo.getPageSize());
+        pageView.put("currentPage", hyDriverCarInfo.getCurrentPage());
+        // 查询司机总数
+        Integer dataCount = baseMapper.getSubmissionCountByCondition(pageView);
+        List<HyDriverCarInfo> dataList = baseMapper.getSubmissionListByCondition(pageView);
+        Page<HyDriverCarInfo> page = new Page<>();
+        page.setRecords(dataList == null ? Lists.newArrayList() : dataList);
+        page.setTotal(dataCount == null ? 0 : dataCount);
+        page.setCurrent(hyDriverCarInfo.getCurrentPage());
+        page.setSize(hyDriverCarInfo.getPageSize());
+        return page;
+    }
 }
 }

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

@@ -366,7 +366,7 @@ public class DriverInfoServiceImpl extends ServiceImpl<DriverInfoMapper, HyDrive
      */
      */
     @Override
     @Override
     public Page<HyDriverInfo> selectDriverInfoSubmission(HyDriverInfo hyDriverInfo){
     public Page<HyDriverInfo> selectDriverInfoSubmission(HyDriverInfo hyDriverInfo){
-        Map<String, Object> pageView = new HashMap<>(11);
+        Map<String, Object> pageView = new HashMap<>(9);
         pageView.put("startRecord", (hyDriverInfo.getCurrentPage() - 1)
         pageView.put("startRecord", (hyDriverInfo.getCurrentPage() - 1)
                 * hyDriverInfo.getPageSize());
                 * hyDriverInfo.getPageSize());
         //公司id
         //公司id

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

@@ -201,7 +201,6 @@ public class HyFreightSettlementInfoServiceImpl extends ServiceImpl<HyFreightSet
                 else {
                 else {
                     if ("预付款".equals(hyFreightSettlementInfo1.getPaymentType())) {
                     if ("预付款".equals(hyFreightSettlementInfo1.getPaymentType())) {
                         //预付款
                         //预付款
-                        freightInfo.setPrepaidFreight(hyFreightSettlementInfo1.getAmountMoney());
                         freightInfo.setPrepaidFreightDate(new Date());
                         freightInfo.setPrepaidFreightDate(new Date());
                         freightInfo.setPayabledFreight(hyFreightSettlementInfo1.getAmountMoney());
                         freightInfo.setPayabledFreight(hyFreightSettlementInfo1.getAmountMoney());
                         freightInfo.setNopayableFreight(freightInfo.getPayableFreight() - freightInfo.getPrepaidFreight());
                         freightInfo.setNopayableFreight(freightInfo.getPayableFreight() - freightInfo.getPrepaidFreight());

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

@@ -1,10 +1,38 @@
 package com.yh.saas.plugin.yiliangyiyun.service.impl;
 package com.yh.saas.plugin.yiliangyiyun.service.impl;
 
 
+import com.aliyun.oss.OSSClient;
+import com.aliyun.oss.model.ObjectMetadata;
+import com.aliyun.oss.model.PutObjectRequest;
+import com.baomidou.mybatisplus.plugins.Page;
+import com.google.common.collect.Lists;
+import com.winsea.svc.base.base.util.DateUtils;
+import com.yh.saas.plugin.yiliangyiyun.entity.HyDriverCarInfo;
 import com.yh.saas.plugin.yiliangyiyun.entity.HyOperLog;
 import com.yh.saas.plugin.yiliangyiyun.entity.HyOperLog;
+import com.yh.saas.plugin.yiliangyiyun.entity.OrderInfo;
 import com.yh.saas.plugin.yiliangyiyun.mapper.HyOperLogMapper;
 import com.yh.saas.plugin.yiliangyiyun.mapper.HyOperLogMapper;
 import com.yh.saas.plugin.yiliangyiyun.service.IHyOperLogService;
 import com.yh.saas.plugin.yiliangyiyun.service.IHyOperLogService;
 import com.baomidou.mybatisplus.service.impl.ServiceImpl;
 import com.baomidou.mybatisplus.service.impl.ServiceImpl;
+import lombok.Getter;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.collections.CollectionUtils;
+import org.apache.commons.httpclient.util.DateUtil;
+import org.apache.poi.hssf.usermodel.*;
+import org.apache.poi.hssf.util.HSSFColor;
+import org.apache.poi.ss.usermodel.IndexedColors;
+import org.apache.poi.ss.usermodel.Workbook;
+import org.apache.poi.ss.util.CellRangeAddress;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.servlet.http.HttpServletResponse;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.IOException;
+import java.net.URLDecoder;
+import java.text.SimpleDateFormat;
+import java.util.*;
 
 
 /**
 /**
  * <p>
  * <p>
@@ -15,6 +43,478 @@ import org.springframework.stereotype.Service;
  * @since 2022-08-02
  * @since 2022-08-02
  */
  */
 @Service
 @Service
+@Slf4j
 public class HyOperLogServiceImpl extends ServiceImpl<HyOperLogMapper, HyOperLog> implements IHyOperLogService {
 public class HyOperLogServiceImpl extends ServiceImpl<HyOperLogMapper, HyOperLog> implements IHyOperLogService {
 
 
+    @Value("${file-root-path}")
+    private String localPath;
+    @Getter
+    @Value("${oss.endpoint.internal:}")
+    private String baseUrl;
+    @Getter
+    @Value("${oss.bucket.name:}")
+    private String bucket;
+    @Autowired
+    private OSSClient ossClient;
+
+    /**
+     * 后台管理日志管理列表
+     *
+     * @param hyOperLog
+     * @return
+     */
+    @Override
+    public Page<HyOperLog> selectOperLog(HyOperLog hyOperLog) {
+        Map<String, Object> pageView = new HashMap<>(9);
+        pageView.put("startRecord", (hyOperLog.getCurrentPage() - 1)
+                * hyOperLog.getPageSize());
+        //公司id
+        pageView.put("searchKeyWord", hyOperLog.getSearchKeyWord());
+        pageView.put("startDate", hyOperLog.getStartDate());
+        pageView.put("endDate", hyOperLog.getEndDate());
+        pageView.put("pageSize", hyOperLog.getPageSize());
+        pageView.put("currentPage", hyOperLog.getCurrentPage());
+        // 查询司机总数
+        Integer dataCount = baseMapper.getCountByCondition(pageView);
+        List<HyOperLog> dataList = baseMapper.getListByCondition(pageView);
+        Page<HyOperLog> page = new Page<>();
+        page.setRecords(dataList == null ? Lists.newArrayList() : dataList);
+        page.setTotal(dataCount == null ? 0 : dataCount);
+        page.setCurrent(hyOperLog.getCurrentPage());
+        page.setSize(hyOperLog.getPageSize());
+        return page;
+    }
+
+    /**
+     * 删除日志信息
+     *
+     * @param hyOperLog
+     * @return
+     */
+    @Override
+    public void deleteOperLog(HyOperLog hyOperLog) {
+        //获取删除idlist
+        List<HyOperLog> hyOperLogs = hyOperLog.getHyOperLogList();
+        if (CollectionUtils.isNotEmpty(hyOperLogs)) {
+            for (HyOperLog hyOperLog1 : hyOperLogs){
+                this.deleteById(hyOperLog1.getId());
+            }
+        }
+    }
+
+    /**
+     * 后台管理日志导出
+     *
+     * @return
+     * @throws Exception
+     */
+    @Override
+    public void export(HyOperLog hyOperLog, HttpServletResponse response) throws Exception {
+        // 1.Excel的头部信息
+        String headerTitle = "";
+
+        // 2.创建一个webbook 对应一个Excel文件
+        HSSFWorkbook wb = new HSSFWorkbook();
+
+        // 3.在webbook中添加一个sheet,对应Excel文件中的sheet
+        HSSFSheet sheet;
+
+        sheet = wb.createSheet("日志信息");
+        headerTitle = "日志信息";
+
+        // 4.设置打印参数
+        sheet.setMargin(HSSFSheet.TopMargin, (short) 1);// 页边距(上)
+        sheet.setMargin(HSSFSheet.BottomMargin, (short) 1);// 页边距(下)
+        sheet.setMargin(HSSFSheet.LeftMargin, (short) 1);// 页边距(左)
+        sheet.setMargin(HSSFSheet.RightMargin, (short) 1);// 页边距(右)
+
+        // 不显示网格
+        sheet.setDisplayGridlines(false);
+        // 设置水平居中
+        sheet.setHorizontallyCenter(true);
+
+        /**************** 数据行样式 start ****************/
+        HSSFFont fontTitle = wb.createFont();
+        fontTitle.setFontName("宋体");
+        fontTitle.setFontHeightInPoints((short) 14);
+        // 设置字体加粗
+        fontTitle.setBoldweight(HSSFFont.BOLDWEIGHT_BOLD);
+
+        HSSFFont fontComp = wb.createFont();
+        fontComp.setFontName("宋体");
+        fontComp.setFontHeightInPoints((short) 16);
+        // 设置字体加粗
+        fontComp.setBoldweight(HSSFFont.BOLDWEIGHT_BOLD);
+
+        HSSFFont fontDetail = wb.createFont();
+        fontDetail.setFontName("宋体");
+        fontDetail.setFontHeightInPoints((short) 12);
+
+        HSSFFont fontDetail1 = wb.createFont();
+        fontDetail1.setFontName("宋体");
+        fontDetail1.setFontHeightInPoints((short) 12);
+        fontDetail1.setColor(HSSFColor.RED.index);
+
+        // title
+        HSSFCellStyle styleTitle = wb.createCellStyle();
+        // 指定单元格居中对齐
+        styleTitle.setAlignment(HSSFCellStyle.ALIGN_CENTER);
+        // 指定单元格垂直居中对齐
+        styleTitle.setVerticalAlignment(HSSFCellStyle.VERTICAL_CENTER);
+        // 指定单元格自动换行
+        styleTitle.setWrapText(true);
+        // 设置单元格字体
+        styleTitle.setFont(fontTitle);
+        // 右边框
+        styleTitle.setBorderRight(HSSFCellStyle.BORDER_NONE);
+        // 左边框
+        styleTitle.setBorderLeft(HSSFCellStyle.BORDER_NONE);
+        // 上边框
+        styleTitle.setBorderTop(HSSFCellStyle.BORDER_NONE);
+        // 下边框
+        styleTitle.setBorderBottom(HSSFCellStyle.BORDER_NONE);
+
+        // title
+        HSSFCellStyle styleComp = wb.createCellStyle();
+        // 指定单元格居中对齐
+        styleComp.setAlignment(HSSFCellStyle.ALIGN_CENTER);
+        // 指定单元格垂直居中对齐
+        styleComp.setVerticalAlignment(HSSFCellStyle.VERTICAL_CENTER);
+        // 指定单元格自动换行
+        styleComp.setWrapText(true);
+        // 设置单元格字体
+        styleComp.setFont(fontComp);
+        // 右边框
+        styleComp.setBorderRight(HSSFCellStyle.BORDER_NONE);
+        // 左边框
+        styleComp.setBorderLeft(HSSFCellStyle.BORDER_NONE);
+        // 上边框
+        styleComp.setBorderTop(HSSFCellStyle.BORDER_NONE);
+        // 下边框
+        styleComp.setBorderBottom(HSSFCellStyle.BORDER_NONE);
+
+        HSSFCellStyle styleInfo = wb.createCellStyle();
+        // 指定单元格居中对齐
+        styleInfo.setAlignment(HSSFCellStyle.ALIGN_LEFT);
+        // 指定单元格垂直居中对齐
+        styleInfo.setVerticalAlignment(HSSFCellStyle.VERTICAL_CENTER);
+        // 指定单元格自动换行
+        styleInfo.setWrapText(true);
+        // 设置单元格字体
+        styleInfo.setFont(fontDetail);
+        // 右边框
+        styleInfo.setBorderRight(HSSFCellStyle.BORDER_NONE);
+        // 左边框
+        styleInfo.setBorderLeft(HSSFCellStyle.BORDER_NONE);
+        // 上边框
+        styleInfo.setBorderTop(HSSFCellStyle.BORDER_NONE);
+        // 下边框
+        styleInfo.setBorderBottom(HSSFCellStyle.BORDER_NONE);
+
+        HSSFCellStyle styleDetail = wb.createCellStyle();
+        // 指定单元格居中对齐
+        styleDetail.setAlignment(HSSFCellStyle.ALIGN_CENTER);
+        // 指定单元格垂直居中对齐
+        styleDetail.setVerticalAlignment(HSSFCellStyle.VERTICAL_CENTER);
+        // 指定单元格自动换行
+        styleDetail.setWrapText(true);
+        // 设置单元格字体
+        styleDetail.setFont(fontDetail);
+        // 右边框
+        styleDetail.setBorderRight(HSSFCellStyle.BORDER_THIN);
+        // 左边框
+        styleDetail.setBorderLeft(HSSFCellStyle.BORDER_THIN);
+        // 上边框
+        styleDetail.setBorderTop(HSSFCellStyle.BORDER_THIN);
+        // 下styleDetailTitle
+        styleDetail.setBorderBottom(HSSFCellStyle.BORDER_THIN);
+
+        HSSFCellStyle styleDetailYellow = wb.createCellStyle();
+        // 指定单元格居中对齐
+        styleDetailYellow.setAlignment(HSSFCellStyle.ALIGN_CENTER);
+        // 指定单元格垂直居中对齐
+        styleDetailYellow.setVerticalAlignment(HSSFCellStyle.VERTICAL_CENTER);
+        // 指定单元格自动换行
+        styleDetailYellow.setWrapText(true);
+        // 设置单元格字体
+        styleDetailYellow.setFont(fontDetail);
+        // 右边框
+        styleDetailYellow.setBorderRight(HSSFCellStyle.BORDER_THIN);
+        // 左边框
+        styleDetailYellow.setBorderLeft(HSSFCellStyle.BORDER_THIN);
+        // 上边框
+        styleDetailYellow.setBorderTop(HSSFCellStyle.BORDER_THIN);
+        // 下styleDetailTitle
+        styleDetailYellow.setBorderBottom(HSSFCellStyle.BORDER_THIN);
+        styleDetailYellow.setFillForegroundColor(IndexedColors.YELLOW.getIndex());
+        styleDetailYellow.setFillPattern(HSSFCellStyle.SOLID_FOREGROUND);
+
+        HSSFCellStyle styleDetailLeft = wb.createCellStyle();
+        // 指定单元格居中对齐
+        styleDetailLeft.setAlignment(HSSFCellStyle.ALIGN_LEFT);
+        // 指定单元格垂直居中对齐
+        styleDetailLeft.setVerticalAlignment(HSSFCellStyle.VERTICAL_CENTER);
+        // 指定单元格自动换行
+        styleDetailLeft.setWrapText(true);
+        // 设置单元格字体
+        styleDetailLeft.setFont(fontDetail);
+        // 右边框
+        styleDetailLeft.setBorderRight(HSSFCellStyle.BORDER_THIN);
+        // 左边框
+        styleDetailLeft.setBorderLeft(HSSFCellStyle.BORDER_THIN);
+        // 上边框
+        styleDetailLeft.setBorderTop(HSSFCellStyle.BORDER_THIN);
+        // 下styleDetailTitle
+        styleDetailLeft.setBorderBottom(HSSFCellStyle.BORDER_THIN);
+        /**************** 数据行样式 end ****************/
+
+        // 设置列宽
+        sheet.setColumnWidth(0, 1 * 256 + 184);
+        sheet.setColumnWidth(1, 12 * 256 + 184);
+        sheet.setColumnWidth(2, 12 * 256 + 184);
+        sheet.setColumnWidth(3, 12 * 256 + 184);
+        sheet.setColumnWidth(4, 12 * 256 + 184);
+        sheet.setColumnWidth(5, 12 * 256 + 184);
+        sheet.setColumnWidth(6, 12 * 256 + 184);
+        sheet.setColumnWidth(7, 12 * 256 + 184);
+        sheet.setColumnWidth(8, 12 * 256 + 184);
+        sheet.setColumnWidth(9, 12 * 256 + 184);
+        sheet.setColumnWidth(10, 12 * 256 + 184);
+        sheet.setColumnWidth(11, 12 * 256 + 184);
+        sheet.setColumnWidth(12, 1 * 256 + 184);
+
+        // 创建单元格对象
+        HSSFCell cell = null;
+
+        // 创建打印设置对象
+        HSSFPrintSetup ps = sheet.getPrintSetup();
+        // 打印方向,true:横向,false:纵向(默认)
+        ps.setLandscape(false);
+        // // 打印质量
+        // ps.setVResolution((short) 700)
+        // 设置缩放比例
+        ps.setScale((short) 80);
+        // 纸张类型
+        ps.setPaperSize(HSSFPrintSetup.A4_PAPERSIZE);
+
+
+        int rownum = 1;
+        HSSFRow row0 = sheet.createRow((int) rownum);
+        row0.setHeightInPoints(25);
+        cell = row0.createCell(1);
+        cell.setCellStyle(styleTitle);
+        cell.setCellValue("日志信息");
+        sheet.addMergedRegion(new CellRangeAddress(rownum, rownum, (short) 1, (short) 11));
+        cell = row0.createCell(2);
+        cell.setCellStyle(styleTitle);
+        cell = row0.createCell(3);
+        cell.setCellStyle(styleTitle);
+        cell = row0.createCell(4);
+        cell.setCellStyle(styleTitle);
+        cell = row0.createCell(5);
+        cell.setCellStyle(styleTitle);
+        cell = row0.createCell(6);
+        cell.setCellStyle(styleTitle);
+        cell = row0.createCell(7);
+        cell.setCellStyle(styleTitle);
+        cell = row0.createCell(8);
+        cell.setCellStyle(styleTitle);
+        cell = row0.createCell(9);
+        cell.setCellStyle(styleTitle);
+        cell = row0.createCell(10);
+        cell.setCellStyle(styleTitle);
+        cell = row0.createCell(11);
+        cell.setCellStyle(styleTitle);
+        rownum++;
+
+
+        HSSFRow row1 = sheet.createRow((int) rownum);
+        row1.setHeightInPoints(30);
+        cell = row1.createCell(1);
+        cell.setCellValue("系统模块");
+        cell.setCellStyle(styleDetail);
+        cell = row1.createCell(2);
+        cell.setCellValue("请求方式");
+        cell.setCellStyle(styleDetail);
+        cell = row1.createCell(3);
+        cell.setCellValue("操作人员");
+        cell.setCellStyle(styleDetail);
+        cell = row1.createCell(4);
+        cell.setCellValue("操作地址");
+        cell.setCellStyle(styleDetail);
+        cell = row1.createCell(5);
+        cell.setCellValue("方法地址");
+        cell.setCellStyle(styleDetail);
+        cell = row1.createCell(6);
+        cell.setCellValue("操作状态");
+        cell.setCellStyle(styleDetail);
+        cell = row1.createCell(7);
+        cell.setCellValue("错误信息");
+        cell.setCellStyle(styleDetail);
+        cell = row1.createCell(8);
+        cell.setCellValue("方法名");
+        cell.setCellStyle(styleDetail);
+        cell = row1.createCell(9);
+        cell.setCellValue("请求参数");
+        cell.setCellStyle(styleDetail);
+        cell = row1.createCell(10);
+        cell.setCellValue("响应结果");
+        cell.setCellStyle(styleDetail);
+        cell = row1.createCell(11);
+        cell.setCellValue("操作日期");
+        cell.setCellStyle(styleDetail);
+        rownum++;
+
+
+        Map<String, Object> pageView = new HashMap<>();
+        //开始时间
+        pageView.put("startDate", hyOperLog.getStartDate());
+        pageView.put("endDate", hyOperLog.getEndDate());
+        // 查询订单列表
+        List<HyOperLog> dataList = baseMapper.getListByCondition(pageView);
+        //设置日期格式
+        SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+
+        // 详情信息
+        if (!org.springframework.util.CollectionUtils.isEmpty(dataList)) {
+            for (int i = 0; i < dataList.size(); i++) {
+                HyOperLog hyOperLog1 = dataList.get(i);
+                HSSFRow rowx = sheet.createRow((int) rownum);
+                rowx.setHeightInPoints(20);
+                cell = rowx.createCell(1);
+                cell.setCellValue(editString(hyOperLog1.getTitle()));
+                cell.setCellStyle(styleDetail);
+                cell = rowx.createCell(2);
+                cell.setCellValue(editString(hyOperLog1.getRequestMethod()));
+                cell.setCellStyle(styleDetail);
+                cell = rowx.createCell(3);
+                cell.setCellValue(editString(hyOperLog1.getOperator()));
+                cell.setCellStyle(styleDetail);
+                cell = rowx.createCell(4);
+                cell.setCellValue(editString(hyOperLog1.getIp()));
+                cell.setCellStyle(styleDetail);
+                cell = rowx.createCell(5);
+                cell.setCellValue(editString(hyOperLog1.getUrl()));
+                cell.setCellStyle(styleDetail);
+                cell = rowx.createCell(6);
+                cell.setCellValue(editString(hyOperLog1.getStatus()));
+                cell.setCellStyle(styleDetail);
+                cell = rowx.createCell(7);
+                cell.setCellValue(editString(hyOperLog1.getErrMsg()));
+                cell.setCellStyle(styleDetail);
+                cell = rowx.createCell(8);
+                cell.setCellValue(editString(hyOperLog1.getMethod()));
+                cell.setCellStyle(styleDetail);
+                cell = rowx.createCell(9);
+                cell.setCellValue(editString(hyOperLog1.getRequestValue()));
+                cell.setCellStyle(styleDetail);
+                cell = rowx.createCell(10);
+                cell.setCellValue(editString(hyOperLog1.getJsonResult()));
+                cell.setCellStyle(styleDetail);
+                cell = rowx.createCell(11);
+                cell.setCellValue(editString(df.format(hyOperLog1.getCreateDate())));
+                cell.setCellStyle(styleDetail);
+                rownum++;
+            }
+
+        }
+
+        String path = null;
+        String tempPath = null;
+        String excelPath = null;
+
+        try {
+
+            // 取得绝对路径
+            tempPath = URLDecoder.decode((localPath), "utf-8");
+
+            // EXCEL路径
+            excelPath = "/web/temp/pay/" + DateUtil.formatDate(new Date(), DateUtils.DATE_FMT_YYYYMMDD_NS) + '/'
+                    + UUID.randomUUID().toString().replaceAll("-", "");
+
+            path = tempPath + excelPath + '/' + "订单信息"
+                    + ".xlsx";
+
+        } catch (Exception e) {
+            log.debug(e.getMessage());
+        }
+        // 下载
+        download(path, response, wb);
+
+    }
+
+    /**
+     * 后台通过服务器间接传文件
+     *
+     * @param file
+     * @return
+     * @throws IOException
+     */
+    public String upload(MultipartFile file, String name) throws IOException {
+        ObjectMetadata objectMetadata = new ObjectMetadata();
+        objectMetadata.setContentLength(file.getSize());
+        objectMetadata.setContentType(file.getContentType());
+        PutObjectRequest putObjectRequest = new PutObjectRequest(bucket, "pcfiles/" + name + ".xlsx", file.getInputStream(), objectMetadata);
+        ossClient.putObject(putObjectRequest);
+        return baseUrl + "pcfiles/" + name + ".xlsx";
+    }
+
+    /**
+     * 判断字符串
+     *
+     * @param example
+     * @return
+     */
+    private String editString(String example) {
+        String exampleOne = example != null ? example : "";
+        return exampleOne;
+    }
+
+    /**
+     * 下载
+     *
+     * @param path
+     * @param response
+     */
+    private void download(String path, HttpServletResponse response, Workbook wb) {
+
+        try {
+
+            // path是指欲下载的文件的路径。
+            File file = new File(path);
+            // 取得文件名。
+            String fileName = file.getName();
+            // 给文件名编码
+            fileName = new String(fileName.getBytes("GBK"), "ISO-8859-1");
+
+            response.setContentType("application/vnd.ms-excel");
+            response.addHeader("Content-Disposition", "attachment;filename=" + fileName);
+
+            // 定义byte输出流
+            ByteArrayOutputStream out = new ByteArrayOutputStream();
+
+            // 写导出文件
+            wb.write(out);
+
+            // 取得模板文件中的数据
+            byte[] result = out.toByteArray();
+
+            // 设置输出数据类型
+            response.setContentType("application/vnd.ms-excel");
+            // 设置输出数据长度
+            response.setContentLength(result.length);
+
+            // 设置文件名称
+            response.setHeader("Content-Disposition", "attachment; filename=\"" + fileName + "\"");
+            // 将文件流输出到画面
+            response.getOutputStream().write(result);
+
+            out.flush();
+            out.close();
+
+        } catch (IOException ex) {
+            log.debug(ex.getMessage());
+        }
+    }
+
 }
 }

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

@@ -777,6 +777,7 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
                     //判断是否是垫付订单
                     //判断是否是垫付订单
                     if ("0".equals(orderInfo1.getFreightAdvance())){
                     if ("0".equals(orderInfo1.getFreightAdvance())){
                         //非垫付订单
                         //非垫付订单
+                        freightInfo.setPrepaidFreight(orderInfo1.getAdvanceCharge());
                         freightInfo.setReceivableFreight(orderInfo1.getAdvanceCharge());
                         freightInfo.setReceivableFreight(orderInfo1.getAdvanceCharge());
                         freightInfo.setReceivabledFreight(orderInfo1.getAdvanceCharge());
                         freightInfo.setReceivabledFreight(orderInfo1.getAdvanceCharge());
                         if (orderInfo1.getCompId() != null && !orderInfo1.getCompId().isEmpty()) {
                         if (orderInfo1.getCompId() != null && !orderInfo1.getCompId().isEmpty()) {
@@ -786,13 +787,13 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
                             Double d1 = hyCompanyInfo.getFrozenAmount();
                             Double d1 = hyCompanyInfo.getFrozenAmount();
                             hyCompanyInfo.setFrozenAmount(d1 - orderInfo1.getAdvanceCharge());
                             hyCompanyInfo.setFrozenAmount(d1 - orderInfo1.getAdvanceCharge());
                             companyInfoService.updateById(hyCompanyInfo);
                             companyInfoService.updateById(hyCompanyInfo);
-                            if (freightInfo.getPrepaidFreight() != 0) {
+                            if (freightInfo.getReceivableFreight() != 0) {
                                 //生成货主账单信息
                                 //生成货主账单信息
                                 HyCargoOwnerCapitalInfo hyCargoOwnerCapitalInfo = new HyCargoOwnerCapitalInfo();
                                 HyCargoOwnerCapitalInfo hyCargoOwnerCapitalInfo = new HyCargoOwnerCapitalInfo();
                                 hyCargoOwnerCapitalInfo.setId(IdGenerator.generateUUID());
                                 hyCargoOwnerCapitalInfo.setId(IdGenerator.generateUUID());
                                 hyCargoOwnerCapitalInfo.setCompanyId(hyCompanyInfo.getId());
                                 hyCargoOwnerCapitalInfo.setCompanyId(hyCompanyInfo.getId());
                                 hyCargoOwnerCapitalInfo.setTypes("支付预付款");
                                 hyCargoOwnerCapitalInfo.setTypes("支付预付款");
-                                hyCargoOwnerCapitalInfo.setAmountMoney(freightInfo.getPrepaidFreight());
+                                hyCargoOwnerCapitalInfo.setAmountMoney(freightInfo.getReceivableFreight());
                                 hyCargoOwnerCapitalInfo.setOrderId(orderInfo1.getId());
                                 hyCargoOwnerCapitalInfo.setOrderId(orderInfo1.getId());
                                 hyCargoOwnerCapitalInfo.setOrderNo(orderInfo1.getOrderNo());
                                 hyCargoOwnerCapitalInfo.setOrderNo(orderInfo1.getOrderNo());
                                 hyCargoOwnerCapitalInfoService.insert(hyCargoOwnerCapitalInfo);
                                 hyCargoOwnerCapitalInfoService.insert(hyCargoOwnerCapitalInfo);
@@ -805,13 +806,13 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
                             Double d1 = hyCargoOwnerInfo.getFrozenAmount();
                             Double d1 = hyCargoOwnerInfo.getFrozenAmount();
                             hyCargoOwnerInfo.setFrozenAmount(d1 - orderInfo1.getAdvanceCharge());
                             hyCargoOwnerInfo.setFrozenAmount(d1 - orderInfo1.getAdvanceCharge());
                             cargoOwnerInfoService.updateById(hyCargoOwnerInfo);
                             cargoOwnerInfoService.updateById(hyCargoOwnerInfo);
-                            if (freightInfo.getPrepaidFreight() != 0) {
+                            if (freightInfo.getReceivableFreight() != 0) {
                                 //生成货主账单信息
                                 //生成货主账单信息
                                 HyCargoOwnerCapitalInfo hyCargoOwnerCapitalInfo = new HyCargoOwnerCapitalInfo();
                                 HyCargoOwnerCapitalInfo hyCargoOwnerCapitalInfo = new HyCargoOwnerCapitalInfo();
                                 hyCargoOwnerCapitalInfo.setId(IdGenerator.generateUUID());
                                 hyCargoOwnerCapitalInfo.setId(IdGenerator.generateUUID());
                                 hyCargoOwnerCapitalInfo.setCommonId(hyCargoOwnerInfo.getCommonId());
                                 hyCargoOwnerCapitalInfo.setCommonId(hyCargoOwnerInfo.getCommonId());
                                 hyCargoOwnerCapitalInfo.setTypes("支付预付款");
                                 hyCargoOwnerCapitalInfo.setTypes("支付预付款");
-                                hyCargoOwnerCapitalInfo.setAmountMoney(freightInfo.getPrepaidFreight());
+                                hyCargoOwnerCapitalInfo.setAmountMoney(freightInfo.getReceivableFreight());
                                 hyCargoOwnerCapitalInfo.setOrderId(orderInfo1.getId());
                                 hyCargoOwnerCapitalInfo.setOrderId(orderInfo1.getId());
                                 hyCargoOwnerCapitalInfo.setOrderNo(orderInfo1.getOrderNo());
                                 hyCargoOwnerCapitalInfo.setOrderNo(orderInfo1.getOrderNo());
                                 hyCargoOwnerCapitalInfoService.insert(hyCargoOwnerCapitalInfo);
                                 hyCargoOwnerCapitalInfoService.insert(hyCargoOwnerCapitalInfo);
@@ -819,8 +820,8 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
                         }
                         }
                     }
                     }
                     freightInfoService.insert(freightInfo);
                     freightInfoService.insert(freightInfo);
-                    //如果付款大于0,生成司机运费结算信息
-                    if (freightInfo.getPrepaidFreight() != 0) {
+                    //如果付款大于0,生成司机运费结算信息
+                    if (freightInfo.getPayableFreight() != 0) {
                         HyFreightSettlementInfo hyFreightSettlementInfo = new HyFreightSettlementInfo();
                         HyFreightSettlementInfo hyFreightSettlementInfo = new HyFreightSettlementInfo();
                         hyFreightSettlementInfo.setId(IdGenerator.generateUUID());
                         hyFreightSettlementInfo.setId(IdGenerator.generateUUID());
                         hyFreightSettlementInfo.setCommonId(orderInfo1.getCommonId());
                         hyFreightSettlementInfo.setCommonId(orderInfo1.getCommonId());
@@ -1049,6 +1050,10 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
             //查询车辆信息
             //查询车辆信息
             HyDriverCarInfo hyDriverCarInfo = driverCarInfoService.selectOne(new EntityWrapper<HyDriverCarInfo>().eq("car_number", orderInfo.getCarNumber())
             HyDriverCarInfo hyDriverCarInfo = driverCarInfoService.selectOne(new EntityWrapper<HyDriverCarInfo>().eq("car_number", orderInfo.getCarNumber())
                     .eq("delete_flag", "0"));
                     .eq("delete_flag", "0"));
+            //车辆不存在
+            if (hyDriverCarInfo == null){
+                throw new YException(YExceptionEnum.CAR_NOT_EXIST);
+            }
             //查询车辆核定载重量
             //查询车辆核定载重量
             if ("挂车".equals(hyDriverCarInfo.getCarCategory())) {
             if ("挂车".equals(hyDriverCarInfo.getCarCategory())) {
                 if (Double.valueOf(orderInfo.getWeight()) > (hyDriverCarInfo.getGuaCarApprovedWeight() / 1000)) {
                 if (Double.valueOf(orderInfo.getWeight()) > (hyDriverCarInfo.getGuaCarApprovedWeight() / 1000)) {

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

@@ -1,5 +1,6 @@
 package com.yh.saas.plugin.yiliangyiyun.util;
 package com.yh.saas.plugin.yiliangyiyun.util;
 
 
+import cn.hutool.db.sql.Order;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.alibaba.fastjson.JSONObject;
 import com.aliyun.oss.ServiceException;
 import com.aliyun.oss.ServiceException;
@@ -7,6 +8,7 @@ import com.baomidou.mybatisplus.mapper.EntityWrapper;
 import com.yh.saas.plugin.yiliangyiyun.entity.HyCommonSysParameter;
 import com.yh.saas.plugin.yiliangyiyun.entity.HyCommonSysParameter;
 import com.yh.saas.plugin.yiliangyiyun.entity.HyDriverCarInfo;
 import com.yh.saas.plugin.yiliangyiyun.entity.HyDriverCarInfo;
 import com.yh.saas.plugin.yiliangyiyun.entity.HyDriverInfo;
 import com.yh.saas.plugin.yiliangyiyun.entity.HyDriverInfo;
+import com.yh.saas.plugin.yiliangyiyun.entity.OrderInfo;
 import com.yh.saas.plugin.yiliangyiyun.entity.view.DistinguishView;
 import com.yh.saas.plugin.yiliangyiyun.entity.view.DistinguishView;
 import com.yh.saas.plugin.yiliangyiyun.service.ICommonSysParameterService;
 import com.yh.saas.plugin.yiliangyiyun.service.ICommonSysParameterService;
 import org.apache.commons.codec.digest.DigestUtils;
 import org.apache.commons.codec.digest.DigestUtils;
@@ -294,6 +296,62 @@ public class EntityAnalyse {
         return "";
         return "";
     }
     }
 
 
+    /**
+     * 上报运单信息
+     *
+     * @param orderInfo
+     * @return
+     * @throws IOException
+     */
+    public static String uploadWaybill(OrderInfo orderInfo) throws IOException {
+        String url = "http://116.182.4.67:50065/platform/api/v1/transport";
+        SimpleDateFormat f = new SimpleDateFormat("yyyy-MM-dd");//设置日期格式
+        CloseableHttpClient httpClient = HttpClients.createDefault();
+        // 模拟登陆,按实际服务器端要求选用 Post 或 Get 请求方式
+        HttpPost httpPost = new HttpPost(url);
+        JSONObject params = new JSONObject();
+        params.put("shippingNoteNumber", orderInfo.getOrderNo());
+        params.put("serialNumber", "0000");
+        params.put("unifiedSocialCreditIdentifier", "91210804MA10FPAM2G");
+        JSONObject vehicleInfoQuery = new JSONObject();
+        params.put("vehicleInfoQuery",vehicleInfoQuery);
+        if ("黄色".equals(orderInfo.getCarNumberColour())) {
+            vehicleInfoQuery.put("vehiclePlateColorCode", 2);
+        } else if ("蓝色".equals(orderInfo.getCarNumberColour())) {
+            vehicleInfoQuery.put("vehiclePlateColorCode", 1);
+        }
+        vehicleInfoQuery.put("vehicleNumber", orderInfo.getCarNumber());
+        JSONObject drivers = new JSONObject();
+        params.put("drivers",drivers);
+        drivers.put("driverName", orderInfo.getDriverName());
+        drivers.put("drivingLicense", orderInfo.getDriverIdCard());
+        JSONObject goodsInfos = new JSONObject();
+        params.put("goodsInfos",goodsInfos);
+        goodsInfos.put("descriptionOfGoods", orderInfo.getGoodsType());
+        goodsInfos.put("cargoTypeClassificationCode", orderInfo.getGoodsTypeKey());
+
+        httpPost.setEntity(new StringEntity("[" + params.toString() + "]", StandardCharsets.UTF_8));
+        // 设置header信息
+        httpPost.setHeader("Content-type", "application/json");
+        httpPost.setHeader("token", orderInfo.getToken());
+        CloseableHttpResponse response = httpClient.execute(httpPost);
+        try {
+            // 执行请求操作,并拿到结果(同步阻塞)
+            String body = EntityUtils.toString(response.getEntity());
+            JSONObject jsonObject = JSONObject.parseObject(body);
+            String result = jsonObject.getString("result");
+            System.out.println("result = " + result);
+            return result;
+        } catch (Exception e) {
+            e.printStackTrace();
+        } finally {
+            // 释放链接
+            response.close();
+            httpClient.close();
+        }
+        return "";
+    }
+
     /**
     /**
      * 驾驶员信息校验结果查询
      * 驾驶员信息校验结果查询
      *
      *

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

@@ -1,12 +1,13 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <?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">
 <!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.DriverCarInfoMapper">
 <mapper namespace="com.yh.saas.plugin.yiliangyiyun.mapper.DriverCarInfoMapper">
+
     <!-- 获得车辆总数 -->
     <!-- 获得车辆总数 -->
     <select id="getCountByCondition" parameterType="Map" resultType="java.lang.Integer">
     <select id="getCountByCondition" parameterType="Map" resultType="java.lang.Integer">
         select
         select
         count(c.id)
         count(c.id)
         FROM hy_driver_info d
         FROM hy_driver_info d
-        left join hy_driver_car_info c on d.id=c.driver_id
+        left join hy_driver_car_info c on d.id=c.driver_id AND c.delete_flag = '0'
         WHERE d.delete_flag = '0'
         WHERE d.delete_flag = '0'
         <if test="searchType != null and searchType != ''">
         <if test="searchType != null and searchType != ''">
             <if test="searchType == 1">
             <if test="searchType == 1">
@@ -41,7 +42,7 @@
         SELECT
         SELECT
         c.id,
         c.id,
         d.driver_name as driverName,
         d.driver_name as driverName,
-        d.driver_phone as driverPhone,
+        d.account_number as driverPhone,
         d.number_card as numberCard,
         d.number_card as numberCard,
         c.car_type as carType,
         c.car_type as carType,
         c.car_category as carCategory,
         c.car_category as carCategory,
@@ -114,4 +115,120 @@
             LIMIT ${startRecord}, ${pageSize}
             LIMIT ${startRecord}, ${pageSize}
         </if>
         </if>
     </select>
     </select>
+
+
+
+    <!-- 获得车辆信息上报总数 -->
+    <select id="getSubmissionCountByCondition" parameterType="Map" resultType="java.lang.Integer">
+        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'
+        WHERE d.delete_flag = '0'
+        <if test="searchType != null and searchType != ''">
+            <if test="searchType == 1">
+                AND (c.escalation_status_key = '3' OR c.escalation_status_key = '9')
+            </if>
+            <if test="searchType == 2">
+                AND (c.escalation_status_key = '5' OR c.escalation_status_key = '7')
+            </if>
+            <if test="searchType == 3">
+                AND c.escalation_status_key = '11'
+            </if>
+            <if test="searchType == 4">
+                AND c.escalation_status_key = '13'
+            </if>
+        </if>
+        <if test="searchKeyWord != null and searchKeyWord != ''">
+            AND (lower(d.driver_name) like lower(CONCAT('%',#{searchKeyWord},'%'))
+            OR lower(d.account_number) like lower(CONCAT('%',#{searchKeyWord},'%')))
+        </if>
+        <if test="startDate != null and startDate != ''">
+            AND (DATE_FORMAT(c.create_date,"%Y%m%d") >=
+            DATE_FORMAT(#{startDate},"%Y%m%d"))
+        </if>
+        <if test="endDate != null and endDate != ''">
+            AND (DATE_FORMAT(c.create_date,"%Y%m%d") &lt;=
+            DATE_FORMAT(#{endDate},"%Y%m%d"))
+        </if>
+    </select>
+    <!-- 车辆信息上报列表查询 -->
+    <select id="getSubmissionListByCondition" parameterType="Map"
+            resultType="com.yh.saas.plugin.yiliangyiyun.entity.HyDriverCarInfo">
+        SELECT
+        c.id,
+        d.driver_name as driverName,
+        d.account_number as accountNumber,
+        d.number_card as numberCard,
+        c.car_type as carType,
+        c.car_category as carCategory,
+        c.car_number as carNumber,
+        c.car_number_colour as carNumberColour,
+        c.gua_car_number as guaCarNumber,
+        c.energy_type as energyType,
+        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,
+        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_car_info c
+        left join hy_driver_info d on d.id=c.driver_id and d.delete_flag = '0'
+        WHERE c.delete_flag = '0'
+        <if test="searchType != null and searchType != ''">
+            <if test="searchType == 1">
+                AND (c.escalation_status_key = '3' OR c.escalation_status_key = '9')
+            </if>
+            <if test="searchType == 2">
+                AND (c.escalation_status_key = '5' OR c.escalation_status_key = '7')
+            </if>
+            <if test="searchType == 3">
+                AND c.escalation_status_key = '11'
+            </if>
+            <if test="searchType == 4">
+                AND c.escalation_status_key = '13'
+            </if>
+        </if>
+        <if test="searchKeyWord != null and searchKeyWord != ''">
+            AND (lower(d.driver_name) like lower(CONCAT('%',#{searchKeyWord},'%'))
+            OR lower(d.account_number) like lower(CONCAT('%',#{searchKeyWord},'%')))
+        </if>
+        <if test="startDate != null and startDate != ''">
+            AND (DATE_FORMAT(c.create_date,"%Y%m%d") >=
+            DATE_FORMAT(#{startDate},"%Y%m%d"))
+        </if>
+        <if test="endDate != null and endDate != ''">
+            AND (DATE_FORMAT(c.create_date,"%Y%m%d") &lt;=
+            DATE_FORMAT(#{endDate},"%Y%m%d"))
+        </if>
+        ORDER BY c.escalation_status_key ASC,c.escalation_date DESC
+        <if test="currentPage != null and currentPage != ''">
+            LIMIT ${startRecord}, ${pageSize}
+        </if>
+    </select>
 </mapper>
 </mapper>

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

@@ -201,6 +201,7 @@
         d.back_stage_status_key as backStageStatusKey,
         d.back_stage_status_key as backStageStatusKey,
         case when d.back_stage_status is null then '未认证' else d.back_stage_status end as backStageStatus,
         case when d.back_stage_status is null then '未认证' else d.back_stage_status end as backStageStatus,
         d.escalation_date as escalationDate,
         d.escalation_date as escalationDate,
+        d.escalation_failure_reason as escalationFailureReason,
         d.escalation_status_key as escalationStatusKey,
         d.escalation_status_key as escalationStatusKey,
         case when d.escalation_status is null then '未认证' else d.escalation_status end as escalationStatus,
         case when d.escalation_status is null then '未认证' else d.escalation_status end as escalationStatus,
         d.create_date as createDate,
         d.create_date as createDate,

+ 58 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/resources/mapper/HyOperLogMapper.xml

@@ -2,4 +2,62 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <!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.HyOperLogMapper">
 <mapper namespace="com.yh.saas.plugin.yiliangyiyun.mapper.HyOperLogMapper">
 
 
+    <!-- 获得日志总数 -->
+    <select id="getCountByCondition" parameterType="Map" resultType="java.lang.Integer">
+        select
+        count(o.id)
+        FROM hy_oper_log o
+        left join common_staff c on c.staff_id=o.create_user_id AND c.delete_flag = '0'
+        WHERE o.delete_flag = '0'
+        <if test="searchKeyWord != null and searchKeyWord != ''">
+            AND (lower(o.title) like lower(CONCAT('%',#{searchKeyWord},'%'))
+            OR lower(c.staff_name) like lower(CONCAT('%',#{searchKeyWord},'%')))
+        </if>
+        <if test="startDate != null and startDate != ''">
+            AND (DATE_FORMAT(o.create_date,"%Y%m%d") >=
+            DATE_FORMAT(#{startDate},"%Y%m%d"))
+        </if>
+        <if test="endDate != null and endDate != ''">
+            AND (DATE_FORMAT(o.create_date,"%Y%m%d") &lt;=
+            DATE_FORMAT(#{endDate},"%Y%m%d"))
+        </if>
+    </select>
+
+    <!-- 日志列表查询 -->
+    <select id="getListByCondition" parameterType="Map"
+            resultType="com.yh.saas.plugin.yiliangyiyun.entity.HyOperLog">
+        SELECT
+        o.id,
+        o.title,
+        o.ip,
+        o.url,
+        o.status,
+        o.err_msg as errMsg,
+        o.method,
+        o.request_method as requestMethod,
+        o.request_value as requestValue,
+        o.json_result as jsonResult,
+        c.staff_name as operator,
+        o.create_date as createDate,
+        o.update_date as updateDate
+        FROM hy_oper_log o
+        left join common_staff c on c.staff_id=o.create_user_id AND c.delete_flag = '0'
+        WHERE o.delete_flag = '0'
+        <if test="searchKeyWord != null and searchKeyWord != ''">
+            AND (lower(o.title) like lower(CONCAT('%',#{searchKeyWord},'%'))
+            OR lower(c.staff_name) like lower(CONCAT('%',#{searchKeyWord},'%')))
+        </if>
+        <if test="startDate != null and startDate != ''">
+            AND (DATE_FORMAT(o.create_date,"%Y%m%d") >=
+            DATE_FORMAT(#{startDate},"%Y%m%d"))
+        </if>
+        <if test="endDate != null and endDate != ''">
+            AND (DATE_FORMAT(o.create_date,"%Y%m%d") &lt;=
+            DATE_FORMAT(#{endDate},"%Y%m%d"))
+        </if>
+        ORDER BY o.create_date DESC
+        <if test="currentPage != null and currentPage != ''">
+            LIMIT ${startRecord}, ${pageSize}
+        </if>
+    </select>
 </mapper>
 </mapper>