wujianwei
2025-08-27 89cd54f5065f18b9e08983cec812a3c44060742d
新增前后端
16个文件已添加
2003 ■■■■■ 已修改文件
service/src/main/java/com/ruoyi/cwgl/controller/KeyCollectionInfoController.java 108 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service/src/main/java/com/ruoyi/cwgl/controller/RequestLogController.java 108 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service/src/main/java/com/ruoyi/cwgl/domain/KeyCollectionInfo.java 165 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service/src/main/java/com/ruoyi/cwgl/domain/RequestLog.java 77 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service/src/main/java/com/ruoyi/cwgl/mapper/KeyCollectionInfoMapper.java 87 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service/src/main/java/com/ruoyi/cwgl/mapper/RequestLogMapper.java 87 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service/src/main/java/com/ruoyi/cwgl/service/IKeyCollectionInfoService.java 102 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service/src/main/java/com/ruoyi/cwgl/service/IRequestLogService.java 102 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service/src/main/java/com/ruoyi/cwgl/service/impl/KeyCollectionInfoServiceImpl.java 179 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service/src/main/java/com/ruoyi/cwgl/service/impl/RequestLogServiceImpl.java 181 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service/src/main/resources/mapper/cwgl/KeyCollectionInfoMapper.xml 216 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service/src/main/resources/mapper/cwgl/RequestLogMapper.xml 137 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ui/admin-ui3/src/api/cwgl/keyCollectionInfo.ts 67 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ui/admin-ui3/src/api/cwgl/requestLog.ts 67 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ui/admin-ui3/src/views/cwgl/keyCollectionInfo/index.vue 181 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ui/admin-ui3/src/views/cwgl/requestLog/index.vue 139 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service/src/main/java/com/ruoyi/cwgl/controller/KeyCollectionInfoController.java
New file
@@ -0,0 +1,108 @@
package com.ruoyi.cwgl.controller;
import java.util.List;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.utils.file.DownloadExportUtil;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.cwgl.domain.KeyCollectionInfo;
import com.ruoyi.cwgl.service.IKeyCollectionInfoService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
 * 钥匙领取信息Controller
 *
 * @author ruoyi
 * @date 2025-08-27
 */
@RestController
@RequestMapping("/cwgl/keyCollectionInfo")
public class KeyCollectionInfoController extends BaseController
{
    @Autowired
    private IKeyCollectionInfoService keyCollectionInfoService;
    /**
     * 查询钥匙领取信息列表
     */
    @PreAuthorize("@ss.hasPermi('cwgl:keyCollectionInfo:list')")
    @GetMapping("/list")
    public TableDataInfo list(KeyCollectionInfo keyCollectionInfo)
    {
        startPage();
        List<KeyCollectionInfo> list = keyCollectionInfoService.selectKeyCollectionInfoList(keyCollectionInfo);
        return getDataTable(list);
    }
    /**
     * 导出钥匙领取信息列表
     * @param keyCollectionInfo 查询条件对象
     */
    @PreAuthorize("@ss.hasPermi('cwgl:keyCollectionInfo:export')")
    @Log(title = "钥匙领取信息", businessType = BusinessType.EXPORT)
    @GetMapping("/export")
    public AjaxResult export(KeyCollectionInfo keyCollectionInfo,String exportKey)
    {
        keyCollectionInfoService.export(keyCollectionInfo,exportKey);
        return AjaxResult.success("导出请求成功,请稍后点击下载...!");
    }
    /**
     * 获取钥匙领取信息详细信息
     */
    @PreAuthorize("@ss.hasPermi('cwgl:keyCollectionInfo:query')")
    @GetMapping(value = "/{id}")
    public AjaxResult getInfo(@PathVariable("id") Integer id)
    {
        return AjaxResult.success(keyCollectionInfoService.selectKeyCollectionInfoById(id));
    }
    /**
     * 新增钥匙领取信息
     */
    @PreAuthorize("@ss.hasPermi('cwgl:keyCollectionInfo:add')")
    @Log(title = "钥匙领取信息", businessType = BusinessType.INSERT)
    @PostMapping
    public AjaxResult add(@RequestBody KeyCollectionInfo keyCollectionInfo)
    {
        return toAjax(keyCollectionInfoService.insertKeyCollectionInfo(keyCollectionInfo));
    }
    /**
     * 修改钥匙领取信息
     */
    @PreAuthorize("@ss.hasPermi('cwgl:keyCollectionInfo:edit')")
    @Log(title = "钥匙领取信息", businessType = BusinessType.UPDATE)
    @PutMapping
    public AjaxResult edit(@RequestBody KeyCollectionInfo keyCollectionInfo)
    {
        return toAjax(keyCollectionInfoService.updateKeyCollectionInfo(keyCollectionInfo));
    }
    /**
     * 删除钥匙领取信息
     */
    @PreAuthorize("@ss.hasPermi('cwgl:keyCollectionInfo:remove')")
    @Log(title = "钥匙领取信息", businessType = BusinessType.DELETE)
    @DeleteMapping("/{ids}")
    public AjaxResult remove(@PathVariable Integer[] ids)
    {
        return toAjax(keyCollectionInfoService.deleteKeyCollectionInfoByIds(ids));
    }
}
service/src/main/java/com/ruoyi/cwgl/controller/RequestLogController.java
New file
@@ -0,0 +1,108 @@
package com.ruoyi.cwgl.controller;
import java.util.List;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.utils.file.DownloadExportUtil;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.cwgl.domain.RequestLog;
import com.ruoyi.cwgl.service.IRequestLogService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
 * 请求日志Controller
 *
 * @author ruoyi
 * @date 2025-08-27
 */
@RestController
@RequestMapping("/cwgl/requestLog")
public class RequestLogController extends BaseController
{
    @Autowired
    private IRequestLogService requestLogService;
    /**
     * 查询请求日志列表
     */
    @PreAuthorize("@ss.hasPermi('cwgl:requestLog:list')")
    @GetMapping("/list")
    public TableDataInfo list(RequestLog requestLog)
    {
        startPage();
        List<RequestLog> list = requestLogService.selectRequestLogList(requestLog);
        return getDataTable(list);
    }
    /**
     * 导出请求日志列表
     * @param requestLog 查询条件对象
     */
    @PreAuthorize("@ss.hasPermi('cwgl:requestLog:export')")
    @Log(title = "请求日志", businessType = BusinessType.EXPORT)
    @GetMapping("/export")
    public AjaxResult export(RequestLog requestLog,String exportKey)
    {
        requestLogService.export(requestLog,exportKey);
        return AjaxResult.success("导出请求成功,请稍后点击下载...!");
    }
    /**
     * 获取请求日志详细信息
     */
    @PreAuthorize("@ss.hasPermi('cwgl:requestLog:query')")
    @GetMapping(value = "/{id}")
    public AjaxResult getInfo(@PathVariable("id") Integer id)
    {
        return AjaxResult.success(requestLogService.selectRequestLogById(id));
    }
    /**
     * 新增请求日志
     */
    @PreAuthorize("@ss.hasPermi('cwgl:requestLog:add')")
    @Log(title = "请求日志", businessType = BusinessType.INSERT)
    @PostMapping
    public AjaxResult add(@RequestBody RequestLog requestLog)
    {
        return toAjax(requestLogService.insertRequestLog(requestLog));
    }
    /**
     * 修改请求日志
     */
    @PreAuthorize("@ss.hasPermi('cwgl:requestLog:edit')")
    @Log(title = "请求日志", businessType = BusinessType.UPDATE)
    @PutMapping
    public AjaxResult edit(@RequestBody RequestLog requestLog)
    {
        return toAjax(requestLogService.updateRequestLog(requestLog));
    }
    /**
     * 删除请求日志
     */
    @PreAuthorize("@ss.hasPermi('cwgl:requestLog:remove')")
    @Log(title = "请求日志", businessType = BusinessType.DELETE)
    @DeleteMapping("/{ids}")
    public AjaxResult remove(@PathVariable Integer[] ids)
    {
        return toAjax(requestLogService.deleteRequestLogByIds(ids));
    }
}
service/src/main/java/com/ruoyi/cwgl/domain/KeyCollectionInfo.java
New file
@@ -0,0 +1,165 @@
package com.ruoyi.cwgl.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.baomidou.mybatisplus.annotation.TableField;
import java.util.Date;
import lombok.Data;
/**
 * 钥匙领取信息对象 key_collection_info
 *
 * @author ruoyi
 * @date 2025-08-27
 */
@Data
public class KeyCollectionInfo{
    /** ID */
        @TableField("id")
    private Integer id;
    /** 客户名称 */
    @Excel(name = "客户名称")
        @TableField("customer_name")
    private String customerName;
    /** 承运商 */
    @Excel(name = "承运商")
        @TableField("carrier")
    private String carrier;
    /** 调度单号 */
    @Excel(name = "调度单号")
        @TableField("dispatch_no")
    private String dispatchNo;
    /** 司机名称 */
    @Excel(name = "司机名称")
        @TableField("driver_name")
    private String driverName;
    /** 司机手机号 */
    @Excel(name = "司机手机号")
    @TableField("driver_mobile")
    private String driverMobile;
    /** 车牌号 */
    @Excel(name = "车牌号")
    @TableField("license_plate_number")
    private String licensePlateNumber;
    /** 订单下单时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "订单下单时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    @TableField("order_time")
    private Date orderTime;
    /** 订单创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "订单创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    @TableField("order_created_time")
    private Date orderCreatedTime;
    /** 调度单创建时间 */
    @Excel(name = "调度单创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField("dispatch_created_time")
    private Date dispatchCreatedTime;
    /** 钥匙领取时间(请求查询时间) */
    @Excel(name = "钥匙领取时间", readConverterExp = "请=求查询时间")
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
        @TableField("key_collection_time")
    private Date keyCollectionTime;
    /** 预计出发时间 */
    @Excel(name = "预计出发时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField("estimated_departure_time")
    private Date estimatedDepartureTime;
    /** 要求到达时间 */
    @Excel(name = "要求到达时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField("required_arrival_time")
    private Date requiredArrivalTime;
    /** 出发地地址 */
    @Excel(name = "出发地地址")
        @TableField("consignor_address")
    private String consignorAddress;
    /** 目的地地址 */
    @Excel(name = "目的地地址")
        @TableField("consignee_address")
    private String consigneeAddress;
    /** 主驾驶员 */
    @Excel(name = "主驾驶员")
        @TableField("main_driver")
    private String mainDriver;
    /** 提送货点数 */
    @Excel(name = "提送货点数")
        @TableField("point_num")
    private Integer pointNum;
    /** 运输方式 */
    @Excel(name = "运输方式")
    @TableField("transport_mode")
    private String transportMode;
    /** 副驾驶员 */
    @Excel(name = "副驾驶员")
    @TableField("assistant_driver")
    private String assistantDriver;
    /** 件数 */
    @Excel(name = "件数")
    @TableField("quantity")
    private Integer quantity;
    /** 实发件数 */
    @Excel(name = "实发件数")
    @TableField("dispatch_quantity")
    private Integer dispatchQuantity;
    /** 备注 */
    @Excel(name = "备注")
    @TableField("remark")
    private String remark;
}
service/src/main/java/com/ruoyi/cwgl/domain/RequestLog.java
New file
@@ -0,0 +1,77 @@
package com.ruoyi.cwgl.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.baomidou.mybatisplus.annotation.TableField;
import java.util.Date;
import lombok.Data;
/**
 * 请求日志对象 request_log
 *
 * @author ruoyi
 * @date 2025-08-27
 */
@Data
public class RequestLog{
    /** 主键 */
        @TableField("id")
    private Integer id;
    /** 司机唯一编号 */
    @Excel(name = "司机唯一编号")
        @TableField("driver_code")
    private String driverCode;
    /** 司机姓名 */
    @Excel(name = "司机姓名")
        @TableField("driver_name")
    private String driverName;
    /** 柜门编号 */
    @Excel(name = "柜门编号")
        @TableField("box_num")
    private String boxNum;
    /** 创建者 */
        @TableField("create_by")
    private String createBy;
    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField("create_time")
    private Date createTime;
    /** 请求时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "请求时间", width = 30, dateFormat = "yyyy-MM-dd")
    @TableField("req_time")
    private Date reqTime;
    /** 0上报取出1归还上报 */
    @Excel(name = "0上报取出1归还上报")
        @TableField("type")
    private Integer type;
    /** 操作说明 */
    @Excel(name = "操作说明")
        @TableField("operation")
    private String operation;
}
service/src/main/java/com/ruoyi/cwgl/mapper/KeyCollectionInfoMapper.java
New file
@@ -0,0 +1,87 @@
package com.ruoyi.cwgl.mapper;
import java.util.List;
import com.ruoyi.cwgl.domain.KeyCollectionInfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
 * 钥匙领取信息Mapper接口
 *
 * @author ruoyi
 * @date 2025-08-27
 */
public interface KeyCollectionInfoMapper  extends BaseMapper<KeyCollectionInfo>
{
    /**
     * 查询钥匙领取信息
     *
     * @param id 钥匙领取信息ID
     * @return 钥匙领取信息
     */
    public KeyCollectionInfo selectKeyCollectionInfoById(Integer id);
    /**
     * 查询钥匙领取信息 记录数
     *
     * @param keyCollectionInfo 钥匙领取信息
     * @return 钥匙领取信息集合
     */
    public int selectKeyCollectionInfoCount(KeyCollectionInfo keyCollectionInfo);
    /**
     * 查询钥匙领取信息列表
     *
     * @param keyCollectionInfo 钥匙领取信息
     * @return 钥匙领取信息集合
     */
    public List<KeyCollectionInfo> selectKeyCollectionInfoList(KeyCollectionInfo keyCollectionInfo);
    /**
     * 新增钥匙领取信息
     *
     * @param keyCollectionInfo 钥匙领取信息
     * @return 结果
     */
    public int insertKeyCollectionInfo(KeyCollectionInfo keyCollectionInfo);
    /**
     * 新增钥匙领取信息[批量]
     *
     * @param keyCollectionInfos 钥匙领取信息
     * @return 结果
     */
    public int insertKeyCollectionInfoBatch(List<KeyCollectionInfo> keyCollectionInfos);
    /**
     * 修改钥匙领取信息
     *
     * @param keyCollectionInfo 钥匙领取信息
     * @return 结果
     */
    public int updateKeyCollectionInfo(KeyCollectionInfo keyCollectionInfo);
    /**
     * 修改钥匙领取信息[批量]
     *
     * @param keyCollectionInfos 钥匙领取信息
     * @return 结果
     */
    public int updateKeyCollectionInfoBatch(List<KeyCollectionInfo> keyCollectionInfos);
    /**
     * 删除钥匙领取信息
     *
     * @param id 钥匙领取信息ID
     * @return 结果
     */
    public int deleteKeyCollectionInfoById(Integer id);
    /**
     * 批量删除钥匙领取信息
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    public int deleteKeyCollectionInfoByIds(Integer[] ids);
}
service/src/main/java/com/ruoyi/cwgl/mapper/RequestLogMapper.java
New file
@@ -0,0 +1,87 @@
package com.ruoyi.cwgl.mapper;
import java.util.List;
import com.ruoyi.cwgl.domain.RequestLog;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
 * 请求日志Mapper接口
 *
 * @author ruoyi
 * @date 2025-08-27
 */
public interface RequestLogMapper  extends BaseMapper<RequestLog>
{
    /**
     * 查询请求日志
     *
     * @param id 请求日志ID
     * @return 请求日志
     */
    public RequestLog selectRequestLogById(Integer id);
    /**
     * 查询请求日志 记录数
     *
     * @param requestLog 请求日志
     * @return 请求日志集合
     */
    public int selectRequestLogCount(RequestLog requestLog);
    /**
     * 查询请求日志列表
     *
     * @param requestLog 请求日志
     * @return 请求日志集合
     */
    public List<RequestLog> selectRequestLogList(RequestLog requestLog);
    /**
     * 新增请求日志
     *
     * @param requestLog 请求日志
     * @return 结果
     */
    public int insertRequestLog(RequestLog requestLog);
    /**
     * 新增请求日志[批量]
     *
     * @param requestLogs 请求日志
     * @return 结果
     */
    public int insertRequestLogBatch(List<RequestLog> requestLogs);
    /**
     * 修改请求日志
     *
     * @param requestLog 请求日志
     * @return 结果
     */
    public int updateRequestLog(RequestLog requestLog);
    /**
     * 修改请求日志[批量]
     *
     * @param requestLogs 请求日志
     * @return 结果
     */
    public int updateRequestLogBatch(List<RequestLog> requestLogs);
    /**
     * 删除请求日志
     *
     * @param id 请求日志ID
     * @return 结果
     */
    public int deleteRequestLogById(Integer id);
    /**
     * 批量删除请求日志
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    public int deleteRequestLogByIds(Integer[] ids);
}
service/src/main/java/com/ruoyi/cwgl/service/IKeyCollectionInfoService.java
New file
@@ -0,0 +1,102 @@
package com.ruoyi.cwgl.service;
import java.util.List;
import com.ruoyi.cwgl.domain.KeyCollectionInfo;
import com.baomidou.mybatisplus.extension.service.IService;
/**
 * 钥匙领取信息Service接口
 *
 * @author ruoyi
 * @date 2025-08-27
 */
public interface IKeyCollectionInfoService extends IService<KeyCollectionInfo>
{
    /**
     * 查询钥匙领取信息
     *
     * @param id 钥匙领取信息ID
     * @return 钥匙领取信息
     */
    public KeyCollectionInfo selectKeyCollectionInfoById(Integer id);
    /**
     * 查询钥匙领取信息 记录数
     *
     * @param keyCollectionInfo 钥匙领取信息
     * @return 钥匙领取信息集合
     */
    public int selectKeyCollectionInfoCount(KeyCollectionInfo keyCollectionInfo);
    /**
     * 查询钥匙领取信息列表
     *
     * @param keyCollectionInfo 钥匙领取信息
     * @return 钥匙领取信息集合
     */
    public List<KeyCollectionInfo> selectKeyCollectionInfoList(KeyCollectionInfo keyCollectionInfo);
    /**
     * 查询钥匙领取信息列表 异步 导出
     *
     * @param keyCollectionInfo 钥匙领取信息
     * @param exportKey 导出功能的唯一标识
     * @return 钥匙领取信息集合
     */
    public void export(KeyCollectionInfo keyCollectionInfo, String exportKey) ;
    /**
     * 新增钥匙领取信息
     *
     * @param keyCollectionInfo 钥匙领取信息
     * @return 结果
     */
    public int insertKeyCollectionInfo(KeyCollectionInfo keyCollectionInfo);
    /**
     * 新增钥匙领取信息[批量]
     *
     * @param keyCollectionInfos 钥匙领取信息
     * @return 结果
     */
    public int insertKeyCollectionInfoBatch(List<KeyCollectionInfo> keyCollectionInfos);
    /**
     * 修改钥匙领取信息
     *
     * @param keyCollectionInfo 钥匙领取信息
     * @return 结果
     */
    public int updateKeyCollectionInfo(KeyCollectionInfo keyCollectionInfo);
    /**
     * 修改钥匙领取信息[批量]
     *
     * @param keyCollectionInfos 钥匙领取信息
     * @return 结果
     */
    public int updateKeyCollectionInfoBatch(List<KeyCollectionInfo> keyCollectionInfos);
    /**
     * 批量删除钥匙领取信息
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    public int deleteKeyCollectionInfoByIds(String ids);
    /**
     * 批量删除钥匙领取信息
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    public int deleteKeyCollectionInfoByIds(Integer[] ids);
    /**
     * 删除钥匙领取信息信息
     *
     * @param id 钥匙领取信息ID
     * @return 结果
     */
    public int deleteKeyCollectionInfoById(Integer id);
}
service/src/main/java/com/ruoyi/cwgl/service/IRequestLogService.java
New file
@@ -0,0 +1,102 @@
package com.ruoyi.cwgl.service;
import java.util.List;
import com.ruoyi.cwgl.domain.RequestLog;
import com.baomidou.mybatisplus.extension.service.IService;
/**
 * 请求日志Service接口
 *
 * @author ruoyi
 * @date 2025-08-27
 */
public interface IRequestLogService extends IService<RequestLog>
{
    /**
     * 查询请求日志
     *
     * @param id 请求日志ID
     * @return 请求日志
     */
    public RequestLog selectRequestLogById(Integer id);
    /**
     * 查询请求日志 记录数
     *
     * @param requestLog 请求日志
     * @return 请求日志集合
     */
    public int selectRequestLogCount(RequestLog requestLog);
    /**
     * 查询请求日志列表
     *
     * @param requestLog 请求日志
     * @return 请求日志集合
     */
    public List<RequestLog> selectRequestLogList(RequestLog requestLog);
    /**
     * 查询请求日志列表 异步 导出
     *
     * @param requestLog 请求日志
     * @param exportKey 导出功能的唯一标识
     * @return 请求日志集合
     */
    public void export(RequestLog requestLog, String exportKey) ;
    /**
     * 新增请求日志
     *
     * @param requestLog 请求日志
     * @return 结果
     */
    public int insertRequestLog(RequestLog requestLog);
    /**
     * 新增请求日志[批量]
     *
     * @param requestLogs 请求日志
     * @return 结果
     */
    public int insertRequestLogBatch(List<RequestLog> requestLogs);
    /**
     * 修改请求日志
     *
     * @param requestLog 请求日志
     * @return 结果
     */
    public int updateRequestLog(RequestLog requestLog);
    /**
     * 修改请求日志[批量]
     *
     * @param requestLogs 请求日志
     * @return 结果
     */
    public int updateRequestLogBatch(List<RequestLog> requestLogs);
    /**
     * 批量删除请求日志
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    public int deleteRequestLogByIds(String ids);
    /**
     * 批量删除请求日志
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    public int deleteRequestLogByIds(Integer[] ids);
    /**
     * 删除请求日志信息
     *
     * @param id 请求日志ID
     * @return 结果
     */
    public int deleteRequestLogById(Integer id);
}
service/src/main/java/com/ruoyi/cwgl/service/impl/KeyCollectionInfoServiceImpl.java
New file
@@ -0,0 +1,179 @@
package com.ruoyi.cwgl.service.impl;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.stereotype.Service;
import org.springframework.scheduling.annotation.Async;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.ruoyi.common.utils.PageUtils;
import com.ruoyi.common.constant.Constants;
import com.ruoyi.common.annotation.DataSource;
import com.ruoyi.common.enums.DataSourceType;
import com.ruoyi.common.core.service.BaseService;
import com.ruoyi.cwgl.mapper.KeyCollectionInfoMapper;
import com.ruoyi.cwgl.domain.KeyCollectionInfo;
import com.ruoyi.cwgl.service.IKeyCollectionInfoService;
import com.ruoyi.common.core.text.Convert;
/**
 * 钥匙领取信息Service业务层处理
 *
 * @author ruoyi
 * @date 2025-08-27
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class KeyCollectionInfoServiceImpl  extends BaseService<KeyCollectionInfoMapper, KeyCollectionInfo> implements IKeyCollectionInfoService
{
    protected final Logger logger = LoggerFactory.getLogger(getClass());
    @Resource
    private KeyCollectionInfoMapper keyCollectionInfoMapper;
    /**
     * 查询钥匙领取信息
     *
     * @param id 钥匙领取信息ID
     * @return 钥匙领取信息
     */
    @DataSource(DataSourceType.SLAVE)
    @Override
    public KeyCollectionInfo selectKeyCollectionInfoById(Integer id)
    {
        return keyCollectionInfoMapper.selectKeyCollectionInfoById(id);
    }
    /**
     * 查询钥匙领取信息 记录数
     *
     * @param keyCollectionInfo 钥匙领取信息
     * @return 钥匙领取信息集合
     */
    @DataSource(DataSourceType.SLAVE)
    @Override
    public int selectKeyCollectionInfoCount(KeyCollectionInfo keyCollectionInfo)
    {
        return keyCollectionInfoMapper.selectKeyCollectionInfoCount(keyCollectionInfo);
    }
    /**
     * 查询钥匙领取信息列表
     *
     * @param keyCollectionInfo 钥匙领取信息
     * @return 钥匙领取信息
     */
    @DataSource(DataSourceType.SLAVE)
    @Override
    public List<KeyCollectionInfo> selectKeyCollectionInfoList(KeyCollectionInfo keyCollectionInfo)
    {
        return keyCollectionInfoMapper.selectKeyCollectionInfoList(keyCollectionInfo);
    }
    /**
     * 查询钥匙领取信息列表 异步 导出
     *
     * @param keyCollectionInfo 钥匙领取信息
     * @param exportKey 导出功能的唯一标识
     * @return 钥匙领取信息集合
     */
    @DataSource(DataSourceType.SLAVE)
    @Async
    @Override
    public void export(KeyCollectionInfo keyCollectionInfo,String exportKey) {
        super.export(KeyCollectionInfo.class,exportKey,"keyCollectionInfoData",(pageNum)->{
            PageUtils.startPage(pageNum, Constants.EXPORT_PATE_SIZE);
            return selectKeyCollectionInfoList(keyCollectionInfo);
        });
    }
    /**
     * 新增钥匙领取信息
     *
     * @param keyCollectionInfo 钥匙领取信息
     * @return 结果
     */
    @Override
    public int insertKeyCollectionInfo(KeyCollectionInfo keyCollectionInfo)
    {
        return keyCollectionInfoMapper.insertKeyCollectionInfo(keyCollectionInfo);
    }
    /**
     * 新增钥匙领取信息[批量]
     *
     * @param keyCollectionInfos 钥匙领取信息
     * @return 结果
     */
    @Override
    public int insertKeyCollectionInfoBatch(List<KeyCollectionInfo> keyCollectionInfos)
    {
        int rows = keyCollectionInfoMapper.insertKeyCollectionInfoBatch(keyCollectionInfos);
        return rows;
    }
    /**
     * 修改钥匙领取信息
     *
     * @param keyCollectionInfo 钥匙领取信息
     * @return 结果
     */
    @Override
    public int updateKeyCollectionInfo(KeyCollectionInfo keyCollectionInfo)
    {
        return keyCollectionInfoMapper.updateKeyCollectionInfo(keyCollectionInfo);
    }
    /**
     * 修改钥匙领取信息[批量]
     *
     * @param keyCollectionInfos 钥匙领取信息
     * @return 结果
     */
    @Override
    public int updateKeyCollectionInfoBatch(List<KeyCollectionInfo> keyCollectionInfos){
        return keyCollectionInfoMapper.updateKeyCollectionInfoBatch(keyCollectionInfos);
    }
    /**
     * 删除钥匙领取信息对象
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteKeyCollectionInfoByIds(String ids)
    {
        return deleteKeyCollectionInfoByIds(Convert.toIntArray(ids));
    }
    /**
     * 删除钥匙领取信息对象
     *
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteKeyCollectionInfoByIds(Integer[] ids)
    {
        return keyCollectionInfoMapper.deleteKeyCollectionInfoByIds(ids);
    }
    /**
     * 删除钥匙领取信息信息
     *
     * @param id 钥匙领取信息ID
     * @return 结果
     */
    @Override
    public int deleteKeyCollectionInfoById(Integer id)
    {
        return keyCollectionInfoMapper.deleteKeyCollectionInfoById(id);
    }
}
service/src/main/java/com/ruoyi/cwgl/service/impl/RequestLogServiceImpl.java
New file
@@ -0,0 +1,181 @@
package com.ruoyi.cwgl.service.impl;
import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import javax.annotation.Resource;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.stereotype.Service;
import org.springframework.scheduling.annotation.Async;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.ruoyi.common.utils.PageUtils;
import com.ruoyi.common.constant.Constants;
import com.ruoyi.common.annotation.DataSource;
import com.ruoyi.common.enums.DataSourceType;
import com.ruoyi.common.core.service.BaseService;
import com.ruoyi.cwgl.mapper.RequestLogMapper;
import com.ruoyi.cwgl.domain.RequestLog;
import com.ruoyi.cwgl.service.IRequestLogService;
import com.ruoyi.common.core.text.Convert;
/**
 * 请求日志Service业务层处理
 *
 * @author ruoyi
 * @date 2025-08-27
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class RequestLogServiceImpl  extends BaseService<RequestLogMapper, RequestLog> implements IRequestLogService
{
    protected final Logger logger = LoggerFactory.getLogger(getClass());
    @Resource
    private RequestLogMapper requestLogMapper;
    /**
     * 查询请求日志
     *
     * @param id 请求日志ID
     * @return 请求日志
     */
    @DataSource(DataSourceType.SLAVE)
    @Override
    public RequestLog selectRequestLogById(Integer id)
    {
        return requestLogMapper.selectRequestLogById(id);
    }
    /**
     * 查询请求日志 记录数
     *
     * @param requestLog 请求日志
     * @return 请求日志集合
     */
    @DataSource(DataSourceType.SLAVE)
    @Override
    public int selectRequestLogCount(RequestLog requestLog)
    {
        return requestLogMapper.selectRequestLogCount(requestLog);
    }
    /**
     * 查询请求日志列表
     *
     * @param requestLog 请求日志
     * @return 请求日志
     */
    @DataSource(DataSourceType.SLAVE)
    @Override
    public List<RequestLog> selectRequestLogList(RequestLog requestLog)
    {
        return requestLogMapper.selectRequestLogList(requestLog);
    }
    /**
     * 查询请求日志列表 异步 导出
     *
     * @param requestLog 请求日志
     * @param exportKey 导出功能的唯一标识
     * @return 请求日志集合
     */
    @DataSource(DataSourceType.SLAVE)
    @Async
    @Override
    public void export(RequestLog requestLog,String exportKey) {
        super.export(RequestLog.class,exportKey,"requestLogData",(pageNum)->{
            PageUtils.startPage(pageNum, Constants.EXPORT_PATE_SIZE);
            return selectRequestLogList(requestLog);
        });
    }
    /**
     * 新增请求日志
     *
     * @param requestLog 请求日志
     * @return 结果
     */
    @Override
    public int insertRequestLog(RequestLog requestLog)
    {
        requestLog.setCreateTime(DateUtils.getNowDate());
        return requestLogMapper.insertRequestLog(requestLog);
    }
    /**
     * 新增请求日志[批量]
     *
     * @param requestLogs 请求日志
     * @return 结果
     */
    @Override
    public int insertRequestLogBatch(List<RequestLog> requestLogs)
    {
        int rows = requestLogMapper.insertRequestLogBatch(requestLogs);
        return rows;
    }
    /**
     * 修改请求日志
     *
     * @param requestLog 请求日志
     * @return 结果
     */
    @Override
    public int updateRequestLog(RequestLog requestLog)
    {
        return requestLogMapper.updateRequestLog(requestLog);
    }
    /**
     * 修改请求日志[批量]
     *
     * @param requestLogs 请求日志
     * @return 结果
     */
    @Override
    public int updateRequestLogBatch(List<RequestLog> requestLogs){
        return requestLogMapper.updateRequestLogBatch(requestLogs);
    }
    /**
     * 删除请求日志对象
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteRequestLogByIds(String ids)
    {
        return deleteRequestLogByIds(Convert.toIntArray(ids));
    }
    /**
     * 删除请求日志对象
     *
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteRequestLogByIds(Integer[] ids)
    {
        return requestLogMapper.deleteRequestLogByIds(ids);
    }
    /**
     * 删除请求日志信息
     *
     * @param id 请求日志ID
     * @return 结果
     */
    @Override
    public int deleteRequestLogById(Integer id)
    {
        return requestLogMapper.deleteRequestLogById(id);
    }
}
service/src/main/resources/mapper/cwgl/KeyCollectionInfoMapper.xml
New file
@@ -0,0 +1,216 @@
<?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">
<mapper namespace="com.ruoyi.cwgl.mapper.KeyCollectionInfoMapper">
    <resultMap type="com.ruoyi.cwgl.domain.KeyCollectionInfo" id="KeyCollectionInfoResult">
        <result property="id"    column="id"    />
        <result property="customerName"    column="customer_name"    />
        <result property="carrier"    column="carrier"    />
        <result property="dispatchNo"    column="dispatch_no"    />
        <result property="driverName"    column="driver_name"    />
        <result property="driverMobile"    column="driver_mobile"    />
        <result property="licensePlateNumber"    column="license_plate_number"    />
        <result property="orderTime"    column="order_time"    />
        <result property="orderCreatedTime"    column="order_created_time"    />
        <result property="dispatchCreatedTime"    column="dispatch_created_time"    />
        <result property="keyCollectionTime"    column="key_collection_time"    />
        <result property="estimatedDepartureTime"    column="estimated_departure_time"    />
        <result property="requiredArrivalTime"    column="required_arrival_time"    />
        <result property="consignorAddress"    column="consignor_address"    />
        <result property="consigneeAddress"    column="consignee_address"    />
        <result property="mainDriver"    column="main_driver"    />
        <result property="pointNum"    column="point_num"    />
        <result property="transportMode"    column="transport_mode"    />
        <result property="assistantDriver"    column="assistant_driver"    />
        <result property="quantity"    column="quantity"    />
        <result property="dispatchQuantity"    column="dispatch_quantity"    />
        <result property="remark"    column="remark"    />
    </resultMap>
    <sql id="selectKeyCollectionInfoVo">
        select thisTab.id, thisTab.customer_name, thisTab.carrier, thisTab.dispatch_no, thisTab.driver_name, thisTab.driver_mobile, thisTab.license_plate_number, thisTab.order_time, thisTab.order_created_time, thisTab.dispatch_created_time, thisTab.key_collection_time, thisTab.estimated_departure_time, thisTab.required_arrival_time, thisTab.consignor_address, thisTab.consignee_address, thisTab.main_driver, thisTab.point_num, thisTab.transport_mode, thisTab.assistant_driver, thisTab.quantity, thisTab.dispatch_quantity, thisTab.remark from key_collection_info AS thisTab
    </sql>
    <sql id="selectKeyCollectionInfoVoCount">
        select count(0) from key_collection_info as thisTab
    </sql>
    <sql id="whereCondition">
        <if test="customerName != null  and customerName != ''"> and  thisTab.customer_name like concat('%', #{customerName}, '%')</if>
        <if test="carrier != null  and carrier != ''"> and thisTab.carrier = #{carrier}</if>
        <if test="dispatchNo != null  and dispatchNo != ''"> and thisTab.dispatch_no = #{dispatchNo}</if>
        <if test="driverName != null  and driverName != ''"> and  thisTab.driver_name like concat('%', #{driverName}, '%')</if>
        <if test="driverMobile != null  and driverMobile != ''"> and thisTab.driver_mobile = #{driverMobile}</if>
        <if test="licensePlateNumber != null  and licensePlateNumber != ''"> and thisTab.license_plate_number = #{licensePlateNumber}</if>
        <if test="orderTime != null "> and thisTab.order_time = #{orderTime}</if>
        <if test="orderCreatedTime != null "> and thisTab.order_created_time = #{orderCreatedTime}</if>
        <if test="dispatchCreatedTime != null "> and thisTab.dispatch_created_time = #{dispatchCreatedTime}</if>
        <if test="keyCollectionTime != null "> and thisTab.key_collection_time = #{keyCollectionTime}</if>
        <if test="estimatedDepartureTime != null "> and thisTab.estimated_departure_time = #{estimatedDepartureTime}</if>
        <if test="requiredArrivalTime != null "> and thisTab.required_arrival_time = #{requiredArrivalTime}</if>
        <if test="consignorAddress != null  and consignorAddress != ''"> and thisTab.consignor_address = #{consignorAddress}</if>
        <if test="consigneeAddress != null  and consigneeAddress != ''"> and thisTab.consignee_address = #{consigneeAddress}</if>
        <if test="mainDriver != null  and mainDriver != ''"> and thisTab.main_driver = #{mainDriver}</if>
        <if test="pointNum != null "> and thisTab.point_num = #{pointNum}</if>
        <if test="transportMode != null  and transportMode != ''"> and thisTab.transport_mode = #{transportMode}</if>
        <if test="assistantDriver != null  and assistantDriver != ''"> and thisTab.assistant_driver = #{assistantDriver}</if>
        <if test="quantity != null "> and thisTab.quantity = #{quantity}</if>
        <if test="dispatchQuantity != null "> and thisTab.dispatch_quantity = #{dispatchQuantity}</if>
    </sql>
    <!--查询-->
    <select id="selectKeyCollectionInfoById" parameterType="Integer" resultMap="KeyCollectionInfoResult">
        <include refid="selectKeyCollectionInfoVo"/>
        where id = #{id}
    </select>
    <select id="selectKeyCollectionInfoCount" parameterType="com.ruoyi.cwgl.domain.KeyCollectionInfo" resultType="int">
        <include refid="selectKeyCollectionInfoVoCount"/>
        <where>
            <include refid="whereCondition"/>
        </where>
    </select>
    <select id="selectKeyCollectionInfoList" parameterType="com.ruoyi.cwgl.domain.KeyCollectionInfo" resultMap="KeyCollectionInfoResult">
        <include refid="selectKeyCollectionInfoVo"/>
        <where>
            <include refid="whereCondition"/>
        </where>
        order by thisTab.id desc
    </select>
    <!-- 新增 -->
    <insert id="insertKeyCollectionInfo" parameterType="com.ruoyi.cwgl.domain.KeyCollectionInfo"  useGeneratedKeys="true" keyProperty="id">
        insert into key_collection_info
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="customerName != null">customer_name,</if>
            <if test="carrier != null">carrier,</if>
            <if test="dispatchNo != null">dispatch_no,</if>
            <if test="driverName != null">driver_name,</if>
            <if test="driverMobile != null">driver_mobile,</if>
            <if test="licensePlateNumber != null">license_plate_number,</if>
            <if test="orderTime != null">order_time,</if>
            <if test="orderCreatedTime != null">order_created_time,</if>
            <if test="dispatchCreatedTime != null">dispatch_created_time,</if>
            <if test="keyCollectionTime != null">key_collection_time,</if>
            <if test="estimatedDepartureTime != null">estimated_departure_time,</if>
            <if test="requiredArrivalTime != null">required_arrival_time,</if>
            <if test="consignorAddress != null">consignor_address,</if>
            <if test="consigneeAddress != null">consignee_address,</if>
            <if test="mainDriver != null">main_driver,</if>
            <if test="pointNum != null">point_num,</if>
            <if test="transportMode != null">transport_mode,</if>
            <if test="assistantDriver != null">assistant_driver,</if>
            <if test="quantity != null">quantity,</if>
            <if test="dispatchQuantity != null">dispatch_quantity,</if>
            <if test="remark != null">remark,</if>
         </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="customerName != null">#{customerName},</if>
            <if test="carrier != null">#{carrier},</if>
            <if test="dispatchNo != null">#{dispatchNo},</if>
            <if test="driverName != null">#{driverName},</if>
            <if test="driverMobile != null">#{driverMobile},</if>
            <if test="licensePlateNumber != null">#{licensePlateNumber},</if>
            <if test="orderTime != null">#{orderTime},</if>
            <if test="orderCreatedTime != null">#{orderCreatedTime},</if>
            <if test="dispatchCreatedTime != null">#{dispatchCreatedTime},</if>
            <if test="keyCollectionTime != null">#{keyCollectionTime},</if>
            <if test="estimatedDepartureTime != null">#{estimatedDepartureTime},</if>
            <if test="requiredArrivalTime != null">#{requiredArrivalTime},</if>
            <if test="consignorAddress != null">#{consignorAddress},</if>
            <if test="consigneeAddress != null">#{consigneeAddress},</if>
            <if test="mainDriver != null">#{mainDriver},</if>
            <if test="pointNum != null">#{pointNum},</if>
            <if test="transportMode != null">#{transportMode},</if>
            <if test="assistantDriver != null">#{assistantDriver},</if>
            <if test="quantity != null">#{quantity},</if>
            <if test="dispatchQuantity != null">#{dispatchQuantity},</if>
            <if test="remark != null">#{remark},</if>
         </trim>
    </insert>
    <insert id="insertKeyCollectionInfoBatch" parameterType="java.util.List"  useGeneratedKeys="true" keyProperty="id">
        insert into key_collection_info
        <trim prefix="(" suffix=") values" suffixOverrides=",">
            id,customer_name,carrier,dispatch_no,driver_name,driver_mobile,license_plate_number,order_time,order_created_time,dispatch_created_time,key_collection_time,estimated_departure_time,required_arrival_time,consignor_address,consignee_address,main_driver,point_num,transport_mode,assistant_driver,quantity,dispatch_quantity,remark,
        </trim>
        <foreach item="item" index="index" collection="list" separator=",">
            <trim prefix="(" suffix=") " suffixOverrides=",">
                #{item.id},#{item.customerName},#{item.carrier},#{item.dispatchNo},#{item.driverName},#{item.driverMobile},#{item.licensePlateNumber},#{item.orderTime},#{item.orderCreatedTime},#{item.dispatchCreatedTime},#{item.keyCollectionTime},#{item.estimatedDepartureTime},#{item.requiredArrivalTime},#{item.consignorAddress},#{item.consigneeAddress},#{item.mainDriver},#{item.pointNum},#{item.transportMode},#{item.assistantDriver},#{item.quantity},#{item.dispatchQuantity},#{item.remark},
            </trim>
        </foreach>
    </insert>
    <!-- 修改 -->
    <update id="updateKeyCollectionInfo" parameterType="com.ruoyi.cwgl.domain.KeyCollectionInfo">
        update key_collection_info
        <trim prefix="SET" suffixOverrides=",">
            <if test="customerName != null">customer_name = #{customerName},</if>
            <if test="carrier != null">carrier = #{carrier},</if>
            <if test="dispatchNo != null">dispatch_no = #{dispatchNo},</if>
            <if test="driverName != null">driver_name = #{driverName},</if>
            <if test="driverMobile != null">driver_mobile = #{driverMobile},</if>
            <if test="licensePlateNumber != null">license_plate_number = #{licensePlateNumber},</if>
            <if test="orderTime != null">order_time = #{orderTime},</if>
            <if test="orderCreatedTime != null">order_created_time = #{orderCreatedTime},</if>
            <if test="dispatchCreatedTime != null">dispatch_created_time = #{dispatchCreatedTime},</if>
            <if test="keyCollectionTime != null">key_collection_time = #{keyCollectionTime},</if>
            <if test="estimatedDepartureTime != null">estimated_departure_time = #{estimatedDepartureTime},</if>
            <if test="requiredArrivalTime != null">required_arrival_time = #{requiredArrivalTime},</if>
            <if test="consignorAddress != null">consignor_address = #{consignorAddress},</if>
            <if test="consigneeAddress != null">consignee_address = #{consigneeAddress},</if>
            <if test="mainDriver != null">main_driver = #{mainDriver},</if>
            <if test="pointNum != null">point_num = #{pointNum},</if>
            <if test="transportMode != null">transport_mode = #{transportMode},</if>
            <if test="assistantDriver != null">assistant_driver = #{assistantDriver},</if>
            <if test="quantity != null">quantity = #{quantity},</if>
            <if test="dispatchQuantity != null">dispatch_quantity = #{dispatchQuantity},</if>
            <if test="remark != null">remark = #{remark},</if>
        </trim>
        where id = #{id}
    </update>
    <!-- 修改 -->
    <update id="updateKeyCollectionInfoBatch" parameterType="java.util.List">
        <foreach collection="list" item="item" index="index" separator=";">
            update key_collection_info
            <trim prefix="SET" suffixOverrides=",">
                <if test="item.customerName != null">customer_name = #{item.customerName},</if>
                <if test="item.carrier != null">carrier = #{item.carrier},</if>
                <if test="item.dispatchNo != null">dispatch_no = #{item.dispatchNo},</if>
                <if test="item.driverName != null">driver_name = #{item.driverName},</if>
                <if test="item.driverMobile != null">driver_mobile = #{item.driverMobile},</if>
                <if test="item.licensePlateNumber != null">license_plate_number = #{item.licensePlateNumber},</if>
                <if test="item.orderTime != null">order_time = #{item.orderTime},</if>
                <if test="item.orderCreatedTime != null">order_created_time = #{item.orderCreatedTime},</if>
                <if test="item.dispatchCreatedTime != null">dispatch_created_time = #{item.dispatchCreatedTime},</if>
                <if test="item.keyCollectionTime != null">key_collection_time = #{item.keyCollectionTime},</if>
                <if test="item.estimatedDepartureTime != null">estimated_departure_time = #{item.estimatedDepartureTime},</if>
                <if test="item.requiredArrivalTime != null">required_arrival_time = #{item.requiredArrivalTime},</if>
                <if test="item.consignorAddress != null">consignor_address = #{item.consignorAddress},</if>
                <if test="item.consigneeAddress != null">consignee_address = #{item.consigneeAddress},</if>
                <if test="item.mainDriver != null">main_driver = #{item.mainDriver},</if>
                <if test="item.pointNum != null">point_num = #{item.pointNum},</if>
                <if test="item.transportMode != null">transport_mode = #{item.transportMode},</if>
                <if test="item.assistantDriver != null">assistant_driver = #{item.assistantDriver},</if>
                <if test="item.quantity != null">quantity = #{item.quantity},</if>
                <if test="item.dispatchQuantity != null">dispatch_quantity = #{item.dispatchQuantity},</if>
                <if test="item.remark != null">remark = #{item.remark},</if>
            </trim>
        where id = #{item.id}
        </foreach>
    </update>
    <!--删除-->
    <delete id="deleteKeyCollectionInfoById" parameterType="Integer">
        delete from key_collection_info where id = #{id}
    </delete>
    <delete id="deleteKeyCollectionInfoByIds" parameterType="Integer">
        delete from key_collection_info where id in
        <foreach item="id" collection="array" open="(" separator="," close=")">
            #{id}
        </foreach>
    </delete>
</mapper>
service/src/main/resources/mapper/cwgl/RequestLogMapper.xml
New file
@@ -0,0 +1,137 @@
<?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">
<mapper namespace="com.ruoyi.cwgl.mapper.RequestLogMapper">
    <resultMap type="com.ruoyi.cwgl.domain.RequestLog" id="RequestLogResult">
        <result property="id"    column="id"    />
        <result property="driverCode"    column="driver_code"    />
        <result property="driverName"    column="driver_name"    />
        <result property="boxNum"    column="box_num"    />
        <result property="createBy"    column="create_by"    />
        <result property="createTime"    column="create_time"    />
        <result property="reqTime"    column="req_time"    />
        <result property="type"    column="type"    />
        <result property="operation"    column="operation"    />
    </resultMap>
    <sql id="selectRequestLogVo">
        select thisTab.id, thisTab.driver_code, thisTab.driver_name, thisTab.box_num, thisTab.create_by, thisTab.create_time, thisTab.req_time, thisTab.type, thisTab.operation from request_log AS thisTab
    </sql>
    <sql id="selectRequestLogVoCount">
        select count(0) from request_log as thisTab
    </sql>
    <sql id="whereCondition">
        <if test="driverCode != null  and driverCode != ''"> and thisTab.driver_code = #{driverCode}</if>
        <if test="driverName != null  and driverName != ''"> and  thisTab.driver_name like concat('%', #{driverName}, '%')</if>
        <if test="boxNum != null  and boxNum != ''"> and thisTab.box_num = #{boxNum}</if>
        <if test="reqTime != null "> and thisTab.req_time = #{reqTime}</if>
        <if test="type != null "> and thisTab.type = #{type}</if>
        <if test="operation != null  and operation != ''"> and thisTab.operation = #{operation}</if>
    </sql>
    <!--查询-->
    <select id="selectRequestLogById" parameterType="Integer" resultMap="RequestLogResult">
        <include refid="selectRequestLogVo"/>
        where id = #{id}
    </select>
    <select id="selectRequestLogCount" parameterType="com.ruoyi.cwgl.domain.RequestLog" resultType="int">
        <include refid="selectRequestLogVoCount"/>
        <where>
            <include refid="whereCondition"/>
        </where>
    </select>
    <select id="selectRequestLogList" parameterType="com.ruoyi.cwgl.domain.RequestLog" resultMap="RequestLogResult">
        <include refid="selectRequestLogVo"/>
        <where>
            <include refid="whereCondition"/>
        </where>
        order by thisTab.id desc
    </select>
    <!-- 新增 -->
    <insert id="insertRequestLog" parameterType="com.ruoyi.cwgl.domain.RequestLog"  useGeneratedKeys="true" keyProperty="id">
        insert into request_log
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="driverCode != null">driver_code,</if>
            <if test="driverName != null">driver_name,</if>
            <if test="boxNum != null">box_num,</if>
            <if test="createBy != null">create_by,</if>
            <if test="createTime != null">create_time,</if>
            <if test="reqTime != null">req_time,</if>
            <if test="type != null">type,</if>
            <if test="operation != null">operation,</if>
         </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="driverCode != null">#{driverCode},</if>
            <if test="driverName != null">#{driverName},</if>
            <if test="boxNum != null">#{boxNum},</if>
            <if test="createBy != null">#{createBy},</if>
            <if test="createTime != null">#{createTime},</if>
            <if test="reqTime != null">#{reqTime},</if>
            <if test="type != null">#{type},</if>
            <if test="operation != null">#{operation},</if>
         </trim>
    </insert>
    <insert id="insertRequestLogBatch" parameterType="java.util.List"  useGeneratedKeys="true" keyProperty="id">
        insert into request_log
        <trim prefix="(" suffix=") values" suffixOverrides=",">
            id,driver_code,driver_name,box_num,create_by,create_time,req_time,type,operation,
        </trim>
        <foreach item="item" index="index" collection="list" separator=",">
            <trim prefix="(" suffix=") " suffixOverrides=",">
                #{item.id},#{item.driverCode},#{item.driverName},#{item.boxNum},#{item.createBy},#{item.createTime},#{item.reqTime},#{item.type},#{item.operation},
            </trim>
        </foreach>
    </insert>
    <!-- 修改 -->
    <update id="updateRequestLog" parameterType="com.ruoyi.cwgl.domain.RequestLog">
        update request_log
        <trim prefix="SET" suffixOverrides=",">
            <if test="driverCode != null">driver_code = #{driverCode},</if>
            <if test="driverName != null">driver_name = #{driverName},</if>
            <if test="boxNum != null">box_num = #{boxNum},</if>
            <if test="createBy != null">create_by = #{createBy},</if>
            <if test="createTime != null">create_time = #{createTime},</if>
            <if test="reqTime != null">req_time = #{reqTime},</if>
            <if test="type != null">type = #{type},</if>
            <if test="operation != null">operation = #{operation},</if>
        </trim>
        where id = #{id}
    </update>
    <!-- 修改 -->
    <update id="updateRequestLogBatch" parameterType="java.util.List">
        <foreach collection="list" item="item" index="index" separator=";">
            update request_log
            <trim prefix="SET" suffixOverrides=",">
                <if test="item.driverCode != null">driver_code = #{item.driverCode},</if>
                <if test="item.driverName != null">driver_name = #{item.driverName},</if>
                <if test="item.boxNum != null">box_num = #{item.boxNum},</if>
                <if test="item.createBy != null">create_by = #{item.createBy},</if>
                <if test="item.createTime != null">create_time = #{item.createTime},</if>
                <if test="item.reqTime != null">req_time = #{item.reqTime},</if>
                <if test="item.type != null">type = #{item.type},</if>
                <if test="item.operation != null">operation = #{item.operation},</if>
            </trim>
        where id = #{item.id}
        </foreach>
    </update>
    <!--删除-->
    <delete id="deleteRequestLogById" parameterType="Integer">
        delete from request_log where id = #{id}
    </delete>
    <delete id="deleteRequestLogByIds" parameterType="Integer">
        delete from request_log where id in
        <foreach item="id" collection="array" open="(" separator="," close=")">
            #{id}
        </foreach>
    </delete>
</mapper>
ui/admin-ui3/src/api/cwgl/keyCollectionInfo.ts
New file
@@ -0,0 +1,67 @@
import request,{download,requestType} from "@/utils/request";
import {BaseEntityInterface} from "@/utils/globalInterface";
export interface KeyCollectionInfoI extends BaseEntityInterface{
            id ?:  number   ,            customerName ?:  string   ,            carrier ?:  string   ,            dispatchNo ?:  string   ,            driverName ?:  string   ,            driverMobile ?:  string   ,            licensePlateNumber ?:  string   ,            orderTime ?:  string   ,            orderCreatedTime ?:  string   ,            dispatchCreatedTime ?:  string   ,            keyCollectionTime ?:  string   ,            estimatedDepartureTime ?:  string   ,            requiredArrivalTime ?:  string   ,            consignorAddress ?:  string   ,            consigneeAddress ?:  string   ,            mainDriver ?:  string   ,            pointNum ?:  number   ,            transportMode ?:  string   ,            assistantDriver ?:  string   ,            quantity ?:  number   ,            dispatchQuantity ?:  number   ,            remark ?:  string       }
/**
 * 查询钥匙领取信息列表
 */
export const listKeyCollectionInfo:requestType = (query) => {
    return request({
        url: '/cwgl/keyCollectionInfo/list',
        method:'get',
        params:query
    })
}
/**
 * 查询钥匙领取信息详细
 */
export const getKeyCollectionInfo:requestType = (id) => {
    return request({
        url: '/cwgl/keyCollectionInfo/' + id,
        method:'get'
    })
}
/**
 * 新增钥匙领取信息
 */
export const addKeyCollectionInfo:requestType = (data) => {
    return request({
        url: '/cwgl/keyCollectionInfo',
        method: 'post',
        data
    })
}
/**
 * 修改钥匙领取信息
 */
export const updateKeyCollectionInfo:requestType = (data) => {
    return request({
        url: '/cwgl/keyCollectionInfo',
        method: 'put',
        data
    })
}
/**
 * 删除钥匙领取信息
 */
export const delKeyCollectionInfo:requestType = (id) => {
    return request({
        url: '/cwgl/keyCollectionInfo/' + id,
        method: 'delete'
    })
}
/**
 * 导出钥匙领取信息
 */
export const exportKeyCollectionInfo:requestType = (query) => {
    return new Promise<any>(()=>{
        download('/cwgl/keyCollectionInfo/export',query);
    })
}
ui/admin-ui3/src/api/cwgl/requestLog.ts
New file
@@ -0,0 +1,67 @@
import request,{download,requestType} from "@/utils/request";
import {BaseEntityInterface} from "@/utils/globalInterface";
export interface RequestLogI extends BaseEntityInterface{
            id ?:  number   ,            driverCode ?:  string   ,            driverName ?:  string   ,            boxNum ?:  string   ,            createBy ?:  string   ,            createTime ?:  string   ,            reqTime ?:  string   ,            type ?:  number   ,            operation ?:  string       }
/**
 * 查询请求日志列表
 */
export const listRequestLog:requestType = (query) => {
    return request({
        url: '/cwgl/requestLog/list',
        method:'get',
        params:query
    })
}
/**
 * 查询请求日志详细
 */
export const getRequestLog:requestType = (id) => {
    return request({
        url: '/cwgl/requestLog/' + id,
        method:'get'
    })
}
/**
 * 新增请求日志
 */
export const addRequestLog:requestType = (data) => {
    return request({
        url: '/cwgl/requestLog',
        method: 'post',
        data
    })
}
/**
 * 修改请求日志
 */
export const updateRequestLog:requestType = (data) => {
    return request({
        url: '/cwgl/requestLog',
        method: 'put',
        data
    })
}
/**
 * 删除请求日志
 */
export const delRequestLog:requestType = (id) => {
    return request({
        url: '/cwgl/requestLog/' + id,
        method: 'delete'
    })
}
/**
 * 导出请求日志
 */
export const exportRequestLog:requestType = (query) => {
    return new Promise<any>(()=>{
        download('/cwgl/requestLog/export',query);
    })
}
ui/admin-ui3/src/views/cwgl/keyCollectionInfo/index.vue
New file
@@ -0,0 +1,181 @@
<template>
  <basicContainer >
    <avue-crud
        :option="option"
        :table-loading="pageF.loading"
        :data="tableData"
        :page="page"
        :permission="permissionList"
        :before-open="beforeOpen"
        v-model="form"
        ref="crudRef"
        @row-update="rowUpdate"
        @row-save="rowSave"
        @refresh-change="refreshChange"
        @row-del="rowDel"
        @search-change="searchChange"
        @search-reset="searchReset"
        @selection-change="selectionChange"
        @current-change="currentChange"
        @size-change="sizeChange"
        @on-load="onLoad"
    >
      <template #menu-left>
        <el-button
            type="success"
            icon="Edit"
            :disabled="pageF.single"
            v-hasPermi="['cwgl:keyCollectionInfo:edit']"
            @click="handleUpdate">修改
        </el-button>
        <el-button
            type="danger"
            icon="Delete"
            :disabled="pageF.multiple"
            @click="handleDelete"
            v-hasPermi="['cwgl:keyCollectionInfo:remove']"
        >删除
        </el-button>
        <el-button
            type="warning"
            plain
            icon="Download"
            @click="handleExport"
            v-hasPermi="['cwgl:keyCollectionInfo:export']"
        >导出
        </el-button>
      </template>
    </avue-crud>
  </basicContainer>
</template>
<script setup name="keyCollectionInfo" lang="ts">
  import {KeyCollectionInfoI,addKeyCollectionInfo, delKeyCollectionInfo, exportKeyCollectionInfo, getKeyCollectionInfo, listKeyCollectionInfo, updateKeyCollectionInfo} from "@/api/cwgl/keyCollectionInfo";
  import useCurrentInstance from "@/utils/useCurrentInstance";
  import {computed,reactive, ref, toRefs} from "vue";
  import {PagesInterface, PageQueryInterface} from "@/utils/globalInterface";
  import {usePagePlus} from "@/hooks/usePagePlus";
  import {hasPermission} from "@/utils/permissionUtils";
  const { proxy } = useCurrentInstance();
  const crudRef = ref();
  const permissionList = computed(()=>{
    return {
      addBtn: hasPermission(["cwgl:keyCollectionInfo:add"]),
      delBtn: hasPermission(["cwgl:keyCollectionInfo:remove"]),
      editBtn: hasPermission(["cwgl:keyCollectionInfo:edit"]),
      viewBtn: hasPermission(["cwgl:keyCollectionInfo:query"]),
    }
  })
  const data = reactive({
    form:<KeyCollectionInfoI>{},
    queryParams:<KeyCollectionInfoI&PageQueryInterface>{},
    page: <PagesInterface>{
      pageSize: 10,
      total: 0,
      currentPage: 1,
    },
    selectionList:[],
  })
  const {queryParams,form,page,selectionList} = toRefs(data);
  const option = ref({
    pageKey: 'KeyCollectionInfo',
    rowKey: 'id',
    column: {
                                id: {
          label: 'ID',
                            },
                                customerName: {
          label: '客户名称',
                            },
                                carrier: {
          label: '承运商',
                            },
                                dispatchNo: {
          label: '调度单号',
                            },
                                driverName: {
          label: '司机名称',
                            },
                                driverMobile: {
          label: '司机手机号',
                            },
                                licensePlateNumber: {
          label: '车牌号',
                            },
                                orderTime: {
          label: '订单下单时间',
                            },
                                orderCreatedTime: {
          label: '订单创建时间',
                            },
                                dispatchCreatedTime: {
          label: '调度单创建时间',
                            },
                                keyCollectionTime: {
          label: '钥匙领取时间',
                            },
                                estimatedDepartureTime: {
          label: '预计出发时间',
                            },
                                requiredArrivalTime: {
          label: '要求到达时间',
                            },
                                consignorAddress: {
          label: '出发地地址',
                      type: 'textarea', minRows: 3, maxRows: 5,
                            },
                                consigneeAddress: {
          label: '目的地地址',
                      type: 'textarea', minRows: 3, maxRows: 5,
                            },
                                mainDriver: {
          label: '主驾驶员',
                            },
                                pointNum: {
          label: '提送货点数',
                            },
                                transportMode: {
          label: '运输方式',
                            },
                                assistantDriver: {
          label: '副驾驶员',
                            },
                                quantity: {
          label: '件数',
                            },
                                dispatchQuantity: {
          label: '实发件数',
                            },
                                remark: {
          label: '备注',
                      type: 'textarea', minRows: 3, maxRows: 5,
                            },
          }
  })
  const { tableData,pageF,rowSave,rowUpdate,rowDel,beforeOpen,searchChange,
    searchReset,selectionChange,onLoad,currentChange,sizeChange,handleDelete,handleExport,handleUpdate,refreshChange} = usePagePlus({
    form:form,
    option:option,
    queryParams:queryParams,
    idKey:'id',
    page:page.value,
    getListApi:listKeyCollectionInfo,
    getDetailApi:getKeyCollectionInfo,
    exportApi:exportKeyCollectionInfo,
    deleteApi:delKeyCollectionInfo,
    addApi:addKeyCollectionInfo,
    updateApi:updateKeyCollectionInfo,
    handleUpdateFunc:()=>{
      crudRef.value.rowEdit(selectionList.value[0]);
    },
    handleSelectionChangeFunc:(selection:any)=>{
      selectionList.value = selection;
    }
  })
</script>
ui/admin-ui3/src/views/cwgl/requestLog/index.vue
New file
@@ -0,0 +1,139 @@
<template>
  <basicContainer >
    <avue-crud
        :option="option"
        :table-loading="pageF.loading"
        :data="tableData"
        :page="page"
        :permission="permissionList"
        :before-open="beforeOpen"
        v-model="form"
        ref="crudRef"
        @row-update="rowUpdate"
        @row-save="rowSave"
        @refresh-change="refreshChange"
        @row-del="rowDel"
        @search-change="searchChange"
        @search-reset="searchReset"
        @selection-change="selectionChange"
        @current-change="currentChange"
        @size-change="sizeChange"
        @on-load="onLoad"
    >
      <template #menu-left>
        <el-button
            type="success"
            icon="Edit"
            :disabled="pageF.single"
            v-hasPermi="['cwgl:requestLog:edit']"
            @click="handleUpdate">修改
        </el-button>
        <el-button
            type="danger"
            icon="Delete"
            :disabled="pageF.multiple"
            @click="handleDelete"
            v-hasPermi="['cwgl:requestLog:remove']"
        >删除
        </el-button>
        <el-button
            type="warning"
            plain
            icon="Download"
            @click="handleExport"
            v-hasPermi="['cwgl:requestLog:export']"
        >导出
        </el-button>
      </template>
    </avue-crud>
  </basicContainer>
</template>
<script setup name="requestLog" lang="ts">
  import {RequestLogI,addRequestLog, delRequestLog, exportRequestLog, getRequestLog, listRequestLog, updateRequestLog} from "@/api/cwgl/requestLog";
  import useCurrentInstance from "@/utils/useCurrentInstance";
  import {computed,reactive, ref, toRefs} from "vue";
  import {PagesInterface, PageQueryInterface} from "@/utils/globalInterface";
  import {usePagePlus} from "@/hooks/usePagePlus";
  import {hasPermission} from "@/utils/permissionUtils";
  const { proxy } = useCurrentInstance();
  const crudRef = ref();
  const permissionList = computed(()=>{
    return {
      addBtn: hasPermission(["cwgl:requestLog:add"]),
      delBtn: hasPermission(["cwgl:requestLog:remove"]),
      editBtn: hasPermission(["cwgl:requestLog:edit"]),
      viewBtn: hasPermission(["cwgl:requestLog:query"]),
    }
  })
  const data = reactive({
    form:<RequestLogI>{},
    queryParams:<RequestLogI&PageQueryInterface>{},
    page: <PagesInterface>{
      pageSize: 10,
      total: 0,
      currentPage: 1,
    },
    selectionList:[],
  })
  const {queryParams,form,page,selectionList} = toRefs(data);
  const option = ref({
    pageKey: 'RequestLog',
    rowKey: 'id',
    column: {
                                id: {
          label: '主键',
                            },
                                driverCode: {
          label: '司机唯一编号',
                            },
                                driverName: {
          label: '司机姓名',
                            },
                                boxNum: {
          label: '柜门编号',
                            },
                                createBy: {
          label: '创建者',
                            },
                                createTime: {
          label: '创建时间',
                            },
                                reqTime: {
          label: '请求时间',
                            },
                                type: {
          label: '0上报取出1归还上报',
                            },
                                operation: {
          label: '操作说明',
                            },
          }
  })
  const { tableData,pageF,rowSave,rowUpdate,rowDel,beforeOpen,searchChange,
    searchReset,selectionChange,onLoad,currentChange,sizeChange,handleDelete,handleExport,handleUpdate,refreshChange} = usePagePlus({
    form:form,
    option:option,
    queryParams:queryParams,
    idKey:'id',
    page:page.value,
    getListApi:listRequestLog,
    getDetailApi:getRequestLog,
    exportApi:exportRequestLog,
    deleteApi:delRequestLog,
    addApi:addRequestLog,
    updateApi:updateRequestLog,
    handleUpdateFunc:()=>{
      crudRef.value.rowEdit(selectionList.value[0]);
    },
    handleSelectionChangeFunc:(selection:any)=>{
      selectionList.value = selection;
    }
  })
</script>