wujianwei
4 天以前 98d00448989d01cef0e714cfc528ff31011a86b3
修改归还上报查询司机名字
5个文件已修改
28 ■■■■ 已修改文件
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 | 历史
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">