Просмотр исходного кода

临时调阅账号维护、提醒

limeng 2 лет назад
Родитель
Сommit
53dcb30325

+ 4 - 0
leiSP-admin/src/main/resources/application.yml

@@ -135,3 +135,7 @@ xss:
 swagger:
 swagger:
   # 是否开启swagger
   # 是否开启swagger
   enabled: true
   enabled: true
+
+# 政数局部门ID,用于临期提醒判断
+dept:
+  zsjDeptId: 103

+ 13 - 11
leiSP-admin/src/main/resources/templates/main.html

@@ -338,17 +338,19 @@
                     temp = temp.replace("{remainingDays}",result[i].remainingDays);
                     temp = temp.replace("{remainingDays}",result[i].remainingDays);
                     content += temp;
                     content += temp;
                 }
                 }
-                $.Toast("<p  style='font-size: 18px;color: #c70000;font-weight: 900;height: 35px;line-height: 35px;'>临期提醒</p>", content, "success",{
-                    stack: true,
-                    has_icon:true,
-                    has_close_btn:true,
-                    fullscreen:false,
-                    width:250,
-                    timeout:10000,
-                    sticky:false,
-                    has_progress:true,
-                    rtl:false,
-                });
+                if(content != ""){
+                    $.Toast("<p  style='font-size: 18px;color: #c70000;font-weight: 900;height: 35px;line-height: 35px;'>临期提醒</p>", content, "success",{
+                        stack: true,
+                        has_icon:true,
+                        has_close_btn:true,
+                        fullscreen:false,
+                        width:250,
+                        timeout:10000,
+                        sticky:false,
+                        has_progress:true,
+                        rtl:false,
+                    });
+                }
             }
             }
         })
         })
     }
     }

+ 13 - 2
mybusiness/src/main/java/com/sooka/system/controller/TTempPermissionController.java

@@ -1,5 +1,6 @@
 package com.sooka.system.controller;
 package com.sooka.system.controller;
 
 
+import java.util.ArrayList;
 import java.util.Date;
 import java.util.Date;
 import java.util.List;
 import java.util.List;
 
 
@@ -9,10 +10,11 @@ import com.sooka.common.core.domain.AjaxResult;
 import com.sooka.common.core.page.TableDataInfo;
 import com.sooka.common.core.page.TableDataInfo;
 import com.sooka.common.enums.BusinessType;
 import com.sooka.common.enums.BusinessType;
 import com.sooka.common.utils.poi.ExcelUtil;
 import com.sooka.common.utils.poi.ExcelUtil;
-import com.sooka.system.domain.SysUser;
+import com.sooka.framework.util.ShiroUtils;
 import com.sooka.system.domain.TempPerUser;
 import com.sooka.system.domain.TempPerUser;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Controller;
 import org.springframework.stereotype.Controller;
 import org.springframework.ui.ModelMap;
 import org.springframework.ui.ModelMap;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -39,6 +41,11 @@ public class TTempPermissionController extends BaseController
     @Autowired
     @Autowired
     private ITTempPermissionService tTempPermissionService;
     private ITTempPermissionService tTempPermissionService;
 
 
+    @Value("${dept.zsjDeptId}")
+    private Long deptId;
+
+
+
     @RequiresPermissions("system:tempPer:view")
     @RequiresPermissions("system:tempPer:view")
     @GetMapping()
     @GetMapping()
     public String tempPer()
     public String tempPer()
@@ -64,7 +71,11 @@ public class TTempPermissionController extends BaseController
     public List<TTempPermission> expirationList(TTempPermission tTempPermission)
     public List<TTempPermission> expirationList(TTempPermission tTempPermission)
     {
     {
         tTempPermission.setEndTime(new Date());
         tTempPermission.setEndTime(new Date());
-        return tTempPermissionService.selectTTempPermissionList(tTempPermission);
+        /** 只有政数局人员可接收到临期提醒 **/
+        if(ShiroUtils.getSysUser().getDeptId().equals(deptId)){
+            return tTempPermissionService.selectTTempPermissionList(tTempPermission);
+        }
+        return new ArrayList<>();
     }
     }
 
 
     @RequiresPermissions("system:tempPer:add")
     @RequiresPermissions("system:tempPer:add")

+ 13 - 0
mybusiness/src/main/java/com/sooka/system/domain/BaseBusinessEntity.java

@@ -18,5 +18,18 @@ public class BaseBusinessEntity extends BaseEntity {
     private String interfaceinfoName;
     private String interfaceinfoName;
     private String interfacetype;
     private String interfacetype;
 
 
+    /** 操作状态 lm 20220810 add **/
+    private Long operationStatus;
+
+    /** 调用参数 lm 20220810 add **/
+    private String param;
+
+    /** 返回结果 lm 20220810 add **/
+    private String results;
+
+    /** 异常记录 lm 20220810 add **/
+    private String exceptionLog;
+
+
 
 
 }
 }

+ 6 - 0
mybusiness/src/main/java/com/sooka/system/service/impl/Guiji_Base_Service.java

@@ -42,6 +42,12 @@ public class Guiji_Base_Service {
         tuLog.setIpaddress(ipaddress);
         tuLog.setIpaddress(ipaddress);
         tuLog.setLoginUser(sysUser.getUserId());
         tuLog.setLoginUser(sysUser.getUserId());
         tuLog.setLoginName(sysUser.getLoginName());
         tuLog.setLoginName(sysUser.getLoginName());
+        /** 记录操作状态、请求参数、返回结果、异常记录 lm 20220810 add **/
+        tuLog.setOperationStatus(baseBusinessEntity.getOperationStatus());
+        tuLog.setParam(baseBusinessEntity.getParam());
+        tuLog.setResults(baseBusinessEntity.getResults());
+        tuLog.setExceptionLog(baseBusinessEntity.getExceptionLog());
+        /** 记录操作状态、请求参数、返回结果、异常记录 lm 20220810 add **/
 //        tuLog.setOperationQuantity(new Long(ls.size()));
 //        tuLog.setOperationQuantity(new Long(ls.size()));
         tuLog.setOs(os);
         tuLog.setOs(os);
         //共享接口
         //共享接口

+ 36 - 63
mybusiness/src/main/resources/templates/system/log/log.html

@@ -10,13 +10,6 @@
             <form id="formId">
             <form id="formId">
                 <div class="select-list">
                 <div class="select-list">
                     <ul>
                     <ul>
-                        <!--<li>-->
-                        <!--<label>状态:</label>-->
-                        <!--<select name="status">-->
-                        <!--<option value="">所有</option>-->
-                        <!--<option value="-1">代码生成请选择字典属性</option>-->
-                        <!--</select>-->
-                        <!--</li>-->
                         <li>
                         <li>
                             <label>登录人:</label>
                             <label>登录人:</label>
                             <input type="text" name="loginUser"/>
                             <input type="text" name="loginUser"/>
@@ -25,22 +18,6 @@
                             <label>登录名:</label>
                             <label>登录名:</label>
                             <input type="text" name="loginName"/>
                             <input type="text" name="loginName"/>
                         </li>
                         </li>
-                        <!--<li>-->
-                        <!--<label>调用接口id:</label>-->
-                        <!--<input type="text" name="interfaceinfoId"/>-->
-                        <!--</li>-->
-                        <!--<li>-->
-                        <!--<label>调用接口名:</label>-->
-                        <!--<input type="text" name="interfaceinfoName"/>-->
-                        <!--</li>-->
-                        <!--<li>-->
-                        <!--<label>ip地址:</label>-->
-                        <!--<input type="text" name="ipaddress"/>-->
-                        <!--</li>-->
-                        <!--<li>-->
-                        <!--<label>操作系统:</label>-->
-                        <!--<input type="text" name="os"/>-->
-                        <!--</li>-->
                         <li>
                         <li>
                             <label>平台接口类型:</label>
                             <label>平台接口类型:</label>
                             <select name="platformInterfacetype"
                             <select name="platformInterfacetype"
@@ -50,33 +27,6 @@
                                         th:value="${dict.dictValue}"></option>
                                         th:value="${dict.dictValue}"></option>
                             </select>
                             </select>
                         </li>
                         </li>
-                        <!--<li>-->
-                        <!--<label>访问浏览器:</label>-->
-                        <!--<input type="text" name="browser"/>-->
-                        <!--</li>-->
-                        <!--<li>-->
-                        <!--<label>参数条件:</label>-->
-                        <!--<input type="text" name="param"/>-->
-                        <!--</li>-->
-                        <!--<li>-->
-                        <!--<label>返回结果:</label>-->
-                        <!--<input type="text" name="results"/>-->
-                        <!--</li>-->
-                        <!--<li>-->
-                        <!--<label>操作数量:</label>-->
-                        <!--<input type="text" name="operationQuantity"/>-->
-                        <!--</li>-->
-                        <!--<li>-->
-                        <!--<label>操作状态:</label>-->
-                        <!--<select name="operationStatus">-->
-                        <!--<option value="">所有</option>-->
-                        <!--<option value="-1">代码生成请选择字典属性</option>-->
-                        <!--</select>-->
-                        <!--</li>-->
-                        <!--<li>-->
-                        <!--<label>异常记录:</label>-->
-                        <!--<input type="text" name="exceptionLog"/>-->
-                        <!--</li>-->
                         <li>
                         <li>
                             <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i
                             <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i
                                     class="fa fa-search"></i>&nbsp;搜索</a>
                                     class="fa fa-search"></i>&nbsp;搜索</a>
@@ -134,7 +84,8 @@
                 },
                 },
                 {
                 {
                     field: 'loginUser',
                     field: 'loginUser',
-                    title: '登录人'
+                    title: '登录人',
+                    visible: false
                 },
                 },
                 {
                 {
                     field: 'loginName',
                     field: 'loginName',
@@ -159,7 +110,10 @@
                 },
                 },
                 {
                 {
                     field: 'os',
                     field: 'os',
-                    title: '操作系统'
+                    title: '操作系统',
+                    cellStyle:formatTableUnit,
+                    formatter :paramsMatter
+
                 },
                 },
                 {
                 {
                     field: 'platformInterfacetype',
                     field: 'platformInterfacetype',
@@ -184,7 +138,8 @@
                 },
                 },
                 {
                 {
                     field: 'operationQuantity',
                     field: 'operationQuantity',
-                    title: '操作数量'
+                    title: '操作数量',
+                    visible: false
                 },
                 },
                 {
                 {
                     field: 'operationStatus',
                     field: 'operationStatus',
@@ -196,20 +151,38 @@
                     title: '异常记录',
                     title: '异常记录',
                     visible: false
                     visible: false
                 },
                 },
-                // {
-                //     title: '操作',
-                //     align: 'center',
-                //     formatter: function(value, row, index) {
-                //         var actions = [];
-                //         actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
-                //         actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
-                //         return actions.join('');
-                //     }
-                // }
+                {
+                    title: '操作',
+                    align: 'center',
+                    formatter: function(value, row, index) {
+                        var actions = [];
+                        actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-search"></i>详情</a> ');
+                        return actions.join('');
+                    }
+                }
             ]
             ]
         };
         };
         $.table.init(options);
         $.table.init(options);
     });
     });
+
+    //表格超出宽度鼠标悬停显示td内容
+    function paramsMatter(value,row,index) {
+        let span=document.createElement("span");
+        span.setAttribute("title",value);
+        span.innerHTML = value;
+        return span.outerHTML;
+    }
+    //td宽度以及内容超过宽度隐藏
+    function formatTableUnit(value, row, index) {
+        return {
+            css: {
+                "white-space": "nowrap",
+                "text-overflow": "ellipsis",
+                "overflow": "hidden",
+                "max-width":"150px"
+            }
+        }
+    }
 </script>
 </script>
 </body>
 </body>
 </html>
 </html>