فهرست منبع

Merge remote-tracking branch 'origin/dev' into dev

czh 2 سال پیش
والد
کامیت
7c10aa6e11
27فایلهای تغییر یافته به همراه895 افزوده شده و 167 حذف شده
  1. 4 4
      sckw-auth/src/main/java/com/sckw/auth/controller/AuthController.java
  2. 0 2
      sckw-auth/src/main/java/com/sckw/auth/service/impl/AuthServiceImpl.java
  3. 2 0
      sckw-common/sckw-common-core/src/main/java/com/sckw/core/model/vo/BaseList.java
  4. 19 48
      sckw-modules/sckw-fleet/src/main/java/com/sckw/fleet/controller/KwfDriverController.java
  5. 6 48
      sckw-modules/sckw-fleet/src/main/java/com/sckw/fleet/controller/KwfTruckController.java
  6. 33 0
      sckw-modules/sckw-fleet/src/main/java/com/sckw/fleet/model/dto/ForgetPasswordDto.java
  7. 52 0
      sckw-modules/sckw-fleet/src/main/java/com/sckw/fleet/model/vo/KwfDriverCardVo.java
  8. 106 0
      sckw-modules/sckw-fleet/src/main/java/com/sckw/fleet/model/vo/KwfDriverDetailVo.java
  9. 57 0
      sckw-modules/sckw-fleet/src/main/java/com/sckw/fleet/model/vo/KwfDriverLicenseVo.java
  10. 57 0
      sckw-modules/sckw-fleet/src/main/java/com/sckw/fleet/model/vo/KwfDriverQualificationVo.java
  11. 68 0
      sckw-modules/sckw-fleet/src/main/java/com/sckw/fleet/model/vo/KwfTransportLicenseVo.java
  12. 129 0
      sckw-modules/sckw-fleet/src/main/java/com/sckw/fleet/model/vo/KwfTruckDetailVo.java
  13. 68 0
      sckw-modules/sckw-fleet/src/main/java/com/sckw/fleet/model/vo/KwfTruckLicenseVo.java
  14. 20 4
      sckw-modules/sckw-fleet/src/main/java/com/sckw/fleet/model/vo/KwfTruckReportVo.java
  15. 122 12
      sckw-modules/sckw-fleet/src/main/java/com/sckw/fleet/service/KwfDriverService.java
  16. 55 4
      sckw-modules/sckw-fleet/src/main/java/com/sckw/fleet/service/KwfTruckService.java
  17. 1 1
      sckw-modules/sckw-fleet/src/main/resources/mapper/KwfTransportLicenseMapper.xml
  18. 1 1
      sckw-modules/sckw-fleet/src/main/resources/mapper/KwfTruckLicenseMapper.xml
  19. 6 5
      sckw-modules/sckw-fleet/src/main/resources/mapper/KwfTruckReportMapper.xml
  20. 5 0
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/model/dto/SettlementLogisticsDto.java
  21. 22 3
      sckw-modules/sckw-payment/src/main/java/com/sckw/payment/service/KwpSettlementLogisticsService.java
  22. 1 6
      sckw-modules/sckw-product/src/main/java/com/sckw/product/service/KwpGoodsService.java
  23. 3 3
      sckw-modules/sckw-transport/src/main/java/com/sckw/transport/controller/LogisticsConsignmentController.java
  24. 8 0
      sckw-modules/sckw-transport/src/main/java/com/sckw/transport/model/dto/CancelOrderDTO.java
  25. 0 16
      sckw-modules/sckw-transport/src/main/java/com/sckw/transport/service/AcceptCarriageLogisticsService.java
  26. 5 5
      sckw-modules/sckw-transport/src/main/java/com/sckw/transport/service/LogisticsConsignmentService.java
  27. 45 5
      sckw-modules/sckw-transport/src/main/java/com/sckw/transport/service/TransportCommonService.java

+ 4 - 4
sckw-auth/src/main/java/com/sckw/auth/controller/AuthController.java

@@ -115,14 +115,14 @@ public class AuthController {
         String key = StringUtils.format(RedisConstant.MESSAGE_SMS_VERIFY_CODE_VALUE_KEY, DictEnum.SMS_LOGIN.getValue(), params.getAccount());
 
         RedissonUtils.putString(key, params.getCaptcha(), RedisConstant.SMS_VERIFY_CODE_VALID_TIME);
-        String captcha = RedissonUtils.getString(key);
-        if (params.getLoginMethod() == LoginMethodEnum.SMS.getValue() && StringUtils.isBlank(captcha)) {
+        String smsCaptcha = RedissonUtils.getString(key);
+        if (params.getLoginMethod() == LoginMethodEnum.SMS.getValue() && StringUtils.isBlank(smsCaptcha)) {
             return HttpResult.error(HttpStatus.PARAMETERS_MISSING_CODE, "验证码已过期,请重新获取!");
         }
-        if (params.getLoginMethod() == LoginMethodEnum.SMS.getValue() && StringUtils.isBlank(captcha)) {
+        if (params.getLoginMethod() == LoginMethodEnum.SMS.getValue() && StringUtils.isBlank(smsCaptcha)) {
             return HttpResult.error(HttpStatus.PARAMETERS_MISSING_CODE, "验证码已过期,请重新获取!");
         }
-        if (params.getLoginMethod() == LoginMethodEnum.SMS.getValue() && !captcha.equals(params.getCaptcha())) {
+        if (params.getLoginMethod() == LoginMethodEnum.SMS.getValue() && !smsCaptcha.equals(params.getCaptcha())) {
             return HttpResult.error(HttpStatus.UN_LOGIN_CODE, "验证码不正确,请检查并重新输入!");
         }
 

+ 0 - 2
sckw-auth/src/main/java/com/sckw/auth/service/impl/AuthServiceImpl.java

@@ -470,8 +470,6 @@ public class AuthServiceImpl implements IAuthService {
         return HttpResult.ok(loginRes);
     }
 
-
-
     static class AsyncProcess1 implements Runnable {
         private final LoginBase loginBase;
 

+ 2 - 0
sckw-common/sckw-common-core/src/main/java/com/sckw/core/model/vo/BaseList.java

@@ -2,6 +2,7 @@ package com.sckw.core.model.vo;
 
 import jakarta.validation.constraints.NotBlank;
 import lombok.Data;
+import org.hibernate.validator.constraints.Length;
 
 /**
  * @author lfdc
@@ -19,5 +20,6 @@ public class BaseList {
     /**
      * 备注
      */
+    @Length(max = 200,message = "备注长度错误最大长度:{max}")
     private String remark;
 }

+ 19 - 48
sckw-modules/sckw-fleet/src/main/java/com/sckw/fleet/controller/KwfDriverController.java

@@ -1,20 +1,18 @@
 package com.sckw.fleet.controller;
 
-import com.alibaba.fastjson.JSON;
-import com.alibaba.fastjson.JSONObject;
 import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
 import com.sckw.core.exception.SystemException;
 import com.sckw.core.model.page.PageHelperUtil;
 import com.sckw.core.model.page.PageResult;
 import com.sckw.core.utils.StringUtils;
+import com.sckw.core.web.constant.HttpStatus;
 import com.sckw.core.web.context.LoginUserHolder;
 import com.sckw.core.web.response.HttpResult;
 import com.sckw.excel.easyexcel.RequestHolder;
 import com.sckw.excel.utils.ExcelUtil;
-import com.sckw.fleet.model.*;
 import com.sckw.fleet.model.dto.*;
-import com.sckw.fleet.model.vo.KwfDriverVo;
+import com.sckw.fleet.model.vo.*;
 import com.sckw.fleet.service.KwfDriverService;
 import jakarta.servlet.http.HttpServletResponse;
 import jakarta.validation.Valid;
@@ -47,28 +45,8 @@ public class KwfDriverController {
     @GetMapping("/detail")
     public HttpResult selectByKey(Long id) throws SystemException {
         //司机信息
-        KwfDriver driver = driverService.selectByKey(id);
-        JSONObject driverJson = JSONObject.parseObject(JSON.toJSONString(driver));
-
-        //数据查询
-        if (driver != null) {
-            //身份证信息
-            KwfDriverCard cardJson = driverService.findCarByKey(driver.getId());
-            driverJson.put("driverCard", cardJson);
-
-            //司机驾驶证信息
-            KwfDriverLicense licenseJson = driverService.findLicenseByKey(driver.getId());
-            driverJson.put("driverLicense", licenseJson);
-
-            //司机从业资格证
-            KwfDriverQualification qualificationJson = driverService.findQualificationByKey(driver.getId());
-            driverJson.put("driverQualification", qualificationJson);
-        }
-        //车队班组
-        KwfFleet fleet = driverService.findByFleetDriver(id, LoginUserHolder.getEntId());
-        driverJson.put("fleetName", fleet != null ? fleet.getName() : null);
-        driverJson.put("fleetId", fleet != null ? fleet.getId() : null);
-        return HttpResult.ok(driverJson);
+        KwfDriverDetailVo driverDetailVo = driverService.detail(id);
+        return HttpResult.ok(driverDetailVo);
     }
 
     /**
@@ -97,28 +75,8 @@ public class KwfDriverController {
         }
 
         //司机信息
-        KwfDriver driver = driverService.selectByKey(id);
-        JSONObject driverJson = JSONObject.parseObject(JSON.toJSONString(driver));
-
-        //数据查询
-        if (driver != null) {
-            //身份证信息
-            KwfDriverCard cardJson = driverService.findCarByKey(driver.getId());
-            driverJson.put("driverCard", cardJson);
-
-            //司机驾驶证信息
-            KwfDriverLicense licenseJson = driverService.findLicenseByKey(driver.getId());
-            driverJson.put("driverLicense", licenseJson);
-
-            //司机从业资格证
-            KwfDriverQualification qualificationJson = driverService.findQualificationByKey(driver.getId());
-            driverJson.put("driverQualification", qualificationJson);
-        }
-        //车队班组
-        KwfFleet fleet = driverService.findByFleetDriver(id, LoginUserHolder.getEntId());
-        driverJson.put("fleetName", fleet != null ? fleet.getName() : null);
-        driverJson.put("fleetId", fleet != null ? fleet.getId() : null);
-        return HttpResult.ok(driverJson);
+        KwfDriverDetailVo driverDetailVo = driverService.detail(id);
+        return HttpResult.ok(driverDetailVo);
     }
 
     /**
@@ -279,4 +237,17 @@ public class KwfDriverController {
         return driverService.replacePhone(params);
     }
 
+    /**
+     * @param {account 账号、password 密码、captcha 验证码}
+     * @description 忘记密码
+     * @author zk
+     * @date 2023/08/15
+     **/
+    @PostMapping("/forgetPassword")
+    public HttpResult forgetPassword(@RequestHeader(name = "System-Type") int systemType,
+                                     @RequestHeader(name = "Client-Type") String clientType,
+                                     @RequestBody @Valid ForgetPasswordDto params) {
+        return driverService.forgetPassword(params);
+    }
+
 }

+ 6 - 48
sckw-modules/sckw-fleet/src/main/java/com/sckw/fleet/controller/KwfTruckController.java

@@ -10,6 +10,7 @@ import com.sckw.core.exception.SystemException;
 import com.sckw.core.model.constant.Global;
 import com.sckw.core.model.page.PageHelperUtil;
 import com.sckw.core.model.page.PageResult;
+import com.sckw.core.utils.BeanUtils;
 import com.sckw.core.utils.CollectionUtils;
 import com.sckw.core.utils.DateUtils;
 import com.sckw.core.utils.StringUtils;
@@ -25,8 +26,7 @@ import com.sckw.fleet.model.dto.GpsByTruckNoDto;
 import com.sckw.fleet.model.dto.KwfTransportLicenseDto;
 import com.sckw.fleet.model.dto.KwfTruckDto;
 import com.sckw.fleet.model.dto.KwfTruckLicenseDto;
-import com.sckw.fleet.model.vo.KwfDriverVo;
-import com.sckw.fleet.model.vo.KwfTruckVo;
+import com.sckw.fleet.model.vo.*;
 import com.sckw.fleet.service.KwfTruckService;
 import com.sckw.system.api.RemoteSystemService;
 import com.sckw.system.api.model.dto.res.SysDictResDto;
@@ -66,29 +66,8 @@ public class KwfTruckController {
     @GetMapping("/detail")
     public HttpResult selectByKey(Long id) throws SystemException {
         //车辆信息
-        KwfTruck truck = truckService.selectByKey(id);
-        JSONObject truckJson = JSONObject.parseObject(JSON.toJSONString(truck));
-
-        //数据组装
-        if (truck != null) {
-            //车辆行驶证信息
-            KwfTruckLicense truckLicense = truckService.findTruckLicenseByKey(id);
-            truckJson.put("truckLicense", truckLicense);
-
-            //车辆道路运输许可证
-            KwfTransportLicense transportLicense = truckService.findTransportLicenseByKey(id);
-            truckJson.put("transportLicense", transportLicense);
-
-            //字典
-            Map<String, SysDictResDto> dicts = remoteSystemService.queryDictMapByTypeValues(DictTypeEnum.COLOR_TYPE.getType() + Global.POUND + truck.getColor());
-            SysDictResDto color = dicts == null ? null : dicts.get(DictTypeEnum.COLOR_TYPE.getType() + Global.POUND + truck.getColor());
-            truckJson.put("colorName", color != null ? color.getLabel() : null);
-        }
-        //车队班组
-        KwfFleet fleet = truckService.findByFleetTruck(id, LoginUserHolder.getEntId());
-        truckJson.put("fleetId", fleet != null ? fleet.getId() : null);
-        truckJson.put("fleetName", fleet != null ? fleet.getName() : null);
-        return HttpResult.ok(truckJson);
+        KwfTruckDetailVo truckDetailVo = truckService.detail(id);
+        return HttpResult.ok(truckDetailVo);
     }
 
     /**
@@ -112,29 +91,8 @@ public class KwfTruckController {
         }
 
         //车辆信息
-        KwfTruck truck = truckService.selectByKey(id);
-        JSONObject truckJson = JSONObject.parseObject(JSON.toJSONString(truck));
-
-        //数据组装
-        if (truck != null) {
-            //车辆行驶证信息
-            KwfTruckLicense truckLicense = truckService.findTruckLicenseByKey(id);
-            truckJson.put("truckLicense", truckLicense);
-
-            //车辆道路运输许可证
-            KwfTransportLicense transportLicense = truckService.findTransportLicenseByKey(id);
-            truckJson.put("transportLicense", transportLicense);
-
-            //字典
-            Map<String, SysDictResDto> dicts = remoteSystemService.queryDictMapByTypeValues(DictTypeEnum.COLOR_TYPE.getType() + Global.POUND + truck.getColor());
-            SysDictResDto color = dicts == null ? null : dicts.get(DictTypeEnum.COLOR_TYPE.getType() + Global.POUND + truck.getColor());
-            truckJson.put("colorName", color != null ? color.getLabel() : null);
-        }
-        //车队班组
-        KwfFleet fleet = truckService.findByFleetTruck(id, LoginUserHolder.getEntId());
-        truckJson.put("fleetId", fleet != null ? fleet.getId() : null);
-        truckJson.put("fleetName", fleet != null ? fleet.getName() : null);
-        return HttpResult.ok(truckJson);
+        KwfTruckDetailVo truckDetailVo = truckService.detail(id);
+        return HttpResult.ok(truckDetailVo);
     }
 
     /**

+ 33 - 0
sckw-modules/sckw-fleet/src/main/java/com/sckw/fleet/model/dto/ForgetPasswordDto.java

@@ -0,0 +1,33 @@
+package com.sckw.fleet.model.dto;
+
+import jakarta.validation.constraints.NotBlank;
+import jakarta.validation.constraints.Pattern;
+import lombok.Data;
+
+/**
+ * @author zk
+ * @desc 忘记密码
+ * @date 2023/08/15
+ */
+@Data
+public class ForgetPasswordDto {
+
+    /**
+     * 账号
+     */
+    @NotBlank(message = "账号不能为空!")
+    @Pattern(regexp = "^1[3456789]\\d{9}$", message = "账号是您的手机号码,请确认再输入!")
+    private String account;
+
+    /**
+     * 旧密码
+     */
+    @NotBlank(message = "密码不能为空!")
+    private String password;
+
+    /**
+     * 旧密码
+     */
+    @NotBlank(message = "验证码不能为空!")
+    private String captcha;
+}

+ 52 - 0
sckw-modules/sckw-fleet/src/main/java/com/sckw/fleet/model/vo/KwfDriverCardVo.java

@@ -0,0 +1,52 @@
+package com.sckw.fleet.model.vo;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @desc 司机身份证信息
+ * @author zk
+ * @date 2023/7/6
+ */
+@Data
+public class KwfDriverCardVo implements Serializable{
+
+        /**
+     * 司机id
+     */
+    private Long driverId;
+
+    /**
+     * 身份证号
+     */
+    private String idcard;
+
+    /**
+     * 有效日期
+     */
+    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd")
+    private Date expireTime;
+
+    /**
+     * 联系地址
+     */
+    private String address;
+
+    /**
+     * 证书正面URL地址
+     */
+    private String certificateMain;
+
+    /**
+     * 证书反面URL地址
+     */
+    private String certificateRevolt;
+
+    /**
+     * 车辆状态(0未认证、1已认证)
+     */
+    private Integer status;
+
+}

+ 106 - 0
sckw-modules/sckw-fleet/src/main/java/com/sckw/fleet/model/vo/KwfDriverDetailVo.java

@@ -0,0 +1,106 @@
+package com.sckw.fleet.model.vo;
+
+import lombok.Data;
+import java.io.Serializable;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @desc 司机
+ * @author zk
+ * @date 2023/7/6
+ */
+@Data
+public class KwfDriverDetailVo implements Serializable {
+
+    /**
+     * id
+     */
+    private Long id;
+
+    /**
+     * 企业id
+     */
+    private Long entId;
+
+    /**
+     * 司机姓名
+     */
+    private String name;
+
+    /**
+     * 手机号码
+     */
+    private String phone;
+
+    /**
+     * 盐
+     */
+    private String salt;
+
+    /**
+     * 密码
+     */
+    private String password;
+
+    /**
+     * 身份证号
+     */
+    private String idcard;
+
+    /**
+     * 车辆状态(0正常、1锁定)
+     */
+    private Integer status;
+
+    /**
+     * 车辆业务状态(0空闲、1任务)
+     */
+    private Integer businessStatus;
+
+    /**
+     * 认证状态(1认证、2临时、3异常)
+     */
+    private Integer authStatus;
+
+    /**
+     * 车队名称
+     */
+    private String remark;
+
+    /**
+     * 企业名称
+     */
+    private String firmName;
+
+    /**
+     * 车队ID
+     */
+    private Long fleetId;
+
+    /**
+     * 车队名称
+     */
+    private String fleetName;
+
+    /**
+     * 身份证信息
+     */
+    KwfDriverCardVo driverCard;
+
+    /**
+     * 司机驾驶证信息
+     */
+    KwfDriverLicenseVo driverLicense;
+
+    /**
+     * 司机从业资格证
+     */
+    KwfDriverQualificationVo driverQualification;
+
+    /**
+     * 车辆信息
+     */
+    List<Map<String, Object>> trucks;
+
+}

+ 57 - 0
sckw-modules/sckw-fleet/src/main/java/com/sckw/fleet/model/vo/KwfDriverLicenseVo.java

@@ -0,0 +1,57 @@
+package com.sckw.fleet.model.vo;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @desc 司机驾驶证信息
+ * @author zk
+ * @date 2023/7/6
+ */
+@Data
+public class KwfDriverLicenseVo implements Serializable{
+
+        /**
+     * 司机id
+     */
+    private Long driverId;
+
+    /**
+     * 驾驶证号
+     */
+    private String driverNo;
+
+    /**
+     * 准驾车型
+     */
+    private String type;
+
+    /**
+     * 有效日期
+     */
+    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd")
+    private Date expireTime;
+
+    /**
+     * 发证机关单位
+     */
+    private String grantUnit;
+
+    /**
+     * 证书正面URL地址
+     */
+    private String certificateMain;
+
+    /**
+     * 证书反面URL地址
+     */
+    private String certificateRevolt;
+
+    /**
+     * 车辆状态(0未认证、1已认证)
+     */
+    private Integer status;
+
+}

+ 57 - 0
sckw-modules/sckw-fleet/src/main/java/com/sckw/fleet/model/vo/KwfDriverQualificationVo.java

@@ -0,0 +1,57 @@
+package com.sckw.fleet.model.vo;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @desc 司机从业资格证
+ * @author zk
+ * @date 2023/7/6
+ */
+@Data
+public class KwfDriverQualificationVo implements Serializable {
+
+    /**
+     * 司机id
+     */
+    private Long driverId;
+
+    /**
+     * 从业资格证号
+     */
+    private String qualiNo;
+
+    /**
+     * 准驾车型
+     */
+    private String type;
+
+    /**
+     * 有效日期
+     */
+    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd")
+    private Date expireTime;
+
+    /**
+     * 发证机关单位
+     */
+    private String grantUnit;
+
+    /**
+     * 证书正面URL地址
+     */
+    private String certificateMain;
+
+    /**
+     * 证书反面URL地址
+     */
+    private String certificateRevolt;
+
+    /**
+     * 车辆状态(0未认证、1已认证)
+     */
+    private Integer status;
+
+}

+ 68 - 0
sckw-modules/sckw-fleet/src/main/java/com/sckw/fleet/model/vo/KwfTransportLicenseVo.java

@@ -0,0 +1,68 @@
+package com.sckw.fleet.model.vo;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @desc 车辆道路运输许可证
+ * @author zk
+ * @date 2023/7/6
+ */
+@Data
+public class KwfTransportLicenseVo implements Serializable {
+
+    /**
+     * 车辆主键ID
+     */
+    private Long truckId;
+
+    /**
+     * 道路运输证号
+     */
+    private String roadTranNo;
+
+    /**
+     * 企业名称
+     */
+    private String firmName;
+
+    /**
+     * 经营许可证号
+     */
+    private String businessLicenseNo;
+
+    /**
+     * 发证机关单位
+     */
+    private String grantUnit;
+
+    /**
+     * 发证日期
+     */
+    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd")
+    private Date grantTime;
+
+    /**
+     * 有效期至
+     */
+    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd")
+    private Date expireTime;
+
+    /**
+     * 证书正面URL地址
+     */
+    private String certificateMain;
+
+    /**
+     * 证书反面URL地址
+     */
+    private String certificateRevolt;
+
+    /**
+     * 车辆状态(0未认证、1已认证)
+     */
+    private Integer status;
+
+}

+ 129 - 0
sckw-modules/sckw-fleet/src/main/java/com/sckw/fleet/model/vo/KwfTruckDetailVo.java

@@ -0,0 +1,129 @@
+package com.sckw.fleet.model.vo;
+
+import lombok.Data;
+import java.io.Serializable;
+import java.math.BigDecimal;
+
+/**
+ * @author zk
+ * @desc 车辆信息
+ * @date 2023/7/11 0011
+ */
+@Data
+public class KwfTruckDetailVo implements Serializable {
+
+    /**
+     * id
+     */
+    private Long id;
+
+    /**
+     * 企业id
+     */
+    private Long entId;
+
+    /**
+     * 车牌号
+     */
+    private String truckNo;
+
+    /**
+     * 车辆类型(牵引车、自卸、高栏、平板、厢式、集装箱车、罐车、封闭式、专项作业车、其他)
+     */
+    private Integer type;
+
+    /**
+     * 能源类型(柴油、汽油、电动、氢能、天然气、液化石油气、甲醇、油电混动、油气混动、其他)
+     */
+    private Integer energyType;
+
+    /**
+     * 使用性质(营运车、租赁车辆、货运车、危化品运输车、非营运车、其他)
+     */
+    private Integer useType;
+
+    /**
+     * 外廓尺寸
+     */
+    private String spec;
+
+    /**
+     * 标准荷载(净重)
+     */
+    private BigDecimal actualWeight;
+
+    /**
+     * 车辆总质量(毛重)
+     */
+    private BigDecimal grossWeight;
+
+    /**
+     * 皮重
+     */
+    private BigDecimal tareWeight;
+
+    /**
+     * 车辆颜色
+     */
+    private Integer color;
+
+    /**
+     * 环保等级(国标)
+     */
+    private Integer eev;
+
+    /**
+     * 挂车号
+     */
+    private String trailerNo;
+
+    /**
+     * 车辆状态(0正常、1锁定)
+     */
+    private Integer status;
+
+    /**
+     * 车辆业务状态(0空闲、1任务)
+     */
+    private Integer businessStatus;
+
+    /**
+     * 认证状态(1认证、2临时、3异常)
+     */
+    private Integer authStatus;
+
+    /**
+     * 车队名称
+     */
+    private String remark;
+
+    /**
+     * 车辆颜色
+     */
+    private String colorName;
+
+    /**
+     * 企业名称
+     */
+    private String firmName;
+
+    /**
+     * 车队ID
+     */
+    private Long fleetId;
+
+    /**
+     * 车队名称
+     */
+    private String fleetName;
+
+    /**
+     * 车辆行驶证信息
+     */
+    KwfTruckLicenseVo truckLicense;
+
+    /**
+     * 车辆道路运输许可证
+     */
+    KwfTransportLicenseVo transportLicense;
+}

+ 68 - 0
sckw-modules/sckw-fleet/src/main/java/com/sckw/fleet/model/vo/KwfTruckLicenseVo.java

@@ -0,0 +1,68 @@
+package com.sckw.fleet.model.vo;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @desc 车辆行驶证信息
+ * @author zk
+ * @date 2023/7/6
+ */
+@Data
+public class KwfTruckLicenseVo implements Serializable {
+
+    /**
+     * 车辆主键ID
+     */
+    private Long truckId;
+
+    /**
+     * 车辆识别码
+     */
+    private String vin;
+
+    /**
+     * 车辆行驶证号
+     */
+    private String drivingNo;
+
+    /**
+     * 车辆所有人
+     */
+    private String owner;
+
+    /**
+     * 注册日期
+     */
+    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd")
+    private Date regTime;
+
+    /**
+     * 发证机关单位
+     */
+    private String grantUnit;
+
+    /**
+     * 发证日期
+     */
+    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd")
+    private Date grantTime;
+
+    /**
+     * 证书正面URL地址
+     */
+    private String certificateMain;
+
+    /**
+     * 证书反面URL地址
+     */
+    private String certificateRevolt;
+
+    /**
+     * 车辆状态(0未认证、1已认证)
+     */
+    private Integer status;
+
+}

+ 20 - 4
sckw-modules/sckw-fleet/src/main/java/com/sckw/fleet/model/vo/KwfTruckReportVo.java

@@ -43,13 +43,13 @@ public class KwfTruckReportVo {
      * 认证状态(1认证、2临时、3异常)
      */
     @ExcelIgnore
-    private Integer authStatus;
+    private Integer truckAuthStatus;
 
     /**
      * 认证状态
      */
     @ExcelProperty(value = "状态")
-    private String authStatusName;
+    private String truckAuthStatusName;
 
     /**
      * 司机主键id
@@ -87,6 +87,18 @@ public class KwfTruckReportVo {
     @ExcelProperty(value = "司机归档企业")
     private String driverFirmName;
 
+    /**
+     * 认证状态(1认证、2临时、3异常)
+     */
+    @ExcelIgnore
+    private Integer driverAuthStatus;
+
+    /**
+     * 认证状态
+     */
+    @ExcelIgnore
+    private String driverAuthStatusName;
+
     /**
      * 车辆归档企业主键id
      */
@@ -177,8 +189,12 @@ public class KwfTruckReportVo {
     @ExcelProperty(value = "备注")
     private String remark;
 
-    public String getAuthStatusName() {
-        return authStatus == 1 ? "正常" : authStatus == 2 ? "临时" : "异常";
+
+    public String getTruckAuthStatusName() {
+        return truckAuthStatus == 1 ? "正常" : truckAuthStatus == 2 ? "临时" : "异常";
     }
 
+    public String getDriverAuthStatusName() {
+        return driverAuthStatus == 1 ? "正常" : driverAuthStatus == 2 ? "临时" : "异常";
+    }
 }

+ 122 - 12
sckw-modules/sckw-fleet/src/main/java/com/sckw/fleet/service/KwfDriverService.java

@@ -1,7 +1,9 @@
 package com.sckw.fleet.service;
 
+import com.sckw.core.common.enums.enums.DictEnum;
 import com.sckw.core.exception.SystemException;
 import com.sckw.core.model.constant.Global;
+import com.sckw.core.model.enums.SystemTypeEnum;
 import com.sckw.core.utils.BeanUtils;
 import com.sckw.core.utils.CollectionUtils;
 import com.sckw.core.utils.PasswordUtils;
@@ -12,8 +14,7 @@ import com.sckw.core.web.response.HttpResult;
 import com.sckw.fleet.dao.*;
 import com.sckw.fleet.model.*;
 import com.sckw.fleet.model.dto.*;
-import com.sckw.fleet.model.vo.KwfDriverVo;
-import com.sckw.fleet.model.vo.KwfTableTopCount;
+import com.sckw.fleet.model.vo.*;
 import com.sckw.redis.constant.RedisConstant;
 import com.sckw.redis.utils.RedissonUtils;
 import com.sckw.system.api.RemoteSystemService;
@@ -50,6 +51,8 @@ public class KwfDriverService {
     @Autowired
     KwfDriverQualificationMapper KwfDriverQualificationDao;
     @Autowired
+    KwfTruckReportMapper truckReportDao;
+    @Autowired
     KwfFleetDriverMapper fleetDriverDao;
     @DubboReference(version = "1.0.0", group = "design", check = false)
     private RemoteSystemService remoteSystemService;
@@ -64,6 +67,63 @@ public class KwfDriverService {
         return driverDao.selectById(key);
     }
 
+    /**
+     * @param driverId 司机ID
+     * @desc 司机信息查询
+     * @author zk
+     * @date 2023/7/11
+     **/
+    public KwfDriverDetailVo detail(Long driverId) {
+        //司机信息
+        KwfDriver driver = this.selectByKey(driverId);
+        KwfDriverDetailVo driverDetailVo = new KwfDriverDetailVo();
+        BeanUtils.copyPropertiesValue(driver, driverDetailVo);
+
+        //数据查询
+        if (driver != null) {
+            //身份证信息
+            KwfDriverCard cardJson = this.findCarByKey(driverId);
+            KwfDriverCardVo driverCardVo = new KwfDriverCardVo();
+            BeanUtils.copyPropertiesValue(cardJson, driverCardVo);
+            driverDetailVo.setDriverCard(driverCardVo);
+
+            //司机驾驶证信息
+            KwfDriverLicense licenseJson = this.findLicenseByKey(driverId);
+            KwfDriverLicenseVo driverLicenseVo = new KwfDriverLicenseVo();
+            BeanUtils.copyPropertiesValue(licenseJson, driverLicenseVo);
+            driverDetailVo.setDriverLicense(driverLicenseVo);
+
+            //司机从业资格证
+            KwfDriverQualification qualificationJson = this.findQualificationByKey(driverId);
+            KwfDriverQualificationVo qualificationVo = new KwfDriverQualificationVo();
+            BeanUtils.copyPropertiesValue(qualificationJson, qualificationVo);
+            driverDetailVo.setDriverQualification(qualificationVo);
+
+            //车队班组
+            KwfFleet fleet = this.findByFleetDriver(driverId, LoginUserHolder.getEntId());
+            driverDetailVo.setFleetId(fleet != null ? fleet.getId() : null);
+            driverDetailVo.setFleetName(fleet != null ? fleet.getName() : null);
+
+            //司机关联车辆(车辆上报)
+            if (LoginUserHolder.getSystemType() == SystemTypeEnum.DRIVER.getCode()) {
+                List<Map<String, Object>> trucks = new ArrayList();
+                List<Map<String, Object>> reports = truckReportDao.findList(new HashMap() {{
+                    put("driverId", driverId);
+                }});
+                for (Map<String, Object> report : reports) {
+                    trucks.add(new HashMap() {{
+                        put("truckId", report.get("truckId"));
+                        put("truckNo", report.get("truckNo"));
+                        put("trailerNo", report.get("truckTrailerNo"));
+                    }});
+                }
+                driverDetailVo.setTrucks(trucks);
+            }
+            return driverDetailVo;
+        }
+        return null;
+    }
+
     /**
      * @param params 参数
      * @desc 统计
@@ -362,6 +422,10 @@ public class KwfDriverService {
         /**数据copy**/
         KwfDriverCard driverCard = new KwfDriverCard();
         BeanUtils.copyProperties(params, driverCard);
+        driverCard.setStatus(Global.YES);
+        if (StringUtils.isBlank(driverCard.getCertificateMain()) && StringUtils.isBlank(driverCard.getCertificateRevolt())) {
+            driverCard.setStatus(Global.NO);
+        }
 
         /**数据更新**/
         int count = 0;
@@ -407,6 +471,10 @@ public class KwfDriverService {
         /**数据copy**/
         KwfDriverLicense driverLicense = new KwfDriverLicense();
         BeanUtils.copyProperties(params, driverLicense);
+        driverLicense.setStatus(Global.YES);
+        if (StringUtils.isBlank(driverLicense.getCertificateMain()) && StringUtils.isBlank(driverLicense.getCertificateRevolt())) {
+            driverLicense.setStatus(Global.NO);
+        }
 
         /**数据更新**/
         int count = 0;
@@ -453,6 +521,10 @@ public class KwfDriverService {
         /**数据copy**/
         KwfDriverQualification driverQual = new KwfDriverQualification();
         BeanUtils.copyProperties(params, driverQual);
+        driverQual.setStatus(Global.YES);
+        if (StringUtils.isBlank(driverQual.getCertificateMain()) && StringUtils.isBlank(driverQual.getCertificateRevolt())) {
+            driverQual.setStatus(Global.NO);
+        }
 
         /**数据更新**/
         int count = 0;
@@ -534,7 +606,6 @@ public class KwfDriverService {
         return fleetDriverDao.findByFleetDriver(driverId, entId);
     }
 
-
     /**
      * @param params 参数
      * @desc: 修改密码
@@ -583,13 +654,13 @@ public class KwfDriverService {
         }
 
         /**从缓存中取出验证码/校验**/
-        String valueKey = StringUtils.format(RedisConstant.MESSAGE_SMS_VERIFY_CODE_VALUE_KEY, params.getPhone());
-        String phoneCaptcha = RedissonUtils.getString(valueKey);
-        if (StringUtils.isBlank(phoneCaptcha)) {
-            return HttpResult.error("手机验证码不正确请确认!");
+        String key = StringUtils.format(RedisConstant.MESSAGE_SMS_VERIFY_CODE_VALUE_KEY, params.getPhone());
+        String smsCaptcha = RedissonUtils.getString(key);
+        if (StringUtils.isBlank(smsCaptcha)) {
+            return HttpResult.error("验证码已过期,请重新获取!!");
         }
-        if (!phoneCaptcha.equals(params.getCaptcha())) {
-            return HttpResult.error("手机验证码不正确请确认!");
+        if (!smsCaptcha.equals(params.getCaptcha())) {
+            return HttpResult.error("验证码不正确请确认再输入!");
         }
 
         /**唯一性交易**/
@@ -604,6 +675,42 @@ public class KwfDriverService {
         return count > 0 ? HttpResult.ok("手机号更换成功!") : HttpResult.error("手机号更换失败!");
     }
 
+    /**
+     * @param {account 账号、password 密码、captcha 验证码}
+     * @description 忘记密码
+     * @author zk
+     * @date 2023/08/15
+     **/
+    public HttpResult forgetPassword(ForgetPasswordDto params) {
+        /**校验**/
+        String key = StringUtils.format(RedisConstant.MESSAGE_SMS_VERIFY_CODE_VALUE_KEY, DictEnum.SMS_UPDATE_PASSWORD.getValue(), params.getAccount());
+        RedissonUtils.putString(key, params.getCaptcha(), RedisConstant.SMS_VERIFY_CODE_VALID_TIME);
+        String smsCaptcha = RedissonUtils.getString(key);
+        if (StringUtils.isBlank(smsCaptcha)){
+            return HttpResult.error(HttpStatus.UN_LOGIN_CODE, "验证码不能为空!");
+        }
+        if (StringUtils.isBlank(smsCaptcha)){
+            return HttpResult.error(HttpStatus.UN_LOGIN_CODE, "验证码已过期,请重新获取!");
+        }
+        if (!params.getCaptcha().equals(smsCaptcha)){
+            return HttpResult.error(HttpStatus.UN_LOGIN_CODE, "验证码不正确,请确认再输入!");
+        }
+
+        /**查询**/
+        List<KwfDriver> drivers = driverDao.findDriver(new HashMap(){{ put("phone", params.getAccount()); }});
+        if (CollectionUtils.isEmpty(drivers)) {
+            return HttpResult.error("账号不存在,请确认后再输入!");
+        }
+        KwfDriver driver = drivers.get(Global.NUMERICAL_ZERO);
+
+        /**更新数据**/
+        driver.setPassword(PasswordUtils.entryptPassword(params.getPassword()));
+        driver.setSalt(PasswordUtils.getSaltSubPwd(driver.getPassword()));
+        int count = driverDao.updateById(driver);
+        return count > 0 ? HttpResult.ok("密码修改成功!") : HttpResult.error("密码修改失败!");
+    }
+
+
     /**
      * @param params 参数
      * @desc 校验司机是否有证书
@@ -612,15 +719,18 @@ public class KwfDriverService {
      **/
     public boolean checkLicense(KwfDriverDto params) {
         //身份证
-        if (params.getDriverCard() == null || StringUtils.isBlank(params.getDriverCard().getIdcard())) {
+        KwfDriverCardDto card = params.getDriverCard();
+        if (card == null || (StringUtils.isBlank(card.getCertificateMain()) && StringUtils.isBlank(card.getCertificateRevolt()))) {
             return false;
         }
         //司机驾驶证信息
-        if (params.getDriverLicense() == null || StringUtils.isBlank(params.getDriverLicense().getDriverNo())) {
+        KwfDriverLicenseDto license = params.getDriverLicense();
+        if (license == null || (StringUtils.isBlank(license.getCertificateMain()) && StringUtils.isBlank(license.getCertificateRevolt()))) {
             return false;
         }
         //司机从业资格证
-        if (params.getDriverQualification() == null || StringUtils.isBlank(params.getDriverQualification().getQualiNo())) {
+        KwfDriverQualificationDto quali = params.getDriverQualification();
+        if (quali == null || (StringUtils.isBlank(quali.getCertificateMain()) && StringUtils.isBlank(quali.getCertificateRevolt()))) {
             return false;
         }
         return true;

+ 55 - 4
sckw-modules/sckw-fleet/src/main/java/com/sckw/fleet/service/KwfTruckService.java

@@ -12,8 +12,7 @@ import com.sckw.core.web.response.HttpResult;
 import com.sckw.fleet.dao.*;
 import com.sckw.fleet.model.*;
 import com.sckw.fleet.model.dto.*;
-import com.sckw.fleet.model.vo.KwfTableTopCount;
-import com.sckw.fleet.model.vo.KwfTruckVo;
+import com.sckw.fleet.model.vo.*;
 import com.sckw.system.api.RemoteSystemService;
 import com.sckw.system.api.model.dto.res.EntCacheResDto;
 import com.sckw.system.api.model.dto.res.SysDictResDto;
@@ -59,6 +58,46 @@ public class KwfTruckService {
         return truckDao.selectById(key);
     }
 
+    /**
+     * @param truckId 车辆档案ID
+     * @desc 车辆详情
+     * @author zk
+     * @date 2023/7/11
+     **/
+    public KwfTruckDetailVo detail(Long truckId){
+        //车辆信息
+        KwfTruck truck = this.selectByKey(truckId);
+        KwfTruckDetailVo truckDetailVo = new KwfTruckDetailVo();
+        BeanUtils.copyPropertiesValue(truck, truckDetailVo);
+
+        //数据组装
+        if (truck != null) {
+            //车辆行驶证信息
+            KwfTruckLicense truckLicense = this.findTruckLicenseByKey(truckId);
+            KwfTruckLicenseVo truckLicenseVo = new KwfTruckLicenseVo();
+            BeanUtils.copyPropertiesValue(truckLicense, truckLicenseVo);
+            truckDetailVo.setTruckLicense(truckLicenseVo);
+
+            //车辆道路运输许可证
+            KwfTransportLicense transportLicense = this.findTransportLicenseByKey(truckId);
+            KwfTransportLicenseVo transportLicenseVo = new KwfTransportLicenseVo();
+            BeanUtils.copyPropertiesValue(transportLicense, transportLicenseVo);
+            truckDetailVo.setTransportLicense(transportLicenseVo);
+
+            //字典
+            Map<String, SysDictResDto> dicts = remoteSystemService.queryDictMapByTypeValues(DictTypeEnum.COLOR_TYPE.getType() + Global.POUND + truck.getColor());
+            SysDictResDto color = dicts == null ? null : dicts.get(DictTypeEnum.COLOR_TYPE.getType() + Global.POUND + truck.getColor());
+            truckDetailVo.setColorName(color != null ? color.getLabel() : null);
+
+            //车队班组
+            KwfFleet fleet = this.findByFleetTruck(truckId, LoginUserHolder.getEntId());
+            truckDetailVo.setFleetId(fleet != null ? fleet.getId() : null);
+            truckDetailVo.setFleetName(fleet != null ? fleet.getName() : null);
+            return truckDetailVo;
+        }
+        return null;
+    }
+
     /**
      * @param params 参数
      * @desc 统计
@@ -347,6 +386,10 @@ public class KwfTruckService {
         /**数据copy**/
         KwfTruckLicense truckLicense = new KwfTruckLicense();
         BeanUtils.copyProperties(params, truckLicense);
+        truckLicense.setStatus(Global.YES);
+        if (StringUtils.isBlank(truckLicense.getCertificateMain()) && StringUtils.isBlank(truckLicense.getCertificateRevolt())) {
+            truckLicense.setStatus(Global.NO);
+        }
 
         /**数据更新**/
         int count = 0;
@@ -383,6 +426,10 @@ public class KwfTruckService {
         /**数据copy**/
         KwfTransportLicense transportLicense = new KwfTransportLicense();
         BeanUtils.copyProperties(params, transportLicense);
+        transportLicense.setStatus(Global.YES);
+        if (StringUtils.isBlank(transportLicense.getCertificateMain()) && StringUtils.isBlank(transportLicense.getCertificateRevolt())) {
+            transportLicense.setStatus(Global.NO);
+        }
 
         /**数据更新**/
         int count = 0;
@@ -473,11 +520,15 @@ public class KwfTruckService {
      **/
     public boolean checkLicense(KwfTruckDto params) {
         //车辆行驶证信息
-        if (params.getTruckLicense() == null || StringUtils.isBlank(params.getTruckLicense().getDrivingNo())) {
+        KwfTruckLicenseDto license = params.getTruckLicense();
+        if (license == null || (StringUtils.isBlank(license.getCertificateMain())
+                && StringUtils.isBlank(license.getCertificateRevolt()))) {
             return false;
         }
         //车辆道路运输许可证
-        if (params.getTransportLicense() == null || StringUtils.isBlank(params.getTransportLicense().getRoadTranNo())) {
+        KwfTransportLicenseDto transportLicense = params.getTransportLicense();
+        if (transportLicense == null || (StringUtils.isBlank(transportLicense.getCertificateMain())
+                && StringUtils.isBlank(transportLicense.getCertificateRevolt()))) {
             return false;
         }
         return true;

+ 1 - 1
sckw-modules/sckw-fleet/src/main/resources/mapper/KwfTransportLicenseMapper.xml

@@ -6,7 +6,7 @@
         SELECT
             id, truck_id truckId, road_tran_no roadTranNo, firm_name firmName, business_license_no businessLicenseNo,
             grant_unit grantUnit, grant_time grantTime, expire_time expireTime, certificate_main certificateMain,
-            certificate_revolt certificateRevolt, remark, create_by createBy, create_time createTime, update_by updateBy,
+            certificate_revolt certificateRevolt, status, remark, create_by createBy, create_time createTime, update_by updateBy,
             update_time updateTime
         from kwf_transport_license
         where del_flag = 0 and truck_id = #{truckId, jdbcType=BIGINT}

+ 1 - 1
sckw-modules/sckw-fleet/src/main/resources/mapper/KwfTruckLicenseMapper.xml

@@ -6,7 +6,7 @@
         SELECT
             id, truck_id truckId, vin, driving_no drivingNo, owner, reg_time regTime, grant_unit grantUnit,
             grant_time grantTime, certificate_main certificateMain, certificate_revolt certificateRevolt,
-            remark, create_by createBy, create_time createTime, update_by updateBy, update_time updateTime
+             status, remark, create_by createBy, create_time createTime, update_by updateBy, update_time updateTime
         from kwf_truck_license
         where del_flag = 0 and truck_id = #{truckId, jdbcType=BIGINT}
     </select>

+ 6 - 5
sckw-modules/sckw-fleet/src/main/resources/mapper/KwfTruckReportMapper.xml

@@ -49,9 +49,10 @@
         SELECT
             trr.id, trr.ent_id entId, trr.truck_id truckId, driver_id driverId, trr.remark, tr.status,
             trr.create_by createBy, trr.create_time createTime, trr.update_time updateTime, trr.remark,
-            tr.truck_no truckNo, tr.actual_weight actualWeight, tr.business_status businessStatus, tr.auth_status authStatus,
-            dr.`name` driverName, dr.phone driverPhone, dr.idcard driverIdcard, dr.ent_id driverEntId,
-            tr.ent_id truckEntId, fl.name truckFleetName, tr.type truckType, tr.color, tr.trailer_no trailerNo
+            tr.truck_no truckNo, tr.actual_weight actualWeight, tr.business_status businessStatus,
+            tr.auth_status truckAuthStatus, dr.`name` driverName, dr.phone driverPhone, dr.idcard driverIdcard,
+            dr.ent_id driverEntId, dr.auth_status driverAuthStatus, tr.ent_id truckEntId, fl.name truckFleetName,
+            tr.type truckType, tr.color, tr.trailer_no trailerNo
         from kwf_truck_report trr
         left join kwf_truck tr on tr.id = trr.truck_id
         left join kwf_driver dr on dr.id = trr.driver_id
@@ -76,8 +77,8 @@
         <if test="status != null and status != ''">
             and tr.status = #{status, jdbcType=VARCHAR}
         </if>
-        <if test="authStatus != null and status != ''">
-            and tr.auth_status = #{authStatus, jdbcType=VARCHAR}
+        <if test="truckAuthStatus != null and truckAuthStatus != ''">
+            and tr.auth_status = #{truckAuthStatus, jdbcType=VARCHAR}
         </if>
         <if test="startTime != null and startTime != '' " >
             and DATE( trr.create_time) <![CDATA[ >= ]]> #{startTime,jdbcType=TIMESTAMP}

+ 5 - 0
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/model/dto/SettlementLogisticsDto.java

@@ -146,6 +146,11 @@ public class SettlementLogisticsDto {
      */
     private String trading;
 
+    /**
+     * 交易方式文字
+     */
+    private String tradingLabel;
+
     /**
      * 对账单编号
      */

+ 22 - 3
sckw-modules/sckw-payment/src/main/java/com/sckw/payment/service/KwpSettlementLogisticsService.java

@@ -2,6 +2,7 @@ package com.sckw.payment.service;
 
 import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
+import com.sckw.core.common.enums.enums.DictTypeEnum;
 import com.sckw.core.exception.BusinessException;
 import com.sckw.core.model.vo.TableTop;
 import com.sckw.core.utils.StringTimeUtil;
@@ -10,6 +11,7 @@ import com.sckw.payment.dao.KwpSettlementLogisticsMapper;
 import com.sckw.payment.model.KwpSettlementLogistics;
 import com.sckw.payment.model.constant.LogisticsUnitType;
 import com.sckw.payment.model.constant.SettlementEnum;
+import com.sckw.payment.model.constant.TradingEnum;
 import com.sckw.payment.model.dto.SettlementLogisticsDto;
 import com.sckw.payment.model.vo.req.SettlementReq;
 import com.sckw.payment.model.vo.res.SettlementLogisticsStatusCountVo;
@@ -17,6 +19,7 @@ import com.sckw.payment.model.vo.res.SettlementLogisticsSumVo;
 import com.sckw.payment.utils.CommonValidator;
 import com.sckw.payment.utils.PageMoreRes;
 import com.sckw.system.api.RemoteSystemService;
+import com.sckw.system.api.model.dto.res.SysDictResDto;
 import com.sckw.system.api.model.dto.res.UserCacheResDto;
 import lombok.AllArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
@@ -244,6 +247,18 @@ public class KwpSettlementLogisticsService {
         return settlementLogisticsDto;
     }
 
+
+    private String changeDict(String trading) {
+        //字典等数据转换
+        String tradingLabel = "";
+        Map<String, SysDictResDto> dictResDtoMap = remoteSystemService.queryDictMapByType(DictTypeEnum.TRADE_TYPE.getType());
+        SysDictResDto sysDictResDto = dictResDtoMap.get(trading);
+        if (Objects.nonNull(sysDictResDto)) {
+            tradingLabel = sysDictResDto.getLabel();
+        }
+        return tradingLabel;
+    }
+
     /**
      * 增加 创建、更新人名称及字段
      *
@@ -251,12 +266,16 @@ public class KwpSettlementLogisticsService {
      * @date 2023-08-07 10:14
      */
     private void setDetailDesc(SettlementLogisticsDto settlementLogisticsDto) {
+        //更改支付方式 TradingEnum
+        settlementLogisticsDto.setTradingLabel(changeDict(settlementLogisticsDto.getTrading()));
+
+        //更改创建、更新人名称及字段
         settlementLogisticsDto.setStatusLabel(SettlementEnum.getStatusDesc(settlementLogisticsDto.getStatus()));
-        if (settlementLogisticsDto.getSettlePrice() != null) {
+        if (settlementLogisticsDto.getTotalPrice() != null) {
             if (settlementLogisticsDto.getActualPrice() != null) {
-                settlementLogisticsDto.setWaitPrice(settlementLogisticsDto.getSettlePrice().subtract(settlementLogisticsDto.getActualPrice()));
+                settlementLogisticsDto.setWaitPrice(settlementLogisticsDto.getTotalPrice().subtract(settlementLogisticsDto.getActualPrice()));
             } else {
-                settlementLogisticsDto.setWaitPrice(settlementLogisticsDto.getSettlePrice());
+                settlementLogisticsDto.setWaitPrice(settlementLogisticsDto.getTotalPrice());
             }
         } else {
             settlementLogisticsDto.setWaitPrice(new BigDecimal(0));

+ 1 - 6
sckw-modules/sckw-product/src/main/java/com/sckw/product/service/KwpGoodsService.java

@@ -791,12 +791,7 @@ public class KwpGoodsService {
             if (Objects.isNull(supplyEntId)) {
                 throw new BusinessException("供应单位不能为空!");
             }
-            Map<Long, EntCacheResDto> map = remoteSystemService.queryEntTreeByIds(List.of(supplyEntId));
-            EntCacheResDto ent = map.get(supplyEntId);
-            if (Objects.isNull(ent) || Objects.isNull(ent.getId())) {
-                throw new BusinessException("供应单位一级企业为空!");
-            }
-            wrapper.eq(KwpGoods::getSupplyEntId, ent.getId());
+            wrapper.eq(KwpGoods::getSupplyEntId, supplyEntId);
         }
         wrapper.like(StringUtils.isNotBlank(params.getName()), KwpGoods::getName, params.getName())
                 .eq(KwpGoods::getStatus, GoodsStatusEnum.PUT_ON_SHELVES.getCode())

+ 3 - 3
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/controller/LogisticsConsignmentController.java

@@ -190,7 +190,7 @@ public class LogisticsConsignmentController {
     /**
      * 销售订单-托运订单列表-销售订单id
      *
-     * @param ids 销售订单id
+     * @param query 订单查询
      * @return
      */
     @RequestMapping(value = "/sellLogisticsOrder", method = RequestMethod.POST)
@@ -225,7 +225,7 @@ public class LogisticsConsignmentController {
     /**
      * 销售订单-车辆列表-销售订单id
      *
-     * @param ids 销售订单ids
+     * @param orderQuery 销售订单ids
      * @return
      */
     @RequestMapping(value = "/sellLogisticsCar", method = RequestMethod.POST)
@@ -242,7 +242,7 @@ public class LogisticsConsignmentController {
     /**
      * 销售订单-托运订单列表-撤销托运
      *
-     * @param ids 物流订单id
+     * @param baseList 物流订单id
      * @return
      */
     @RequestMapping(value = "/sellCancelConsign", method = RequestMethod.POST)

+ 8 - 0
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/model/dto/CancelOrderDTO.java

@@ -3,6 +3,7 @@ package com.sckw.transport.model.dto;
 import com.fasterxml.jackson.annotation.JsonProperty;
 import jakarta.validation.constraints.NotNull;
 import lombok.Data;
+import org.hibernate.validator.constraints.Length;
 
 /**
  * @author lfdc
@@ -25,4 +26,11 @@ public class CancelOrderDTO {
     @JsonProperty("type")
     @NotNull(message = "单据类型不能为空")
     private String type;
+
+    /**
+     * 备注
+     */
+    @JsonProperty("remark")
+    @Length(max = 200,message = "备注长度错误最大长度:{max}")
+    private String remark;
 }

+ 0 - 16
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/service/AcceptCarriageLogisticsService.java

@@ -1,16 +0,0 @@
-package com.sckw.transport.service;
-
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.stereotype.Service;
-
-/**
- * @author lfdc
- * @description 承运物流service
- * @date 2023-06-26 16:06:12
- */
-@Slf4j
-@Service
-public class AcceptCarriageLogisticsService {
-
-
-}

+ 5 - 5
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/service/LogisticsConsignmentService.java

@@ -910,7 +910,7 @@ public class LogisticsConsignmentService {
      *
      * @param ids
      */
-    private void cancelConsignBySellOrder(List<String> ids, String remark, List<JSONObject> list) {
+    public void cancelConsignBySellOrder(List<String> ids, String remark, List<JSONObject> list) {
         ids.forEach(s -> {
             JSONObject jsonObject = new JSONObject();
             jsonObject.put("id", s);
@@ -990,7 +990,7 @@ public class LogisticsConsignmentService {
      *
      * @param ids
      */
-    private void cancelConsignByOrder(List<String> ids, String remark, List<JSONObject> list) {
+    public void cancelConsignByOrder(List<String> ids, String remark, List<JSONObject> list) {
         ids.forEach(s -> {
             /**当前单据作废
              * 托运数量回归溯源
@@ -1015,9 +1015,9 @@ public class LogisticsConsignmentService {
                 param.setUpdateByName(LoginUserHolder.getUserName());
                 HttpResult httpResult = tradeOrderInfoService.createOrCancelLogisticsOrder(param);
                 if (HttpStatus.SUCCESS_CODE == httpResult.getCode()) {
-                    kwtLogisticsOrder.setDelFlag(NumberConstant.ONE);
-                    kwtLogisticsOrder.setUpdateTime(new Date());
-                    kwtLogisticsOrder.setUpdateBy(LoginUserHolder.getUserId());
+//                    kwtLogisticsOrder.setDelFlag(NumberConstant.ONE);
+//                    kwtLogisticsOrder.setUpdateTime(new Date());
+//                    kwtLogisticsOrder.setUpdateBy(LoginUserHolder.getUserId());
                     kwtLogisticsOrderMapper.update(null, new LambdaUpdateWrapper<KwtLogisticsOrder>()
                             .eq(KwtLogisticsOrder::getId, kwtLogisticsOrder.getId())
                             .set(KwtLogisticsOrder::getStatus, LogisticsOrderEnum.CANCEL_ORDER.getCode())

+ 45 - 5
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/service/TransportCommonService.java

@@ -11,6 +11,7 @@ import com.sckw.core.common.enums.enums.DictTypeEnum;
 import com.sckw.core.model.enums.LogisticsOrderEnum;
 import com.sckw.core.model.page.PageResult;
 import com.sckw.core.utils.CollectionUtils;
+import com.sckw.core.utils.IdWorker;
 import com.sckw.core.utils.StringUtils;
 import com.sckw.core.web.constant.HttpStatus;
 import com.sckw.core.web.context.LoginUserHolder;
@@ -210,7 +211,7 @@ public class TransportCommonService {
         HttpResult result = new HttpResult();
         KwtLogisticsOrder logisticsOrder = logisticsOrderMapper.selectOne(new LambdaQueryWrapper<KwtLogisticsOrder>()
                         .eq(KwtLogisticsOrder::getId, orderDto.getId())
-                       /* .eq(KwtLogisticsOrder::getLOrderNo, orderDto.getOrderNo())*/
+                /* .eq(KwtLogisticsOrder::getLOrderNo, orderDto.getOrderNo())*/
                 /**.eq(KwtLogisticsOrder::getEntId, LoginUserHolder.getEntId())*/);
         if (logisticsOrder == null) {
             result.setCode(HttpStatus.GLOBAL_EXCEPTION_CODE);
@@ -241,6 +242,7 @@ public class TransportCommonService {
                     .set(KwtLogisticsOrder::getStatus, LogisticsOrderEnum.CANCEL_ORDER.getCode())
                     .set(KwtLogisticsOrder::getUpdateBy, LoginUserHolder.getUserId())
                     .set(KwtLogisticsOrder::getUpdateTime, new Date()));
+            updateOrderTrack(logisticsOrder.getId(),orderDto.getRemark(),LogisticsOrderEnum.CANCEL_ORDER);
             //mongodb更新
             SckwLogisticsOrder order = new SckwLogisticsOrder();
             order.set_id(logisticsOrder.getId());
@@ -248,6 +250,7 @@ public class TransportCommonService {
             order.setStatus(LogisticsOrderEnum.CANCEL_ORDER.getStatus());
             order.setUpdateTime(new Date());
             order.setUpdateByName(LoginUserHolder.getUserName());
+            order.setUpdateBy(LoginUserHolder.getUserId());
             SckwBusSum busSum = new SckwBusSum();
             //业务汇总类型
             busSum.setBusSumType(BusinessTypeEnum.LOGISTICS_ORDER_TYPE.getName());
@@ -276,19 +279,23 @@ public class TransportCommonService {
                     .set(KwtLogisticsOrder::getSubcontractAmount, add)
                     .set(KwtLogisticsOrder::getUpdateBy, LoginUserHolder.getUserId())
                     .set(KwtLogisticsOrder::getUpdateTime, new Date()));
-            /**下游订单进行删除*/
+//            updateOrderTrack(logisticsOrder.getId(),orderDto.getRemark(),LogisticsOrderEnum.CANCEL_ORDER);
+            /**下游订单进行状态改变*/
             logisticsOrderMapper.update(null, new LambdaUpdateWrapper<KwtLogisticsOrder>()
                     .eq(KwtLogisticsOrder::getId, logisticsOrder.getId())
                     .set(KwtLogisticsOrder::getStatus, LogisticsOrderEnum.CANCEL_ORDER.getCode())
                     .set(KwtLogisticsOrder::getUpdateBy, LoginUserHolder.getUserId())
                     .set(KwtLogisticsOrder::getUpdateTime, new Date()));
+            updateOrderTrack(logisticsOrder.getId(),orderDto.getRemark(),LogisticsOrderEnum.CANCEL_ORDER);
             /**mongodb更新*/
+            //父级
             SckwLogisticsOrder sckwLogisticsOrder = new SckwLogisticsOrder();
-            sckwLogisticsOrder.set_id(logisticsOrder.getId());
-            sckwLogisticsOrder.setLOrderId(logisticsOrder.getId());
-            sckwLogisticsOrder.setStatus(LogisticsOrderEnum.CANCEL_ORDER.getStatus());
+            sckwLogisticsOrder.set_id(order.getId());
+            sckwLogisticsOrder.setLOrderId(order.getId());
+            sckwLogisticsOrder.setSubcontractAmount(add);
             sckwLogisticsOrder.setUpdateTime(new Date());
             sckwLogisticsOrder.setUpdateByName(LoginUserHolder.getUserName());
+            sckwLogisticsOrder.setUpdateBy(LoginUserHolder.getUserId());
             SckwBusSum busSum = new SckwBusSum();
             //业务汇总类型
             busSum.setBusSumType(BusinessTypeEnum.LOGISTICS_ORDER_TYPE.getName());
@@ -296,6 +303,7 @@ public class TransportCommonService {
             busSum.setMethod(NumberConstant.TWO);
             //业务汇总数据对象
             busSum.setObject(sckwLogisticsOrder);
+            //当前级
             streamBridge.send("sckw-busSum", JSON.toJSONString(busSum));
             SckwLogisticsOrder logisticsOrder1 = new SckwLogisticsOrder();
             logisticsOrder1.set_id(logisticsOrder.getId());
@@ -303,6 +311,7 @@ public class TransportCommonService {
             logisticsOrder1.setStatus(LogisticsOrderEnum.CANCEL_ORDER.getStatus());
             logisticsOrder1.setUpdateTime(new Date());
             logisticsOrder1.setUpdateByName(LoginUserHolder.getUserName());
+            sckwLogisticsOrder.setUpdateBy(LoginUserHolder.getUserId());
             SckwBusSum busSum1 = new SckwBusSum();
             //业务汇总类型
             busSum1.setBusSumType(BusinessTypeEnum.LOGISTICS_ORDER_TYPE.getName());
@@ -315,6 +324,37 @@ public class TransportCommonService {
         return result;
     }
 
+    /**
+     * 根据物流订单修改物流状态表
+     * @param id
+     * @param remark
+     * @param logisticsOrderEnum
+     */
+    private void updateOrderTrack(Long id,String remark,LogisticsOrderEnum logisticsOrderEnum) {
+        KwtLogisticsOrderTrack orderTrack = logisticsOrderTrackMapper.selectOne(new LambdaQueryWrapper<KwtLogisticsOrderTrack>()
+                .eq(KwtLogisticsOrderTrack::getLOrderId, id)
+                .eq(KwtLogisticsOrderTrack::getStatus, logisticsOrderEnum.getCode())
+        );
+        if (orderTrack == null) {
+            KwtLogisticsOrderTrack track = new KwtLogisticsOrderTrack();
+            track.setId(new IdWorker(NumberConstant.ONE).nextId());
+            track.setLOrderId(id);
+            track.setRemark(remark);
+            track.setStatus(LogisticsOrderEnum.CANCEL_ORDER.getCode());
+            track.setCreateBy(LoginUserHolder.getUserId());
+            track.setCreateTime(new Date());
+            track.setUpdateBy(LoginUserHolder.getUserId());
+            track.setUpdateTime(new Date());
+            logisticsOrderTrackMapper.insert(track);
+        } else {
+            orderTrack.setRemark(remark);
+            orderTrack.setStatus(LogisticsOrderEnum.CANCEL_ORDER.getCode());
+            orderTrack.setUpdateBy(LoginUserHolder.getUserId());
+            orderTrack.setUpdateTime(new Date());
+            logisticsOrderTrackMapper.updateById(orderTrack);
+        }
+    }
+
     /**
      * 对账管理-运费收款对账界面查询接口
      *