c9420f1af08fbbc15af22df32b33d3f121f4c507..dda4c08d41693d2495a13e7db230c3e9747540de
2025-09-02 wujianwei
Merge remote-tracking branch 'origin/yagwly_fa_master' into yagwly_fa_master
dda4c0 对比 | 目录
2025-09-01 wujianwei
新增前后端
e64625 对比 | 目录
2025-08-28 wujianwei
新增前后端
446f42 对比 | 目录
1 文件已重命名
7个文件已修改
151 ■■■■■ 已修改文件
admin/config/test/application-custom.yml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/pom.xml 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
api/pom.xml 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
api/src/main/java/com/ruoyi/api/third/controller/LockerApiController.java 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service/src/main/java/com/ruoyi/cwgl/domain/dto/ReturnReportDto.java 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service/src/main/java/com/ruoyi/cwgl/domain/dto/TakeReviewDto.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service/src/main/java/com/ruoyi/cwgl/service/impl/KeyCollectionInfoServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
service/src/main/resources/mapper/cwgl/KeyCollectionInfoMapper.xml 85 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/config/test/application-custom.yml
@@ -83,6 +83,7 @@
      /captchaImage
      /actuator/**
      /*/api-docs
      /api/**
      /druid/**
      /webjars/**
      /swagger-resources/**
admin/pom.xml
@@ -59,7 +59,11 @@
            <artifactId>quartz</artifactId>
        </dependency>
        <dependency>
            <groupId>com.ruoyi</groupId>
            <artifactId>api</artifactId>
            <version>master</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-actuator</artifactId>
api/pom.xml
@@ -10,20 +10,24 @@
    <modelVersion>4.0.0</modelVersion>
    <artifactId>api</artifactId>
    <dependencies>
        <dependency>
            <groupId>com.ruoyi</groupId>
            <artifactId>api-remote</artifactId>
            <artifactId>common</artifactId>
            <version>${project.version}</version>
        </dependency>
        <!--持久化层模块-->
        <dependency>
            <groupId>com.ruoyi</groupId>
            <artifactId>framework</artifactId>
            <version>${ruoyi.version}</version>
        </dependency>
        <dependency>
            <groupId>com.ruoyi</groupId>
            <artifactId>service</artifactId>
            <version>master</version>
        </dependency>
    </dependencies>
</project>
api/src/main/java/com/ruoyi/api/third/controller/LockerApiController.java
File was renamed from api/src/main/java/com/ruoyi/api/controller/LockerApiController.java
@@ -1,4 +1,4 @@
package com.ruoyi.api.controller;
package com.ruoyi.api.third.controller;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.DateUtils;
@@ -8,11 +8,12 @@
import com.ruoyi.cwgl.domain.dto.TakeReviewDto;
import com.ruoyi.cwgl.service.IKeyCollectionInfoService;
import com.ruoyi.cwgl.service.IRequestLogService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
/**
@@ -20,8 +21,10 @@
 * @author wjw
 */
@RestController
@RequestMapping("/api/third/locker/")
@RequestMapping("/api/third/locker")
public class LockerApiController {
    private static Logger logger = LoggerFactory.getLogger(LockerApiController.class);
    @Autowired
    private IKeyCollectionInfoService keyCollectionInfoService;
@@ -31,16 +34,20 @@
    /**
     * 上报取出审核
     */
    @GetMapping("test")
    public AjaxResult test(){
        return AjaxResult.success();
    }
    @PostMapping("takeReview")
    public AjaxResult takeReview(@RequestBody TakeReviewDto takeReviewDto){
    @PostMapping("/takeReview")
    public AjaxResult takeReview(@Valid @RequestBody TakeReviewDto takeReviewDto){
        KeyCollectionInfo keyCollectionInfo = keyCollectionInfoService.selectCwData(takeReviewDto);
        //添加请求日志
        RequestLog requestLog = new RequestLog();
        requestLog.setDriverCode(takeReviewDto.getDriverCode());
        requestLog.setDriverName(takeReviewDto.getDriverName());
        requestLog.setReqTime(DateUtils.parseDate(takeReviewDto.getHandleTime()));
        requestLog.setReqTime(takeReviewDto.getHandleTime());
        requestLog.setType(0);
        logService.insertRequestLog(requestLog);
@@ -53,14 +60,14 @@
     * 归还上报
     */
    @PostMapping("returnReport")
    public AjaxResult returnReport(@RequestBody ReturnReportDto returnReportDto){
    @PostMapping("/returnReport")
    public AjaxResult returnReport(@Valid @RequestBody ReturnReportDto returnReportDto){
        //添加请求日志
        RequestLog requestLog = new RequestLog();
        requestLog.setDriverCode(returnReportDto.getDriverCode());
        requestLog.setBoxNum(returnReportDto.getBoxNum());
        requestLog.setReqTime(DateUtils.parseDate(returnReportDto.getSaveTime()));
        requestLog.setReqTime(returnReportDto.getSaveTime());
        requestLog.setType(1);
        logService.insertRequestLog(requestLog);
service/src/main/java/com/ruoyi/cwgl/domain/dto/ReturnReportDto.java
@@ -1,8 +1,10 @@
package com.ruoyi.cwgl.domain.dto;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.util.Date;
/**
 * 上报取出审核dto
@@ -19,6 +21,7 @@
    private  String driverCode ;
    /**司机唯一编号*/
    @NotBlank(message = "存入时间不能为空")
    private  String saveTime ;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date saveTime ;
}
service/src/main/java/com/ruoyi/cwgl/domain/dto/TakeReviewDto.java
@@ -1,8 +1,11 @@
package com.ruoyi.cwgl.domain.dto;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;
/**
 * 上报取出审核dto
@@ -18,7 +21,7 @@
    @NotBlank(message = "司机姓名不能为空")
    private  String driverName ;
    /**司机唯一编号*/
    @NotBlank(message = "请求开门时间不能为空")
    private  String handleTime ;
    @NotNull(message = "请求开门时间不能为空")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date handleTime;
}
service/src/main/java/com/ruoyi/cwgl/service/impl/KeyCollectionInfoServiceImpl.java
@@ -210,7 +210,7 @@
        if (keyTimeout!=null && keyTimeout>24){
            Date estimatedDepartureTime = keyCollectionInfo.getEstimatedDepartureTime();
            String dateToStr = DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, estimatedDepartureTime);
            return AjaxResult.error("预计出发时间"+ dateToStr+",领取钥匙超时"+keyTimeout+"个小时");
            return AjaxResult.error("要求出发时间"+ dateToStr+",领取钥匙超时"+keyTimeout+"个小时");
        }
        return AjaxResult.success("成功",2);
    }
service/src/main/resources/mapper/cwgl/KeyCollectionInfoMapper.xml
@@ -80,52 +80,51 @@
        order by thisTab.id desc
    </select>
    <select id="selectCwData" resultType="com.ruoyi.cwgl.domain.KeyCollectionInfo">
SELECT
    customer.`NAME` as customerName,
    bp.`NAME` as carrier,
    ts.DISPATCH_NO as dispatchNo,
    driver_m.`NAME` as driverName,
    driver_m.MOBILE as driverMobile,
    vhc.LICENSE_PLATE_NUMBER as licensePlateNumber,
    ord.ORDER_TIME as orderTime,
    ord.CREATED_TIME as orderCreatedTime,
    ts.CREATED_TIME as dispatchCreatedTime,
    now() as keyCollectionTime, -- 放请求查询到的时间
    ord.ESTIMATED_DEPARTURE_TIME as estimatedDepartureTime,
    ord.CONSIGNOR_ADDRESS_ADDR_INFO as consignorAddress,
    ord.CONSIGNEE_ADDRESS_ADDR_INFO as consigneeAddress,
    driver_m.`NAME` as mainDriver,
    ts.POINT_NUM as pointNum,
    ts.TRANSPORT_MODE as transportMode,
    driver_a.`NAME` as assistantDriver,
    ts.QUANTITY as quantity,
    ts.REQUIRED_ARRIVAL_TIME as ,
    ts.DISPATCH_QUANTITY as dispatchQuantity,
    ts.REMARK as remark,
    TIMESTAMPDIFF(HOUR, ord.ORDER_TIME, ord.CREATED_TIME) as schedulingTimeout,
    TIMESTAMPDIFF(HOUR, ord.ESTIMATED_DEPARTURE_TIME, NOW()) as keyTimeout
        SELECT
        customer.`NAME` as customerName,
        bp.`NAME` as carrier,
        ts.DISPATCH_NO as dispatchNo,
        driver_m.`NAME` as driverName,
        driver_m.MOBILE as driverMobile,
        vhc.LICENSE_PLATE_NUMBER as licensePlateNumber,
        ord.ORDER_TIME as orderTime,
        ord.CREATED_TIME as orderCreatedTime,
        ts.CREATED_TIME as dispatchCreatedTime,
        now() as keyCollectionTime, -- 放请求查询到的时间
        ord.REQUIRED_DEPARTURE_TIME as estimatedDepartureTime,
        ord.CONSIGNOR_ADDRESS_ADDR_INFO as consignorAddress,
        ord.CONSIGNEE_ADDRESS_ADDR_INFO as consigneeAddress,
        driver_m.`NAME` as mainDriver,
        ts.POINT_NUM as pointNum,
        ts.TRANSPORT_MODE as transportMode,
        driver_a.`NAME` as assistantDriver,
        ts.QUANTITY as quantity,
        ts.REQUIRED_ARRIVAL_TIME as requiredArrivalTime,  -- 添加别名
        ts.DISPATCH_QUANTITY as dispatchQuantity,
        ts.REMARK as remark,
        TIMESTAMPDIFF(HOUR, ord.ORDER_TIME, ord.CREATED_TIME) as schedulingTimeout,
        TIMESTAMPDIFF(HOUR, ord.REQUIRED_DEPARTURE_TIME, NOW()) as keyTimeout
FROM
  tms_shipment ts
  left JOIN oms_order ord ON ts.DISPATCH_NO = ord.DISPATCH_CODE
  LEFT JOIN base_customer customer ON customer.ID = ord.CUSTOMER_ID
  LEFT JOIN tms_vehicle vhc ON ts.VEHICLE_ID = vhc.id
  LEFT JOIN base_provider bp ON bp.ID = ts.CARRIER_ID
  LEFT JOIN tms_driver driver_m ON driver_m.ID = ts.MAIN_DRIVER_ID
  LEFT JOIN tms_driver driver_a ON driver_a.ID = ts.ASSISTANT_DRIVER_ID
WHERE
  ts.`STATUS` = 'A'
  <if test="driverCode != null and driverCode != '' ">
      and driver_m.MOBILE = #{driverCode}
  </if>
  <if test="driverName != null and driverName != ''">
      and driver_m.NAME = #{driverName}
  </if>
ORDER BY ord.ESTIMATED_DEPARTURE_TIME asc
LIMIT 1
        FROM
        tms_shipment ts
        LEFT JOIN oms_order ord ON ts.DISPATCH_NO = ord.DISPATCH_CODE
        LEFT JOIN base_customer customer ON customer.ID = ord.CUSTOMER_ID
        LEFT JOIN tms_vehicle vhc ON ts.VEHICLE_ID = vhc.id
        LEFT JOIN base_provider bp ON bp.ID = ts.CARRIER_ID
        LEFT JOIN tms_driver driver_m ON driver_m.ID = ts.MAIN_DRIVER_ID
        LEFT JOIN tms_driver driver_a ON driver_a.ID = ts.ASSISTANT_DRIVER_ID
        WHERE
        ts.`STATUS` = 'A'
        <if test="driverCode != null and driverCode != ''">
            AND driver_m.MOBILE = #{driverCode}
        </if>
        <if test="driverName != null and driverName != ''">
            AND driver_m.NAME = #{driverName}
        </if>
        ORDER BY ord.ESTIMATED_DEPARTURE_TIME ASC
        LIMIT 1
    </select>
    <!-- 新增 -->