zhangback
2025-12-13 de6b53552f2e35f992f60c8cc7110bcb99105d96
Merge remote-tracking branch 'origin/yagwly_fa_master' into yagwly_fa_master
6个文件已修改
30 ■■■■ 已修改文件
api/src/main/java/com/ruoyi/api/third/controller/LockerApiController.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service/src/main/java/com/ruoyi/cwgl/mapper/KeyCollectionInfoMapper.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service/src/main/java/com/ruoyi/cwgl/service/IKeyCollectionInfoService.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service/src/main/java/com/ruoyi/cwgl/service/impl/KeyCollectionInfoServiceImpl.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service/src/main/resources/mapper/cwgl/KeyCollectionInfoMapper.xml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
tms/src/main/resources/mapper/tms/TmsCarKeyDispatchMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
api/src/main/java/com/ruoyi/api/third/controller/LockerApiController.java
@@ -1,10 +1,6 @@
package com.ruoyi.api.third.controller;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.RandomUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.cwgl.domain.KeyCollectionInfo;
import com.ruoyi.cwgl.domain.RequestLog;
import com.ruoyi.cwgl.domain.dto.ReturnReportDto;
import com.ruoyi.cwgl.domain.dto.TakeReviewDto;
@@ -19,7 +15,6 @@
import javax.validation.Valid;
import java.util.Random;
import java.util.concurrent.ThreadLocalRandom;
/**
@@ -94,10 +89,11 @@
    @PostMapping("/returnReport")
    public AjaxResult returnReport(@Valid @RequestBody ReturnReportDto returnReportDto){
        logger.info("归还参数{}",returnReportDto);
        String name =keyCollectionInfoService.selectNameByMobile(returnReportDto.getDriverCode());
        //添加请求日志
        RequestLog requestLog = new RequestLog();
        requestLog.setDriverCode(returnReportDto.getDriverCode());
        requestLog.setDriverName(name);
        requestLog.setBoxNum(returnReportDto.getBoxNum());
        requestLog.setReqTime(returnReportDto.getSaveTime());
        requestLog.setType(1);
service/src/main/java/com/ruoyi/cwgl/mapper/KeyCollectionInfoMapper.java
@@ -90,4 +90,6 @@
    String selectCwBoxNum(String licensePlateNumber);
    String selectNameByMobile(String driverCode);
}
service/src/main/java/com/ruoyi/cwgl/service/IKeyCollectionInfoService.java
@@ -123,4 +123,11 @@
    String selectCwBoxNum(String licensePlateNumber);
    String selectBoxNum(String licensePlateNumber);
    /**
     * 根据手机号查询司机名
     * @param driverCode
     * @return
     */
    String selectNameByMobile(String driverCode);
}
service/src/main/java/com/ruoyi/cwgl/service/impl/KeyCollectionInfoServiceImpl.java
@@ -247,4 +247,10 @@
    public String selectBoxNum(String licensePlateNumber) {
        return null;
    }
    @DataSource(DataSourceType.CWSJ)
    @Override
    public String selectNameByMobile(String driverCode) {
        return keyCollectionInfoMapper.selectNameByMobile(driverCode);
    }
}
service/src/main/resources/mapper/cwgl/KeyCollectionInfoMapper.xml
@@ -136,6 +136,11 @@
    SELECT `NAME` from tms_vehicle where LICENSE_PLATE_NUMBER = #{licensePlateNumber} and `NAME` is not null LIMIT 1
    </select>
    <select id="selectNameByMobile" resultType="java.lang.String">
        SELECT NAME from tms_driver where MOBILE =  #{driverCode}
        limit 1
    </select>
    <!-- 新增 -->
    <insert id="insertKeyCollectionInfo" parameterType="com.ruoyi.cwgl.domain.KeyCollectionInfo"  useGeneratedKeys="true" keyProperty="id">
tms/src/main/resources/mapper/tms/TmsCarKeyDispatchMapper.xml
@@ -67,7 +67,7 @@
        WHERE
        thisTab.driver_mobile = #{driverCode}
        AND thisTab.status = 0
        AND thisTab.car_key_expiration_time &lt;= NOW()
        AND thisTab.car_key_expiration_time &gt;= NOW()
        limit 1
    </select>