8
pom.xml
|
|
@ -202,6 +202,13 @@
|
||||||
<artifactId>ruoyi-common</artifactId>
|
<artifactId>ruoyi-common</artifactId>
|
||||||
<version>${ruoyi.version}</version>
|
<version>${ruoyi.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- 封铅系统-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.ruoyi</groupId>
|
||||||
|
<artifactId>ruoyi-fq</artifactId>
|
||||||
|
<version>${ruoyi.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</dependencyManagement>
|
</dependencyManagement>
|
||||||
|
|
@ -213,6 +220,7 @@
|
||||||
<module>ruoyi-quartz</module>
|
<module>ruoyi-quartz</module>
|
||||||
<module>ruoyi-generator</module>
|
<module>ruoyi-generator</module>
|
||||||
<module>ruoyi-common</module>
|
<module>ruoyi-common</module>
|
||||||
|
<module>ruoyi-fq</module>
|
||||||
</modules>
|
</modules>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -78,6 +78,12 @@
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ruoyi</groupId>
|
||||||
<artifactId>ruoyi-generator</artifactId>
|
<artifactId>ruoyi-generator</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- 封铅管理-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.ruoyi</groupId>
|
||||||
|
<artifactId>ruoyi-fq</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,22 +1,13 @@
|
||||||
package com.ruoyi.web.controller.system;
|
package com.ruoyi.web.controller.system;
|
||||||
|
|
||||||
import java.util.List;
|
import cn.hutool.core.util.ArrayUtil;
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Controller;
|
|
||||||
import org.springframework.ui.ModelMap;
|
|
||||||
import org.springframework.validation.annotation.Validated;
|
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.ResponseBody;
|
|
||||||
import com.ruoyi.common.annotation.Log;
|
import com.ruoyi.common.annotation.Log;
|
||||||
import com.ruoyi.common.constant.UserConstants;
|
import com.ruoyi.common.constant.UserConstants;
|
||||||
import com.ruoyi.common.core.controller.BaseController;
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
import com.ruoyi.common.enums.BusinessType;
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
import com.ruoyi.framework.util.ShiroUtils;
|
import com.ruoyi.framework.util.ShiroUtils;
|
||||||
import com.ruoyi.system.domain.SysRole;
|
import com.ruoyi.system.domain.SysRole;
|
||||||
|
|
@ -24,6 +15,15 @@ import com.ruoyi.system.domain.SysUser;
|
||||||
import com.ruoyi.system.domain.SysUserRole;
|
import com.ruoyi.system.domain.SysUserRole;
|
||||||
import com.ruoyi.system.service.ISysRoleService;
|
import com.ruoyi.system.service.ISysRoleService;
|
||||||
import com.ruoyi.system.service.ISysUserService;
|
import com.ruoyi.system.service.ISysUserService;
|
||||||
|
import org.apache.commons.lang3.ArrayUtils;
|
||||||
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.ui.ModelMap;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 角色信息
|
* 角色信息
|
||||||
|
|
@ -236,7 +236,7 @@ public class SysRoleController extends BaseController
|
||||||
/**
|
/**
|
||||||
* 查询已分配用户角色列表
|
* 查询已分配用户角色列表
|
||||||
*/
|
*/
|
||||||
@RequiresPermissions("system:role:list")
|
//@RequiresPermissions("system:role:list")
|
||||||
@PostMapping("/authUser/allocatedList")
|
@PostMapping("/authUser/allocatedList")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public TableDataInfo allocatedList(SysUser user)
|
public TableDataInfo allocatedList(SysUser user)
|
||||||
|
|
@ -278,6 +278,36 @@ public class SysRoleController extends BaseController
|
||||||
return prefix + "/selectUser";
|
return prefix + "/selectUser";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 选择用户
|
||||||
|
* roleId 用户
|
||||||
|
*/
|
||||||
|
@GetMapping("/authUser/selectUserCommon/{roleId}")
|
||||||
|
public String selectUserCommon(@PathVariable("roleId") Long roleId,ModelMap mmap)
|
||||||
|
{
|
||||||
|
mmap.put("role", roleService.selectRoleById(roleId));
|
||||||
|
return prefix + "/selectUserCommon";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 选择用户 不包括roleIds
|
||||||
|
* roleId 用户
|
||||||
|
*/
|
||||||
|
@GetMapping("/authUser/selectUserCommonExt/{roleIds}")
|
||||||
|
public String selectUserCommonExt(@PathVariable("roleIds") String roleIds,ModelMap mmap)
|
||||||
|
{
|
||||||
|
if(StringUtils.isNotEmpty(roleIds)){
|
||||||
|
/*String[] strs = roleIds.split(",");
|
||||||
|
Long[] ls = new Long[strs.length];
|
||||||
|
for (int i=0; i<strs.length ; i++) {
|
||||||
|
ls[i] = Long.valueOf(strs[i]);
|
||||||
|
}*/
|
||||||
|
mmap.put("roleIds", roleIds);
|
||||||
|
}
|
||||||
|
|
||||||
|
return prefix + "/selectUserCommonExt";
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询未分配用户角色列表
|
* 查询未分配用户角色列表
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,7 @@ import com.ruoyi.framework.shiro.service.SysPasswordService;
|
||||||
import com.ruoyi.framework.util.ShiroUtils;
|
import com.ruoyi.framework.util.ShiroUtils;
|
||||||
import com.ruoyi.system.domain.SysRole;
|
import com.ruoyi.system.domain.SysRole;
|
||||||
import com.ruoyi.system.domain.SysUser;
|
import com.ruoyi.system.domain.SysUser;
|
||||||
|
import com.ruoyi.system.domain.SysUserRole;
|
||||||
import com.ruoyi.system.service.ISysPostService;
|
import com.ruoyi.system.service.ISysPostService;
|
||||||
import com.ruoyi.system.service.ISysRoleService;
|
import com.ruoyi.system.service.ISysRoleService;
|
||||||
import com.ruoyi.system.service.ISysUserService;
|
import com.ruoyi.system.service.ISysUserService;
|
||||||
|
|
@ -211,9 +212,9 @@ public class SysUserController extends BaseController
|
||||||
{
|
{
|
||||||
SysUser user = userService.selectUserById(userId);
|
SysUser user = userService.selectUserById(userId);
|
||||||
// 获取用户所属的角色列表
|
// 获取用户所属的角色列表
|
||||||
List<SysRole> roles = roleService.selectRolesByUserId(userId);
|
List<SysUserRole> userRoles = userService.selectUserRoleByUserId(userId);
|
||||||
mmap.put("user", user);
|
mmap.put("user", user);
|
||||||
mmap.put("roles", SysUser.isAdmin(userId) ? roles : roles.stream().filter(r -> !r.isAdmin()).collect(Collectors.toList()));
|
mmap.put("userRoles", userRoles);
|
||||||
return prefix + "/authRole";
|
return prefix + "/authRole";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,9 +6,10 @@ spring:
|
||||||
druid:
|
druid:
|
||||||
# 主库数据源
|
# 主库数据源
|
||||||
master:
|
master:
|
||||||
url: jdbc:mysql://localhost:3306/ry?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
url: jdbc:mysql://49.234.16.218:3306/ry?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||||
|
#url: jdbc:mysql://127.0.0.1:3306/ry?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||||
username: root
|
username: root
|
||||||
password: password
|
password: u)i0Gd=2QxY*
|
||||||
# 从库数据源
|
# 从库数据源
|
||||||
slave:
|
slave:
|
||||||
# 从数据源开关/默认关闭
|
# 从数据源开关/默认关闭
|
||||||
|
|
|
||||||
|
|
@ -10,13 +10,14 @@ ruoyi:
|
||||||
demoEnabled: true
|
demoEnabled: true
|
||||||
# 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath)
|
# 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath)
|
||||||
profile: D:/ruoyi/uploadPath
|
profile: D:/ruoyi/uploadPath
|
||||||
|
#profile: /home/ruoyi/uploadPath
|
||||||
# 获取ip地址开关
|
# 获取ip地址开关
|
||||||
addressEnabled: false
|
addressEnabled: false
|
||||||
|
|
||||||
# 开发环境配置
|
# 开发环境配置
|
||||||
server:
|
server:
|
||||||
# 服务器的HTTP端口,默认为80
|
# 服务器的HTTP端口,默认为80
|
||||||
port: 80
|
port: 7777
|
||||||
servlet:
|
servlet:
|
||||||
# 应用的访问路径
|
# 应用的访问路径
|
||||||
context-path: /
|
context-path: /
|
||||||
|
|
@ -61,9 +62,9 @@ spring:
|
||||||
servlet:
|
servlet:
|
||||||
multipart:
|
multipart:
|
||||||
# 单个文件大小
|
# 单个文件大小
|
||||||
max-file-size: 10MB
|
max-file-size: 15MB
|
||||||
# 设置总上传的文件大小
|
# 设置总上传的文件大小
|
||||||
max-request-size: 20MB
|
max-request-size: 30MB
|
||||||
# 服务模块
|
# 服务模块
|
||||||
devtools:
|
devtools:
|
||||||
restart:
|
restart:
|
||||||
|
|
@ -108,11 +109,9 @@ shiro:
|
||||||
httpOnly: true
|
httpOnly: true
|
||||||
# 设置Cookie的过期时间,天为单位
|
# 设置Cookie的过期时间,天为单位
|
||||||
maxAge: 30
|
maxAge: 30
|
||||||
# 设置密钥,务必保持唯一性(生成方式,直接拷贝到main运行即可)KeyGenerator keygen = KeyGenerator.getInstance("AES"); SecretKey deskey = keygen.generateKey(); System.out.println(Base64.encodeToString(deskey.getEncoded()));
|
|
||||||
cipherKey: zSyK5Kp6PZAAjlT+eeNMlg==
|
|
||||||
session:
|
session:
|
||||||
# Session超时时间,-1代表永不过期(默认30分钟)
|
# Session超时时间,-1代表永不过期(默认30分钟)
|
||||||
expireTime: 30
|
expireTime: 60
|
||||||
# 同步session到数据库的周期(默认1分钟)
|
# 同步session到数据库的周期(默认1分钟)
|
||||||
dbSyncPeriod: 1
|
dbSyncPeriod: 1
|
||||||
# 相隔多久检查一次session的有效性,默认就是10分钟
|
# 相隔多久检查一次session的有效性,默认就是10分钟
|
||||||
|
|
|
||||||
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 139 KiB After Width: | Height: | Size: 206 KiB |
|
After Width: | Height: | Size: 139 KiB |
|
After Width: | Height: | Size: 360 KiB |
|
After Width: | Height: | Size: 13 MiB |
|
After Width: | Height: | Size: 1.0 MiB |
|
After Width: | Height: | Size: 250 KiB |
|
Before Width: | Height: | Size: 79 KiB After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 79 KiB |
|
|
@ -1399,10 +1399,10 @@ var table = {
|
||||||
$.modal.msgError("不能选择根节点(" + nodes[i].name + ")");
|
$.modal.msgError("不能选择根节点(" + nodes[i].name + ")");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (nodes[i].isParent) {
|
/*if (nodes[i].isParent) {
|
||||||
$.modal.msgError("不能选择父节点(" + nodes[i].name + ")");
|
$.modal.msgError("不能选择父节点(" + nodes[i].name + ")");
|
||||||
return false;
|
return false;
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<meta name="renderer" content="webkit">
|
<meta name="renderer" content="webkit">
|
||||||
<title>若依系统首页</title>
|
<title>系统首页</title>
|
||||||
<!-- 避免IE使用兼容模式 -->
|
<!-- 避免IE使用兼容模式 -->
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<link th:href="@{favicon.ico}" rel="stylesheet"/>
|
<link th:href="@{favicon.ico}" rel="stylesheet"/>
|
||||||
|
|
@ -26,7 +26,7 @@
|
||||||
</div>
|
</div>
|
||||||
<a th:href="@{/index}">
|
<a th:href="@{/index}">
|
||||||
<li class="logo hidden-xs">
|
<li class="logo hidden-xs">
|
||||||
<span class="logo-lg">RuoYi</span>
|
<span class="logo-lg">信息中心</span>
|
||||||
</li>
|
</li>
|
||||||
</a>
|
</a>
|
||||||
<div class="sidebar-collapse">
|
<div class="sidebar-collapse">
|
||||||
|
|
@ -180,8 +180,10 @@
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<ul class="nav navbar-top-links navbar-right welcome-message">
|
<ul class="nav navbar-top-links navbar-right welcome-message">
|
||||||
|
<!--
|
||||||
<li><a title="视频教程" href="http://doc.ruoyi.vip/ruoyi/document/spjc.html" target="_blank"><i class="fa fa-video-camera"></i> 视频教程</a></li>
|
<li><a title="视频教程" href="http://doc.ruoyi.vip/ruoyi/document/spjc.html" target="_blank"><i class="fa fa-video-camera"></i> 视频教程</a></li>
|
||||||
<li><a title="开发文档" href="http://doc.ruoyi.vip" target="_blank"><i class="fa fa-question-circle"></i> 开发文档</a></li>
|
<li><a title="开发文档" href="http://doc.ruoyi.vip" target="_blank"><i class="fa fa-question-circle"></i> 开发文档</a></li>
|
||||||
|
-->
|
||||||
<li><a title="全屏显示" href="javascript:void(0)" id="fullScreen"><i class="fa fa-arrows-alt"></i> 全屏显示</a></li>
|
<li><a title="全屏显示" href="javascript:void(0)" id="fullScreen"><i class="fa fa-arrows-alt"></i> 全屏显示</a></li>
|
||||||
<li class="dropdown user-menu">
|
<li class="dropdown user-menu">
|
||||||
<a href="javascript:void(0)" class="dropdown-toggle" data-hover="dropdown">
|
<a href="javascript:void(0)" class="dropdown-toggle" data-hover="dropdown">
|
||||||
|
|
@ -233,7 +235,7 @@
|
||||||
th:src="@{/system/main}" frameborder="0" seamless></iframe>
|
th:src="@{/system/main}" frameborder="0" seamless></iframe>
|
||||||
</div>
|
</div>
|
||||||
<div class="footer">
|
<div class="footer">
|
||||||
<div class="pull-right">© [[${copyrightYear}]] RuoYi Copyright </div>
|
<div class="pull-right">© [[${copyrightYear}]] Copyright </div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!--右侧部分结束-->
|
<!--右侧部分结束-->
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
|
||||||
<title>登录若依系统</title>
|
<title>登录系统</title>
|
||||||
<meta name="description" content="若依后台管理框架">
|
<meta name="description" content="后台管理系统">
|
||||||
<link href="../static/css/bootstrap.min.css" th:href="@{/css/bootstrap.min.css}" rel="stylesheet"/>
|
<link href="../static/css/bootstrap.min.css" th:href="@{/css/bootstrap.min.css}" rel="stylesheet"/>
|
||||||
<link href="../static/css/font-awesome.min.css" th:href="@{/css/font-awesome.min.css}" rel="stylesheet"/>
|
<link href="../static/css/font-awesome.min.css" th:href="@{/css/font-awesome.min.css}" rel="stylesheet"/>
|
||||||
<link href="../static/css/style.css" th:href="@{/css/style.css}" rel="stylesheet"/>
|
<link href="../static/css/style.css" th:href="@{/css/style.css}" rel="stylesheet"/>
|
||||||
|
|
@ -21,55 +21,60 @@
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body class="signin">
|
<body class="signin">
|
||||||
<div class="signinpanel">
|
<div class="signinpanel">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-7">
|
<div class="col-sm-7">
|
||||||
<div class="signin-info">
|
<div class="signin-info">
|
||||||
<div class="logopanel m-b">
|
<div class="logopanel m-b">
|
||||||
<h1><img alt="[ 若依 ]" src="../static/ruoyi.png" th:src="@{/ruoyi.png}"></h1>
|
<!--<h1><img alt="[ 若依 ]" src="../static/ruoyi.png" th:src="@{/ruoyi.png}"></h1>-->
|
||||||
</div>
|
|
||||||
<div class="m-b"></div>
|
|
||||||
<h4>欢迎使用 <strong>若依 后台管理系统</strong></h4>
|
|
||||||
<ul class="m-b">
|
|
||||||
<li><i class="fa fa-arrow-circle-o-right m-r-xs"></i> SpringBoot</li>
|
|
||||||
<li><i class="fa fa-arrow-circle-o-right m-r-xs"></i> Mybatis</li>
|
|
||||||
<li><i class="fa fa-arrow-circle-o-right m-r-xs"></i> Shiro</li>
|
|
||||||
<li><i class="fa fa-arrow-circle-o-right m-r-xs"></i> Thymeleaf</li>
|
|
||||||
<li><i class="fa fa-arrow-circle-o-right m-r-xs"></i> Bootstrap</li>
|
|
||||||
</ul>
|
|
||||||
<strong th:if="${@config.getKey('sys.account.registerUser')}">还没有账号? <a th:href="@{/register}">立即注册»</a></strong>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="m-b"></div>
|
||||||
<div class="col-sm-5">
|
<h4>欢迎使用 <strong>后台管理系统</strong></h4>
|
||||||
<form id="signupForm" autocomplete="off">
|
<!--<ul class="m-b">
|
||||||
<h4 class="no-margins">登录:</h4>
|
<li><i class="fa fa-arrow-circle-o-right m-r-xs"></i> SpringBoot</li>
|
||||||
<p class="m-t-md">你若不离不弃,我必生死相依</p>
|
<li><i class="fa fa-arrow-circle-o-right m-r-xs"></i> Mybatis</li>
|
||||||
<input type="text" name="username" class="form-control uname" placeholder="用户名" value="admin" />
|
<li><i class="fa fa-arrow-circle-o-right m-r-xs"></i> Shiro</li>
|
||||||
<input type="password" name="password" class="form-control pword" placeholder="密码" value="admin123" />
|
<li><i class="fa fa-arrow-circle-o-right m-r-xs"></i> Thymeleaf</li>
|
||||||
<div class="row m-t" th:if="${captchaEnabled==true}">
|
<li><i class="fa fa-arrow-circle-o-right m-r-xs"></i> Bootstrap</li>
|
||||||
<div class="col-xs-6">
|
</ul>-->
|
||||||
<input type="text" name="validateCode" class="form-control code" placeholder="验证码" maxlength="5" />
|
<strong th:if="${@config.getKey('sys.account.registerUser')}">还没有账号? <a th:href="@{/register}">立即注册»</a></strong>
|
||||||
</div>
|
|
||||||
<div class="col-xs-6">
|
|
||||||
<a href="javascript:void(0);" title="点击更换验证码">
|
|
||||||
<img th:src="@{captcha/captchaImage(type=${captchaType})}" class="imgcode" width="85%"/>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="checkbox-custom" th:classappend="${captchaEnabled==false} ? 'm-t'">
|
|
||||||
<input type="checkbox" id="rememberme" name="rememberme"> <label for="rememberme">记住我</label>
|
|
||||||
</div>
|
|
||||||
<button class="btn btn-success btn-block" id="btnSubmit" data-loading="正在验证登录,请稍后...">登录</button>
|
|
||||||
</form>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="signup-footer">
|
<div class="col-sm-5">
|
||||||
<div class="pull-left">
|
<form id="signupForm" autocomplete="off">
|
||||||
© 2019 All Rights Reserved. RuoYi <br>
|
<h4 class="no-margins">登录:</h4>
|
||||||
</div>
|
<!--
|
||||||
|
<p class="m-t-md">你若不离不弃,我必生死相依</p>
|
||||||
|
-->
|
||||||
|
<input type="text" name="username" class="form-control uname" placeholder="用户名" value="admin"/>
|
||||||
|
<input type="password" name="password" class="form-control pword" placeholder="密码" value="admin123"/>
|
||||||
|
<div class="row m-t" th:if="${captchaEnabled==true}">
|
||||||
|
<div class="col-xs-6">
|
||||||
|
<input type="text" name="validateCode" class="form-control code" placeholder="验证码"
|
||||||
|
maxlength="5"/>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-6">
|
||||||
|
<a href="javascript:void(0);" title="点击更换验证码">
|
||||||
|
<img th:src="@{captcha/captchaImage(type=${captchaType})}" class="imgcode" width="85%"/>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="checkbox-custom" th:classappend="${captchaEnabled==false} ? 'm-t'">
|
||||||
|
<input type="checkbox" id="rememberme" name="rememberme"> <label for="rememberme">记住我</label>
|
||||||
|
</div>
|
||||||
|
<button class="btn btn-success btn-block" id="btnSubmit" data-loading="正在验证登录,请稍后...">登录</button>
|
||||||
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<script th:inline="javascript"> var ctx = [[@{/}]]; var captchaType = [[${captchaType}]]; </script>
|
<div class="signup-footer">
|
||||||
|
<div class="pull-left">
|
||||||
|
© 2019 All Rights Reserved.<br>
|
||||||
|
<!--© 2019 All Rights Reserved. RuoYi <br>-->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script th:inline="javascript"> var ctx = [[@{
|
||||||
|
/}]]; var captchaType = [[${captchaType}]]; </script>
|
||||||
<!-- 全局js -->
|
<!-- 全局js -->
|
||||||
<script src="../static/js/jquery.min.js" th:src="@{/js/jquery.min.js}"></script>
|
<script src="../static/js/jquery.min.js" th:src="@{/js/jquery.min.js}"></script>
|
||||||
<script src="../static/js/bootstrap.min.js" th:src="@{/js/bootstrap.min.js}"></script>
|
<script src="../static/js/bootstrap.min.js" th:src="@{/js/bootstrap.min.js}"></script>
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,8 @@
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
|
||||||
<title>注册若依系统</title>
|
<title>注册</title>
|
||||||
<meta name="description" content="若依后台管理框架">
|
<meta name="description" content="后台管理框架">
|
||||||
<link href="../static/css/bootstrap.min.css" th:href="@{/css/bootstrap.min.css}" rel="stylesheet"/>
|
<link href="../static/css/bootstrap.min.css" th:href="@{/css/bootstrap.min.css}" rel="stylesheet"/>
|
||||||
<link href="../static/css/font-awesome.min.css" th:href="@{/css/font-awesome.min.css}" rel="stylesheet"/>
|
<link href="../static/css/font-awesome.min.css" th:href="@{/css/font-awesome.min.css}" rel="stylesheet"/>
|
||||||
<link href="../static/css/style.css" th:href="@{/css/style.css}" rel="stylesheet"/>
|
<link href="../static/css/style.css" th:href="@{/css/style.css}" rel="stylesheet"/>
|
||||||
|
|
@ -22,25 +22,27 @@
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-7">
|
<div class="col-sm-7">
|
||||||
<div class="signin-info">
|
<div class="signin-info">
|
||||||
<div class="logopanel m-b">
|
<!--<div class="logopanel m-b">
|
||||||
<h1><img alt="[ 若依 ]" src="../static/ruoyi.png" th:src="@{/ruoyi.png}"></h1>
|
<h1><img alt="[ 若依 ]" src="../static/ruoyi.png" th:src="@{/ruoyi.png}"></h1>
|
||||||
</div>
|
</div>-->
|
||||||
<div class="m-b"></div>
|
<div class="m-b"></div>
|
||||||
<h4>欢迎使用 <strong>若依 后台管理系统</strong></h4>
|
<h4>欢迎使用 <strong>后台管理系统</strong></h4>
|
||||||
<ul class="m-b">
|
<!--<ul class="m-b">
|
||||||
<li><i class="fa fa-arrow-circle-o-right m-r-xs"></i> SpringBoot</li>
|
<li><i class="fa fa-arrow-circle-o-right m-r-xs"></i> SpringBoot</li>
|
||||||
<li><i class="fa fa-arrow-circle-o-right m-r-xs"></i> Mybatis</li>
|
<li><i class="fa fa-arrow-circle-o-right m-r-xs"></i> Mybatis</li>
|
||||||
<li><i class="fa fa-arrow-circle-o-right m-r-xs"></i> Shiro</li>
|
<li><i class="fa fa-arrow-circle-o-right m-r-xs"></i> Shiro</li>
|
||||||
<li><i class="fa fa-arrow-circle-o-right m-r-xs"></i> Thymeleaf</li>
|
<li><i class="fa fa-arrow-circle-o-right m-r-xs"></i> Thymeleaf</li>
|
||||||
<li><i class="fa fa-arrow-circle-o-right m-r-xs"></i> Bootstrap</li>
|
<li><i class="fa fa-arrow-circle-o-right m-r-xs"></i> Bootstrap</li>
|
||||||
</ul>
|
</ul>-->
|
||||||
<strong>已经注册过? <a th:href="@{/login}">直接登录»</a></strong>
|
<strong>已经注册过? <a th:href="@{/login}">直接登录»</a></strong>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-5">
|
<div class="col-sm-5">
|
||||||
<form id="registerForm" autocomplete="off">
|
<form id="registerForm" autocomplete="off">
|
||||||
<h4 class="no-margins">注册:</h4>
|
<h4 class="no-margins">注册:</h4>
|
||||||
|
<!--
|
||||||
<p class="m-t-md">你若不离不弃,我必生死相依</p>
|
<p class="m-t-md">你若不离不弃,我必生死相依</p>
|
||||||
|
-->
|
||||||
<input type="text" name="username" class="form-control uname" placeholder="用户名" maxlength="20" />
|
<input type="text" name="username" class="form-control uname" placeholder="用户名" maxlength="20" />
|
||||||
<input type="password" name="password" class="form-control pword" placeholder="密码" maxlength="20" />
|
<input type="password" name="password" class="form-control pword" placeholder="密码" maxlength="20" />
|
||||||
<input type="password" name="confirmPassword" class="form-control pword" placeholder="确认密码" maxlength="20" />
|
<input type="password" name="confirmPassword" class="form-control pword" placeholder="确认密码" maxlength="20" />
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,118 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||||
|
<head>
|
||||||
|
<th:block th:include="include :: header('分配角色选择用户')" />
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body class="gray-bg">
|
||||||
|
<div class="container-div">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 search-collapse">
|
||||||
|
<form id="role-form">
|
||||||
|
<input type="hidden" id="roleId" name="roleId" th:value="${role.roleId}">
|
||||||
|
<input id="userId" name="userId" type="hidden"/>
|
||||||
|
<input id="userName" name="userName" type="hidden"/>
|
||||||
|
<div class="select-list">
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
登录名称:<input type="text" name="loginName"/>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
手机号码:<input type="text" name="phonenumber"/>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
|
||||||
|
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-sm-12 select-table table-striped">
|
||||||
|
<table id="bootstrap-table"></table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<th:block th:include="include :: footer" />
|
||||||
|
<script th:inline="javascript">
|
||||||
|
var datas = [[${@dict.getType('sys_normal_disable')}]];
|
||||||
|
var prefix = ctx + "system/role/authUser";
|
||||||
|
|
||||||
|
$(function() {
|
||||||
|
var options = {
|
||||||
|
url: prefix + "/allocatedList",
|
||||||
|
createUrl: prefix + "/add",
|
||||||
|
updateUrl: prefix + "/edit/{id}",
|
||||||
|
removeUrl: prefix + "/remove",
|
||||||
|
exportUrl: prefix + "/export",
|
||||||
|
importUrl: prefix + "/importData",
|
||||||
|
importTemplateUrl: prefix + "/importTemplate",
|
||||||
|
queryParams: queryParams,
|
||||||
|
sortName: "createTime",
|
||||||
|
sortOrder: "desc",
|
||||||
|
modalName: "用户",
|
||||||
|
showSearch: false,
|
||||||
|
showRefresh: false,
|
||||||
|
showToggle: false,
|
||||||
|
showColumns: false,
|
||||||
|
clickToSelect: true,
|
||||||
|
rememberSelected: true,
|
||||||
|
onClickRow:function(row, $element,field){
|
||||||
|
//var i = $element.data('userId');//可通过此参数获取当前行号
|
||||||
|
$("#userId").val(row.userId);
|
||||||
|
$("#userName").val(row.userName);
|
||||||
|
//alert(i+","+row.userId+","+field);
|
||||||
|
},
|
||||||
|
singleSelect: true,
|
||||||
|
columns: [{
|
||||||
|
field: 'state',
|
||||||
|
checkbox: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'userId',
|
||||||
|
title: '用户ID',
|
||||||
|
visible: false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'loginName',
|
||||||
|
title: '登录名称',
|
||||||
|
sortable: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'userName',
|
||||||
|
title: '用户名称'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'email',
|
||||||
|
title: '邮箱'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'phonenumber',
|
||||||
|
title: '手机'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'status',
|
||||||
|
title: '用户状态',
|
||||||
|
align: 'center',
|
||||||
|
formatter: function (value, row, index) {
|
||||||
|
return $.table.selectDictLabel(datas, value);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'createTime',
|
||||||
|
title: '创建时间',
|
||||||
|
sortable: true
|
||||||
|
}]
|
||||||
|
};
|
||||||
|
$.table.init(options);
|
||||||
|
});
|
||||||
|
|
||||||
|
function queryParams(params) {
|
||||||
|
var search = $.table.queryParams(params);
|
||||||
|
search.roleId = $("#roleId").val();
|
||||||
|
return search;
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,118 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||||
|
<head>
|
||||||
|
<th:block th:include="include :: header('分配角色选择用户')" />
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body class="gray-bg">
|
||||||
|
<div class="container-div">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 search-collapse">
|
||||||
|
<form id="role-form">
|
||||||
|
<input type="hidden" id="roleIds" name="roleIds" th:value="${roleIds}">
|
||||||
|
<input id="userId" name="userId" type="hidden"/>
|
||||||
|
<input id="userName" name="userName" type="hidden"/>
|
||||||
|
<div class="select-list">
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
登录名称:<input type="text" name="loginName"/>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
手机号码:<input type="text" name="phonenumber"/>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
|
||||||
|
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-sm-12 select-table table-striped">
|
||||||
|
<table id="bootstrap-table"></table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<th:block th:include="include :: footer" />
|
||||||
|
<script th:inline="javascript">
|
||||||
|
var datas = [[${@dict.getType('sys_normal_disable')}]];
|
||||||
|
var prefix = ctx + "system/role/authUser";
|
||||||
|
|
||||||
|
$(function() {
|
||||||
|
var options = {
|
||||||
|
url: prefix + "/unallocatedList",
|
||||||
|
createUrl: prefix + "/add",
|
||||||
|
updateUrl: prefix + "/edit/{id}",
|
||||||
|
removeUrl: prefix + "/remove",
|
||||||
|
exportUrl: prefix + "/export",
|
||||||
|
importUrl: prefix + "/importData",
|
||||||
|
importTemplateUrl: prefix + "/importTemplate",
|
||||||
|
queryParams: queryParams,
|
||||||
|
sortName: "createTime",
|
||||||
|
sortOrder: "desc",
|
||||||
|
modalName: "用户",
|
||||||
|
showSearch: false,
|
||||||
|
showRefresh: false,
|
||||||
|
showToggle: false,
|
||||||
|
showColumns: false,
|
||||||
|
clickToSelect: true,
|
||||||
|
rememberSelected: true,
|
||||||
|
onClickRow:function(row, $element,field){
|
||||||
|
//var i = $element.data('userId');//可通过此参数获取当前行号
|
||||||
|
$("#userId").val(row.userId);
|
||||||
|
$("#userName").val(row.userName);
|
||||||
|
//alert(i+","+row.userId+","+field);
|
||||||
|
},
|
||||||
|
singleSelect: true,
|
||||||
|
columns: [{
|
||||||
|
field: 'state',
|
||||||
|
checkbox: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'userId',
|
||||||
|
title: '用户ID',
|
||||||
|
visible: false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'loginName',
|
||||||
|
title: '登录名称',
|
||||||
|
sortable: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'userName',
|
||||||
|
title: '用户名称'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'email',
|
||||||
|
title: '邮箱'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'phonenumber',
|
||||||
|
title: '手机'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'status',
|
||||||
|
title: '用户状态',
|
||||||
|
align: 'center',
|
||||||
|
formatter: function (value, row, index) {
|
||||||
|
return $.table.selectDictLabel(datas, value);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'createTime',
|
||||||
|
title: '创建时间',
|
||||||
|
sortable: true
|
||||||
|
}]
|
||||||
|
};
|
||||||
|
$.table.init(options);
|
||||||
|
});
|
||||||
|
|
||||||
|
function queryParams(params) {
|
||||||
|
var search = $.table.queryParams(params);
|
||||||
|
search.roleIds = $("#roleIds").val();
|
||||||
|
return search;
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,48 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<parent>
|
||||||
|
<artifactId>ruoyi</artifactId>
|
||||||
|
<groupId>com.ruoyi</groupId>
|
||||||
|
<version>4.3.0</version>
|
||||||
|
</parent>
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<artifactId>ruoyi-fq</artifactId>
|
||||||
|
|
||||||
|
<description>
|
||||||
|
封铅信息管理
|
||||||
|
</description>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
|
||||||
|
<!-- 通用工具-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.ruoyi</groupId>
|
||||||
|
<artifactId>ruoyi-common</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.ruoyi</groupId>
|
||||||
|
<artifactId>ruoyi-system</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.ruoyi</groupId>
|
||||||
|
<artifactId>ruoyi-framework</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- app -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.auth0</groupId>
|
||||||
|
<artifactId>java-jwt</artifactId>
|
||||||
|
<version>3.4.0</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>cn.hutool</groupId>
|
||||||
|
<artifactId>hutool-all</artifactId>
|
||||||
|
<version>5.3.8</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
</project>
|
||||||
|
|
@ -0,0 +1,28 @@
|
||||||
|
-- 菜单 SQL
|
||||||
|
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||||
|
values('封铅登记', '3', '1', '/fq/fqTable', 'C', '0', 'fq:fqTable:view', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', '封铅登记菜单');
|
||||||
|
|
||||||
|
-- 按钮父菜单ID
|
||||||
|
SELECT @parentId := LAST_INSERT_ID();
|
||||||
|
|
||||||
|
-- 按钮 SQL
|
||||||
|
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||||
|
values('封铅登记查询', @parentId, '1', '#', 'F', '0', 'fq:fqTable:list', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', '');
|
||||||
|
|
||||||
|
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||||
|
values('封铅登记新增', @parentId, '2', '#', 'F', '0', 'fq:fqTable:add', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', '');
|
||||||
|
|
||||||
|
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||||
|
values('封铅登记修改', @parentId, '3', '#', 'F', '0', 'fq:fqTable:edit', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', '');
|
||||||
|
|
||||||
|
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||||
|
values('封铅登记删除', @parentId, '4', '#', 'F', '0', 'fq:fqTable:remove', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', '');
|
||||||
|
|
||||||
|
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||||
|
values('封铅登记导出', @parentId, '5', '#', 'F', '0', 'fq:fqTable:export', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', '');
|
||||||
|
|
||||||
|
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||||
|
values('封铅登记导入', @parentId, '6', '#', 'F', '0', 'fq:fqTable:import', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', '');
|
||||||
|
|
||||||
|
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||||
|
values('封铅登记详情', @parentId, '7', '#', 'F', '0', 'fq:fqTable:detail', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', '');
|
||||||
|
|
@ -0,0 +1,28 @@
|
||||||
|
-- 菜单 SQL
|
||||||
|
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||||
|
values('封铅袋出入库记录', '3', '1', '/fq/logs', 'C', '0', 'fq:logs:view', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', '封铅袋出入库记录菜单');
|
||||||
|
|
||||||
|
-- 按钮父菜单ID
|
||||||
|
SELECT @parentId := LAST_INSERT_ID();
|
||||||
|
|
||||||
|
-- 按钮 SQL
|
||||||
|
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||||
|
values('封铅袋出入库记录查询', @parentId, '1', '#', 'F', '0', 'fq:logs:list', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', '');
|
||||||
|
|
||||||
|
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||||
|
values('封铅袋出入库记录新增', @parentId, '2', '#', 'F', '0', 'fq:logs:add', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', '');
|
||||||
|
|
||||||
|
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||||
|
values('封铅袋出入库记录修改', @parentId, '3', '#', 'F', '0', 'fq:logs:edit', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', '');
|
||||||
|
|
||||||
|
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||||
|
values('封铅袋出入库记录删除', @parentId, '4', '#', 'F', '0', 'fq:logs:remove', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', '');
|
||||||
|
|
||||||
|
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||||
|
values('封铅袋出入库记录导出', @parentId, '5', '#', 'F', '0', 'fq:logs:export', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', '');
|
||||||
|
|
||||||
|
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||||
|
values('封铅袋出入库记录导入', @parentId, '6', '#', 'F', '0', 'fq:logs:import', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', '');
|
||||||
|
|
||||||
|
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||||
|
values('封铅袋出入库记录详情', @parentId, '7', '#', 'F', '0', 'fq:logs:detail', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', '');
|
||||||
|
|
@ -0,0 +1,180 @@
|
||||||
|
package com.ruoyi.app.controller;
|
||||||
|
|
||||||
|
import com.ruoyi.common.config.Global;
|
||||||
|
import com.ruoyi.common.constant.UserConstants;
|
||||||
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
|
import com.ruoyi.common.exception.file.InvalidExtensionException;
|
||||||
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
|
import com.ruoyi.common.utils.file.FileUploadUtils;
|
||||||
|
import com.ruoyi.common.utils.file.MimeTypeUtils;
|
||||||
|
import com.ruoyi.framework.shiro.jwt.JWTUtil;
|
||||||
|
import com.ruoyi.framework.shiro.service.SysPasswordService;
|
||||||
|
import com.ruoyi.framework.shiro.service.SysRegisterService;
|
||||||
|
import com.ruoyi.framework.util.ShiroUtils;
|
||||||
|
import com.ruoyi.system.domain.SysDept;
|
||||||
|
import com.ruoyi.system.domain.SysUser;
|
||||||
|
import com.ruoyi.system.service.ISysConfigService;
|
||||||
|
import com.ruoyi.system.service.ISysDeptService;
|
||||||
|
import com.ruoyi.system.service.ISysUserService;
|
||||||
|
import org.apache.shiro.SecurityUtils;
|
||||||
|
import org.apache.shiro.authc.AuthenticationException;
|
||||||
|
import org.apache.shiro.authc.UsernamePasswordToken;
|
||||||
|
import org.apache.shiro.subject.Subject;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* app通用类
|
||||||
|
*
|
||||||
|
* @author mario
|
||||||
|
* @date 2020-07-02
|
||||||
|
*/
|
||||||
|
@Controller
|
||||||
|
@RequestMapping("/app")
|
||||||
|
public class AppCommonController extends BaseController
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private ISysUserService userService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private SysPasswordService passwordService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ISysConfigService configService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* app登录
|
||||||
|
*/
|
||||||
|
@PostMapping("/appLogin")
|
||||||
|
@ResponseBody
|
||||||
|
@CrossOrigin
|
||||||
|
public AjaxResult appLogin(@RequestBody SysUser sysUser)
|
||||||
|
{
|
||||||
|
SysUser realUser = userService.selectUserByLoginName(sysUser.getLoginName());
|
||||||
|
|
||||||
|
if (realUser == null) {
|
||||||
|
return AjaxResult.error("用户名错误");
|
||||||
|
} else if (!passwordService.matches(realUser,sysUser.getPassword())) {
|
||||||
|
return error("密码错误");
|
||||||
|
}
|
||||||
|
String tokenStr = JWTUtil.createToken(sysUser.getUserName());
|
||||||
|
//JWTToken jwtToken = new JWTToken(token);
|
||||||
|
//提交给realm进行登入,如果错误就会抛出异常并被捕获
|
||||||
|
//Subject subject = SecurityUtils.getSubject();
|
||||||
|
//subject.login(jwtToken);
|
||||||
|
|
||||||
|
UsernamePasswordToken token = new UsernamePasswordToken(sysUser.getLoginName(), sysUser.getPassword(), false);
|
||||||
|
Subject subject = SecurityUtils.getSubject();
|
||||||
|
try
|
||||||
|
{
|
||||||
|
subject.login(token);
|
||||||
|
return AjaxResult.success("登录成功",tokenStr);
|
||||||
|
}
|
||||||
|
catch (AuthenticationException e)
|
||||||
|
{
|
||||||
|
String msg = "用户或密码错误";
|
||||||
|
if (StringUtils.isNotEmpty(e.getMessage()))
|
||||||
|
{
|
||||||
|
msg = e.getMessage();
|
||||||
|
}
|
||||||
|
return error(msg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 当前登录用户
|
||||||
|
*/
|
||||||
|
@GetMapping("/appUser")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult appUser()
|
||||||
|
{
|
||||||
|
SysUser realUser = ShiroUtils.getSysUser();
|
||||||
|
if(realUser == null)
|
||||||
|
return AjaxResult.error("未登录");
|
||||||
|
return AjaxResult.success(realUser);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 当前登录用户
|
||||||
|
*/
|
||||||
|
@GetMapping("/out")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult out()
|
||||||
|
{
|
||||||
|
ShiroUtils.logout();
|
||||||
|
return AjaxResult.success("已登出");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* app 注册
|
||||||
|
* @param user
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PostMapping("/appRegister")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult ajaxRegister(@RequestBody SysUser user)
|
||||||
|
{
|
||||||
|
|
||||||
|
if (!("true".equals(configService.selectConfigByKey("sys.account.registerUser"))))
|
||||||
|
{
|
||||||
|
return error("当前系统没有开启注册功能!");
|
||||||
|
}
|
||||||
|
if (UserConstants.USER_NAME_NOT_UNIQUE.equals(userService.checkLoginNameUnique(user.getLoginName())))
|
||||||
|
{
|
||||||
|
return error("新增用户'" + user.getLoginName() + "'失败,登录账号已存在");
|
||||||
|
}
|
||||||
|
else if (UserConstants.USER_PHONE_NOT_UNIQUE.equals(userService.checkPhoneUnique(user)))
|
||||||
|
{
|
||||||
|
return error("新增用户'" + user.getLoginName() + "'失败,手机号码已存在");
|
||||||
|
}
|
||||||
|
else if (UserConstants.USER_EMAIL_NOT_UNIQUE.equals(userService.checkEmailUnique(user)))
|
||||||
|
{
|
||||||
|
return error("新增用户'" + user.getLoginName() + "'失败,邮箱账号已存在");
|
||||||
|
}
|
||||||
|
user.setSalt(ShiroUtils.randomSalt());
|
||||||
|
user.setPassword(passwordService.encryptPassword(user.getLoginName(), user.getPassword(), user.getSalt()));
|
||||||
|
user.setCreateBy("admin");
|
||||||
|
return toAjax(userService.insertUser(user));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上传文件
|
||||||
|
*/
|
||||||
|
@PostMapping("/upload")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult upload(@RequestParam("file") MultipartFile file) throws IOException
|
||||||
|
{
|
||||||
|
// 上传并返回新文件名称
|
||||||
|
String fileName = FileUploadUtils.upload(file);
|
||||||
|
return AjaxResult.success("上传成功",fileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上传图片
|
||||||
|
*/
|
||||||
|
@PostMapping("/imgUpload")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult imgUpload(@RequestParam("file") MultipartFile img) throws IOException, InvalidExtensionException {
|
||||||
|
String[] allowedExtension = MimeTypeUtils.IMAGE_EXTENSION;
|
||||||
|
// 上传并返回新文件名称
|
||||||
|
try{
|
||||||
|
String fileName = FileUploadUtils.upload(Global.getUploadPath(),img,allowedExtension);
|
||||||
|
|
||||||
|
return AjaxResult.success("上传成功",fileName);
|
||||||
|
}catch (InvalidExtensionException e){
|
||||||
|
return AjaxResult.error("非图像文件");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,138 @@
|
||||||
|
package com.ruoyi.app.controller;
|
||||||
|
|
||||||
|
import com.ruoyi.app.service.AppCommonService;
|
||||||
|
import com.ruoyi.common.config.Global;
|
||||||
|
import com.ruoyi.common.constant.UserConstants;
|
||||||
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
|
import com.ruoyi.common.exception.file.InvalidExtensionException;
|
||||||
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
|
import com.ruoyi.common.utils.file.FileUploadUtils;
|
||||||
|
import com.ruoyi.common.utils.file.MimeTypeUtils;
|
||||||
|
import com.ruoyi.framework.shiro.jwt.JWTUtil;
|
||||||
|
import com.ruoyi.framework.shiro.service.SysPasswordService;
|
||||||
|
import com.ruoyi.framework.util.ShiroUtils;
|
||||||
|
import com.ruoyi.system.domain.SysDept;
|
||||||
|
import com.ruoyi.system.domain.SysDictData;
|
||||||
|
import com.ruoyi.system.domain.SysUser;
|
||||||
|
import com.ruoyi.system.service.ISysConfigService;
|
||||||
|
import com.ruoyi.system.service.ISysDeptService;
|
||||||
|
import com.ruoyi.system.service.ISysDictDataService;
|
||||||
|
import com.ruoyi.system.service.ISysUserService;
|
||||||
|
import org.apache.shiro.SecurityUtils;
|
||||||
|
import org.apache.shiro.authc.AuthenticationException;
|
||||||
|
import org.apache.shiro.authc.UsernamePasswordToken;
|
||||||
|
import org.apache.shiro.subject.Subject;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 封铅app接口
|
||||||
|
*
|
||||||
|
* @author mario
|
||||||
|
* @date 2020-07-02
|
||||||
|
*/
|
||||||
|
@Controller
|
||||||
|
@RequestMapping("/app/")
|
||||||
|
public class AppFqController extends BaseController
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private ISysUserService userService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private SysPasswordService passwordService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ISysConfigService configService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private AppCommonService appCommonService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ISysDictDataService sysDictDataService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 返回字典
|
||||||
|
*/
|
||||||
|
@GetMapping("/dic")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult dic()
|
||||||
|
{
|
||||||
|
Map<String,Object> dic = new HashMap<>();
|
||||||
|
//区域字典
|
||||||
|
SysDept dept = new SysDept();
|
||||||
|
dept.setParentId(200L); //区域id
|
||||||
|
List<SysDept> deptList = appCommonService.selectDeptList(dept);
|
||||||
|
|
||||||
|
dic.put("dept",deptList);
|
||||||
|
//状态字典
|
||||||
|
SysDictData parms = new SysDictData();
|
||||||
|
|
||||||
|
//封铅包状态
|
||||||
|
parms.setDictType("fq_p_status");
|
||||||
|
List <SysDictData> fq_p_status = sysDictDataService.selectDictDataList(parms);
|
||||||
|
dic.put("fq_p_status",fq_p_status);
|
||||||
|
|
||||||
|
//封铅状态
|
||||||
|
parms = new SysDictData();
|
||||||
|
parms.setDictType("fq_f_type");
|
||||||
|
List <SysDictData> fq_f_type = sysDictDataService.selectDictDataList(parms);
|
||||||
|
dic.put("fq_f_type",fq_f_type);
|
||||||
|
|
||||||
|
//封铅包日志状态
|
||||||
|
parms = new SysDictData();
|
||||||
|
parms.setDictType("fq_l_type");
|
||||||
|
List <SysDictData> fq_l_type = sysDictDataService.selectDictDataList(parms);
|
||||||
|
dic.put("fq_l_type",fq_l_type);
|
||||||
|
|
||||||
|
return AjaxResult.success("操作成功",dic);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* app登录
|
||||||
|
*/
|
||||||
|
@PostMapping("/fq/appLogin")
|
||||||
|
@ResponseBody
|
||||||
|
@CrossOrigin
|
||||||
|
public AjaxResult appLogin(@RequestBody SysUser sysUser)
|
||||||
|
{
|
||||||
|
SysUser realUser = userService.selectUserByLoginName(sysUser.getLoginName());
|
||||||
|
|
||||||
|
if (realUser == null) {
|
||||||
|
return AjaxResult.error("用户名错误");
|
||||||
|
} else if (!passwordService.matches(realUser,sysUser.getPassword())) {
|
||||||
|
return error("密码错误");
|
||||||
|
}
|
||||||
|
String tokenStr = JWTUtil.createToken(sysUser.getUserName());
|
||||||
|
//JWTToken jwtToken = new JWTToken(token);
|
||||||
|
//提交给realm进行登入,如果错误就会抛出异常并被捕获
|
||||||
|
//Subject subject = SecurityUtils.getSubject();
|
||||||
|
//subject.login(jwtToken);
|
||||||
|
|
||||||
|
UsernamePasswordToken token = new UsernamePasswordToken(sysUser.getLoginName(), sysUser.getPassword(), false);
|
||||||
|
Subject subject = SecurityUtils.getSubject();
|
||||||
|
try
|
||||||
|
{
|
||||||
|
subject.login(token);
|
||||||
|
return AjaxResult.success("登录成功",tokenStr);
|
||||||
|
}
|
||||||
|
catch (AuthenticationException e)
|
||||||
|
{
|
||||||
|
String msg = "用户或密码错误";
|
||||||
|
if (StringUtils.isNotEmpty(e.getMessage()))
|
||||||
|
{
|
||||||
|
msg = e.getMessage();
|
||||||
|
}
|
||||||
|
return error(msg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
package com.ruoyi.app.service;
|
||||||
|
|
||||||
|
import com.ruoyi.fq.domain.FqPackage;
|
||||||
|
import com.ruoyi.system.domain.SysDept;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 封铅袋Service接口
|
||||||
|
*
|
||||||
|
* @author mario
|
||||||
|
* @date 2020-07-02
|
||||||
|
*/
|
||||||
|
public interface AppCommonService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 获取部门列表
|
||||||
|
* @param dept
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public List<SysDept> selectDeptList(SysDept dept);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,57 @@
|
||||||
|
package com.ruoyi.app.service.impl;
|
||||||
|
|
||||||
|
import com.ruoyi.app.service.AppCommonService;
|
||||||
|
import com.ruoyi.common.annotation.DataScope;
|
||||||
|
import com.ruoyi.common.core.text.Convert;
|
||||||
|
import com.ruoyi.common.exception.BusinessException;
|
||||||
|
import com.ruoyi.common.utils.DateUtils;
|
||||||
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
|
import com.ruoyi.fq.domain.FqPLogs;
|
||||||
|
import com.ruoyi.fq.domain.FqPackage;
|
||||||
|
import com.ruoyi.fq.domain.FqTable;
|
||||||
|
import com.ruoyi.fq.mapper.FqPLogsMapper;
|
||||||
|
import com.ruoyi.fq.mapper.FqPackageMapper;
|
||||||
|
import com.ruoyi.fq.mapper.FqTableMapper;
|
||||||
|
import com.ruoyi.fq.service.IFqPackageService;
|
||||||
|
import com.ruoyi.framework.util.ShiroUtils;
|
||||||
|
import com.ruoyi.system.domain.SysDept;
|
||||||
|
import com.ruoyi.system.domain.SysUserRole;
|
||||||
|
import com.ruoyi.system.mapper.SysDeptMapper;
|
||||||
|
import com.ruoyi.system.mapper.SysUserRoleMapper;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.regex.Matcher;
|
||||||
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 封铅袋Service业务层处理
|
||||||
|
*
|
||||||
|
* @author mario
|
||||||
|
* @date 2020-07-07
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class AppCommonServiceImpl implements AppCommonService
|
||||||
|
{
|
||||||
|
private static final Logger log = LoggerFactory.getLogger(AppCommonServiceImpl.class);
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private SysDeptMapper sysDeptMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询部门管理数据
|
||||||
|
*
|
||||||
|
* @param dept 部门信息
|
||||||
|
* @return 部门信息集合
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<SysDept> selectDeptList(SysDept dept)
|
||||||
|
{
|
||||||
|
return sysDeptMapper.selectDeptList(dept);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,169 @@
|
||||||
|
package com.ruoyi.fq.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.ruoyi.framework.util.ShiroUtils;
|
||||||
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.ui.ModelMap;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
|
import com.ruoyi.common.annotation.Log;
|
||||||
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
|
import com.ruoyi.fq.domain.FqPLogs;
|
||||||
|
import com.ruoyi.fq.service.IFqPLogsService;
|
||||||
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 封铅袋出入库记录Controller
|
||||||
|
*
|
||||||
|
* @author mario
|
||||||
|
* @date 2020-07-09
|
||||||
|
*/
|
||||||
|
@Controller
|
||||||
|
@RequestMapping("/fq/logs")
|
||||||
|
public class FqPLogsController extends BaseController
|
||||||
|
{
|
||||||
|
private String prefix = "fq/logs";
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IFqPLogsService fqPLogsService;
|
||||||
|
|
||||||
|
@RequiresPermissions("fq:logs:view")
|
||||||
|
@GetMapping()
|
||||||
|
public String logs()
|
||||||
|
{
|
||||||
|
return prefix + "/logs";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询封铅袋出入库记录列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("fq:logs:list")
|
||||||
|
@PostMapping("/list")
|
||||||
|
@ResponseBody
|
||||||
|
public TableDataInfo list(FqPLogs fqPLogs)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<FqPLogs> list = fqPLogsService.selectFqPLogsList(fqPLogs);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出封铅袋出入库记录列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("fq:logs:export")
|
||||||
|
@Log(title = "封铅袋出入库记录", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult export(FqPLogs fqPLogs)
|
||||||
|
{
|
||||||
|
List<FqPLogs> list = fqPLogsService.selectFqPLogsList(fqPLogs);
|
||||||
|
ExcelUtil<FqPLogs> util = new ExcelUtil<FqPLogs>(FqPLogs.class);
|
||||||
|
return util.exportExcel(list, "logs");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导入封铅袋出入库记录列表
|
||||||
|
*/
|
||||||
|
@Log(title = "封铅袋出入库记录", businessType = BusinessType.IMPORT)
|
||||||
|
@RequiresPermissions("fq:logs:import")
|
||||||
|
@PostMapping("/importData")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception
|
||||||
|
{
|
||||||
|
ExcelUtil<FqPLogs> util = new ExcelUtil<FqPLogs>(FqPLogs.class);
|
||||||
|
List<FqPLogs> list = util.importExcel(file.getInputStream());
|
||||||
|
String operName = ShiroUtils.getSysUser().getLoginName();
|
||||||
|
String message = fqPLogsService.importData(list, updateSupport, operName);
|
||||||
|
return AjaxResult.success(message);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 下载模板
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("fq:logs:list")
|
||||||
|
@GetMapping("/importTemplate")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult importTemplate()
|
||||||
|
{
|
||||||
|
ExcelUtil<FqPLogs> util = new ExcelUtil<>(FqPLogs.class);
|
||||||
|
return util.importTemplateExcel("封铅袋出入库记录数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查看详细
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("fq:logs:detail")
|
||||||
|
@GetMapping("/detail/{id}")
|
||||||
|
public String detail(@PathVariable("id") String id, ModelMap mmap)
|
||||||
|
{
|
||||||
|
FqPLogs fqPLogs = fqPLogsService.selectFqPLogsById(id);
|
||||||
|
mmap.put("fqPLogs", fqPLogs);
|
||||||
|
return prefix + "/detail";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增封铅袋出入库记录
|
||||||
|
*/
|
||||||
|
@GetMapping("/add")
|
||||||
|
public String add()
|
||||||
|
{
|
||||||
|
return prefix + "/add";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增保存封铅袋出入库记录
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("fq:logs:add")
|
||||||
|
@Log(title = "封铅袋出入库记录", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping("/add")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult addSave(FqPLogs fqPLogs)
|
||||||
|
{
|
||||||
|
return toAjax(fqPLogsService.insertFqPLogs(fqPLogs));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改封铅袋出入库记录
|
||||||
|
*/
|
||||||
|
@GetMapping("/edit/{id}")
|
||||||
|
public String edit(@PathVariable("id") String id, ModelMap mmap)
|
||||||
|
{
|
||||||
|
FqPLogs fqPLogs = fqPLogsService.selectFqPLogsById(id);
|
||||||
|
mmap.put("fqPLogs", fqPLogs);
|
||||||
|
return prefix + "/edit";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改保存封铅袋出入库记录
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("fq:logs:edit")
|
||||||
|
@Log(title = "封铅袋出入库记录", businessType = BusinessType.UPDATE)
|
||||||
|
@PostMapping("/edit")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult editSave(FqPLogs fqPLogs)
|
||||||
|
{
|
||||||
|
return toAjax(fqPLogsService.updateFqPLogs(fqPLogs));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除封铅袋出入库记录
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("fq:logs:remove")
|
||||||
|
@Log(title = "封铅袋出入库记录", businessType = BusinessType.DELETE)
|
||||||
|
@PostMapping( "/remove")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult remove(String ids)
|
||||||
|
{
|
||||||
|
return toAjax(fqPLogsService.deleteFqPLogsByIds(ids));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,217 @@
|
||||||
|
package com.ruoyi.fq.controller;
|
||||||
|
|
||||||
|
import com.ruoyi.common.annotation.DataScope;
|
||||||
|
import com.ruoyi.common.annotation.Log;
|
||||||
|
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.enums.BusinessType;
|
||||||
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
|
import com.ruoyi.common.utils.security.PermissionUtils;
|
||||||
|
import com.ruoyi.fq.domain.FqPackage;
|
||||||
|
import com.ruoyi.fq.service.IFqPackageService;
|
||||||
|
import com.ruoyi.framework.util.ShiroUtils;
|
||||||
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.ui.ModelMap;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 封铅袋Controller
|
||||||
|
*
|
||||||
|
* @author mario
|
||||||
|
* @date 2020-07-02
|
||||||
|
*/
|
||||||
|
@Controller
|
||||||
|
@RequestMapping("/fq/pack")
|
||||||
|
public class FqPackageController extends BaseController
|
||||||
|
{
|
||||||
|
private String prefix = "fq/pack";
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IFqPackageService fqPackageService;
|
||||||
|
|
||||||
|
@RequiresPermissions("fq:pack:view")
|
||||||
|
@GetMapping()
|
||||||
|
public String pack()
|
||||||
|
{
|
||||||
|
return prefix + "/pack";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询封铅袋列表
|
||||||
|
*/
|
||||||
|
@DataScope(deptAlias = "p", userAlias = "p")
|
||||||
|
@RequiresPermissions("fq:pack:list")
|
||||||
|
@PostMapping("/list")
|
||||||
|
@ResponseBody
|
||||||
|
public TableDataInfo list(FqPackage fqPackage)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<FqPackage> list = fqPackageService.selectFqPackageList(fqPackage);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出封铅袋列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("fq:pack:export")
|
||||||
|
@Log(title = "封铅袋", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult export(FqPackage fqPackage)
|
||||||
|
{
|
||||||
|
List<FqPackage> list = fqPackageService.selectFqPackageList(fqPackage);
|
||||||
|
ExcelUtil<FqPackage> util = new ExcelUtil<FqPackage>(FqPackage.class);
|
||||||
|
return util.exportExcel(list, "pack");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Log(title = "封铅管理", businessType = BusinessType.IMPORT)
|
||||||
|
@RequiresPermissions("fq:pack:import")
|
||||||
|
@PostMapping("/importData")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception
|
||||||
|
{
|
||||||
|
ExcelUtil<FqPackage> util = new ExcelUtil<FqPackage>(FqPackage.class);
|
||||||
|
List<FqPackage> list = util.importExcel(file.getInputStream());
|
||||||
|
String operName = ShiroUtils.getSysUser().getLoginName();
|
||||||
|
String message = fqPackageService.importData(list, updateSupport, operName);
|
||||||
|
return AjaxResult.success(message);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 下载模板
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("fq:pack:list")
|
||||||
|
@GetMapping("/importTemplate")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult importTemplate()
|
||||||
|
{
|
||||||
|
ExcelUtil<FqPackage> util = new ExcelUtil<>(FqPackage.class);
|
||||||
|
return util.importTemplateExcel("封签袋数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增封铅袋
|
||||||
|
*/
|
||||||
|
@GetMapping("/add")
|
||||||
|
public String add()
|
||||||
|
{
|
||||||
|
return prefix + "/add";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增保存封铅袋
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("fq:pack:add")
|
||||||
|
@Log(title = "封铅袋", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping("/add")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult addSave(FqPackage fqPackage)
|
||||||
|
{
|
||||||
|
fqPackage.setCreateBy(ShiroUtils.getLoginName());
|
||||||
|
return toAjax(fqPackageService.insertFqPackage(fqPackage));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改封铅袋
|
||||||
|
*/
|
||||||
|
@GetMapping("/edit/{id}")
|
||||||
|
public String edit(@PathVariable("id") Long id, ModelMap mmap)
|
||||||
|
{
|
||||||
|
FqPackage fqPackage = fqPackageService.selectFqPackageById(id);
|
||||||
|
mmap.put("fqPackage", fqPackage);
|
||||||
|
return prefix + "/edit";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改保存封铅袋
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("fq:pack:edit")
|
||||||
|
@Log(title = "封铅袋", businessType = BusinessType.UPDATE)
|
||||||
|
@PostMapping("/edit")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult editSave(FqPackage fqPackage)
|
||||||
|
{
|
||||||
|
fqPackage.setUpdateBy(ShiroUtils.getLoginName());
|
||||||
|
return toAjax(fqPackageService.updateFqPackage(fqPackage));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除封铅袋
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("fq:pack:remove")
|
||||||
|
@Log(title = "封铅袋", businessType = BusinessType.DELETE)
|
||||||
|
@PostMapping( "/remove")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult remove(String ids)
|
||||||
|
{
|
||||||
|
return toAjax(fqPackageService.deleteFqPackageByIds(ids));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出库,修改状态
|
||||||
|
* 修改user_id
|
||||||
|
*/
|
||||||
|
@Log(title = "封铅袋", businessType = BusinessType.UPDATE)
|
||||||
|
@PostMapping("/ckSave")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult ckSave(FqPackage fqPackage,String ids)
|
||||||
|
{
|
||||||
|
fqPackage.setStatus("1");
|
||||||
|
Long user_id = fqPackage.getkUserid() == 0 ? fqPackage.getaUserid() : fqPackage.getkUserid();
|
||||||
|
fqPackage.setUserId(user_id);
|
||||||
|
return toAjax(fqPackageService.updateCkFqPackageByIds(fqPackage,ids));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 归还,修改状态
|
||||||
|
* 修改user_id
|
||||||
|
*/
|
||||||
|
@Log(title = "封铅袋", businessType = BusinessType.UPDATE)
|
||||||
|
@PostMapping("/ghSave")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult ghSave(FqPackage fqPackage,String ids)
|
||||||
|
{
|
||||||
|
return toAjax(fqPackageService.updateGhFqPackageByIds(fqPackage,ids));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改保存封铅袋
|
||||||
|
*/
|
||||||
|
@Log(title = "封铅袋", businessType = BusinessType.UPDATE)
|
||||||
|
@PostMapping("/editSaveAll")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult editSaveAll(FqPackage fqPackage,String ids)
|
||||||
|
{
|
||||||
|
return toAjax(fqPackageService.updateFqPackageByIds(fqPackage,ids));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出库
|
||||||
|
*/
|
||||||
|
@GetMapping("/ck/{ids}")
|
||||||
|
@RequiresPermissions("fq:pack:ck")
|
||||||
|
public String ck(@PathVariable("ids") String ids, ModelMap mmap)
|
||||||
|
{
|
||||||
|
//FqPackage fqPackage = fqPackageService.selectFqPackageById(id);
|
||||||
|
mmap.put("ids", ids);
|
||||||
|
return prefix + "/ck";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 归还
|
||||||
|
*/
|
||||||
|
@GetMapping("/gh/{ids}")
|
||||||
|
public String gh(@PathVariable("ids") String ids, ModelMap mmap)
|
||||||
|
{
|
||||||
|
//FqPackage fqPackage = fqPackageService.selectFqPackageById(id);
|
||||||
|
mmap.put("ids", ids);
|
||||||
|
return prefix + "/gh";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,170 @@
|
||||||
|
package com.ruoyi.fq.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.ui.ModelMap;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
|
import com.ruoyi.common.annotation.Log;
|
||||||
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
|
import com.ruoyi.fq.domain.FqTable;
|
||||||
|
import com.ruoyi.fq.service.IFqTableService;
|
||||||
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
|
import com.ruoyi.framework.util.ShiroUtils;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 封铅登记Controller
|
||||||
|
*
|
||||||
|
* @author mario
|
||||||
|
* @date 2020-07-09
|
||||||
|
*/
|
||||||
|
@Controller
|
||||||
|
@RequestMapping("/fq/fqTable")
|
||||||
|
public class FqTableController extends BaseController
|
||||||
|
{
|
||||||
|
private String prefix = "fq/fqTable";
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IFqTableService fqTableService;
|
||||||
|
|
||||||
|
@RequiresPermissions("fq:fqTable:view")
|
||||||
|
@GetMapping()
|
||||||
|
public String fqTable()
|
||||||
|
{
|
||||||
|
return prefix + "/fqTable";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询封铅登记列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("fq:fqTable:list")
|
||||||
|
@PostMapping("/list")
|
||||||
|
@ResponseBody
|
||||||
|
public TableDataInfo list(FqTable fqTable)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<FqTable> list = fqTableService.selectFqTableList(fqTable);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出封铅登记列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("fq:fqTable:export")
|
||||||
|
@Log(title = "封铅登记", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult export(FqTable fqTable)
|
||||||
|
{
|
||||||
|
List<FqTable> list = fqTableService.selectFqTableList(fqTable);
|
||||||
|
ExcelUtil<FqTable> util = new ExcelUtil<FqTable>(FqTable.class);
|
||||||
|
return util.exportExcel(list, "fqTable");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导入封铅登记列表
|
||||||
|
*/
|
||||||
|
@Log(title = "封铅登记", businessType = BusinessType.IMPORT)
|
||||||
|
@RequiresPermissions("fq:fqTable:import")
|
||||||
|
@PostMapping("/importData")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception
|
||||||
|
{
|
||||||
|
ExcelUtil<FqTable> util = new ExcelUtil<FqTable>(FqTable.class);
|
||||||
|
List<FqTable> list = util.importExcel(file.getInputStream());
|
||||||
|
String operName = ShiroUtils.getSysUser().getLoginName();
|
||||||
|
String message = fqTableService.importData(list, updateSupport, operName);
|
||||||
|
return AjaxResult.success(message);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 下载模板
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("fq:fqTable:list")
|
||||||
|
@GetMapping("/importTemplate")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult importTemplate()
|
||||||
|
{
|
||||||
|
ExcelUtil<FqTable> util = new ExcelUtil<>(FqTable.class);
|
||||||
|
return util.importTemplateExcel("封铅登记数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查看详细
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("fq:fqTable:detail")
|
||||||
|
@GetMapping("/detail/{id}")
|
||||||
|
public String detail(@PathVariable("id") Long id, ModelMap mmap)
|
||||||
|
{
|
||||||
|
FqTable fqTable = fqTableService.selectFqTableById(id);
|
||||||
|
mmap.put("fqTable", fqTable);
|
||||||
|
return prefix + "/detail";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增封铅登记
|
||||||
|
*/
|
||||||
|
@GetMapping("/add")
|
||||||
|
public String add()
|
||||||
|
{
|
||||||
|
return prefix + "/add";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增保存封铅登记
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("fq:fqTable:add")
|
||||||
|
@Log(title = "封铅登记", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping("/add")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult addSave(FqTable fqTable)
|
||||||
|
{
|
||||||
|
fqTable.setCreateBy(ShiroUtils.getLoginName());
|
||||||
|
return toAjax(fqTableService.insertFqTable(fqTable));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改封铅登记
|
||||||
|
*/
|
||||||
|
@GetMapping("/edit/{id}")
|
||||||
|
public String edit(@PathVariable("id") Long id, ModelMap mmap)
|
||||||
|
{
|
||||||
|
FqTable fqTable = fqTableService.selectFqTableById(id);
|
||||||
|
mmap.put("fqTable", fqTable);
|
||||||
|
return prefix + "/edit";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改保存封铅登记
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("fq:fqTable:edit")
|
||||||
|
@Log(title = "封铅登记", businessType = BusinessType.UPDATE)
|
||||||
|
@PostMapping("/edit")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult editSave(FqTable fqTable)
|
||||||
|
{
|
||||||
|
fqTable.setUpdateBy(ShiroUtils.getLoginName());
|
||||||
|
return toAjax(fqTableService.updateFqTable(fqTable));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除封铅登记
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("fq:fqTable:remove")
|
||||||
|
@Log(title = "封铅登记", businessType = BusinessType.DELETE)
|
||||||
|
@PostMapping( "/remove")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult remove(String ids)
|
||||||
|
{
|
||||||
|
return toAjax(fqTableService.deleteFqTableByIds(ids));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,208 @@
|
||||||
|
package com.ruoyi.fq.domain;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import com.ruoyi.system.domain.SysDept;
|
||||||
|
import com.ruoyi.system.domain.SysUser;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
import com.ruoyi.common.annotation.Excel;
|
||||||
|
import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 封铅袋出入库记录对象 fq_p_logs
|
||||||
|
*
|
||||||
|
* @author mario
|
||||||
|
* @date 2020-07-09
|
||||||
|
*/
|
||||||
|
public class FqPLogs extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** id */
|
||||||
|
@Excel(name = "id")
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
/** 封铅袋id */
|
||||||
|
@Excel(name = "封铅袋id")
|
||||||
|
private Long pId;
|
||||||
|
|
||||||
|
/** 袋内数量 */
|
||||||
|
@Excel(name = "袋内数量")
|
||||||
|
private Long num;
|
||||||
|
|
||||||
|
/** 使用数量 */
|
||||||
|
@Excel(name = "使用数量")
|
||||||
|
private Long numUse;
|
||||||
|
|
||||||
|
public Long getNumUse() {
|
||||||
|
return numUse;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNumUse(Long numUse) {
|
||||||
|
this.numUse = numUse;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 归还人 */
|
||||||
|
@Excel(name = "归还人")
|
||||||
|
private Long gUserid;
|
||||||
|
|
||||||
|
/** 归还时间 */
|
||||||
|
@Excel(name = "归还时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
|
private Date gReTime;
|
||||||
|
|
||||||
|
/** 操作类型(0 代表区域领取 1 代表区域归还 2 入库 3客户经理领取 4客户经理归还) */
|
||||||
|
@Excel(name = "操作类型(0 代表区域领取 1 代表区域归还 2 入库 3客户经理领取 4客户经理归还)")
|
||||||
|
private String optType;
|
||||||
|
|
||||||
|
/** 领取人 */
|
||||||
|
@Excel(name = "领取人")
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
|
/** 领取时间 */
|
||||||
|
@Excel(name = "领取时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
|
private Date getTime;
|
||||||
|
|
||||||
|
/** 当前区域 */
|
||||||
|
@Excel(name = "当前区域")
|
||||||
|
private Long deptId;
|
||||||
|
|
||||||
|
private SysUser user;
|
||||||
|
private SysUser gUser;
|
||||||
|
private SysDept dept;
|
||||||
|
private FqPackage fqPackage;
|
||||||
|
|
||||||
|
public SysUser getUser() {
|
||||||
|
return user;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUser(SysUser user) {
|
||||||
|
this.user = user;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SysUser getgUser() {
|
||||||
|
return gUser;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setgUser(SysUser gUser) {
|
||||||
|
this.gUser = gUser;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SysDept getDept() {
|
||||||
|
return dept;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDept(SysDept dept) {
|
||||||
|
this.dept = dept;
|
||||||
|
}
|
||||||
|
|
||||||
|
public FqPackage getFqPackage() {
|
||||||
|
return fqPackage;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFqPackage(FqPackage fqPackage) {
|
||||||
|
this.fqPackage = fqPackage;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(String id)
|
||||||
|
{
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getId()
|
||||||
|
{
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
public void setpId(Long pId)
|
||||||
|
{
|
||||||
|
this.pId = pId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getpId()
|
||||||
|
{
|
||||||
|
return pId;
|
||||||
|
}
|
||||||
|
public void setNum(Long num)
|
||||||
|
{
|
||||||
|
this.num = num;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getNum()
|
||||||
|
{
|
||||||
|
return num;
|
||||||
|
}
|
||||||
|
public void setgUserid(Long gUserid)
|
||||||
|
{
|
||||||
|
this.gUserid = gUserid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getgUserid()
|
||||||
|
{
|
||||||
|
return gUserid;
|
||||||
|
}
|
||||||
|
public void setgReTime(Date gReTime)
|
||||||
|
{
|
||||||
|
this.gReTime = gReTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getgReTime()
|
||||||
|
{
|
||||||
|
return gReTime;
|
||||||
|
}
|
||||||
|
public void setOptType(String optType)
|
||||||
|
{
|
||||||
|
this.optType = optType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getOptType()
|
||||||
|
{
|
||||||
|
return optType;
|
||||||
|
}
|
||||||
|
public void setUserId(Long userId)
|
||||||
|
{
|
||||||
|
this.userId = userId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getUserId()
|
||||||
|
{
|
||||||
|
return userId;
|
||||||
|
}
|
||||||
|
public void setGetTime(Date getTime)
|
||||||
|
{
|
||||||
|
this.getTime = getTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getGetTime()
|
||||||
|
{
|
||||||
|
return getTime;
|
||||||
|
}
|
||||||
|
public void setDeptId(Long deptId)
|
||||||
|
{
|
||||||
|
this.deptId = deptId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getDeptId()
|
||||||
|
{
|
||||||
|
return deptId;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
.append("id", getId())
|
||||||
|
.append("pId", getpId())
|
||||||
|
.append("num", getNum())
|
||||||
|
.append("numUse",getNumUse())
|
||||||
|
.append("gUserid", getgUserid())
|
||||||
|
.append("gReTime", getgReTime())
|
||||||
|
.append("optType", getOptType())
|
||||||
|
.append("userId", getUserId())
|
||||||
|
.append("getTime", getGetTime())
|
||||||
|
.append("deptId", getDeptId())
|
||||||
|
.append("createBy", getCreateBy())
|
||||||
|
.append("createTime", getCreateTime())
|
||||||
|
.append("updateBy", getUpdateBy())
|
||||||
|
.append("updateTime", getUpdateTime())
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,316 @@
|
||||||
|
package com.ruoyi.fq.domain;
|
||||||
|
|
||||||
|
import com.ruoyi.common.annotation.Excel;
|
||||||
|
import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
|
import com.ruoyi.system.domain.SysDept;
|
||||||
|
import com.ruoyi.system.domain.SysUser;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 封铅袋对象 fq_package
|
||||||
|
*
|
||||||
|
* @author mario
|
||||||
|
* @date 2020-07-02
|
||||||
|
*/
|
||||||
|
public class FqPackage extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** id */
|
||||||
|
@Excel(name = "id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/** 产品名称 */
|
||||||
|
@Excel(name = "产品名称")
|
||||||
|
private String pName;
|
||||||
|
|
||||||
|
/** 品牌名称 */
|
||||||
|
@Excel(name = "品牌名称")
|
||||||
|
private String bName;
|
||||||
|
|
||||||
|
/** 袋内数量 */
|
||||||
|
@Excel(name = "袋内数量")
|
||||||
|
private Long num;
|
||||||
|
|
||||||
|
public Long getNumUse() {
|
||||||
|
return numUse;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNumUse(Long numUse) {
|
||||||
|
this.numUse = numUse;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 使用数量 */
|
||||||
|
@Excel(name = "使用数量")
|
||||||
|
private Long numUse;
|
||||||
|
|
||||||
|
/** 颜色 */
|
||||||
|
@Excel(name = "颜色")
|
||||||
|
private String color;
|
||||||
|
|
||||||
|
/** 起始编码 */
|
||||||
|
@Excel(name = "起始编码")
|
||||||
|
private String startNo;
|
||||||
|
|
||||||
|
/** 结束编码 */
|
||||||
|
@Excel(name = "结束编码")
|
||||||
|
private String endNo;
|
||||||
|
|
||||||
|
/** 区域领取人 */
|
||||||
|
@Excel(name = "区域领取人")
|
||||||
|
private Long aUserid;
|
||||||
|
|
||||||
|
/** 区域领取时间 */
|
||||||
|
@Excel(name = "区域领取时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
|
private Date aGetTime;
|
||||||
|
|
||||||
|
/** 客户经理领取人 */
|
||||||
|
@Excel(name = "客户经理领取人")
|
||||||
|
private Long kUserid;
|
||||||
|
|
||||||
|
/** 客户经理领取时间 */
|
||||||
|
@Excel(name = "客户经理领取时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
|
private Date kGetTime;
|
||||||
|
|
||||||
|
/** 归还人 */
|
||||||
|
@Excel(name = "归还人")
|
||||||
|
private Long gUserid;
|
||||||
|
|
||||||
|
/** 归还时间 */
|
||||||
|
@Excel(name = "归还时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
|
private Date gReTime;
|
||||||
|
|
||||||
|
/** 当前拥有者 */
|
||||||
|
@Excel(name = "当前拥有者")
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
|
/** 出库区域 */
|
||||||
|
@Excel(name = "出库区域")
|
||||||
|
private Long deptId;
|
||||||
|
|
||||||
|
/** 状态(0 代表未出库 1 代表已出库 2 已归还) */
|
||||||
|
@Excel(name = "状态(0 代表未出库 1 代表已出库 2 已归还)")
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/** 删除标志(0代表存在 2代表删除) */
|
||||||
|
private String delFlag;
|
||||||
|
|
||||||
|
//区域
|
||||||
|
private SysUser aUser;
|
||||||
|
|
||||||
|
//经理
|
||||||
|
private SysUser kUser;
|
||||||
|
|
||||||
|
//区域
|
||||||
|
private SysDept dept;
|
||||||
|
|
||||||
|
public SysUser getaUser() {
|
||||||
|
return aUser;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setaUser(SysUser aUser) {
|
||||||
|
this.aUser = aUser;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SysUser getkUser() {
|
||||||
|
return kUser;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setkUser(SysUser kUser) {
|
||||||
|
this.kUser = kUser;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SysDept getDept() {
|
||||||
|
return dept;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDept(SysDept dept) {
|
||||||
|
this.dept = dept;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Long id)
|
||||||
|
{
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getId()
|
||||||
|
{
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
public void setpName(String pName)
|
||||||
|
{
|
||||||
|
this.pName = pName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getpName()
|
||||||
|
{
|
||||||
|
return pName;
|
||||||
|
}
|
||||||
|
public void setbName(String bName)
|
||||||
|
{
|
||||||
|
this.bName = bName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getbName()
|
||||||
|
{
|
||||||
|
return bName;
|
||||||
|
}
|
||||||
|
public void setNum(Long num)
|
||||||
|
{
|
||||||
|
this.num = num;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getNum()
|
||||||
|
{
|
||||||
|
return num;
|
||||||
|
}
|
||||||
|
public void setColor(String color)
|
||||||
|
{
|
||||||
|
this.color = color;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getColor()
|
||||||
|
{
|
||||||
|
return color;
|
||||||
|
}
|
||||||
|
public void setStartNo(String startNo)
|
||||||
|
{
|
||||||
|
this.startNo = startNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getStartNo()
|
||||||
|
{
|
||||||
|
return startNo;
|
||||||
|
}
|
||||||
|
public void setEndNo(String endNo)
|
||||||
|
{
|
||||||
|
this.endNo = endNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getEndNo()
|
||||||
|
{
|
||||||
|
return endNo;
|
||||||
|
}
|
||||||
|
public void setaUserid(Long aUserid)
|
||||||
|
{
|
||||||
|
this.aUserid = aUserid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getaUserid()
|
||||||
|
{
|
||||||
|
return aUserid;
|
||||||
|
}
|
||||||
|
public void setaGetTime(Date aGetTime)
|
||||||
|
{
|
||||||
|
this.aGetTime = aGetTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getaGetTime()
|
||||||
|
{
|
||||||
|
return aGetTime;
|
||||||
|
}
|
||||||
|
public void setkUserid(Long kUserid)
|
||||||
|
{
|
||||||
|
this.kUserid = kUserid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getkUserid()
|
||||||
|
{
|
||||||
|
return kUserid;
|
||||||
|
}
|
||||||
|
public void setkGetTime(Date kGetTime)
|
||||||
|
{
|
||||||
|
this.kGetTime = kGetTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getkGetTime()
|
||||||
|
{
|
||||||
|
return kGetTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setgUserid(Long gUserid)
|
||||||
|
{
|
||||||
|
this.gUserid = gUserid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getgUserid()
|
||||||
|
{
|
||||||
|
return gUserid;
|
||||||
|
}
|
||||||
|
public void setgReTime(Date gReTime)
|
||||||
|
{
|
||||||
|
this.gReTime = gReTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getgReTime()
|
||||||
|
{
|
||||||
|
return gReTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUserId(Long userId)
|
||||||
|
{
|
||||||
|
this.userId = userId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getUserId()
|
||||||
|
{
|
||||||
|
return userId;
|
||||||
|
}
|
||||||
|
public void setDeptId(Long deptId)
|
||||||
|
{
|
||||||
|
this.deptId = deptId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getDeptId()
|
||||||
|
{
|
||||||
|
return deptId;
|
||||||
|
}
|
||||||
|
public void setStatus(String status)
|
||||||
|
{
|
||||||
|
this.status = status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getStatus()
|
||||||
|
{
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
public void setDelFlag(String delFlag)
|
||||||
|
{
|
||||||
|
this.delFlag = delFlag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDelFlag()
|
||||||
|
{
|
||||||
|
return delFlag;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
.append("id", getId())
|
||||||
|
.append("pName", getpName())
|
||||||
|
.append("bName", getbName())
|
||||||
|
.append("num", getNum())
|
||||||
|
.append("numUse",getNumUse())
|
||||||
|
.append("color", getColor())
|
||||||
|
.append("startNo", getStartNo())
|
||||||
|
.append("endNo", getEndNo())
|
||||||
|
.append("remark", getRemark())
|
||||||
|
.append("aUserid", getaUserid())
|
||||||
|
.append("aGetTime", getaGetTime())
|
||||||
|
.append("kUserid", getkUserid())
|
||||||
|
.append("kGetTime", getkGetTime())
|
||||||
|
.append("userId", getUserId())
|
||||||
|
.append("deptId", getDeptId())
|
||||||
|
.append("createTime", getCreateTime())
|
||||||
|
.append("updateBy", getUpdateBy())
|
||||||
|
.append("createBy", getCreateBy())
|
||||||
|
.append("updateTime", getUpdateTime())
|
||||||
|
.append("status", getStatus())
|
||||||
|
.append("delFlag", getDelFlag())
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,225 @@
|
||||||
|
package com.ruoyi.fq.domain;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
import com.ruoyi.common.annotation.Excel;
|
||||||
|
import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 封铅登记对象 fq_table
|
||||||
|
*
|
||||||
|
* @author mario
|
||||||
|
* @date 2020-07-09
|
||||||
|
*/
|
||||||
|
public class FqTable extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** id */
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/** 客户名称 */
|
||||||
|
@Excel(name = "客户名称")
|
||||||
|
private String kName;
|
||||||
|
|
||||||
|
/** 设备名称 */
|
||||||
|
@Excel(name = "设备名称")
|
||||||
|
private String dName;
|
||||||
|
|
||||||
|
/** 设备编号 */
|
||||||
|
@Excel(name = "设备编号")
|
||||||
|
private String dNo;
|
||||||
|
|
||||||
|
/** 封签袋id */
|
||||||
|
@Excel(name = "封签袋id")
|
||||||
|
private Long pId;
|
||||||
|
|
||||||
|
/** 封铅编码 */
|
||||||
|
@Excel(name = "封铅编码")
|
||||||
|
private String fNo;
|
||||||
|
|
||||||
|
/** 加封日期 */
|
||||||
|
@Excel(name = "加封日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
|
private Date addTime;
|
||||||
|
|
||||||
|
/** 拆封日期 */
|
||||||
|
@Excel(name = "拆封日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
|
private Date splitTime;
|
||||||
|
|
||||||
|
/** 执行人签字 */
|
||||||
|
@Excel(name = "执行人签字")
|
||||||
|
private String optSign;
|
||||||
|
|
||||||
|
/** 用户签字 */
|
||||||
|
@Excel(name = "用户签字")
|
||||||
|
private String userSign;
|
||||||
|
|
||||||
|
/** 状态 */
|
||||||
|
@Excel(name = "状态")
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/** 使用时间 */
|
||||||
|
@Excel(name = "使用时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
|
private Date optTime;
|
||||||
|
|
||||||
|
/** 客户经理 */
|
||||||
|
@Excel(name = "客户经理")
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
|
/** 区域 */
|
||||||
|
@Excel(name = "区域")
|
||||||
|
private Long deptId;
|
||||||
|
|
||||||
|
public void setId(Long id)
|
||||||
|
{
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getId()
|
||||||
|
{
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
public void setkName(String kName)
|
||||||
|
{
|
||||||
|
this.kName = kName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getkName()
|
||||||
|
{
|
||||||
|
return kName;
|
||||||
|
}
|
||||||
|
public void setdName(String dName)
|
||||||
|
{
|
||||||
|
this.dName = dName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getdName()
|
||||||
|
{
|
||||||
|
return dName;
|
||||||
|
}
|
||||||
|
public void setdNo(String dNo)
|
||||||
|
{
|
||||||
|
this.dNo = dNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getdNo()
|
||||||
|
{
|
||||||
|
return dNo;
|
||||||
|
}
|
||||||
|
public void setpId(Long pId)
|
||||||
|
{
|
||||||
|
this.pId = pId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getpId()
|
||||||
|
{
|
||||||
|
return pId;
|
||||||
|
}
|
||||||
|
public void setfNo(String fNo)
|
||||||
|
{
|
||||||
|
this.fNo = fNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getfNo()
|
||||||
|
{
|
||||||
|
return fNo;
|
||||||
|
}
|
||||||
|
public void setAddTime(Date addTime)
|
||||||
|
{
|
||||||
|
this.addTime = addTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getAddTime()
|
||||||
|
{
|
||||||
|
return addTime;
|
||||||
|
}
|
||||||
|
public void setSplitTime(Date splitTime)
|
||||||
|
{
|
||||||
|
this.splitTime = splitTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getSplitTime()
|
||||||
|
{
|
||||||
|
return splitTime;
|
||||||
|
}
|
||||||
|
public void setOptSign(String optSign)
|
||||||
|
{
|
||||||
|
this.optSign = optSign;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getOptSign()
|
||||||
|
{
|
||||||
|
return optSign;
|
||||||
|
}
|
||||||
|
public void setUserSign(String userSign)
|
||||||
|
{
|
||||||
|
this.userSign = userSign;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUserSign()
|
||||||
|
{
|
||||||
|
return userSign;
|
||||||
|
}
|
||||||
|
public void setStatus(String status)
|
||||||
|
{
|
||||||
|
this.status = status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getStatus()
|
||||||
|
{
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
public void setOptTime(Date optTime)
|
||||||
|
{
|
||||||
|
this.optTime = optTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getOptTime()
|
||||||
|
{
|
||||||
|
return optTime;
|
||||||
|
}
|
||||||
|
public void setUserId(Long userId)
|
||||||
|
{
|
||||||
|
this.userId = userId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getUserId()
|
||||||
|
{
|
||||||
|
return userId;
|
||||||
|
}
|
||||||
|
public void setDeptId(Long deptId)
|
||||||
|
{
|
||||||
|
this.deptId = deptId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getDeptId()
|
||||||
|
{
|
||||||
|
return deptId;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
.append("id", getId())
|
||||||
|
.append("kName", getkName())
|
||||||
|
.append("dName", getdName())
|
||||||
|
.append("dNo", getdNo())
|
||||||
|
.append("pId", getpId())
|
||||||
|
.append("fNo", getfNo())
|
||||||
|
.append("addTime", getAddTime())
|
||||||
|
.append("splitTime", getSplitTime())
|
||||||
|
.append("optSign", getOptSign())
|
||||||
|
.append("userSign", getUserSign())
|
||||||
|
.append("status", getStatus())
|
||||||
|
.append("optTime", getOptTime())
|
||||||
|
.append("remark", getRemark())
|
||||||
|
.append("createBy", getCreateBy())
|
||||||
|
.append("createTime", getCreateTime())
|
||||||
|
.append("updateBy", getUpdateBy())
|
||||||
|
.append("updateTime", getUpdateTime())
|
||||||
|
.append("userId", getUserId())
|
||||||
|
.append("deptId", getDeptId())
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,61 @@
|
||||||
|
package com.ruoyi.fq.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ruoyi.fq.domain.FqPLogs;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 封铅袋出入库记录Mapper接口
|
||||||
|
*
|
||||||
|
* @author mario
|
||||||
|
* @date 2020-07-09
|
||||||
|
*/
|
||||||
|
public interface FqPLogsMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询封铅袋出入库记录
|
||||||
|
*
|
||||||
|
* @param id 封铅袋出入库记录ID
|
||||||
|
* @return 封铅袋出入库记录
|
||||||
|
*/
|
||||||
|
public FqPLogs selectFqPLogsById(String id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询封铅袋出入库记录列表
|
||||||
|
*
|
||||||
|
* @param fqPLogs 封铅袋出入库记录
|
||||||
|
* @return 封铅袋出入库记录集合
|
||||||
|
*/
|
||||||
|
public List<FqPLogs> selectFqPLogsList(FqPLogs fqPLogs);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增封铅袋出入库记录
|
||||||
|
*
|
||||||
|
* @param fqPLogs 封铅袋出入库记录
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertFqPLogs(FqPLogs fqPLogs);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改封铅袋出入库记录
|
||||||
|
*
|
||||||
|
* @param fqPLogs 封铅袋出入库记录
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateFqPLogs(FqPLogs fqPLogs);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除封铅袋出入库记录
|
||||||
|
*
|
||||||
|
* @param id 封铅袋出入库记录ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteFqPLogsById(String id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除封铅袋出入库记录
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteFqPLogsByIds(String[] ids);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,63 @@
|
||||||
|
package com.ruoyi.fq.mapper;
|
||||||
|
|
||||||
|
import com.ruoyi.fq.domain.FqPackage;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 封铅袋Mapper接口
|
||||||
|
*
|
||||||
|
* @author mario
|
||||||
|
* @date 2020-07-07
|
||||||
|
*/
|
||||||
|
public interface FqPackageMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询封铅袋
|
||||||
|
*
|
||||||
|
* @param id 封铅袋ID
|
||||||
|
* @return 封铅袋
|
||||||
|
*/
|
||||||
|
public FqPackage selectFqPackageById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询封铅袋列表
|
||||||
|
*
|
||||||
|
* @param fqPackage 封铅袋
|
||||||
|
* @return 封铅袋集合
|
||||||
|
*/
|
||||||
|
public List<FqPackage> selectFqPackageList(FqPackage fqPackage);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增封铅袋
|
||||||
|
*
|
||||||
|
* @param fqPackage 封铅袋
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertFqPackage(FqPackage fqPackage);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改封铅袋
|
||||||
|
*
|
||||||
|
* @param fqPackage 封铅袋
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateFqPackage(FqPackage fqPackage);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除封铅袋
|
||||||
|
*
|
||||||
|
* @param id 封铅袋ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteFqPackageById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除封铅袋
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteFqPackageByIds(String[] ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,69 @@
|
||||||
|
package com.ruoyi.fq.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ruoyi.fq.domain.FqTable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 封铅登记Mapper接口
|
||||||
|
*
|
||||||
|
* @author mario
|
||||||
|
* @date 2020-07-09
|
||||||
|
*/
|
||||||
|
public interface FqTableMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询封铅登记
|
||||||
|
*
|
||||||
|
* @param id 封铅登记ID
|
||||||
|
* @return 封铅登记
|
||||||
|
*/
|
||||||
|
public FqTable selectFqTableById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询封铅登记列表
|
||||||
|
*
|
||||||
|
* @param fqTable 封铅登记
|
||||||
|
* @return 封铅登记集合
|
||||||
|
*/
|
||||||
|
public List<FqTable> selectFqTableList(FqTable fqTable);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增封铅登记
|
||||||
|
*
|
||||||
|
* @param fqTable 封铅登记
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertFqTable(FqTable fqTable);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量新增封铅登记
|
||||||
|
*
|
||||||
|
* @param list 封铅登记
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int batchInsertFqTable(List<FqTable> list);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改封铅登记
|
||||||
|
*
|
||||||
|
* @param fqTable 封铅登记
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateFqTable(FqTable fqTable);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除封铅登记
|
||||||
|
*
|
||||||
|
* @param id 封铅登记ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteFqTableById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除封铅登记
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteFqTableByIds(String[] ids);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,71 @@
|
||||||
|
package com.ruoyi.fq.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ruoyi.fq.domain.FqPLogs;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 封铅袋出入库记录Service接口
|
||||||
|
*
|
||||||
|
* @author mario
|
||||||
|
* @date 2020-07-09
|
||||||
|
*/
|
||||||
|
public interface IFqPLogsService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询封铅袋出入库记录
|
||||||
|
*
|
||||||
|
* @param id 封铅袋出入库记录ID
|
||||||
|
* @return 封铅袋出入库记录
|
||||||
|
*/
|
||||||
|
public FqPLogs selectFqPLogsById(String id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询封铅袋出入库记录列表
|
||||||
|
*
|
||||||
|
* @param fqPLogs 封铅袋出入库记录
|
||||||
|
* @return 封铅袋出入库记录集合
|
||||||
|
*/
|
||||||
|
public List<FqPLogs> selectFqPLogsList(FqPLogs fqPLogs);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增封铅袋出入库记录
|
||||||
|
*
|
||||||
|
* @param fqPLogs 封铅袋出入库记录
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertFqPLogs(FqPLogs fqPLogs);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改封铅袋出入库记录
|
||||||
|
*
|
||||||
|
* @param fqPLogs 封铅袋出入库记录
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateFqPLogs(FqPLogs fqPLogs);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除封铅袋出入库记录
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteFqPLogsByIds(String ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除封铅袋出入库记录信息
|
||||||
|
*
|
||||||
|
* @param id 封铅袋出入库记录ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteFqPLogsById(String id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导入数据
|
||||||
|
*
|
||||||
|
* @param list 数据列表列表
|
||||||
|
* @param isUpdateSupport 是否更新支持,如果已存在,则进行更新数据
|
||||||
|
* @param operName 操作用户
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public String importData(List<FqPLogs> list, Boolean isUpdateSupport, String operName);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,92 @@
|
||||||
|
package com.ruoyi.fq.service;
|
||||||
|
|
||||||
|
import com.ruoyi.fq.domain.FqPackage;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 封铅袋Service接口
|
||||||
|
*
|
||||||
|
* @author mario
|
||||||
|
* @date 2020-07-02
|
||||||
|
*/
|
||||||
|
public interface IFqPackageService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询封铅袋
|
||||||
|
*
|
||||||
|
* @param id 封铅袋ID
|
||||||
|
* @return 封铅袋
|
||||||
|
*/
|
||||||
|
public FqPackage selectFqPackageById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询封铅袋列表
|
||||||
|
*
|
||||||
|
* @param fqPackage 封铅袋
|
||||||
|
* @return 封铅袋集合
|
||||||
|
*/
|
||||||
|
public List<FqPackage> selectFqPackageList(FqPackage fqPackage);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增封铅袋
|
||||||
|
*
|
||||||
|
* @param fqPackage 封铅袋
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertFqPackage(FqPackage fqPackage);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改封铅袋
|
||||||
|
*
|
||||||
|
* @param fqPackage 封铅袋
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateFqPackage(FqPackage fqPackage);
|
||||||
|
|
||||||
|
public int updateFqPackageByIds(FqPackage fqPackage,String ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除封铅袋
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteFqPackageByIds(String ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除封铅袋信息
|
||||||
|
*
|
||||||
|
* @param id 封铅袋ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteFqPackageById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导入数据
|
||||||
|
*
|
||||||
|
* @param list 数据列表列表
|
||||||
|
* @param isUpdateSupport 是否更新支持,如果已存在,则进行更新数据
|
||||||
|
* @param operName 操作用户
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public String importData(List<FqPackage> list, Boolean isUpdateSupport, String operName);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出库操作
|
||||||
|
* 记录日志
|
||||||
|
* @param fqPackage
|
||||||
|
* @param ids
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public int updateCkFqPackageByIds(FqPackage fqPackage,String ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 归还操作
|
||||||
|
* 记录日志
|
||||||
|
* @param fqPackage
|
||||||
|
* @param ids
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public int updateGhFqPackageByIds(FqPackage fqPackage,String ids);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,79 @@
|
||||||
|
package com.ruoyi.fq.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ruoyi.fq.domain.FqTable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 封铅登记Service接口
|
||||||
|
*
|
||||||
|
* @author mario
|
||||||
|
* @date 2020-07-09
|
||||||
|
*/
|
||||||
|
public interface IFqTableService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询封铅登记
|
||||||
|
*
|
||||||
|
* @param id 封铅登记ID
|
||||||
|
* @return 封铅登记
|
||||||
|
*/
|
||||||
|
public FqTable selectFqTableById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询封铅登记列表
|
||||||
|
*
|
||||||
|
* @param fqTable 封铅登记
|
||||||
|
* @return 封铅登记集合
|
||||||
|
*/
|
||||||
|
public List<FqTable> selectFqTableList(FqTable fqTable);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增封铅登记
|
||||||
|
*
|
||||||
|
* @param fqTable 封铅登记
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertFqTable(FqTable fqTable);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量新增封铅登记
|
||||||
|
*
|
||||||
|
* @param list 封铅登记
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int batchInsertFqTable(List<FqTable> list);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改封铅登记
|
||||||
|
*
|
||||||
|
* @param fqTable 封铅登记
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateFqTable(FqTable fqTable);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除封铅登记
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteFqTableByIds(String ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除封铅登记信息
|
||||||
|
*
|
||||||
|
* @param id 封铅登记ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteFqTableById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导入数据
|
||||||
|
*
|
||||||
|
* @param list 数据列表列表
|
||||||
|
* @param isUpdateSupport 是否更新支持,如果已存在,则进行更新数据
|
||||||
|
* @param operName 操作用户
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public String importData(List<FqTable> list, Boolean isUpdateSupport, String operName);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,162 @@
|
||||||
|
package com.ruoyi.fq.service.impl;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.ruoyi.common.exception.BusinessException;
|
||||||
|
import com.ruoyi.common.utils.DateUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.ruoyi.fq.mapper.FqPLogsMapper;
|
||||||
|
import com.ruoyi.fq.domain.FqPLogs;
|
||||||
|
import com.ruoyi.fq.service.IFqPLogsService;
|
||||||
|
import com.ruoyi.common.core.text.Convert;
|
||||||
|
import org.springframework.util.ObjectUtils;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 封铅袋出入库记录Service业务层处理
|
||||||
|
*
|
||||||
|
* @author mario
|
||||||
|
* @date 2020-07-09
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class FqPLogsServiceImpl implements IFqPLogsService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private FqPLogsMapper fqPLogsMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询封铅袋出入库记录
|
||||||
|
*
|
||||||
|
* @param id 封铅袋出入库记录ID
|
||||||
|
* @return 封铅袋出入库记录
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public FqPLogs selectFqPLogsById(String id)
|
||||||
|
{
|
||||||
|
return fqPLogsMapper.selectFqPLogsById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询封铅袋出入库记录列表
|
||||||
|
*
|
||||||
|
* @param fqPLogs 封铅袋出入库记录
|
||||||
|
* @return 封铅袋出入库记录
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<FqPLogs> selectFqPLogsList(FqPLogs fqPLogs)
|
||||||
|
{
|
||||||
|
return fqPLogsMapper.selectFqPLogsList(fqPLogs);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增封铅袋出入库记录
|
||||||
|
*
|
||||||
|
* @param fqPLogs 封铅袋出入库记录
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertFqPLogs(FqPLogs fqPLogs)
|
||||||
|
{
|
||||||
|
fqPLogs.setCreateTime(DateUtils.getNowDate());
|
||||||
|
return fqPLogsMapper.insertFqPLogs(fqPLogs);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改封铅袋出入库记录
|
||||||
|
*
|
||||||
|
* @param fqPLogs 封铅袋出入库记录
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateFqPLogs(FqPLogs fqPLogs)
|
||||||
|
{
|
||||||
|
fqPLogs.setUpdateTime(DateUtils.getNowDate());
|
||||||
|
return fqPLogsMapper.updateFqPLogs(fqPLogs);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除封铅袋出入库记录对象
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteFqPLogsByIds(String ids)
|
||||||
|
{
|
||||||
|
return fqPLogsMapper.deleteFqPLogsByIds(Convert.toStrArray(ids));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除封铅袋出入库记录信息
|
||||||
|
*
|
||||||
|
* @param id 封铅袋出入库记录ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteFqPLogsById(String id)
|
||||||
|
{
|
||||||
|
return fqPLogsMapper.deleteFqPLogsById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String importData(List<FqPLogs> list, Boolean isUpdateSupport, String operName) {
|
||||||
|
/*if (ObjectUtils.isEmpty(list) || list.size() == 0)
|
||||||
|
{
|
||||||
|
throw new BusinessException("导入数据不能为空!");
|
||||||
|
}
|
||||||
|
int successNum = 0;
|
||||||
|
int failureNum = 0;
|
||||||
|
StringBuilder successMsg = new StringBuilder();
|
||||||
|
StringBuilder failureMsg = new StringBuilder();
|
||||||
|
for (FqPLogs data : list)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// 验证是否存在
|
||||||
|
FqPLogs parms = new FqPLogs();
|
||||||
|
// parms.setStartNo(data.getStartNo());
|
||||||
|
// parms.setEndNo(data.getEndNo());
|
||||||
|
// parms.setColor(data.getColor());
|
||||||
|
// parms.setbName(data.getbName());
|
||||||
|
//List<FqPLogs> u = fqPLogsMapper.selectFqPackageList(parms);
|
||||||
|
if (u == null || u.size() == 0)
|
||||||
|
{
|
||||||
|
data.setCreateBy(operName);
|
||||||
|
this.insertFqPLogs(data);
|
||||||
|
successNum++;
|
||||||
|
successMsg.append("<br/>" + successNum + "、起始编号: " + data.getStartNo()+ " 导入成功");
|
||||||
|
}
|
||||||
|
else if (isUpdateSupport)
|
||||||
|
{
|
||||||
|
data.setUpdateBy(operName);
|
||||||
|
this.updateFqPLogs(data);
|
||||||
|
successNum++;
|
||||||
|
successMsg.append("<br/>" + successNum + "、起始编号: " + data.getStartNo() + " 更新成功");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
failureNum++;
|
||||||
|
failureMsg.append("<br/>" + failureNum + "、起始编号: " + data.getStartNo() + " 已存在");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
failureNum++;
|
||||||
|
String msg = "<br/>" + failureNum + "、起始编号: " + data.getStartNo() + " 导入失败:";
|
||||||
|
failureMsg.append(msg + e.getMessage());
|
||||||
|
log.error(msg, e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (failureNum > 0)
|
||||||
|
{
|
||||||
|
failureMsg.insert(0, "很抱歉,导入失败!共 " + failureNum + " 条数据格式不正确,错误如下:");
|
||||||
|
throw new BusinessException(failureMsg.toString());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
successMsg.insert(0, "恭喜您,数据已全部导入成功!共 " + successNum + " 条,数据如下:");
|
||||||
|
}
|
||||||
|
return successMsg.toString();*/
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,320 @@
|
||||||
|
package com.ruoyi.fq.service.impl;
|
||||||
|
|
||||||
|
import com.ruoyi.common.core.text.Convert;
|
||||||
|
import com.ruoyi.common.exception.BusinessException;
|
||||||
|
import com.ruoyi.common.utils.DateUtils;
|
||||||
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
|
import com.ruoyi.fq.domain.FqPLogs;
|
||||||
|
import com.ruoyi.fq.domain.FqPackage;
|
||||||
|
import com.ruoyi.fq.domain.FqTable;
|
||||||
|
import com.ruoyi.fq.mapper.FqPLogsMapper;
|
||||||
|
import com.ruoyi.fq.mapper.FqPackageMapper;
|
||||||
|
import com.ruoyi.fq.mapper.FqTableMapper;
|
||||||
|
import com.ruoyi.fq.service.IFqPackageService;
|
||||||
|
import com.ruoyi.framework.util.ShiroUtils;
|
||||||
|
import com.ruoyi.system.domain.SysUser;
|
||||||
|
import com.ruoyi.system.domain.SysUserRole;
|
||||||
|
import com.ruoyi.system.mapper.SysUserRoleMapper;
|
||||||
|
import com.ruoyi.system.service.ISysConfigService;
|
||||||
|
import com.ruoyi.system.service.impl.SysUserServiceImpl;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.regex.Matcher;
|
||||||
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 封铅袋Service业务层处理
|
||||||
|
*
|
||||||
|
* @author mario
|
||||||
|
* @date 2020-07-07
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class FqPackageServiceImpl implements IFqPackageService
|
||||||
|
{
|
||||||
|
private static final Logger log = LoggerFactory.getLogger(FqPackageServiceImpl.class);
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private FqPackageMapper fqPackageMapper;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private FqPLogsMapper fqPLogsMapper;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private SysUserRoleMapper sysUserRoleMapper;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private FqTableMapper fqTableMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询封铅袋
|
||||||
|
*
|
||||||
|
* @param id 封铅袋ID
|
||||||
|
* @return 封铅袋
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public FqPackage selectFqPackageById(Long id)
|
||||||
|
{
|
||||||
|
return fqPackageMapper.selectFqPackageById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询封铅袋列表
|
||||||
|
*
|
||||||
|
* @param fqPackage 封铅袋
|
||||||
|
* @return 封铅袋
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<FqPackage> selectFqPackageList(FqPackage fqPackage)
|
||||||
|
{
|
||||||
|
return fqPackageMapper.selectFqPackageList(fqPackage);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增封铅袋
|
||||||
|
*
|
||||||
|
* @param fqPackage 封铅袋
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public int insertFqPackage(FqPackage fqPackage)
|
||||||
|
{
|
||||||
|
fqPackage.setCreateTime(DateUtils.getNowDate());
|
||||||
|
fqPackageMapper.insertFqPackage(fqPackage);
|
||||||
|
//新增袋内数量封铅
|
||||||
|
String header = getHeader(fqPackage.getStartNo());
|
||||||
|
Long start = getNo(fqPackage.getStartNo());
|
||||||
|
Long num = fqPackage.getNum();
|
||||||
|
FqTable fqTable;
|
||||||
|
List<FqTable> list = new ArrayList<>();
|
||||||
|
for (int i=0; i<num; i++){
|
||||||
|
fqTable = new FqTable();
|
||||||
|
long order = start+i;
|
||||||
|
fqTable.setfNo(header+order);
|
||||||
|
fqTable.setpId(fqPackage.getId());
|
||||||
|
list.add(fqTable);
|
||||||
|
}
|
||||||
|
|
||||||
|
return fqTableMapper.batchInsertFqTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
private Long getNo(String code){
|
||||||
|
String regEx="[^0-9]";
|
||||||
|
Pattern p = Pattern.compile(regEx);
|
||||||
|
Matcher m = p.matcher(code);
|
||||||
|
return Long.valueOf(m.replaceAll("").trim());
|
||||||
|
}
|
||||||
|
|
||||||
|
private String getHeader(String code){
|
||||||
|
String regEx="[0-9]";
|
||||||
|
Pattern p = Pattern.compile(regEx);
|
||||||
|
Matcher m = p.matcher(code);
|
||||||
|
return m.replaceAll("").trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改封铅袋
|
||||||
|
*
|
||||||
|
* @param fqPackage 封铅袋
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateFqPackage(FqPackage fqPackage)
|
||||||
|
{
|
||||||
|
fqPackage.setUpdateTime(DateUtils.getNowDate());
|
||||||
|
return fqPackageMapper.updateFqPackage(fqPackage);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public int updateFqPackageByIds(FqPackage fqPackage,String ids){
|
||||||
|
if(StringUtils.isNotEmpty(ids)){
|
||||||
|
String[] idArray = ids.split(",");
|
||||||
|
fqPackage.setUpdateTime(DateUtils.getNowDate());
|
||||||
|
fqPackage.setUpdateBy(ShiroUtils.getLoginName());
|
||||||
|
for (String id:
|
||||||
|
idArray) {
|
||||||
|
fqPackage.setId(Long.valueOf(id));
|
||||||
|
fqPackageMapper.updateFqPackage(fqPackage);
|
||||||
|
}
|
||||||
|
return ids.length();
|
||||||
|
}else{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除封铅袋对象
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteFqPackageByIds(String ids)
|
||||||
|
{
|
||||||
|
return fqPackageMapper.deleteFqPackageByIds(Convert.toStrArray(ids));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除封铅袋信息
|
||||||
|
*
|
||||||
|
* @param id 封铅袋ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteFqPackageById(Long id)
|
||||||
|
{
|
||||||
|
return fqPackageMapper.deleteFqPackageById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String importData(List<FqPackage> list, Boolean isUpdateSupport, String operName) {
|
||||||
|
if (StringUtils.isNull(list) || list.size() == 0)
|
||||||
|
{
|
||||||
|
throw new BusinessException("导入数据不能为空!");
|
||||||
|
}
|
||||||
|
int successNum = 0;
|
||||||
|
int failureNum = 0;
|
||||||
|
StringBuilder successMsg = new StringBuilder();
|
||||||
|
StringBuilder failureMsg = new StringBuilder();
|
||||||
|
for (FqPackage data : list)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// 验证是否存在
|
||||||
|
FqPackage parms = new FqPackage();
|
||||||
|
parms.setStartNo(data.getStartNo());
|
||||||
|
parms.setEndNo(data.getEndNo());
|
||||||
|
parms.setColor(data.getColor());
|
||||||
|
parms.setbName(data.getbName());
|
||||||
|
List<FqPackage> u = fqPackageMapper.selectFqPackageList(parms);
|
||||||
|
if (u == null || u.size() == 0)
|
||||||
|
{
|
||||||
|
data.setCreateBy(operName);
|
||||||
|
this.insertFqPackage(data);
|
||||||
|
successNum++;
|
||||||
|
successMsg.append("<br/>" + successNum + "、起始编号: " + data.getStartNo()+ " 导入成功");
|
||||||
|
}
|
||||||
|
else if (isUpdateSupport)
|
||||||
|
{
|
||||||
|
data.setUpdateBy(operName);
|
||||||
|
this.updateFqPackage(data);
|
||||||
|
successNum++;
|
||||||
|
successMsg.append("<br/>" + successNum + "、起始编号: " + data.getStartNo() + " 更新成功");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
failureNum++;
|
||||||
|
failureMsg.append("<br/>" + failureNum + "、起始编号: " + data.getStartNo() + " 已存在");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
failureNum++;
|
||||||
|
String msg = "<br/>" + failureNum + "、起始编号: " + data.getStartNo() + " 导入失败:";
|
||||||
|
failureMsg.append(msg + e.getMessage());
|
||||||
|
log.error(msg, e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (failureNum > 0)
|
||||||
|
{
|
||||||
|
failureMsg.insert(0, "很抱歉,导入失败!共 " + failureNum + " 条数据格式不正确,错误如下:");
|
||||||
|
throw new BusinessException(failureMsg.toString());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
successMsg.insert(0, "恭喜您,数据已全部导入成功!共 " + successNum + " 条,数据如下:");
|
||||||
|
}
|
||||||
|
return successMsg.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public int updateCkFqPackageByIds(FqPackage fqPackage, String ids) {
|
||||||
|
//已出库
|
||||||
|
fqPackage.setStatus("1");
|
||||||
|
Long user_id = fqPackage.getkUserid() == 0 ? fqPackage.getaUserid() : fqPackage.getkUserid();
|
||||||
|
fqPackage.setUserId(user_id);
|
||||||
|
if(StringUtils.isNotEmpty(ids)){
|
||||||
|
String[] idArray = ids.split(",");
|
||||||
|
// fqPackage.setUpdateTime(DateUtils.getNowDate());
|
||||||
|
// fqPackage.setUpdateBy(ShiroUtils.getLoginName());
|
||||||
|
for (String id:
|
||||||
|
idArray) {
|
||||||
|
fqPackage.setId(Long.valueOf(id));
|
||||||
|
fqPackageMapper.updateFqPackage(fqPackage);
|
||||||
|
//日志
|
||||||
|
//领取日志
|
||||||
|
FqPLogs fqPLogs = new FqPLogs();
|
||||||
|
fqPLogs.setDeptId(fqPackage.getDeptId());
|
||||||
|
fqPLogs.setpId(fqPackage.getId());
|
||||||
|
fqPLogs.setNum(fqPackage.getNum());
|
||||||
|
fqPLogs.setNumUse(fqPackage.getNumUse());
|
||||||
|
fqPLogs.setUserId(fqPackage.getkUserid() == null ? fqPackage.getaUserid() : fqPackage.getkUserid());
|
||||||
|
fqPLogs.setGetTime(fqPackage.getaGetTime() == null ? fqPackage.getkGetTime() : fqPackage.getaGetTime());
|
||||||
|
fqPLogs.setOptType(fqPackage.getkUserid() == null ? "0" : "3");
|
||||||
|
fqPLogsMapper.insertFqPLogs(fqPLogs);
|
||||||
|
}
|
||||||
|
return ids.length();
|
||||||
|
}else{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public int updateGhFqPackageByIds(FqPackage fqPackage, String ids) {
|
||||||
|
//已归还
|
||||||
|
fqPackage.setStatus("2");
|
||||||
|
Long user_id = fqPackage.getkUserid() == 0 ? fqPackage.getaUserid() : fqPackage.getkUserid();
|
||||||
|
fqPackage.setUserId(user_id);
|
||||||
|
if(StringUtils.isNotEmpty(ids)){
|
||||||
|
String[] idArray = ids.split(",");
|
||||||
|
// fqPackage.setUpdateTime(DateUtils.getNowDate());
|
||||||
|
// fqPackage.setUpdateBy(ShiroUtils.getLoginName());
|
||||||
|
for (String id:
|
||||||
|
idArray) {
|
||||||
|
fqPackage.setId(Long.valueOf(id));
|
||||||
|
fqPackageMapper.updateFqPackage(fqPackage);
|
||||||
|
//日志
|
||||||
|
//归还日志
|
||||||
|
FqPLogs fqPLogs = new FqPLogs();
|
||||||
|
fqPLogs.setDeptId(fqPackage.getDeptId());
|
||||||
|
fqPLogs.setpId(fqPackage.getId());
|
||||||
|
fqPLogs.setNum(fqPackage.getNum());
|
||||||
|
fqPLogs.setNumUse(fqPackage.getNumUse());
|
||||||
|
fqPLogs.setgUserid(fqPackage.getgUserid());
|
||||||
|
fqPLogs.setGetTime(fqPackage.getgReTime());
|
||||||
|
//查看用户角色
|
||||||
|
List<SysUserRole> sysUserRoles = sysUserRoleMapper.selectUserRoleByUserId(fqPackage.getgUserid());
|
||||||
|
String type = "1";
|
||||||
|
for (SysUserRole s:
|
||||||
|
sysUserRoles) {
|
||||||
|
if(s.getRoleId() == 102){
|
||||||
|
type = "4";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
fqPLogs.setOptType(type);
|
||||||
|
fqPLogsMapper.insertFqPLogs(fqPLogs);
|
||||||
|
}
|
||||||
|
return ids.length();
|
||||||
|
}else{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
|
String a="RC20190009801";
|
||||||
|
String regEx="[0-9]";
|
||||||
|
Pattern p = Pattern.compile(regEx);
|
||||||
|
Matcher m = p.matcher(a);
|
||||||
|
System.out.println( m.replaceAll("").trim());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,173 @@
|
||||||
|
package com.ruoyi.fq.service.impl;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ruoyi.common.utils.DateUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.ruoyi.fq.mapper.FqTableMapper;
|
||||||
|
import com.ruoyi.fq.domain.FqTable;
|
||||||
|
import com.ruoyi.fq.service.IFqTableService;
|
||||||
|
import com.ruoyi.common.core.text.Convert;
|
||||||
|
import com.ruoyi.common.exception.BusinessException;
|
||||||
|
import org.springframework.util.ObjectUtils;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 封铅登记Service业务层处理
|
||||||
|
*
|
||||||
|
* @author mario
|
||||||
|
* @date 2020-07-09
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class FqTableServiceImpl implements IFqTableService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private FqTableMapper fqTableMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询封铅登记
|
||||||
|
*
|
||||||
|
* @param id 封铅登记ID
|
||||||
|
* @return 封铅登记
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public FqTable selectFqTableById(Long id)
|
||||||
|
{
|
||||||
|
return fqTableMapper.selectFqTableById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询封铅登记列表
|
||||||
|
*
|
||||||
|
* @param fqTable 封铅登记
|
||||||
|
* @return 封铅登记
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<FqTable> selectFqTableList(FqTable fqTable)
|
||||||
|
{
|
||||||
|
return fqTableMapper.selectFqTableList(fqTable);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增封铅登记
|
||||||
|
*
|
||||||
|
* @param fqTable 封铅登记
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertFqTable(FqTable fqTable)
|
||||||
|
{
|
||||||
|
fqTable.setCreateTime(DateUtils.getNowDate());
|
||||||
|
return fqTableMapper.insertFqTable(fqTable);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量新增封铅登记
|
||||||
|
*
|
||||||
|
* @param fqTable 封铅登记
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int batchInsertFqTable(List<FqTable> list)
|
||||||
|
{
|
||||||
|
return fqTableMapper.batchInsertFqTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改封铅登记
|
||||||
|
*
|
||||||
|
* @param fqTable 封铅登记
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateFqTable(FqTable fqTable)
|
||||||
|
{
|
||||||
|
fqTable.setUpdateTime(DateUtils.getNowDate());
|
||||||
|
return fqTableMapper.updateFqTable(fqTable);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除封铅登记对象
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteFqTableByIds(String ids)
|
||||||
|
{
|
||||||
|
return fqTableMapper.deleteFqTableByIds(Convert.toStrArray(ids));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除封铅登记信息
|
||||||
|
*
|
||||||
|
* @param id 封铅登记ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteFqTableById(Long id)
|
||||||
|
{
|
||||||
|
return fqTableMapper.deleteFqTableById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String importData(List<FqTable> list, Boolean isUpdateSupport, String operName) {
|
||||||
|
/*if (ObjectUtils.isEmpty(list) || list.size() == 0)
|
||||||
|
{
|
||||||
|
throw new BusinessException("导入数据不能为空!");
|
||||||
|
}
|
||||||
|
int successNum = 0;
|
||||||
|
int failureNum = 0;
|
||||||
|
StringBuilder successMsg = new StringBuilder();
|
||||||
|
StringBuilder failureMsg = new StringBuilder();
|
||||||
|
for (FqTable data : list)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// 验证是否存在
|
||||||
|
FqTable parms = new FqTable();
|
||||||
|
parms.setStartNo(data.getStartNo());
|
||||||
|
parms.setEndNo(data.getEndNo());
|
||||||
|
parms.setColor(data.getColor());
|
||||||
|
parms.setbName(data.getbName());
|
||||||
|
List<FqTable> u = fqTableMapper.selectFqPackageList(parms);
|
||||||
|
if (u == null || u.size() == 0)
|
||||||
|
{
|
||||||
|
data.setCreateBy(operName);
|
||||||
|
this.insertFqTable(data);
|
||||||
|
successNum++;
|
||||||
|
successMsg.append("<br/>" + successNum + "、起始编号: " + data.getStartNo()+ " 导入成功");
|
||||||
|
}
|
||||||
|
else if (isUpdateSupport)
|
||||||
|
{
|
||||||
|
data.setUpdateBy(operName);
|
||||||
|
this.updateFqTable(data);
|
||||||
|
successNum++;
|
||||||
|
successMsg.append("<br/>" + successNum + "、起始编号: " + data.getStartNo() + " 更新成功");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
failureNum++;
|
||||||
|
failureMsg.append("<br/>" + failureNum + "、起始编号: " + data.getStartNo() + " 已存在");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
failureNum++;
|
||||||
|
String msg = "<br/>" + failureNum + "、起始编号: " + data.getStartNo() + " 导入失败:";
|
||||||
|
failureMsg.append(msg + e.getMessage());
|
||||||
|
log.error(msg, e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (failureNum > 0)
|
||||||
|
{
|
||||||
|
failureMsg.insert(0, "很抱歉,导入失败!共 " + failureNum + " 条数据格式不正确,错误如下:");
|
||||||
|
throw new BusinessException(failureMsg.toString());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
successMsg.insert(0, "恭喜您,数据已全部导入成功!共 " + successNum + " 条,数据如下:");
|
||||||
|
}
|
||||||
|
return successMsg.toString();*/
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,128 @@
|
||||||
|
<?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.fq.mapper.FqPLogsMapper">
|
||||||
|
|
||||||
|
<resultMap type="FqPLogs" id="FqPLogsResult">
|
||||||
|
<result property="id" column="id" />
|
||||||
|
<result property="pId" column="p_id" />
|
||||||
|
<result property="num" column="num" />
|
||||||
|
<result property="numUse" column="num_use" />
|
||||||
|
<result property="gUserid" column="g_userId" />
|
||||||
|
<result property="gReTime" column="g_re_time" />
|
||||||
|
<result property="optType" column="opt_type" />
|
||||||
|
<result property="userId" column="user_id" />
|
||||||
|
<result property="getTime" column="get_time" />
|
||||||
|
<result property="deptId" column="dept_id" />
|
||||||
|
<result property="createBy" column="create_by" />
|
||||||
|
<result property="createTime" column="create_time" />
|
||||||
|
<result property="updateBy" column="update_by" />
|
||||||
|
<result property="updateTime" column="update_time" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectFqPLogsVo">
|
||||||
|
select p.id, p.p_id, p.num,p.num_use, p.g_userId, p.g_re_time, p.opt_type, p.user_id, p.get_time, p.dept_id, p.create_by, p.create_time, p.update_by, p.update_time,
|
||||||
|
d.dept_name as "dept.deptName",
|
||||||
|
u.user_name as "user.userName", u.login_name as "user.loginName",
|
||||||
|
u2.user_name as "gUser.userName", u2.login_name as "gUser.loginName",
|
||||||
|
f.start_no as "fqPackage.startNo",f.end_no as "fqPackage.endNo"
|
||||||
|
from fq_p_logs p
|
||||||
|
left join sys_dept d on p.dept_id = d.dept_id
|
||||||
|
left join sys_user u on p.user_id = u.user_id
|
||||||
|
left join sys_user u2 on p.g_userId = u2.user_id
|
||||||
|
left join fq_package f on p.p_id = f.id
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectFqPLogsList" parameterType="FqPLogs" resultMap="FqPLogsResult">
|
||||||
|
<include refid="selectFqPLogsVo"/>
|
||||||
|
<where> 1=1
|
||||||
|
<if test="pId != null and pId != ''"> and p.p_id = #{pId}</if>
|
||||||
|
<if test="num != null "> and p.num = #{num}</if>
|
||||||
|
<if test="numUse != null "> and p.num_use = #{numUse}</if>
|
||||||
|
<if test="gUserid != null "> and p.g_userId = #{gUserid}</if>
|
||||||
|
<if test="params.beginGReTime != null and params.beginGReTime != '' and params.endGReTime != null and params.endGReTime != ''"> and p.g_re_time between #{params.beginGReTime} and #{params.endGReTime}</if>
|
||||||
|
<if test="optType != null and optType != ''"> and p.opt_type = #{optType}</if>
|
||||||
|
<if test="userId != null "> and p.user_id = #{userId}</if>
|
||||||
|
<if test="params.beginGetTime != null and params.beginGetTime != '' and params.endGetTime != null and params.endGetTime != ''"> and p.get_time between #{params.beginGetTime} and #{params.endGetTime}</if>
|
||||||
|
<if test="deptId != null "> and p.dept_id = #{deptId}</if>
|
||||||
|
<if test="fqPackage != null and fqPackage.startNo != '' "> and f.start_no like concat('%', #{fqPackage.startNo}, '%')</if>
|
||||||
|
<if test="fqPackage != null and fqPackage.endNo != '' "> and f.end_no like concat('%', #{fqPackage.endNo}, '%')</if>
|
||||||
|
</where>
|
||||||
|
<!-- 数据范围过滤 -->
|
||||||
|
${params.dataScope}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectFqPLogsById" parameterType="String" resultMap="FqPLogsResult">
|
||||||
|
<include refid="selectFqPLogsVo"/>
|
||||||
|
where id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertFqPLogs" parameterType="FqPLogs">
|
||||||
|
insert into fq_p_logs
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="id != null">id,</if>
|
||||||
|
<if test="pId != null">p_id,</if>
|
||||||
|
<if test="num != null">num,</if>
|
||||||
|
<if test="numUse != null">num_use,</if>
|
||||||
|
<if test="gUserid != null">g_userId,</if>
|
||||||
|
<if test="gReTime != null">g_re_time,</if>
|
||||||
|
<if test="optType != null">opt_type,</if>
|
||||||
|
<if test="userId != null">user_id,</if>
|
||||||
|
<if test="getTime != null">get_time,</if>
|
||||||
|
<if test="deptId != null">dept_id,</if>
|
||||||
|
<if test="createBy != null">create_by,</if>
|
||||||
|
<if test="createTime != null">create_time,</if>
|
||||||
|
<if test="updateBy != null">update_by,</if>
|
||||||
|
<if test="updateTime != null">update_time,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="id != null">#{id},</if>
|
||||||
|
<if test="pId != null">#{pId},</if>
|
||||||
|
<if test="num != null">#{num},</if>
|
||||||
|
<if test="numUse != null">#{numUse},</if>
|
||||||
|
<if test="gUserid != null">#{gUserid},</if>
|
||||||
|
<if test="gReTime != null">#{gReTime},</if>
|
||||||
|
<if test="optType != null">#{optType},</if>
|
||||||
|
<if test="userId != null">#{userId},</if>
|
||||||
|
<if test="getTime != null">#{getTime},</if>
|
||||||
|
<if test="deptId != null">#{deptId},</if>
|
||||||
|
<if test="createBy != null">#{createBy},</if>
|
||||||
|
<if test="createTime != null">#{createTime},</if>
|
||||||
|
<if test="updateBy != null">#{updateBy},</if>
|
||||||
|
<if test="updateTime != null">#{updateTime},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateFqPLogs" parameterType="FqPLogs">
|
||||||
|
update fq_p_logs
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="pId != null">p_id = #{pId},</if>
|
||||||
|
<if test="num != null">num = #{num},</if>
|
||||||
|
<if test="numUse != null">num_use = #{numUse},</if>
|
||||||
|
<if test="gUserid != null">g_userId = #{gUserid},</if>
|
||||||
|
<if test="gReTime != null">g_re_time = #{gReTime},</if>
|
||||||
|
<if test="optType != null">opt_type = #{optType},</if>
|
||||||
|
<if test="userId != null">user_id = #{userId},</if>
|
||||||
|
<if test="getTime != null">get_time = #{getTime},</if>
|
||||||
|
<if test="deptId != null">dept_id = #{deptId},</if>
|
||||||
|
<if test="createBy != null">create_by = #{createBy},</if>
|
||||||
|
<if test="createTime != null">create_time = #{createTime},</if>
|
||||||
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||||
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteFqPLogsById" parameterType="String">
|
||||||
|
delete from fq_p_logs where id = #{id}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteFqPLogsByIds" parameterType="String">
|
||||||
|
delete from fq_p_logs where id in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
|
|
@ -0,0 +1,187 @@
|
||||||
|
<?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.fq.mapper.FqPackageMapper">
|
||||||
|
|
||||||
|
<resultMap type="FqPackage" id="FqPackageResult">
|
||||||
|
<result property="id" column="id" />
|
||||||
|
<result property="pName" column="p_name" />
|
||||||
|
<result property="bName" column="b_name" />
|
||||||
|
<result property="num" column="num" />
|
||||||
|
<result property="color" column="color" />
|
||||||
|
<result property="startNo" column="start_no" />
|
||||||
|
<result property="endNo" column="end_no" />
|
||||||
|
<result property="remark" column="remark" />
|
||||||
|
<result property="aUserid" column="a_userId" />
|
||||||
|
<result property="aGetTime" column="a_get_time" />
|
||||||
|
<result property="kUserid" column="k_userId" />
|
||||||
|
<result property="kGetTime" column="k_get_time" />
|
||||||
|
<result property="userId" column="user_id" />
|
||||||
|
<result property="deptId" column="dept_id" />
|
||||||
|
<result property="createTime" column="create_time" />
|
||||||
|
<result property="updateBy" column="update_by" />
|
||||||
|
<result property="createBy" column="create_by" />
|
||||||
|
<result property="updateTime" column="update_time" />
|
||||||
|
<result property="status" column="status" />
|
||||||
|
<result property="delFlag" column="del_flag" />
|
||||||
|
<association property="dept" column="dept_id" javaType="SysDept" resultMap="deptResult" />
|
||||||
|
<association property="aUser" column="a_userId" javaType="SysUser" resultMap="userResult" />
|
||||||
|
<association property="kUser" column="k_userId" javaType="SysUser" resultMap="userResult2" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<!--部门-->
|
||||||
|
<resultMap id="deptResult" type="SysDept">
|
||||||
|
<id property="deptId" column="dept_id" />
|
||||||
|
<result property="parentId" column="parent_id" />
|
||||||
|
<result property="deptName" column="dept_name" />
|
||||||
|
<result property="orderNum" column="order_num" />
|
||||||
|
<result property="leader" column="leader" />
|
||||||
|
<result property="status" column="dept_status" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
用户
|
||||||
|
-->
|
||||||
|
<resultMap id="userResult" type="SysUser">
|
||||||
|
<id property="userId" column="a_user_id" />
|
||||||
|
<result property="loginName" column="a_login_name"/>
|
||||||
|
<result property="userName" column="a_user_name" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<resultMap id="userResult2" type="SysUser">
|
||||||
|
<id property="userId" column="k_user_id" />
|
||||||
|
<result property="loginName" column="k_login_name"/>
|
||||||
|
<result property="userName" column="k_user_name" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<resultMap type="FqP" id="FqPResult">
|
||||||
|
<result property="id" column="id" />
|
||||||
|
<result property="pId" column="p_id" />
|
||||||
|
<result property="userid" column="userId" />
|
||||||
|
<result property="optTime" column="opt_time" />
|
||||||
|
<result property="status" column="status" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectFqPackageVo">
|
||||||
|
select p.id, p.p_name, p.b_name, p.num, p.color, p.start_no, p.end_no, p.remark, p.dept_id,d.dept_name, p.a_userId,
|
||||||
|
p.a_get_time, p.k_userId, p.k_get_time, p.create_time, p.update_by, p.create_by, p.update_time, p.status, p.del_flag, p.user_id,
|
||||||
|
u.user_name as a_user_name, u.login_name as a_login_name,
|
||||||
|
u2.user_name as k_user_name, u2.login_name as k_login_name
|
||||||
|
from fq_package p
|
||||||
|
left join sys_dept d on p.dept_id = d.dept_id
|
||||||
|
left join sys_user u on p.a_userId = u.user_id
|
||||||
|
left join sys_user u2 on p.k_userId = u2.user_id
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectFqPackageList" parameterType="FqPackage" resultMap="FqPackageResult">
|
||||||
|
<include refid="selectFqPackageVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="id != null "> and p.id = #{id}</if>
|
||||||
|
<if test="pName != null and pName != ''"> and p.p_name like concat('%', #{pName}, '%')</if>
|
||||||
|
<if test="bName != null and bName != ''"> and p.b_name like concat('%', #{bName}, '%')</if>
|
||||||
|
<if test="num != null "> and p.num = #{num}</if>
|
||||||
|
<if test="color != null and color != ''"> and p.color like concat('%', #{color}, '%')</if>
|
||||||
|
<if test="startNo != null and startNo != ''"> and p.start_no like concat('%', #{startNo}, '%')</if>
|
||||||
|
<if test="endNo != null and endNo != ''"> and p.end_no like concat('%', #{endNo}, '%')</if>
|
||||||
|
<if test="aUserid != null "> and p.a_userId = #{aUserid}</if>
|
||||||
|
<if test="params.beginAGetTime != null and params.beginAGetTime != '' and params.endAGetTime != null and params.endAGetTime != ''"> and p.a_get_time between #{params.beginAGetTime} and #{params.endAGetTime}</if>
|
||||||
|
<if test="kUserid != null "> and p.k_userId = #{kUserid}</if>
|
||||||
|
<if test="params.beginKGetTime != null and params.beginKGetTime != '' and params.endKGetTime != null and params.endKGetTime != ''"> and p.k_get_time between #{params.beginKGetTime} and #{params.endKGetTime}</if>
|
||||||
|
<if test="userId != null "> and p.user_id = #{userId}</if>
|
||||||
|
<if test="deptId != null "> and p.dept_id = #{deptId}</if>
|
||||||
|
<if test="status != null and status != ''"> and p.status = #{status}</if>
|
||||||
|
</where>
|
||||||
|
<!-- 数据范围过滤 -->
|
||||||
|
${params.dataScope}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectFqPackageById" parameterType="Long" resultMap="FqPackageResult">
|
||||||
|
<include refid="selectFqPackageVo"/>
|
||||||
|
where id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertFqPackage" parameterType="FqPackage" useGeneratedKeys="true" keyProperty="id">
|
||||||
|
insert into fq_package
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="pName != null">p_name,</if>
|
||||||
|
<if test="bName != null">b_name,</if>
|
||||||
|
<if test="num != null">num,</if>
|
||||||
|
<if test="color != null">color,</if>
|
||||||
|
<if test="startNo != null">start_no,</if>
|
||||||
|
<if test="endNo != null">end_no,</if>
|
||||||
|
<if test="remark != null">remark,</if>
|
||||||
|
<if test="aUserid != null">a_userId,</if>
|
||||||
|
<if test="aGetTime != null">a_get_time,</if>
|
||||||
|
<if test="kUserid != null">k_userId,</if>
|
||||||
|
<if test="kGetTime != null">k_get_time,</if>
|
||||||
|
<if test="userId != null">user_id,</if>
|
||||||
|
<if test="deptId != null">dept_id,</if>
|
||||||
|
<if test="createTime != null">create_time,</if>
|
||||||
|
<if test="updateBy != null">update_by,</if>
|
||||||
|
<if test="createBy != null">create_by,</if>
|
||||||
|
<if test="updateTime != null">update_time,</if>
|
||||||
|
<if test="status != null">status,</if>
|
||||||
|
<if test="delFlag != null">del_flag,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="pName != null">#{pName},</if>
|
||||||
|
<if test="bName != null">#{bName},</if>
|
||||||
|
<if test="num != null">#{num},</if>
|
||||||
|
<if test="color != null">#{color},</if>
|
||||||
|
<if test="startNo != null">#{startNo},</if>
|
||||||
|
<if test="endNo != null">#{endNo},</if>
|
||||||
|
<if test="remark != null">#{remark},</if>
|
||||||
|
<if test="aUserid != null">#{aUserid},</if>
|
||||||
|
<if test="aGetTime != null">#{aGetTime},</if>
|
||||||
|
<if test="kUserid != null">#{kUserid},</if>
|
||||||
|
<if test="kGetTime != null">#{kGetTime},</if>
|
||||||
|
<if test="userId != null">#{userId},</if>
|
||||||
|
<if test="deptId != null">#{deptId},</if>
|
||||||
|
<if test="createTime != null">#{createTime},</if>
|
||||||
|
<if test="updateBy != null">#{updateBy},</if>
|
||||||
|
<if test="createBy != null">#{createBy},</if>
|
||||||
|
<if test="updateTime != null">#{updateTime},</if>
|
||||||
|
<if test="status != null">#{status},</if>
|
||||||
|
<if test="delFlag != null">#{delFlag},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateFqPackage" parameterType="FqPackage">
|
||||||
|
update fq_package
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="pName != null">p_name = #{pName},</if>
|
||||||
|
<if test="bName != null">b_name = #{bName},</if>
|
||||||
|
<if test="num != null">num = #{num},</if>
|
||||||
|
<if test="color != null">color = #{color},</if>
|
||||||
|
<if test="startNo != null">start_no = #{startNo},</if>
|
||||||
|
<if test="endNo != null">end_no = #{endNo},</if>
|
||||||
|
<if test="remark != null">remark = #{remark},</if>
|
||||||
|
<if test="aUserid != null">a_userId = #{aUserid},</if>
|
||||||
|
<if test="aGetTime != null">a_get_time = #{aGetTime},</if>
|
||||||
|
<if test="kUserid != null">k_userId = #{kUserid},</if>
|
||||||
|
<if test="kGetTime != null">k_get_time = #{kGetTime},</if>
|
||||||
|
<if test="userId != null">user_id = #{userId},</if>
|
||||||
|
<if test="deptId != null">dept_id = #{deptId},</if>
|
||||||
|
<if test="createTime != null">create_time = #{createTime},</if>
|
||||||
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||||
|
<if test="createBy != null">create_by = #{createBy},</if>
|
||||||
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||||
|
<if test="status != null">status = #{status},</if>
|
||||||
|
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteFqPackageById" parameterType="Long">
|
||||||
|
delete from fq_package where id = #{id}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteFqPackageByIds" parameterType="String">
|
||||||
|
delete from fq_package where id in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
|
|
@ -0,0 +1,209 @@
|
||||||
|
<?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.fq.mapper.FqPackageMapper">
|
||||||
|
|
||||||
|
<resultMap type="FqPackage" id="FqPackageResult">
|
||||||
|
<result property="id" column="id" />
|
||||||
|
<result property="pName" column="p_name" />
|
||||||
|
<result property="bName" column="b_name" />
|
||||||
|
<result property="num" column="num" />
|
||||||
|
<result property="numUse" column="num_use" />
|
||||||
|
<result property="color" column="color" />
|
||||||
|
<result property="startNo" column="start_no" />
|
||||||
|
<result property="endNo" column="end_no" />
|
||||||
|
<result property="remark" column="remark" />
|
||||||
|
<result property="aUserid" column="a_userId" />
|
||||||
|
<result property="aGetTime" column="a_get_time" />
|
||||||
|
<result property="kUserid" column="k_userId" />
|
||||||
|
<result property="kGetTime" column="k_get_time" />
|
||||||
|
<result property="gUserid" column="g_userId" />
|
||||||
|
<result property="gReTime" column="g_re_time" />
|
||||||
|
<result property="userId" column="user_id" />
|
||||||
|
<result property="deptId" column="dept_id" />
|
||||||
|
<result property="createTime" column="create_time" />
|
||||||
|
<result property="updateBy" column="update_by" />
|
||||||
|
<result property="createBy" column="create_by" />
|
||||||
|
<result property="updateTime" column="update_time" />
|
||||||
|
<result property="status" column="status" />
|
||||||
|
<result property="delFlag" column="del_flag" />
|
||||||
|
<!--<association property="dept" column="dept_id" javaType="SysDept" resultMap="deptResult" />
|
||||||
|
<association property="aUser" column="a_userId" javaType="SysUser" resultMap="userResult" />
|
||||||
|
<association property="kUser" column="k_userId" javaType="SysUser" resultMap="userResult2" />-->
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<!--部门-->
|
||||||
|
<resultMap id="deptResult" type="SysDept">
|
||||||
|
<id property="deptId" column="dept_id" />
|
||||||
|
<result property="parentId" column="parent_id" />
|
||||||
|
<result property="deptName" column="dept_name" />
|
||||||
|
<result property="orderNum" column="order_num" />
|
||||||
|
<result property="leader" column="leader" />
|
||||||
|
<result property="status" column="dept_status" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
用户
|
||||||
|
-->
|
||||||
|
<resultMap id="userResult" type="SysUser">
|
||||||
|
<id property="userId" column="a_user_id" />
|
||||||
|
<result property="loginName" column="a_login_name"/>
|
||||||
|
<result property="userName" column="a_user_name" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<resultMap id="userResult2" type="SysUser">
|
||||||
|
<id property="userId" column="k_user_id" />
|
||||||
|
<result property="loginName" column="k_login_name"/>
|
||||||
|
<result property="userName" column="k_user_name" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectFqPackageVo">
|
||||||
|
select p.id, p.p_name, p.b_name, p.num,p.num_use, p.color, p.start_no, p.end_no, p.remark, p.dept_id, p.a_userId,
|
||||||
|
p.a_get_time, p.k_userId, p.k_get_time, p.create_time, p.update_by, p.create_by, p.update_time, p.status,
|
||||||
|
p.del_flag, p.user_id, p.g_userId, p.g_re_time,
|
||||||
|
d.dept_name as "dept.deptName",
|
||||||
|
u.user_name as "aUser.userName", u.login_name as "aUser.loginName",
|
||||||
|
u2.user_name as "kUser.userName", u2.login_name as "kUser.loginName"
|
||||||
|
from fq_package p
|
||||||
|
left join sys_dept d on p.dept_id = d.dept_id
|
||||||
|
left join sys_user u on p.a_userId = u.user_id
|
||||||
|
left join sys_user u2 on p.k_userId = u2.user_id
|
||||||
|
left join sys_user u3 on p.g_userId = u3.user_id
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectFqPackageList" parameterType="FqPackage" resultMap="FqPackageResult">
|
||||||
|
<include refid="selectFqPackageVo"/>
|
||||||
|
<where>
|
||||||
|
1=1 and p.del_flag = '0'
|
||||||
|
<if test="id != null "> and p.id = #{id}</if>
|
||||||
|
<if test="pName != null and pName != ''"> and p.p_name like concat('%', #{pName}, '%')</if>
|
||||||
|
<if test="bName != null and bName != ''"> and p.b_name like concat('%', #{bName}, '%')</if>
|
||||||
|
<if test="num != null "> and p.num = #{num}</if>
|
||||||
|
<if test="numUse != null "> and p.num_use = #{numUse}</if>
|
||||||
|
<if test="color != null and color != ''"> and p.color like concat('%', #{color}, '%')</if>
|
||||||
|
<if test="startNo != null and startNo != ''"> and p.start_no like concat('%', #{startNo}, '%')</if>
|
||||||
|
<if test="endNo != null and endNo != ''"> and p.end_no like concat('%', #{endNo}, '%')</if>
|
||||||
|
<if test="aUserid != null "> and p.a_userId = #{aUserid}</if>
|
||||||
|
<if test="params.beginAGetTime != null and params.beginAGetTime != '' and params.endAGetTime != null and params.endAGetTime != ''"> and p.a_get_time between #{params.beginAGetTime} and #{params.endAGetTime}</if>
|
||||||
|
<if test="kUserid != null "> and p.k_userId = #{kUserid}</if>
|
||||||
|
<if test="params.beginKGetTime != null and params.beginKGetTime != '' and params.endKGetTime != null and params.endKGetTime != ''"> and p.k_get_time between #{params.beginKGetTime} and #{params.endKGetTime}</if>
|
||||||
|
<if test="gUserid != null "> and g_userId = #{gUserid}</if>
|
||||||
|
<if test="params.beginGReTime != null and params.beginGReTime != '' and params.endGReTime != null and params.endGReTime != ''"> and g_re_time between #{params.beginGReTime} and #{params.endGReTime}</if>
|
||||||
|
<if test="userId != null "> and p.user_id = #{userId}</if>
|
||||||
|
<if test="deptId != null "> and p.dept_id = #{deptId}</if>
|
||||||
|
<if test="status != null and status != ''"> and p.status = #{status}</if>
|
||||||
|
</where>
|
||||||
|
<!-- 数据范围过滤 -->
|
||||||
|
${params.dataScope}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectFqPackageById" parameterType="Long" resultMap="FqPackageResult">
|
||||||
|
<include refid="selectFqPackageVo"/>
|
||||||
|
where id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertFqPackage" parameterType="FqPackage" useGeneratedKeys="true" keyProperty="id">
|
||||||
|
insert into fq_package
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="pName != null">p_name,</if>
|
||||||
|
<if test="bName != null">b_name,</if>
|
||||||
|
<if test="num != null">num,</if>
|
||||||
|
<if test="numUse != null">num_use,</if>
|
||||||
|
<if test="color != null">color,</if>
|
||||||
|
<if test="startNo != null">start_no,</if>
|
||||||
|
<if test="endNo != null">end_no,</if>
|
||||||
|
<if test="remark != null">remark,</if>
|
||||||
|
<if test="aUserid != null">a_userId,</if>
|
||||||
|
<if test="aGetTime != null">a_get_time,</if>
|
||||||
|
<if test="kUserid != null">k_userId,</if>
|
||||||
|
<if test="kGetTime != null">k_get_time,</if>
|
||||||
|
<if test="gUserid != null">g_userId,</if>
|
||||||
|
<if test="gReTime != null">g_re_time,</if>
|
||||||
|
<if test="userId != null">user_id,</if>
|
||||||
|
<if test="deptId != null">dept_id,</if>
|
||||||
|
<if test="createTime != null">create_time,</if>
|
||||||
|
<if test="updateBy != null">update_by,</if>
|
||||||
|
<if test="createBy != null">create_by,</if>
|
||||||
|
<if test="updateTime != null">update_time,</if>
|
||||||
|
<if test="status != null">status,</if>
|
||||||
|
<if test="delFlag != null">del_flag,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="pName != null">#{pName},</if>
|
||||||
|
<if test="bName != null">#{bName},</if>
|
||||||
|
<if test="num != null">#{num},</if>
|
||||||
|
<if test="numUse != null">#{numUse},</if>
|
||||||
|
<if test="color != null">#{color},</if>
|
||||||
|
<if test="startNo != null">#{startNo},</if>
|
||||||
|
<if test="endNo != null">#{endNo},</if>
|
||||||
|
<if test="remark != null">#{remark},</if>
|
||||||
|
<if test="aUserid != null">#{aUserid},</if>
|
||||||
|
<if test="aGetTime != null">#{aGetTime},</if>
|
||||||
|
<if test="kUserid != null">#{kUserid},</if>
|
||||||
|
<if test="kGetTime != null">#{kGetTime},</if>
|
||||||
|
<if test="gUserid != null">#{gUserid},</if>
|
||||||
|
<if test="gReTime != null">#{gReTime},</if>
|
||||||
|
<if test="userId != null">#{userId},</if>
|
||||||
|
<if test="deptId != null">#{deptId},</if>
|
||||||
|
<if test="createTime != null">#{createTime},</if>
|
||||||
|
<if test="updateBy != null">#{updateBy},</if>
|
||||||
|
<if test="createBy != null">#{createBy},</if>
|
||||||
|
<if test="updateTime != null">#{updateTime},</if>
|
||||||
|
<if test="status != null">#{status},</if>
|
||||||
|
<if test="delFlag != null">#{delFlag},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateFqPackage" parameterType="FqPackage">
|
||||||
|
update fq_package
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="pName != null">p_name = #{pName},</if>
|
||||||
|
<if test="bName != null">b_name = #{bName},</if>
|
||||||
|
<if test="num != null">num = #{num},</if>
|
||||||
|
<if test="numUse != null">num_use = #{numUse},</if>
|
||||||
|
<if test="color != null">color = #{color},</if>
|
||||||
|
<if test="startNo != null">start_no = #{startNo},</if>
|
||||||
|
<if test="endNo != null">end_no = #{endNo},</if>
|
||||||
|
<if test="remark != null">remark = #{remark},</if>
|
||||||
|
<if test="aUserid != null">a_userId = #{aUserid},</if>
|
||||||
|
<if test="aGetTime != null">a_get_time = #{aGetTime},</if>
|
||||||
|
<if test="kUserid != null">k_userId = #{kUserid},</if>
|
||||||
|
<if test="kGetTime != null">k_get_time = #{kGetTime},</if>
|
||||||
|
<if test="gUserid != null">g_userId = #{gUserid},</if>
|
||||||
|
<if test="gReTime != null">g_re_time = #{gReTime},</if>
|
||||||
|
<if test="userId != null">user_id = #{userId},</if>
|
||||||
|
<if test="deptId != null">dept_id = #{deptId},</if>
|
||||||
|
<if test="createTime != null">create_time = #{createTime},</if>
|
||||||
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||||
|
<if test="createBy != null">create_by = #{createBy},</if>
|
||||||
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||||
|
<if test="status != null">status = #{status},</if>
|
||||||
|
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<!--<delete id="deleteFqPackageById" parameterType="Long">
|
||||||
|
delete from fq_package where id = #{id}
|
||||||
|
</delete>-->
|
||||||
|
|
||||||
|
<!--<delete id="deleteFqPackageByIds" parameterType="String">
|
||||||
|
delete from fq_package where id in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</delete>-->
|
||||||
|
|
||||||
|
<delete id="deleteFqPackageById" parameterType="Long">
|
||||||
|
update fq_package set del_flag = '2' where id = #{id}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteFqPackageByIds" parameterType="String">
|
||||||
|
update fq_package set del_flag = '2' where id in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
|
|
@ -0,0 +1,150 @@
|
||||||
|
<?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.fq.mapper.FqTableMapper">
|
||||||
|
|
||||||
|
<resultMap type="FqTable" id="FqTableResult">
|
||||||
|
<result property="id" column="id" />
|
||||||
|
<result property="kName" column="k_name" />
|
||||||
|
<result property="dName" column="d_name" />
|
||||||
|
<result property="dNo" column="d_no" />
|
||||||
|
<result property="pId" column="p_id" />
|
||||||
|
<result property="fNo" column="f_no" />
|
||||||
|
<result property="addTime" column="add_time" />
|
||||||
|
<result property="splitTime" column="split_time" />
|
||||||
|
<result property="optSign" column="opt_sign" />
|
||||||
|
<result property="userSign" column="user_sign" />
|
||||||
|
<result property="status" column="status" />
|
||||||
|
<result property="optTime" column="opt_time" />
|
||||||
|
<result property="remark" column="remark" />
|
||||||
|
<result property="createBy" column="create_by" />
|
||||||
|
<result property="createTime" column="create_time" />
|
||||||
|
<result property="updateBy" column="update_by" />
|
||||||
|
<result property="updateTime" column="update_time" />
|
||||||
|
<result property="userId" column="user_id" />
|
||||||
|
<result property="deptId" column="dept_id" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectFqTableVo">
|
||||||
|
select id, k_name, d_name, d_no, p_id, f_no, add_time, split_time, opt_sign, user_sign, status, opt_time, remark, create_by, create_time, update_by, update_time, user_id, dept_id from fq_table
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectFqTableList" parameterType="FqTable" resultMap="FqTableResult">
|
||||||
|
<include refid="selectFqTableVo"/>
|
||||||
|
<where> 1=1
|
||||||
|
<if test="kName != null and kName != ''"> and k_name like concat('%', #{kName}, '%')</if>
|
||||||
|
<if test="dName != null and dName != ''"> and d_name like concat('%', #{dName}, '%')</if>
|
||||||
|
<if test="dNo != null and dNo != ''"> and d_no like concat('%', #{dNo}, '%')</if>
|
||||||
|
<if test="pId != null "> and p_id = #{pId}</if>
|
||||||
|
<if test="fNo != null and fNo != ''"> and f_no like concat('%', #{fNo}, '%')</if>
|
||||||
|
<if test="params.beginAddTime != null and params.beginAddTime != '' and params.endAddTime != null and params.endAddTime != ''"> and add_time between #{params.beginAddTime} and #{params.endAddTime}</if>
|
||||||
|
<if test="params.beginSplitTime != null and params.beginSplitTime != '' and params.endSplitTime != null and params.endSplitTime != ''"> and split_time between #{params.beginSplitTime} and #{params.endSplitTime}</if>
|
||||||
|
<if test="optSign != null and optSign != ''"> and opt_sign = #{optSign}</if>
|
||||||
|
<if test="userSign != null and userSign != ''"> and user_sign = #{userSign}</if>
|
||||||
|
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||||
|
<if test="params.beginOptTime != null and params.beginOptTime != '' and params.endOptTime != null and params.endOptTime != ''"> and opt_time between #{params.beginOptTime} and #{params.endOptTime}</if>
|
||||||
|
<if test="userId != null "> and user_id = #{userId}</if>
|
||||||
|
<if test="deptId != null "> and dept_id = #{deptId}</if>
|
||||||
|
</where>
|
||||||
|
<!-- 数据范围过滤 -->
|
||||||
|
${params.dataScope}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectFqTableById" parameterType="Long" resultMap="FqTableResult">
|
||||||
|
<include refid="selectFqTableVo"/>
|
||||||
|
where id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertFqTable" parameterType="FqTable" useGeneratedKeys="true" keyProperty="id">
|
||||||
|
insert into fq_table
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="kName != null">k_name,</if>
|
||||||
|
<if test="dName != null">d_name,</if>
|
||||||
|
<if test="dNo != null">d_no,</if>
|
||||||
|
<if test="pId != null">p_id,</if>
|
||||||
|
<if test="fNo != null">f_no,</if>
|
||||||
|
<if test="addTime != null">add_time,</if>
|
||||||
|
<if test="splitTime != null">split_time,</if>
|
||||||
|
<if test="optSign != null">opt_sign,</if>
|
||||||
|
<if test="userSign != null">user_sign,</if>
|
||||||
|
<if test="status != null">status,</if>
|
||||||
|
<if test="optTime != null">opt_time,</if>
|
||||||
|
<if test="remark != null">remark,</if>
|
||||||
|
<if test="createBy != null">create_by,</if>
|
||||||
|
<if test="createTime != null">create_time,</if>
|
||||||
|
<if test="updateBy != null">update_by,</if>
|
||||||
|
<if test="updateTime != null">update_time,</if>
|
||||||
|
<if test="userId != null">user_id,</if>
|
||||||
|
<if test="deptId != null">dept_id,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="kName != null">#{kName},</if>
|
||||||
|
<if test="dName != null">#{dName},</if>
|
||||||
|
<if test="dNo != null">#{dNo},</if>
|
||||||
|
<if test="pId != null">#{pId},</if>
|
||||||
|
<if test="fNo != null">#{fNo},</if>
|
||||||
|
<if test="addTime != null">#{addTime},</if>
|
||||||
|
<if test="splitTime != null">#{splitTime},</if>
|
||||||
|
<if test="optSign != null">#{optSign},</if>
|
||||||
|
<if test="userSign != null">#{userSign},</if>
|
||||||
|
<if test="status != null">#{status},</if>
|
||||||
|
<if test="optTime != null">#{optTime},</if>
|
||||||
|
<if test="remark != null">#{remark},</if>
|
||||||
|
<if test="createBy != null">#{createBy},</if>
|
||||||
|
<if test="createTime != null">#{createTime},</if>
|
||||||
|
<if test="updateBy != null">#{updateBy},</if>
|
||||||
|
<if test="updateTime != null">#{updateTime},</if>
|
||||||
|
<if test="userId != null">#{userId},</if>
|
||||||
|
<if test="deptId != null">#{deptId},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<insert id="batchInsertFqTable" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="id">
|
||||||
|
insert into fq_table (k_name, d_name, d_no, p_id, f_no, add_time, split_time, opt_sign, user_sign, status, opt_time, remark, create_by, create_time, update_by, update_time, user_id, dept_id)
|
||||||
|
values
|
||||||
|
<foreach collection="list" item="item" separator=",">
|
||||||
|
<trim prefix=" (" suffix=")" suffixOverrides=",">
|
||||||
|
#{item.kName},#{item.dName},#{item.dNo},#{item.pId},#{item.fNo},#{item.addTime},#{item.splitTime},#{item.optSign},#{item.userSign},#{item.status},#{item.optTime},
|
||||||
|
#{item.remark},#{item.createBy},#{item.createTime},#{item.updateBy},#{item.updateTime},#{item.userId},#{item.deptId}
|
||||||
|
</trim>
|
||||||
|
</foreach>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateFqTable" parameterType="FqTable">
|
||||||
|
update fq_table
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="kName != null">k_name = #{kName},</if>
|
||||||
|
<if test="dName != null">d_name = #{dName},</if>
|
||||||
|
<if test="dNo != null">d_no = #{dNo},</if>
|
||||||
|
<if test="pId != null">p_id = #{pId},</if>
|
||||||
|
<if test="fNo != null">f_no = #{fNo},</if>
|
||||||
|
<if test="addTime != null">add_time = #{addTime},</if>
|
||||||
|
<if test="splitTime != null">split_time = #{splitTime},</if>
|
||||||
|
<if test="optSign != null">opt_sign = #{optSign},</if>
|
||||||
|
<if test="userSign != null">user_sign = #{userSign},</if>
|
||||||
|
<if test="status != null">status = #{status},</if>
|
||||||
|
<if test="optTime != null">opt_time = #{optTime},</if>
|
||||||
|
<if test="remark != null">remark = #{remark},</if>
|
||||||
|
<if test="createBy != null">create_by = #{createBy},</if>
|
||||||
|
<if test="createTime != null">create_time = #{createTime},</if>
|
||||||
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||||
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||||
|
<if test="userId != null">user_id = #{userId},</if>
|
||||||
|
<if test="deptId != null">dept_id = #{deptId},</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteFqTableById" parameterType="Long">
|
||||||
|
delete from fq_table where id = #{id}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteFqTableByIds" parameterType="String">
|
||||||
|
delete from fq_table where id in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
|
|
@ -0,0 +1,134 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||||
|
<head>
|
||||||
|
<th:block th:include="include :: header('新增封铅登记')" />
|
||||||
|
<th:block th:include="include :: datetimepicker-css" />
|
||||||
|
</head>
|
||||||
|
<body class="white-bg">
|
||||||
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||||
|
<form class="form-horizontal m" id="form-fqTable-add">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">客户名称:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="kName" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">设备名称:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="dName" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">设备编号:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="dNo" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">封签袋id:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="pId" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">封铅编码:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="fNo" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">加封日期:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<div class="input-group date">
|
||||||
|
<input name="addTime" class="form-control" placeholder="yyyy-MM-dd HH:mm:ss" type="text">
|
||||||
|
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">拆封日期:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<div class="input-group date">
|
||||||
|
<input name="splitTime" class="form-control" placeholder="yyyy-MM-dd HH:mm:ss" type="text">
|
||||||
|
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">执行人签字:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="optSign" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">用户签字:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="userSign" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">状态:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<select name="status" class="form-control m-b" th:with="type=${@dict.getType('fq_f_type')}">
|
||||||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">使用时间:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<div class="input-group date">
|
||||||
|
<input name="optTime" class="form-control" placeholder="yyyy-MM-dd HH:mm:ss" type="text">
|
||||||
|
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">客户经理:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="userId" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">区域:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="deptId" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<th:block th:include="include :: footer" />
|
||||||
|
<th:block th:include="include :: datetimepicker-js" />
|
||||||
|
<script th:inline="javascript">
|
||||||
|
var prefix = ctx + "fq/fqTable"
|
||||||
|
$("#form-fqTable-add").validate({
|
||||||
|
focusCleanup: true
|
||||||
|
});
|
||||||
|
|
||||||
|
function submitHandler() {
|
||||||
|
if ($.validate.form()) {
|
||||||
|
$.operate.save(prefix + "/add", $('#form-fqTable-add').serialize());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$("input[name='addTime']").datetimepicker({
|
||||||
|
format: "yyyy-mm-dd hh:ii:ss",
|
||||||
|
//minView: "month",
|
||||||
|
autoclose: true
|
||||||
|
});
|
||||||
|
|
||||||
|
$("input[name='splitTime']").datetimepicker({
|
||||||
|
format: "yyyy-mm-dd hh:ii:ss",
|
||||||
|
//minView: "month",
|
||||||
|
autoclose: true
|
||||||
|
});
|
||||||
|
|
||||||
|
$("input[name='optTime']").datetimepicker({
|
||||||
|
format: "yyyy-mm-dd hh:ii:ss",
|
||||||
|
//minView: "month",
|
||||||
|
autoclose: true
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,135 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||||
|
<head>
|
||||||
|
<th:block th:include="include :: header('修改封铅登记')" />
|
||||||
|
<th:block th:include="include :: datetimepicker-css" />
|
||||||
|
</head>
|
||||||
|
<body class="white-bg">
|
||||||
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||||
|
<form class="form-horizontal m" id="form-fqTable-edit" th:object="${fqTable}">
|
||||||
|
<input name="id" th:field="*{id}" type="hidden">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">客户名称:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="kName" th:field="*{kName}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">设备名称:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="dName" th:field="*{dName}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">设备编号:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="dNo" th:field="*{dNo}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">封签袋id:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="pId" th:field="*{pId}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">封铅编码:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="fNo" th:field="*{fNo}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">加封日期:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<div class="input-group date">
|
||||||
|
<input name="addTime" th:value="${#dates.format(fqTable.addTime, 'yyyy-MM-dd HH:mm:ss')}" class="form-control" placeholder="yyyy-MM-dd HH:mm:ss" type="text">
|
||||||
|
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">拆封日期:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<div class="input-group date">
|
||||||
|
<input name="splitTime" th:value="${#dates.format(fqTable.splitTime, 'yyyy-MM-dd HH:mm:ss')}" class="form-control" placeholder="yyyy-MM-dd HH:mm:ss" type="text">
|
||||||
|
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">执行人签字:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="optSign" th:field="*{optSign}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">用户签字:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="userSign" th:field="*{userSign}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">状态:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<select name="status" class="form-control m-b" th:with="type=${@dict.getType('fq_f_type')}">
|
||||||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{status}"></option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">使用时间:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<div class="input-group date">
|
||||||
|
<input name="optTime" th:value="${#dates.format(fqTable.optTime, 'yyyy-MM-dd HH:mm:ss')}" class="form-control" placeholder="yyyy-MM-dd HH:mm:ss" type="text">
|
||||||
|
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">客户经理:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="userId" th:field="*{userId}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">区域:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="deptId" th:field="*{deptId}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<th:block th:include="include :: footer" />
|
||||||
|
<th:block th:include="include :: datetimepicker-js" />
|
||||||
|
<script th:inline="javascript">
|
||||||
|
var prefix = ctx + "fq/fqTable";
|
||||||
|
$("#form-fqTable-edit").validate({
|
||||||
|
focusCleanup: true
|
||||||
|
});
|
||||||
|
|
||||||
|
function submitHandler() {
|
||||||
|
if ($.validate.form()) {
|
||||||
|
$.operate.save(prefix + "/edit", $('#form-fqTable-edit').serialize());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$("input[name='addTime']").datetimepicker({
|
||||||
|
format: "yyyy-mm-dd hh:ii:ss",
|
||||||
|
//minView: "month",
|
||||||
|
autoclose: true
|
||||||
|
});
|
||||||
|
|
||||||
|
$("input[name='splitTime']").datetimepicker({
|
||||||
|
format: "yyyy-mm-dd hh:ii:ss",
|
||||||
|
//minView: "month",
|
||||||
|
autoclose: true
|
||||||
|
});
|
||||||
|
|
||||||
|
$("input[name='optTime']").datetimepicker({
|
||||||
|
format: "yyyy-mm-dd hh:ii:ss",
|
||||||
|
//minView: "month",
|
||||||
|
autoclose: true
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,135 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||||
|
<head>
|
||||||
|
<th:block th:include="include :: header('修改封铅登记')" />
|
||||||
|
<th:block th:include="include :: datetimepicker-css" />
|
||||||
|
</head>
|
||||||
|
<body class="white-bg">
|
||||||
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||||
|
<form class="form-horizontal m" id="form-fqTable-edit" th:object="${fqTable}">
|
||||||
|
<input name="id" th:field="*{id}" type="hidden">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">客户名称:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="kName" th:field="*{kName}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">设备名称:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="dName" th:field="*{dName}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">设备编号:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="dNo" th:field="*{dNo}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">封签袋id:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="pId" th:field="*{pId}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">封铅编码:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="fNo" th:field="*{fNo}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">加封日期:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<div class="input-group date">
|
||||||
|
<input name="addTime" th:value="${#dates.format(fqTable.addTime, 'yyyy-MM-dd HH:mm:ss')}" class="form-control" placeholder="yyyy-MM-dd HH:mm:ss" type="text">
|
||||||
|
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">拆封日期:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<div class="input-group date">
|
||||||
|
<input name="splitTime" th:value="${#dates.format(fqTable.splitTime, 'yyyy-MM-dd HH:mm:ss')}" class="form-control" placeholder="yyyy-MM-dd HH:mm:ss" type="text">
|
||||||
|
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">执行人签字:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="optSign" th:field="*{optSign}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">用户签字:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="userSign" th:field="*{userSign}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">状态:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<select name="status" class="form-control m-b" th:with="type=${@dict.getType('fq_f_type')}">
|
||||||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{status}"></option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">使用时间:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<div class="input-group date">
|
||||||
|
<input name="optTime" th:value="${#dates.format(fqTable.optTime, 'yyyy-MM-dd HH:mm:ss')}" class="form-control" placeholder="yyyy-MM-dd HH:mm:ss" type="text">
|
||||||
|
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">客户经理:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="userId" th:field="*{userId}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">区域:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="deptId" th:field="*{deptId}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<th:block th:include="include :: footer" />
|
||||||
|
<th:block th:include="include :: datetimepicker-js" />
|
||||||
|
<script th:inline="javascript">
|
||||||
|
var prefix = ctx + "fq/fqTable";
|
||||||
|
$("#form-fqTable-edit").validate({
|
||||||
|
focusCleanup: true
|
||||||
|
});
|
||||||
|
|
||||||
|
function submitHandler() {
|
||||||
|
if ($.validate.form()) {
|
||||||
|
$.operate.save(prefix + "/edit", $('#form-fqTable-edit').serialize());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$("input[name='addTime']").datetimepicker({
|
||||||
|
format: "yyyy-mm-dd hh:ii:ss",
|
||||||
|
//minView: "month",
|
||||||
|
autoclose: true
|
||||||
|
});
|
||||||
|
|
||||||
|
$("input[name='splitTime']").datetimepicker({
|
||||||
|
format: "yyyy-mm-dd hh:ii:ss",
|
||||||
|
//minView: "month",
|
||||||
|
autoclose: true
|
||||||
|
});
|
||||||
|
|
||||||
|
$("input[name='optTime']").datetimepicker({
|
||||||
|
format: "yyyy-mm-dd hh:ii:ss",
|
||||||
|
//minView: "month",
|
||||||
|
autoclose: true
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,223 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||||
|
<head>
|
||||||
|
<th:block th:include="include :: header('封铅登记列表')" />
|
||||||
|
</head>
|
||||||
|
<body class="gray-bg">
|
||||||
|
<div class="container-div">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 search-collapse">
|
||||||
|
<form id="formId">
|
||||||
|
<div class="select-list">
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<label>客户名称:</label>
|
||||||
|
<input type="text" name="kName"/>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<label>设备名称:</label>
|
||||||
|
<input type="text" name="dName"/>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<label>设备编号:</label>
|
||||||
|
<input type="text" name="dNo"/>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<label>封签袋id:</label>
|
||||||
|
<input type="text" name="pId"/>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<label>封铅编码:</label>
|
||||||
|
<input type="text" name="fNo"/>
|
||||||
|
</li>
|
||||||
|
<li class="select-time">
|
||||||
|
<label>加封日期:</label>
|
||||||
|
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginAddTime]"/>
|
||||||
|
<span>-</span>
|
||||||
|
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endAddTime]"/>
|
||||||
|
</li>
|
||||||
|
<li class="select-time">
|
||||||
|
<label>拆封日期:</label>
|
||||||
|
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginSplitTime]"/>
|
||||||
|
<span>-</span>
|
||||||
|
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endSplitTime]"/>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<label>执行人签字:</label>
|
||||||
|
<input type="text" name="optSign"/>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<label>用户签字:</label>
|
||||||
|
<input type="text" name="userSign"/>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<label>状态:</label>
|
||||||
|
<select name="status" th:with="type=${@dict.getType('fq_f_type')}">
|
||||||
|
<option value="">所有</option>
|
||||||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||||
|
</select>
|
||||||
|
</li>
|
||||||
|
<li class="select-time">
|
||||||
|
<label>使用时间:</label>
|
||||||
|
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginOptTime]"/>
|
||||||
|
<span>-</span>
|
||||||
|
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endOptTime]"/>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<label>客户经理:</label>
|
||||||
|
<input type="text" name="userId"/>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<label>区域:</label>
|
||||||
|
<input type="text" name="deptId"/>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
|
||||||
|
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="btn-group-sm" id="toolbar" role="group">
|
||||||
|
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="fq:fqTable:add">
|
||||||
|
<i class="fa fa-plus"></i> 添加
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="fq:fqTable:edit">
|
||||||
|
<i class="fa fa-edit"></i> 修改
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="fq:fqTable:remove">
|
||||||
|
<i class="fa fa-remove"></i> 删除
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-info" onclick="$.table.importExcel()" shiro:hasPermission="fq:fqTable:import">
|
||||||
|
<i class="fa fa-upload"></i> 导入
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="fq:fqTable:export">
|
||||||
|
<i class="fa fa-download"></i> 导出
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 select-table table-striped">
|
||||||
|
<table id="bootstrap-table"></table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<th:block th:include="include :: footer" />
|
||||||
|
<script th:inline="javascript">
|
||||||
|
var editFlag = [[${@permission.hasPermi('fq:fqTable:edit')}]];
|
||||||
|
var removeFlag = [[${@permission.hasPermi('fq:fqTable:remove')}]];
|
||||||
|
var statusDatas = [[${@dict.getType('fq_f_type')}]];
|
||||||
|
var prefix = ctx + "fq/fqTable";
|
||||||
|
|
||||||
|
$(function() {
|
||||||
|
var options = {
|
||||||
|
url: prefix + "/list",
|
||||||
|
createUrl: prefix + "/add",
|
||||||
|
updateUrl: prefix + "/edit/{id}",
|
||||||
|
removeUrl: prefix + "/remove",
|
||||||
|
exportUrl: prefix + "/export",
|
||||||
|
importUrl: prefix + "/importData",
|
||||||
|
importTemplateUrl: prefix + "/importTemplate",
|
||||||
|
detailUrl: prefix + "/detail/{id}",
|
||||||
|
sortName: "createTime",
|
||||||
|
sortOrder: "desc",
|
||||||
|
modalName: "封铅登记",
|
||||||
|
columns: [{
|
||||||
|
checkbox: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'id',
|
||||||
|
title: 'id',
|
||||||
|
visible: false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'kName',
|
||||||
|
title: '客户名称'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'dName',
|
||||||
|
title: '设备名称'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'dNo',
|
||||||
|
title: '设备编号'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'pId',
|
||||||
|
title: '封签袋id'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'fNo',
|
||||||
|
title: '封铅编码'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'addTime',
|
||||||
|
title: '加封日期'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'splitTime',
|
||||||
|
title: '拆封日期'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'optSign',
|
||||||
|
title: '执行人签字'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'userSign',
|
||||||
|
title: '用户签字'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'status',
|
||||||
|
title: '状态',
|
||||||
|
formatter: function(value, row, index) {
|
||||||
|
return $.table.selectDictLabel(statusDatas, value);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'optTime',
|
||||||
|
title: '使用时间'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'remark',
|
||||||
|
title: '备注'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'userId',
|
||||||
|
title: '客户经理'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'deptId',
|
||||||
|
title: '区域'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
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-info btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.detail(\'' + row.id + '\')"><i class="fa fa-search"></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('');
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
};
|
||||||
|
$.table.init(options);
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
<!-- 导入区域 -->
|
||||||
|
<script id="importTpl" type="text/template">
|
||||||
|
<form enctype="multipart/form-data" class="mt20 mb10">
|
||||||
|
<div class="col-xs-offset-1">
|
||||||
|
<input type="file" id="file" name="file"/>
|
||||||
|
<div class="mt10 pt5">
|
||||||
|
<input type="checkbox" id="updateSupport" name="updateSupport" title="如果封铅登记已经存在,更新这条数据。"> 是否更新已经存在的封铅袋
|
||||||
|
<a onclick="$.table.importTemplate()" class="btn btn-default btn-xs"><i class="fa fa-file-excel-o"></i> 下载模板</a>
|
||||||
|
</div>
|
||||||
|
<font color="red" class="pull-left mt10">
|
||||||
|
提示:仅允许导入“xls”或“xlsx”格式文件!
|
||||||
|
</font>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</script>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,101 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||||
|
<head>
|
||||||
|
<th:block th:include="include :: header('新增封铅袋出入库记录')" />
|
||||||
|
<th:block th:include="include :: datetimepicker-css" />
|
||||||
|
</head>
|
||||||
|
<body class="white-bg">
|
||||||
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||||
|
<form class="form-horizontal m" id="form-logs-add">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">封铅袋id:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="pId" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">袋内数量:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="num" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">使用数量:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="numUse" class="form-control" type="text" value="0" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">归还人:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="gUserid" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">归还时间:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<div class="input-group date">
|
||||||
|
<input name="gReTime" class="form-control" placeholder="yyyy-MM-dd HH:mm:ss" type="text">
|
||||||
|
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">操作类型(0 代表区域领取 1 代表区域归还 2 入库 3客户经理领取 4客户经理归还):</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<select name="optType" class="form-control m-b" th:with="type=${@dict.getType('fq_l_type')}">
|
||||||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">领取人:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="userId" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">领取时间:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<div class="input-group date">
|
||||||
|
<input name="getTime" class="form-control" placeholder="yyyy-MM-dd HH:mm:ss" type="text">
|
||||||
|
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">当前区域:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="deptId" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<th:block th:include="include :: footer" />
|
||||||
|
<th:block th:include="include :: datetimepicker-js" />
|
||||||
|
<script th:inline="javascript">
|
||||||
|
var prefix = ctx + "fq/logs"
|
||||||
|
$("#form-logs-add").validate({
|
||||||
|
focusCleanup: true
|
||||||
|
});
|
||||||
|
|
||||||
|
function submitHandler() {
|
||||||
|
if ($.validate.form()) {
|
||||||
|
$.operate.save(prefix + "/add", $('#form-logs-add').serialize());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$("input[name='gReTime']").datetimepicker({
|
||||||
|
format: "yyyy-mm-dd hh:ii:ss",
|
||||||
|
//minView: "month",
|
||||||
|
autoclose: true
|
||||||
|
});
|
||||||
|
|
||||||
|
$("input[name='getTime']").datetimepicker({
|
||||||
|
format: "yyyy-mm-dd hh:ii:ss",
|
||||||
|
//minView: "month",
|
||||||
|
autoclose: true
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,96 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||||
|
<head>
|
||||||
|
<th:block th:include="include :: header('修改封铅袋出入库记录')" />
|
||||||
|
<th:block th:include="include :: datetimepicker-css" />
|
||||||
|
</head>
|
||||||
|
<body class="white-bg">
|
||||||
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||||
|
<form class="form-horizontal m" id="form-logs-edit" th:object="${fqPLogs}">
|
||||||
|
<input name="id" th:field="*{id}" type="hidden">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">封铅袋id:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="pId" th:field="*{pId}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">袋内数量:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="num" th:field="*{num}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">归还人:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="gUserid" th:field="*{gUserid}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">归还时间:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<div class="input-group date">
|
||||||
|
<input name="gReTime" th:value="${#dates.format(fqPLogs.gReTime, 'yyyy-MM-dd HH:mm:ss')}" class="form-control" placeholder="yyyy-MM-dd HH:mm:ss" type="text">
|
||||||
|
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">操作类型(0 代表区域领取 1 代表区域归还 2 入库 3客户经理领取 4客户经理归还):</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<select name="optType" class="form-control m-b" th:with="type=${@dict.getType('fq_l_type')}">
|
||||||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{optType}"></option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">领取人:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="userId" th:field="*{userId}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">领取时间:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<div class="input-group date">
|
||||||
|
<input name="getTime" th:value="${#dates.format(fqPLogs.getTime, 'yyyy-MM-dd HH:mm:ss')}" class="form-control" placeholder="yyyy-MM-dd HH:mm:ss" type="text">
|
||||||
|
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">当前区域:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="deptId" th:field="*{deptId}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<th:block th:include="include :: footer" />
|
||||||
|
<th:block th:include="include :: datetimepicker-js" />
|
||||||
|
<script th:inline="javascript">
|
||||||
|
var prefix = ctx + "fq/logs";
|
||||||
|
$("#form-logs-edit").validate({
|
||||||
|
focusCleanup: true
|
||||||
|
});
|
||||||
|
|
||||||
|
function submitHandler() {
|
||||||
|
if ($.validate.form()) {
|
||||||
|
$.operate.save(prefix + "/edit", $('#form-logs-edit').serialize());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$("input[name='gReTime']").datetimepicker({
|
||||||
|
format: "yyyy-mm-dd hh:ii:ss",
|
||||||
|
//minView: "month",
|
||||||
|
autoclose: true
|
||||||
|
});
|
||||||
|
|
||||||
|
$("input[name='getTime']").datetimepicker({
|
||||||
|
format: "yyyy-mm-dd hh:ii:ss",
|
||||||
|
//minView: "month",
|
||||||
|
autoclose: true
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,96 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||||
|
<head>
|
||||||
|
<th:block th:include="include :: header('修改封铅袋出入库记录')" />
|
||||||
|
<th:block th:include="include :: datetimepicker-css" />
|
||||||
|
</head>
|
||||||
|
<body class="white-bg">
|
||||||
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||||
|
<form class="form-horizontal m" id="form-logs-edit" th:object="${fqPLogs}">
|
||||||
|
<input name="id" th:field="*{id}" type="hidden">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">封铅袋id:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="pId" th:field="*{pId}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">袋内数量:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="num" th:field="*{num}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">归还人:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="gUserid" th:field="*{gUserid}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">归还时间:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<div class="input-group date">
|
||||||
|
<input name="gReTime" th:value="${#dates.format(fqPLogs.gReTime, 'yyyy-MM-dd HH:mm:ss')}" class="form-control" placeholder="yyyy-MM-dd HH:mm:ss" type="text">
|
||||||
|
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">操作类型(0 代表区域领取 1 代表区域归还 2 入库 3客户经理领取 4客户经理归还):</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<select name="optType" class="form-control m-b" th:with="type=${@dict.getType('fq_l_type')}">
|
||||||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{optType}"></option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">领取人:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="userId" th:field="*{userId}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">领取时间:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<div class="input-group date">
|
||||||
|
<input name="getTime" th:value="${#dates.format(fqPLogs.getTime, 'yyyy-MM-dd HH:mm:ss')}" class="form-control" placeholder="yyyy-MM-dd HH:mm:ss" type="text">
|
||||||
|
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">当前区域:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="deptId" th:field="*{deptId}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<th:block th:include="include :: footer" />
|
||||||
|
<th:block th:include="include :: datetimepicker-js" />
|
||||||
|
<script th:inline="javascript">
|
||||||
|
var prefix = ctx + "fq/logs";
|
||||||
|
$("#form-logs-edit").validate({
|
||||||
|
focusCleanup: true
|
||||||
|
});
|
||||||
|
|
||||||
|
function submitHandler() {
|
||||||
|
if ($.validate.form()) {
|
||||||
|
$.operate.save(prefix + "/edit", $('#form-logs-edit').serialize());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$("input[name='gReTime']").datetimepicker({
|
||||||
|
format: "yyyy-mm-dd hh:ii:ss",
|
||||||
|
//minView: "month",
|
||||||
|
autoclose: true
|
||||||
|
});
|
||||||
|
|
||||||
|
$("input[name='getTime']").datetimepicker({
|
||||||
|
format: "yyyy-mm-dd hh:ii:ss",
|
||||||
|
//minView: "month",
|
||||||
|
autoclose: true
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,261 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||||
|
<head>
|
||||||
|
<th:block th:include="include :: header('封铅袋出入库记录列表')" />
|
||||||
|
</head>
|
||||||
|
<body class="gray-bg">
|
||||||
|
<div class="container-div">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 search-collapse">
|
||||||
|
<form id="formId">
|
||||||
|
<div class="select-list">
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<label>封铅袋编码:</label>
|
||||||
|
<input type="text" name="pId"/>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<label>袋内数量:</label>
|
||||||
|
<input type="text" name="num"/>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<label>起始编码:</label>
|
||||||
|
<input type="text" name="fqPackage.startNo"/>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<label>结束编码:</label>
|
||||||
|
<input type="text" name="fqPackage.endNo"/>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<label>归还人:</label>
|
||||||
|
<input type="hidden" id="gUserid" name="kUserid"/>
|
||||||
|
<input type="text" id="c" name="c" onclick="selectUserC('1,2,100')"/>
|
||||||
|
</li>
|
||||||
|
<li class="select-time">
|
||||||
|
<label>归还时间:</label>
|
||||||
|
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginGReTime]"/>
|
||||||
|
<span>-</span>
|
||||||
|
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endGReTime]"/>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<label>操作类型:</label>
|
||||||
|
<select name="optType" th:with="type=${@dict.getType('fq_l_type')}">
|
||||||
|
<option value="">所有</option>
|
||||||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||||
|
</select>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<label>领取人:</label>
|
||||||
|
<input type="hidden" id="userId" name="userId"/>
|
||||||
|
<input type="text" id="a" name="a" onclick="selectUserA('1,2,100')"/>
|
||||||
|
</li>
|
||||||
|
<li class="select-time">
|
||||||
|
<label>领取时间:</label>
|
||||||
|
<input type="text" class="time-input" id="startTime2" placeholder="开始时间" name="params[beginGetTime]"/>
|
||||||
|
<span>-</span>
|
||||||
|
<input type="text" class="time-input" id="endTime2" placeholder="结束时间" name="params[endGetTime]"/>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<label>当前区域:</label>
|
||||||
|
<input name="deptId" type="hidden" id="treeId"/>
|
||||||
|
<input name="deptName" onclick="selectDeptTree()" id="treeName" type="text" placeholder="请选择区域" class="form-control">
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
|
||||||
|
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!--<div class="btn-group-sm" id="toolbar" role="group">
|
||||||
|
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="fq:logs:add">
|
||||||
|
<i class="fa fa-plus"></i> 添加
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="fq:logs:edit">
|
||||||
|
<i class="fa fa-edit"></i> 修改
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="fq:logs:remove">
|
||||||
|
<i class="fa fa-remove"></i> 删除
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-info" onclick="$.table.importExcel()" shiro:hasPermission="fq:logs:import">
|
||||||
|
<i class="fa fa-upload"></i> 导入
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="fq:logs:export">
|
||||||
|
<i class="fa fa-download"></i> 导出
|
||||||
|
</a>
|
||||||
|
</div>-->
|
||||||
|
<div class="col-sm-12 select-table table-striped">
|
||||||
|
<table id="bootstrap-table"></table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<th:block th:include="include :: footer" />
|
||||||
|
<script th:inline="javascript">
|
||||||
|
var editFlag = [[${@permission.hasPermi('fq:logs:edit')}]];
|
||||||
|
var removeFlag = [[${@permission.hasPermi('fq:logs:remove')}]];
|
||||||
|
var optTypeDatas = [[${@dict.getType('fq_l_type')}]];
|
||||||
|
var prefix = ctx + "fq/logs";
|
||||||
|
|
||||||
|
/*用户管理-新增-选择部门树*/
|
||||||
|
function selectDeptTree() {
|
||||||
|
var treeId = $("#treeId").val();
|
||||||
|
var deptId = $.common.isEmpty(treeId) ? "201" : $("#treeId").val();
|
||||||
|
var url = ctx + "system/dept/selectDeptTree/" + deptId;
|
||||||
|
var options = {
|
||||||
|
title: '选择区域',
|
||||||
|
width: "380",
|
||||||
|
url: url,
|
||||||
|
callBack: selectDeptTreeHandler
|
||||||
|
};
|
||||||
|
$.modal.openOptions(options);
|
||||||
|
}
|
||||||
|
|
||||||
|
function selectDeptTreeHandler(index, layero){
|
||||||
|
var tree = layero.find("iframe")[0].contentWindow.$._tree;
|
||||||
|
if ($.tree.notAllowParents(tree)) {
|
||||||
|
var body = layer.getChildFrame('body', index);
|
||||||
|
$("#treeId").val(body.find('#treeId').val());
|
||||||
|
$("#treeName").val(body.find('#treeName').val());
|
||||||
|
layer.close(index);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 分配用户-选择用户 */
|
||||||
|
// r 角色id
|
||||||
|
function selectUserA(r) {
|
||||||
|
var options = {
|
||||||
|
title: '选择用户',
|
||||||
|
//width: "380",
|
||||||
|
url: '/system/role/authUser/selectUserCommonExt/' + r, // 101
|
||||||
|
callBack: selectUserHandlerA
|
||||||
|
};
|
||||||
|
$.modal.openOptions(options);
|
||||||
|
}
|
||||||
|
|
||||||
|
function selectUserHandlerA(index){
|
||||||
|
var body = layer.getChildFrame('body', index);
|
||||||
|
$("#a").val(body.find('#userName').val());
|
||||||
|
$("#userid").val(body.find('#userId').val());
|
||||||
|
layer.close(index);
|
||||||
|
}
|
||||||
|
|
||||||
|
function selectUserC(r) {
|
||||||
|
var options = {
|
||||||
|
title: '选择用户',
|
||||||
|
//width: "380",
|
||||||
|
//排除某些角色
|
||||||
|
url: '/system/role/authUser/selectUserCommonExt/' + r, // 101
|
||||||
|
callBack: selectUserHandlerC
|
||||||
|
};
|
||||||
|
$.modal.openOptions(options);
|
||||||
|
}
|
||||||
|
|
||||||
|
function selectUserHandlerC(index){
|
||||||
|
var body = layer.getChildFrame('body', index);
|
||||||
|
$("#c").val(body.find('#userName').val());
|
||||||
|
$("#gUserid").val(body.find('#userId').val());
|
||||||
|
layer.close(index);
|
||||||
|
}
|
||||||
|
|
||||||
|
$(function() {
|
||||||
|
var options = {
|
||||||
|
url: prefix + "/list",
|
||||||
|
createUrl: prefix + "/add",
|
||||||
|
updateUrl: prefix + "/edit/{id}",
|
||||||
|
removeUrl: prefix + "/remove",
|
||||||
|
exportUrl: prefix + "/export",
|
||||||
|
importUrl: prefix + "/importData",
|
||||||
|
importTemplateUrl: prefix + "/importTemplate",
|
||||||
|
detailUrl: prefix + "/detail/{id}",
|
||||||
|
sortName: "createTime",
|
||||||
|
sortOrder: "desc",
|
||||||
|
modalName: "封铅袋出入库记录",
|
||||||
|
columns: [{
|
||||||
|
checkbox: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'id',
|
||||||
|
title: 'id',
|
||||||
|
visible: false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'pId',
|
||||||
|
title: '封铅袋id'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'fqPackage.startNo',
|
||||||
|
title: '起始编码'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'fqPackage.endNo',
|
||||||
|
title: '结束编码'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'num',
|
||||||
|
title: '袋内数量'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'numUse',
|
||||||
|
title: '使用数量'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'gUserid',
|
||||||
|
title: '归还人'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'gReTime',
|
||||||
|
title: '归还时间'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'optType',
|
||||||
|
title: '操作类型',
|
||||||
|
formatter: function(value, row, index) {
|
||||||
|
return $.table.selectDictLabel(optTypeDatas, value);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'userId',
|
||||||
|
title: '领取人'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'getTime',
|
||||||
|
title: '领取时间'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'deptId',
|
||||||
|
title: '当前区域'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
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-info btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.detail(\'' + row.id + '\')"><i class="fa fa-search"></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('');
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
};
|
||||||
|
$.table.init(options);
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
<!-- 导入区域 -->
|
||||||
|
<script id="importTpl" type="text/template">
|
||||||
|
<form enctype="multipart/form-data" class="mt20 mb10">
|
||||||
|
<div class="col-xs-offset-1">
|
||||||
|
<input type="file" id="file" name="file"/>
|
||||||
|
<div class="mt10 pt5">
|
||||||
|
<input type="checkbox" id="updateSupport" name="updateSupport" title="如果封铅袋出入库记录已经存在,更新这条数据。"> 是否更新已经存在的封铅袋
|
||||||
|
<a onclick="$.table.importTemplate()" class="btn btn-default btn-xs"><i class="fa fa-file-excel-o"></i> 下载模板</a>
|
||||||
|
</div>
|
||||||
|
<font color="red" class="pull-left mt10">
|
||||||
|
提示:仅允许导入“xls”或“xlsx”格式文件!
|
||||||
|
</font>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</script>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,133 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||||
|
<head>
|
||||||
|
<th:block th:include="include :: header('新增封铅袋')" />
|
||||||
|
<th:block th:include="include :: datetimepicker-css" />
|
||||||
|
</head>
|
||||||
|
<body class="white-bg">
|
||||||
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||||
|
<form class="form-horizontal m" id="form-pack-add">
|
||||||
|
<h4 class="form-header h4">封铅袋信息</h4>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">描述:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="remark" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">产品名称:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="pName" class="form-control" type="text" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">品牌名称:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="bName" class="form-control" type="text" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">袋内数量:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="num" class="form-control" type="text" value="100" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">使用数量:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="numUse" class="form-control" type="text" value="0" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">颜色:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="color" class="form-control" type="text" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">起始编码:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="startNo" class="form-control" type="text" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">结束编码:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="endNo" class="form-control" type="text" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!--<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">出库区域:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="deptId" class="form-control" type="text" readonly>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">区域领取人:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="aUserid" class="form-control" type="text" readonly>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">区域领取时间:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<div class="input-group date">
|
||||||
|
<input name="aGetTime" class="form-control" placeholder="yyyy-MM-dd HH:mm:ss" type="text" readonly>
|
||||||
|
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">客户经理领取人:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="kUserid" class="form-control" type="text" readonly>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">客户经理领取时间:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<div class="input-group date">
|
||||||
|
<input name="kGetTime" class="form-control" placeholder="yyyy-MM-dd HH:mm:ss" type="text" readonly>
|
||||||
|
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">状态:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<div class="radio-box" th:each="dict : ${@dict.getType('fq_p_status')}">
|
||||||
|
<input type="radio" th:id="${'status_' + dict.dictCode}" name="status" th:value="${dict.dictValue}" th:checked="${dict.default}">
|
||||||
|
<label th:for="${'status_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>-->
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<th:block th:include="include :: footer" />
|
||||||
|
<th:block th:include="include :: datetimepicker-js" />
|
||||||
|
<script th:inline="javascript">
|
||||||
|
var prefix = ctx + "fq/pack"
|
||||||
|
$("#form-pack-add").validate({
|
||||||
|
focusCleanup: true
|
||||||
|
});
|
||||||
|
|
||||||
|
function submitHandler() {
|
||||||
|
if ($.validate.form()) {
|
||||||
|
$.operate.save(prefix + "/add", $('#form-pack-add').serialize());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$("input[name='aGetTime']").datetimepicker({
|
||||||
|
format: "yyyy-mm-dd hh:ii:ss",
|
||||||
|
minView: "month",
|
||||||
|
autoclose: true
|
||||||
|
});
|
||||||
|
|
||||||
|
$("input[name='kGetTime']").datetimepicker({
|
||||||
|
format: "yyyy-mm-dd hh:ii:ss",
|
||||||
|
minView: "month",
|
||||||
|
autoclose: true
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,145 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||||
|
<head>
|
||||||
|
<th:block th:include="include :: header('修改封铅袋')" />
|
||||||
|
<th:block th:include="include :: datetimepicker-css" />
|
||||||
|
</head>
|
||||||
|
<body class="white-bg">
|
||||||
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||||
|
<form class="form-horizontal m" id="form-pack-edit">
|
||||||
|
<h4 class="form-header h4">出库</h4>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">出库封签袋编号:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="ids" th:value="${ids}" class="form-control" type="text" readonly>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group" shiro:hasAnyRoles="admin,zbgl">
|
||||||
|
<label class="col-sm-3 control-label" >出库区域:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="deptId" type="hidden" id="treeId"/>
|
||||||
|
<input name="deptName" onclick="selectDeptTree()" id="treeName" type="text" placeholder="请选择区域" class="form-control">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group" shiro:hasAnyRoles="admin,zbgl">
|
||||||
|
<label class="col-sm-3 control-label">区域领取人:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input type="hidden" id="aUserid" name="aUserid"/>
|
||||||
|
<input type="text" id="a" name="a" onclick="selectUserA('101')"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group" shiro:hasAnyRoles="admin,zbgl">
|
||||||
|
<label class="col-sm-3 control-label">区域领取时间:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<div class="input-group date">
|
||||||
|
<input name="aGetTime" class="form-control" placeholder="yyyy-MM-dd HH:mm:ss" type="text">
|
||||||
|
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group" shiro:hasAnyRoles="admin,qygl">
|
||||||
|
<label class="col-sm-3 control-label">客户经理领取人:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input type="hidden" id="kUserid" name="kUserid"/>
|
||||||
|
<input type="text" id="b" name="b" onclick="selectUserB('102')"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group" shiro:hasAnyRoles="admin,qygl">
|
||||||
|
<label class="col-sm-3 control-label">客户经理领取时间:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<div class="input-group date">
|
||||||
|
<input name="kGetTime" class="form-control" placeholder="yyyy-MM-dd HH:mm:ss" type="text">
|
||||||
|
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<th:block th:include="include :: footer" />
|
||||||
|
<th:block th:include="include :: datetimepicker-js" />
|
||||||
|
<script th:inline="javascript">
|
||||||
|
var prefix = ctx + "fq/pack";
|
||||||
|
$("#form-pack-edit").validate({
|
||||||
|
focusCleanup: true
|
||||||
|
});
|
||||||
|
|
||||||
|
function submitHandler() {
|
||||||
|
if ($.validate.form()) {
|
||||||
|
$.operate.save(prefix + "/editAll", $('#form-pack-edit').serialize());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$("input[name='aGetTime']").datetimepicker({
|
||||||
|
format: "yyyy-mm-dd hh:ii:ss",
|
||||||
|
//minView: "month",
|
||||||
|
autoclose: true
|
||||||
|
});
|
||||||
|
|
||||||
|
$("input[name='kGetTime']").datetimepicker({
|
||||||
|
format: "yyyy-mm-dd hh:ii:ss",
|
||||||
|
//minView: "month",
|
||||||
|
autoclose: true
|
||||||
|
});
|
||||||
|
|
||||||
|
/*用户管理-新增-选择部门树*/
|
||||||
|
function selectDeptTree() {
|
||||||
|
var treeId = $("#treeId").val();
|
||||||
|
var deptId = $.common.isEmpty(treeId) ? "201" : $("#treeId").val();
|
||||||
|
var url = ctx + "system/dept/selectDeptTree/" + deptId;
|
||||||
|
var options = {
|
||||||
|
title: '选择区域',
|
||||||
|
width: "380",
|
||||||
|
url: url,
|
||||||
|
callBack: selectDeptTreeHandler
|
||||||
|
};
|
||||||
|
$.modal.openOptions(options);
|
||||||
|
}
|
||||||
|
|
||||||
|
function selectDeptTreeHandler(index, layero){
|
||||||
|
var tree = layero.find("iframe")[0].contentWindow.$._tree;
|
||||||
|
if ($.tree.notAllowParents(tree)) {
|
||||||
|
var body = layer.getChildFrame('body', index);
|
||||||
|
$("#treeId").val(body.find('#treeId').val());
|
||||||
|
$("#treeName").val(body.find('#treeName').val());
|
||||||
|
layer.close(index);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 分配用户-选择用户 */
|
||||||
|
// r 角色id
|
||||||
|
function selectUserA(r) {
|
||||||
|
var options = {
|
||||||
|
title: '选择用户',
|
||||||
|
//width: "380",
|
||||||
|
url: '/system/role/authUser/selectUserCommon/' + r, // 101
|
||||||
|
callBack: selectUserHandlerA
|
||||||
|
};
|
||||||
|
$.modal.openOptions(options);
|
||||||
|
}
|
||||||
|
|
||||||
|
function selectUserB(r) {
|
||||||
|
var options = {
|
||||||
|
title: '选择用户',
|
||||||
|
//width: "380",
|
||||||
|
url: '/system/role/authUser/selectUserCommon/' + r, // 101
|
||||||
|
callBack: selectUserHandlerB
|
||||||
|
};
|
||||||
|
$.modal.openOptions(options);
|
||||||
|
}
|
||||||
|
|
||||||
|
function selectUserHandlerA(index){
|
||||||
|
var body = layer.getChildFrame('body', index);
|
||||||
|
$("#a").val(body.find('#userName').val());
|
||||||
|
$("#aUserid").val(body.find('#userId').val());
|
||||||
|
layer.close(index);
|
||||||
|
}
|
||||||
|
|
||||||
|
function selectUserHandlerB(index){
|
||||||
|
var body = layer.getChildFrame('body', index);
|
||||||
|
$("#b").val(body.find('#userName').val());
|
||||||
|
$("#kUserid").val(body.find('#userId').val());
|
||||||
|
layer.close(index);
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,149 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||||
|
<head>
|
||||||
|
<th:block th:include="include :: header('修改封铅袋')" />
|
||||||
|
<th:block th:include="include :: datetimepicker-css" />
|
||||||
|
</head>
|
||||||
|
<body class="white-bg">
|
||||||
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||||
|
<form class="form-horizontal m" id="form-pack-edit" th:object="${fqPackage}">
|
||||||
|
<h4 class="form-header h4">封铅袋信息</h4>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">编码:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="id" th:field="*{id}" remark class="form-control" type="text" readonly>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">描述:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="remark" th:field="*{remark}" class="form-control" type="text" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">产品名称:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="pName" th:field="*{pName}" class="form-control" type="text" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">品牌名称:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="bName" th:field="*{bName}" class="form-control" type="text" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">袋内数量:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="num" th:field="*{num}" class="form-control" type="text" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">使用:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="num" th:field="*{numUse}" class="form-control" type="text" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">颜色:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="color" th:field="*{color}" class="form-control" type="text" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">起始编码:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="startNo" th:field="*{startNo}" class="form-control" type="text" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">结束编码:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="endNo" th:field="*{endNo}" class="form-control" type="text" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">出库区域:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="deptId" th:field="*{dept}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">区域领取人:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="aUserid" th:field="*{aUserid}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">区域领取时间:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<div class="input-group date">
|
||||||
|
<input name="aGetTime" th:value="${#dates.format(fqPackage.aGetTime, 'yyyy-MM-dd HH:mm:ss')}" class="form-control" placeholder="yyyy-MM-dd HH:mm:ss" type="text">
|
||||||
|
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">客户经理领取人:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="userid" th:field="*{kUserid}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">客户经理领取时间:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<div class="input-group date">
|
||||||
|
<input name="kGetTime" th:value="${#dates.format(fqPackage.kGetTime, 'yyyy-MM-dd HH:mm:ss')}" class="form-control" placeholder="yyyy-MM-dd HH:mm:ss" type="text">
|
||||||
|
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">状态:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<div class="radio-box" th:each="dict : ${@dict.getType('fq_p_status')}">
|
||||||
|
<input type="radio" th:id="${'status_' + dict.dictCode}" name="status" th:value="${dict.dictValue}" th:field="*{status}">
|
||||||
|
<label th:for="${'status_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!--<h4 class="form-header h4">封铅信息</h4>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<button type="button" class="btn btn-white btn-sm" onclick="addColumn()"><i class="fa fa-plus"> 增加</i></button>
|
||||||
|
<button type="button" class="btn btn-white btn-sm" onclick="sub.delColumn()"><i class="fa fa-minus"> 删除</i></button>
|
||||||
|
<div class="col-sm-12 select-table table-striped">
|
||||||
|
<table id="bootstrap-table"></table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>-->
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<th:block th:include="include :: footer" />
|
||||||
|
<th:block th:include="include :: datetimepicker-js" />
|
||||||
|
<script th:inline="javascript">
|
||||||
|
var prefix = ctx + "fq/pack";
|
||||||
|
$("#form-pack-edit").validate({
|
||||||
|
focusCleanup: true
|
||||||
|
});
|
||||||
|
|
||||||
|
function submitHandler() {
|
||||||
|
if ($.validate.form()) {
|
||||||
|
$.operate.save(prefix + "/edit", $('#form-pack-edit').serialize());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$("input[name='aGetTime']").datetimepicker({
|
||||||
|
format: "yyyy-mm-dd hh:ii:ss",
|
||||||
|
//minView: "month",
|
||||||
|
autoclose: true
|
||||||
|
});
|
||||||
|
|
||||||
|
$("input[name='kGetTime']").datetimepicker({
|
||||||
|
format: "yyyy-mm-dd hh:ii:ss",
|
||||||
|
//minView: "month",
|
||||||
|
autoclose: true
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,145 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||||
|
<head>
|
||||||
|
<th:block th:include="include :: header('修改封铅袋')" />
|
||||||
|
<th:block th:include="include :: datetimepicker-css" />
|
||||||
|
</head>
|
||||||
|
<body class="white-bg">
|
||||||
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||||
|
<form class="form-horizontal m" id="form-pack-edit">
|
||||||
|
<h4 class="form-header h4">归还</h4>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">归还封签袋id:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="ids" th:value="${ids}" class="form-control" type="text" readonly>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!--<div class="form-group" shiro:hasAnyRoles="admin,zbgl">
|
||||||
|
<label class="col-sm-3 control-label" >归还区域:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="deptId" type="hidden" id="treeId"/>
|
||||||
|
<input name="deptName" onclick="selectDeptTree()" id="treeName" type="text" placeholder="请选择区域" class="form-control">
|
||||||
|
</div>
|
||||||
|
</div>-->
|
||||||
|
<div class="form-group" shiro:hasAnyRoles="admin,zbgl">
|
||||||
|
<label class="col-sm-3 control-label">区域领取人:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input type="hidden" id="gUserid" name="gUserid"/>
|
||||||
|
<input type="text" id="a" name="a" onclick="selectUserA('101')"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group" shiro:hasAnyRoles="admin,zbgl">
|
||||||
|
<label class="col-sm-3 control-label">区域领取时间:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<div class="input-group date">
|
||||||
|
<input name="aGetTime" class="form-control" placeholder="yyyy-MM-dd HH:mm:ss" type="text">
|
||||||
|
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!--<div class="form-group" shiro:hasAnyRoles="admin,qygl">
|
||||||
|
<label class="col-sm-3 control-label">客户经理领取人:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input type="hidden" id="kUserid" name="kUserid"/>
|
||||||
|
<input type="text" id="b" name="b" onclick="selectUserB('102')"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group" shiro:hasAnyRoles="admin,qygl">
|
||||||
|
<label class="col-sm-3 control-label">客户经理领取时间:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<div class="input-group date">
|
||||||
|
<input name="kGetTime" class="form-control" placeholder="yyyy-MM-dd HH:mm:ss" type="text">
|
||||||
|
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>-->
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<th:block th:include="include :: footer" />
|
||||||
|
<th:block th:include="include :: datetimepicker-js" />
|
||||||
|
<script th:inline="javascript">
|
||||||
|
var prefix = ctx + "fq/pack";
|
||||||
|
$("#form-pack-edit").validate({
|
||||||
|
focusCleanup: true
|
||||||
|
});
|
||||||
|
|
||||||
|
function submitHandler() {
|
||||||
|
if ($.validate.form()) {
|
||||||
|
$.operate.save(prefix + "/editAll", $('#form-pack-edit').serialize());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$("input[name='aGetTime']").datetimepicker({
|
||||||
|
format: "yyyy-mm-dd hh:ii:ss",
|
||||||
|
//minView: "month",
|
||||||
|
autoclose: true
|
||||||
|
});
|
||||||
|
|
||||||
|
$("input[name='kGetTime']").datetimepicker({
|
||||||
|
format: "yyyy-mm-dd hh:ii:ss",
|
||||||
|
//minView: "month",
|
||||||
|
autoclose: true
|
||||||
|
});
|
||||||
|
|
||||||
|
/*用户管理-新增-选择部门树*/
|
||||||
|
function selectDeptTree() {
|
||||||
|
var treeId = $("#treeId").val();
|
||||||
|
var deptId = $.common.isEmpty(treeId) ? "201" : $("#treeId").val();
|
||||||
|
var url = ctx + "system/dept/selectDeptTree/" + deptId;
|
||||||
|
var options = {
|
||||||
|
title: '选择区域',
|
||||||
|
width: "380",
|
||||||
|
url: url,
|
||||||
|
callBack: selectDeptTreeHandler
|
||||||
|
};
|
||||||
|
$.modal.openOptions(options);
|
||||||
|
}
|
||||||
|
|
||||||
|
function selectDeptTreeHandler(index, layero){
|
||||||
|
var tree = layero.find("iframe")[0].contentWindow.$._tree;
|
||||||
|
if ($.tree.notAllowParents(tree)) {
|
||||||
|
var body = layer.getChildFrame('body', index);
|
||||||
|
$("#treeId").val(body.find('#treeId').val());
|
||||||
|
$("#treeName").val(body.find('#treeName').val());
|
||||||
|
layer.close(index);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 分配用户-选择用户 */
|
||||||
|
// r 角色id
|
||||||
|
function selectUserA(r) {
|
||||||
|
var options = {
|
||||||
|
title: '选择用户',
|
||||||
|
//width: "380",
|
||||||
|
url: '/system/role/authUser/selectUserCommon/' + r, // 101
|
||||||
|
callBack: selectUserHandlerA
|
||||||
|
};
|
||||||
|
$.modal.openOptions(options);
|
||||||
|
}
|
||||||
|
|
||||||
|
function selectUserB(r) {
|
||||||
|
var options = {
|
||||||
|
title: '选择用户',
|
||||||
|
//width: "380",
|
||||||
|
url: '/system/role/authUser/selectUserCommon/' + r, // 101
|
||||||
|
callBack: selectUserHandlerB
|
||||||
|
};
|
||||||
|
$.modal.openOptions(options);
|
||||||
|
}
|
||||||
|
|
||||||
|
function selectUserHandlerA(index){
|
||||||
|
var body = layer.getChildFrame('body', index);
|
||||||
|
$("#a").val(body.find('#userName').val());
|
||||||
|
$("#aUserid").val(body.find('#userId').val());
|
||||||
|
layer.close(index);
|
||||||
|
}
|
||||||
|
|
||||||
|
function selectUserHandlerB(index){
|
||||||
|
var body = layer.getChildFrame('body', index);
|
||||||
|
$("#b").val(body.find('#userName').val());
|
||||||
|
$("#kUserid").val(body.find('#userId').val());
|
||||||
|
layer.close(index);
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,356 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||||
|
<head>
|
||||||
|
<th:block th:include="include :: header('封铅袋列表')" />
|
||||||
|
</head>
|
||||||
|
<body class="gray-bg">
|
||||||
|
<div class="container-div">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 search-collapse">
|
||||||
|
<form id="formId">
|
||||||
|
<div class="select-list">
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<label>编号:</label>
|
||||||
|
<input type="text" name="id"/>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<label>描述:</label>
|
||||||
|
<input type="text" name="remark"/>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<label>区域领取人:</label>
|
||||||
|
<input type="hidden" id="aUserid" name="aUserid"/>
|
||||||
|
<input type="text" id="a" name="a" onclick="selectUserA('101')"/>
|
||||||
|
</li>
|
||||||
|
<li class="select-time">
|
||||||
|
<label>区域领取时间:</label>
|
||||||
|
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginAGetTime]"/>
|
||||||
|
<span>-</span>
|
||||||
|
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endAGetTime]"/>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<label>客户经理领取人:</label>
|
||||||
|
<input type="hidden" id="kUserid" name="kUserid"/>
|
||||||
|
<input type="text" id="b" name="b" onclick="selectUserB('102')"/>
|
||||||
|
</li>
|
||||||
|
<li class="select-time">
|
||||||
|
<label>客户经理领取时间:</label>
|
||||||
|
<input type="text" class="time-input" id="startTime2" placeholder="开始时间" name="params[beginKGetTime]"/>
|
||||||
|
<span>-</span>
|
||||||
|
<input type="text" class="time-input" id="endTime2" placeholder="结束时间" name="params[endKGetTime]"/>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<label>归还人:</label>
|
||||||
|
<input type="hidden" id="gUserid" name="gUserid"/>
|
||||||
|
<input type="text" id="c" name="c" onclick="selectUserC('')"/>
|
||||||
|
</li>
|
||||||
|
<li class="select-time">
|
||||||
|
<label>归还时间:</label>
|
||||||
|
<input type="text" class="time-input" id="startTime3" placeholder="开始时间" name="params[beginGReTime]"/>
|
||||||
|
<span>-</span>
|
||||||
|
<input type="text" class="time-input" id="endTime3" placeholder="结束时间" name="params[endGReTime]"/>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<label>产品名称:</label>
|
||||||
|
<input type="text" name="pName"/>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<label>品牌名称:</label>
|
||||||
|
<input type="text" name="bName"/>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<label>袋内数量:</label>
|
||||||
|
<input type="text" name="num"/>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<label>颜色:</label>
|
||||||
|
<input type="text" name="color"/>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<label>起始编码:</label>
|
||||||
|
<input type="text" name="startNo"/>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<label>结束编码:</label>
|
||||||
|
<input type="text" name="endNo"/>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<label>出库区域:</label>
|
||||||
|
<input name="deptId" type="hidden" id="treeId"/>
|
||||||
|
<input name="deptName" onclick="selectDeptTree()" id="treeName" type="text" placeholder="请选择区域" class="form-control">
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<label>状态:</label>
|
||||||
|
<select name="status" th:with="type=${@dict.getType('fq_p_status')}">
|
||||||
|
<option value="">所有</option>
|
||||||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||||
|
</select>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
|
||||||
|
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="btn-group-sm" id="toolbar" role="group">
|
||||||
|
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="fq:pack:add">
|
||||||
|
<i class="fa fa-plus"></i> 添加
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="fq:pack:edit">
|
||||||
|
<i class="fa fa-edit"></i> 修改
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="fq:pack:remove">
|
||||||
|
<i class="fa fa-remove"></i> 删除
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-info" onclick="$.table.importExcel()" shiro:hasPermission="fq:pack:import">
|
||||||
|
<i class="fa fa-upload"></i> 导入
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="fq:pack:export">
|
||||||
|
<i class="fa fa-download"></i> 导出
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-success" onclick="ck()" shiro:hasPermission="fq:pack:ck">
|
||||||
|
<i class="fa fa-upload"></i> 出库
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-info" onclick="gh()" shiro:hasPermission="fq:pack:gh">
|
||||||
|
<i class="fa fa-download"></i> 归还
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 select-table table-striped">
|
||||||
|
<table id="bootstrap-table"></table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<th:block th:include="include :: footer" />
|
||||||
|
<script th:inline="javascript">
|
||||||
|
var editFlag = [[${@permission.hasPermi('fq:pack:edit')}]];
|
||||||
|
var removeFlag = [[${@permission.hasPermi('fq:pack:remove')}]];
|
||||||
|
var statusDatas = [[${@dict.getType('fq_p_status')}]];
|
||||||
|
var prefix = ctx + "fq/pack";
|
||||||
|
|
||||||
|
/*用户管理-新增-选择部门树*/
|
||||||
|
function selectDeptTree() {
|
||||||
|
var treeId = $("#treeId").val();
|
||||||
|
var deptId = $.common.isEmpty(treeId) ? "201" : $("#treeId").val();
|
||||||
|
var url = ctx + "system/dept/selectDeptTree/" + deptId;
|
||||||
|
var options = {
|
||||||
|
title: '选择区域',
|
||||||
|
width: "380",
|
||||||
|
url: url,
|
||||||
|
callBack: selectDeptTreeHandler
|
||||||
|
};
|
||||||
|
$.modal.openOptions(options);
|
||||||
|
}
|
||||||
|
|
||||||
|
function selectDeptTreeHandler(index, layero){
|
||||||
|
var tree = layero.find("iframe")[0].contentWindow.$._tree;
|
||||||
|
if ($.tree.notAllowParents(tree)) {
|
||||||
|
var body = layer.getChildFrame('body', index);
|
||||||
|
$("#treeId").val(body.find('#treeId').val());
|
||||||
|
$("#treeName").val(body.find('#treeName').val());
|
||||||
|
layer.close(index);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 分配用户-选择用户 */
|
||||||
|
// r 角色id
|
||||||
|
function selectUserA(r) {
|
||||||
|
var options = {
|
||||||
|
title: '选择用户',
|
||||||
|
//width: "380",
|
||||||
|
url: '/system/role/authUser/selectUserCommon/' + r, // 101
|
||||||
|
callBack: selectUserHandlerA
|
||||||
|
};
|
||||||
|
$.modal.openOptions(options);
|
||||||
|
}
|
||||||
|
|
||||||
|
function selectUserB(r) {
|
||||||
|
var options = {
|
||||||
|
title: '选择用户',
|
||||||
|
//width: "380",
|
||||||
|
url: '/system/role/authUser/selectUserCommon/' + r, // 101
|
||||||
|
callBack: selectUserHandlerB
|
||||||
|
};
|
||||||
|
$.modal.openOptions(options);
|
||||||
|
}
|
||||||
|
|
||||||
|
function selectUserC(r) {
|
||||||
|
var options = {
|
||||||
|
title: '选择用户',
|
||||||
|
//width: "380",
|
||||||
|
url: '/system/role/authUser/selectUserCommon/' + r, // 101
|
||||||
|
callBack: selectUserHandlerC
|
||||||
|
};
|
||||||
|
$.modal.openOptions(options);
|
||||||
|
}
|
||||||
|
|
||||||
|
function selectUserHandlerA(index){
|
||||||
|
var body = layer.getChildFrame('body', index);
|
||||||
|
$("#a").val(body.find('#userName').val());
|
||||||
|
$("#aUserid").val(body.find('#userId').val());
|
||||||
|
layer.close(index);
|
||||||
|
}
|
||||||
|
|
||||||
|
function selectUserHandlerB(index){
|
||||||
|
var body = layer.getChildFrame('body', index);
|
||||||
|
$("#b").val(body.find('#userName').val());
|
||||||
|
$("#kUserid").val(body.find('#userId').val());
|
||||||
|
layer.close(index);
|
||||||
|
}
|
||||||
|
|
||||||
|
function selectUserHandlerC(index){
|
||||||
|
var body = layer.getChildFrame('body', index);
|
||||||
|
$("#c").val(body.find('#userName').val());
|
||||||
|
$("#gUserid").val(body.find('#userId').val());
|
||||||
|
layer.close(index);
|
||||||
|
}
|
||||||
|
|
||||||
|
$(function() {
|
||||||
|
var options = {
|
||||||
|
url: prefix + "/list",
|
||||||
|
createUrl: prefix + "/add",
|
||||||
|
updateUrl: prefix + "/edit/{id}",
|
||||||
|
removeUrl: prefix + "/remove",
|
||||||
|
exportUrl: prefix + "/export",
|
||||||
|
importUrl: prefix + "/importData",
|
||||||
|
importTemplateUrl: prefix + "/importTemplate",
|
||||||
|
detailUrl: prefix + "/detail/{id}",
|
||||||
|
sortName: "createTime",
|
||||||
|
sortOrder: "desc",
|
||||||
|
modalName: "封铅袋",
|
||||||
|
columns: [{
|
||||||
|
checkbox: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'id',
|
||||||
|
title: '编号'
|
||||||
|
//visible: false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'remark',
|
||||||
|
title: '描述'
|
||||||
|
//visible: false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'pName',
|
||||||
|
title: '产品名称'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'bName',
|
||||||
|
title: '品牌名称'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'num',
|
||||||
|
title: '袋内数量'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'numUse',
|
||||||
|
title: '使用数量'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'color',
|
||||||
|
title: '颜色'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'startNo',
|
||||||
|
title: '起始编码'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'endNo',
|
||||||
|
title: '结束编码'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'dept.deptName',
|
||||||
|
title: '出库区域'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'aUser.userName',
|
||||||
|
title: '区域领取人'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'aGetTime',
|
||||||
|
title: '区域领取时间'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'kUser.userName',
|
||||||
|
title: '客户经理'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'kGetTime',
|
||||||
|
title: '客户经理领取时间'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'gUser.userName',
|
||||||
|
title: '归还人'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'gGetTime',
|
||||||
|
title: '归还时间'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'status',
|
||||||
|
title: '状态',
|
||||||
|
formatter: function(value, row, index) {
|
||||||
|
return $.table.selectDictLabel(statusDatas, value);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
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-info btn-xs" href="#" onclick="$.operate.detail(\'' + row.id + '\')"><i class="fa fa-search"></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('');
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
};
|
||||||
|
$.table.init(options);
|
||||||
|
});
|
||||||
|
|
||||||
|
function ck() {
|
||||||
|
table.set();
|
||||||
|
var ids = $.table.selectFirstColumns();
|
||||||
|
if(ids == null || ids == '') {
|
||||||
|
$.modal.alertWarning("请至少选择一条记录");
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
var url = prefix + "/ck/" + ids;
|
||||||
|
$.modal.open("出库" + table.options.modalName, url);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function gh() {
|
||||||
|
table.set();
|
||||||
|
var ids = $.table.selectFirstColumns();
|
||||||
|
if(ids == null || ids == '') {
|
||||||
|
$.modal.alertWarning("请至少选择一条记录");
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
var url = prefix + "/gh/" + ids;
|
||||||
|
$.modal.open("归还" + table.options.modalName, url);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
<!-- 导入区域 -->
|
||||||
|
<script id="importTpl" type="text/template">
|
||||||
|
<form enctype="multipart/form-data" class="mt20 mb10">
|
||||||
|
<div class="col-xs-offset-1">
|
||||||
|
<input type="file" id="file" name="file"/>
|
||||||
|
<div class="mt10 pt5">
|
||||||
|
<input type="checkbox" id="updateSupport" name="updateSupport" title="如果封铅袋已经存在,更新这条数据。"> 是否更新已经存在的封铅袋
|
||||||
|
<a onclick="$.table.importTemplate()" class="btn btn-default btn-xs"><i class="fa fa-file-excel-o"></i> 下载模板</a>
|
||||||
|
</div>
|
||||||
|
<font color="red" class="pull-left mt10">
|
||||||
|
提示:仅允许导入“xls”或“xlsx”格式文件!
|
||||||
|
</font>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</script>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
-- 菜单 SQL
|
||||||
|
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||||
|
values('封铅袋', '3', '1', '/fq/pack', 'C', '0', 'fq:pack:view', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', '封铅袋菜单');
|
||||||
|
|
||||||
|
-- 按钮父菜单ID
|
||||||
|
SELECT @parentId := LAST_INSERT_ID();
|
||||||
|
|
||||||
|
-- 按钮 SQL
|
||||||
|
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||||
|
values('封铅袋查询', @parentId, '1', '#', 'F', '0', 'fq:pack:list', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', '');
|
||||||
|
|
||||||
|
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||||
|
values('封铅袋新增', @parentId, '2', '#', 'F', '0', 'fq:pack:add', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', '');
|
||||||
|
|
||||||
|
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||||
|
values('封铅袋修改', @parentId, '3', '#', 'F', '0', 'fq:pack:edit', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', '');
|
||||||
|
|
||||||
|
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||||
|
values('封铅袋删除', @parentId, '4', '#', 'F', '0', 'fq:pack:remove', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', '');
|
||||||
|
|
||||||
|
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||||
|
values('封铅袋导出', @parentId, '5', '#', 'F', '0', 'fq:pack:export', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', '');
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<artifactId>ruoyi</artifactId>
|
<artifactId>ruoyi</artifactId>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ruoyi</groupId>
|
||||||
<version>4.3.1</version>
|
<version>4.3.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|
@ -93,6 +93,11 @@
|
||||||
<artifactId>jna-platform</artifactId>
|
<artifactId>jna-platform</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.auth0</groupId>
|
||||||
|
<artifactId>java-jwt</artifactId>
|
||||||
|
<version>3.4.0</version>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|
@ -1,11 +1,19 @@
|
||||||
package com.ruoyi.framework.config;
|
package com.ruoyi.framework.config;
|
||||||
|
|
||||||
import java.io.ByteArrayInputStream;
|
import at.pollux.thymeleaf.shiro.dialect.ShiroDialect;
|
||||||
import java.io.IOException;
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
import java.io.InputStream;
|
import com.ruoyi.common.utils.spring.SpringUtils;
|
||||||
import java.util.LinkedHashMap;
|
import com.ruoyi.framework.shiro.jwt.JWTFilter;
|
||||||
import java.util.Map;
|
import com.ruoyi.framework.shiro.realm.UserRealm;
|
||||||
import javax.servlet.Filter;
|
import com.ruoyi.framework.shiro.session.OnlineSessionDAO;
|
||||||
|
import com.ruoyi.framework.shiro.session.OnlineSessionFactory;
|
||||||
|
import com.ruoyi.framework.shiro.web.filter.LogoutFilter;
|
||||||
|
import com.ruoyi.framework.shiro.web.filter.captcha.CaptchaValidateFilter;
|
||||||
|
import com.ruoyi.framework.shiro.web.filter.kickout.KickoutSessionFilter;
|
||||||
|
import com.ruoyi.framework.shiro.web.filter.online.OnlineSessionFilter;
|
||||||
|
import com.ruoyi.framework.shiro.web.filter.sync.SyncOnlineSessionFilter;
|
||||||
|
import com.ruoyi.framework.shiro.web.session.OnlineWebSessionManager;
|
||||||
|
import com.ruoyi.framework.shiro.web.session.SpringSessionValidationScheduler;
|
||||||
import org.apache.commons.io.IOUtils;
|
import org.apache.commons.io.IOUtils;
|
||||||
import org.apache.shiro.cache.ehcache.EhCacheManager;
|
import org.apache.shiro.cache.ehcache.EhCacheManager;
|
||||||
import org.apache.shiro.codec.Base64;
|
import org.apache.shiro.codec.Base64;
|
||||||
|
|
@ -17,23 +25,18 @@ import org.apache.shiro.spring.web.ShiroFilterFactoryBean;
|
||||||
import org.apache.shiro.web.mgt.CookieRememberMeManager;
|
import org.apache.shiro.web.mgt.CookieRememberMeManager;
|
||||||
import org.apache.shiro.web.mgt.DefaultWebSecurityManager;
|
import org.apache.shiro.web.mgt.DefaultWebSecurityManager;
|
||||||
import org.apache.shiro.web.servlet.SimpleCookie;
|
import org.apache.shiro.web.servlet.SimpleCookie;
|
||||||
|
import org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator;
|
||||||
import org.springframework.beans.factory.annotation.Qualifier;
|
import org.springframework.beans.factory.annotation.Qualifier;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
import com.ruoyi.common.utils.StringUtils;
|
|
||||||
import com.ruoyi.common.utils.spring.SpringUtils;
|
import javax.servlet.Filter;
|
||||||
import com.ruoyi.framework.shiro.realm.UserRealm;
|
import java.io.ByteArrayInputStream;
|
||||||
import com.ruoyi.framework.shiro.session.OnlineSessionDAO;
|
import java.io.IOException;
|
||||||
import com.ruoyi.framework.shiro.session.OnlineSessionFactory;
|
import java.io.InputStream;
|
||||||
import com.ruoyi.framework.shiro.web.filter.LogoutFilter;
|
import java.util.LinkedHashMap;
|
||||||
import com.ruoyi.framework.shiro.web.filter.captcha.CaptchaValidateFilter;
|
import java.util.Map;
|
||||||
import com.ruoyi.framework.shiro.web.filter.kickout.KickoutSessionFilter;
|
|
||||||
import com.ruoyi.framework.shiro.web.filter.online.OnlineSessionFilter;
|
|
||||||
import com.ruoyi.framework.shiro.web.filter.sync.SyncOnlineSessionFilter;
|
|
||||||
import com.ruoyi.framework.shiro.web.session.OnlineWebSessionManager;
|
|
||||||
import com.ruoyi.framework.shiro.web.session.SpringSessionValidationScheduler;
|
|
||||||
import at.pollux.thymeleaf.shiro.dialect.ShiroDialect;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 权限配置加载
|
* 权限配置加载
|
||||||
|
|
@ -284,8 +287,10 @@ public class ShiroConfig
|
||||||
filterChainDefinitionMap.put("/logout", "logout");
|
filterChainDefinitionMap.put("/logout", "logout");
|
||||||
// 不需要拦截的访问
|
// 不需要拦截的访问
|
||||||
filterChainDefinitionMap.put("/login", "anon,captchaValidate");
|
filterChainDefinitionMap.put("/login", "anon,captchaValidate");
|
||||||
|
filterChainDefinitionMap.put("/app/appLogin", "anon");
|
||||||
// 注册相关
|
// 注册相关
|
||||||
filterChainDefinitionMap.put("/register", "anon,captchaValidate");
|
filterChainDefinitionMap.put("/register", "anon,captchaValidate");
|
||||||
|
filterChainDefinitionMap.put("/app/appRegister", "anon");
|
||||||
// 系统权限列表
|
// 系统权限列表
|
||||||
// filterChainDefinitionMap.putAll(SpringUtils.getBean(IMenuService.class).selectPermsAll());
|
// filterChainDefinitionMap.putAll(SpringUtils.getBean(IMenuService.class).selectPermsAll());
|
||||||
|
|
||||||
|
|
@ -296,9 +301,11 @@ public class ShiroConfig
|
||||||
filters.put("kickout", kickoutSessionFilter());
|
filters.put("kickout", kickoutSessionFilter());
|
||||||
// 注销成功,则跳转到指定页面
|
// 注销成功,则跳转到指定页面
|
||||||
filters.put("logout", logoutFilter());
|
filters.put("logout", logoutFilter());
|
||||||
|
filters.put("jwt", new JWTFilter());
|
||||||
shiroFilterFactoryBean.setFilters(filters);
|
shiroFilterFactoryBean.setFilters(filters);
|
||||||
|
|
||||||
// 所有请求需要认证
|
// 所有请求需要认证
|
||||||
|
filterChainDefinitionMap.put("/app/**","jwt,kickout,onlineSession,syncOnlineSession");
|
||||||
filterChainDefinitionMap.put("/**", "user,kickout,onlineSession,syncOnlineSession");
|
filterChainDefinitionMap.put("/**", "user,kickout,onlineSession,syncOnlineSession");
|
||||||
shiroFilterFactoryBean.setFilterChainDefinitionMap(filterChainDefinitionMap);
|
shiroFilterFactoryBean.setFilterChainDefinitionMap(filterChainDefinitionMap);
|
||||||
|
|
||||||
|
|
@ -399,4 +406,13 @@ public class ShiroConfig
|
||||||
authorizationAttributeSourceAdvisor.setSecurityManager(securityManager);
|
authorizationAttributeSourceAdvisor.setSecurityManager(securityManager);
|
||||||
return authorizationAttributeSourceAdvisor;
|
return authorizationAttributeSourceAdvisor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*@Bean
|
||||||
|
public DefaultAdvisorAutoProxyCreator defaultAdvisorAutoProxyCreator() {
|
||||||
|
DefaultAdvisorAutoProxyCreator defaultAdvisorAutoProxyCreator = new DefaultAdvisorAutoProxyCreator();
|
||||||
|
// 强制使用cglib,防止重复代理和可能引起代理出错的问题
|
||||||
|
// https://zhuanlan.zhihu.com/p/29161098
|
||||||
|
defaultAdvisorAutoProxyCreator.setProxyTargetClass(true);
|
||||||
|
return defaultAdvisorAutoProxyCreator;
|
||||||
|
}*/
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,125 @@
|
||||||
|
package com.ruoyi.framework.shiro.jwt;
|
||||||
|
|
||||||
|
import com.auth0.jwt.exceptions.TokenExpiredException;
|
||||||
|
import com.ruoyi.common.json.JSON;
|
||||||
|
import org.apache.shiro.web.filter.authc.BasicHttpAuthenticationFilter;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.http.HttpStatus;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
|
|
||||||
|
import javax.servlet.ServletRequest;
|
||||||
|
import javax.servlet.ServletResponse;
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
|
||||||
|
public class JWTFilter extends BasicHttpAuthenticationFilter {
|
||||||
|
private Logger logger = LoggerFactory.getLogger(this.getClass());
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected boolean isAccessAllowed(ServletRequest request, ServletResponse response, Object mappedValue) {
|
||||||
|
//判断请求头是否带上“Token”
|
||||||
|
if(isLoginAttempt(request, response)){
|
||||||
|
//如果存在,则执行executeLogin方法登入,检查token是否正确
|
||||||
|
try {
|
||||||
|
HttpServletRequest r = (HttpServletRequest) request;
|
||||||
|
String token = r.getHeader("token");
|
||||||
|
String username = r.getParameter("loginName");
|
||||||
|
JWTUtil.verify(token,username);
|
||||||
|
return true;
|
||||||
|
}catch (TokenExpiredException t) {
|
||||||
|
responseError(response,"token过期,重新登录");
|
||||||
|
}catch (Exception e) {
|
||||||
|
responseError(response,e.getMessage());
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
//如果没有token,则可能是执行登录操作或者是游客状态访问,无需检查token,直接返回true
|
||||||
|
responseError(response,"无权访问");
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 将非法请求跳转到 /unauthorized/**
|
||||||
|
* @param response
|
||||||
|
* @param message
|
||||||
|
*/
|
||||||
|
private void responseError(ServletResponse response, String message) {
|
||||||
|
HttpServletResponse httpServletResponse = (HttpServletResponse) response;
|
||||||
|
try {
|
||||||
|
Map<String,Object> r = new HashMap<>();
|
||||||
|
//message = URLEncoder.encode(message,"UTF-8");
|
||||||
|
r.put("msg",message);
|
||||||
|
r.put("code",401);
|
||||||
|
httpServletResponse.setCharacterEncoding("utf-8");
|
||||||
|
httpServletResponse.setContentType("application/json; charset=utf-8");
|
||||||
|
httpServletResponse.getWriter().write(JSON.marshal(r));
|
||||||
|
} catch (IOException e) {
|
||||||
|
logger.error(e.getMessage());
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 判断用户是否想要登入
|
||||||
|
* 检测header里面是否包含Token字段
|
||||||
|
* @param request request
|
||||||
|
* @param response response
|
||||||
|
* @return boolean
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
protected boolean isLoginAttempt(ServletRequest request, ServletResponse response) {
|
||||||
|
HttpServletRequest req = (HttpServletRequest) request;
|
||||||
|
String token = req.getHeader("token");
|
||||||
|
return token != null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected boolean executeLogin(ServletRequest request, ServletResponse response) throws Exception {
|
||||||
|
HttpServletRequest httpServletRequest = (HttpServletRequest) request;
|
||||||
|
String token = httpServletRequest.getHeader("token");
|
||||||
|
//String username = JWTUtil.getUsername(token);
|
||||||
|
String username = request.getParameter("loginName");
|
||||||
|
try{
|
||||||
|
JWTUtil.verify(token,username);
|
||||||
|
}catch (TokenExpiredException t){
|
||||||
|
return false;
|
||||||
|
}catch (Exception e){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
|
||||||
|
//JWTToken jwtToken = new JWTToken(token);
|
||||||
|
//提交给realm进行登入,如果错误就会抛出异常并被捕获
|
||||||
|
//getSubject(request, response).login(jwtToken);
|
||||||
|
//return true;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 对跨域访问提供支持
|
||||||
|
* @param request
|
||||||
|
* @param response
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
protected boolean preHandle(ServletRequest request, ServletResponse response) throws Exception {
|
||||||
|
HttpServletRequest httpServletRequest = (HttpServletRequest) request;
|
||||||
|
HttpServletResponse httpServletResponse = (HttpServletResponse) response;
|
||||||
|
httpServletResponse.setHeader("Access-control-Allow-Origin", httpServletRequest.getHeader("Origin"));
|
||||||
|
httpServletResponse.setHeader("Access-Control-Allow-Methods", "GET,POST,OPTIONS,PUT,DELETE");
|
||||||
|
httpServletResponse.setHeader("Access-Control-Allow-Headers", httpServletRequest.getHeader("Access-Control-Request-Headers"));
|
||||||
|
// 跨域时会首先发送一个option请求,这里我们给option请求直接返回正常状态
|
||||||
|
if (httpServletRequest.getMethod().equals(RequestMethod.OPTIONS.name())) {
|
||||||
|
httpServletResponse.setStatus(HttpStatus.OK.value());
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return super.preHandle(request, response);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
package com.ruoyi.framework.shiro.jwt;
|
||||||
|
|
||||||
|
import org.apache.shiro.authc.AuthenticationToken;
|
||||||
|
|
||||||
|
public class JWTToken implements AuthenticationToken {
|
||||||
|
private String token;
|
||||||
|
public JWTToken(String token){
|
||||||
|
this.token = token;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public Object getPrincipal() {
|
||||||
|
return token;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object getCredentials() {
|
||||||
|
return token;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,79 @@
|
||||||
|
package com.ruoyi.framework.shiro.jwt;
|
||||||
|
|
||||||
|
import com.auth0.jwt.JWT;
|
||||||
|
import com.auth0.jwt.JWTVerifier;
|
||||||
|
import com.auth0.jwt.algorithms.Algorithm;
|
||||||
|
import com.auth0.jwt.exceptions.JWTDecodeException;
|
||||||
|
import com.auth0.jwt.interfaces.DecodedJWT;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author huwen
|
||||||
|
*/
|
||||||
|
public class JWTUtil {
|
||||||
|
/**
|
||||||
|
* 设置过期时间10分钟
|
||||||
|
*/
|
||||||
|
private static final long EXPIRE_TIME = 1000*60*10;
|
||||||
|
/**
|
||||||
|
* 设置密钥
|
||||||
|
*/
|
||||||
|
private static final String SECRET = "super_marioli";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据用户名创建一个token
|
||||||
|
* @param username 用户名
|
||||||
|
* @return 返回的token字符串
|
||||||
|
*/
|
||||||
|
public static String createToken(String username){
|
||||||
|
//将当前时间的毫秒数和设置的过期时间相加生成一个新的时间
|
||||||
|
Date date = new Date(System.currentTimeMillis()+EXPIRE_TIME);
|
||||||
|
//由密钥创建一个指定的算法
|
||||||
|
Algorithm algorithm = Algorithm.HMAC256(SECRET);
|
||||||
|
return JWT.create()
|
||||||
|
//附带username信息
|
||||||
|
.withClaim("username",username)
|
||||||
|
//附带过期时间
|
||||||
|
.withExpiresAt(date)
|
||||||
|
//使用指定的算法进行标记
|
||||||
|
.sign(algorithm);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 验证token是否正确
|
||||||
|
* @param token 前端传过来的token
|
||||||
|
* @param username 用户名
|
||||||
|
* @return 返回boolean
|
||||||
|
*/
|
||||||
|
public static boolean verify(String token,String username){
|
||||||
|
//获取算法
|
||||||
|
Algorithm algorithm = Algorithm.HMAC256(SECRET);
|
||||||
|
//生成JWTVerifier
|
||||||
|
JWTVerifier verifier = JWT.require(algorithm)
|
||||||
|
.withClaim("username",username)
|
||||||
|
.build();
|
||||||
|
//验证token
|
||||||
|
verifier.verify(token);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 从token中获得username,无需secret
|
||||||
|
* @param token token
|
||||||
|
* @return username
|
||||||
|
*/
|
||||||
|
public static String getUsername(String token){
|
||||||
|
try {
|
||||||
|
DecodedJWT jwt = JWT.decode(token);
|
||||||
|
return jwt.getClaim("username").asString();
|
||||||
|
} catch (JWTDecodeException e) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
|
String token = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1OTQwODk2Mjl9.S-duDyIe0dT4yV5PyI9kHNls81BYTJQndSFqxvx7BpA";
|
||||||
|
System.out.println(verify(token,"18607922188"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
# 代码生成
|
# 代码生成
|
||||||
gen:
|
gen:
|
||||||
# 作者
|
# 作者
|
||||||
author: ruoyi
|
author: mario
|
||||||
# 默认生成包路径 system 需改成自己的模块名称 如 system monitor tool
|
# 默认生成包路径 system 需改成自己的模块名称 如 system monitor tool
|
||||||
packageName: com.ruoyi.system
|
packageName: com.ruoyi.system
|
||||||
# 自动去除表前缀,默认是false
|
# 自动去除表前缀,默认是false
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||||
<head>
|
<head>
|
||||||
<th:block th:include="include :: header('新增${functionName}')" />
|
<th:block th:include="include :: header('新增${functionName}')" />
|
||||||
#foreach($column in $columns)
|
#foreach($column in $columns)
|
||||||
|
|
@ -53,7 +53,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
#elseif($column.htmlType == "upload")
|
#elseif($column.htmlType == "upload")
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-3 control-label#if($column.required) is-required#end">${comment}:</label>
|
<label class="col-sm-3 control-label#if($column.required) is-required#end">${comment}:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<input type="hidden" name="${field}">
|
<input type="hidden" name="${field}">
|
||||||
|
|
@ -126,7 +126,7 @@
|
||||||
<label class="col-sm-3 control-label">${comment}:</label>
|
<label class="col-sm-3 control-label">${comment}:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<div class="input-group date">
|
<div class="input-group date">
|
||||||
<input name="${field}" class="form-control" placeholder="yyyy-MM-dd" type="text"#if($column.required) required#end>
|
<input name="${field}" class="form-control" placeholder="yyyy-MM-dd HH:mm:ss" type="text"#if($column.required) required#end>
|
||||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -191,8 +191,8 @@
|
||||||
#if($column.insert && !$column.superColumn && !$column.pk && $column.htmlType == "datetime")
|
#if($column.insert && !$column.superColumn && !$column.pk && $column.htmlType == "datetime")
|
||||||
|
|
||||||
$("input[name='$column.javaField']").datetimepicker({
|
$("input[name='$column.javaField']").datetimepicker({
|
||||||
format: "yyyy-mm-dd",
|
format: "yyyy-mm-dd hh:ii:ss",
|
||||||
minView: "month",
|
//minView: "month",
|
||||||
autoclose: true
|
autoclose: true
|
||||||
});
|
});
|
||||||
#end
|
#end
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,281 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||||
|
<head>
|
||||||
|
<th:block th:include="include :: header('修改${functionName}')" />
|
||||||
|
#foreach($column in $columns)
|
||||||
|
#if($column.edit && !$column.superColumn && !$column.pk && $column.htmlType == "datetime")
|
||||||
|
<th:block th:include="include :: datetimepicker-css" />
|
||||||
|
#break
|
||||||
|
#end
|
||||||
|
#end
|
||||||
|
</head>
|
||||||
|
<body class="white-bg">
|
||||||
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||||
|
<form class="form-horizontal m" id="form-${businessName}-edit" th:object="${${className}}">
|
||||||
|
#if($table.sub)
|
||||||
|
<h4 class="form-header h4">${functionName}信息</h4>
|
||||||
|
#end
|
||||||
|
<input name="${pkColumn.javaField}" th:field="*{${pkColumn.javaField}}" type="hidden">
|
||||||
|
#foreach($column in $columns)
|
||||||
|
#if($column.edit && !$column.pk)
|
||||||
|
#if(($column.usableColumn) || (!$column.superColumn))
|
||||||
|
#set($parentheseIndex=$column.columnComment.indexOf("("))
|
||||||
|
#if($parentheseIndex != -1)
|
||||||
|
#set($comment=$column.columnComment.substring(0, $parentheseIndex))
|
||||||
|
#else
|
||||||
|
#set($comment=$column.columnComment)
|
||||||
|
#end
|
||||||
|
#set($field=$column.javaField)
|
||||||
|
#set($dictType=$column.dictType)
|
||||||
|
#if("" != $treeParentCode && $column.javaField == $treeParentCode)
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">${comment}:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<div class="input-group">
|
||||||
|
#set($BusinessName=$businessName.substring(0,1).toUpperCase() + ${businessName.substring(1)})
|
||||||
|
<input id="treeId" name="${treeParentCode}" type="hidden" th:field="*{${treeParentCode}}" />
|
||||||
|
<input class="form-control" type="text" onclick="select${BusinessName}Tree()" id="treeName" readonly="true" th:field="*{parentName}"#if($column.required) required#end>
|
||||||
|
<span class="input-group-addon"><i class="fa fa-search"></i></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
#elseif($column.htmlType == "input")
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label#if($column.required) is-required#end">${comment}:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input name="${field}" th:field="*{${field}}" class="form-control" type="text"#if($column.required) required#end>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
#elseif($column.htmlType == "select" && "" != $dictType)
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">${comment}:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<select name="${field}" class="form-control m-b" th:with="type=${@dict.getType('${dictType}')}"#if($column.required) required#end>
|
||||||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{${field}}"></option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
#elseif($column.htmlType == "select" && $dictType)
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">${comment}:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<select name="${field}" class="form-control m-b"#if($column.required) required#end>
|
||||||
|
<option value="">所有</option>
|
||||||
|
</select>
|
||||||
|
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
#elseif($column.htmlType == "checkbox" && "" != $dictType)
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">${comment}:</label>
|
||||||
|
<div class="col-sm-8" th:with="type=${@dict.getType('${dictType}')}">
|
||||||
|
<label th:each="dict : ${type}" class="check-box">
|
||||||
|
<input name="${field}" type="checkbox" th:value="${dict.dictValue}" th:text="${dict.dictLabel}" th:attr="checked=${${className}.${field}.contains(dict.dictValue)?true:false}"#if($column.required) required#end>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
#elseif($column.htmlType == "checkbox" && $dictType)
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">${comment}:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<label class="check-box">
|
||||||
|
<input name="${field}" type="checkbox"#if($column.required) required#end> 无
|
||||||
|
</label>
|
||||||
|
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
#elseif($column.htmlType == "radio" && "" != $dictType)
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">${comment}:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<div class="radio-box" th:each="dict : ${@dict.getType('${dictType}')}">
|
||||||
|
<input type="radio" th:id="${'${field}_' + dict.dictCode}" name="${field}" th:value="${dict.dictValue}" th:field="*{${field}}"#if($column.required) required#end>
|
||||||
|
<label th:for="${'${field}_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
#elseif($column.htmlType == "radio" && $dictType)
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">${comment}:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<div class="radio-box">
|
||||||
|
<input type="radio" name="${field}" value=""#if($column.required) required#end>
|
||||||
|
<label th:for="${field}" th:text="未知"></label>
|
||||||
|
</div>
|
||||||
|
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
#elseif($column.htmlType == "datetime")
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">${comment}:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<div class="input-group date">
|
||||||
|
<input name="${field}" th:value="${#dates.format(${className}.${field}, 'yyyy-MM-dd HH:mm:ss')}" class="form-control" placeholder="yyyy-MM-dd HH:mm:ss" type="text"#if($column.required) required#end>
|
||||||
|
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
#elseif($column.htmlType == "textarea")
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">${comment}:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<textarea name="${field}" class="form-control"#if($column.required) required#end>[[*{${field}}]]</textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
#end
|
||||||
|
#end
|
||||||
|
#end
|
||||||
|
#end
|
||||||
|
#if($table.sub)
|
||||||
|
<h4 class="form-header h4">${subTable.functionName}信息</h4>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<button type="button" class="btn btn-white btn-sm" onclick="addColumn()"><i class="fa fa-plus"> 增加</i></button>
|
||||||
|
<button type="button" class="btn btn-white btn-sm" onclick="sub.delColumn()"><i class="fa fa-minus"> 删除</i></button>
|
||||||
|
<div class="col-sm-12 select-table table-striped">
|
||||||
|
<table id="bootstrap-table"></table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
#end
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<th:block th:include="include :: footer" />
|
||||||
|
#foreach($column in $columns)
|
||||||
|
#if($column.edit && !$column.superColumn && !$column.pk && $column.htmlType == "datetime")
|
||||||
|
<th:block th:include="include :: datetimepicker-js" />
|
||||||
|
#break
|
||||||
|
#end
|
||||||
|
#end
|
||||||
|
<script th:inline="javascript">
|
||||||
|
var prefix = ctx + "${moduleName}/${businessName}";
|
||||||
|
#if($table.sub)
|
||||||
|
#foreach($column in $subTable.columns)
|
||||||
|
#if(${column.dictType} != '')
|
||||||
|
var ${column.javaField}Datas = [[${@dict.getType('${column.dictType}')}]];
|
||||||
|
#end
|
||||||
|
#end
|
||||||
|
#end
|
||||||
|
$("#form-${businessName}-edit").validate({
|
||||||
|
focusCleanup: true
|
||||||
|
});
|
||||||
|
|
||||||
|
function submitHandler() {
|
||||||
|
if ($.validate.form()) {
|
||||||
|
$.operate.save(prefix + "/edit", $('#form-${businessName}-edit').serialize());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#foreach($column in $columns)
|
||||||
|
#if($column.edit && !$column.superColumn && !$column.pk && $column.htmlType == "datetime")
|
||||||
|
|
||||||
|
$("input[name='$column.javaField']").datetimepicker({
|
||||||
|
format: "yyyy-mm-dd hh:ii:ss",
|
||||||
|
//minView: "month",
|
||||||
|
autoclose: true
|
||||||
|
});
|
||||||
|
#end
|
||||||
|
#end
|
||||||
|
#if($table.tree)
|
||||||
|
|
||||||
|
/*${functionName}-新增-选择父部门树*/
|
||||||
|
function select${BusinessName}Tree() {
|
||||||
|
var options = {
|
||||||
|
title: '${functionName}选择',
|
||||||
|
width: "380",
|
||||||
|
url: prefix + "/select${BusinessName}Tree/" + $("#treeId").val(),
|
||||||
|
callBack: doSubmit
|
||||||
|
};
|
||||||
|
$.modal.openOptions(options);
|
||||||
|
}
|
||||||
|
|
||||||
|
function doSubmit(index, layero){
|
||||||
|
var body = layer.getChildFrame('body', index);
|
||||||
|
$("#treeId").val(body.find('#treeId').val());
|
||||||
|
$("#treeName").val(body.find('#treeName').val());
|
||||||
|
layer.close(index);
|
||||||
|
}
|
||||||
|
#end
|
||||||
|
#if($table.sub)
|
||||||
|
|
||||||
|
$(function() {
|
||||||
|
var options = {
|
||||||
|
data: [[${${className}.${subclassName}List}]],
|
||||||
|
pagination: false,
|
||||||
|
showSearch: false,
|
||||||
|
showRefresh: false,
|
||||||
|
showToggle: false,
|
||||||
|
showColumns: false,
|
||||||
|
columns: [{
|
||||||
|
checkbox: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'index',
|
||||||
|
align: 'center',
|
||||||
|
title: "序号",
|
||||||
|
formatter: function (value, row, index) {
|
||||||
|
var columnIndex = $.common.sprintf("<input type='hidden' name='index' value='%s'>", $.table.serialNumber(index));
|
||||||
|
return columnIndex + $.table.serialNumber(index);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
#foreach($column in $subTable.columns)
|
||||||
|
#set($dictType=$column.dictType)
|
||||||
|
#set($javaField=$column.javaField)
|
||||||
|
#set($parentheseIndex=$column.columnComment.indexOf("("))
|
||||||
|
#if($parentheseIndex != -1)
|
||||||
|
#set($comment=$column.columnComment.substring(0, $parentheseIndex))
|
||||||
|
#else
|
||||||
|
#set($comment=$column.columnComment)
|
||||||
|
#end
|
||||||
|
#if($column.pk || $javaField == ${subTableFkclassName})
|
||||||
|
#elseif($column.list && "" != $dictType)
|
||||||
|
{
|
||||||
|
field: '${javaField}',
|
||||||
|
align: 'center',
|
||||||
|
title: '${comment}',
|
||||||
|
formatter: function(value, row, index) {
|
||||||
|
var name = $.common.sprintf("${subclassName}List[%s].${javaField}", index);
|
||||||
|
return $.common.dictToSelect(${javaField}Datas, value, name);
|
||||||
|
}
|
||||||
|
#if($velocityCount != $subTable.columns.size())},#end
|
||||||
|
|
||||||
|
#else
|
||||||
|
{
|
||||||
|
field: '${javaField}',
|
||||||
|
align: 'center',
|
||||||
|
title: '${comment}',
|
||||||
|
formatter: function(value, row, index) {
|
||||||
|
var html = $.common.sprintf("<input class='form-control' type='text' name='${subclassName}List[%s].${javaField}' value='%s'>", index, value);
|
||||||
|
return html;
|
||||||
|
}
|
||||||
|
#if($velocityCount != $subTable.columns.size())},#end
|
||||||
|
|
||||||
|
#end
|
||||||
|
#end
|
||||||
|
}]
|
||||||
|
};
|
||||||
|
$.table.init(options);
|
||||||
|
});
|
||||||
|
|
||||||
|
function addColumn() {
|
||||||
|
var count = $("#" + table.options.id).bootstrapTable('getData').length;
|
||||||
|
sub.editColumn();
|
||||||
|
|
||||||
|
$("#" + table.options.id).bootstrapTable('insertRow', {
|
||||||
|
index: count,
|
||||||
|
row: {
|
||||||
|
index: $.table.serialNumber(count),
|
||||||
|
#foreach($column in $subTable.columns)
|
||||||
|
#set($javaField=$column.javaField)
|
||||||
|
#if($column.pk || $javaField == ${subTableFkclassName})
|
||||||
|
#else
|
||||||
|
${javaField}: ""#if($velocityCount != $subTable.columns.size()),#end
|
||||||
|
|
||||||
|
#end
|
||||||
|
#end
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
#end
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||||
<head>
|
<head>
|
||||||
<th:block th:include="include :: header('修改${functionName}')" />
|
<th:block th:include="include :: header('修改${functionName}')" />
|
||||||
#foreach($column in $columns)
|
#foreach($column in $columns)
|
||||||
|
|
@ -53,7 +53,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
#elseif($column.htmlType == "upload")
|
#elseif($column.htmlType == "upload")
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-3 control-label#if($column.required) is-required#end">${comment}:</label>
|
<label class="col-sm-3 control-label#if($column.required) is-required#end">${comment}:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<input type="hidden" name="${field}" th:field="*{${field}}">
|
<input type="hidden" name="${field}" th:field="*{${field}}">
|
||||||
|
|
@ -126,7 +126,7 @@
|
||||||
<label class="col-sm-3 control-label">${comment}:</label>
|
<label class="col-sm-3 control-label">${comment}:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<div class="input-group date">
|
<div class="input-group date">
|
||||||
<input name="${field}" th:value="${#dates.format(${className}.${field}, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text"#if($column.required) required#end>
|
<input name="${field}" th:value="${#dates.format(${className}.${field}, 'yyyy-MM-dd HH:mm:ss')}" class="form-control" placeholder="yyyy-MM-dd HH:mm:ss" type="text"#if($column.required) required#end>
|
||||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -191,8 +191,8 @@
|
||||||
#if($column.edit && !$column.superColumn && !$column.pk && $column.htmlType == "datetime")
|
#if($column.edit && !$column.superColumn && !$column.pk && $column.htmlType == "datetime")
|
||||||
|
|
||||||
$("input[name='$column.javaField']").datetimepicker({
|
$("input[name='$column.javaField']").datetimepicker({
|
||||||
format: "yyyy-mm-dd",
|
format: "yyyy-mm-dd hh:ii:ss",
|
||||||
minView: "month",
|
//minView: "month",
|
||||||
autoclose: true
|
autoclose: true
|
||||||
});
|
});
|
||||||
#end
|
#end
|
||||||
|
|
|
||||||
|
|
@ -70,6 +70,9 @@
|
||||||
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="${permissionPrefix}:remove">
|
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="${permissionPrefix}:remove">
|
||||||
<i class="fa fa-remove"></i> 删除
|
<i class="fa fa-remove"></i> 删除
|
||||||
</a>
|
</a>
|
||||||
|
<a class="btn btn-info" onclick="$.table.importExcel()" shiro:hasPermission="${permissionPrefix}:import">
|
||||||
|
<i class="fa fa-upload"></i> 导入
|
||||||
|
</a>
|
||||||
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="${permissionPrefix}:export">
|
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="${permissionPrefix}:export">
|
||||||
<i class="fa fa-download"></i> 导出
|
<i class="fa fa-download"></i> 导出
|
||||||
</a>
|
</a>
|
||||||
|
|
@ -97,6 +100,11 @@
|
||||||
updateUrl: prefix + "/edit/{id}",
|
updateUrl: prefix + "/edit/{id}",
|
||||||
removeUrl: prefix + "/remove",
|
removeUrl: prefix + "/remove",
|
||||||
exportUrl: prefix + "/export",
|
exportUrl: prefix + "/export",
|
||||||
|
importUrl: prefix + "/importData",
|
||||||
|
importTemplateUrl: prefix + "/importTemplate",
|
||||||
|
detailUrl: prefix + "/detail/{id}",
|
||||||
|
sortName: "createTime",
|
||||||
|
sortOrder: "desc",
|
||||||
modalName: "${functionName}",
|
modalName: "${functionName}",
|
||||||
columns: [{
|
columns: [{
|
||||||
checkbox: true
|
checkbox: true
|
||||||
|
|
@ -137,6 +145,7 @@
|
||||||
formatter: function(value, row, index) {
|
formatter: function(value, row, index) {
|
||||||
var actions = [];
|
var actions = [];
|
||||||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.${pkColumn.javaField} + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.${pkColumn.javaField} + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
||||||
|
actions.push('<a class="btn btn-info btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.detail(\'' + row.${pkColumn.javaField} + '\')"><i class="fa fa-search"></i>详情</a> ');
|
||||||
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.${pkColumn.javaField} + '\')"><i class="fa fa-remove"></i>删除</a>');
|
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.${pkColumn.javaField} + '\')"><i class="fa fa-remove"></i>删除</a>');
|
||||||
return actions.join('');
|
return actions.join('');
|
||||||
}
|
}
|
||||||
|
|
@ -146,4 +155,19 @@
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
<!-- 导入区域 -->
|
||||||
|
<script id="importTpl" type="text/template">
|
||||||
|
<form enctype="multipart/form-data" class="mt20 mb10">
|
||||||
|
<div class="col-xs-offset-1">
|
||||||
|
<input type="file" id="file" name="file"/>
|
||||||
|
<div class="mt10 pt5">
|
||||||
|
<input type="checkbox" id="updateSupport" name="updateSupport" title="如果${functionName}已经存在,更新这条数据。"> 是否更新已经存在的封铅袋
|
||||||
|
<a onclick="$.table.importTemplate()" class="btn btn-default btn-xs"><i class="fa fa-file-excel-o"></i> 下载模板</a>
|
||||||
|
</div>
|
||||||
|
<font color="red" class="pull-left mt10">
|
||||||
|
提示:仅允许导入“xls”或“xlsx”格式文件!
|
||||||
|
</font>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</script>
|
||||||
</html>
|
</html>
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||||
<head>
|
<head>
|
||||||
<th:block th:include="include :: header('${functionName}树选择')" />
|
<th:block th:include="include :: header('${functionName}树选择')" />
|
||||||
<th:block th:include="include :: ztree-css" />
|
<th:block th:include="include :: ztree-css" />
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package ${packageName}.controller;
|
package ${basePackage}.${moduleName}.controller;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
|
|
@ -17,6 +17,8 @@ import ${packageName}.service.I${ClassName}Service;
|
||||||
import com.ruoyi.common.core.controller.BaseController;
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
|
import com.ruoyi.framework.util.ShiroUtils;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
#if($table.crud || $table.sub)
|
#if($table.crud || $table.sub)
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
#elseif($table.tree)
|
#elseif($table.tree)
|
||||||
|
|
@ -26,7 +28,7 @@ import com.ruoyi.common.core.domain.Ztree;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ${functionName}Controller
|
* ${functionName}Controller
|
||||||
*
|
*
|
||||||
* @author ${author}
|
* @author ${author}
|
||||||
* @date ${datetime}
|
* @date ${datetime}
|
||||||
*/
|
*/
|
||||||
|
|
@ -87,29 +89,69 @@ public class ${ClassName}Controller extends BaseController
|
||||||
return util.exportExcel(list, "${businessName}");
|
return util.exportExcel(list, "${businessName}");
|
||||||
}
|
}
|
||||||
|
|
||||||
#if($table.crud || $table.sub)
|
|
||||||
/**
|
/**
|
||||||
* 新增${functionName}
|
* 导入${functionName}列表
|
||||||
*/
|
*/
|
||||||
@GetMapping("/add")
|
@Log(title = "${functionName}", businessType = BusinessType.IMPORT)
|
||||||
public String add()
|
@RequiresPermissions("${permissionPrefix}:import")
|
||||||
|
@PostMapping("/importData")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception
|
||||||
{
|
{
|
||||||
return prefix + "/add";
|
ExcelUtil<${ClassName}> util = new ExcelUtil<${ClassName}>(${ClassName}.class);
|
||||||
|
List<${ClassName}> list = util.importExcel(file.getInputStream());
|
||||||
|
String operName = ShiroUtils.getSysUser().getLoginName();
|
||||||
|
String message = ${className}Service.importData(list, updateSupport, operName);
|
||||||
|
return AjaxResult.success(message);
|
||||||
}
|
}
|
||||||
#elseif($table.tree)
|
|
||||||
/**
|
/**
|
||||||
* 新增${functionName}
|
* 下载模板
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = { "/add/{${pkColumn.javaField}}", "/add/" })
|
@RequiresPermissions("${permissionPrefix}:list")
|
||||||
public String add(@PathVariable(value = "${pkColumn.javaField}", required = false) Long ${pkColumn.javaField}, ModelMap mmap)
|
@GetMapping("/importTemplate")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult importTemplate()
|
||||||
{
|
{
|
||||||
if (StringUtils.isNotNull(${pkColumn.javaField}))
|
ExcelUtil<${ClassName}> util = new ExcelUtil<>(${ClassName}.class);
|
||||||
|
return util.importTemplateExcel("${functionName}数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查看详细
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("${permissionPrefix}:detail")
|
||||||
|
@GetMapping("/detail/{${pkColumn.javaField}}")
|
||||||
|
public String detail(@PathVariable("${pkColumn.javaField}") ${pkColumn.javaType} ${pkColumn.javaField}, ModelMap mmap)
|
||||||
|
{
|
||||||
|
${ClassName} ${className} = ${className}Service.select${ClassName}ById(${pkColumn.javaField});
|
||||||
|
mmap.put("${className}", ${className});
|
||||||
|
return prefix + "/detail";
|
||||||
|
}
|
||||||
|
|
||||||
|
#if($table.crud || $table.sub)
|
||||||
|
/**
|
||||||
|
* 新增${functionName}
|
||||||
|
*/
|
||||||
|
@GetMapping("/add")
|
||||||
|
public String add()
|
||||||
{
|
{
|
||||||
mmap.put("${className}", ${className}Service.select${ClassName}ById(${pkColumn.javaField}));
|
return prefix + "/add";
|
||||||
}
|
}
|
||||||
return prefix + "/add";
|
#elseif($table.tree)
|
||||||
}
|
/**
|
||||||
#end
|
* 新增${functionName}
|
||||||
|
*/
|
||||||
|
@GetMapping(value = { "/add/{${pkColumn.javaField}}", "/add/" })
|
||||||
|
public String add(@PathVariable(value = "${pkColumn.javaField}", required = false) Long ${pkColumn.javaField}, ModelMap mmap)
|
||||||
|
{
|
||||||
|
if (StringUtils.isNotNull(${pkColumn.javaField}))
|
||||||
|
{
|
||||||
|
mmap.put("${className}", ${className}Service.select${ClassName}ById(${pkColumn.javaField}));
|
||||||
|
}
|
||||||
|
return prefix + "/add";
|
||||||
|
}
|
||||||
|
#end
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增保存${functionName}
|
* 新增保存${functionName}
|
||||||
|
|
@ -120,6 +162,7 @@ public class ${ClassName}Controller extends BaseController
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public AjaxResult addSave(${ClassName} ${className})
|
public AjaxResult addSave(${ClassName} ${className})
|
||||||
{
|
{
|
||||||
|
${className}.setCreateBy(ShiroUtils.getLoginName());
|
||||||
return toAjax(${className}Service.insert${ClassName}(${className}));
|
return toAjax(${className}Service.insert${ClassName}(${className}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -143,6 +186,7 @@ public class ${ClassName}Controller extends BaseController
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public AjaxResult editSave(${ClassName} ${className})
|
public AjaxResult editSave(${ClassName} ${className})
|
||||||
{
|
{
|
||||||
|
${className}.setUpdateBy(ShiroUtils.getLoginName());
|
||||||
return toAjax(${className}Service.update${ClassName}(${className}));
|
return toAjax(${className}Service.update${ClassName}(${className}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,15 +8,15 @@ import com.ruoyi.common.core.domain.Ztree;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ${functionName}Service接口
|
* ${functionName}Service接口
|
||||||
*
|
*
|
||||||
* @author ${author}
|
* @author ${author}
|
||||||
* @date ${datetime}
|
* @date ${datetime}
|
||||||
*/
|
*/
|
||||||
public interface I${ClassName}Service
|
public interface I${ClassName}Service
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* 查询${functionName}
|
* 查询${functionName}
|
||||||
*
|
*
|
||||||
* @param ${pkColumn.javaField} ${functionName}ID
|
* @param ${pkColumn.javaField} ${functionName}ID
|
||||||
* @return ${functionName}
|
* @return ${functionName}
|
||||||
*/
|
*/
|
||||||
|
|
@ -24,7 +24,7 @@ public interface I${ClassName}Service
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询${functionName}列表
|
* 查询${functionName}列表
|
||||||
*
|
*
|
||||||
* @param ${className} ${functionName}
|
* @param ${className} ${functionName}
|
||||||
* @return ${functionName}集合
|
* @return ${functionName}集合
|
||||||
*/
|
*/
|
||||||
|
|
@ -32,7 +32,7 @@ public interface I${ClassName}Service
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增${functionName}
|
* 新增${functionName}
|
||||||
*
|
*
|
||||||
* @param ${className} ${functionName}
|
* @param ${className} ${functionName}
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
|
@ -40,7 +40,7 @@ public interface I${ClassName}Service
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改${functionName}
|
* 修改${functionName}
|
||||||
*
|
*
|
||||||
* @param ${className} ${functionName}
|
* @param ${className} ${functionName}
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
|
@ -48,7 +48,7 @@ public interface I${ClassName}Service
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除${functionName}
|
* 批量删除${functionName}
|
||||||
*
|
*
|
||||||
* @param ids 需要删除的数据ID
|
* @param ids 需要删除的数据ID
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
|
@ -56,7 +56,7 @@ public interface I${ClassName}Service
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除${functionName}信息
|
* 删除${functionName}信息
|
||||||
*
|
*
|
||||||
* @param ${pkColumn.javaField} ${functionName}ID
|
* @param ${pkColumn.javaField} ${functionName}ID
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
|
@ -65,9 +65,19 @@ public interface I${ClassName}Service
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询${functionName}树列表
|
* 查询${functionName}树列表
|
||||||
*
|
*
|
||||||
* @return 所有${functionName}信息
|
* @return 所有${functionName}信息
|
||||||
*/
|
*/
|
||||||
public List<Ztree> select${ClassName}Tree();
|
public List<Ztree> select${ClassName}Tree();
|
||||||
#end
|
#end
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导入数据
|
||||||
|
*
|
||||||
|
* @param list 数据列表列表
|
||||||
|
* @param isUpdateSupport 是否更新支持,如果已存在,则进行更新数据
|
||||||
|
* @param operName 操作用户
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public String importData(List<${ClassName}> list, Boolean isUpdateSupport, String operName);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -23,22 +23,24 @@ import ${packageName}.mapper.${ClassName}Mapper;
|
||||||
import ${packageName}.domain.${ClassName};
|
import ${packageName}.domain.${ClassName};
|
||||||
import ${packageName}.service.I${ClassName}Service;
|
import ${packageName}.service.I${ClassName}Service;
|
||||||
import com.ruoyi.common.core.text.Convert;
|
import com.ruoyi.common.core.text.Convert;
|
||||||
|
import com.ruoyi.common.exception.BusinessException;
|
||||||
|
import org.springframework.util.ObjectUtils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ${functionName}Service业务层处理
|
* ${functionName}Service业务层处理
|
||||||
*
|
*
|
||||||
* @author ${author}
|
* @author ${author}
|
||||||
* @date ${datetime}
|
* @date ${datetime}
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class ${ClassName}ServiceImpl implements I${ClassName}Service
|
public class ${ClassName}ServiceImpl implements I${ClassName}Service
|
||||||
{
|
{
|
||||||
@Autowired
|
@Autowired
|
||||||
private ${ClassName}Mapper ${className}Mapper;
|
private ${ClassName}Mapper ${className}Mapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询${functionName}
|
* 查询${functionName}
|
||||||
*
|
*
|
||||||
* @param ${pkColumn.javaField} ${functionName}ID
|
* @param ${pkColumn.javaField} ${functionName}ID
|
||||||
* @return ${functionName}
|
* @return ${functionName}
|
||||||
*/
|
*/
|
||||||
|
|
@ -50,7 +52,7 @@ public class ${ClassName}ServiceImpl implements I${ClassName}Service
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询${functionName}列表
|
* 查询${functionName}列表
|
||||||
*
|
*
|
||||||
* @param ${className} ${functionName}
|
* @param ${className} ${functionName}
|
||||||
* @return ${functionName}
|
* @return ${functionName}
|
||||||
*/
|
*/
|
||||||
|
|
@ -62,7 +64,7 @@ public class ${ClassName}ServiceImpl implements I${ClassName}Service
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增${functionName}
|
* 新增${functionName}
|
||||||
*
|
*
|
||||||
* @param ${className} ${functionName}
|
* @param ${className} ${functionName}
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
|
@ -88,7 +90,7 @@ public class ${ClassName}ServiceImpl implements I${ClassName}Service
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改${functionName}
|
* 修改${functionName}
|
||||||
*
|
*
|
||||||
* @param ${className} ${functionName}
|
* @param ${className} ${functionName}
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
|
@ -112,7 +114,7 @@ public class ${ClassName}ServiceImpl implements I${ClassName}Service
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除${functionName}对象
|
* 删除${functionName}对象
|
||||||
*
|
*
|
||||||
* @param ids 需要删除的数据ID
|
* @param ids 需要删除的数据ID
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
|
@ -130,7 +132,7 @@ public class ${ClassName}ServiceImpl implements I${ClassName}Service
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除${functionName}信息
|
* 删除${functionName}信息
|
||||||
*
|
*
|
||||||
* @param ${pkColumn.javaField} ${functionName}ID
|
* @param ${pkColumn.javaField} ${functionName}ID
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
|
@ -146,7 +148,7 @@ public class ${ClassName}ServiceImpl implements I${ClassName}Service
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询${functionName}树列表
|
* 查询${functionName}树列表
|
||||||
*
|
*
|
||||||
* @return 所有${functionName}信息
|
* @return 所有${functionName}信息
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -173,7 +175,7 @@ public class ${ClassName}ServiceImpl implements I${ClassName}Service
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增${subTable.functionName}信息
|
* 新增${subTable.functionName}信息
|
||||||
*
|
*
|
||||||
* @param ${className} ${functionName}对象
|
* @param ${className} ${functionName}对象
|
||||||
*/
|
*/
|
||||||
public void insert${subClassName}(${ClassName} ${className})
|
public void insert${subClassName}(${ClassName} ${className})
|
||||||
|
|
|
||||||
|
|
@ -20,3 +20,9 @@ values('${functionName}删除', @parentId, '4', '#', 'F', '0', '${permissionPr
|
||||||
|
|
||||||
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||||
values('${functionName}导出', @parentId, '5', '#', 'F', '0', '${permissionPrefix}:export', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', '');
|
values('${functionName}导出', @parentId, '5', '#', 'F', '0', '${permissionPrefix}:export', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', '');
|
||||||
|
|
||||||
|
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||||
|
values('${functionName}导入', @parentId, '6', '#', 'F', '0', '${permissionPrefix}:import', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', '');
|
||||||
|
|
||||||
|
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||||
|
values('${functionName}详情', @parentId, '7', '#', 'F', '0', '${permissionPrefix}:detail', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', '');
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
|
||||||
<select id="select${ClassName}List" parameterType="${ClassName}" resultMap="${ClassName}Result">
|
<select id="select${ClassName}List" parameterType="${ClassName}" resultMap="${ClassName}Result">
|
||||||
<include refid="select${ClassName}Vo"/>
|
<include refid="select${ClassName}Vo"/>
|
||||||
<where>
|
<where> 1=1
|
||||||
#foreach($column in $columns)
|
#foreach($column in $columns)
|
||||||
#set($queryType=$column.queryType)
|
#set($queryType=$column.queryType)
|
||||||
#set($javaField=$column.javaField)
|
#set($javaField=$column.javaField)
|
||||||
|
|
@ -62,6 +62,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
#if($table.tree)
|
#if($table.tree)
|
||||||
order by ${tree_parent_code}
|
order by ${tree_parent_code}
|
||||||
#end
|
#end
|
||||||
|
<!-- 数据范围过滤 -->
|
||||||
|
${params.dataScope}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="select${ClassName}ById" parameterType="${pkColumn.javaType}" resultMap="#if($table.sub)${ClassName}${subClassName}Result#else${ClassName}Result#end">
|
<select id="select${ClassName}ById" parameterType="${pkColumn.javaType}" resultMap="#if($table.sub)${ClassName}${subClassName}Result#else${ClassName}Result#end">
|
||||||
|
|
|
||||||
|
|
@ -106,8 +106,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
left join sys_dept d on u.dept_id = d.dept_id
|
left join sys_dept d on u.dept_id = d.dept_id
|
||||||
left join sys_user_role ur on u.user_id = ur.user_id
|
left join sys_user_role ur on u.user_id = ur.user_id
|
||||||
left join sys_role r on r.role_id = ur.role_id
|
left join sys_role r on r.role_id = ur.role_id
|
||||||
where u.del_flag = '0' and (r.role_id != #{roleId} or r.role_id IS NULL)
|
where u.del_flag = '0'
|
||||||
and u.user_id not in (select u.user_id from sys_user u inner join sys_user_role ur on u.user_id = ur.user_id and ur.role_id = #{roleId})
|
<if test="roleId != null and roleId != 0">
|
||||||
|
and (r.role_id != #{roleId} or r.role_id IS NULL)
|
||||||
|
</if>
|
||||||
|
<if test="roleIds != null">
|
||||||
|
and r.role_id not in
|
||||||
|
<foreach item="rId" collection="roleIds" open="(" separator="," close=")">
|
||||||
|
#{rId}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="roleIds == null">
|
||||||
|
and u.user_id not in (select u.user_id from sys_user u inner join sys_user_role ur on u.user_id = ur.user_id
|
||||||
|
<if test="roleId != null and roleId != 0">
|
||||||
|
and ur.role_id = #{roleId}</if>
|
||||||
|
)</if>
|
||||||
<if test="loginName != null and loginName != ''">
|
<if test="loginName != null and loginName != ''">
|
||||||
AND u.login_name like concat('%', #{loginName}, '%')
|
AND u.login_name like concat('%', #{loginName}, '%')
|
||||||
</if>
|
</if>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,701 @@
|
||||||
|
-- ----------------------------
|
||||||
|
-- 1、部门表
|
||||||
|
-- ----------------------------
|
||||||
|
drop table if exists sys_dept;
|
||||||
|
create table sys_dept (
|
||||||
|
dept_id bigint(20) not null auto_increment comment '部门id',
|
||||||
|
parent_id bigint(20) default 0 comment '父部门id',
|
||||||
|
ancestors varchar(50) default '' comment '祖级列表',
|
||||||
|
dept_name varchar(30) default '' comment '部门名称',
|
||||||
|
order_num int(4) default 0 comment '显示顺序',
|
||||||
|
leader varchar(20) default null comment '负责人',
|
||||||
|
phone varchar(11) default null comment '联系电话',
|
||||||
|
email varchar(50) default null comment '邮箱',
|
||||||
|
status char(1) default '0' comment '部门状态(0正常 1停用)',
|
||||||
|
del_flag char(1) default '0' comment '删除标志(0代表存在 2代表删除)',
|
||||||
|
create_by varchar(64) default '' comment '创建者',
|
||||||
|
create_time datetime comment '创建时间',
|
||||||
|
update_by varchar(64) default '' comment '更新者',
|
||||||
|
update_time datetime comment '更新时间',
|
||||||
|
primary key (dept_id)
|
||||||
|
) engine=innodb auto_increment=200 comment = '部门表';
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- 初始化-部门表数据
|
||||||
|
-- ----------------------------
|
||||||
|
insert into sys_dept values(100, 0, '0', '若依科技', 0, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00');
|
||||||
|
insert into sys_dept values(101, 100, '0,100', '深圳总公司', 1, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00');
|
||||||
|
insert into sys_dept values(102, 100, '0,100', '长沙分公司', 2, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00');
|
||||||
|
insert into sys_dept values(103, 101, '0,100,101', '研发部门', 1, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00');
|
||||||
|
insert into sys_dept values(104, 101, '0,100,101', '市场部门', 2, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00');
|
||||||
|
insert into sys_dept values(105, 101, '0,100,101', '测试部门', 3, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00');
|
||||||
|
insert into sys_dept values(106, 101, '0,100,101', '财务部门', 4, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00');
|
||||||
|
insert into sys_dept values(107, 101, '0,100,101', '运维部门', 5, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00');
|
||||||
|
insert into sys_dept values(108, 102, '0,100,102', '市场部门', 1, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00');
|
||||||
|
insert into sys_dept values(109, 102, '0,100,102', '财务部门', 2, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00');
|
||||||
|
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- 2、用户信息表
|
||||||
|
-- ----------------------------
|
||||||
|
drop table if exists sys_user;
|
||||||
|
create table sys_user (
|
||||||
|
user_id bigint(20) not null auto_increment comment '用户ID',
|
||||||
|
dept_id bigint(20) default null comment '部门ID',
|
||||||
|
login_name varchar(30) not null comment '登录账号',
|
||||||
|
user_name varchar(30) default '' comment '用户昵称',
|
||||||
|
user_type varchar(2) default '00' comment '用户类型(00系统用户 01注册用户)',
|
||||||
|
email varchar(50) default '' comment '用户邮箱',
|
||||||
|
phonenumber varchar(11) default '' comment '手机号码',
|
||||||
|
sex char(1) default '0' comment '用户性别(0男 1女 2未知)',
|
||||||
|
avatar varchar(100) default '' comment '头像路径',
|
||||||
|
password varchar(50) default '' comment '密码',
|
||||||
|
salt varchar(20) default '' comment '盐加密',
|
||||||
|
status char(1) default '0' comment '帐号状态(0正常 1停用)',
|
||||||
|
del_flag char(1) default '0' comment '删除标志(0代表存在 2代表删除)',
|
||||||
|
login_ip varchar(50) default '' comment '最后登陆IP',
|
||||||
|
login_date datetime comment '最后登陆时间',
|
||||||
|
create_by varchar(64) default '' comment '创建者',
|
||||||
|
create_time datetime comment '创建时间',
|
||||||
|
update_by varchar(64) default '' comment '更新者',
|
||||||
|
update_time datetime comment '更新时间',
|
||||||
|
remark varchar(500) default null comment '备注',
|
||||||
|
primary key (user_id)
|
||||||
|
) engine=innodb auto_increment=100 comment = '用户信息表';
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- 初始化-用户信息表数据
|
||||||
|
-- ----------------------------
|
||||||
|
insert into sys_user values(1, 103, 'admin', '若依', '00', 'ry@163.com', '15888888888', '1', '', '29c67a30398638269fe600f73a054934', '111111', '0', '0', '127.0.0.1', '2018-03-16 11-33-00', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '管理员');
|
||||||
|
insert into sys_user values(2, 105, 'ry', '若依', '00', 'ry@qq.com', '15666666666', '1', '', '8e6d98b90472783cc73c17047ddccf36', '222222', '0', '0', '127.0.0.1', '2018-03-16 11-33-00', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '测试员');
|
||||||
|
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- 3、岗位信息表
|
||||||
|
-- ----------------------------
|
||||||
|
drop table if exists sys_post;
|
||||||
|
create table sys_post
|
||||||
|
(
|
||||||
|
post_id bigint(20) not null auto_increment comment '岗位ID',
|
||||||
|
post_code varchar(64) not null comment '岗位编码',
|
||||||
|
post_name varchar(50) not null comment '岗位名称',
|
||||||
|
post_sort int(4) not null comment '显示顺序',
|
||||||
|
status char(1) not null comment '状态(0正常 1停用)',
|
||||||
|
create_by varchar(64) default '' comment '创建者',
|
||||||
|
create_time datetime comment '创建时间',
|
||||||
|
update_by varchar(64) default '' comment '更新者',
|
||||||
|
update_time datetime comment '更新时间',
|
||||||
|
remark varchar(500) default null comment '备注',
|
||||||
|
primary key (post_id)
|
||||||
|
) engine=innodb comment = '岗位信息表';
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- 初始化-岗位信息表数据
|
||||||
|
-- ----------------------------
|
||||||
|
insert into sys_post values(1, 'ceo', '董事长', 1, '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
|
insert into sys_post values(2, 'se', '项目经理', 2, '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
|
insert into sys_post values(3, 'hr', '人力资源', 3, '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
|
insert into sys_post values(4, 'user', '普通员工', 4, '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
|
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- 4、角色信息表
|
||||||
|
-- ----------------------------
|
||||||
|
drop table if exists sys_role;
|
||||||
|
create table sys_role (
|
||||||
|
role_id bigint(20) not null auto_increment comment '角色ID',
|
||||||
|
role_name varchar(30) not null comment '角色名称',
|
||||||
|
role_key varchar(100) not null comment '角色权限字符串',
|
||||||
|
role_sort int(4) not null comment '显示顺序',
|
||||||
|
data_scope char(1) default '1' comment '数据范围(1:全部数据权限 2:自定数据权限 3:本部门数据权限 4:本部门及以下数据权限)',
|
||||||
|
status char(1) not null comment '角色状态(0正常 1停用)',
|
||||||
|
del_flag char(1) default '0' comment '删除标志(0代表存在 2代表删除)',
|
||||||
|
create_by varchar(64) default '' comment '创建者',
|
||||||
|
create_time datetime comment '创建时间',
|
||||||
|
update_by varchar(64) default '' comment '更新者',
|
||||||
|
update_time datetime comment '更新时间',
|
||||||
|
remark varchar(500) default null comment '备注',
|
||||||
|
primary key (role_id)
|
||||||
|
) engine=innodb auto_increment=100 comment = '角色信息表';
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- 初始化-角色信息表数据
|
||||||
|
-- ----------------------------
|
||||||
|
insert into sys_role values('1', '系统管理员', 'admin', 1, 1, '0', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '系统管理员');
|
||||||
|
insert into sys_role values('2', '普通角色', 'common', 2, 2, '0', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '普通角色');
|
||||||
|
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- 5、菜单权限表
|
||||||
|
-- ----------------------------
|
||||||
|
drop table if exists sys_menu;
|
||||||
|
create table sys_menu (
|
||||||
|
menu_id bigint(20) not null auto_increment comment '菜单ID',
|
||||||
|
menu_name varchar(50) not null comment '菜单名称',
|
||||||
|
parent_id bigint(20) default 0 comment '父菜单ID',
|
||||||
|
order_num int(4) default 0 comment '显示顺序',
|
||||||
|
url varchar(200) default '#' comment '请求地址',
|
||||||
|
target varchar(20) default '' comment '打开方式(menuItem页签 menuBlank新窗口)',
|
||||||
|
menu_type char(1) default '' comment '菜单类型(M目录 C菜单 F按钮)',
|
||||||
|
visible char(1) default 0 comment '菜单状态(0显示 1隐藏)',
|
||||||
|
perms varchar(100) default null comment '权限标识',
|
||||||
|
icon varchar(100) default '#' comment '菜单图标',
|
||||||
|
create_by varchar(64) default '' comment '创建者',
|
||||||
|
create_time datetime comment '创建时间',
|
||||||
|
update_by varchar(64) default '' comment '更新者',
|
||||||
|
update_time datetime comment '更新时间',
|
||||||
|
remark varchar(500) default '' comment '备注',
|
||||||
|
primary key (menu_id)
|
||||||
|
) engine=innodb auto_increment=2000 comment = '菜单权限表';
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- 初始化-菜单信息表数据
|
||||||
|
-- ----------------------------
|
||||||
|
-- 一级菜单
|
||||||
|
insert into sys_menu values('1', '系统管理', '0', '1', '#', '', 'M', '0', '', 'fa fa-gear', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '系统管理目录');
|
||||||
|
insert into sys_menu values('2', '系统监控', '0', '2', '#', '', 'M', '0', '', 'fa fa-video-camera', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '系统监控目录');
|
||||||
|
insert into sys_menu values('3', '系统工具', '0', '3', '#', '', 'M', '0', '', 'fa fa-bars', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '系统工具目录');
|
||||||
|
insert into sys_menu values('4', '若依官网', '0', '4', 'http://ruoyi.vip', 'menuBlank', 'C', '0', '', 'fa fa-location-arrow', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '若依官网地址');
|
||||||
|
-- 二级菜单
|
||||||
|
insert into sys_menu values('100', '用户管理', '1', '1', '/system/user', '', 'C', '0', 'system:user:view', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '用户管理菜单');
|
||||||
|
insert into sys_menu values('101', '角色管理', '1', '2', '/system/role', '', 'C', '0', 'system:role:view', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '角色管理菜单');
|
||||||
|
insert into sys_menu values('102', '菜单管理', '1', '3', '/system/menu', '', 'C', '0', 'system:menu:view', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '菜单管理菜单');
|
||||||
|
insert into sys_menu values('103', '部门管理', '1', '4', '/system/dept', '', 'C', '0', 'system:dept:view', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '部门管理菜单');
|
||||||
|
insert into sys_menu values('104', '岗位管理', '1', '5', '/system/post', '', 'C', '0', 'system:post:view', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '岗位管理菜单');
|
||||||
|
insert into sys_menu values('105', '字典管理', '1', '6', '/system/dict', '', 'C', '0', 'system:dict:view', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '字典管理菜单');
|
||||||
|
insert into sys_menu values('106', '参数设置', '1', '7', '/system/config', '', 'C', '0', 'system:config:view', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '参数设置菜单');
|
||||||
|
insert into sys_menu values('107', '通知公告', '1', '8', '/system/notice', '', 'C', '0', 'system:notice:view', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '通知公告菜单');
|
||||||
|
insert into sys_menu values('108', '日志管理', '1', '9', '#', '', 'M', '0', '', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '日志管理菜单');
|
||||||
|
insert into sys_menu values('109', '在线用户', '2', '1', '/monitor/online', '', 'C', '0', 'monitor:online:view', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '在线用户菜单');
|
||||||
|
insert into sys_menu values('110', '定时任务', '2', '2', '/monitor/job', '', 'C', '0', 'monitor:job:view', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '定时任务菜单');
|
||||||
|
insert into sys_menu values('111', '数据监控', '2', '3', '/monitor/data', '', 'C', '0', 'monitor:data:view', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '数据监控菜单');
|
||||||
|
insert into sys_menu values('112', '服务监控', '2', '3', '/monitor/server', '', 'C', '0', 'monitor:server:view', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '服务监控菜单');
|
||||||
|
insert into sys_menu values('113', '表单构建', '3', '1', '/tool/build', '', 'C', '0', 'tool:build:view', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '表单构建菜单');
|
||||||
|
insert into sys_menu values('114', '代码生成', '3', '2', '/tool/gen', '', 'C', '0', 'tool:gen:view', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '代码生成菜单');
|
||||||
|
insert into sys_menu values('115', '系统接口', '3', '3', '/tool/swagger', '', 'C', '0', 'tool:swagger:view', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '系统接口菜单');
|
||||||
|
-- 三级菜单
|
||||||
|
insert into sys_menu values('500', '操作日志', '108', '1', '/monitor/operlog', '', 'C', '0', 'monitor:operlog:view', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '操作日志菜单');
|
||||||
|
insert into sys_menu values('501', '登录日志', '108', '2', '/monitor/logininfor', '', 'C', '0', 'monitor:logininfor:view', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '登录日志菜单');
|
||||||
|
-- 用户管理按钮
|
||||||
|
insert into sys_menu values('1000', '用户查询', '100', '1', '#', '', 'F', '0', 'system:user:list', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
|
insert into sys_menu values('1001', '用户新增', '100', '2', '#', '', 'F', '0', 'system:user:add', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
|
insert into sys_menu values('1002', '用户修改', '100', '3', '#', '', 'F', '0', 'system:user:edit', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
|
insert into sys_menu values('1003', '用户删除', '100', '4', '#', '', 'F', '0', 'system:user:remove', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
|
insert into sys_menu values('1004', '用户导出', '100', '5', '#', '', 'F', '0', 'system:user:export', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
|
insert into sys_menu values('1005', '用户导入', '100', '6', '#', '', 'F', '0', 'system:user:import', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
|
insert into sys_menu values('1006', '重置密码', '100', '7', '#', '', 'F', '0', 'system:user:resetPwd', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
|
-- 角色管理按钮
|
||||||
|
insert into sys_menu values('1007', '角色查询', '101', '1', '#', '', 'F', '0', 'system:role:list', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
|
insert into sys_menu values('1008', '角色新增', '101', '2', '#', '', 'F', '0', 'system:role:add', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
|
insert into sys_menu values('1009', '角色修改', '101', '3', '#', '', 'F', '0', 'system:role:edit', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
|
insert into sys_menu values('1010', '角色删除', '101', '4', '#', '', 'F', '0', 'system:role:remove', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
|
insert into sys_menu values('1011', '角色导出', '101', '5', '#', '', 'F', '0', 'system:role:export', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
|
-- 菜单管理按钮
|
||||||
|
insert into sys_menu values('1012', '菜单查询', '102', '1', '#', '', 'F', '0', 'system:menu:list', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
|
insert into sys_menu values('1013', '菜单新增', '102', '2', '#', '', 'F', '0', 'system:menu:add', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
|
insert into sys_menu values('1014', '菜单修改', '102', '3', '#', '', 'F', '0', 'system:menu:edit', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
|
insert into sys_menu values('1015', '菜单删除', '102', '4', '#', '', 'F', '0', 'system:menu:remove', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
|
-- 部门管理按钮
|
||||||
|
insert into sys_menu values('1016', '部门查询', '103', '1', '#', '', 'F', '0', 'system:dept:list', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
|
insert into sys_menu values('1017', '部门新增', '103', '2', '#', '', 'F', '0', 'system:dept:add', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
|
insert into sys_menu values('1018', '部门修改', '103', '3', '#', '', 'F', '0', 'system:dept:edit', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
|
insert into sys_menu values('1019', '部门删除', '103', '4', '#', '', 'F', '0', 'system:dept:remove', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
|
-- 岗位管理按钮
|
||||||
|
insert into sys_menu values('1020', '岗位查询', '104', '1', '#', '', 'F', '0', 'system:post:list', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
|
insert into sys_menu values('1021', '岗位新增', '104', '2', '#', '', 'F', '0', 'system:post:add', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
|
insert into sys_menu values('1022', '岗位修改', '104', '3', '#', '', 'F', '0', 'system:post:edit', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
|
insert into sys_menu values('1023', '岗位删除', '104', '4', '#', '', 'F', '0', 'system:post:remove', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
|
insert into sys_menu values('1024', '岗位导出', '104', '5', '#', '', 'F', '0', 'system:post:export', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
|
-- 字典管理按钮
|
||||||
|
insert into sys_menu values('1025', '字典查询', '105', '1', '#', '', 'F', '0', 'system:dict:list', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
|
insert into sys_menu values('1026', '字典新增', '105', '2', '#', '', 'F', '0', 'system:dict:add', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
|
insert into sys_menu values('1027', '字典修改', '105', '3', '#', '', 'F', '0', 'system:dict:edit', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
|
insert into sys_menu values('1028', '字典删除', '105', '4', '#', '', 'F', '0', 'system:dict:remove', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
|
insert into sys_menu values('1029', '字典导出', '105', '5', '#', '', 'F', '0', 'system:dict:export', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
|
-- 参数设置按钮
|
||||||
|
insert into sys_menu values('1030', '参数查询', '106', '1', '#', '', 'F', '0', 'system:config:list', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
|
insert into sys_menu values('1031', '参数新增', '106', '2', '#', '', 'F', '0', 'system:config:add', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
|
insert into sys_menu values('1032', '参数修改', '106', '3', '#', '', 'F', '0', 'system:config:edit', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
|
insert into sys_menu values('1033', '参数删除', '106', '4', '#', '', 'F', '0', 'system:config:remove', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
|
insert into sys_menu values('1034', '参数导出', '106', '5', '#', '', 'F', '0', 'system:config:export', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
|
-- 通知公告按钮
|
||||||
|
insert into sys_menu values('1035', '公告查询', '107', '1', '#', '', 'F', '0', 'system:notice:list', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
|
insert into sys_menu values('1036', '公告新增', '107', '2', '#', '', 'F', '0', 'system:notice:add', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
|
insert into sys_menu values('1037', '公告修改', '107', '3', '#', '', 'F', '0', 'system:notice:edit', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
|
insert into sys_menu values('1038', '公告删除', '107', '4', '#', '', 'F', '0', 'system:notice:remove', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
|
-- 操作日志按钮
|
||||||
|
insert into sys_menu values('1039', '操作查询', '500', '1', '#', '', 'F', '0', 'monitor:operlog:list', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
|
insert into sys_menu values('1040', '操作删除', '500', '2', '#', '', 'F', '0', 'monitor:operlog:remove', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
|
insert into sys_menu values('1041', '详细信息', '500', '3', '#', '', 'F', '0', 'monitor:operlog:detail', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
|
insert into sys_menu values('1042', '日志导出', '500', '4', '#', '', 'F', '0', 'monitor:operlog:export', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
|
-- 登录日志按钮
|
||||||
|
insert into sys_menu values('1043', '登录查询', '501', '1', '#', '', 'F', '0', 'monitor:logininfor:list', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
|
insert into sys_menu values('1044', '登录删除', '501', '2', '#', '', 'F', '0', 'monitor:logininfor:remove', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
|
insert into sys_menu values('1045', '日志导出', '501', '3', '#', '', 'F', '0', 'monitor:logininfor:export', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
|
insert into sys_menu values('1046', '账户解锁', '501', '4', '#', '', 'F', '0', 'monitor:logininfor:unlock', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
|
-- 在线用户按钮
|
||||||
|
insert into sys_menu values('1047', '在线查询', '109', '1', '#', '', 'F', '0', 'monitor:online:list', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
|
insert into sys_menu values('1048', '批量强退', '109', '2', '#', '', 'F', '0', 'monitor:online:batchForceLogout', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
|
insert into sys_menu values('1049', '单条强退', '109', '3', '#', '', 'F', '0', 'monitor:online:forceLogout', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
|
-- 定时任务按钮
|
||||||
|
insert into sys_menu values('1050', '任务查询', '110', '1', '#', '', 'F', '0', 'monitor:job:list', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
|
insert into sys_menu values('1051', '任务新增', '110', '2', '#', '', 'F', '0', 'monitor:job:add', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
|
insert into sys_menu values('1052', '任务修改', '110', '3', '#', '', 'F', '0', 'monitor:job:edit', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
|
insert into sys_menu values('1053', '任务删除', '110', '4', '#', '', 'F', '0', 'monitor:job:remove', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
|
insert into sys_menu values('1054', '状态修改', '110', '5', '#', '', 'F', '0', 'monitor:job:changeStatus', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
|
insert into sys_menu values('1055', '任务详细', '110', '6', '#', '', 'F', '0', 'monitor:job:detail', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
|
insert into sys_menu values('1056', '任务导出', '110', '7', '#', '', 'F', '0', 'monitor:job:export', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
|
-- 代码生成按钮
|
||||||
|
insert into sys_menu values('1057', '生成查询', '114', '1', '#', '', 'F', '0', 'tool:gen:list', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
|
insert into sys_menu values('1058', '生成修改', '114', '2', '#', '', 'F', '0', 'tool:gen:edit', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
|
insert into sys_menu values('1059', '生成删除', '114', '3', '#', '', 'F', '0', 'tool:gen:remove', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
|
insert into sys_menu values('1060', '预览代码', '114', '4', '#', '', 'F', '0', 'tool:gen:preview', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
|
insert into sys_menu values('1061', '生成代码', '114', '5', '#', '', 'F', '0', 'tool:gen:code', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
|
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- 6、用户和角色关联表 用户N-1角色
|
||||||
|
-- ----------------------------
|
||||||
|
drop table if exists sys_user_role;
|
||||||
|
create table sys_user_role (
|
||||||
|
user_id bigint(20) not null comment '用户ID',
|
||||||
|
role_id bigint(20) not null comment '角色ID',
|
||||||
|
primary key(user_id, role_id)
|
||||||
|
) engine=innodb comment = '用户和角色关联表';
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- 初始化-用户和角色关联表数据
|
||||||
|
-- ----------------------------
|
||||||
|
insert into sys_user_role values ('1', '1');
|
||||||
|
insert into sys_user_role values ('2', '2');
|
||||||
|
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- 7、角色和菜单关联表 角色1-N菜单
|
||||||
|
-- ----------------------------
|
||||||
|
drop table if exists sys_role_menu;
|
||||||
|
create table sys_role_menu (
|
||||||
|
role_id bigint(20) not null comment '角色ID',
|
||||||
|
menu_id bigint(20) not null comment '菜单ID',
|
||||||
|
primary key(role_id, menu_id)
|
||||||
|
) engine=innodb comment = '角色和菜单关联表';
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- 初始化-角色和菜单关联表数据
|
||||||
|
-- ----------------------------
|
||||||
|
insert into sys_role_menu values ('2', '1');
|
||||||
|
insert into sys_role_menu values ('2', '2');
|
||||||
|
insert into sys_role_menu values ('2', '3');
|
||||||
|
insert into sys_role_menu values ('2', '4');
|
||||||
|
insert into sys_role_menu values ('2', '100');
|
||||||
|
insert into sys_role_menu values ('2', '101');
|
||||||
|
insert into sys_role_menu values ('2', '102');
|
||||||
|
insert into sys_role_menu values ('2', '103');
|
||||||
|
insert into sys_role_menu values ('2', '104');
|
||||||
|
insert into sys_role_menu values ('2', '105');
|
||||||
|
insert into sys_role_menu values ('2', '106');
|
||||||
|
insert into sys_role_menu values ('2', '107');
|
||||||
|
insert into sys_role_menu values ('2', '108');
|
||||||
|
insert into sys_role_menu values ('2', '109');
|
||||||
|
insert into sys_role_menu values ('2', '110');
|
||||||
|
insert into sys_role_menu values ('2', '111');
|
||||||
|
insert into sys_role_menu values ('2', '112');
|
||||||
|
insert into sys_role_menu values ('2', '113');
|
||||||
|
insert into sys_role_menu values ('2', '114');
|
||||||
|
insert into sys_role_menu values ('2', '115');
|
||||||
|
insert into sys_role_menu values ('2', '500');
|
||||||
|
insert into sys_role_menu values ('2', '501');
|
||||||
|
insert into sys_role_menu values ('2', '1000');
|
||||||
|
insert into sys_role_menu values ('2', '1001');
|
||||||
|
insert into sys_role_menu values ('2', '1002');
|
||||||
|
insert into sys_role_menu values ('2', '1003');
|
||||||
|
insert into sys_role_menu values ('2', '1004');
|
||||||
|
insert into sys_role_menu values ('2', '1005');
|
||||||
|
insert into sys_role_menu values ('2', '1006');
|
||||||
|
insert into sys_role_menu values ('2', '1007');
|
||||||
|
insert into sys_role_menu values ('2', '1008');
|
||||||
|
insert into sys_role_menu values ('2', '1009');
|
||||||
|
insert into sys_role_menu values ('2', '1010');
|
||||||
|
insert into sys_role_menu values ('2', '1011');
|
||||||
|
insert into sys_role_menu values ('2', '1012');
|
||||||
|
insert into sys_role_menu values ('2', '1013');
|
||||||
|
insert into sys_role_menu values ('2', '1014');
|
||||||
|
insert into sys_role_menu values ('2', '1015');
|
||||||
|
insert into sys_role_menu values ('2', '1016');
|
||||||
|
insert into sys_role_menu values ('2', '1017');
|
||||||
|
insert into sys_role_menu values ('2', '1018');
|
||||||
|
insert into sys_role_menu values ('2', '1019');
|
||||||
|
insert into sys_role_menu values ('2', '1020');
|
||||||
|
insert into sys_role_menu values ('2', '1021');
|
||||||
|
insert into sys_role_menu values ('2', '1022');
|
||||||
|
insert into sys_role_menu values ('2', '1023');
|
||||||
|
insert into sys_role_menu values ('2', '1024');
|
||||||
|
insert into sys_role_menu values ('2', '1025');
|
||||||
|
insert into sys_role_menu values ('2', '1026');
|
||||||
|
insert into sys_role_menu values ('2', '1027');
|
||||||
|
insert into sys_role_menu values ('2', '1028');
|
||||||
|
insert into sys_role_menu values ('2', '1029');
|
||||||
|
insert into sys_role_menu values ('2', '1030');
|
||||||
|
insert into sys_role_menu values ('2', '1031');
|
||||||
|
insert into sys_role_menu values ('2', '1032');
|
||||||
|
insert into sys_role_menu values ('2', '1033');
|
||||||
|
insert into sys_role_menu values ('2', '1034');
|
||||||
|
insert into sys_role_menu values ('2', '1035');
|
||||||
|
insert into sys_role_menu values ('2', '1036');
|
||||||
|
insert into sys_role_menu values ('2', '1037');
|
||||||
|
insert into sys_role_menu values ('2', '1038');
|
||||||
|
insert into sys_role_menu values ('2', '1039');
|
||||||
|
insert into sys_role_menu values ('2', '1040');
|
||||||
|
insert into sys_role_menu values ('2', '1041');
|
||||||
|
insert into sys_role_menu values ('2', '1042');
|
||||||
|
insert into sys_role_menu values ('2', '1043');
|
||||||
|
insert into sys_role_menu values ('2', '1044');
|
||||||
|
insert into sys_role_menu values ('2', '1045');
|
||||||
|
insert into sys_role_menu values ('2', '1046');
|
||||||
|
insert into sys_role_menu values ('2', '1047');
|
||||||
|
insert into sys_role_menu values ('2', '1048');
|
||||||
|
insert into sys_role_menu values ('2', '1049');
|
||||||
|
insert into sys_role_menu values ('2', '1050');
|
||||||
|
insert into sys_role_menu values ('2', '1051');
|
||||||
|
insert into sys_role_menu values ('2', '1052');
|
||||||
|
insert into sys_role_menu values ('2', '1053');
|
||||||
|
insert into sys_role_menu values ('2', '1054');
|
||||||
|
insert into sys_role_menu values ('2', '1055');
|
||||||
|
insert into sys_role_menu values ('2', '1056');
|
||||||
|
insert into sys_role_menu values ('2', '1057');
|
||||||
|
insert into sys_role_menu values ('2', '1058');
|
||||||
|
insert into sys_role_menu values ('2', '1059');
|
||||||
|
insert into sys_role_menu values ('2', '1060');
|
||||||
|
insert into sys_role_menu values ('2', '1061');
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- 8、角色和部门关联表 角色1-N部门
|
||||||
|
-- ----------------------------
|
||||||
|
drop table if exists sys_role_dept;
|
||||||
|
create table sys_role_dept (
|
||||||
|
role_id bigint(20) not null comment '角色ID',
|
||||||
|
dept_id bigint(20) not null comment '部门ID',
|
||||||
|
primary key(role_id, dept_id)
|
||||||
|
) engine=innodb comment = '角色和部门关联表';
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- 初始化-角色和部门关联表数据
|
||||||
|
-- ----------------------------
|
||||||
|
insert into sys_role_dept values ('2', '100');
|
||||||
|
insert into sys_role_dept values ('2', '101');
|
||||||
|
insert into sys_role_dept values ('2', '105');
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- 9、用户与岗位关联表 用户1-N岗位
|
||||||
|
-- ----------------------------
|
||||||
|
drop table if exists sys_user_post;
|
||||||
|
create table sys_user_post
|
||||||
|
(
|
||||||
|
user_id bigint(20) not null comment '用户ID',
|
||||||
|
post_id bigint(20) not null comment '岗位ID',
|
||||||
|
primary key (user_id, post_id)
|
||||||
|
) engine=innodb comment = '用户与岗位关联表';
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- 初始化-用户与岗位关联表数据
|
||||||
|
-- ----------------------------
|
||||||
|
insert into sys_user_post values ('1', '1');
|
||||||
|
insert into sys_user_post values ('2', '2');
|
||||||
|
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- 10、操作日志记录
|
||||||
|
-- ----------------------------
|
||||||
|
drop table if exists sys_oper_log;
|
||||||
|
create table sys_oper_log (
|
||||||
|
oper_id bigint(20) not null auto_increment comment '日志主键',
|
||||||
|
title varchar(50) default '' comment '模块标题',
|
||||||
|
business_type int(2) default 0 comment '业务类型(0其它 1新增 2修改 3删除)',
|
||||||
|
method varchar(100) default '' comment '方法名称',
|
||||||
|
request_method varchar(10) default '' comment '请求方式',
|
||||||
|
operator_type int(1) default 0 comment '操作类别(0其它 1后台用户 2手机端用户)',
|
||||||
|
oper_name varchar(50) default '' comment '操作人员',
|
||||||
|
dept_name varchar(50) default '' comment '部门名称',
|
||||||
|
oper_url varchar(255) default '' comment '请求URL',
|
||||||
|
oper_ip varchar(50) default '' comment '主机地址',
|
||||||
|
oper_location varchar(255) default '' comment '操作地点',
|
||||||
|
oper_param varchar(2000) default '' comment '请求参数',
|
||||||
|
json_result varchar(2000) default '' comment '返回参数',
|
||||||
|
status int(1) default 0 comment '操作状态(0正常 1异常)',
|
||||||
|
error_msg varchar(2000) default '' comment '错误消息',
|
||||||
|
oper_time datetime comment '操作时间',
|
||||||
|
primary key (oper_id)
|
||||||
|
) engine=innodb auto_increment=100 comment = '操作日志记录';
|
||||||
|
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- 11、字典类型表
|
||||||
|
-- ----------------------------
|
||||||
|
drop table if exists sys_dict_type;
|
||||||
|
create table sys_dict_type
|
||||||
|
(
|
||||||
|
dict_id bigint(20) not null auto_increment comment '字典主键',
|
||||||
|
dict_name varchar(100) default '' comment '字典名称',
|
||||||
|
dict_type varchar(100) default '' comment '字典类型',
|
||||||
|
status char(1) default '0' comment '状态(0正常 1停用)',
|
||||||
|
create_by varchar(64) default '' comment '创建者',
|
||||||
|
create_time datetime comment '创建时间',
|
||||||
|
update_by varchar(64) default '' comment '更新者',
|
||||||
|
update_time datetime comment '更新时间',
|
||||||
|
remark varchar(500) default null comment '备注',
|
||||||
|
primary key (dict_id),
|
||||||
|
unique (dict_type)
|
||||||
|
) engine=innodb auto_increment=100 comment = '字典类型表';
|
||||||
|
|
||||||
|
insert into sys_dict_type values(1, '用户性别', 'sys_user_sex', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '用户性别列表');
|
||||||
|
insert into sys_dict_type values(2, '菜单状态', 'sys_show_hide', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '菜单状态列表');
|
||||||
|
insert into sys_dict_type values(3, '系统开关', 'sys_normal_disable', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '系统开关列表');
|
||||||
|
insert into sys_dict_type values(4, '任务状态', 'sys_job_status', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '任务状态列表');
|
||||||
|
insert into sys_dict_type values(5, '任务分组', 'sys_job_group', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '任务分组列表');
|
||||||
|
insert into sys_dict_type values(6, '系统是否', 'sys_yes_no', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '系统是否列表');
|
||||||
|
insert into sys_dict_type values(7, '通知类型', 'sys_notice_type', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '通知类型列表');
|
||||||
|
insert into sys_dict_type values(8, '通知状态', 'sys_notice_status', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '通知状态列表');
|
||||||
|
insert into sys_dict_type values(9, '操作类型', 'sys_oper_type', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '操作类型列表');
|
||||||
|
insert into sys_dict_type values(10, '系统状态', 'sys_common_status', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '登录状态列表');
|
||||||
|
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- 12、字典数据表
|
||||||
|
-- ----------------------------
|
||||||
|
drop table if exists sys_dict_data;
|
||||||
|
create table sys_dict_data
|
||||||
|
(
|
||||||
|
dict_code bigint(20) not null auto_increment comment '字典编码',
|
||||||
|
dict_sort int(4) default 0 comment '字典排序',
|
||||||
|
dict_label varchar(100) default '' comment '字典标签',
|
||||||
|
dict_value varchar(100) default '' comment '字典键值',
|
||||||
|
dict_type varchar(100) default '' comment '字典类型',
|
||||||
|
css_class varchar(100) default null comment '样式属性(其他样式扩展)',
|
||||||
|
list_class varchar(100) default null comment '表格回显样式',
|
||||||
|
is_default char(1) default 'N' comment '是否默认(Y是 N否)',
|
||||||
|
status char(1) default '0' comment '状态(0正常 1停用)',
|
||||||
|
create_by varchar(64) default '' comment '创建者',
|
||||||
|
create_time datetime comment '创建时间',
|
||||||
|
update_by varchar(64) default '' comment '更新者',
|
||||||
|
update_time datetime comment '更新时间',
|
||||||
|
remark varchar(500) default null comment '备注',
|
||||||
|
primary key (dict_code)
|
||||||
|
) engine=innodb auto_increment=100 comment = '字典数据表';
|
||||||
|
|
||||||
|
insert into sys_dict_data values(1, 1, '男', '0', 'sys_user_sex', '', '', 'Y', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '性别男');
|
||||||
|
insert into sys_dict_data values(2, 2, '女', '1', 'sys_user_sex', '', '', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '性别女');
|
||||||
|
insert into sys_dict_data values(3, 3, '未知', '2', 'sys_user_sex', '', '', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '性别未知');
|
||||||
|
insert into sys_dict_data values(4, 1, '显示', '0', 'sys_show_hide', '', 'primary', 'Y', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '显示菜单');
|
||||||
|
insert into sys_dict_data values(5, 2, '隐藏', '1', 'sys_show_hide', '', 'danger', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '隐藏菜单');
|
||||||
|
insert into sys_dict_data values(6, 1, '正常', '0', 'sys_normal_disable', '', 'primary', 'Y', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '正常状态');
|
||||||
|
insert into sys_dict_data values(7, 2, '停用', '1', 'sys_normal_disable', '', 'danger', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '停用状态');
|
||||||
|
insert into sys_dict_data values(8, 1, '正常', '0', 'sys_job_status', '', 'primary', 'Y', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '正常状态');
|
||||||
|
insert into sys_dict_data values(9, 2, '暂停', '1', 'sys_job_status', '', 'danger', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '停用状态');
|
||||||
|
insert into sys_dict_data values(10, 1, '默认', 'DEFAULT', 'sys_job_group', '', '', 'Y', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '默认分组');
|
||||||
|
insert into sys_dict_data values(11, 2, '系统', 'SYSTEM', 'sys_job_group', '', '', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '系统分组');
|
||||||
|
insert into sys_dict_data values(12, 1, '是', 'Y', 'sys_yes_no', '', 'primary', 'Y', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '系统默认是');
|
||||||
|
insert into sys_dict_data values(13, 2, '否', 'N', 'sys_yes_no', '', 'danger', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '系统默认否');
|
||||||
|
insert into sys_dict_data values(14, 1, '通知', '1', 'sys_notice_type', '', 'warning', 'Y', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '通知');
|
||||||
|
insert into sys_dict_data values(15, 2, '公告', '2', 'sys_notice_type', '', 'success', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '公告');
|
||||||
|
insert into sys_dict_data values(16, 1, '正常', '0', 'sys_notice_status', '', 'primary', 'Y', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '正常状态');
|
||||||
|
insert into sys_dict_data values(17, 2, '关闭', '1', 'sys_notice_status', '', 'danger', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '关闭状态');
|
||||||
|
insert into sys_dict_data values(18, 99, '其他', '0', 'sys_oper_type', '', 'info', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '其他操作');
|
||||||
|
insert into sys_dict_data values(19, 1, '新增', '1', 'sys_oper_type', '', 'info', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '新增操作');
|
||||||
|
insert into sys_dict_data values(20, 2, '修改', '2', 'sys_oper_type', '', 'info', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '修改操作');
|
||||||
|
insert into sys_dict_data values(21, 3, '删除', '3', 'sys_oper_type', '', 'danger', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '删除操作');
|
||||||
|
insert into sys_dict_data values(22, 4, '授权', '4', 'sys_oper_type', '', 'primary', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '授权操作');
|
||||||
|
insert into sys_dict_data values(23, 5, '导出', '5', 'sys_oper_type', '', 'warning', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '导出操作');
|
||||||
|
insert into sys_dict_data values(24, 6, '导入', '6', 'sys_oper_type', '', 'warning', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '导入操作');
|
||||||
|
insert into sys_dict_data values(25, 7, '强退', '7', 'sys_oper_type', '', 'danger', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '强退操作');
|
||||||
|
insert into sys_dict_data values(26, 8, '生成代码', '8', 'sys_oper_type', '', 'warning', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '生成操作');
|
||||||
|
insert into sys_dict_data values(27, 9, '清空数据', '9', 'sys_oper_type', '', 'danger', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '清空操作');
|
||||||
|
insert into sys_dict_data values(28, 1, '成功', '0', 'sys_common_status', '', 'primary', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '正常状态');
|
||||||
|
insert into sys_dict_data values(29, 2, '失败', '1', 'sys_common_status', '', 'danger', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '停用状态');
|
||||||
|
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- 13、参数配置表
|
||||||
|
-- ----------------------------
|
||||||
|
drop table if exists sys_config;
|
||||||
|
create table sys_config (
|
||||||
|
config_id int(5) not null auto_increment comment '参数主键',
|
||||||
|
config_name varchar(100) default '' comment '参数名称',
|
||||||
|
config_key varchar(100) default '' comment '参数键名',
|
||||||
|
config_value varchar(500) default '' comment '参数键值',
|
||||||
|
config_type char(1) default 'N' comment '系统内置(Y是 N否)',
|
||||||
|
create_by varchar(64) default '' comment '创建者',
|
||||||
|
create_time datetime comment '创建时间',
|
||||||
|
update_by varchar(64) default '' comment '更新者',
|
||||||
|
update_time datetime comment '更新时间',
|
||||||
|
remark varchar(500) default null comment '备注',
|
||||||
|
primary key (config_id)
|
||||||
|
) engine=innodb auto_increment=100 comment = '参数配置表';
|
||||||
|
|
||||||
|
insert into sys_config values(1, '主框架页-默认皮肤样式名称', 'sys.index.skinName', 'skin-blue', 'Y', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '蓝色 skin-blue、绿色 skin-green、紫色 skin-purple、红色 skin-red、黄色 skin-yellow');
|
||||||
|
insert into sys_config values(2, '用户管理-账号初始密码', 'sys.user.initPassword', '123456', 'Y', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '初始化密码 123456');
|
||||||
|
insert into sys_config values(3, '主框架页-侧边栏主题', 'sys.index.sideTheme', 'theme-dark', 'Y', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '深黑主题theme-dark,浅色主题theme-light,深蓝主题theme-blue');
|
||||||
|
insert into sys_config values(4, '账号自助-是否开启用户注册功能', 'sys.account.registerUser', 'false', 'Y', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '是否开启注册用户功能');
|
||||||
|
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- 14、系统访问记录
|
||||||
|
-- ----------------------------
|
||||||
|
drop table if exists sys_logininfor;
|
||||||
|
create table sys_logininfor (
|
||||||
|
info_id bigint(20) not null auto_increment comment '访问ID',
|
||||||
|
login_name varchar(50) default '' comment '登录账号',
|
||||||
|
ipaddr varchar(50) default '' comment '登录IP地址',
|
||||||
|
login_location varchar(255) default '' comment '登录地点',
|
||||||
|
browser varchar(50) default '' comment '浏览器类型',
|
||||||
|
os varchar(50) default '' comment '操作系统',
|
||||||
|
status char(1) default '0' comment '登录状态(0成功 1失败)',
|
||||||
|
msg varchar(255) default '' comment '提示消息',
|
||||||
|
login_time datetime comment '访问时间',
|
||||||
|
primary key (info_id)
|
||||||
|
) engine=innodb auto_increment=100 comment = '系统访问记录';
|
||||||
|
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- 15、在线用户记录
|
||||||
|
-- ----------------------------
|
||||||
|
drop table if exists sys_user_online;
|
||||||
|
create table sys_user_online (
|
||||||
|
sessionId varchar(50) default '' comment '用户会话id',
|
||||||
|
login_name varchar(50) default '' comment '登录账号',
|
||||||
|
dept_name varchar(50) default '' comment '部门名称',
|
||||||
|
ipaddr varchar(50) default '' comment '登录IP地址',
|
||||||
|
login_location varchar(255) default '' comment '登录地点',
|
||||||
|
browser varchar(50) default '' comment '浏览器类型',
|
||||||
|
os varchar(50) default '' comment '操作系统',
|
||||||
|
status varchar(10) default '' comment '在线状态on_line在线off_line离线',
|
||||||
|
start_timestamp datetime comment 'session创建时间',
|
||||||
|
last_access_time datetime comment 'session最后访问时间',
|
||||||
|
expire_time int(5) default 0 comment '超时时间,单位为分钟',
|
||||||
|
primary key (sessionId)
|
||||||
|
) engine=innodb comment = '在线用户记录';
|
||||||
|
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- 16、定时任务调度表
|
||||||
|
-- ----------------------------
|
||||||
|
drop table if exists sys_job;
|
||||||
|
create table sys_job (
|
||||||
|
job_id bigint(20) not null auto_increment comment '任务ID',
|
||||||
|
job_name varchar(64) default '' comment '任务名称',
|
||||||
|
job_group varchar(64) default 'DEFAULT' comment '任务组名',
|
||||||
|
invoke_target varchar(500) not null comment '调用目标字符串',
|
||||||
|
cron_expression varchar(255) default '' comment 'cron执行表达式',
|
||||||
|
misfire_policy varchar(20) default '3' comment '计划执行错误策略(1立即执行 2执行一次 3放弃执行)',
|
||||||
|
concurrent char(1) default '1' comment '是否并发执行(0允许 1禁止)',
|
||||||
|
status char(1) default '0' comment '状态(0正常 1暂停)',
|
||||||
|
create_by varchar(64) default '' comment '创建者',
|
||||||
|
create_time datetime comment '创建时间',
|
||||||
|
update_by varchar(64) default '' comment '更新者',
|
||||||
|
update_time datetime comment '更新时间',
|
||||||
|
remark varchar(500) default '' comment '备注信息',
|
||||||
|
primary key (job_id, job_name, job_group)
|
||||||
|
) engine=innodb auto_increment=100 comment = '定时任务调度表';
|
||||||
|
|
||||||
|
insert into sys_job values(1, '系统默认(无参)', 'DEFAULT', 'ryTask.ryNoParams', '0/10 * * * * ?', '3', '1', '1', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
|
insert into sys_job values(2, '系统默认(有参)', 'DEFAULT', 'ryTask.ryParams(\'ry\')', '0/15 * * * * ?', '3', '1', '1', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
|
insert into sys_job values(3, '系统默认(多参)', 'DEFAULT', 'ryTask.ryMultipleParams(\'ry\', true, 2000L, 316.50D, 100)', '0/20 * * * * ?', '3', '1', '1', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '');
|
||||||
|
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- 17、定时任务调度日志表
|
||||||
|
-- ----------------------------
|
||||||
|
drop table if exists sys_job_log;
|
||||||
|
create table sys_job_log (
|
||||||
|
job_log_id bigint(20) not null auto_increment comment '任务日志ID',
|
||||||
|
job_name varchar(64) not null comment '任务名称',
|
||||||
|
job_group varchar(64) not null comment '任务组名',
|
||||||
|
invoke_target varchar(500) not null comment '调用目标字符串',
|
||||||
|
job_message varchar(500) comment '日志信息',
|
||||||
|
status char(1) default '0' comment '执行状态(0正常 1失败)',
|
||||||
|
exception_info varchar(2000) default '' comment '异常信息',
|
||||||
|
create_time datetime comment '创建时间',
|
||||||
|
primary key (job_log_id)
|
||||||
|
) engine=innodb comment = '定时任务调度日志表';
|
||||||
|
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- 18、通知公告表
|
||||||
|
-- ----------------------------
|
||||||
|
drop table if exists sys_notice;
|
||||||
|
create table sys_notice (
|
||||||
|
notice_id int(4) not null auto_increment comment '公告ID',
|
||||||
|
notice_title varchar(50) not null comment '公告标题',
|
||||||
|
notice_type char(1) not null comment '公告类型(1通知 2公告)',
|
||||||
|
notice_content varchar(2000) default null comment '公告内容',
|
||||||
|
status char(1) default '0' comment '公告状态(0正常 1关闭)',
|
||||||
|
create_by varchar(64) default '' comment '创建者',
|
||||||
|
create_time datetime comment '创建时间',
|
||||||
|
update_by varchar(64) default '' comment '更新者',
|
||||||
|
update_time datetime comment '更新时间',
|
||||||
|
remark varchar(255) default null comment '备注',
|
||||||
|
primary key (notice_id)
|
||||||
|
) engine=innodb auto_increment=10 comment = '通知公告表';
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- 初始化-公告信息表数据
|
||||||
|
-- ----------------------------
|
||||||
|
insert into sys_notice values('1', '温馨提醒:2018-07-01 若依新版本发布啦', '2', '新版本内容', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '管理员');
|
||||||
|
insert into sys_notice values('2', '维护通知:2018-07-01 若依系统凌晨维护', '1', '维护内容', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '管理员');
|
||||||
|
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- 19、代码生成业务表
|
||||||
|
-- ----------------------------
|
||||||
|
drop table if exists gen_table;
|
||||||
|
create table gen_table (
|
||||||
|
table_id bigint(20) not null auto_increment comment '编号',
|
||||||
|
table_name varchar(200) default '' comment '表名称',
|
||||||
|
table_comment varchar(500) default '' comment '表描述',
|
||||||
|
sub_table_name varchar(64) default null comment '关联子表的表名',
|
||||||
|
sub_table_fk_name varchar(64) default null comment '子表关联的外键名',
|
||||||
|
class_name varchar(100) default '' comment '实体类名称',
|
||||||
|
tpl_category varchar(200) default 'crud' comment '使用的模板(crud单表操作 tree树表操作 sub主子表操作)',
|
||||||
|
package_name varchar(100) comment '生成包路径',
|
||||||
|
module_name varchar(30) comment '生成模块名',
|
||||||
|
business_name varchar(30) comment '生成业务名',
|
||||||
|
function_name varchar(50) comment '生成功能名',
|
||||||
|
function_author varchar(50) comment '生成功能作者',
|
||||||
|
options varchar(1000) comment '其它生成选项',
|
||||||
|
create_by varchar(64) default '' comment '创建者',
|
||||||
|
create_time datetime comment '创建时间',
|
||||||
|
update_by varchar(64) default '' comment '更新者',
|
||||||
|
update_time datetime comment '更新时间',
|
||||||
|
remark varchar(500) default null comment '备注',
|
||||||
|
primary key (table_id)
|
||||||
|
) engine=innodb auto_increment=1 comment = '代码生成业务表';
|
||||||
|
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- 20、代码生成业务表字段
|
||||||
|
-- ----------------------------
|
||||||
|
drop table if exists gen_table_column;
|
||||||
|
create table gen_table_column (
|
||||||
|
column_id bigint(20) not null auto_increment comment '编号',
|
||||||
|
table_id varchar(64) comment '归属表编号',
|
||||||
|
column_name varchar(200) comment '列名称',
|
||||||
|
column_comment varchar(500) comment '列描述',
|
||||||
|
column_type varchar(100) comment '列类型',
|
||||||
|
java_type varchar(500) comment 'JAVA类型',
|
||||||
|
java_field varchar(200) comment 'JAVA字段名',
|
||||||
|
is_pk char(1) comment '是否主键(1是)',
|
||||||
|
is_increment char(1) comment '是否自增(1是)',
|
||||||
|
is_required char(1) comment '是否必填(1是)',
|
||||||
|
is_insert char(1) comment '是否为插入字段(1是)',
|
||||||
|
is_edit char(1) comment '是否编辑字段(1是)',
|
||||||
|
is_list char(1) comment '是否列表字段(1是)',
|
||||||
|
is_query char(1) comment '是否查询字段(1是)',
|
||||||
|
query_type varchar(200) default 'EQ' comment '查询方式(等于、不等于、大于、小于、范围)',
|
||||||
|
html_type varchar(200) comment '显示类型(文本框、文本域、下拉框、复选框、单选框、日期控件)',
|
||||||
|
dict_type varchar(200) default '' comment '字典类型',
|
||||||
|
sort int comment '排序',
|
||||||
|
create_by varchar(64) default '' comment '创建者',
|
||||||
|
create_time datetime comment '创建时间',
|
||||||
|
update_by varchar(64) default '' comment '更新者',
|
||||||
|
update_time datetime comment '更新时间',
|
||||||
|
primary key (column_id)
|
||||||
|
) engine=innodb auto_increment=1 comment = '代码生成业务表字段';
|
||||||