From 2cff2ab897bbd1b8ddebb79a7bd960414acd8363 Mon Sep 17 00:00:00 2001 From: xd <844539747@qq.com> Date: Tue, 19 Mar 2024 15:59:39 +0800 Subject: [PATCH] '123' --- .../storageLocationController.java | 9 +++++++++ .../ruoyi/storageLocation/domain/Operlog.java | 5 +++++ .../storageLocation/StorageLocationMapper.xml | 14 +++++++++----- .../src/views/storageLocation/locationSet.vue | 2 +- ruoyi-ui/src/views/storageLocation/operlog.vue | 18 ++++++++++++++---- 5 files changed, 38 insertions(+), 10 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 63d2d9e..200e71c 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 @@ -113,6 +113,8 @@ public class storageLocationController extends BaseController public AjaxResult add(@RequestBody StorageLocation storageLocation) { String user_name = getLoginUser().getUsername();//当前登陆者 + String nick_name = getLoginUser().getUser().getNickName();//当前登陆者姓名 + String materialBh = storageLocation.getMaterialBh(); String kw_user_name = redisCache.getCacheObject(getLocationZyCacheKey(materialBh)); @@ -128,6 +130,7 @@ public class storageLocationController extends BaseController SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); Operlog operlog = new Operlog(); operlog.setOperlog_user_name(user_name); + operlog.setOperlog_nick_name(nick_name); operlog.setOperlog_date(format.format(new Date())); operlog.setOperlog_event("录入库位信息"); operlog.setOperlog_kw(storageLocation.getMaterialBh()); @@ -152,6 +155,7 @@ public class storageLocationController extends BaseController public AjaxResult addUpdStorageLocation(@RequestBody StorageLocation storageLocation) { String user_name = getLoginUser().getUsername();//当前登陆者 + String nick_name = getLoginUser().getUser().getNickName();//当前登陆者姓名 String materialBh = storageLocation.getMaterialBh(); String kw_user_name = redisCache.getCacheObject(getLocationZyCacheKey(materialBh)); @@ -167,6 +171,7 @@ public class storageLocationController extends BaseController SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); Operlog operlog = new Operlog(); operlog.setOperlog_user_name(user_name); + operlog.setOperlog_nick_name(nick_name); operlog.setOperlog_date(format.format(new Date())); operlog.setOperlog_event("修改库位信息"); operlog.setOperlog_kw(storageLocation.getMaterialBh()); @@ -336,6 +341,7 @@ public class storageLocationController extends BaseController public AjaxResult clearLocationLyCacheKey(@RequestBody StorageLocation storageLocation) { String user_name = getLoginUser().getUsername();//当前登陆者 + String nick_name = getLoginUser().getUser().getNickName();//当前登陆者姓名 String materialBh = storageLocation.getMaterialBh(); String kw_user_name = redisCache.getCacheObject(getLocationLyCacheKey(materialBh)); @@ -356,6 +362,7 @@ public class storageLocationController extends BaseController for(StorageLocation sl:selectedList){ operlog = new Operlog(); operlog.setOperlog_user_name(user_name); + operlog.setOperlog_nick_name(nick_name); operlog.setOperlog_date(date); operlog.setOperlog_event("删除已选库位信息"); operlog.setOperlog_kw(sl.getMaterialBh()); @@ -379,6 +386,7 @@ public class storageLocationController extends BaseController public AjaxResult confirmStorageLocation(@RequestBody String [] materialBhArr) { String user_name = getLoginUser().getUsername();//当前登陆者 + String nick_name = getLoginUser().getUser().getNickName();//当前登陆者姓名 List materialBhList = Arrays.asList(materialBhArr); //批量插入操作记录表 SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); @@ -390,6 +398,7 @@ public class storageLocationController extends BaseController for(StorageLocation sl:selectedList){ operlog = new Operlog(); operlog.setOperlog_user_name(user_name); + operlog.setOperlog_nick_name(nick_name); operlog.setOperlog_date(date); operlog.setOperlog_event("确认完成领用"); operlog.setOperlog_kw(sl.getMaterialBh()); 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 3ac39ef..c8d14a3 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 @@ -7,6 +7,7 @@ public class Operlog extends BaseEntity { private String operlog_kw; private String operlog_date; private String operlog_user_name; + private String operlog_nick_name; private String operlog_event; private String operlog_zlh; private String operlog_xingh; @@ -46,6 +47,10 @@ public class Operlog extends BaseEntity { this.operlog_user_name = operlog_user_name; } + public String getOperlog_nick_name() {return operlog_nick_name;} + + public void setOperlog_nick_name(String operlog_nick_name) {this.operlog_nick_name = operlog_nick_name;} + public String getOperlog_event() { return operlog_event; } diff --git a/ruoyi-system/src/main/resources/mapper/storageLocation/StorageLocationMapper.xml b/ruoyi-system/src/main/resources/mapper/storageLocation/StorageLocationMapper.xml index 339a268..ffb2130 100644 --- a/ruoyi-system/src/main/resources/mapper/storageLocation/StorageLocationMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/storageLocation/StorageLocationMapper.xml @@ -108,8 +108,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - insert into operlog (operlog_kw,operlog_date,operlog_user_name,operlog_event,operlog_zlh,operlog_xingh,operlog_guig,operlog_diany,operlog_ms) - values (#{operlog_kw},#{operlog_date},#{operlog_user_name},#{operlog_event},#{operlog_zlh},#{operlog_xingh},#{operlog_guig},#{operlog_diany},#{operlog_ms}) + insert into operlog (operlog_kw,operlog_date,operlog_user_name,operlog_nick_name,operlog_event,operlog_zlh,operlog_xingh,operlog_guig,operlog_diany,operlog_ms) + values (#{operlog_kw},#{operlog_date},#{operlog_user_name},#{operlog_nick_name},#{operlog_event},#{operlog_zlh},#{operlog_xingh},#{operlog_guig},#{operlog_diany},#{operlog_ms}) - insert into operlog (operlog_kw,operlog_date,operlog_user_name,operlog_event,operlog_zlh,operlog_xingh,operlog_guig,operlog_diany,operlog_ms) + insert into operlog (operlog_kw,operlog_date,operlog_user_name,operlog_nick_name,operlog_event,operlog_zlh,operlog_xingh,operlog_guig,operlog_diany,operlog_ms) values (#{item.operlog_kw,jdbcType=VARCHAR}, #{item.operlog_date,jdbcType=VARCHAR}, #{item.operlog_user_name,jdbcType=VARCHAR}, + #{item.operlog_nick_name,jdbcType=VARCHAR}, #{item.operlog_event,jdbcType=VARCHAR}, #{item.operlog_zlh,jdbcType=VARCHAR}, #{item.operlog_xingh,jdbcType=VARCHAR}, @@ -140,7 +141,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"