From 789ac20f7c678d5afdc3be1b16fd300bd575c25f Mon Sep 17 00:00:00 2001 From: xd <844539747@qq.com> Date: Tue, 19 Mar 2024 13:35:59 +0800 Subject: [PATCH] '123' --- .../storageLocationController.java | 10 ++-- .../ruoyi/storageLocation/domain/Operlog.java | 4 +- .../storageLocation/StorageLocationMapper.xml | 16 ++++- .../src/views/storageLocation/locationSet.vue | 6 +- .../src/views/storageLocation/operlog.vue | 59 +++++++++++++++++-- 5 files changed, 81 insertions(+), 14 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/storageLocation/storageLocationController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/storageLocation/storageLocationController.java index d05ed79..b02e535 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/storageLocation/storageLocationController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/storageLocation/storageLocationController.java @@ -5,6 +5,7 @@ import com.ruoyi.common.annotation.Log; import com.ruoyi.common.constant.CacheConstants; import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.core.redis.RedisCache; import com.ruoyi.common.core.redis.RedisLock; import com.ruoyi.common.enums.BusinessType; @@ -419,12 +420,11 @@ public class storageLocationController extends BaseController * 获取操作记录 */ @GetMapping("/listOperlog") - public AjaxResult listOperlog(Operlog operlog) + public TableDataInfo listOperlog(Operlog operlog) { - AjaxResult ajaxResult = new AjaxResult(); - List operlogData = storageLocationService.selectOperlogs(operlog); - ajaxResult.put("operlogData",operlogData); - return ajaxResult; + startPage(); + List list = storageLocationService.selectOperlogs(operlog); + return getDataTable(list); } /*===========================================操作记录==========================================================*/ diff --git a/ruoyi-system/src/main/java/com/ruoyi/storageLocation/domain/Operlog.java b/ruoyi-system/src/main/java/com/ruoyi/storageLocation/domain/Operlog.java index 1363242..3ac39ef 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/storageLocation/domain/Operlog.java +++ b/ruoyi-system/src/main/java/com/ruoyi/storageLocation/domain/Operlog.java @@ -1,6 +1,8 @@ package com.ruoyi.storageLocation.domain; -public class Operlog { +import com.ruoyi.common.core.domain.BaseEntity; + +public class Operlog extends BaseEntity { private String operlog_id; private String operlog_kw; private String operlog_date; diff --git a/ruoyi-system/src/main/resources/mapper/storageLocation/StorageLocationMapper.xml b/ruoyi-system/src/main/resources/mapper/storageLocation/StorageLocationMapper.xml index 8155b1d..908ef99 100644 --- a/ruoyi-system/src/main/resources/mapper/storageLocation/StorageLocationMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/storageLocation/StorageLocationMapper.xml @@ -143,7 +143,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" select operlog_date,operlog_user_name,operlog_event,operlog_zlh,operlog_xingh ,operlog_guig,operlog_diany,operlog_ms from operlog - where operlog_kw = #{operlog_kw} order by operlog_date desc + + + AND operlog_kw = #{operlog_kw} + + + AND operlog_user_name like concat('%', #{operlog_user_name}, '%') + + + and datediff(d, operlog_date, #{params.beginTime}) 0 + + + and datediff(d, operlog_date, #{params.endTime}) =]]> 0 + + + order by operlog_date desc