Compare commits
111 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3feb7cf9ad | ||
|
|
c5074a4557 | ||
|
|
f19f6bb51e | ||
|
|
77155af474 | ||
|
|
7b599405fa | ||
|
|
2fe4f2e0e3 | ||
|
|
125b95bd6c | ||
|
|
cdca94f980 | ||
|
|
c73456ff49 | ||
|
|
b8836ff284 | ||
|
|
2be5fd178f | ||
|
|
8cf0be4fee | ||
|
|
e66f7d0d01 | ||
|
|
fa5523650c | ||
|
|
687d11fecb | ||
|
|
57b95cdb48 | ||
|
|
271a65e595 | ||
|
|
51854ebf74 | ||
|
|
fb6d837f3d | ||
|
|
46910d0037 | ||
|
|
59b49d9082 | ||
|
|
ae06748457 | ||
|
|
7919ede2f0 | ||
|
|
85cca6de4d | ||
|
|
fe719a4253 | ||
|
|
72c789154f | ||
|
|
577e0a8514 | ||
|
|
33233669ee | ||
|
|
e4c33d730f | ||
|
|
81d112645e | ||
|
|
6299976368 | ||
|
|
1663bf88b0 | ||
|
|
a75b33e195 | ||
|
|
930422c06e | ||
|
|
f1f0f86b0c | ||
|
|
b465206cf8 | ||
|
|
b5fd643070 | ||
|
|
875a4526cf | ||
|
|
a62ba3de93 | ||
|
|
6808808d34 | ||
|
|
f6e6ba5fd2 | ||
|
|
81b22ad3d8 | ||
|
|
ed045d7204 | ||
|
|
956b82ba65 | ||
|
|
bf7daeed16 | ||
|
|
c431eaece1 | ||
|
|
59dd3bb743 | ||
|
|
605c38c74d | ||
|
|
6bfe50906e | ||
|
|
ccb29b067b | ||
|
|
64f13684c9 | ||
|
|
e1f5650696 | ||
|
|
130f3abfb6 | ||
|
|
3846ff0f4d | ||
|
|
9ae4d9301f | ||
|
|
b5d1d30281 | ||
|
|
0eda12d31e | ||
|
|
d5635faf59 | ||
|
|
9678b6e8b7 | ||
|
|
dd9e400f6a | ||
|
|
2de70e79ae | ||
|
|
5248cf9a68 | ||
|
|
51a83b70a3 | ||
|
|
1b66126184 | ||
|
|
a2d9c846bf | ||
|
|
5da0520832 | ||
|
|
aae461a0b4 | ||
|
|
eb218f7973 | ||
|
|
2d80ce3bda | ||
|
|
42b36a5377 | ||
|
|
720148bea7 | ||
|
|
ff462950bd | ||
|
|
00cc2fa797 | ||
|
|
b0d66960a8 | ||
|
|
e123d96465 | ||
|
|
7b4ca62ce8 | ||
|
|
df74e417e8 | ||
|
|
fe7637a110 | ||
|
|
b71d2502ef | ||
|
|
2792531a7d | ||
|
|
04781bed25 | ||
|
|
b82217e624 | ||
|
|
3c92f26684 | ||
|
|
c31259d5c8 | ||
|
|
36dd4c70bc | ||
|
|
ddc8510479 | ||
|
|
ac4c9f932d | ||
|
|
9aa599fb0b | ||
|
|
1b0099c831 | ||
|
|
fca4902a38 | ||
|
|
59e1792467 | ||
|
|
73ac352219 | ||
|
|
722029e555 | ||
|
|
2ce0eb76be | ||
|
|
2d9548aa90 | ||
|
|
1d31c9fcef | ||
|
|
9c8ae36924 | ||
|
|
88a9b11859 | ||
|
|
72b536a4d5 | ||
|
|
e9763efaa7 | ||
|
|
532ca319ec | ||
|
|
9c0fc71587 | ||
|
|
16ba2c92a0 | ||
|
|
0729db8ae8 | ||
|
|
e1be50a2e6 | ||
|
|
6f5b7ee120 | ||
|
|
c010df1fb6 | ||
|
|
5b16c6c3d2 | ||
|
|
3b0060c300 | ||
|
|
9cf1b944db | ||
|
|
5ff356665f |
4
.gitignore
vendored
4
.gitignore
vendored
@@ -2,6 +2,7 @@
|
||||
**/target
|
||||
**/webapp/userfiles
|
||||
**/WEB-INF/classes
|
||||
**/transaction-logs
|
||||
**/logs/*.log*
|
||||
*.epoch
|
||||
*.lic
|
||||
@@ -15,4 +16,5 @@
|
||||
*.iws
|
||||
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
Thumbs.db
|
||||
rebel.xml
|
||||
|
||||
2
LICENSE
2
LICENSE
@@ -877,4 +877,4 @@ For more information on this, and how to apply and follow the GNU AGPL, see
|
||||
理解您的用意。
|
||||
5. 在延伸的代码中(修改和有源代码衍生的代码中)需要带有原来代码中的协议、版权声明和其他
|
||||
原作者规定需要包含的说明(请尊重原作者的著作权,不要删除或修改文件中的`@author`信息)。
|
||||
6. 您可以应用于商业软件,但必须遵循以上条款原则(请协助改进本作品)。
|
||||
6. 您可以应用于商业软件,但必须遵循以上条款原则(请协助改进本作品 http://jeesite.com)。
|
||||
|
||||
@@ -91,13 +91,13 @@ JeeSite 4.x 的升级,作者结合了多年总结和经验,以及各方面
|
||||
|
||||
尽量不修改web项目以外的源码项目,如 jeesite-common、jeesite-modele-core,如果修改了,请 Pull Requests 上来,否则代码编码将与官方不同步,将对你的日后升级带来困难。
|
||||
|
||||
JeeSite的小版本(4.1.x)升级是非常便捷的,你只需要将 pom.xml 文件中的 parent.version 版本修改到最新版本即可,同版本下你可进行Maven快照强制更新,即可将最新版的依赖jar更新到本地,下面介绍一下在Eclipse里如何操作:
|
||||
JeeSite的小版本(4.1.x)升级是非常便捷的,你只需要将 pom.xml 文件中的 parent.version 版本修改到最新版本即可,同版本下你可进行 Maven 快照强制更新,即可将最新版的依赖 jar 更新到本地,下面以 Eclipse 举例,介绍如何操作:
|
||||
|
||||
在web项目上右键,选择菜单 -> Maven -> Update Project...(或按Alt+F5) -> 点击 Select All 按钮 -> 选择 Force Update of Snapshots/Releases 复选框 -> 点击OK按钮即可。
|
||||
在 web 项目上右键,选择菜单 -> Maven -> Update Project...(或按Alt+F5) -> 点击 Select All 按钮 -> 选择 Force Update of Snapshots/Releases 复选框 -> 点击OK按钮即可。
|
||||
|
||||
如果您修改了其它依赖模块代码,这时你需要与官方Git仓库代码进行同步。
|
||||
如果您修改了其它依赖模块代码,这时你需要利用 Git 版本控制工具,与官方仓库代码进行同步,合并代码即可。
|
||||
|
||||
如果进行相对大的版本(4.x.x)升级这里我们会附加一个声明,帮助你进行迁移操作。
|
||||
如果进行相对大的版本(4.x.x)升级这里我们会附加一个声明,帮助你进行迁移操作,更新日志:<http://jeesite.com/?t=273830>。
|
||||
|
||||
# Git 全局设置技巧
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>com.jeesite</groupId>
|
||||
<artifactId>jeesite-parent</artifactId>
|
||||
<version>4.1.4-SNAPSHOT</version>
|
||||
<version>4.1.6-SNAPSHOT</version>
|
||||
<relativePath>../parent/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -74,6 +74,13 @@
|
||||
<version>${json.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Fast json -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>fastjson</artifactId>
|
||||
<version>${fastjson.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Jackson json -->
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
|
||||
@@ -254,8 +254,8 @@ public class EncodeUtils {
|
||||
}
|
||||
|
||||
// 预编译SQL过滤正则表达式
|
||||
private static Pattern sqlPattern = Pattern.compile("(?:')|(?:--)|(/\\*(?:.|[\\n\\r])*?\\*/)|(\\b(select|update|and|or|delete|insert|trancate|char|into|substr|ascii|declare|exec|count|master|into|drop|execute)\\b)", Pattern.CASE_INSENSITIVE);
|
||||
|
||||
private static Pattern sqlPattern = Pattern.compile("(?:')|(?:--)|(/\\*(?:.|[\\n\\r])*?\\*/)|(\\b(select|update|and|or|delete|insert|trancate|char|into|substr|ascii|declare|exec|count|master|into|drop|execute|case when)\\b)", Pattern.CASE_INSENSITIVE);
|
||||
|
||||
/**
|
||||
* SQL过滤,防止注入,传入参数输入有select相关代码,替换空。
|
||||
* @author ThinkGem
|
||||
@@ -263,7 +263,7 @@ public class EncodeUtils {
|
||||
public static String sqlFilter(String text){
|
||||
if (text != null){
|
||||
String value = text;
|
||||
Matcher matcher = sqlPattern.matcher(text);
|
||||
Matcher matcher = sqlPattern.matcher(value);
|
||||
if (matcher.find()) {
|
||||
value = matcher.replaceAll(StringUtils.EMPTY);
|
||||
}
|
||||
@@ -306,6 +306,7 @@ public class EncodeUtils {
|
||||
// sqlFilter((++i)+"你好,select * from xxx where abc=def and 1=1我还在。");
|
||||
// sqlFilter((++i)+"你好,insert into xxx values(1,2,3,4,5)我还在。");
|
||||
// sqlFilter((++i)+"你好,delete from xxx我还在。");
|
||||
// sqlFilter((++i)+"a.audit_result asc,case when 1 like case when length(database())=6 then 1 else exp(11111111111111111) end then 1 else 1/0 end");
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
@@ -356,7 +356,7 @@ public class ListUtils extends org.apache.commons.collections.ListUtils {
|
||||
* @param totalPage 总页码数
|
||||
* @author ThinkGem
|
||||
*/
|
||||
private static <T> List<T> getPageList(List<T> list, int pageNo, int pageSize, int totalPage) {
|
||||
public static <T> List<T> getPageList(List<T> list, int pageNo, int pageSize, int totalPage) {
|
||||
int fromIndex = 0; // 从哪里开始截取
|
||||
int toIndex = 0; // 截取几个
|
||||
if (list == null || list.size() == 0){
|
||||
|
||||
@@ -7,7 +7,7 @@ import java.security.SecureRandom;
|
||||
import java.util.UUID;
|
||||
|
||||
import com.jeesite.common.codec.EncodeUtils;
|
||||
import com.jeesite.common.lang.ObjectUtils;
|
||||
import com.jeesite.common.lang.NumberUtils;
|
||||
import com.jeesite.common.lang.StringUtils;
|
||||
|
||||
/**
|
||||
@@ -42,6 +42,13 @@ public class IdGenerate {
|
||||
random.nextBytes(randomBytes);
|
||||
return EncodeUtils.encodeBase62(randomBytes);
|
||||
}
|
||||
|
||||
/**
|
||||
* 使用SecureRandom随机生成指定范围的Integer.
|
||||
*/
|
||||
public static int randomInt(int min, int max) {
|
||||
return random.nextInt(max) % (max - min + 1) + min;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取新唯一编号(18为数值)
|
||||
@@ -72,7 +79,7 @@ public class IdGenerate {
|
||||
}
|
||||
String prefix = str.substring(0, lastNotNumIndex + 1);
|
||||
String numStr = str.substring(lastNotNumIndex + 1, str.length());
|
||||
long num = ObjectUtils.toLong(numStr);
|
||||
long num = NumberUtils.isCreatable(numStr) ? Long.valueOf(numStr) : 0;
|
||||
// System.out.println("处理前:"+str);
|
||||
str = prefix + StringUtils.leftPad(String.valueOf(num + 1), numStr.length(), "0");
|
||||
// System.out.println("处理后:"+str);
|
||||
@@ -95,6 +102,7 @@ public class IdGenerate {
|
||||
// System.out.println(nextCode("EC02T099"));
|
||||
// System.out.println(nextCode("EC02T100"));
|
||||
// System.out.println(nextCode("EC02T10A"));
|
||||
// System.out.println(nextCode("1123117153417957377"));
|
||||
//// // 数值型ID重复验证测试
|
||||
//// Set<String> set = SetUtils.newHashSet();
|
||||
//// try{
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
*/
|
||||
package com.jeesite.common.io;
|
||||
|
||||
import java.io.BufferedOutputStream;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
@@ -16,6 +15,7 @@ import java.util.Enumeration;
|
||||
import java.util.List;
|
||||
|
||||
import javax.activation.MimetypesFileTypeMap;
|
||||
import javax.servlet.ServletOutputStream;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
@@ -697,135 +697,79 @@ public class FileUtils extends org.apache.commons.io.FileUtils {
|
||||
* @return 返回错误信息,无错误信息返回null
|
||||
*/
|
||||
public static String downFile(File file, HttpServletRequest request, HttpServletResponse response, String fileName){
|
||||
long fileLength = file.length(); // 记录文件大小
|
||||
long pastLength = 0; // 记录已下载文件大小
|
||||
int rangeSwitch = 0; // 0:从头开始的全文下载;1:从某字节开始的下载(bytes=27000-);2:从某字节开始到某字节结束的下载(bytes=27000-39000)
|
||||
long toLength = 0; // 记录客户端需要下载的字节段的最后一个字节偏移量(比如bytes=27000-39000,则这个值是为39000)
|
||||
long contentLength = 0; // 客户端请求的字节总量
|
||||
String rangeBytes = ""; // 记录客户端传来的形如“bytes=27000-”或者“bytes=27000-39000”的内容
|
||||
RandomAccessFile raf = null; // 负责读取数据
|
||||
OutputStream os = null; // 写出数据
|
||||
OutputStream out = null; // 缓冲
|
||||
byte b[] = new byte[1024]; // 暂存容器
|
||||
|
||||
if (request.getHeader("Range") != null) { // 客户端请求的下载的文件块的开始字节
|
||||
response.setStatus(javax.servlet.http.HttpServletResponse.SC_PARTIAL_CONTENT);
|
||||
logger.debug("request.getHeader(\"Range\") = " + request.getHeader("Range"));
|
||||
rangeBytes = request.getHeader("Range").replaceAll("bytes=", "");
|
||||
if (rangeBytes.indexOf('-') == rangeBytes.length() - 1) {// bytes=969998336-
|
||||
rangeSwitch = 1;
|
||||
rangeBytes = rangeBytes.substring(0, rangeBytes.indexOf('-'));
|
||||
pastLength = Long.parseLong(rangeBytes.trim());
|
||||
contentLength = fileLength - pastLength; // 客户端请求的是 969998336 之后的字节
|
||||
} else { // bytes=1275856879-1275877358
|
||||
rangeSwitch = 2;
|
||||
String temp0 = rangeBytes.substring(0, rangeBytes.indexOf('-'));
|
||||
String temp2 = rangeBytes.substring(rangeBytes.indexOf('-') + 1, rangeBytes.length());
|
||||
pastLength = Long.parseLong(temp0.trim()); // bytes=1275856879-1275877358,从第 1275856879 个字节开始下载
|
||||
toLength = Long.parseLong(temp2); // bytes=1275856879-1275877358,到第 1275877358 个字节结束
|
||||
contentLength = toLength - pastLength; // 客户端请求的是 1275856879-1275877358 之间的字节
|
||||
}
|
||||
} else { // 从开始进行下载
|
||||
contentLength = fileLength; // 客户端要求全文下载
|
||||
if (file == null || !file.exists() || file.length() <= 0){
|
||||
return "文件为空或不存在!";
|
||||
}
|
||||
|
||||
// 如果设设置了Content-Length,则客户端会自动进行多线程下载。如果不希望支持多线程,则不要设置这个参数。 响应的格式是:
|
||||
// Content-Length: [文件的总大小] - [客户端请求的下载的文件块的开始字节]
|
||||
// ServletActionContext.getResponse().setHeader("Content- Length", new Long(file.length() - p).toString());
|
||||
response.reset(); // 告诉客户端允许断点续传多线程连接下载,响应的格式是:Accept-Ranges: bytes
|
||||
if (pastLength != 0) {
|
||||
response.setHeader("Accept-Ranges", "bytes");// 如果是第一次下,还没有断点续传,状态是默认的 200,无需显式设置;响应的格式是:HTTP/1.1 200 OK
|
||||
// 不是从最开始下载, 响应的格式是: Content-Range: bytes [文件块的开始字节]-[文件的总大小 - 1]/[文件的总大小]
|
||||
logger.debug("服务器即将开始断点续传...");
|
||||
switch (rangeSwitch) {
|
||||
case 1: { // 针对 bytes=27000- 的请求
|
||||
String contentRange = new StringBuffer("bytes ").append(new Long(pastLength).toString()).append("-")
|
||||
.append(new Long(fileLength - 1).toString()).append("/").append(new Long(fileLength).toString()).toString();
|
||||
response.setHeader("Content-Range", contentRange);
|
||||
break;
|
||||
}
|
||||
case 2: { // 针对 bytes=27000-39000 的请求
|
||||
String contentRange = rangeBytes + "/" + new Long(fileLength).toString();
|
||||
response.setHeader("Content-Range", contentRange);
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
break;
|
||||
try(RandomAccessFile randomFile = new RandomAccessFile(file, "r");
|
||||
ServletOutputStream out = response.getOutputStream()) {
|
||||
long contentLength = randomFile.length();
|
||||
String range = request.getHeader("Range");
|
||||
long start = 0, end = 0;
|
||||
if (range != null && range.startsWith("bytes=")) {
|
||||
String[] values = range.split("=")[1].split("-");
|
||||
start = Long.parseLong(values[0]);
|
||||
if (values.length > 1) {
|
||||
end = Long.parseLong(values[1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
response.addHeader("Content-Disposition", "attachment; filename=\"" +
|
||||
EncodeUtils.encodeUrl(StringUtils.isBlank(fileName) ? file.getName() : fileName) + "\"");
|
||||
response.setContentType(FileUtils.getContentType(file.getName())); // set the MIME type.
|
||||
response.addHeader("Content-Length", String.valueOf(contentLength));
|
||||
os = response.getOutputStream();
|
||||
out = new BufferedOutputStream(os);
|
||||
raf = new RandomAccessFile(file, "r");
|
||||
try {
|
||||
switch (rangeSwitch) {
|
||||
case 0: { // 普通下载,或者从头开始的下载 同1
|
||||
int requestSize = 0;
|
||||
if (end != 0 && end > start) {
|
||||
requestSize = Long.valueOf(end - start + 1).intValue();
|
||||
} else {
|
||||
requestSize = Integer.MAX_VALUE;
|
||||
}
|
||||
response.setContentType(FileUtils.getContentType(file.getName()));
|
||||
boolean isPreview = "preview".equalsIgnoreCase(request.getParameter("source"));
|
||||
response.addHeader("Content-Disposition", (!isPreview ? "attachment; " : "") + "filename*=utf-8'zh_cn'"
|
||||
+ EncodeUtils.encodeUrl(StringUtils.isBlank(fileName) ? file.getName() : fileName));
|
||||
response.setHeader("Accept-Ranges", "bytes");
|
||||
// 第一次请求只返回 content length 来让客户端请求多次实际数据
|
||||
if (range == null) {
|
||||
response.setHeader("Content-Length", String.valueOf(contentLength));
|
||||
} else {
|
||||
// 以后的多次以断点续传的方式来返回视频数据
|
||||
response.setStatus(HttpServletResponse.SC_PARTIAL_CONTENT); // 206
|
||||
long requestStart = 0, requestEnd = 0;
|
||||
String[] ranges = range.split("=");
|
||||
if (ranges.length > 1) {
|
||||
String[] rangeDatas = ranges[1].split("-");
|
||||
requestStart = Long.parseLong(rangeDatas[0]);
|
||||
if (rangeDatas.length > 1) {
|
||||
requestEnd = Long.parseLong(rangeDatas[1]);
|
||||
}
|
||||
case 1: { // 针对 bytes=27000- 的请求
|
||||
raf.seek(pastLength); // 形如 bytes=969998336- 的客户端请求,跳过 969998336 个字节
|
||||
int n = 0;
|
||||
while ((n = raf.read(b, 0, 1024)) != -1) {
|
||||
out.write(b, 0, n);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 2: { // 针对 bytes=27000-39000 的请求
|
||||
raf.seek(pastLength); // 形如 bytes=1275856879-1275877358 的客户端请求,找到第 1275856879 个字节
|
||||
int n = 0;
|
||||
long readLength = 0; // 记录已读字节数
|
||||
while (readLength <= contentLength - 1024) {// 大部分字节在这里读取
|
||||
n = raf.read(b, 0, 1024);
|
||||
readLength += 1024;
|
||||
out.write(b, 0, n);
|
||||
}
|
||||
if (readLength <= contentLength) { // 余下的不足 1024 个字节在这里读取
|
||||
n = raf.read(b, 0, (int) (contentLength - readLength));
|
||||
out.write(b, 0, n);
|
||||
}
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
}
|
||||
long length = 0;
|
||||
if (requestEnd > 0) {
|
||||
length = requestEnd - requestStart + 1;
|
||||
response.setHeader("Content-Length", String.valueOf(length));
|
||||
response.setHeader("Content-Range", "bytes " + requestStart + "-" + requestEnd + "/" + contentLength);
|
||||
} else {
|
||||
length = contentLength - requestStart;
|
||||
response.setHeader("Content-Length", String.valueOf(length));
|
||||
response.setHeader("Content-Range", "bytes " + requestStart + "-" + (contentLength - 1) + "/" + contentLength);
|
||||
}
|
||||
}
|
||||
randomFile.seek(start);
|
||||
int needSize = requestSize;
|
||||
while (needSize > 0) {
|
||||
byte[] buffer = new byte[1024];
|
||||
int len = randomFile.read(buffer);
|
||||
if (needSize < buffer.length) {
|
||||
out.write(buffer, 0, needSize);
|
||||
} else {
|
||||
out.write(buffer, 0, len);
|
||||
if (len < buffer.length) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
out.flush();
|
||||
logger.debug("下载完成!" + file.getAbsolutePath());
|
||||
} catch (IOException ie) {
|
||||
/**
|
||||
* 在写数据的时候, 对于 ClientAbortException 之类的异常,
|
||||
* 是因为客户端取消了下载,而服务器端继续向浏览器写入数据时, 抛出这个异常,这个是正常的。
|
||||
* 尤其是对于迅雷这种吸血的客户端软件, 明明已经有一个线程在读取 bytes=1275856879-1275877358,
|
||||
* 如果短时间内没有读取完毕,迅雷会再启第二个、第三个。。。线程来读取相同的字节段, 直到有一个线程读取完毕,迅雷会 KILL
|
||||
* 掉其他正在下载同一字节段的线程, 强行中止字节读出,造成服务器抛 ClientAbortException。
|
||||
* 所以,我们忽略这种异常
|
||||
*/
|
||||
logger.debug("提醒:向客户端传输时出现IO异常,但此异常是允许的,有可能客户端取消了下载,导致此异常,不用关心!");
|
||||
needSize -= buffer.length;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
out.flush();
|
||||
return null;
|
||||
} catch (IOException e) {
|
||||
logger.debug(e.getMessage(), e);
|
||||
} finally {
|
||||
if (out != null) {
|
||||
try {
|
||||
out.close();
|
||||
} catch (IOException e) {
|
||||
// logger.error(e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
if (raf != null) {
|
||||
try {
|
||||
raf.close();
|
||||
} catch (IOException e) {
|
||||
// logger.error(e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
return e.getMessage();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -16,7 +16,6 @@ import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.config.YamlPropertiesFactoryBean;
|
||||
import org.springframework.core.env.Environment;
|
||||
import org.springframework.core.io.DefaultResourceLoader;
|
||||
import org.springframework.core.io.Resource;
|
||||
|
||||
import com.jeesite.common.collect.SetUtils;
|
||||
@@ -215,7 +214,7 @@ public class PropertiesUtils {
|
||||
String logPath = null;
|
||||
try {
|
||||
// 获取当前classes目录
|
||||
logPath = new DefaultResourceLoader().getResource("/").getFile().getPath();
|
||||
logPath = ResourceUtils.getResource("/").getFile().getPath();
|
||||
} catch (Exception e) {
|
||||
// 取不到,取当前工作路径
|
||||
logPath = System.getProperty("user.dir");
|
||||
|
||||
@@ -244,7 +244,7 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils {
|
||||
}
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.setTime(date);
|
||||
calendar.set(Calendar.HOUR, 0);
|
||||
calendar.set(Calendar.HOUR_OF_DAY, 0);
|
||||
calendar.set(Calendar.MINUTE, 0);
|
||||
calendar.set(Calendar.SECOND, 0);
|
||||
calendar.set(Calendar.MILLISECOND, 0);
|
||||
@@ -262,7 +262,7 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils {
|
||||
}
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.setTime(date);
|
||||
calendar.set(Calendar.HOUR, 23);
|
||||
calendar.set(Calendar.HOUR_OF_DAY, 23);
|
||||
calendar.set(Calendar.MINUTE, 59);
|
||||
calendar.set(Calendar.SECOND, 59);
|
||||
calendar.set(Calendar.MILLISECOND, 999);
|
||||
|
||||
@@ -12,6 +12,7 @@ import java.lang.reflect.Modifier;
|
||||
import java.lang.reflect.ParameterizedType;
|
||||
import java.lang.reflect.Type;
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.commons.lang3.Validate;
|
||||
@@ -40,39 +41,56 @@ public class ReflectUtils {
|
||||
private static Logger logger = LoggerFactory.getLogger(ReflectUtils.class);
|
||||
|
||||
/**
|
||||
* 调用Getter方法.
|
||||
* 支持多级,如:对象名.对象名.方法
|
||||
* 调用Getter方法,
|
||||
* 支持多级,如:对象名.对象名.方法,
|
||||
* 支持静态类及方法调用,
|
||||
* 支持Map
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public static <E> E invokeGetter(Object obj, String propertyName) {
|
||||
Object object = obj;
|
||||
for (String name : StringUtils.split(propertyName, ".")){
|
||||
String getterMethodName = GETTER_PREFIX + StringUtils.capitalize(name);
|
||||
object = invokeMethod(object, getterMethodName, new Class[] {}, new Object[] {});
|
||||
if (obj instanceof Map){
|
||||
object = ((Map)obj).get(name);
|
||||
}else{
|
||||
String methodName = GETTER_PREFIX + StringUtils.capitalize(name);
|
||||
object = invokeMethod(object, methodName, new Class[] {}, new Object[] {});
|
||||
}
|
||||
}
|
||||
return (E)object;
|
||||
}
|
||||
|
||||
/**
|
||||
* 调用Setter方法, 仅匹配方法名。
|
||||
* 支持多级,如:对象名.对象名.方法
|
||||
* 调用Setter方法,仅匹配方法名,
|
||||
* 支持多级,如:对象名.对象名.方法,
|
||||
* 支持静态类及方法调用,
|
||||
* 支持Map
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public static <E> void invokeSetter(Object obj, String propertyName, E value) {
|
||||
Object object = obj;
|
||||
String[] names = StringUtils.split(propertyName, ".");
|
||||
for (int i=0; i<names.length; i++){
|
||||
if(i<names.length-1){
|
||||
String getterMethodName = GETTER_PREFIX + StringUtils.capitalize(names[i]);
|
||||
object = invokeMethod(object, getterMethodName, new Class[] {}, new Object[] {});
|
||||
if (obj instanceof Map){
|
||||
object = ((Map)obj).get(names[i]);
|
||||
}else{
|
||||
String methodName = GETTER_PREFIX + StringUtils.capitalize(names[i]);
|
||||
object = invokeMethod(object, methodName, new Class[] {}, new Object[] {});
|
||||
}
|
||||
}else{
|
||||
String setterMethodName = SETTER_PREFIX + StringUtils.capitalize(names[i]);
|
||||
invokeMethodByName(object, setterMethodName, new Object[] { value });
|
||||
if (obj instanceof Map){
|
||||
((Map)obj).put(names[i], value);
|
||||
}else{
|
||||
String methodName = SETTER_PREFIX + StringUtils.capitalize(names[i]);
|
||||
invokeMethodByName(object, methodName, new Object[] { value });
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 直接读取对象属性值, 无视private/protected修饰符, 不经过getter函数.
|
||||
* 直接读取对象属性值,无视private/protected修饰符,不经过getter函数
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public static <E> E getFieldValue(final Object obj, final String fieldName) {
|
||||
@@ -92,7 +110,7 @@ public class ReflectUtils {
|
||||
}
|
||||
|
||||
/**
|
||||
* 直接设置对象属性值, 无视private/protected修饰符, 不经过setter函数.
|
||||
* 直接设置对象属性值,无视private/protected修饰符,不经过setter函数
|
||||
*/
|
||||
public static <E> void setFieldValue(final Object obj, final String fieldName, final E value) {
|
||||
Field field = getAccessibleField(obj, fieldName);
|
||||
@@ -109,9 +127,10 @@ public class ReflectUtils {
|
||||
}
|
||||
|
||||
/**
|
||||
* 直接调用对象方法, 无视private/protected修饰符.
|
||||
* 用于一次性调用的情况,否则应使用getAccessibleMethod()函数获得Method后反复调用.
|
||||
* 直接调用对象方法,无视private/protected修饰符,
|
||||
* 用于一次性调用的情况,否则应使用getAccessibleMethod()函数获得Method后反复调用,
|
||||
* 同时匹配方法名+参数类型,
|
||||
* 支持静态类及方法调用
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public static <E> E invokeMethod(final Object obj, final String methodName, final Class<?>[] parameterTypes,
|
||||
@@ -122,11 +141,11 @@ public class ReflectUtils {
|
||||
Method method = getAccessibleMethod(obj, methodName, parameterTypes);
|
||||
if (method == null) {
|
||||
//throw new IllegalArgumentException("在 [" + obj.getClass() + "] 中,没有找到 [" + methodName + "] 方法 ");
|
||||
logger.debug("在 [" + obj.getClass() + "] 中,没有找到 [" + methodName + "] 方法 ");
|
||||
logger.debug("在 [" + (obj.getClass() == Class.class ? obj : obj.getClass()) + "] 中,没有找到 [" + methodName + "] 方法 ");
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
return (E)method.invoke(obj, args);
|
||||
return (E)method.invoke(obj.getClass() == Class.class ? null : obj, args);
|
||||
} catch (Exception e) {
|
||||
String msg = "method: "+method+", obj: "+obj+", args: "+args+"";
|
||||
throw convertReflectionExceptionToUnchecked(msg, e);
|
||||
@@ -134,9 +153,10 @@ public class ReflectUtils {
|
||||
}
|
||||
|
||||
/**
|
||||
* 直接调用对象方法, 无视private/protected修饰符,
|
||||
* 用于一次性调用的情况,否则应使用getAccessibleMethodByName()函数获得Method后反复调用.
|
||||
* 只匹配函数名,如果有多个同名函数调用第一个。
|
||||
* 直接调用对象方法,无视private/protected修饰符,
|
||||
* 用于一次性调用的情况,否则应使用getAccessibleMethodByName()函数获得Method后反复调用,
|
||||
* 只匹配函数名,如果有多个同名函数调用第一个,
|
||||
* 支持静态类及方法调用
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public static <E> E invokeMethodByName(final Object obj, final String methodName, final Object[] args) {
|
||||
@@ -144,7 +164,7 @@ public class ReflectUtils {
|
||||
if (method == null) {
|
||||
// 如果为空不报错,直接返回空。
|
||||
// throw new IllegalArgumentException("在 [" + obj.getClass() + "] 中,没有找到 [" + methodName + "] 方法 ");
|
||||
logger.debug("在 [" + obj.getClass() + "] 中,没有找到 [" + methodName + "] 方法 ");
|
||||
logger.debug("在 [" + (obj.getClass() == Class.class ? obj : obj.getClass()) + "] 中,没有找到 [" + methodName + "] 方法 ");
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
@@ -175,7 +195,7 @@ public class ReflectUtils {
|
||||
}
|
||||
}
|
||||
}
|
||||
return (E)method.invoke(obj, args);
|
||||
return (E)method.invoke(obj.getClass() == Class.class ? null : obj, args);
|
||||
} catch (Exception e) {
|
||||
String msg = "method: "+method+", obj: "+obj+", args: "+args+"";
|
||||
throw convertReflectionExceptionToUnchecked(msg, e);
|
||||
@@ -183,8 +203,8 @@ public class ReflectUtils {
|
||||
}
|
||||
|
||||
/**
|
||||
* 循环向上转型, 获取对象的DeclaredField, 并强制设置为可访问.
|
||||
* 如向上转型到Object仍无法找到, 返回null.
|
||||
* 循环向上转型,获取对象的DeclaredField,并强制设置为可访问,
|
||||
* 如向上转型到Object仍无法找到,返回null
|
||||
*/
|
||||
public static Field getAccessibleField(final Object obj, final String fieldName) {
|
||||
// 为空不报错。直接返回 null
|
||||
@@ -207,10 +227,10 @@ public class ReflectUtils {
|
||||
}
|
||||
|
||||
/**
|
||||
* 循环向上转型, 获取对象的DeclaredMethod,并强制设置为可访问.
|
||||
* 如向上转型到Object仍无法找到, 返回null.
|
||||
* 循环向上转型,获取对象的DeclaredMethod,并强制设置为可访问,
|
||||
* 如向上转型到Object仍无法找到,返回null,
|
||||
* 匹配函数名+参数类型。
|
||||
* 用于方法需要被多次调用的情况. 先使用本函数先取得Method,然后调用Method.invoke(Object obj, Object... args)
|
||||
* 用于方法需要被多次调用的情况,先使用本函数先取得Method,然后调用Method.invoke(Object obj, Object... args)
|
||||
*/
|
||||
public static Method getAccessibleMethod(final Object obj, final String methodName,
|
||||
final Class<?>... parameterTypes) {
|
||||
@@ -219,8 +239,12 @@ public class ReflectUtils {
|
||||
if (obj == null){
|
||||
return null;
|
||||
}
|
||||
Class<?> clazz = obj.getClass();
|
||||
if (clazz == Class.class){
|
||||
clazz = (Class) obj;
|
||||
}
|
||||
Validate.notBlank(methodName, "methodName can't be blank");
|
||||
for (Class<?> searchType = obj.getClass(); searchType != Object.class; searchType = searchType.getSuperclass()) {
|
||||
for (Class<?> searchType = clazz; searchType != Object.class; searchType = searchType.getSuperclass()) {
|
||||
try {
|
||||
Method method = searchType.getDeclaredMethod(methodName, parameterTypes);
|
||||
makeAccessible(method);
|
||||
@@ -234,10 +258,10 @@ public class ReflectUtils {
|
||||
}
|
||||
|
||||
/**
|
||||
* 循环向上转型, 获取对象的DeclaredMethod,并强制设置为可访问.
|
||||
* 如向上转型到Object仍无法找到, 返回null.
|
||||
* 循环向上转型,获取对象的DeclaredMethod,并强制设置为可访问,
|
||||
* 如向上转型到Object仍无法找到,返回null,
|
||||
* 只匹配函数名。
|
||||
* 用于方法需要被多次调用的情况. 先使用本函数先取得Method,然后调用Method.invoke(Object obj, Object... args)
|
||||
* 用于方法需要被多次调用的情况,先使用本函数先取得Method,然后调用Method.invoke(Object obj, Object... args)
|
||||
*/
|
||||
public static Method getAccessibleMethodByName(final Object obj, final String methodName, int argsNum) {
|
||||
// 为空不报错。直接返回 null
|
||||
@@ -245,8 +269,12 @@ public class ReflectUtils {
|
||||
if (obj == null){
|
||||
return null;
|
||||
}
|
||||
Class<?> clazz = obj.getClass();
|
||||
if (clazz == Class.class){
|
||||
clazz = (Class) obj;
|
||||
}
|
||||
Validate.notBlank(methodName, "methodName can't be blank");
|
||||
for (Class<?> searchType = obj.getClass(); searchType != Object.class; searchType = searchType.getSuperclass()) {
|
||||
for (Class<?> searchType = clazz; searchType != Object.class; searchType = searchType.getSuperclass()) {
|
||||
Method[] methods = searchType.getDeclaredMethods();
|
||||
for (Method method : methods) {
|
||||
if (method.getName().equals(methodName) && method.getParameterTypes().length == argsNum) {
|
||||
@@ -279,10 +307,9 @@ public class ReflectUtils {
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过反射, 获得Class定义中声明的泛型参数的类型, 注意泛型必须定义在父类处
|
||||
* 如无法找到, 返回Object.class.
|
||||
* eg.
|
||||
* public UserDao extends HibernateDao<User>
|
||||
* 通过反射,获得Class定义中声明的泛型参数的类型,注意泛型必须定义在父类处,
|
||||
* 如无法找到,返回Object.class,
|
||||
* 如 public UserDao extends CrudDao<User>
|
||||
* @param clazz The class to introspect
|
||||
* @return the first generic declaration, or Object.class if cannot be determined
|
||||
*/
|
||||
@@ -292,9 +319,9 @@ public class ReflectUtils {
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过反射, 获得Class定义中声明的父类的泛型参数的类型.
|
||||
* 如无法找到, 返回Object.class.
|
||||
* 如public UserDao extends HibernateDao<User,Long>
|
||||
* 通过反射,获得Class定义中声明的父类的泛型参数的类型,
|
||||
* 如无法找到,返回Object.class,
|
||||
* 如 public UserDao extends CrudDao<User, Long>
|
||||
* @param clazz clazz The class to introspect
|
||||
* @param index the Index of the generic ddeclaration,start from 0.
|
||||
* @return the index generic declaration, or Object.class if cannot be determined
|
||||
@@ -323,6 +350,9 @@ public class ReflectUtils {
|
||||
return (Class) params[index];
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取类的Class,如果为内部类,则返回上级类Class
|
||||
*/
|
||||
public static Class<?> getUserClass(Object instance) {
|
||||
if (instance == null){
|
||||
throw new RuntimeException("Instance must not be null");
|
||||
@@ -339,7 +369,7 @@ public class ReflectUtils {
|
||||
}
|
||||
|
||||
/**
|
||||
* 将反射时的checked exception转换为unchecked exception.
|
||||
* 将反射时的checked exception转换为unchecked exception
|
||||
*/
|
||||
public static RuntimeException convertReflectionExceptionToUnchecked(String msg, Exception e) {
|
||||
if (e instanceof IllegalAccessException || e instanceof IllegalArgumentException
|
||||
|
||||
@@ -3,14 +3,11 @@
|
||||
*/
|
||||
package com.jeesite.common.web;
|
||||
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLDecoder;
|
||||
import java.net.URLEncoder;
|
||||
|
||||
import javax.servlet.http.Cookie;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.jeesite.common.codec.EncodeUtils;
|
||||
import com.jeesite.common.lang.StringUtils;
|
||||
|
||||
/**
|
||||
@@ -60,14 +57,12 @@ public class CookieUtils {
|
||||
*/
|
||||
public static void setCookie(HttpServletResponse response, String name, String value, String path, int maxAge) {
|
||||
if (StringUtils.isNotBlank(name)){
|
||||
name = EncodeUtils.encodeUrl(name);
|
||||
value = EncodeUtils.encodeUrl(value);
|
||||
Cookie cookie = new Cookie(name, null);
|
||||
cookie.setPath(path);
|
||||
cookie.setMaxAge(maxAge);
|
||||
try {
|
||||
cookie.setValue(URLEncoder.encode(value, "utf-8"));
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
cookie.setValue(value);
|
||||
response.addCookie(cookie);
|
||||
}
|
||||
}
|
||||
@@ -113,15 +108,12 @@ public class CookieUtils {
|
||||
public static String getCookie(HttpServletRequest request, HttpServletResponse response, String name, String path, boolean isRemove) {
|
||||
String value = null;
|
||||
if (StringUtils.isNotBlank(name)){
|
||||
name = EncodeUtils.encodeUrl(name);
|
||||
Cookie[] cookies = request.getCookies();
|
||||
if (cookies != null) {
|
||||
for (Cookie cookie : cookies) {
|
||||
if (cookie.getName().equals(name)) {
|
||||
try {
|
||||
value = URLDecoder.decode(cookie.getValue(), "utf-8");
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
value = EncodeUtils.decodeUrl(cookie.getValue());
|
||||
if (isRemove && response != null) {
|
||||
cookie.setPath(path);
|
||||
cookie.setMaxAge(0);
|
||||
|
||||
@@ -110,7 +110,8 @@ public class ServletUtils {
|
||||
}
|
||||
|
||||
String uri = request.getRequestURI();
|
||||
if (StringUtils.inStringIgnoreCase(uri, ".json", ".xml")){
|
||||
if (StringUtils.endsWithIgnoreCase(uri, ".json")
|
||||
|| StringUtils.endsWithIgnoreCase(uri, ".xml")){
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -189,19 +190,22 @@ public class ServletUtils {
|
||||
}
|
||||
}
|
||||
HttpServletRequest request = getRequest();
|
||||
String uri = request.getRequestURI();
|
||||
if (StringUtils.endsWithIgnoreCase(uri, ".xml") || StringUtils
|
||||
.equalsIgnoreCase(request.getParameter("__ajax"), "xml")){
|
||||
return XmlMapper.toXml(resultMap);
|
||||
}else{
|
||||
String functionName = request.getParameter("__callback");
|
||||
if (StringUtils.isNotBlank(functionName)){
|
||||
return JsonMapper.toJsonp(functionName, resultMap);
|
||||
if (request != null){
|
||||
String uri = request.getRequestURI();
|
||||
if (StringUtils.endsWithIgnoreCase(uri, ".xml") || StringUtils
|
||||
.equalsIgnoreCase(request.getParameter("__ajax"), "xml")){
|
||||
return XmlMapper.toXml(resultMap);
|
||||
}else{
|
||||
return JsonMapper.toJson(resultMap);
|
||||
String functionName = request.getParameter("__callback");
|
||||
if (StringUtils.isNotBlank(functionName)){
|
||||
return JsonMapper.toJsonp(functionName, resultMap);
|
||||
}else{
|
||||
return JsonMapper.toJson(resultMap);
|
||||
}
|
||||
}
|
||||
}else{
|
||||
return JsonMapper.toJson(resultMap);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -75,7 +75,6 @@
|
||||
background: transparent;
|
||||
box-shadow: none;
|
||||
}
|
||||
.wrapper,
|
||||
.sidebar,
|
||||
.left-side {
|
||||
background-color: #eaedf1;
|
||||
@@ -168,4 +167,4 @@
|
||||
}
|
||||
}
|
||||
|
||||
.sidebar-menu .treeview-item.active > a {color:#000;background-color:#fff;}
|
||||
.sidebar-menu .treeview-item.active > a {color:#000;background-color:#fff;}
|
||||
|
||||
@@ -76,7 +76,6 @@
|
||||
background: transparent;
|
||||
box-shadow: none;
|
||||
}
|
||||
.wrapper,
|
||||
.sidebar,
|
||||
.left-side {
|
||||
background-color: #263238;
|
||||
@@ -157,4 +156,4 @@
|
||||
border-left-color: #222;
|
||||
}
|
||||
|
||||
.sidebar-menu .treeview-item.active > a {color:#000;background-color:#ddd;}
|
||||
.sidebar-menu .treeview-item.active > a {color:#000;background-color:#ddd;}
|
||||
|
||||
@@ -56,7 +56,6 @@
|
||||
.content-header {
|
||||
background: transparent;
|
||||
}
|
||||
.wrapper,
|
||||
.sidebar,
|
||||
.left-side {
|
||||
background-color: #E3E7EC;
|
||||
@@ -160,4 +159,4 @@
|
||||
background-color: #3b8ab8;
|
||||
}
|
||||
|
||||
.sidebar-menu .treeview-item.active > a {color:#000;background-color:#fff;}
|
||||
.sidebar-menu .treeview-item.active > a {color:#000;background-color:#fff;}
|
||||
|
||||
@@ -0,0 +1,196 @@
|
||||
/*
|
||||
* http://jeesite.com
|
||||
*/
|
||||
.main-header .navbar {
|
||||
background-color: #1890ff;
|
||||
}
|
||||
.main-header .navbar .nav > li > a {
|
||||
color: #ffffff;
|
||||
}
|
||||
.main-header .navbar .nav > li > a:hover,
|
||||
.main-header .navbar .nav > li > a:active,
|
||||
.main-header .navbar .nav > li > a:focus,
|
||||
.main-header .navbar .nav .open > a,
|
||||
.main-header .navbar .nav .open > a:hover,
|
||||
.main-header .navbar .nav .open > a:focus,
|
||||
.main-header .navbar .nav > .active > a {
|
||||
background: rgba(0, 0, 0, 0.1);
|
||||
color: #f6f6f6;
|
||||
}
|
||||
.main-header .navbar .sidebar-toggle {
|
||||
color: #ffffff;
|
||||
}
|
||||
.main-header .navbar .sidebar-toggle:hover {
|
||||
color: #f6f6f6;
|
||||
background: rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
.main-header .navbar .sidebar-toggle {
|
||||
color: #fff;
|
||||
}
|
||||
.main-header .navbar .sidebar-toggle:hover {
|
||||
background-color: #367fa9;
|
||||
}
|
||||
@media (max-width: 767px) {
|
||||
.main-header .navbar .dropdown-menu li.divider {
|
||||
background-color: rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
.main-header .navbar .dropdown-menu li a {
|
||||
color: #fff;
|
||||
}
|
||||
.main-header .navbar .dropdown-menu li a:hover {
|
||||
background: #367fa9;
|
||||
}
|
||||
}
|
||||
.main-header .logo {
|
||||
background-color: #1890ff;
|
||||
color: #ffffff;
|
||||
border-bottom: 0 solid transparent;
|
||||
}
|
||||
.main-header .logo:hover {
|
||||
background-color: #1681e5;
|
||||
}
|
||||
.main-header li.user-header {
|
||||
background-color: #1890ff;
|
||||
}
|
||||
.content-header {
|
||||
background: transparent;
|
||||
}
|
||||
.sidebar,
|
||||
.left-side {
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
.content-wrapper,
|
||||
.main-footer {
|
||||
border-left: 1px solid #e1e2e4;
|
||||
}
|
||||
.user-panel > .info,
|
||||
.user-panel > .info > a {
|
||||
color: #555;
|
||||
}
|
||||
.sidebar-menu > li {
|
||||
-webkit-transition: border-left-color 0.3s ease;
|
||||
-o-transition: border-left-color 0.3s ease;
|
||||
transition: border-left-color 0.3s ease;
|
||||
}
|
||||
.sidebar-menu > li.header {
|
||||
color: #848484;
|
||||
background: #f8f8f8;
|
||||
}
|
||||
.sidebar-menu > li > a {
|
||||
border-left: 3px solid transparent;
|
||||
font-weight: 600;
|
||||
}
|
||||
.sidebar-menu > li:hover > a,
|
||||
.sidebar-menu > li.active > a {
|
||||
color: #000;
|
||||
background: #fafafa;
|
||||
}
|
||||
.sidebar-menu > li.active {
|
||||
border-left-color: #1890ff;
|
||||
}
|
||||
.sidebar-menu > li.active > a {
|
||||
font-weight: 600;
|
||||
}
|
||||
.sidebar-menu > li > .treeview-menu {
|
||||
background: #fafafa;
|
||||
}
|
||||
.sidebar a {
|
||||
color: #555;
|
||||
}
|
||||
.sidebar a:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
.treeview-menu > li > a {
|
||||
color: #555;
|
||||
}
|
||||
.treeview-menu > li.active > a,
|
||||
.treeview-menu > li > a:hover {
|
||||
color: #000;
|
||||
}
|
||||
.sidebar-form {
|
||||
border-radius: 3px;
|
||||
border: 1px solid #d2d6de;
|
||||
margin: 10px 10px;
|
||||
}
|
||||
.sidebar-form input[type="text"],
|
||||
.sidebar-form .btn {
|
||||
box-shadow: none;
|
||||
background-color: #fff;
|
||||
border: 1px solid transparent;
|
||||
height: 35px;
|
||||
}
|
||||
.sidebar-form input[type="text"] {
|
||||
color: #666;
|
||||
border-top-left-radius: 2px;
|
||||
border-top-right-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
border-bottom-left-radius: 2px;
|
||||
}
|
||||
.sidebar-form input[type="text"]:focus,
|
||||
.sidebar-form input[type="text"]:focus + .input-group-btn .btn {
|
||||
background-color: #fff;
|
||||
color: #666;
|
||||
}
|
||||
.sidebar-form input[type="text"]:focus + .input-group-btn .btn {
|
||||
border-left-color: #fff;
|
||||
}
|
||||
.sidebar-form .btn {
|
||||
color: #999;
|
||||
border-top-left-radius: 0;
|
||||
border-top-right-radius: 2px;
|
||||
border-bottom-right-radius: 2px;
|
||||
border-bottom-left-radius: 0;
|
||||
}
|
||||
@media (min-width: 768px) {
|
||||
.skin-blue-light.sidebar-mini.sidebar-collapse .sidebar-menu > li > .treeview-menu {
|
||||
border-left: 1px solid #d2d6de;
|
||||
}
|
||||
}
|
||||
.main-footer {
|
||||
border-top-color: #d2d6de;
|
||||
}
|
||||
.skin-blue.layout-top-nav .main-header > .logo {
|
||||
background-color: #1890ff;
|
||||
color: #ffffff;
|
||||
border-bottom: 0 solid transparent;
|
||||
}
|
||||
.skin-blue.layout-top-nav .main-header > .logo:hover {
|
||||
background-color: #3b8ab8;
|
||||
}
|
||||
|
||||
.sidebar-menu .treeview-item.active > a {color:#1890ff;background-color:#e1f1ff;border-right:solid #57a6ee;}
|
||||
|
||||
.content-wrapper, .right-side, body {background-color: #f5f5f5;}
|
||||
|
||||
a, a:hover, a:active, a:focus, .form-unit,
|
||||
th[aria-selected=true] .ui-jqgrid-sortable {color:#1890ff;}
|
||||
.btn-primary, .btn-primary:hover, .btn-primary:active,
|
||||
.btn-primary.hover, .btn-primary.focus, .btn-primary:focus,
|
||||
.btn-primary.active.focus, .btn-primary.active:focus, .btn-primary.active:hover,
|
||||
.btn-primary:active.focus, .btn-primary:active:focus, .btn-primary:active:hover,
|
||||
.open>.dropdown-toggle.btn-primary.focus, .open>.dropdown-toggle.btn-primary:focus,
|
||||
.open>.dropdown-toggle.btn-primary:hover, .layui-layer-btn .layui-layer-btn0,
|
||||
.select2-container--default .select2-selection--multiple .select2-selection__choice,
|
||||
.select2-container--default .select2-results__option--highlighted[aria-selected],
|
||||
.wup_container .placeholder .webuploader-pick {background-color:#1890ff!important;border-color:#1890ff;}
|
||||
|
||||
.tabpanel_mover li {padding:1px 16px 2px 3px;margin:6px 0 6px 6px;border:1px solid #e4e4e4;
|
||||
border-radius:3px;box-shadow:0 0 8px #e0e0e0;background:#fff;box-shadow:0 0 5px #e6e6e6;}
|
||||
.tabpanel_mover li.active {background-color:#3aa0ff;}
|
||||
.tabpanel_mover li.active div {color:#fff;}
|
||||
.tabpanel_mover li .closer {font:6px/1 FontAwesome;top:6px;right:2px;background:none;opacity:0.8}
|
||||
.tabpanel_mover li .closer:before {content:"\f00d";}
|
||||
.tabpanel_mover li .closer:hover {background:none;}
|
||||
.tabpanel_tab_content {border-bottom-color:#eeeeee;}
|
||||
|
||||
.main-content {padding:10px;}
|
||||
.ui-layout-container {padding:10px;}
|
||||
.ui-layout-pane>.main-content {padding:0;}
|
||||
.ui-layout-resizer {background:transparent;}
|
||||
.ui-layout-content>.wrapper>.main-content {padding:0;}
|
||||
.box-main,.nav-main{border-radius:3px;box-shadow:0 0 5px #e0e0e0;}
|
||||
.box-main>.box-header {border-bottom-color:#cae6ff;}
|
||||
.box-main>.box-header .box-title .fa {color:#1890ff;}
|
||||
.form-control:focus,.select2-container--default.select2-container--focus .select2-selection--multiple,
|
||||
.select2-container--default .select2-search--dropdown .select2-search__field {border-color:#66afe9!important;}
|
||||
.ui-jqgrid tr.ui-row-ltr td {border-right:0!important;}
|
||||
@@ -56,7 +56,6 @@
|
||||
.content-header {
|
||||
background: transparent;
|
||||
}
|
||||
.wrapper,
|
||||
.sidebar,
|
||||
.left-side {
|
||||
background-color: #263238;
|
||||
@@ -138,4 +137,4 @@
|
||||
background-color: #3b8ab8;
|
||||
}
|
||||
|
||||
.sidebar-menu .treeview-item.active > a {color:#fff;background-color:#3c8dbc;}
|
||||
.sidebar-menu .treeview-item.active > a {color:#fff;background-color:#3c8dbc;}
|
||||
|
||||
@@ -56,7 +56,6 @@
|
||||
.content-header {
|
||||
background: transparent;
|
||||
}
|
||||
.wrapper,
|
||||
.sidebar,
|
||||
.left-side {
|
||||
background-color: #eaedf1;
|
||||
@@ -149,4 +148,16 @@
|
||||
}
|
||||
}
|
||||
|
||||
.sidebar-menu .treeview-item.active > a {color:#000;background-color:#fff;}
|
||||
.sidebar-menu .treeview-item.active > a {color:#000;background-color:#fff;}
|
||||
|
||||
a, a:hover, a:active, a:focus, .form-unit,
|
||||
th[aria-selected=true] .ui-jqgrid-sortable {color:#00a65a;}
|
||||
.btn-primary, .btn-primary:hover, .btn-primary:active,
|
||||
.btn-primary.hover, .btn-primary.focus, .btn-primary:focus,
|
||||
.btn-primary.active.focus, .btn-primary.active:focus, .btn-primary.active:hover,
|
||||
.btn-primary:active.focus, .btn-primary:active:focus, .btn-primary:active:hover,
|
||||
.open>.dropdown-toggle.btn-primary.focus, .open>.dropdown-toggle.btn-primary:focus,
|
||||
.open>.dropdown-toggle.btn-primary:hover, .layui-layer-btn .layui-layer-btn0,
|
||||
.select2-container--default .select2-selection--multiple .select2-selection__choice,
|
||||
.select2-container--default .select2-results__option--highlighted[aria-selected],
|
||||
.wup_container .placeholder .webuploader-pick {background-color:#00a65a!important;border-color:#00a65a;}
|
||||
|
||||
@@ -56,7 +56,6 @@
|
||||
.content-header {
|
||||
background: transparent;
|
||||
}
|
||||
.wrapper,
|
||||
.sidebar,
|
||||
.left-side {
|
||||
background-color: #263238;
|
||||
@@ -131,3 +130,15 @@
|
||||
}
|
||||
|
||||
.sidebar-menu .treeview-item.active > a {color:#fff;background-color:#00a65a;}
|
||||
|
||||
a, a:hover, a:active, a:focus, .form-unit,
|
||||
th[aria-selected=true] .ui-jqgrid-sortable {color:#00a65a;}
|
||||
.btn-primary, .btn-primary:hover, .btn-primary:active,
|
||||
.btn-primary.hover, .btn-primary.focus, .btn-primary:focus,
|
||||
.btn-primary.active.focus, .btn-primary.active:focus, .btn-primary.active:hover,
|
||||
.btn-primary:active.focus, .btn-primary:active:focus, .btn-primary:active:hover,
|
||||
.open>.dropdown-toggle.btn-primary.focus, .open>.dropdown-toggle.btn-primary:focus,
|
||||
.open>.dropdown-toggle.btn-primary:hover, .layui-layer-btn .layui-layer-btn0,
|
||||
.select2-container--default .select2-selection--multiple .select2-selection__choice,
|
||||
.select2-container--default .select2-results__option--highlighted[aria-selected],
|
||||
.wup_container .placeholder .webuploader-pick {background-color:#00a65a!important;border-color:#00a65a;}
|
||||
|
||||
@@ -56,7 +56,6 @@
|
||||
.content-header {
|
||||
background: transparent;
|
||||
}
|
||||
.wrapper,
|
||||
.sidebar,
|
||||
.left-side {
|
||||
background-color: #eaedf1;
|
||||
@@ -149,4 +148,16 @@
|
||||
}
|
||||
}
|
||||
|
||||
.sidebar-menu .treeview-item.active > a {color:#000;background-color:#fff;}
|
||||
.sidebar-menu .treeview-item.active > a {color:#000;background-color:#fff;}
|
||||
|
||||
a, a:hover, a:active, a:focus, .form-unit,
|
||||
th[aria-selected=true] .ui-jqgrid-sortable {color:#605ca8;}
|
||||
.btn-primary, .btn-primary:hover, .btn-primary:active,
|
||||
.btn-primary.hover, .btn-primary.focus, .btn-primary:focus,
|
||||
.btn-primary.active.focus, .btn-primary.active:focus, .btn-primary.active:hover,
|
||||
.btn-primary:active.focus, .btn-primary:active:focus, .btn-primary:active:hover,
|
||||
.open>.dropdown-toggle.btn-primary.focus, .open>.dropdown-toggle.btn-primary:focus,
|
||||
.open>.dropdown-toggle.btn-primary:hover, .layui-layer-btn .layui-layer-btn0,
|
||||
.select2-container--default .select2-selection--multiple .select2-selection__choice,
|
||||
.select2-container--default .select2-results__option--highlighted[aria-selected],
|
||||
.wup_container .placeholder .webuploader-pick {background-color:#605ca8!important;border-color:#605ca8;}
|
||||
|
||||
@@ -56,7 +56,6 @@
|
||||
.content-header {
|
||||
background: transparent;
|
||||
}
|
||||
.wrapper,
|
||||
.sidebar,
|
||||
.left-side {
|
||||
background-color: #263238;
|
||||
@@ -131,3 +130,15 @@
|
||||
}
|
||||
|
||||
.sidebar-menu .treeview-item.active > a {color:#fff;background-color:#605ca8;}
|
||||
|
||||
a, a:hover, a:active, a:focus, .form-unit,
|
||||
th[aria-selected=true] .ui-jqgrid-sortable {color:#605ca8;}
|
||||
.btn-primary, .btn-primary:hover, .btn-primary:active,
|
||||
.btn-primary.hover, .btn-primary.focus, .btn-primary:focus,
|
||||
.btn-primary.active.focus, .btn-primary.active:focus, .btn-primary.active:hover,
|
||||
.btn-primary:active.focus, .btn-primary:active:focus, .btn-primary:active:hover,
|
||||
.open>.dropdown-toggle.btn-primary.focus, .open>.dropdown-toggle.btn-primary:focus,
|
||||
.open>.dropdown-toggle.btn-primary:hover, .layui-layer-btn .layui-layer-btn0,
|
||||
.select2-container--default .select2-selection--multiple .select2-selection__choice,
|
||||
.select2-container--default .select2-results__option--highlighted[aria-selected],
|
||||
.wup_container .placeholder .webuploader-pick {background-color:#605ca8!important;border-color:#605ca8;}
|
||||
|
||||
@@ -56,7 +56,6 @@
|
||||
.content-header {
|
||||
background: transparent;
|
||||
}
|
||||
.wrapper,
|
||||
.sidebar,
|
||||
.left-side {
|
||||
background-color: #eaedf1;
|
||||
@@ -149,4 +148,16 @@
|
||||
}
|
||||
}
|
||||
|
||||
.sidebar-menu .treeview-item.active > a {color:#000;background-color:#fff;}
|
||||
.sidebar-menu .treeview-item.active > a {color:#000;background-color:#fff;}
|
||||
|
||||
a, a:hover, a:active, a:focus, .form-unit,
|
||||
th[aria-selected=true] .ui-jqgrid-sortable {color:#dd4b39;}
|
||||
.btn-primary, .btn-primary:hover, .btn-primary:active,
|
||||
.btn-primary.hover, .btn-primary.focus, .btn-primary:focus,
|
||||
.btn-primary.active.focus, .btn-primary.active:focus, .btn-primary.active:hover,
|
||||
.btn-primary:active.focus, .btn-primary:active:focus, .btn-primary:active:hover,
|
||||
.open>.dropdown-toggle.btn-primary.focus, .open>.dropdown-toggle.btn-primary:focus,
|
||||
.open>.dropdown-toggle.btn-primary:hover, .layui-layer-btn .layui-layer-btn0,
|
||||
.select2-container--default .select2-selection--multiple .select2-selection__choice,
|
||||
.select2-container--default .select2-results__option--highlighted[aria-selected],
|
||||
.wup_container .placeholder .webuploader-pick {background-color:#dd4b39!important;border-color:#dd4b39;}
|
||||
|
||||
@@ -56,7 +56,6 @@
|
||||
.content-header {
|
||||
background: transparent;
|
||||
}
|
||||
.wrapper,
|
||||
.sidebar,
|
||||
.left-side {
|
||||
background-color: #263238;
|
||||
@@ -130,4 +129,16 @@
|
||||
border-bottom-left-radius: 0;
|
||||
}
|
||||
|
||||
.sidebar-menu .treeview-item.active > a {color:#fff;background-color:#dd4b39;}
|
||||
.sidebar-menu .treeview-item.active > a {color:#fff;background-color:#dd4b39;}
|
||||
|
||||
a, a:hover, a:active, a:focus, .form-unit,
|
||||
th[aria-selected=true] .ui-jqgrid-sortable {color:#dd4b39;}
|
||||
.btn-primary, .btn-primary:hover, .btn-primary:active,
|
||||
.btn-primary.hover, .btn-primary.focus, .btn-primary:focus,
|
||||
.btn-primary.active.focus, .btn-primary.active:focus, .btn-primary.active:hover,
|
||||
.btn-primary:active.focus, .btn-primary:active:focus, .btn-primary:active:hover,
|
||||
.open>.dropdown-toggle.btn-primary.focus, .open>.dropdown-toggle.btn-primary:focus,
|
||||
.open>.dropdown-toggle.btn-primary:hover, .layui-layer-btn .layui-layer-btn0,
|
||||
.select2-container--default .select2-selection--multiple .select2-selection__choice,
|
||||
.select2-container--default .select2-results__option--highlighted[aria-selected],
|
||||
.wup_container .placeholder .webuploader-pick {background-color:#dd4b39!important;border-color:#dd4b39;}
|
||||
|
||||
@@ -56,7 +56,6 @@
|
||||
.content-header {
|
||||
background: transparent;
|
||||
}
|
||||
.wrapper,
|
||||
.sidebar,
|
||||
.left-side {
|
||||
background-color: #eaedf1;
|
||||
@@ -149,4 +148,16 @@
|
||||
}
|
||||
}
|
||||
|
||||
.sidebar-menu .treeview-item.active > a {color:#000;background-color:#fff;}
|
||||
.sidebar-menu .treeview-item.active > a {color:#000;background-color:#fff;}
|
||||
|
||||
a, a:hover, a:active, a:focus, .form-unit,
|
||||
th[aria-selected=true] .ui-jqgrid-sortable {color:#f39c12;}
|
||||
.btn-primary, .btn-primary:hover, .btn-primary:active,
|
||||
.btn-primary.hover, .btn-primary.focus, .btn-primary:focus,
|
||||
.btn-primary.active.focus, .btn-primary.active:focus, .btn-primary.active:hover,
|
||||
.btn-primary:active.focus, .btn-primary:active:focus, .btn-primary:active:hover,
|
||||
.open>.dropdown-toggle.btn-primary.focus, .open>.dropdown-toggle.btn-primary:focus,
|
||||
.open>.dropdown-toggle.btn-primary:hover, .layui-layer-btn .layui-layer-btn0,
|
||||
.select2-container--default .select2-selection--multiple .select2-selection__choice,
|
||||
.select2-container--default .select2-results__option--highlighted[aria-selected],
|
||||
.wup_container .placeholder .webuploader-pick {background-color:#f39c12!important;border-color:#f39c12;}
|
||||
|
||||
@@ -56,7 +56,6 @@
|
||||
.content-header {
|
||||
background: transparent;
|
||||
}
|
||||
.wrapper,
|
||||
.sidebar,
|
||||
.left-side {
|
||||
background-color: #263238;
|
||||
@@ -130,4 +129,16 @@
|
||||
border-bottom-left-radius: 0;
|
||||
}
|
||||
|
||||
.sidebar-menu .treeview-item.active > a {color:#fff;background-color:#f39c12;}
|
||||
.sidebar-menu .treeview-item.active > a {color:#fff;background-color:#f39c12;}
|
||||
|
||||
a, a:hover, a:active, a:focus, .form-unit,
|
||||
th[aria-selected=true] .ui-jqgrid-sortable {color:#f39c12;}
|
||||
.btn-primary, .btn-primary:hover, .btn-primary:active,
|
||||
.btn-primary.hover, .btn-primary.focus, .btn-primary:focus,
|
||||
.btn-primary.active.focus, .btn-primary.active:focus, .btn-primary.active:hover,
|
||||
.btn-primary:active.focus, .btn-primary:active:focus, .btn-primary:active:hover,
|
||||
.open>.dropdown-toggle.btn-primary.focus, .open>.dropdown-toggle.btn-primary:focus,
|
||||
.open>.dropdown-toggle.btn-primary:hover, .layui-layer-btn .layui-layer-btn0,
|
||||
.select2-container--default .select2-selection--multiple .select2-selection__choice,
|
||||
.select2-container--default .select2-results__option--highlighted[aria-selected],
|
||||
.wup_container .placeholder .webuploader-pick {background-color:#f39c12!important;border-color:#f39c12;}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Electron */ if(typeof module==='object'){window.module=module;module=undefined;}
|
||||
if(typeof module==='object'){window.module=module;module=undefined;}/* Electron Support */
|
||||
/*!
|
||||
* jQuery JavaScript Library v1.12.4
|
||||
* http://jquery.com/
|
||||
@@ -211,7 +211,8 @@ jQuery.extend = jQuery.fn.extend = function() {
|
||||
copy = options[ name ];
|
||||
|
||||
// Prevent never-ending loop
|
||||
if ( target === copy ) {
|
||||
// if ( target === copy ) {
|
||||
if (name === "__proto__" || target === copy) { // 修复jQuery原型污染漏洞 ThinkGem
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
18706
common/src/main/resources/static/jquery/jquery-ui-1.12.1.js
vendored
Normal file
18706
common/src/main/resources/static/jquery/jquery-ui-1.12.1.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
13
common/src/main/resources/static/jquery/jquery-ui-1.12.1.min.js
vendored
Normal file
13
common/src/main/resources/static/jquery/jquery-ui-1.12.1.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
2564
common/src/main/resources/static/jquery/jquery-ui-sortable-1.12.1.js
Normal file
2564
common/src/main/resources/static/jquery/jquery-ui-sortable-1.12.1.js
Normal file
File diff suppressed because it is too large
Load Diff
7
common/src/main/resources/static/jquery/jquery-ui-sortable-1.12.1.min.js
vendored
Normal file
7
common/src/main/resources/static/jquery/jquery-ui-sortable-1.12.1.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@@ -1,41 +1,12 @@
|
||||
/**
|
||||
|
||||
@Name:layer v3.0.3 Web弹层组件
|
||||
@Author:贤心
|
||||
@Site:http://layer.layui.com
|
||||
@License:MIT
|
||||
|
||||
*/
|
||||
|
||||
;!function(window, undefined){
|
||||
"use strict";
|
||||
|
||||
var i18n = {
|
||||
btnOk: '确定',
|
||||
btnCancel: '取消',
|
||||
title: '信息',
|
||||
promptTipA: '最多输入',
|
||||
promptTipB: '个字符',
|
||||
noPicture: '没有图片',
|
||||
photoError: '当前图片地址异常<br>是否继续查看下一张?',
|
||||
photoNextPage: '下一张',
|
||||
photoClose: '不看了'
|
||||
};
|
||||
|
||||
if (window.lang == 'en'){
|
||||
i18n = {
|
||||
btnOk: 'Ok',
|
||||
btnCancel: 'Cancle',
|
||||
title: 'Information',
|
||||
promptTipA: 'Enter ',
|
||||
promptTipB: 'character at most.',
|
||||
noPicture: 'No picture',
|
||||
photoError: 'Current image address error.<br>Next slide?',
|
||||
photoNextPage: 'The next',
|
||||
photoClose: 'Close'
|
||||
};
|
||||
}
|
||||
|
||||
var isLayui = window.layui && layui.define, $, win, ready = {
|
||||
getPath: function(){
|
||||
var js = document.scripts, script = js[js.length - 1], jsPath = script.src;
|
||||
@@ -44,7 +15,7 @@ var isLayui = window.layui && layui.define, $, win, ready = {
|
||||
}(),
|
||||
|
||||
config: {}, end: {}, minIndex: 0, minLeft: [],
|
||||
btn: [i18n.btnOk, i18n.btnCancel],
|
||||
//btn: [layer.i18n.btnOk, layer.i18n.btnCancel], // ThinkGem
|
||||
|
||||
//五种原始层模式
|
||||
type: ['dialog', 'page', 'iframe', 'loading', 'tips']
|
||||
@@ -53,6 +24,17 @@ var isLayui = window.layui && layui.define, $, win, ready = {
|
||||
//默认内置方法。
|
||||
var layer = {
|
||||
v: '3.0.3',
|
||||
i18n: { // ThinkGem 国际化支持
|
||||
btnOk: '确定',
|
||||
btnCancel: '取消',
|
||||
title: '信息',
|
||||
promptTipA: '最多输入',
|
||||
promptTipB: '个字符',
|
||||
noPicture: '没有图片',
|
||||
photoError: '当前图片地址异常<br>是否继续查看下一张?',
|
||||
photoNextPage: '下一张',
|
||||
photoClose: '不看了'
|
||||
},
|
||||
ie: function(){ //ie版本
|
||||
var agent = navigator.userAgent.toLowerCase();
|
||||
return (!!window.ActiveXObject || "ActiveXObject" in window) ? (
|
||||
@@ -133,7 +115,8 @@ var layer = {
|
||||
}
|
||||
return layer.open($.extend({
|
||||
content: content,
|
||||
btn: ready.btn,
|
||||
//btn: ready.btn,
|
||||
btn: [layer.i18n.btnOk, layer.i18n.btnCancel],
|
||||
yes: yes,
|
||||
btn2: cancel
|
||||
}, type ? {} : options));
|
||||
@@ -210,7 +193,7 @@ Class.pt.config = {
|
||||
shade: 0.3,
|
||||
fixed: true,
|
||||
move: doms[1],
|
||||
title: i18n.title,
|
||||
title: function(){return layer.i18n.title},
|
||||
offset: 'auto',
|
||||
area: 'auto',
|
||||
closeBtn: 1,
|
||||
@@ -232,7 +215,7 @@ Class.pt.vessel = function(conType, callback){
|
||||
var zIndex = config.zIndex + times, titype = typeof config.title === 'object';
|
||||
var ismax = config.maxmin && (config.type === 1 || config.type === 2);
|
||||
var titleHTML = (config.title ? '<div class="layui-layer-title" style="'+ (titype ? config.title[1] : '') +'">'
|
||||
+ (titype ? config.title[0] : config.title)
|
||||
+ (titype ? config.title[0] : (typeof config.title === 'function' ? config.title() : config.title))
|
||||
+ '</div>' : '');
|
||||
|
||||
config.zIndex = zIndex;
|
||||
@@ -248,7 +231,8 @@ Class.pt.vessel = function(conType, callback){
|
||||
+ (config.type == 1 && conType ? '' : (config.content||''))
|
||||
+ '</div>'
|
||||
+ '<span class="layui-layer-setwin">'+ function(){
|
||||
var closebtn = ismax ? '<a class="layui-layer-min" href="javascript:;"><cite></cite></a><a class="layui-layer-ico layui-layer-max" href="javascript:;"></a>' : '';
|
||||
var closebtn = ismax && config.title ? '<a class="layui-layer-min" href="javascript:;"><cite></cite></a>' : ''; // ThinkGem 必须有标题的清空下才能最小化
|
||||
closebtn += ismax ? '<a class="layui-layer-ico layui-layer-max" href="javascript:;"></a>' : '';
|
||||
config.closeBtn && (closebtn += '<a class="layui-layer-ico '+ doms[7] +' '+ doms[7] + (config.title ? config.closeBtn : (config.type == 4 ? '1' : '2')) +'" href="javascript:;"></a>');
|
||||
return closebtn;
|
||||
}() + '</span>'
|
||||
@@ -292,7 +276,8 @@ Class.pt.creat = function(){
|
||||
|
||||
switch(config.type){
|
||||
case 0:
|
||||
config.btn = ('btn' in config) ? config.btn : ready.btn[0];
|
||||
//config.btn = ('btn' in config) ? config.btn : ready.btn[0]; ThinkGem
|
||||
config.btn = ('btn' in config) ? config.btn : layer.i18n.btnOk;// ThinkGem
|
||||
layer.closeAll('dialog');
|
||||
break;
|
||||
case 2:
|
||||
@@ -1020,7 +1005,7 @@ layer.prompt = function(options, yes){
|
||||
|
||||
return layer.open($.extend({
|
||||
type: 1
|
||||
,btn: [i18n.btnOk,i18n.btnCancel]
|
||||
,btn: [layer.i18n.btnOk,layer.i18n.btnCancel]
|
||||
,content: content
|
||||
,skin: 'layui-layer-prompt' + skin('prompt')
|
||||
,maxWidth: win.width()
|
||||
@@ -1035,7 +1020,7 @@ layer.prompt = function(options, yes){
|
||||
if(value === ''){
|
||||
prompt.focus();
|
||||
} else if(value.length > (options.maxlength||500)) {
|
||||
layer.tips(i18n.promptTipA + (options.maxlength || 500) + i18n.promptTipB, prompt, {tips: 1});
|
||||
layer.tips(layer.i18n.promptTipA + (options.maxlength || 500) + layer.i18n.promptTipB, prompt, {tips: 1});
|
||||
} else {
|
||||
yes && yes(value, index, prompt);
|
||||
}
|
||||
@@ -1287,9 +1272,9 @@ layer.photos = function(options, loop, key){
|
||||
}, options));
|
||||
}, function(){
|
||||
layer.close(dict.loadi);
|
||||
layer.msg(i18n.photoError, {
|
||||
layer.msg(layer.i18n.photoError, {
|
||||
time: 30000,
|
||||
btn: [i18n.photoNextPage, i18n.photoClose],
|
||||
btn: [layer.i18n.photoNextPage, layer.i18n.photoClose],
|
||||
yes: function(){
|
||||
data.length > 1 && dict.imgnext(true,true);
|
||||
}
|
||||
|
||||
24
common/src/main/resources/static/select2/4.0/i18n/ja_JP.js
vendored
Normal file
24
common/src/main/resources/static/select2/4.0/i18n/ja_JP.js
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
(function() {
|
||||
if (jQuery && jQuery.fn && jQuery.fn.select2 && jQuery.fn.select2.amd)
|
||||
var e = jQuery.fn.select2.amd;
|
||||
return e.define("select2/i18n/zh_CN", [], function() {
|
||||
return { errorLoading : function() {
|
||||
return "結果に載せることはできない。"
|
||||
}, inputTooLong : function(e) {
|
||||
var t = e.input.length - e.maximum, n = "" + t + "文字を削除してください";
|
||||
return n
|
||||
}, inputTooShort : function(e) {
|
||||
var t = e.minimum - e.input.length, n = "少なくとも" + t + "文字を入力してください";
|
||||
return n
|
||||
}, loadingMore : function() {
|
||||
return "より多くの……"
|
||||
}, maximumSelected : function(e) {
|
||||
var t = "選択するしかない" + e.maximum + "項目別";
|
||||
return t
|
||||
}, noResults : function() {
|
||||
return "一致する項目を見つけることができなかった"
|
||||
}, searching : function() {
|
||||
return "検索しています……"
|
||||
} }
|
||||
}), { define : e.define, require : e.require }
|
||||
})();
|
||||
File diff suppressed because it is too large
Load Diff
@@ -4,6 +4,7 @@
|
||||
DROP TABLE js_gen_table_column;
|
||||
DROP TABLE js_gen_table;
|
||||
DROP TABLE js_sys_company_office;
|
||||
DROP TABLE js_sys_employee_office;
|
||||
DROP TABLE js_sys_employee_post;
|
||||
DROP TABLE js_sys_user_data_scope;
|
||||
DROP TABLE js_sys_user_role;
|
||||
@@ -276,6 +277,17 @@ CREATE TABLE js_sys_employee
|
||||
);
|
||||
|
||||
|
||||
-- 员工附属机构关系表
|
||||
CREATE TABLE js_sys_employee_office
|
||||
(
|
||||
id varchar(64) NOT NULL UNIQUE,
|
||||
emp_code varchar(64) NOT NULL,
|
||||
office_code varchar(64) NOT NULL,
|
||||
post_code varchar(64),
|
||||
PRIMARY KEY (emp_code, office_code)
|
||||
);
|
||||
|
||||
|
||||
-- 员工与岗位关联表
|
||||
CREATE TABLE js_sys_employee_post
|
||||
(
|
||||
@@ -418,6 +430,7 @@ CREATE TABLE js_sys_menu
|
||||
menu_target varchar(20),
|
||||
menu_icon varchar(100),
|
||||
menu_color varchar(50),
|
||||
menu_title varchar(100),
|
||||
permission varchar(1000),
|
||||
weight decimal(4),
|
||||
is_show char(1) NOT NULL,
|
||||
@@ -503,7 +516,7 @@ CREATE TABLE js_sys_msg_inner_record
|
||||
(
|
||||
id varchar(64) NOT NULL,
|
||||
msg_inner_id varchar(64) NOT NULL,
|
||||
receive_user_code varchar(64),
|
||||
receive_user_code varchar(64) NOT NULL,
|
||||
receive_user_name varchar(100) NOT NULL,
|
||||
read_status char(1) NOT NULL,
|
||||
read_date timestamp,
|
||||
@@ -670,6 +683,7 @@ CREATE TABLE js_sys_role
|
||||
is_sys char(1),
|
||||
user_type varchar(16),
|
||||
data_scope char(1),
|
||||
biz_scope varchar(255),
|
||||
status char(1) DEFAULT '0' NOT NULL,
|
||||
create_by varchar(64) NOT NULL,
|
||||
create_date timestamp NOT NULL,
|
||||
@@ -678,6 +692,26 @@ CREATE TABLE js_sys_role
|
||||
remarks vargraphic(500),
|
||||
corp_code varchar(64) DEFAULT '0' NOT NULL,
|
||||
corp_name vargraphic(100) DEFAULT 'JeeSite' NOT NULL,
|
||||
extend_s1 vargraphic(500),
|
||||
extend_s2 vargraphic(500),
|
||||
extend_s3 vargraphic(500),
|
||||
extend_s4 vargraphic(500),
|
||||
extend_s5 vargraphic(500),
|
||||
extend_s6 vargraphic(500),
|
||||
extend_s7 vargraphic(500),
|
||||
extend_s8 vargraphic(500),
|
||||
extend_i1 decimal(19),
|
||||
extend_i2 decimal(19),
|
||||
extend_i3 decimal(19),
|
||||
extend_i4 decimal(19),
|
||||
extend_f1 decimal(19,4),
|
||||
extend_f2 decimal(19,4),
|
||||
extend_f3 decimal(19,4),
|
||||
extend_f4 decimal(19,4),
|
||||
extend_d1 timestamp,
|
||||
extend_d2 timestamp,
|
||||
extend_d3 timestamp,
|
||||
extend_d4 timestamp,
|
||||
PRIMARY KEY (role_code)
|
||||
);
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
IF OBJECT_ID('[js_gen_table_column]') IS NOT NULL DROP TABLE [js_gen_table_column];
|
||||
IF OBJECT_ID('[js_gen_table]') IS NOT NULL DROP TABLE [js_gen_table];
|
||||
IF OBJECT_ID('[js_sys_company_office]') IS NOT NULL DROP TABLE [js_sys_company_office];
|
||||
IF OBJECT_ID('[js_sys_employee_office]') IS NOT NULL DROP TABLE [js_sys_employee_office];
|
||||
IF OBJECT_ID('[js_sys_employee_post]') IS NOT NULL DROP TABLE [js_sys_employee_post];
|
||||
IF OBJECT_ID('[js_sys_user_data_scope]') IS NOT NULL DROP TABLE [js_sys_user_data_scope];
|
||||
IF OBJECT_ID('[js_sys_user_role]') IS NOT NULL DROP TABLE [js_sys_user_role];
|
||||
@@ -276,6 +277,17 @@ CREATE TABLE [js_sys_employee]
|
||||
);
|
||||
|
||||
|
||||
-- 员工附属机构关系表
|
||||
CREATE TABLE [js_sys_employee_office]
|
||||
(
|
||||
[id] varchar(64) NOT NULL UNIQUE,
|
||||
[emp_code] varchar(64) NOT NULL,
|
||||
[office_code] varchar(64) NOT NULL,
|
||||
[post_code] varchar(64),
|
||||
PRIMARY KEY ([emp_code], [office_code])
|
||||
);
|
||||
|
||||
|
||||
-- 员工与岗位关联表
|
||||
CREATE TABLE [js_sys_employee_post]
|
||||
(
|
||||
@@ -418,6 +430,7 @@ CREATE TABLE [js_sys_menu]
|
||||
[menu_target] varchar(20),
|
||||
[menu_icon] varchar(100),
|
||||
[menu_color] varchar(50),
|
||||
[menu_title] varchar(100),
|
||||
[permission] varchar(1000),
|
||||
[weight] decimal(4),
|
||||
[is_show] char(1) NOT NULL,
|
||||
@@ -503,7 +516,7 @@ CREATE TABLE [js_sys_msg_inner_record]
|
||||
(
|
||||
[id] varchar(64) NOT NULL,
|
||||
[msg_inner_id] varchar(64) NOT NULL,
|
||||
[receive_user_code] varchar(64),
|
||||
[receive_user_code] varchar(64) NOT NULL,
|
||||
[receive_user_name] varchar(100) NOT NULL,
|
||||
[read_status] char(1) NOT NULL,
|
||||
[read_date] datetime,
|
||||
@@ -670,6 +683,7 @@ CREATE TABLE [js_sys_role]
|
||||
[is_sys] char(1),
|
||||
[user_type] varchar(16),
|
||||
[data_scope] char(1),
|
||||
[biz_scope] varchar(255),
|
||||
[status] char(1) DEFAULT '0' NOT NULL,
|
||||
[create_by] varchar(64) NOT NULL,
|
||||
[create_date] datetime NOT NULL,
|
||||
@@ -678,6 +692,26 @@ CREATE TABLE [js_sys_role]
|
||||
[remarks] nvarchar(500),
|
||||
[corp_code] varchar(64) DEFAULT '0' NOT NULL,
|
||||
[corp_name] nvarchar(100) DEFAULT 'JeeSite' NOT NULL,
|
||||
[extend_s1] nvarchar(500),
|
||||
[extend_s2] nvarchar(500),
|
||||
[extend_s3] nvarchar(500),
|
||||
[extend_s4] nvarchar(500),
|
||||
[extend_s5] nvarchar(500),
|
||||
[extend_s6] nvarchar(500),
|
||||
[extend_s7] nvarchar(500),
|
||||
[extend_s8] nvarchar(500),
|
||||
[extend_i1] decimal(19),
|
||||
[extend_i2] decimal(19),
|
||||
[extend_i3] decimal(19),
|
||||
[extend_i4] decimal(19),
|
||||
[extend_f1] decimal(19,4),
|
||||
[extend_f2] decimal(19,4),
|
||||
[extend_f3] decimal(19,4),
|
||||
[extend_f4] decimal(19,4),
|
||||
[extend_d1] datetime,
|
||||
[extend_d2] datetime,
|
||||
[extend_d3] datetime,
|
||||
[extend_d4] datetime,
|
||||
PRIMARY KEY ([role_code])
|
||||
);
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ SET SESSION FOREIGN_KEY_CHECKS=0;
|
||||
DROP TABLE IF EXISTS js_gen_table_column;
|
||||
DROP TABLE IF EXISTS js_gen_table;
|
||||
DROP TABLE IF EXISTS js_sys_company_office;
|
||||
DROP TABLE IF EXISTS js_sys_employee_office;
|
||||
DROP TABLE IF EXISTS js_sys_employee_post;
|
||||
DROP TABLE IF EXISTS js_sys_user_data_scope;
|
||||
DROP TABLE IF EXISTS js_sys_user_role;
|
||||
@@ -277,6 +278,18 @@ CREATE TABLE js_sys_employee
|
||||
) COMMENT = '员工表';
|
||||
|
||||
|
||||
-- 员工附属机构关系表
|
||||
CREATE TABLE js_sys_employee_office
|
||||
(
|
||||
id varchar(64) NOT NULL COMMENT '编号',
|
||||
emp_code varchar(64) NOT NULL COMMENT '员工编码',
|
||||
office_code varchar(64) NOT NULL COMMENT '机构编码',
|
||||
post_code varchar(64) COMMENT '岗位编码',
|
||||
PRIMARY KEY (emp_code, office_code),
|
||||
UNIQUE (id)
|
||||
) COMMENT = '员工附属机构关系表';
|
||||
|
||||
|
||||
-- 员工与岗位关联表
|
||||
CREATE TABLE js_sys_employee_post
|
||||
(
|
||||
@@ -419,6 +432,7 @@ CREATE TABLE js_sys_menu
|
||||
menu_target varchar(20) COMMENT '目标',
|
||||
menu_icon varchar(100) COMMENT '图标',
|
||||
menu_color varchar(50) COMMENT '颜色',
|
||||
menu_title varchar(100) COMMENT '菜单标题',
|
||||
permission varchar(1000) COMMENT '权限标识',
|
||||
weight decimal(4) COMMENT '菜单权重',
|
||||
is_show char(1) NOT NULL COMMENT '是否显示(1显示 0隐藏)',
|
||||
@@ -504,7 +518,7 @@ CREATE TABLE js_sys_msg_inner_record
|
||||
(
|
||||
id varchar(64) NOT NULL COMMENT '编号',
|
||||
msg_inner_id varchar(64) NOT NULL COMMENT '所属消息',
|
||||
receive_user_code varchar(64) COMMENT '接受者用户编码',
|
||||
receive_user_code varchar(64) NOT NULL COMMENT '接受者用户编码',
|
||||
receive_user_name varchar(100) NOT NULL COMMENT '接受者用户姓名',
|
||||
read_status char(1) NOT NULL COMMENT '读取状态(0未送达 1已读 2未读)',
|
||||
read_date datetime COMMENT '阅读时间',
|
||||
@@ -671,6 +685,7 @@ CREATE TABLE js_sys_role
|
||||
is_sys char(1) COMMENT '系统内置(1是 0否)',
|
||||
user_type varchar(16) COMMENT '用户类型(employee员工 member会员)',
|
||||
data_scope char(1) COMMENT '数据范围设置(0未设置 1全部数据 2自定义数据)',
|
||||
biz_scope varchar(255) COMMENT '适应业务范围(不同的功能,不同的数据权限支持)',
|
||||
status char(1) DEFAULT '0' NOT NULL COMMENT '状态(0正常 1删除 2停用)',
|
||||
create_by varchar(64) NOT NULL COMMENT '创建者',
|
||||
create_date datetime NOT NULL COMMENT '创建时间',
|
||||
@@ -679,6 +694,26 @@ CREATE TABLE js_sys_role
|
||||
remarks varchar(500) COMMENT '备注信息',
|
||||
corp_code varchar(64) DEFAULT '0' NOT NULL COMMENT '租户代码',
|
||||
corp_name varchar(100) DEFAULT 'JeeSite' NOT NULL COMMENT '租户名称',
|
||||
extend_s1 varchar(500) COMMENT '扩展 String 1',
|
||||
extend_s2 varchar(500) COMMENT '扩展 String 2',
|
||||
extend_s3 varchar(500) COMMENT '扩展 String 3',
|
||||
extend_s4 varchar(500) COMMENT '扩展 String 4',
|
||||
extend_s5 varchar(500) COMMENT '扩展 String 5',
|
||||
extend_s6 varchar(500) COMMENT '扩展 String 6',
|
||||
extend_s7 varchar(500) COMMENT '扩展 String 7',
|
||||
extend_s8 varchar(500) COMMENT '扩展 String 8',
|
||||
extend_i1 decimal(19) COMMENT '扩展 Integer 1',
|
||||
extend_i2 decimal(19) COMMENT '扩展 Integer 2',
|
||||
extend_i3 decimal(19) COMMENT '扩展 Integer 3',
|
||||
extend_i4 decimal(19) COMMENT '扩展 Integer 4',
|
||||
extend_f1 decimal(19,4) COMMENT '扩展 Float 1',
|
||||
extend_f2 decimal(19,4) COMMENT '扩展 Float 2',
|
||||
extend_f3 decimal(19,4) COMMENT '扩展 Float 3',
|
||||
extend_f4 decimal(19,4) COMMENT '扩展 Float 4',
|
||||
extend_d1 datetime COMMENT '扩展 Date 1',
|
||||
extend_d2 datetime COMMENT '扩展 Date 2',
|
||||
extend_d3 datetime COMMENT '扩展 Date 3',
|
||||
extend_d4 datetime COMMENT '扩展 Date 4',
|
||||
PRIMARY KEY (role_code)
|
||||
) COMMENT = '角色表';
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
DROP TABLE js_gen_table_column CASCADE CONSTRAINTS;
|
||||
DROP TABLE js_gen_table CASCADE CONSTRAINTS;
|
||||
DROP TABLE js_sys_company_office CASCADE CONSTRAINTS;
|
||||
DROP TABLE js_sys_employee_office CASCADE CONSTRAINTS;
|
||||
DROP TABLE js_sys_employee_post CASCADE CONSTRAINTS;
|
||||
DROP TABLE js_sys_user_data_scope CASCADE CONSTRAINTS;
|
||||
DROP TABLE js_sys_user_role CASCADE CONSTRAINTS;
|
||||
@@ -276,6 +277,17 @@ CREATE TABLE js_sys_employee
|
||||
);
|
||||
|
||||
|
||||
-- 员工附属机构关系表
|
||||
CREATE TABLE js_sys_employee_office
|
||||
(
|
||||
id varchar2(64) NOT NULL UNIQUE,
|
||||
emp_code varchar2(64) NOT NULL,
|
||||
office_code varchar2(64) NOT NULL,
|
||||
post_code varchar2(64),
|
||||
PRIMARY KEY (emp_code, office_code)
|
||||
);
|
||||
|
||||
|
||||
-- 员工与岗位关联表
|
||||
CREATE TABLE js_sys_employee_post
|
||||
(
|
||||
@@ -418,6 +430,7 @@ CREATE TABLE js_sys_menu
|
||||
menu_target varchar2(20),
|
||||
menu_icon varchar2(100),
|
||||
menu_color varchar2(50),
|
||||
menu_title varchar2(100),
|
||||
permission varchar2(1000),
|
||||
weight number(4),
|
||||
is_show char(1) NOT NULL,
|
||||
@@ -503,7 +516,7 @@ CREATE TABLE js_sys_msg_inner_record
|
||||
(
|
||||
id varchar2(64) NOT NULL,
|
||||
msg_inner_id varchar2(64) NOT NULL,
|
||||
receive_user_code varchar2(64),
|
||||
receive_user_code varchar2(64) NOT NULL,
|
||||
receive_user_name varchar2(100) NOT NULL,
|
||||
read_status char(1) NOT NULL,
|
||||
read_date timestamp,
|
||||
@@ -670,6 +683,7 @@ CREATE TABLE js_sys_role
|
||||
is_sys char(1),
|
||||
user_type varchar2(16),
|
||||
data_scope char(1),
|
||||
biz_scope varchar2(255),
|
||||
status char(1) DEFAULT '0' NOT NULL,
|
||||
create_by varchar2(64) NOT NULL,
|
||||
create_date timestamp NOT NULL,
|
||||
@@ -678,6 +692,26 @@ CREATE TABLE js_sys_role
|
||||
remarks nvarchar2(500),
|
||||
corp_code varchar2(64) DEFAULT '0' NOT NULL,
|
||||
corp_name nvarchar2(100) DEFAULT 'JeeSite' NOT NULL,
|
||||
extend_s1 nvarchar2(500),
|
||||
extend_s2 nvarchar2(500),
|
||||
extend_s3 nvarchar2(500),
|
||||
extend_s4 nvarchar2(500),
|
||||
extend_s5 nvarchar2(500),
|
||||
extend_s6 nvarchar2(500),
|
||||
extend_s7 nvarchar2(500),
|
||||
extend_s8 nvarchar2(500),
|
||||
extend_i1 number(19),
|
||||
extend_i2 number(19),
|
||||
extend_i3 number(19),
|
||||
extend_i4 number(19),
|
||||
extend_f1 number(19,4),
|
||||
extend_f2 number(19,4),
|
||||
extend_f3 number(19,4),
|
||||
extend_f4 number(19,4),
|
||||
extend_d1 timestamp,
|
||||
extend_d2 timestamp,
|
||||
extend_d3 timestamp,
|
||||
extend_d4 timestamp,
|
||||
PRIMARY KEY (role_code)
|
||||
);
|
||||
|
||||
@@ -1104,6 +1138,11 @@ COMMENT ON COLUMN js_sys_employee.update_date IS '更新时间';
|
||||
COMMENT ON COLUMN js_sys_employee.remarks IS '备注信息';
|
||||
COMMENT ON COLUMN js_sys_employee.corp_code IS '租户代码';
|
||||
COMMENT ON COLUMN js_sys_employee.corp_name IS '租户名称';
|
||||
COMMENT ON TABLE js_sys_employee_office IS '员工附属机构关系表';
|
||||
COMMENT ON COLUMN js_sys_employee_office.id IS '编号';
|
||||
COMMENT ON COLUMN js_sys_employee_office.emp_code IS '员工编码';
|
||||
COMMENT ON COLUMN js_sys_employee_office.office_code IS '机构编码';
|
||||
COMMENT ON COLUMN js_sys_employee_office.post_code IS '岗位编码';
|
||||
COMMENT ON TABLE js_sys_employee_post IS '员工与岗位关联表';
|
||||
COMMENT ON COLUMN js_sys_employee_post.emp_code IS '员工编码';
|
||||
COMMENT ON COLUMN js_sys_employee_post.post_code IS '岗位编码';
|
||||
@@ -1202,6 +1241,7 @@ COMMENT ON COLUMN js_sys_menu.menu_href IS '链接';
|
||||
COMMENT ON COLUMN js_sys_menu.menu_target IS '目标';
|
||||
COMMENT ON COLUMN js_sys_menu.menu_icon IS '图标';
|
||||
COMMENT ON COLUMN js_sys_menu.menu_color IS '颜色';
|
||||
COMMENT ON COLUMN js_sys_menu.menu_title IS '菜单标题';
|
||||
COMMENT ON COLUMN js_sys_menu.permission IS '权限标识';
|
||||
COMMENT ON COLUMN js_sys_menu.weight IS '菜单权重';
|
||||
COMMENT ON COLUMN js_sys_menu.is_show IS '是否显示(1显示 0隐藏)';
|
||||
@@ -1400,6 +1440,7 @@ COMMENT ON COLUMN js_sys_role.role_sort IS '角色排序(升序)';
|
||||
COMMENT ON COLUMN js_sys_role.is_sys IS '系统内置(1是 0否)';
|
||||
COMMENT ON COLUMN js_sys_role.user_type IS '用户类型(employee员工 member会员)';
|
||||
COMMENT ON COLUMN js_sys_role.data_scope IS '数据范围设置(0未设置 1全部数据 2自定义数据)';
|
||||
COMMENT ON COLUMN js_sys_role.biz_scope IS '适应业务范围(不同的功能,不同的数据权限支持)';
|
||||
COMMENT ON COLUMN js_sys_role.status IS '状态(0正常 1删除 2停用)';
|
||||
COMMENT ON COLUMN js_sys_role.create_by IS '创建者';
|
||||
COMMENT ON COLUMN js_sys_role.create_date IS '创建时间';
|
||||
@@ -1408,6 +1449,26 @@ COMMENT ON COLUMN js_sys_role.update_date IS '更新时间';
|
||||
COMMENT ON COLUMN js_sys_role.remarks IS '备注信息';
|
||||
COMMENT ON COLUMN js_sys_role.corp_code IS '租户代码';
|
||||
COMMENT ON COLUMN js_sys_role.corp_name IS '租户名称';
|
||||
COMMENT ON COLUMN js_sys_role.extend_s1 IS '扩展 String 1';
|
||||
COMMENT ON COLUMN js_sys_role.extend_s2 IS '扩展 String 2';
|
||||
COMMENT ON COLUMN js_sys_role.extend_s3 IS '扩展 String 3';
|
||||
COMMENT ON COLUMN js_sys_role.extend_s4 IS '扩展 String 4';
|
||||
COMMENT ON COLUMN js_sys_role.extend_s5 IS '扩展 String 5';
|
||||
COMMENT ON COLUMN js_sys_role.extend_s6 IS '扩展 String 6';
|
||||
COMMENT ON COLUMN js_sys_role.extend_s7 IS '扩展 String 7';
|
||||
COMMENT ON COLUMN js_sys_role.extend_s8 IS '扩展 String 8';
|
||||
COMMENT ON COLUMN js_sys_role.extend_i1 IS '扩展 Integer 1';
|
||||
COMMENT ON COLUMN js_sys_role.extend_i2 IS '扩展 Integer 2';
|
||||
COMMENT ON COLUMN js_sys_role.extend_i3 IS '扩展 Integer 3';
|
||||
COMMENT ON COLUMN js_sys_role.extend_i4 IS '扩展 Integer 4';
|
||||
COMMENT ON COLUMN js_sys_role.extend_f1 IS '扩展 Float 1';
|
||||
COMMENT ON COLUMN js_sys_role.extend_f2 IS '扩展 Float 2';
|
||||
COMMENT ON COLUMN js_sys_role.extend_f3 IS '扩展 Float 3';
|
||||
COMMENT ON COLUMN js_sys_role.extend_f4 IS '扩展 Float 4';
|
||||
COMMENT ON COLUMN js_sys_role.extend_d1 IS '扩展 Date 1';
|
||||
COMMENT ON COLUMN js_sys_role.extend_d2 IS '扩展 Date 2';
|
||||
COMMENT ON COLUMN js_sys_role.extend_d3 IS '扩展 Date 3';
|
||||
COMMENT ON COLUMN js_sys_role.extend_d4 IS '扩展 Date 4';
|
||||
COMMENT ON TABLE js_sys_role_data_scope IS '角色数据权限表';
|
||||
COMMENT ON COLUMN js_sys_role_data_scope.role_code IS '控制角色编码';
|
||||
COMMENT ON COLUMN js_sys_role_data_scope.ctrl_type IS '控制类型';
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
DROP TABLE IF EXISTS js_gen_table_column;
|
||||
DROP TABLE IF EXISTS js_gen_table;
|
||||
DROP TABLE IF EXISTS js_sys_company_office;
|
||||
DROP TABLE IF EXISTS js_sys_employee_office;
|
||||
DROP TABLE IF EXISTS js_sys_employee_post;
|
||||
DROP TABLE IF EXISTS js_sys_user_data_scope;
|
||||
DROP TABLE IF EXISTS js_sys_user_role;
|
||||
@@ -276,6 +277,17 @@ CREATE TABLE js_sys_employee
|
||||
) WITHOUT OIDS;
|
||||
|
||||
|
||||
-- 员工附属机构关系表
|
||||
CREATE TABLE js_sys_employee_office
|
||||
(
|
||||
id varchar(64) NOT NULL UNIQUE,
|
||||
emp_code varchar(64) NOT NULL,
|
||||
office_code varchar(64) NOT NULL,
|
||||
post_code varchar(64),
|
||||
PRIMARY KEY (emp_code, office_code)
|
||||
) WITHOUT OIDS;
|
||||
|
||||
|
||||
-- 员工与岗位关联表
|
||||
CREATE TABLE js_sys_employee_post
|
||||
(
|
||||
@@ -418,6 +430,7 @@ CREATE TABLE js_sys_menu
|
||||
menu_target varchar(20),
|
||||
menu_icon varchar(100),
|
||||
menu_color varchar(50),
|
||||
menu_title varchar(100),
|
||||
permission varchar(1000),
|
||||
weight decimal(4),
|
||||
is_show char(1) NOT NULL,
|
||||
@@ -503,7 +516,7 @@ CREATE TABLE js_sys_msg_inner_record
|
||||
(
|
||||
id varchar(64) NOT NULL,
|
||||
msg_inner_id varchar(64) NOT NULL,
|
||||
receive_user_code varchar(64),
|
||||
receive_user_code varchar(64) NOT NULL,
|
||||
receive_user_name varchar(100) NOT NULL,
|
||||
read_status char(1) NOT NULL,
|
||||
read_date timestamp,
|
||||
@@ -670,6 +683,7 @@ CREATE TABLE js_sys_role
|
||||
is_sys char(1),
|
||||
user_type varchar(16),
|
||||
data_scope char(1),
|
||||
biz_scope varchar(255),
|
||||
status char(1) DEFAULT '0' NOT NULL,
|
||||
create_by varchar(64) NOT NULL,
|
||||
create_date timestamp NOT NULL,
|
||||
@@ -678,6 +692,26 @@ CREATE TABLE js_sys_role
|
||||
remarks varchar(500),
|
||||
corp_code varchar(64) DEFAULT '0' NOT NULL,
|
||||
corp_name varchar(100) DEFAULT 'JeeSite' NOT NULL,
|
||||
extend_s1 varchar(500),
|
||||
extend_s2 varchar(500),
|
||||
extend_s3 varchar(500),
|
||||
extend_s4 varchar(500),
|
||||
extend_s5 varchar(500),
|
||||
extend_s6 varchar(500),
|
||||
extend_s7 varchar(500),
|
||||
extend_s8 varchar(500),
|
||||
extend_i1 decimal(19),
|
||||
extend_i2 decimal(19),
|
||||
extend_i3 decimal(19),
|
||||
extend_i4 decimal(19),
|
||||
extend_f1 decimal(19,4),
|
||||
extend_f2 decimal(19,4),
|
||||
extend_f3 decimal(19,4),
|
||||
extend_f4 decimal(19,4),
|
||||
extend_d1 timestamp,
|
||||
extend_d2 timestamp,
|
||||
extend_d3 timestamp,
|
||||
extend_d4 timestamp,
|
||||
PRIMARY KEY (role_code)
|
||||
) WITHOUT OIDS;
|
||||
|
||||
@@ -1104,6 +1138,11 @@ COMMENT ON COLUMN js_sys_employee.update_date IS '更新时间';
|
||||
COMMENT ON COLUMN js_sys_employee.remarks IS '备注信息';
|
||||
COMMENT ON COLUMN js_sys_employee.corp_code IS '租户代码';
|
||||
COMMENT ON COLUMN js_sys_employee.corp_name IS '租户名称';
|
||||
COMMENT ON TABLE js_sys_employee_office IS '员工附属机构关系表';
|
||||
COMMENT ON COLUMN js_sys_employee_office.id IS '编号';
|
||||
COMMENT ON COLUMN js_sys_employee_office.emp_code IS '员工编码';
|
||||
COMMENT ON COLUMN js_sys_employee_office.office_code IS '机构编码';
|
||||
COMMENT ON COLUMN js_sys_employee_office.post_code IS '岗位编码';
|
||||
COMMENT ON TABLE js_sys_employee_post IS '员工与岗位关联表';
|
||||
COMMENT ON COLUMN js_sys_employee_post.emp_code IS '员工编码';
|
||||
COMMENT ON COLUMN js_sys_employee_post.post_code IS '岗位编码';
|
||||
@@ -1202,6 +1241,7 @@ COMMENT ON COLUMN js_sys_menu.menu_href IS '链接';
|
||||
COMMENT ON COLUMN js_sys_menu.menu_target IS '目标';
|
||||
COMMENT ON COLUMN js_sys_menu.menu_icon IS '图标';
|
||||
COMMENT ON COLUMN js_sys_menu.menu_color IS '颜色';
|
||||
COMMENT ON COLUMN js_sys_menu.menu_title IS '菜单标题';
|
||||
COMMENT ON COLUMN js_sys_menu.permission IS '权限标识';
|
||||
COMMENT ON COLUMN js_sys_menu.weight IS '菜单权重';
|
||||
COMMENT ON COLUMN js_sys_menu.is_show IS '是否显示(1显示 0隐藏)';
|
||||
@@ -1400,6 +1440,7 @@ COMMENT ON COLUMN js_sys_role.role_sort IS '角色排序(升序)';
|
||||
COMMENT ON COLUMN js_sys_role.is_sys IS '系统内置(1是 0否)';
|
||||
COMMENT ON COLUMN js_sys_role.user_type IS '用户类型(employee员工 member会员)';
|
||||
COMMENT ON COLUMN js_sys_role.data_scope IS '数据范围设置(0未设置 1全部数据 2自定义数据)';
|
||||
COMMENT ON COLUMN js_sys_role.biz_scope IS '适应业务范围(不同的功能,不同的数据权限支持)';
|
||||
COMMENT ON COLUMN js_sys_role.status IS '状态(0正常 1删除 2停用)';
|
||||
COMMENT ON COLUMN js_sys_role.create_by IS '创建者';
|
||||
COMMENT ON COLUMN js_sys_role.create_date IS '创建时间';
|
||||
@@ -1408,6 +1449,26 @@ COMMENT ON COLUMN js_sys_role.update_date IS '更新时间';
|
||||
COMMENT ON COLUMN js_sys_role.remarks IS '备注信息';
|
||||
COMMENT ON COLUMN js_sys_role.corp_code IS '租户代码';
|
||||
COMMENT ON COLUMN js_sys_role.corp_name IS '租户名称';
|
||||
COMMENT ON COLUMN js_sys_role.extend_s1 IS '扩展 String 1';
|
||||
COMMENT ON COLUMN js_sys_role.extend_s2 IS '扩展 String 2';
|
||||
COMMENT ON COLUMN js_sys_role.extend_s3 IS '扩展 String 3';
|
||||
COMMENT ON COLUMN js_sys_role.extend_s4 IS '扩展 String 4';
|
||||
COMMENT ON COLUMN js_sys_role.extend_s5 IS '扩展 String 5';
|
||||
COMMENT ON COLUMN js_sys_role.extend_s6 IS '扩展 String 6';
|
||||
COMMENT ON COLUMN js_sys_role.extend_s7 IS '扩展 String 7';
|
||||
COMMENT ON COLUMN js_sys_role.extend_s8 IS '扩展 String 8';
|
||||
COMMENT ON COLUMN js_sys_role.extend_i1 IS '扩展 Integer 1';
|
||||
COMMENT ON COLUMN js_sys_role.extend_i2 IS '扩展 Integer 2';
|
||||
COMMENT ON COLUMN js_sys_role.extend_i3 IS '扩展 Integer 3';
|
||||
COMMENT ON COLUMN js_sys_role.extend_i4 IS '扩展 Integer 4';
|
||||
COMMENT ON COLUMN js_sys_role.extend_f1 IS '扩展 Float 1';
|
||||
COMMENT ON COLUMN js_sys_role.extend_f2 IS '扩展 Float 2';
|
||||
COMMENT ON COLUMN js_sys_role.extend_f3 IS '扩展 Float 3';
|
||||
COMMENT ON COLUMN js_sys_role.extend_f4 IS '扩展 Float 4';
|
||||
COMMENT ON COLUMN js_sys_role.extend_d1 IS '扩展 Date 1';
|
||||
COMMENT ON COLUMN js_sys_role.extend_d2 IS '扩展 Date 2';
|
||||
COMMENT ON COLUMN js_sys_role.extend_d3 IS '扩展 Date 3';
|
||||
COMMENT ON COLUMN js_sys_role.extend_d4 IS '扩展 Date 4';
|
||||
COMMENT ON TABLE js_sys_role_data_scope IS '角色数据权限表';
|
||||
COMMENT ON COLUMN js_sys_role_data_scope.role_code IS '控制角色编码';
|
||||
COMMENT ON COLUMN js_sys_role_data_scope.ctrl_type IS '控制类型';
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>com.jeesite</groupId>
|
||||
<artifactId>jeesite-parent</artifactId>
|
||||
<version>4.1.4-SNAPSHOT</version>
|
||||
<version>4.1.6-SNAPSHOT</version>
|
||||
<relativePath>../../parent/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ public class FormAuthenticationFilter extends org.apache.shiro.web.filter.authc.
|
||||
protected AuthenticationToken createToken(ServletRequest request, ServletResponse response) {
|
||||
String username = getUsername(request, response); // 用户名
|
||||
String password = getPassword(request); // 登录密码
|
||||
boolean rememberMe = isRememberMe(request); // 记住我(记住密码)
|
||||
boolean rememberMe = isRememberMe(request); // 记住我(自动登录)
|
||||
String host = getHost(request); // 登录主机
|
||||
String captcha = getCaptcha(request); // 登录验证码
|
||||
Map<String, Object> paramMap = ServletUtils.getExtParams(request); // 登录附加参数
|
||||
|
||||
@@ -73,6 +73,14 @@ public class PermissionsAuthorizationFilter extends org.apache.shiro.web.filter.
|
||||
}
|
||||
if (ServletUtils.isAjaxRequest(req)) {
|
||||
try {
|
||||
String uri = req.getRequestURI();
|
||||
if (StringUtils.endsWithIgnoreCase(uri, ".json")
|
||||
&& !StringUtils.endsWithIgnoreCase(loginUrl, ".json")){
|
||||
loginUrl += ".json";
|
||||
}else if (StringUtils.endsWithIgnoreCase(uri, ".xml")
|
||||
&& !StringUtils.endsWithIgnoreCase(loginUrl, ".xml")){
|
||||
loginUrl += ".xml";
|
||||
}
|
||||
request.getRequestDispatcher(loginUrl).forward(
|
||||
new GetHttpServletRequestWrapper(request), response);
|
||||
} catch (ServletException e) {
|
||||
|
||||
@@ -5,8 +5,11 @@ package com.jeesite.common.shiro.realm;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import org.apache.shiro.authc.AuthenticationToken;
|
||||
|
||||
import com.jeesite.common.codec.EncodeUtils;
|
||||
import com.jeesite.common.codec.Sha1Utils;
|
||||
import com.jeesite.common.shiro.authc.FormToken;
|
||||
import com.jeesite.common.utils.SpringUtils;
|
||||
import com.jeesite.modules.sys.entity.Log;
|
||||
import com.jeesite.modules.sys.entity.User;
|
||||
@@ -35,6 +38,22 @@ public class AuthorizingRealm extends BaseAuthorizingRealm {
|
||||
// this.setCredentialsMatcher(matcher);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取登录令牌
|
||||
*/
|
||||
@Override
|
||||
protected FormToken getFormToken(AuthenticationToken authcToken) {
|
||||
return super.getFormToken(authcToken);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取用户信息
|
||||
*/
|
||||
@Override
|
||||
protected User getUserInfo(FormToken token) {
|
||||
return super.getUserInfo(token);
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成密文密码,生成随机的16位salt并经过1024次 sha-1 hash
|
||||
* @param plainPassword 明文密码
|
||||
|
||||
@@ -32,6 +32,7 @@ public class DruidStatConfig {
|
||||
+ "*.jpg,*.gif,*.jpeg,*.bmp,*.ico,*.swf,*.psd,*.htc,*.htm,*.html,"
|
||||
+ "*.crx,*.xpi,*.exe,*.ipa,*.apk,*.otf,*.eot,*.svg,*.ttf,*.woff,"
|
||||
+ "/druid/*");
|
||||
bean.addInitParameter("sessionStatEnable", "false");
|
||||
bean.addUrlPatterns("/*");
|
||||
return bean;
|
||||
}
|
||||
|
||||
@@ -159,8 +159,8 @@ public class MsgInnerService extends CrudService<MsgInnerDao, MsgInner> {
|
||||
if (MsgPush.TYPE_PC.equals(type)){
|
||||
msgContent = new PcMsgContent();
|
||||
msgContent.setContent("你有一条内部消息,点击“详情”进行查阅。");
|
||||
((PcMsgContent)msgContent).addButton(new String[]{
|
||||
"详情", "/a/msg/msgInner/view?id="+msgInner.getId()});
|
||||
((PcMsgContent)msgContent).addButton(new String[]{"详情",
|
||||
Global.getAdminPath()+"/msg/msgInner/view?id="+msgInner.getId()});
|
||||
}else if (MsgPush.TYPE_APP.equals(type)){
|
||||
msgContent = new AppMsgContent();
|
||||
}else if (MsgPush.TYPE_SMS.equals(type)){
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
package com.jeesite.modules.sys.dao;
|
||||
|
||||
import com.jeesite.common.dao.TreeDao;
|
||||
import com.jeesite.common.datasource.DataSourceHolder;
|
||||
import com.jeesite.common.mybatis.annotation.MyBatisDao;
|
||||
import com.jeesite.modules.sys.entity.Area;
|
||||
|
||||
@@ -13,7 +12,7 @@ import com.jeesite.modules.sys.entity.Area;
|
||||
* @author ThinkGem
|
||||
* @version 2017-03-22
|
||||
*/
|
||||
@MyBatisDao(dataSourceName=DataSourceHolder.DEFAULT)
|
||||
@MyBatisDao
|
||||
public interface AreaDao extends TreeDao<Area> {
|
||||
|
||||
}
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
package com.jeesite.modules.sys.dao;
|
||||
|
||||
import com.jeesite.common.dao.TreeDao;
|
||||
import com.jeesite.common.datasource.DataSourceHolder;
|
||||
import com.jeesite.common.mybatis.annotation.MyBatisDao;
|
||||
import com.jeesite.modules.sys.entity.Company;
|
||||
|
||||
@@ -13,7 +12,7 @@ import com.jeesite.modules.sys.entity.Company;
|
||||
* @author ThinkGem
|
||||
* @version 2017-03-12
|
||||
*/
|
||||
@MyBatisDao(dataSourceName=DataSourceHolder.DEFAULT)
|
||||
@MyBatisDao
|
||||
public interface CompanyDao extends TreeDao<Company> {
|
||||
|
||||
}
|
||||
@@ -4,7 +4,6 @@
|
||||
package com.jeesite.modules.sys.dao;
|
||||
|
||||
import com.jeesite.common.dao.CrudDao;
|
||||
import com.jeesite.common.datasource.DataSourceHolder;
|
||||
import com.jeesite.common.mybatis.annotation.MyBatisDao;
|
||||
import com.jeesite.modules.sys.entity.CompanyOffice;
|
||||
|
||||
@@ -13,7 +12,7 @@ import com.jeesite.modules.sys.entity.CompanyOffice;
|
||||
* @author ThinkGem
|
||||
* @version 2017-03-23
|
||||
*/
|
||||
@MyBatisDao(dataSourceName=DataSourceHolder.DEFAULT)
|
||||
@MyBatisDao
|
||||
public interface CompanyOfficeDao extends CrudDao<CompanyOffice> {
|
||||
|
||||
}
|
||||
@@ -6,7 +6,6 @@ package com.jeesite.modules.sys.dao;
|
||||
import java.util.List;
|
||||
|
||||
import com.jeesite.common.dao.CrudDao;
|
||||
import com.jeesite.common.datasource.DataSourceHolder;
|
||||
import com.jeesite.common.mybatis.annotation.MyBatisDao;
|
||||
import com.jeesite.modules.sys.entity.EmpUser;
|
||||
|
||||
@@ -15,7 +14,7 @@ import com.jeesite.modules.sys.entity.EmpUser;
|
||||
* @author ThinkGem
|
||||
* @version 2017-03-25
|
||||
*/
|
||||
@MyBatisDao(dataSourceName=DataSourceHolder.DEFAULT)
|
||||
@MyBatisDao
|
||||
public interface EmpUserDao extends CrudDao<EmpUser> {
|
||||
|
||||
/**
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
package com.jeesite.modules.sys.dao;
|
||||
|
||||
import com.jeesite.common.dao.CrudDao;
|
||||
import com.jeesite.common.datasource.DataSourceHolder;
|
||||
import com.jeesite.common.mybatis.annotation.MyBatisDao;
|
||||
import com.jeesite.modules.sys.entity.Employee;
|
||||
|
||||
@@ -14,7 +13,7 @@ import com.jeesite.modules.sys.entity.Employee;
|
||||
* @version 2017-03-25
|
||||
* 通过 UserUtils.loadRefObj() 加载引用类型对象时,需要给MyBatisDao指定引用entity类型。
|
||||
*/
|
||||
@MyBatisDao(entity=Employee.class, dataSourceName=DataSourceHolder.DEFAULT)
|
||||
@MyBatisDao(entity=Employee.class)
|
||||
public interface EmployeeDao extends CrudDao<Employee> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
/**
|
||||
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||
*/
|
||||
package com.jeesite.modules.sys.dao;
|
||||
|
||||
import com.jeesite.common.dao.CrudDao;
|
||||
import com.jeesite.common.mybatis.annotation.MyBatisDao;
|
||||
import com.jeesite.modules.sys.entity.EmployeeOffice;
|
||||
|
||||
/**
|
||||
* 员工附属机构关系表DAO接口
|
||||
* @author ThinkGem
|
||||
* @version 2019-04-29
|
||||
*/
|
||||
@MyBatisDao
|
||||
public interface EmployeeOfficeDao extends CrudDao<EmployeeOffice> {
|
||||
|
||||
}
|
||||
@@ -4,7 +4,6 @@
|
||||
package com.jeesite.modules.sys.dao;
|
||||
|
||||
import com.jeesite.common.dao.CrudDao;
|
||||
import com.jeesite.common.datasource.DataSourceHolder;
|
||||
import com.jeesite.common.mybatis.annotation.MyBatisDao;
|
||||
import com.jeesite.modules.sys.entity.EmployeePost;
|
||||
|
||||
@@ -13,7 +12,7 @@ import com.jeesite.modules.sys.entity.EmployeePost;
|
||||
* @author ThinkGem
|
||||
* @version 2017-03-25
|
||||
*/
|
||||
@MyBatisDao(dataSourceName=DataSourceHolder.DEFAULT)
|
||||
@MyBatisDao
|
||||
public interface EmployeePostDao extends CrudDao<EmployeePost> {
|
||||
|
||||
}
|
||||
@@ -4,7 +4,6 @@
|
||||
package com.jeesite.modules.sys.dao;
|
||||
|
||||
import com.jeesite.common.dao.CrudDao;
|
||||
import com.jeesite.common.datasource.DataSourceHolder;
|
||||
import com.jeesite.common.mybatis.annotation.MyBatisDao;
|
||||
import com.jeesite.modules.sys.entity.Log;
|
||||
|
||||
@@ -13,7 +12,7 @@ import com.jeesite.modules.sys.entity.Log;
|
||||
* @author ThinkGem
|
||||
* @version 2017-03-19
|
||||
*/
|
||||
@MyBatisDao(dataSourceName=DataSourceHolder.DEFAULT)
|
||||
@MyBatisDao
|
||||
public interface LogDao extends CrudDao<Log> {
|
||||
|
||||
}
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
package com.jeesite.modules.sys.dao;
|
||||
|
||||
import com.jeesite.common.dao.TreeDao;
|
||||
import com.jeesite.common.datasource.DataSourceHolder;
|
||||
import com.jeesite.common.mybatis.annotation.MyBatisDao;
|
||||
import com.jeesite.modules.sys.entity.Office;
|
||||
|
||||
@@ -13,7 +12,7 @@ import com.jeesite.modules.sys.entity.Office;
|
||||
* @author ThinkGem
|
||||
* @version 2017-03-23
|
||||
*/
|
||||
@MyBatisDao(dataSourceName=DataSourceHolder.DEFAULT)
|
||||
@MyBatisDao
|
||||
public interface OfficeDao extends TreeDao<Office> {
|
||||
|
||||
}
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
package com.jeesite.modules.sys.dao;
|
||||
|
||||
import com.jeesite.common.dao.CrudDao;
|
||||
import com.jeesite.common.datasource.DataSourceHolder;
|
||||
import com.jeesite.common.mybatis.annotation.MyBatisDao;
|
||||
import com.jeesite.modules.sys.entity.Post;
|
||||
|
||||
@@ -13,7 +12,7 @@ import com.jeesite.modules.sys.entity.Post;
|
||||
* @author ThinkGem
|
||||
* @version 2017-03-25
|
||||
*/
|
||||
@MyBatisDao(dataSourceName=DataSourceHolder.DEFAULT)
|
||||
@MyBatisDao
|
||||
public interface PostDao extends CrudDao<Post> {
|
||||
|
||||
}
|
||||
@@ -61,8 +61,7 @@ public class InitCoreData extends BaseInitDataTests {
|
||||
|
||||
@Override
|
||||
public void begin() {
|
||||
super.begin();
|
||||
excelFile = InitCoreData.class.getName().replaceAll("\\.", "/")+".xlsx";
|
||||
super.begin(InitCoreData.class);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Binary file not shown.
@@ -88,15 +88,16 @@ public class EmpUser extends User {
|
||||
@ExcelField(title="电子邮箱", attrName="email", align=Align.LEFT, sort=50),
|
||||
@ExcelField(title="手机号码", attrName="mobile", align=Align.CENTER, sort=60),
|
||||
@ExcelField(title="办公电话", attrName="phone", align=Align.CENTER, sort=70),
|
||||
@ExcelField(title="性别", attrName="sex", dictType="sys_user_sex", width=10*256, align=Align.CENTER, sort=75),
|
||||
@ExcelField(title="员工编码", attrName="employee.empCode", align=Align.CENTER, sort=80),
|
||||
@ExcelField(title="员工姓名", attrName="employee.empName", align=Align.CENTER, sort=95),
|
||||
@ExcelField(title="拥有角色编号", attrName="userRoleString", align=Align.LEFT, sort=800, type=ExcelField.Type.IMPORT),
|
||||
@ExcelField(title="最后登录日期", attrName="lastLoginDate", align=Align.CENTER, sort=900, type=ExcelField.Type.EXPORT, dataFormat="yyyy-MM-dd HH:mm"),
|
||||
@ExcelField(title="最后登录日期", attrName="lastLoginDate", width=20*256, align=Align.CENTER, sort=900, type=ExcelField.Type.EXPORT, dataFormat="yyyy-MM-dd HH:mm"),
|
||||
})
|
||||
public Employee getEmployee(){
|
||||
Employee employee = (Employee)super.getRefObj();
|
||||
if (employee == null){
|
||||
employee = new Employee();
|
||||
employee = new Employee(getRefCode());
|
||||
super.setRefObj(employee);
|
||||
}
|
||||
return employee;
|
||||
|
||||
@@ -61,6 +61,7 @@ public class Employee extends DataEntity<Employee> {
|
||||
private String postCode; // 根据职位查询
|
||||
|
||||
private List<EmployeePost> employeePostList = ListUtils.newArrayList(); // 关联岗位信息
|
||||
private List<EmployeeOffice> employeeOfficeList = ListUtils.newArrayList(); // 关联附属机构信息
|
||||
|
||||
public Employee() {
|
||||
this(null);
|
||||
@@ -150,5 +151,13 @@ public class Employee extends DataEntity<Employee> {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public List<EmployeeOffice> getEmployeeOfficeList() {
|
||||
return employeeOfficeList;
|
||||
}
|
||||
|
||||
public void setEmployeeOfficeList(List<EmployeeOffice> employeeOfficeList) {
|
||||
this.employeeOfficeList = employeeOfficeList;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,111 @@
|
||||
/**
|
||||
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||
*/
|
||||
package com.jeesite.modules.sys.entity;
|
||||
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
import com.jeesite.common.entity.DataEntity;
|
||||
import com.jeesite.common.mybatis.annotation.Column;
|
||||
import com.jeesite.common.mybatis.annotation.JoinTable;
|
||||
import com.jeesite.common.mybatis.annotation.Table;
|
||||
import com.jeesite.common.mybatis.annotation.JoinTable.Type;
|
||||
import com.jeesite.common.mybatis.mapper.query.QueryType;
|
||||
|
||||
/**
|
||||
* 附属机构Entity
|
||||
* @author ThinkGem
|
||||
* @version 2019-04-29
|
||||
*/
|
||||
@Table(name="${_prefix}sys_employee_office", alias="a", columns={
|
||||
@Column(name="id", attrName="id", label="编码", isPK=true),
|
||||
@Column(name="emp_code", attrName="empCode", label="员工编码"),
|
||||
@Column(name="office_code", attrName="officeCode", label="机构编码"),
|
||||
@Column(name="post_code", attrName="postCode", label="岗位编码"),
|
||||
}, joinTable={
|
||||
@JoinTable(type=Type.LEFT_JOIN, entity=Office.class, alias="o",
|
||||
on="o.office_code=a.office_code", attrName="this",
|
||||
columns={
|
||||
@Column(name="office_code", label="机构编码", isPK=true),
|
||||
@Column(name="parent_codes",label="所有父级编码", queryType=QueryType.LIKE),
|
||||
@Column(name="office_name", label="机构名称", isQuery=false),
|
||||
}),
|
||||
@JoinTable(type=Type.LEFT_JOIN, entity=Post.class, alias="p",
|
||||
on="p.post_code=a.post_code", attrName="this",
|
||||
columns={
|
||||
@Column(name="post_code", label="岗位编码", isPK=true),
|
||||
@Column(name="post_name", label="岗位名称", isQuery=false),
|
||||
}),
|
||||
}, orderBy="a.id ASC"
|
||||
)
|
||||
public class EmployeeOffice extends DataEntity<EmployeeOffice> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private String empCode; // 员工编码
|
||||
private String officeCode; // 机构编码
|
||||
private String postCode; // 岗位编码
|
||||
|
||||
private String parentCodes; // 机构所有上级编码(数据权限用)
|
||||
private String officeName; // 机构名称(联合查询项)
|
||||
private String postName; // 岗位名称(联合查询项)
|
||||
|
||||
public EmployeeOffice() {
|
||||
this(null, null);
|
||||
}
|
||||
|
||||
public EmployeeOffice(String empCode, String officeCode){
|
||||
super(null);
|
||||
this.empCode = empCode;
|
||||
this.officeCode = officeCode;
|
||||
}
|
||||
|
||||
public String getEmpCode() {
|
||||
return empCode;
|
||||
}
|
||||
|
||||
public void setEmpCode(String empCode) {
|
||||
this.empCode = empCode;
|
||||
}
|
||||
|
||||
public String getOfficeCode() {
|
||||
return officeCode;
|
||||
}
|
||||
|
||||
public void setOfficeCode(String officeCode) {
|
||||
this.officeCode = officeCode;
|
||||
}
|
||||
|
||||
@Length(min=0, max=64, message="岗位编码长度不能超过 64 个字符")
|
||||
public String getPostCode() {
|
||||
return postCode;
|
||||
}
|
||||
|
||||
public void setPostCode(String postCode) {
|
||||
this.postCode = postCode;
|
||||
}
|
||||
|
||||
public String getParentCodes() {
|
||||
return parentCodes;
|
||||
}
|
||||
|
||||
public void setParentCodes(String parentCodes) {
|
||||
this.parentCodes = parentCodes;
|
||||
}
|
||||
|
||||
public String getOfficeName() {
|
||||
return officeName;
|
||||
}
|
||||
|
||||
public void setOfficeName(String officeName) {
|
||||
this.officeName = officeName;
|
||||
}
|
||||
|
||||
public String getPostName() {
|
||||
return postName;
|
||||
}
|
||||
|
||||
public void setPostName(String postName) {
|
||||
this.postName = postName;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -8,6 +8,7 @@ import java.util.List;
|
||||
import com.jeesite.common.entity.Page;
|
||||
import com.jeesite.common.service.api.CrudServiceApi;
|
||||
import com.jeesite.modules.sys.entity.Employee;
|
||||
import com.jeesite.modules.sys.entity.EmployeeOffice;
|
||||
import com.jeesite.modules.sys.entity.EmployeePost;
|
||||
|
||||
/**
|
||||
@@ -45,5 +46,10 @@ public interface EmployeeService extends CrudServiceApi<Employee> {
|
||||
* 查询当前员工关联的岗位信息
|
||||
*/
|
||||
public List<EmployeePost> findEmployeePostList(Employee employee);
|
||||
|
||||
/**
|
||||
* 查询当前员工关联的附属机构信息
|
||||
*/
|
||||
public List<EmployeeOffice> findEmployeeOfficeList(Employee employee);
|
||||
|
||||
}
|
||||
@@ -47,7 +47,8 @@ public class CompanyServiceSupport extends TreeService<CompanyDao, Company>
|
||||
*/
|
||||
@Override
|
||||
public void addDataScopeFilter(Company company, String ctrlPermi) {
|
||||
company.getSqlMap().getDataScope().addFilter("dsf", "Company", "a.company_code", ctrlPermi);
|
||||
company.getSqlMap().getDataScope().addFilter("dsf", "Company", "a.company_code",
|
||||
null, ctrlPermi, "office_user");
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -19,8 +19,10 @@ import com.jeesite.common.service.ServiceException;
|
||||
import com.jeesite.common.utils.excel.ExcelImport;
|
||||
import com.jeesite.common.validator.ValidatorUtils;
|
||||
import com.jeesite.modules.sys.dao.EmpUserDao;
|
||||
import com.jeesite.modules.sys.dao.EmployeeOfficeDao;
|
||||
import com.jeesite.modules.sys.entity.EmpUser;
|
||||
import com.jeesite.modules.sys.entity.Employee;
|
||||
import com.jeesite.modules.sys.entity.EmployeeOffice;
|
||||
import com.jeesite.modules.sys.entity.User;
|
||||
import com.jeesite.modules.sys.service.EmpUserService;
|
||||
import com.jeesite.modules.sys.service.EmployeeService;
|
||||
@@ -39,9 +41,10 @@ public class EmpUserServiceSupport extends CrudService<EmpUserDao, EmpUser>
|
||||
|
||||
@Autowired
|
||||
private UserService userService;
|
||||
|
||||
@Autowired
|
||||
private EmployeeService employeeService;
|
||||
@Autowired
|
||||
private EmployeeOfficeDao employeeOfficeDao;
|
||||
|
||||
/**
|
||||
* 获取单条数据
|
||||
@@ -59,10 +62,10 @@ public class EmpUserServiceSupport extends CrudService<EmpUserDao, EmpUser>
|
||||
@Override
|
||||
public void addDataScopeFilter(EmpUser empUser, String ctrlPermi) {
|
||||
empUser.getSqlMap().getDataScope().addFilter("dsfOffice",
|
||||
"Office", "e.office_code", "a.create_by", ctrlPermi);
|
||||
"Office", "e.office_code", "a.create_by", ctrlPermi, "office_user");
|
||||
if (StringUtils.isNotBlank(EmpUtils.getCompany().getCompanyCode())){
|
||||
empUser.getSqlMap().getDataScope().addFilter("dsfCompany",
|
||||
"Company", "e.company_code", "a.create_by", ctrlPermi);
|
||||
"Company", "e.company_code", "a.create_by", ctrlPermi, "office_user");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -131,6 +134,17 @@ public class EmpUserServiceSupport extends CrudService<EmpUserDao, EmpUser>
|
||||
// 3、保存员工
|
||||
employee.setIsNewRecord(user.getIsNewRecord());
|
||||
employeeService.save(employee);
|
||||
// 4、保存附属机构
|
||||
EmployeeOffice employeeOfficeWhere = new EmployeeOffice();
|
||||
employeeOfficeWhere.setEmpCode(employee.getEmpCode());
|
||||
employeeOfficeDao.deleteByEntity(employeeOfficeWhere);
|
||||
if (employee.getEmployeeOfficeList().size() > 0){
|
||||
employee.getEmployeeOfficeList().forEach(employeeOffice -> {
|
||||
employeeOffice.setId(IdGen.nextId());
|
||||
employeeOffice.setEmpCode(employee.getEmpCode());
|
||||
});
|
||||
employeeOfficeDao.insertBatch(employee.getEmployeeOfficeList());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -12,8 +12,10 @@ import com.jeesite.common.collect.ListUtils;
|
||||
import com.jeesite.common.entity.Page;
|
||||
import com.jeesite.common.service.CrudService;
|
||||
import com.jeesite.modules.sys.dao.EmployeeDao;
|
||||
import com.jeesite.modules.sys.dao.EmployeeOfficeDao;
|
||||
import com.jeesite.modules.sys.dao.EmployeePostDao;
|
||||
import com.jeesite.modules.sys.entity.Employee;
|
||||
import com.jeesite.modules.sys.entity.EmployeeOffice;
|
||||
import com.jeesite.modules.sys.entity.EmployeePost;
|
||||
import com.jeesite.modules.sys.service.EmployeeService;
|
||||
|
||||
@@ -25,9 +27,11 @@ import com.jeesite.modules.sys.service.EmployeeService;
|
||||
@Transactional(readOnly=true)
|
||||
public class EmployeeServiceSupport extends CrudService<EmployeeDao, Employee>
|
||||
implements EmployeeService{
|
||||
|
||||
|
||||
@Autowired
|
||||
private EmployeePostDao employeePostDao;
|
||||
@Autowired
|
||||
private EmployeeOfficeDao employeeOfficeDao;
|
||||
|
||||
/**
|
||||
* 获取单条数据
|
||||
@@ -86,4 +90,13 @@ public class EmployeeServiceSupport extends CrudService<EmployeeDao, Employee>
|
||||
employeePost.setEmpCode(employee.getEmpCode());
|
||||
return employeePostDao.findList(employeePost);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询当前员工关联的附属机构信息
|
||||
*/
|
||||
public List<EmployeeOffice> findEmployeeOfficeList(Employee employee){
|
||||
EmployeeOffice employeeOffice = new EmployeeOffice();
|
||||
employeeOffice.setEmpCode(employee.getEmpCode());
|
||||
return employeeOfficeDao.findList(employeeOffice);
|
||||
}
|
||||
}
|
||||
@@ -40,7 +40,8 @@ public class OfficeServiceSupport extends TreeService<OfficeDao, Office>
|
||||
*/
|
||||
@Override
|
||||
public void addDataScopeFilter(Office office, String ctrlPermi) {
|
||||
office.getSqlMap().getDataScope().addFilter("dsf", "Office", "a.office_code", ctrlPermi);
|
||||
office.getSqlMap().getDataScope().addFilter("dsf", "Office", "a.office_code",
|
||||
null, ctrlPermi , "office_user");
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -5,13 +5,16 @@ package com.jeesite.modules.sys.utils;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.jeesite.common.collect.ListUtils;
|
||||
import com.jeesite.common.lang.StringUtils;
|
||||
import com.jeesite.common.utils.SpringUtils;
|
||||
import com.jeesite.modules.sys.entity.Company;
|
||||
import com.jeesite.modules.sys.entity.Employee;
|
||||
import com.jeesite.modules.sys.entity.EmployeeOffice;
|
||||
import com.jeesite.modules.sys.entity.Office;
|
||||
import com.jeesite.modules.sys.entity.User;
|
||||
import com.jeesite.modules.sys.service.CompanyService;
|
||||
import com.jeesite.modules.sys.service.EmployeeService;
|
||||
import com.jeesite.modules.sys.service.OfficeService;
|
||||
|
||||
/**
|
||||
@@ -21,13 +24,10 @@ import com.jeesite.modules.sys.service.OfficeService;
|
||||
*/
|
||||
public class EmpUtils {
|
||||
|
||||
// // 用户缓存常量
|
||||
// public static final String CACHE_OFFICE_LIST = "officeList";
|
||||
// public static final String CACHE_COMPANY_LIST = "companyList";
|
||||
|
||||
// 部门和公司缓存常量
|
||||
public static final String CACHE_OFFICE_ALL_LIST = "officeAllList";
|
||||
public static final String CACHE_COMPANY_ALL_LIST = "companyAllList";
|
||||
public static final String CACHE_COMPANY_OFFICE_LIST = "employeeOfficeList";
|
||||
|
||||
/**
|
||||
* 静态内部类,延迟加载,懒汉式,线程安全的单例模式
|
||||
@@ -35,6 +35,46 @@ public class EmpUtils {
|
||||
private static final class Static {
|
||||
private static OfficeService officeService = SpringUtils.getBean(OfficeService.class);
|
||||
private static CompanyService companyService = SpringUtils.getBean(CompanyService.class);
|
||||
private static EmployeeService employeeService = SpringUtils.getBean(EmployeeService.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据员工编码获取员工
|
||||
* @author ThinkGem
|
||||
*/
|
||||
public static Employee get(String empCode){
|
||||
return Static.employeeService.get(empCode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据用户对象获取员工,不是员工返回null
|
||||
* @author ThinkGem
|
||||
*/
|
||||
public static Employee get(User user){
|
||||
if (user != null && User.USER_TYPE_EMPLOYEE.equals(user.getUserType())){
|
||||
return (Employee)user.getRefObj();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据用户编码获取员工,找不到或不是员工返回null
|
||||
* @author ThinkGem
|
||||
*/
|
||||
public static Employee getByUserCode(String userCode){
|
||||
User user = UserUtils.get(userCode);
|
||||
Employee employee = get(user);
|
||||
return employee;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据登录账号获取员工,找不到或不是员工返回null
|
||||
* @author ThinkGem
|
||||
*/
|
||||
public static Employee getByLoginCode(String loginCode){
|
||||
User user = UserUtils.getByLoginCode(loginCode);
|
||||
Employee employee = get(user);
|
||||
return employee;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -43,10 +83,7 @@ public class EmpUtils {
|
||||
*/
|
||||
public static Employee getEmployee(){
|
||||
User user = UserUtils.getUser();
|
||||
Employee employee = null;
|
||||
if (User.USER_TYPE_EMPLOYEE.equals(user.getUserType())){
|
||||
employee = (Employee)UserUtils.getUser().getRefObj();
|
||||
}
|
||||
Employee employee = get(user);
|
||||
if (employee == null){
|
||||
employee = new Employee();
|
||||
}
|
||||
@@ -54,10 +91,43 @@ public class EmpUtils {
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前部门对象
|
||||
* 获取当前附属部门对象列表
|
||||
*/
|
||||
public static Office getOffice(){
|
||||
return getEmployee().getOffice();
|
||||
public static List<EmployeeOffice> getEmployeeOfficeList(){
|
||||
List<EmployeeOffice> list = UserUtils.getCache(CACHE_COMPANY_OFFICE_LIST);
|
||||
if (list == null){
|
||||
list = Static.employeeService.findEmployeeOfficeList(getEmployee());
|
||||
UserUtils.putCache(CACHE_COMPANY_OFFICE_LIST, list);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取所有部门编码,包括附属部门(数据权限用)
|
||||
* @return
|
||||
* @author ThinkGem
|
||||
*/
|
||||
public static String[] getOfficeCodes(){
|
||||
List<String> list = ListUtils.newArrayList();
|
||||
list.add(getOffice().getOfficeCode());
|
||||
getEmployeeOfficeList().forEach(e -> {
|
||||
list.add(e.getOfficeCode());
|
||||
});
|
||||
return list.toArray(new String[list.size()]);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取所有部门编码,包括附属部门(数据权限用)
|
||||
* @return
|
||||
* @author ThinkGem
|
||||
*/
|
||||
public static String[] getOfficeParentCodess(){
|
||||
List<String> list = ListUtils.newArrayList();
|
||||
list.add(getOffice().getParentCodes());
|
||||
getEmployeeOfficeList().forEach(e -> {
|
||||
list.add(e.getParentCodes());
|
||||
});
|
||||
return list.toArray(new String[list.size()]);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -74,28 +144,13 @@ public class EmpUtils {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
//
|
||||
// /**
|
||||
// * 获取当前用户有权限访问的机构
|
||||
// * @return
|
||||
// */
|
||||
// public static List<Office> getOfficeList(){
|
||||
// @SuppressWarnings("unchecked")
|
||||
// List<Office> officeList = (List<Office>)UserUtils.getCache(CACHE_OFFICE_LIST);
|
||||
// if (officeList == null){
|
||||
// User user = UserUtils.getUser();
|
||||
// if (user.isAdmin()){
|
||||
// officeList = officeService.findList(new Office());
|
||||
// }else{
|
||||
// Office office = new Office();
|
||||
// // 添加数据权限过滤条件
|
||||
// officeService.addDataScopeFilter(office);
|
||||
// officeList = officeService.findList(office);
|
||||
// }
|
||||
// UserUtils.putCache(CACHE_OFFICE_LIST, officeList);
|
||||
// }
|
||||
// return officeList;
|
||||
// }
|
||||
|
||||
/**
|
||||
* 获取当前员工附属部门
|
||||
*/
|
||||
public static Office getOffice(){
|
||||
return getEmployee().getOffice();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取所有的机构
|
||||
@@ -134,29 +189,6 @@ public class EmpUtils {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
//
|
||||
// /**
|
||||
// * 获取当前用户授权的公司
|
||||
// * @return
|
||||
// */
|
||||
// public static List<Company> getCompanyList(){
|
||||
// @SuppressWarnings("unchecked")
|
||||
// List<Company> companyList = (List<Company>)UserUtils.getCache(CACHE_COMPANY_LIST);
|
||||
// if (companyList == null){
|
||||
// User user = UserUtils.getUser();
|
||||
// if (user.isAdmin()){
|
||||
// companyList = companyService.findList(new Company());
|
||||
// }else{
|
||||
// Company company = new Company();
|
||||
// // 添加数据权限过滤条件
|
||||
// companyService.addDataScopeFilter(company);
|
||||
// companyList = companyService.findList(company);
|
||||
// }
|
||||
// UserUtils.putCache(CACHE_COMPANY_LIST, companyList);
|
||||
// }
|
||||
//
|
||||
// return companyList;
|
||||
// }
|
||||
|
||||
/**
|
||||
* 获取所有的公司
|
||||
@@ -179,9 +211,6 @@ public class EmpUtils {
|
||||
* @param user
|
||||
*/
|
||||
public static void removeCache(String key){
|
||||
// if (StringUtils.inString(key, CACHE_OFFICE_LIST, CACHE_COMPANY_LIST)){
|
||||
// UserUtils.removeCache(key);
|
||||
// }else
|
||||
if (StringUtils.inString(key, CACHE_OFFICE_ALL_LIST, CACHE_COMPANY_ALL_LIST)){
|
||||
CorpUtils.removeCache(key);
|
||||
}
|
||||
|
||||
@@ -6,6 +6,9 @@ package com.jeesite.modules.sys.web;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
@@ -20,6 +23,7 @@ import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import com.jeesite.common.collect.ListUtils;
|
||||
import com.jeesite.common.collect.MapUtils;
|
||||
import com.jeesite.common.config.Global;
|
||||
import com.jeesite.common.entity.Page;
|
||||
import com.jeesite.common.idgen.IdGen;
|
||||
import com.jeesite.common.lang.StringUtils;
|
||||
import com.jeesite.common.web.BaseController;
|
||||
@@ -63,7 +67,7 @@ public class AreaController extends BaseController {
|
||||
* 查询区域数据
|
||||
* @param area
|
||||
*/
|
||||
@RequiresPermissions("user")
|
||||
@RequiresPermissions("sys:area:view")
|
||||
@RequestMapping(value = "listData")
|
||||
@ResponseBody
|
||||
public List<Area> listData(Area area) {
|
||||
@@ -78,6 +82,22 @@ public class AreaController extends BaseController {
|
||||
return list;
|
||||
}
|
||||
|
||||
@RequiresPermissions("sys:area:view")
|
||||
@RequestMapping(value = "listPageData")
|
||||
@ResponseBody
|
||||
public Page<Area> listPageData(Area area, HttpServletRequest request, HttpServletResponse response) {
|
||||
if (StringUtils.isBlank(area.getParentCode())) {
|
||||
area.setParentCode(Area.ROOT_CODE);
|
||||
}
|
||||
if (StringUtils.isNotBlank(area.getAreaCode())
|
||||
|| StringUtils.isNotBlank(area.getAreaName())){
|
||||
area.setParentCode(null);
|
||||
}
|
||||
area.setPage(new Page<>(request, response, !area.getIsRoot() ? Page.PAGE_SIZE_NOT_PAGING : null));
|
||||
Page<Area> page = areaService.findPage(area);
|
||||
return page;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查看编辑区域
|
||||
* @param area
|
||||
@@ -186,9 +206,16 @@ public class AreaController extends BaseController {
|
||||
@RequiresPermissions("user")
|
||||
@RequestMapping(value = "treeData")
|
||||
@ResponseBody
|
||||
public List<Map<String, Object>> treeData(String excludeCode, String isShowCode) {
|
||||
public List<Map<String, Object>> treeData(String excludeCode, String isShowCode, String parentCode) {
|
||||
List<Map<String, Object>> mapList = ListUtils.newArrayList();
|
||||
List<Area> list = AreaUtils.getAreaAllList();
|
||||
List<Area> list = null;
|
||||
if (StringUtils.isNotBlank(parentCode)){
|
||||
Area where = new Area();
|
||||
where.setParentCode(parentCode);
|
||||
list = areaService.findList(where);
|
||||
}else{
|
||||
list = AreaUtils.getAreaAllList();
|
||||
}
|
||||
for (int i=0; i<list.size(); i++){
|
||||
Area e = list.get(i);
|
||||
// 过滤非正常的数据
|
||||
@@ -208,6 +235,7 @@ public class AreaController extends BaseController {
|
||||
map.put("id", e.getId());
|
||||
map.put("pId", e.getParentCode());
|
||||
map.put("name", StringUtils.getTreeNodeName(isShowCode, e.getId(), e.getAreaName()));
|
||||
map.put("isParent", !e.getIsTreeLeaf());
|
||||
mapList.add(map);
|
||||
}
|
||||
return mapList;
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.jeesite.modules.sys.web;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
@@ -7,6 +9,8 @@ import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import com.jeesite.common.cache.CacheUtils;
|
||||
import com.jeesite.common.config.Global;
|
||||
import com.jeesite.common.lang.StringUtils;
|
||||
import com.jeesite.common.mybatis.mapper.MapperHelper;
|
||||
import com.jeesite.common.web.BaseController;
|
||||
import com.jeesite.modules.sys.utils.UserUtils;
|
||||
|
||||
@@ -27,10 +31,21 @@ public class CacheController extends BaseController {
|
||||
@RequestMapping(value = "clearAll")
|
||||
@ResponseBody
|
||||
public String clearAll() {
|
||||
CacheUtils.clearCache();
|
||||
UserUtils.clearCache();
|
||||
Global.clearCache();
|
||||
CacheUtils.clearCache();
|
||||
MapperHelper.clearCache();
|
||||
UserUtils.clearCache();
|
||||
return renderResult(Global.TRUE, "清理缓存成功!");
|
||||
}
|
||||
|
||||
@PostConstruct
|
||||
public void postConstruct(){
|
||||
String rebel = System.getProperty("rebel.base");
|
||||
if (StringUtils.isNotBlank(rebel) && Global
|
||||
.getPropertyToBoolean("spring.cache.isClusterMode", "false")){
|
||||
logger.info("JRebel: Cache clear...");
|
||||
CacheUtils.clearCache();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ public class CompanyController extends BaseController {
|
||||
* 查询公司数据
|
||||
* @param company
|
||||
*/
|
||||
@RequiresPermissions("user")
|
||||
@RequiresPermissions("sys:company:view")
|
||||
@RequestMapping(value = "listData")
|
||||
@ResponseBody
|
||||
public List<Company> listData(Company company, String ctrlPermi) {
|
||||
@@ -209,7 +209,7 @@ public class CompanyController extends BaseController {
|
||||
List<Map<String, Object>> mapList = ListUtils.newArrayList();
|
||||
Company where = new Company();
|
||||
where.setStatus(Company.STATUS_NORMAL);
|
||||
if (!(isAll != null && isAll)){
|
||||
if (!(isAll != null && isAll) || Global.isStrictMode()){
|
||||
companyService.addDataScopeFilter(where, ctrlPermi);
|
||||
}
|
||||
List<Company> list = companyService.findList(where);
|
||||
|
||||
@@ -24,6 +24,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonView;
|
||||
import com.jeesite.common.codec.DesUtils;
|
||||
import com.jeesite.common.config.Global;
|
||||
import com.jeesite.common.lang.StringUtils;
|
||||
@@ -307,6 +308,7 @@ public class LoginController extends BaseController{
|
||||
// 非无类型用户,自动根据用户类型设置默认菜单的归属系统(个性化示例)
|
||||
//if (!User.USER_TYPE_NONE.equals(user.getUserType())){
|
||||
// session.setAttribute("sysCode", user.getUserType());
|
||||
// UserUtils.removeCache(UserUtils.CACHE_AUTH_INFO+"_"+session.getId());
|
||||
//}
|
||||
|
||||
// 返回指定用户类型的首页视图
|
||||
@@ -344,11 +346,9 @@ public class LoginController extends BaseController{
|
||||
@RequiresPermissions("user")
|
||||
@RequestMapping(value = "menuTree")
|
||||
@ResponseBody
|
||||
@JsonView(Menu.SimpleView.class)
|
||||
public List<Menu> menuTree(String parentCode) {
|
||||
if (StringUtils.isNotBlank(parentCode)){
|
||||
return UserUtils.getMenuListByParentCode(parentCode);
|
||||
}
|
||||
return UserUtils.getMenuTree();
|
||||
return UserUtils.getMenuTreeByParentCode(parentCode);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -357,12 +357,29 @@ public class LoginController extends BaseController{
|
||||
@RequiresPermissions("user")
|
||||
@RequestMapping(value = "switch/{sysCode}")
|
||||
public String switchSys(@PathVariable String sysCode) {
|
||||
User user = UserUtils.getUser();
|
||||
if (user.isSuperAdmin() && StringUtils.isNotBlank(sysCode)){
|
||||
Session session = UserUtils.getSession();
|
||||
Session session = UserUtils.getSession();
|
||||
if (StringUtils.isNotBlank(sysCode)){
|
||||
session.setAttribute("sysCode", sysCode);
|
||||
UserUtils.removeCache(UserUtils.CACHE_AUTH_INFO+"_"+session.getId());
|
||||
}else{
|
||||
session.removeAttribute("sysCode");
|
||||
}
|
||||
UserUtils.removeCache(UserUtils.CACHE_AUTH_INFO+"_"+session.getId());
|
||||
return REDIRECT + adminPath + "/index";
|
||||
}
|
||||
|
||||
/**
|
||||
* 切换角色菜单(仅超级管理员有权限)
|
||||
*/
|
||||
@RequiresPermissions("user")
|
||||
@RequestMapping(value = {"switchRole","switchRole/{roleCode}"})
|
||||
public String switchRole(@PathVariable(required=false) String roleCode) {
|
||||
Session session = UserUtils.getSession();
|
||||
if (StringUtils.isNotBlank(roleCode)){
|
||||
session.setAttribute("roleCode", roleCode);
|
||||
}else{
|
||||
session.removeAttribute("roleCode");
|
||||
}
|
||||
UserUtils.removeCache(UserUtils.CACHE_AUTH_INFO+"_"+session.getId());
|
||||
return REDIRECT + adminPath + "/index";
|
||||
}
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@ import com.jeesite.common.config.Global;
|
||||
import com.jeesite.common.idgen.IdGen;
|
||||
import com.jeesite.common.lang.StringUtils;
|
||||
import com.jeesite.common.web.BaseController;
|
||||
import com.jeesite.modules.sys.entity.EmpUser;
|
||||
import com.jeesite.modules.sys.entity.Office;
|
||||
import com.jeesite.modules.sys.service.OfficeService;
|
||||
import com.jeesite.modules.sys.utils.UserUtils;
|
||||
@@ -52,6 +53,15 @@ public class OfficeController extends BaseController {
|
||||
return officeService.get(officeCode, isNewRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 机构管理主页面
|
||||
*/
|
||||
@RequiresPermissions("sys:office:view")
|
||||
@RequestMapping(value = "index")
|
||||
public String index(EmpUser empUser, Model model) {
|
||||
return "modules/sys/officeIndex";
|
||||
}
|
||||
|
||||
/**
|
||||
* 机构列表
|
||||
* @param office
|
||||
@@ -67,7 +77,7 @@ public class OfficeController extends BaseController {
|
||||
* 查询机构数据
|
||||
* @param office
|
||||
*/
|
||||
@RequiresPermissions("user")
|
||||
@RequiresPermissions("sys:company:view")
|
||||
@RequestMapping(value = "listData")
|
||||
@ResponseBody
|
||||
public List<Office> listData(Office office, String ctrlPermi) {
|
||||
@@ -222,7 +232,7 @@ public class OfficeController extends BaseController {
|
||||
Office where = new Office();
|
||||
where.setStatus(Office.STATUS_NORMAL);
|
||||
where.setCompanyCode(companyCode);
|
||||
if (!(isAll != null && isAll)){
|
||||
if (!(isAll != null && isAll) || Global.isStrictMode()){
|
||||
officeService.addDataScopeFilter(where, ctrlPermi);
|
||||
}
|
||||
List<Office> list = officeService.findList(where);
|
||||
|
||||
@@ -28,7 +28,6 @@ import com.jeesite.common.collect.ListUtils;
|
||||
import com.jeesite.common.collect.MapUtils;
|
||||
import com.jeesite.common.config.Global;
|
||||
import com.jeesite.common.lang.DateUtils;
|
||||
import com.jeesite.common.lang.ObjectUtils;
|
||||
import com.jeesite.common.lang.StringUtils;
|
||||
import com.jeesite.common.lang.TimeUtils;
|
||||
import com.jeesite.common.shiro.realm.LoginInfo;
|
||||
@@ -105,16 +104,10 @@ public class OnlineController extends BaseController{
|
||||
map.put("startTimestamp", DateUtils.formatDateTime(session.getStartTimestamp()));
|
||||
map.put("lastAccessTime", DateUtils.formatDateTime(session.getLastAccessTime()));
|
||||
map.put("timeout", TimeUtils.formatDateAgo(session.getTimeout()-(currentTime-session.getLastAccessTime().getTime())));
|
||||
Object pc = session.getAttribute(DefaultSubjectContext.PRINCIPALS_SESSION_KEY);
|
||||
if (pc != null && pc instanceof PrincipalCollection){
|
||||
LoginInfo loginInfo = (LoginInfo)((PrincipalCollection)pc).getPrimaryPrincipal();
|
||||
if (loginInfo != null){
|
||||
map.put("userCode", session.getAttribute("userCode"));// principal.getId());
|
||||
map.put("userName", session.getAttribute("userName"));// principal.getName());
|
||||
map.put("userType", session.getAttribute("userType"));// ObjectUtils.toString(principal.getParam("userType")));
|
||||
map.put("deviceType", ObjectUtils.toString(loginInfo.getParam("deviceType")));
|
||||
}
|
||||
}
|
||||
map.put("userCode", session.getAttribute("userCode"));
|
||||
map.put("userName", session.getAttribute("userName"));
|
||||
map.put("userType", session.getAttribute("userType"));
|
||||
map.put("deviceType", session.getAttribute("deviceType"));
|
||||
map.put("host", session.getHost());
|
||||
list.add(map);
|
||||
}
|
||||
|
||||
@@ -131,7 +131,6 @@ public class PostController extends BaseController {
|
||||
|
||||
/**
|
||||
* 获取岗位树结构数据
|
||||
* @param isAll 是否显示所有机构(true:不进行权限过滤)
|
||||
* @param isShowCode 是否显示编码(true or 1:显示在左侧;2:显示在右侧;false or null:不显示)
|
||||
* @return
|
||||
*/
|
||||
|
||||
@@ -12,6 +12,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
@@ -29,6 +30,11 @@ import com.jeesite.modules.sys.utils.PwdUtils;
|
||||
import com.jeesite.modules.sys.utils.UserUtils;
|
||||
import com.jeesite.modules.sys.utils.ValidCodeUtils;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
|
||||
/**
|
||||
* 账号自助服务Controller
|
||||
* @author ThinkGem
|
||||
@@ -37,6 +43,7 @@ import com.jeesite.modules.sys.utils.ValidCodeUtils;
|
||||
@Controller
|
||||
@RequestMapping(value = "/account")
|
||||
@ConditionalOnProperty(name="web.core.enabled", havingValue="true", matchIfMissing=true)
|
||||
@Api(tags = "Account / 账号自助服务、找回密码、账号注册")
|
||||
public class AccountController extends BaseController{
|
||||
|
||||
@Autowired
|
||||
@@ -45,9 +52,9 @@ public class AccountController extends BaseController{
|
||||
/**
|
||||
* 忘记密码页面
|
||||
*/
|
||||
@RequestMapping(value = "forgetPwd")
|
||||
@GetMapping(value = "forgetPwd")
|
||||
@ApiOperation(value = "忘记密码页面")
|
||||
public String forgetPwd(Model model) {
|
||||
model.addAttribute("message", "正在研发中,敬请期待!");
|
||||
return "modules/sys/account/forgetPwd";
|
||||
}
|
||||
|
||||
@@ -58,6 +65,12 @@ public class AccountController extends BaseController{
|
||||
*/
|
||||
@PostMapping(value = "getFpValidCode")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "获取找回密码的短信或邮件验证码")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "loginCode", value = "登录账号", required = true, paramType="query", type="String"),
|
||||
@ApiImplicitParam(name = "validCode", value = "图片验证码,防止重复机器人", required = true),
|
||||
@ApiImplicitParam(name = "validType", value = "验证方式(mobile、email)", required = true),
|
||||
})
|
||||
public String getFpValidCode(User user, String validCode, String validType, HttpServletRequest request) {
|
||||
// 校验图片验证码,防止重复机器人。
|
||||
if (!ValidCodeUtils.validate(request, validCode)){
|
||||
@@ -99,10 +112,16 @@ public class AccountController extends BaseController{
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据短信或邮件验证码保存密码
|
||||
* 根据短信或邮件验证码重置密码
|
||||
*/
|
||||
@PostMapping(value = "savePwdByValidCode")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "根据短信或邮件验证码重置密码")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "loginCode", value = "登录账号", required = true, paramType="query", type="String"),
|
||||
@ApiImplicitParam(name = "fpValidCode", value = "手机或邮箱接受的验证码", required = true),
|
||||
@ApiImplicitParam(name = "password", value = "新密码", required = true, paramType="query", type="String"),
|
||||
})
|
||||
public String savePwdByValidCode(User user, String fpValidCode, HttpServletRequest request) {
|
||||
String userCode = (String)UserUtils.getCache("fpUserCode");
|
||||
String loginCode = (String)UserUtils.getCache("fpLoginCode");
|
||||
@@ -140,11 +159,16 @@ public class AccountController extends BaseController{
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取保密问题
|
||||
* 获取找回密码的保密问题
|
||||
* @param validCode 图片验证码,防止重复机器人。
|
||||
*/
|
||||
@PostMapping(value = "getPwdQuestion")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "获取找回密码的保密问题")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "loginCode", value = "登录账号", required = true, paramType="query", type="String"),
|
||||
@ApiImplicitParam(name = "validCode", value = "图片验证码,防止重复机器人", required = true),
|
||||
})
|
||||
public String getPwdQuestion(User user, String validCode, HttpServletRequest request) {
|
||||
// 校验图片验证码,防止重复机器人。
|
||||
if (!ValidCodeUtils.validate(request, validCode)){
|
||||
@@ -186,6 +210,14 @@ public class AccountController extends BaseController{
|
||||
*/
|
||||
@PostMapping(value = "savePwdByPwdQuestion")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "根据保密问题重置密码")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "loginCode", value = "登录账号", required = true, paramType="query", type="String"),
|
||||
@ApiImplicitParam(name = "pwdQuestionAnswer", value = "保密问题答案(1)", required = true, paramType="query", type="String"),
|
||||
@ApiImplicitParam(name = "pwdQuestionAnswer2", value = "保密问题答案(2)", required = true, paramType="query", type="String"),
|
||||
@ApiImplicitParam(name = "pwdQuestionAnswer3", value = "保密问题答案(3)", required = true, paramType="query", type="String"),
|
||||
@ApiImplicitParam(name = "password", value = "新密码", required = true, paramType="query", type="String"),
|
||||
})
|
||||
public String savePwdByPwdQuestion(User user, HttpServletRequest request) {
|
||||
String userCode = (String)UserUtils.getCache("fpUserCode");
|
||||
String loginCode = (String)UserUtils.getCache("fpLoginCode");
|
||||
@@ -221,7 +253,8 @@ public class AccountController extends BaseController{
|
||||
* 用户注册页面
|
||||
* @param user 用户信息参数
|
||||
*/
|
||||
@RequestMapping(value = "registerUser")
|
||||
@GetMapping(value = "registerUser")
|
||||
@ApiOperation(value = "用户注册页面")
|
||||
public String registerUser(User user, HttpServletRequest request) {
|
||||
return "modules/sys/account/registerUser";
|
||||
}
|
||||
@@ -233,6 +266,18 @@ public class AccountController extends BaseController{
|
||||
*/
|
||||
@PostMapping(value = "getRegValidCode")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "获取注册用户短信或邮件验证码")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "loginCode", value = "登录账号", required = true, paramType="query", type="String"),
|
||||
@ApiImplicitParam(name = "userName", value = "用户姓名", required = true, paramType="query", type="String"),
|
||||
@ApiImplicitParam(name = "email", value = "电子邮箱", required = true, paramType="query", type="String"),
|
||||
@ApiImplicitParam(name = "mobile", value = "手机号码", required = true, paramType="query", type="String"),
|
||||
@ApiImplicitParam(name = "corpCode", value = "租户编号", required = true, paramType="query", type="String"),
|
||||
@ApiImplicitParam(name = "corpName", value = "租户名称", required = true, paramType="query", type="String"),
|
||||
@ApiImplicitParam(name = "userType", value = "用户类型(employee)", required = true, paramType="query", type="String"),
|
||||
@ApiImplicitParam(name = "validCode", value = "图片验证码,防止重复机器人", required = true),
|
||||
@ApiImplicitParam(name = "validType", value = "验证方式(mobile、email)", required = true),
|
||||
})
|
||||
public String getRegValidCode(User user, String validCode, String validType, HttpServletRequest request) {
|
||||
// 校验图片验证码,防止重复机器人。
|
||||
if (!ValidCodeUtils.validate(request, validCode)){
|
||||
@@ -295,6 +340,13 @@ public class AccountController extends BaseController{
|
||||
*/
|
||||
@PostMapping(value = "saveRegByValidCode")
|
||||
@ResponseBody
|
||||
@ApiOperation(value = "根据短信或邮件验证码注册用户")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "loginCode", value = "登录账号", required = true, paramType="query", type="String"),
|
||||
@ApiImplicitParam(name = "userName", value = "用户姓名", required = true, paramType="query", type="String"),
|
||||
@ApiImplicitParam(name = "password", value = "登录密码", required = true, paramType="query", type="String"),
|
||||
@ApiImplicitParam(name = "regValidCode", value = "手机或邮箱接受的验证码", required = true),
|
||||
})
|
||||
public String saveRegByValidCode(User user, String regValidCode, HttpServletRequest request) {
|
||||
if (!"true".equals(Global.getConfig("sys.account.registerUser"))){
|
||||
return renderResult(Global.FALSE, "当前系统没有开启注册功能!");
|
||||
|
||||
@@ -95,7 +95,7 @@ public class EmpUserController extends BaseController {
|
||||
public Page<EmpUser> listData(EmpUser empUser, Boolean isAll, String ctrlPermi, HttpServletRequest request, HttpServletResponse response) {
|
||||
empUser.getEmployee().getOffice().setIsQueryChildren(true);
|
||||
empUser.getEmployee().getCompany().setIsQueryChildren(true);
|
||||
if (!(isAll != null && isAll)){
|
||||
if (!(isAll != null && isAll) || Global.isStrictMode()){
|
||||
empUserService.addDataScopeFilter(empUser, ctrlPermi);
|
||||
}
|
||||
empUser.setPage(new Page<>(request, response));
|
||||
@@ -123,9 +123,11 @@ public class EmpUserController extends BaseController {
|
||||
Post post = new Post();
|
||||
model.addAttribute("postList", postService.findList(post));
|
||||
|
||||
// 获取当前用户所拥有的岗位
|
||||
if (StringUtils.isNotBlank(employee.getEmpCode())){
|
||||
// 获取当前用户所拥有的岗位
|
||||
employee.setEmployeePostList(employeeService.findEmployeePostList(employee));
|
||||
// 获取当前员工关联的附属机构信息
|
||||
employee.setEmployeeOfficeList(employeeService.findEmployeeOfficeList(employee));
|
||||
}
|
||||
|
||||
// 获取当前编辑用户的角色和权限
|
||||
@@ -175,7 +177,7 @@ public class EmpUserController extends BaseController {
|
||||
public void exportData(EmpUser empUser, Boolean isAll, String ctrlPermi, HttpServletResponse response) {
|
||||
empUser.getEmployee().getOffice().setIsQueryChildren(true);
|
||||
empUser.getEmployee().getCompany().setIsQueryChildren(true);
|
||||
if (!(isAll != null && isAll)){
|
||||
if (!(isAll != null && isAll) || Global.isStrictMode()){
|
||||
empUserService.addDataScopeFilter(empUser, ctrlPermi);
|
||||
}
|
||||
List<EmpUser> list = empUserService.findList(empUser);
|
||||
@@ -367,7 +369,7 @@ public class EmpUserController extends BaseController {
|
||||
empUser.setRoleCode(roleCode);
|
||||
empUser.setStatus(User.STATUS_NORMAL);
|
||||
empUser.setUserType(User.USER_TYPE_EMPLOYEE);
|
||||
if (!(isAll != null && isAll)) {
|
||||
if (!(isAll != null && isAll) || Global.isStrictMode()) {
|
||||
empUserService.addDataScopeFilter(empUser, ctrlPermi);
|
||||
}
|
||||
List<EmpUser> list = empUserService.findList(empUser);
|
||||
|
||||
@@ -50,7 +50,7 @@ public class SecAdminController extends BaseController {
|
||||
return "modules/sys/user/secAdminList";
|
||||
}
|
||||
|
||||
@RequiresPermissions("user")
|
||||
@RequiresPermissions("sys:secAdmin:view")
|
||||
@RequestMapping(value = "listData")
|
||||
@ResponseBody
|
||||
public Page<User> listData(User user, HttpServletRequest request, HttpServletResponse response) {
|
||||
|
||||
@@ -41,14 +41,24 @@ jdbc:
|
||||
maxEvictableIdleTimeMillis: 1800000
|
||||
|
||||
# 是否自动回收泄露的连接和超时时间,单位秒(35分钟)(4.0.6+)
|
||||
removeAbandoned: true
|
||||
removeAbandoned: false
|
||||
removeAbandonedTimeout: 2100
|
||||
|
||||
# JTA 分布式事务(v4.0.4+)
|
||||
# Oracle 下会自动开启 PSCache,并指定每个连接上 PSCache 大小。若不指定,则与 maxActive 相同(4.1.5+)
|
||||
maxPoolPreparedStatementPerConnectionSize: ~
|
||||
|
||||
# JTA 分布式事务,建议启用多数据源的时候开启(v4.0.4+)
|
||||
jta:
|
||||
enabled: false
|
||||
# 事务超时时间,单位毫秒(3分钟)
|
||||
transactionTimeout: 180000
|
||||
|
||||
# 注意:如果报 oracle.jdbc.xa.OracleXAResource.recover 错误,则需要授权如下:
|
||||
# grant select on sys.dba_pending_transactions to jeesite;
|
||||
# grant select on sys.pending_trans$ to jeesite;
|
||||
# grant select on sys.dba_2pc_pending to jeesite;
|
||||
# grant execute on sys.dbms_system to jeesite;
|
||||
|
||||
# 事务超时时间,单位秒(30分钟)(v4.1.5+)
|
||||
transactionTimeout: 1800
|
||||
|
||||
# 表名前缀
|
||||
tablePrefix: js_
|
||||
@@ -64,7 +74,7 @@ spring:
|
||||
# 缓存及会话共享(专业版)
|
||||
isClusterMode: false
|
||||
# 清理全部缓存按钮所清理的缓存列表
|
||||
clearNames: sysCache,corpCache,userCache,cmsCache
|
||||
clearNames: sysCache,corpCache,userCache,cmsCache,msgPcPoolCache
|
||||
|
||||
# 打印横幅
|
||||
main:
|
||||
@@ -109,7 +119,6 @@ user:
|
||||
"employee":{"dao":"employeeDao","loginView":"","indexView":"modules/sys/sysIndex"},
|
||||
"member":{"dao":"memberDao","loginView":"","indexView":"modules/sys/sysIndexMember"},
|
||||
"btype":{"dao":"btypeInfoDao","loginView":"","indexView":"modules/sys/sysIndexBtype"},
|
||||
"persion":{"dao":"persionDao","loginView":"","indexView":"modules/sys/sysIndexPersion"},
|
||||
"expert":{"dao":"expertDao","loginView":"","indexView":"modules/sys/sysIndexExpert"}
|
||||
}
|
||||
|
||||
@@ -147,6 +156,9 @@ user:
|
||||
remarks: ""
|
||||
}]
|
||||
|
||||
# 管理功能的控制权限类型(1拥有的权限 2管理的权限)(v4.1.5+)
|
||||
adminCtrlPermi: 2
|
||||
|
||||
# 多租户模式(SAAS模式)(专业版)
|
||||
useCorpModel: false
|
||||
|
||||
@@ -160,14 +172,18 @@ user:
|
||||
# 角色管理
|
||||
role:
|
||||
# 扩展数据权限定义:3:本部门;4:本公司;5:本部门和本公司
|
||||
# 如果 ctrlTypeClass 为 NONE,则代表是不控制该类型权限
|
||||
extendDataScopes: >
|
||||
{
|
||||
3: {
|
||||
Office: {
|
||||
#控制类型的类名 : "用来获取控制表名和主键,如果为 NONE,则代表是不控制该类型权限;",
|
||||
ctrlTypeClass: "com.jeesite.modules.sys.entity.Office",
|
||||
ctrlDataAttrName: "currentUser.refObj.office.officeCode",
|
||||
ctrlDataParentCodesAttrName: "currentUser.refObj.office.parentCodes"
|
||||
#控制数据的类名: "指定一个静态类名,方便 ctrlDataAttrName 得到权限数据,如:当前部门编码、公司编码",
|
||||
ctrlDataClass: "com.jeesite.modules.sys.utils.EmpUtils",
|
||||
#控制数据的类名下的属性名 : "可看做类下的 get 方法,如:EmpUtils.getOffices(),支持返回字符串或字符串数组类型",
|
||||
ctrlDataAttrName: "officeCodes",
|
||||
#控制数据的所有上级编码 : "用于控制数据为树表的情况,为数组时,必须与 ctrlDataAttrName 返回的长度相同,不是树表设置为空",
|
||||
ctrlDataParentCodesAttrName: "officeParentCodess"
|
||||
},
|
||||
Company: {
|
||||
ctrlTypeClass: "NONE"
|
||||
@@ -179,20 +195,23 @@ role:
|
||||
},
|
||||
Company: {
|
||||
ctrlTypeClass: "com.jeesite.modules.sys.entity.Company",
|
||||
ctrlDataAttrName: "currentUser.refObj.company.companyCode",
|
||||
ctrlDataParentCodesAttrName: "currentUser.refObj.company.parentCodes"
|
||||
ctrlDataClass: "com.jeesite.modules.sys.utils.EmpUtils",
|
||||
ctrlDataAttrName: "company.companyCode",
|
||||
ctrlDataParentCodesAttrName: "company.parentCodes"
|
||||
}
|
||||
},
|
||||
5: {
|
||||
Office: {
|
||||
ctrlTypeClass: "com.jeesite.modules.sys.entity.Office",
|
||||
ctrlDataAttrName: "currentUser.refObj.office.officeCode",
|
||||
ctrlDataParentCodesAttrName: "currentUser.refObj.office.parentCodes"
|
||||
ctrlDataClass: "com.jeesite.modules.sys.utils.EmpUtils",
|
||||
ctrlDataAttrName: "officeCodes",
|
||||
ctrlDataParentCodesAttrName: "officeParentCodess"
|
||||
},
|
||||
Company: {
|
||||
ctrlTypeClass: "com.jeesite.modules.sys.entity.Company",
|
||||
ctrlDataAttrName: "currentUser.refObj.company.companyCode",
|
||||
ctrlDataParentCodesAttrName: "currentUser.refObj.company.parentCodes"
|
||||
ctrlDataClass: "com.jeesite.modules.sys.utils.EmpUtils",
|
||||
ctrlDataAttrName: "company.companyCode",
|
||||
ctrlDataParentCodesAttrName: "company.parentCodes"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -314,7 +333,7 @@ shiro:
|
||||
remoteAddrHeaderName: X-Forwarded-For
|
||||
|
||||
# 允许的请求方法设定,解决安全审计问题
|
||||
allowRequestMethods: GET,POST
|
||||
allowRequestMethods: GET,POST,OPTIONS,PUT,DELETE
|
||||
|
||||
# 是否允许账号多地登录,如果设置为false,同一个设备类型的其它地点登录的相同账号被踢下线
|
||||
isAllowMultiAddrLogin: true
|
||||
@@ -335,6 +354,10 @@ shiro:
|
||||
# 是否允许接收跨域的Cookie凭证数据
|
||||
# accessControlAllowCredentials: true
|
||||
|
||||
# 允许的网站来源地址,不设置为全部地址(避免一些跨站点请求伪造CSRF)
|
||||
# allowReferers: http://127.0.0.1,http://localhost
|
||||
# allowReferers: ~
|
||||
|
||||
# 是否在登录后生成新的Session(默认false)
|
||||
isGenerateNewSessionAfterLogin: false
|
||||
|
||||
@@ -381,6 +404,7 @@ shiro:
|
||||
session:
|
||||
|
||||
# 全局会话超时,单位:毫秒, 20m=1200000ms, 30m=1800000ms, 60m=3600000ms, 12h=43200000ms, 1day=86400000ms
|
||||
# 注意:如果超时超过30m,你还需要同步修改 j2cache.properties 文件的 caffeine.region.sessionCache 超时时间,大于这个值。
|
||||
sessionTimeout: 1800000
|
||||
|
||||
# 手机APP设备会话超时参数设置,登录请求参数加 param_deviceType=mobileApp 时有效
|
||||
@@ -414,7 +438,7 @@ mybatis:
|
||||
|
||||
# Web 相关
|
||||
web:
|
||||
|
||||
|
||||
# MVC 视图相关
|
||||
view:
|
||||
|
||||
@@ -455,12 +479,18 @@ web:
|
||||
|
||||
# 静态文件后缀,排除的url路径,指定哪些uri路径不进行静态文件过滤。
|
||||
staticFileExcludeUri: /druid/
|
||||
|
||||
|
||||
# 静态资源路径前缀,可做CDN加速优化
|
||||
staticPrefix: /static
|
||||
|
||||
# 严格模式(更严格的数据安全验证)
|
||||
strictMode: false
|
||||
|
||||
# 自定义正则表达式验证(主键、登录名)
|
||||
validator:
|
||||
id: '[a-zA-Z0-9_\-/#\u4e00-\u9fa5]{0,64}'
|
||||
user.loginCode: '[a-zA-Z0-9_\u4e00-\u9fa5]{4,20}'
|
||||
|
||||
|
||||
# 核心模块的Web功能(仅作为微服务时设为false)
|
||||
core:
|
||||
enabled: true
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
<logger name="com.atomikos.icatch.provider.imp.AssemblerImp" level="ERROR" />
|
||||
<logger name="com.atomikos.jdbc.AbstractDataSourceBean" level="ERROR" />
|
||||
<logger name="com.atomikos.jdbc.AtomikosConnectionProxy" level="ERROR" />
|
||||
<logger name="com.atomikos.recovery.xa.XaResourceRecoveryManager" level="ERROR" />
|
||||
<!-- <logger name="org.springframework.transaction.support.TransactionSynchronizationManager" level="TRACE" /> -->
|
||||
|
||||
<logger name="springfox.documentation.spring.web.readers.parameter.ParameterDataTypeReader" level="ERROR" />
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
|
||||
-- 新增文件管理模块
|
||||
INSERT INTO ${_prefix}sys_module(module_code, module_name, description, main_class_name, current_version, upgrade_info, status, create_by, create_date, update_by, update_date, remarks)
|
||||
VALUES ('filemanager', '文件管理', '公共文件柜、个人文件柜、文件分享', 'com.jeesite.modules.filemanager.web.FilemanagerController', '4.1.4', NULL, '0', 'system', getdate(), 'system', getdate(), NULL);
|
||||
|
||||
-- 员工附属机构关系表
|
||||
CREATE TABLE [${_prefix}sys_employee_office]
|
||||
(
|
||||
[id] varchar(64) NOT NULL UNIQUE,
|
||||
[emp_code] varchar(64) NOT NULL,
|
||||
[office_code] varchar(64) NOT NULL,
|
||||
[post_code] varchar(64),
|
||||
PRIMARY KEY ([emp_code], [office_code])
|
||||
);
|
||||
|
||||
-- 新增日语(日本语)语言包
|
||||
INSERT INTO ${_prefix}sys_dict_data(dict_code, parent_code, parent_codes, tree_sort, tree_sorts, tree_leaf, tree_level, tree_names, dict_label, dict_value, dict_type, is_sys, description, css_style, css_class, status, create_by, create_date, update_by, update_date, remarks, corp_code, corp_name, extend_s1, extend_s2, extend_s3, extend_s4, extend_s5, extend_s6, extend_s7, extend_s8, extend_i1, extend_i2, extend_i3, extend_i4, extend_f1, extend_f2, extend_f3, extend_f4, extend_d1, extend_d2, extend_d3, extend_d4)
|
||||
VALUES ('1126375062364020736', '0', '0,', 60, '0000000060,', '1', 0, '日本語', '日本語', 'ja_JP', 'sys_lang_type', '1', '', '', '', '0', 'system', getdate(), 'system', getdate(), '', '0', 'JeeSite', '', '', '', '', '', '', '', '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
@@ -0,0 +1,35 @@
|
||||
|
||||
-- 菜单表增加菜单标题(页签的名字)
|
||||
ALTER TABLE ${_prefix}sys_menu ADD menu_title varchar(100) NULL;
|
||||
|
||||
-- 角色业务范围字典数据
|
||||
INSERT INTO ${_prefix}sys_dict_type(id, dict_name, dict_type, is_sys, status, create_by, create_date, update_by, update_date, remarks)
|
||||
VALUES ('1149344200121085952', '角色业务范围', 'sys_role_biz_scope', '1', '0', 'system', getdate(), 'system', getdate(), '');
|
||||
INSERT INTO ${_prefix}sys_dict_data(dict_code, parent_code, parent_codes, tree_sort, tree_sorts, tree_leaf, tree_level, tree_names, dict_label, dict_value, dict_type, is_sys, description, css_style, css_class, status, create_by, create_date, update_by, update_date, remarks, corp_code, corp_name, extend_s1, extend_s2, extend_s3, extend_s4, extend_s5, extend_s6, extend_s7, extend_s8, extend_i1, extend_i2, extend_i3, extend_i4, extend_f1, extend_f2, extend_f3, extend_f4, extend_d1, extend_d2, extend_d3, extend_d4)
|
||||
VALUES ('1149344606834356224', '0', '0,', 30, '0000000030,', '1', 0, '组织管理', '组织管理', 'office_user', 'sys_role_biz_scope', '1', '', '', '', '0', 'system', getdate(), 'system', getdate(), '', '0', 'JeeSite', '', '', '', '', '', '', '', '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
|
||||
-- 角色表增加适应业务范围
|
||||
ALTER TABLE ${_prefix}sys_role ADD biz_scope varchar(255) NULL;
|
||||
|
||||
-- 角色表增加 20 个扩展字段
|
||||
ALTER TABLE ${_prefix}sys_role
|
||||
ADD extend_s1 nvarchar(500),
|
||||
extend_s2 nvarchar(500),
|
||||
extend_s3 nvarchar(500),
|
||||
extend_s4 nvarchar(500),
|
||||
extend_s5 nvarchar(500),
|
||||
extend_s6 nvarchar(500),
|
||||
extend_s7 nvarchar(500),
|
||||
extend_s8 nvarchar(500),
|
||||
extend_i1 decimal(19),
|
||||
extend_i2 decimal(19),
|
||||
extend_i3 decimal(19),
|
||||
extend_i4 decimal(19),
|
||||
extend_f1 decimal(19,4),
|
||||
extend_f2 decimal(19,4),
|
||||
extend_f3 decimal(19,4),
|
||||
extend_f4 decimal(19,4),
|
||||
extend_d1 datetime,
|
||||
extend_d2 datetime,
|
||||
extend_d3 datetime,
|
||||
extend_d4 datetime;
|
||||
@@ -0,0 +1,19 @@
|
||||
|
||||
-- 新增文件管理模块
|
||||
INSERT INTO ${_prefix}sys_module(module_code, module_name, description, main_class_name, current_version, upgrade_info, status, create_by, create_date, update_by, update_date, remarks)
|
||||
VALUES ('filemanager', '文件管理', '公共文件柜、个人文件柜、文件分享', 'com.jeesite.modules.filemanager.web.FilemanagerController', '4.1.4', NULL, '0', 'system', now(), 'system', now(), NULL);
|
||||
|
||||
-- 员工附属机构关系表
|
||||
CREATE TABLE ${_prefix}sys_employee_office
|
||||
(
|
||||
id varchar(64) NOT NULL COMMENT '编号',
|
||||
emp_code varchar(64) NOT NULL COMMENT '员工编码',
|
||||
office_code varchar(64) NOT NULL COMMENT '机构编码',
|
||||
post_code varchar(64) COMMENT '岗位编码',
|
||||
PRIMARY KEY (emp_code, office_code),
|
||||
UNIQUE (id)
|
||||
) COMMENT = '员工附属机构关系表';
|
||||
|
||||
-- 新增日语(日本语)语言包
|
||||
INSERT INTO ${_prefix}sys_dict_data(dict_code, parent_code, parent_codes, tree_sort, tree_sorts, tree_leaf, tree_level, tree_names, dict_label, dict_value, dict_type, is_sys, description, css_style, css_class, status, create_by, create_date, update_by, update_date, remarks, corp_code, corp_name, extend_s1, extend_s2, extend_s3, extend_s4, extend_s5, extend_s6, extend_s7, extend_s8, extend_i1, extend_i2, extend_i3, extend_i4, extend_f1, extend_f2, extend_f3, extend_f4, extend_d1, extend_d2, extend_d3, extend_d4)
|
||||
VALUES ('1126375062364020736', '0', '0,', 60, '0000000060,', '1', 0, '日本語', '日本語', 'ja_JP', 'sys_lang_type', '1', '', '', '', '0', 'system', now(), 'system', now(), '', '0', 'JeeSite', '', '', '', '', '', '', '', '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
@@ -0,0 +1,37 @@
|
||||
|
||||
-- 菜单表增加菜单标题(页签的名字)
|
||||
ALTER TABLE `${_prefix}sys_menu`
|
||||
ADD COLUMN `menu_title` varchar(100) NULL COMMENT '菜单标题' AFTER `menu_color`;
|
||||
|
||||
-- 角色业务范围字典数据
|
||||
INSERT INTO `${_prefix}sys_dict_type`(`id`, `dict_name`, `dict_type`, `is_sys`, `status`, `create_by`, `create_date`, `update_by`, `update_date`, `remarks`)
|
||||
VALUES ('1149344200121085952', '角色业务范围', 'sys_role_biz_scope', '1', '0', 'system', now(), 'system', now(), '');
|
||||
INSERT INTO `${_prefix}sys_dict_data`(`dict_code`, `parent_code`, `parent_codes`, `tree_sort`, `tree_sorts`, `tree_leaf`, `tree_level`, `tree_names`, `dict_label`, `dict_value`, `dict_type`, `is_sys`, `description`, `css_style`, `css_class`, `status`, `create_by`, `create_date`, `update_by`, `update_date`, `remarks`, `corp_code`, `corp_name`, `extend_s1`, `extend_s2`, `extend_s3`, `extend_s4`, `extend_s5`, `extend_s6`, `extend_s7`, `extend_s8`, `extend_i1`, `extend_i2`, `extend_i3`, `extend_i4`, `extend_f1`, `extend_f2`, `extend_f3`, `extend_f4`, `extend_d1`, `extend_d2`, `extend_d3`, `extend_d4`)
|
||||
VALUES ('1149344606834356224', '0', '0,', 30, '0000000030,', '1', 0, '组织管理', '组织管理', 'office_user', 'sys_role_biz_scope', '1', '', '', '', '0', 'system', now(), 'system', now(), '', '0', 'JeeSite', '', '', '', '', '', '', '', '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
|
||||
-- 角色表增加适应业务范围
|
||||
ALTER TABLE `${_prefix}sys_role`
|
||||
ADD COLUMN `biz_scope` varchar(255) NULL COMMENT '适应业务范围(不同的功能,不同的数据权限支持)' AFTER `data_scope`;
|
||||
|
||||
-- 角色表增加 20 个扩展字段
|
||||
ALTER TABLE `${_prefix}sys_role`
|
||||
ADD COLUMN extend_s1 varchar(500) COMMENT '扩展 String 1',
|
||||
ADD COLUMN extend_s2 varchar(500) COMMENT '扩展 String 2',
|
||||
ADD COLUMN extend_s3 varchar(500) COMMENT '扩展 String 3',
|
||||
ADD COLUMN extend_s4 varchar(500) COMMENT '扩展 String 4',
|
||||
ADD COLUMN extend_s5 varchar(500) COMMENT '扩展 String 5',
|
||||
ADD COLUMN extend_s6 varchar(500) COMMENT '扩展 String 6',
|
||||
ADD COLUMN extend_s7 varchar(500) COMMENT '扩展 String 7',
|
||||
ADD COLUMN extend_s8 varchar(500) COMMENT '扩展 String 8',
|
||||
ADD COLUMN extend_i1 decimal(19) COMMENT '扩展 Integer 1',
|
||||
ADD COLUMN extend_i2 decimal(19) COMMENT '扩展 Integer 2',
|
||||
ADD COLUMN extend_i3 decimal(19) COMMENT '扩展 Integer 3',
|
||||
ADD COLUMN extend_i4 decimal(19) COMMENT '扩展 Integer 4',
|
||||
ADD COLUMN extend_f1 decimal(19,4) COMMENT '扩展 Float 1',
|
||||
ADD COLUMN extend_f2 decimal(19,4) COMMENT '扩展 Float 2',
|
||||
ADD COLUMN extend_f3 decimal(19,4) COMMENT '扩展 Float 3',
|
||||
ADD COLUMN extend_f4 decimal(19,4) COMMENT '扩展 Float 4',
|
||||
ADD COLUMN extend_d1 datetime COMMENT '扩展 Date 1',
|
||||
ADD COLUMN extend_d2 datetime COMMENT '扩展 Date 2',
|
||||
ADD COLUMN extend_d3 datetime COMMENT '扩展 Date 3',
|
||||
ADD COLUMN extend_d4 datetime COMMENT '扩展 Date 4';
|
||||
@@ -0,0 +1,23 @@
|
||||
|
||||
-- 新增文件管理模块
|
||||
INSERT INTO ${_prefix}sys_module(module_code, module_name, description, main_class_name, current_version, upgrade_info, status, create_by, create_date, update_by, update_date, remarks)
|
||||
VALUES ('filemanager', '文件管理', '公共文件柜、个人文件柜、文件分享', 'com.jeesite.modules.filemanager.web.FilemanagerController', '4.1.4', NULL, '0', 'system', sysdate, 'system', sysdate, NULL);
|
||||
|
||||
-- 员工附属机构关系表
|
||||
CREATE TABLE ${_prefix}sys_employee_office
|
||||
(
|
||||
id varchar2(64) NOT NULL UNIQUE,
|
||||
emp_code varchar2(64) NOT NULL,
|
||||
office_code varchar2(64) NOT NULL,
|
||||
post_code varchar2(64),
|
||||
PRIMARY KEY (emp_code, office_code)
|
||||
);
|
||||
COMMENT ON TABLE ${_prefix}sys_employee_office IS '员工附属机构关系表';
|
||||
COMMENT ON COLUMN ${_prefix}sys_employee_office.id IS '编号';
|
||||
COMMENT ON COLUMN ${_prefix}sys_employee_office.emp_code IS '员工编码';
|
||||
COMMENT ON COLUMN ${_prefix}sys_employee_office.office_code IS '机构编码';
|
||||
COMMENT ON COLUMN ${_prefix}sys_employee_office.post_code IS '岗位编码';
|
||||
|
||||
-- 新增日语(日本语)语言包
|
||||
INSERT INTO ${_prefix}sys_dict_data(dict_code, parent_code, parent_codes, tree_sort, tree_sorts, tree_leaf, tree_level, tree_names, dict_label, dict_value, dict_type, is_sys, description, css_style, css_class, status, create_by, create_date, update_by, update_date, remarks, corp_code, corp_name, extend_s1, extend_s2, extend_s3, extend_s4, extend_s5, extend_s6, extend_s7, extend_s8, extend_i1, extend_i2, extend_i3, extend_i4, extend_f1, extend_f2, extend_f3, extend_f4, extend_d1, extend_d2, extend_d3, extend_d4)
|
||||
VALUES ('1126375062364020736', '0', '0,', 60, '0000000060,', '1', 0, '日本語', '日本語', 'ja_JP', 'sys_lang_type', '1', '', '', '', '0', 'system', sysdate, 'system', sysdate, '', '0', 'JeeSite', '', '', '', '', '', '', '', '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
@@ -0,0 +1,57 @@
|
||||
|
||||
-- 菜单表增加菜单标题(页签的名字)
|
||||
ALTER TABLE ${_prefix}sys_menu ADD menu_title varchar2(100) NULL;
|
||||
COMMENT ON COLUMN js_sys_menu.menu_title IS '菜单标题';
|
||||
|
||||
-- 角色业务范围字典数据
|
||||
INSERT INTO ${_prefix}sys_dict_type(id, dict_name, dict_type, is_sys, status, create_by, create_date, update_by, update_date, remarks)
|
||||
VALUES ('1149344200121085952', '角色业务范围', 'sys_role_biz_scope', '1', '0', 'system', sysdate, 'system', sysdate, '');
|
||||
INSERT INTO ${_prefix}sys_dict_data(dict_code, parent_code, parent_codes, tree_sort, tree_sorts, tree_leaf, tree_level, tree_names, dict_label, dict_value, dict_type, is_sys, description, css_style, css_class, status, create_by, create_date, update_by, update_date, remarks, corp_code, corp_name, extend_s1, extend_s2, extend_s3, extend_s4, extend_s5, extend_s6, extend_s7, extend_s8, extend_i1, extend_i2, extend_i3, extend_i4, extend_f1, extend_f2, extend_f3, extend_f4, extend_d1, extend_d2, extend_d3, extend_d4)
|
||||
VALUES ('1149344606834356224', '0', '0,', 30, '0000000030,', '1', 0, '组织管理', '组织管理', 'office_user', 'sys_role_biz_scope', '1', '', '', '', '0', 'system', sysdate, 'system', sysdate, '', '0', 'JeeSite', '', '', '', '', '', '', '', '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
|
||||
-- 角色表增加适应业务范围
|
||||
ALTER TABLE ${_prefix}sys_role ADD biz_scope varchar2(255) NULL;
|
||||
COMMENT ON COLUMN js_sys_role.biz_scope IS '适应业务范围(不同的功能,不同的数据权限支持)';
|
||||
|
||||
-- 角色表增加 20 个扩展字段
|
||||
ALTER TABLE ${_prefix}sys_role
|
||||
ADD (extend_s1 nvarchar2(500),
|
||||
extend_s2 nvarchar2(500),
|
||||
extend_s3 nvarchar2(500),
|
||||
extend_s4 nvarchar2(500),
|
||||
extend_s5 nvarchar2(500),
|
||||
extend_s6 nvarchar2(500),
|
||||
extend_s7 nvarchar2(500),
|
||||
extend_s8 nvarchar2(500),
|
||||
extend_i1 number(19),
|
||||
extend_i2 number(19),
|
||||
extend_i3 number(19),
|
||||
extend_i4 number(19),
|
||||
extend_f1 number(19,4),
|
||||
extend_f2 number(19,4),
|
||||
extend_f3 number(19,4),
|
||||
extend_f4 number(19,4),
|
||||
extend_d1 timestamp,
|
||||
extend_d2 timestamp,
|
||||
extend_d3 timestamp,
|
||||
extend_d4 timestamp);
|
||||
COMMENT ON COLUMN js_sys_role.extend_s1 IS '扩展 String 1';
|
||||
COMMENT ON COLUMN js_sys_role.extend_s2 IS '扩展 String 2';
|
||||
COMMENT ON COLUMN js_sys_role.extend_s3 IS '扩展 String 3';
|
||||
COMMENT ON COLUMN js_sys_role.extend_s4 IS '扩展 String 4';
|
||||
COMMENT ON COLUMN js_sys_role.extend_s5 IS '扩展 String 5';
|
||||
COMMENT ON COLUMN js_sys_role.extend_s6 IS '扩展 String 6';
|
||||
COMMENT ON COLUMN js_sys_role.extend_s7 IS '扩展 String 7';
|
||||
COMMENT ON COLUMN js_sys_role.extend_s8 IS '扩展 String 8';
|
||||
COMMENT ON COLUMN js_sys_role.extend_i1 IS '扩展 Integer 1';
|
||||
COMMENT ON COLUMN js_sys_role.extend_i2 IS '扩展 Integer 2';
|
||||
COMMENT ON COLUMN js_sys_role.extend_i3 IS '扩展 Integer 3';
|
||||
COMMENT ON COLUMN js_sys_role.extend_i4 IS '扩展 Integer 4';
|
||||
COMMENT ON COLUMN js_sys_role.extend_f1 IS '扩展 Float 1';
|
||||
COMMENT ON COLUMN js_sys_role.extend_f2 IS '扩展 Float 2';
|
||||
COMMENT ON COLUMN js_sys_role.extend_f3 IS '扩展 Float 3';
|
||||
COMMENT ON COLUMN js_sys_role.extend_f4 IS '扩展 Float 4';
|
||||
COMMENT ON COLUMN js_sys_role.extend_d1 IS '扩展 Date 1';
|
||||
COMMENT ON COLUMN js_sys_role.extend_d2 IS '扩展 Date 2';
|
||||
COMMENT ON COLUMN js_sys_role.extend_d3 IS '扩展 Date 3';
|
||||
COMMENT ON COLUMN js_sys_role.extend_d4 IS '扩展 Date 4';
|
||||
@@ -0,0 +1,23 @@
|
||||
|
||||
-- 新增文件管理模块
|
||||
INSERT INTO ${_prefix}sys_module(module_code, module_name, description, main_class_name, current_version, upgrade_info, status, create_by, create_date, update_by, update_date, remarks)
|
||||
VALUES ('filemanager', '文件管理', '公共文件柜、个人文件柜、文件分享', 'com.jeesite.modules.filemanager.web.FilemanagerController', '4.1.4', NULL, '0', 'system', now(), 'system', now(), NULL);
|
||||
|
||||
-- 员工附属机构关系表
|
||||
CREATE TABLE ${_prefix}sys_employee_office
|
||||
(
|
||||
id varchar(64) NOT NULL UNIQUE,
|
||||
emp_code varchar(64) NOT NULL,
|
||||
office_code varchar(64) NOT NULL,
|
||||
post_code varchar(64),
|
||||
PRIMARY KEY (emp_code, office_code)
|
||||
) WITHOUT OIDS;
|
||||
COMMENT ON TABLE ${_prefix}sys_employee_office IS '员工附属机构关系表';
|
||||
COMMENT ON COLUMN ${_prefix}sys_employee_office.id IS '编号';
|
||||
COMMENT ON COLUMN ${_prefix}sys_employee_office.emp_code IS '员工编码';
|
||||
COMMENT ON COLUMN ${_prefix}sys_employee_office.office_code IS '机构编码';
|
||||
COMMENT ON COLUMN ${_prefix}sys_employee_office.post_code IS '岗位编码';
|
||||
|
||||
-- 新增日语(日本语)语言包
|
||||
INSERT INTO ${_prefix}sys_dict_data(dict_code, parent_code, parent_codes, tree_sort, tree_sorts, tree_leaf, tree_level, tree_names, dict_label, dict_value, dict_type, is_sys, description, css_style, css_class, status, create_by, create_date, update_by, update_date, remarks, corp_code, corp_name, extend_s1, extend_s2, extend_s3, extend_s4, extend_s5, extend_s6, extend_s7, extend_s8, extend_i1, extend_i2, extend_i3, extend_i4, extend_f1, extend_f2, extend_f3, extend_f4, extend_d1, extend_d2, extend_d3, extend_d4)
|
||||
VALUES ('1126375062364020736', '0', '0,', 60, '0000000060,', '1', 0, '日本語', '日本語', 'ja_JP', 'sys_lang_type', '1', '', '', '', '0', 'system', now(), 'system', now(), '', '0', 'JeeSite', '', '', '', '', '', '', '', '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
@@ -0,0 +1,57 @@
|
||||
|
||||
-- 菜单表增加菜单标题(页签的名字)
|
||||
ALTER TABLE ${_prefix}sys_menu ADD menu_title varchar(100) NULL;
|
||||
COMMENT ON COLUMN js_sys_menu.menu_title IS '菜单标题';
|
||||
|
||||
-- 角色业务范围字典数据
|
||||
INSERT INTO ${_prefix}sys_dict_type(id, dict_name, dict_type, is_sys, status, create_by, create_date, update_by, update_date, remarks)
|
||||
VALUES ('1149344200121085952', '角色业务范围', 'sys_role_biz_scope', '1', '0', 'system', now(), 'system', now(), '');
|
||||
INSERT INTO ${_prefix}sys_dict_data(dict_code, parent_code, parent_codes, tree_sort, tree_sorts, tree_leaf, tree_level, tree_names, dict_label, dict_value, dict_type, is_sys, description, css_style, css_class, status, create_by, create_date, update_by, update_date, remarks, corp_code, corp_name, extend_s1, extend_s2, extend_s3, extend_s4, extend_s5, extend_s6, extend_s7, extend_s8, extend_i1, extend_i2, extend_i3, extend_i4, extend_f1, extend_f2, extend_f3, extend_f4, extend_d1, extend_d2, extend_d3, extend_d4)
|
||||
VALUES ('1149344606834356224', '0', '0,', 30, '0000000030,', '1', 0, '组织管理', '组织管理', 'office_user', 'sys_role_biz_scope', '1', '', '', '', '0', 'system', now(), 'system', now(), '', '0', 'JeeSite', '', '', '', '', '', '', '', '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
|
||||
-- 角色表增加适应业务范围
|
||||
ALTER TABLE ${_prefix}sys_role ADD COLUMN biz_scope varchar(255) NULL;
|
||||
COMMENT ON COLUMN js_sys_role.biz_scope IS '适应业务范围(不同的功能,不同的数据权限支持)';
|
||||
|
||||
-- 角色表增加 20 个扩展字段
|
||||
ALTER TABLE ${_prefix}sys_role
|
||||
ADD COLUMN extend_s1 varchar(500),
|
||||
ADD COLUMN extend_s2 varchar(500),
|
||||
ADD COLUMN extend_s3 varchar(500),
|
||||
ADD COLUMN extend_s4 varchar(500),
|
||||
ADD COLUMN extend_s5 varchar(500),
|
||||
ADD COLUMN extend_s6 varchar(500),
|
||||
ADD COLUMN extend_s7 varchar(500),
|
||||
ADD COLUMN extend_s8 varchar(500),
|
||||
ADD COLUMN extend_i1 decimal(19),
|
||||
ADD COLUMN extend_i2 decimal(19),
|
||||
ADD COLUMN extend_i3 decimal(19),
|
||||
ADD COLUMN extend_i4 decimal(19),
|
||||
ADD COLUMN extend_f1 decimal(19,4),
|
||||
ADD COLUMN extend_f2 decimal(19,4),
|
||||
ADD COLUMN extend_f3 decimal(19,4),
|
||||
ADD COLUMN extend_f4 decimal(19,4),
|
||||
ADD COLUMN extend_d1 timestamp,
|
||||
ADD COLUMN extend_d2 timestamp,
|
||||
ADD COLUMN extend_d3 timestamp,
|
||||
ADD COLUMN extend_d4 timestamp;
|
||||
COMMENT ON COLUMN js_sys_role.extend_s1 IS '扩展 String 1';
|
||||
COMMENT ON COLUMN js_sys_role.extend_s2 IS '扩展 String 2';
|
||||
COMMENT ON COLUMN js_sys_role.extend_s3 IS '扩展 String 3';
|
||||
COMMENT ON COLUMN js_sys_role.extend_s4 IS '扩展 String 4';
|
||||
COMMENT ON COLUMN js_sys_role.extend_s5 IS '扩展 String 5';
|
||||
COMMENT ON COLUMN js_sys_role.extend_s6 IS '扩展 String 6';
|
||||
COMMENT ON COLUMN js_sys_role.extend_s7 IS '扩展 String 7';
|
||||
COMMENT ON COLUMN js_sys_role.extend_s8 IS '扩展 String 8';
|
||||
COMMENT ON COLUMN js_sys_role.extend_i1 IS '扩展 Integer 1';
|
||||
COMMENT ON COLUMN js_sys_role.extend_i2 IS '扩展 Integer 2';
|
||||
COMMENT ON COLUMN js_sys_role.extend_i3 IS '扩展 Integer 3';
|
||||
COMMENT ON COLUMN js_sys_role.extend_i4 IS '扩展 Integer 4';
|
||||
COMMENT ON COLUMN js_sys_role.extend_f1 IS '扩展 Float 1';
|
||||
COMMENT ON COLUMN js_sys_role.extend_f2 IS '扩展 Float 2';
|
||||
COMMENT ON COLUMN js_sys_role.extend_f3 IS '扩展 Float 3';
|
||||
COMMENT ON COLUMN js_sys_role.extend_f4 IS '扩展 Float 4';
|
||||
COMMENT ON COLUMN js_sys_role.extend_d1 IS '扩展 Date 1';
|
||||
COMMENT ON COLUMN js_sys_role.extend_d2 IS '扩展 Date 2';
|
||||
COMMENT ON COLUMN js_sys_role.extend_d3 IS '扩展 Date 3';
|
||||
COMMENT ON COLUMN js_sys_role.extend_d4 IS '扩展 Date 4';
|
||||
@@ -10,4 +10,6 @@
|
||||
4.1.1
|
||||
4.1.2
|
||||
4.1.3
|
||||
4.1.4
|
||||
4.1.4
|
||||
4.1.5
|
||||
4.1.6
|
||||
@@ -15,6 +15,7 @@ sys.login.accountDisabled=This Account has disabled.
|
||||
sys.login.accountFreezed=This Account has freezed.
|
||||
sys.login.accountAudited=This Account has audited.
|
||||
sys.login.accountInvalid=This Account has invalid.
|
||||
sys.login.tickOutMessage=The account has been removed by the administrator. Please login again.
|
||||
sys.login.multiAddrMessage=The account has been logged in elsewhere. Please login again.
|
||||
sys.login.failedNumLock=Login failed, try too many times, the account has been locked, please {0} in minutes after retry.
|
||||
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
|
||||
# =========== 登录登出相关 ===========
|
||||
|
||||
sys.login.notLongIn=ログインしていないか、またはログインがタイムアウトしました。もう一度ログインしてください
|
||||
sys.login.success=ログイン成功!
|
||||
sys.login.getInfo=情報取得成功!
|
||||
sys.login.failure=ログインID或いはパスワードに誤りがあります。もう一度にゅうしてください。
|
||||
sys.login.error=申し訳ございません。ただいまシステムへアクセスできません。しばらくお待ちしてから再度お試してください!
|
||||
sys.logout.success=ログアウト成功!
|
||||
|
||||
# =========== 账号登录相关 ===========
|
||||
|
||||
sys.login.accountIsBlank=ログインIDを入力してください。
|
||||
sys.login.validCodeError=確認コードに誤りがあります。
|
||||
sys.login.accountDisabled=このアカウントは無効されています。
|
||||
sys.login.accountFreezed=このアカウントは凍結されています。
|
||||
sys.login.accountAudited=このアカウントは審査中です。
|
||||
sys.login.accountInvalid=このアカウントは存在しません。
|
||||
sys.login.tickOutMessage=アカウントは管理者によってオンラインから削除されました。もう一度ログインしてください。
|
||||
sys.login.multiAddrMessage=アカウントは他の場所でログインしています。もう一度ログインしてください。
|
||||
sys.login.failedNumLock=ログインに失敗しました。試行回数が多すぎます。アカウントがロックされています。{0}分後にもう一度お試しください。
|
||||
|
||||
# =========== 用户管理相关 ===========
|
||||
|
||||
sys.user.loginCodeExists=ログインアカウントは既に存在します
|
||||
sys.user.userCodeNotExists=ログインコードが存在しません
|
||||
sys.user.userNameNotBlank=ユーザー名を入力してください
|
||||
sys.user.infoSaveSuccess=ユーザー情報保存成功
|
||||
|
||||
# =========== 用户密码安全策略 ===========
|
||||
|
||||
sys.user.oldPasswordError=旧パスワードが間違っています。再入力してください
|
||||
sys.user.confirmPasswrodError=新パスワードは新パスワード確認とは異なります。再入力してください
|
||||
sys.user.passwordModifySuccess=パスワード変更に成功
|
||||
sys.user.passwordModifyNotRepeat=新パスワードを以前の{0}回以内の設定記録と同じにすることはできません。
|
||||
sys.user.passwordModifySecurityLevel=設定したパスワードが弱いパスワードであるため、パスワードの更新に失敗しました。
|
||||
sys.user.initPasswordModifyTip=パスワードはまだ初期パスワードです、パスワードを変更してください
|
||||
sys.user.passwordModifyTip=パスワードは{0}日間変更されていません。パスワードを変更してください。
|
||||
sys.user.passwordError=ログインパスワードが正しくありません。再入力してください
|
||||
sys.user.pwdQuestionModifySuccess=合言葉変更成功
|
||||
sys.user.pwdQuestionAnswerError=合言葉違います
|
||||
|
||||
# =========== 错误页面相关 ===========
|
||||
|
||||
sys.error.400.title=リクエストパラメーターに誤りがあります
|
||||
sys.error.400.message=リクエストパラメーターに誤りがあります。このパラメーターの解析ができません。
|
||||
sys.error.403.title=権限がありません
|
||||
sys.error.403.message=該当操作の権限がありません!
|
||||
sys.error.403.message.p1=申し訳ございません。このページのアクセス権限がありません。適当ではない場合システム管理者へ連絡してください。
|
||||
sys.error.404.title=ページが存在しません
|
||||
sys.error.404.message=アクセスしたページは存在しません!
|
||||
sys.error.404.message.p1=このエラーは次のような理由で発生する可能性があります:
|
||||
sys.error.404.message.p2=アドレスURLが正しく入力されておらず、リンクの有効期限が切れています。
|
||||
sys.error.404.message.p3=アクセスしているアドレスURLは:
|
||||
sys.error.404.message.p4=質問がある場合は、管理者に連絡してください。.
|
||||
sys.error.500.title=システム内部エラー
|
||||
sys.error.500.message=アクセスしたページは問題が発生しました!
|
||||
sys.error.500.message.p1=申し訳ございません。アクセスしたページは問題が発生しました,システム管理者へ連絡してください。
|
||||
sys.error.returnButton=前のページに戻る
|
||||
|
||||
# =========== 文件上传相关 ===========
|
||||
|
||||
sys.file.uploadFileIsEmpty=サーバーに該当ファイルはありません。
|
||||
sys.file.uploadValidNotBlank=ファイル検証番号とファイル名を入力してください。
|
||||
sys.file.uploadValidImage=画像のみアップロードできます({0})
|
||||
sys.file.uploadValidVideo=動画のみアップロードできます({0})
|
||||
sys.file.uploadValidFile=文書のみをアップロードできます({0})
|
||||
sys.file.uploadValidAll=フォーマットが正しくありません({0})
|
||||
sys.file.uploadValidSize=サイズは{0}を超過できません
|
||||
sys.file.uploadValidContent=ファイルコンテンツフォーマットは許可されていません。
|
||||
sys.file.uploadSuccessSeconds=セカンドアップロード成功,時間{0}
|
||||
sys.file.uploadSuccess=アップロード成功,時間{0}
|
||||
sys.file.downloadFileNotExist=ファイルが存在しません!
|
||||
sys.file.chunkUploading=アップロード中 {0}/{1}
|
||||
@@ -5,7 +5,7 @@ sys.login.notLongIn=未登录或登录超时。请重新登录,谢谢!
|
||||
sys.login.success=登录成功!
|
||||
sys.login.getInfo=获取信息成功!
|
||||
sys.login.failure=账号或密码错误,请重试。
|
||||
sys.login.error=对不起,系统遇见了点问题,请稍后再试!
|
||||
sys.login.error=对不起,系统遇见了点问题,请稍候再试!
|
||||
sys.logout.success=退出成功!
|
||||
|
||||
# =========== 账号登录相关 ===========
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
|
||||
# =========== common ===========
|
||||
|
||||
英语=English
|
||||
|
||||
保\ 存=Save
|
||||
关\ 闭=Close
|
||||
确定=Ok
|
||||
@@ -62,7 +60,7 @@
|
||||
请上传=Please upload
|
||||
开始上传=Start upload
|
||||
或将照片拖到这里,最多可选\ {0}\ 张=Drag the photo here, at most \ {0} \ sheet
|
||||
或将照片拖到这里,最多可选\ {0}\ 个=Drag the photo here, at most \ {0}
|
||||
或将文件拖到这里,最多可选\ {0}\ 个=Drag the file here, at most \ {0}
|
||||
|
||||
# =========== iconselect ===========
|
||||
|
||||
@@ -78,6 +76,6 @@
|
||||
|
||||
验证码=Captcha
|
||||
请填写验证码=Please fill in the captcha.
|
||||
验证码不正确=The captcha is incorrect.
|
||||
验证码不正确.=The captcha is incorrect.
|
||||
看不清,点击图片刷新=Can't see clearly, click on the picture to refresh.
|
||||
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
|
||||
# =========== common ===========
|
||||
|
||||
保\ 存=保存
|
||||
关\ 闭=閉じる
|
||||
确定=はい
|
||||
清除=クリア
|
||||
关闭=閉じる
|
||||
查询=検索
|
||||
重置=リセット
|
||||
新增=作成
|
||||
增行=行作成
|
||||
刷新=リフレッシュ
|
||||
查看=詳細
|
||||
展开=展開
|
||||
展开一级=一階層展開
|
||||
折叠=収束
|
||||
折叠全部=全部収束
|
||||
操作=操作
|
||||
更多操作=他の操作
|
||||
|
||||
基本信息=基本情報
|
||||
详细信息=詳細情報
|
||||
扩展字段=拡張項目
|
||||
|
||||
# =========== imageclip ===========
|
||||
|
||||
图片裁剪=画像編集
|
||||
选择图片=画像選択
|
||||
放大=拡大
|
||||
缩小=縮小
|
||||
向左移动=左へ移動
|
||||
向右移动=右へ移動
|
||||
向上移动=上へ移動
|
||||
向下移动=下へ移動
|
||||
逆时针旋转=左回り
|
||||
顺时针旋转=右回り
|
||||
水平反转=水平反転
|
||||
左右反转=左右反転
|
||||
|
||||
# =========== treeselect ===========
|
||||
|
||||
选项选择=オプション選択
|
||||
显示搜索=フィルター表示
|
||||
隐藏搜索=フィルター非表示
|
||||
关键字=キーワード
|
||||
搜索=検索
|
||||
展开=開く
|
||||
折叠=隠す
|
||||
不能选择根节点=ルート要素の選択ができません
|
||||
不能选择父节点=親要素の選択ができません
|
||||
请重新选择=もう一度選択してください
|
||||
|
||||
# =========== fileupload ===========
|
||||
|
||||
文件=ファイル
|
||||
文档=ドキュメント
|
||||
图片=画像
|
||||
音频或视频=音声 or 動画
|
||||
请上传=アップロード
|
||||
开始上传=アップロード
|
||||
或将照片拖到这里,最多可选\ {0}\ 张=画像をここにドラッグしてください、最大 \ {0} \ 枚可能
|
||||
或将文件拖到这里,最多可选\ {0}\ 个=ファイルをここにドラッグしてください、最大 \ {0} \ 個可能
|
||||
|
||||
# =========== iconselect ===========
|
||||
|
||||
图标选择=アイコン選択
|
||||
提示:双击选择图标。=ツールチープ: ダブルクリックでアイオンの選択ができます.
|
||||
|
||||
# =========== ueditor ===========
|
||||
|
||||
目录标题=ディレクトリタイトル
|
||||
暂无大纲标题=アウトラインのタイトルはまだありません
|
||||
|
||||
# =========== validcode ===========
|
||||
|
||||
验证码=検証コード
|
||||
请填写验证码=検証コードを入力してください
|
||||
验证码不正确.=検証コードが正しくありません
|
||||
看不清,点击图片刷新=はっきり見えない場合、画像更新をクリックしてリフレッシュできます.
|
||||
|
||||
@@ -52,10 +52,10 @@
|
||||
公共场所慎用,下次不需要再填写帐号=Use caution in public places.
|
||||
记住账号=Remember account
|
||||
公共场所慎用,下次不需要再填写帐号和密码=Use caution in public places.
|
||||
记住密码=Remember password
|
||||
自动登录=Remember password
|
||||
|
||||
登录验证成功,正在进入...=Login authentication successful, entering...
|
||||
正在验证登录,请稍后...=Verify login, please later...
|
||||
正在验证登录,请稍候...=Verify login, please wait...
|
||||
立即登录=Login
|
||||
|
||||
注册账号=Register
|
||||
@@ -71,6 +71,9 @@
|
||||
修改密码=Change password
|
||||
退出登录=Log out
|
||||
系统切换=System switching
|
||||
当前租户=Current tenant
|
||||
租户切换=Tenant switch
|
||||
在线人员=Online user
|
||||
|
||||
在线=Online
|
||||
注销=Logout
|
||||
@@ -114,6 +117,8 @@
|
||||
组织机构=Office
|
||||
新增用户=New user
|
||||
编辑用户=Edit user
|
||||
导出=Export
|
||||
导入=Import
|
||||
|
||||
停用用户=Disable user
|
||||
确认要停用该用户吗?=Are you sure want to disable this user?
|
||||
@@ -165,6 +170,9 @@
|
||||
所在岗位=Position
|
||||
英文名=English name
|
||||
|
||||
附属机构=Auxiliary Office
|
||||
附属岗位=Auxiliary Post
|
||||
|
||||
角色名称=Role name
|
||||
角色编码=Role code
|
||||
|
||||
|
||||
@@ -0,0 +1,254 @@
|
||||
# =========== 通用字典 ===========
|
||||
|
||||
是=はい
|
||||
否=いいえ
|
||||
男=男
|
||||
女=女
|
||||
正常=正常
|
||||
删除=削除
|
||||
停用=無効
|
||||
冻结=凍結
|
||||
待审=診察
|
||||
驳回=却下
|
||||
草稿=草稿
|
||||
|
||||
# =========== 通用字段 ===========
|
||||
|
||||
状态=状態
|
||||
备注信息=備考
|
||||
创建者=作成者
|
||||
创建时间=作成日時
|
||||
更新者=更新者
|
||||
更新时间=更新日時
|
||||
排序号=ソート
|
||||
|
||||
# =========== 功能标题 ===========
|
||||
|
||||
系统管理=システム管理
|
||||
组织管理=組織管理
|
||||
用户管理=ユーザー管理
|
||||
机构管理=機構管理
|
||||
公司管理=会社管理
|
||||
岗位管理=職位管理
|
||||
|
||||
用户选择=ユーザー選択
|
||||
机构选择=事務所選択
|
||||
公司选择=会社選択
|
||||
区域选择=区域選択
|
||||
日期选择=日付選択
|
||||
日期时间=日時
|
||||
|
||||
# =========== 登录页 ===========
|
||||
|
||||
登录=ログイン
|
||||
|
||||
请填写登录账号.=ログインIDを入力してください.
|
||||
登录账号=ログインアカウント
|
||||
|
||||
登录密码,鼠标按下显示密码=押下するとパスワードを表示します.
|
||||
请填写登录密码.=パスワードを入力してください.
|
||||
登录密码=パスワード
|
||||
|
||||
公共场所慎用,下次不需要再填写帐号=次回からログインIDの入力が不要にします.
|
||||
记住账号=ログインID記憶
|
||||
公共场所慎用,下次不需要再填写帐号和密码=次回からパスワードの入力が不要にします.
|
||||
自动登录=パスワード記憶
|
||||
|
||||
登录验证成功,正在进入...=ログイン中、少々お待ちください...
|
||||
正在验证登录,请稍候...=登録を行っています...
|
||||
立即登录=ログイン
|
||||
|
||||
注册账号=アカウント作成
|
||||
忘记密码=パスワードを忘れた
|
||||
|
||||
# =========== 主框架页 ===========
|
||||
|
||||
仪表盘=計器盤
|
||||
全屏=最大化
|
||||
切换主题=テーマ切替
|
||||
|
||||
个人中心=マイページ
|
||||
修改密码=パスワード変更
|
||||
退出登录=ログアウト
|
||||
系统切换=システム切替
|
||||
当前租户=当面テナント
|
||||
租户切换=テナント切り替え
|
||||
在线人员=オンラインスタッフ
|
||||
|
||||
在线=オンライン
|
||||
注销=ログアウト
|
||||
|
||||
# =========== 消息提醒 ===========
|
||||
|
||||
消息=メッセージ
|
||||
你有=見読
|
||||
条消息=件メッセージ
|
||||
查看全部消息=全部見る
|
||||
查看消息=開く
|
||||
系统消息=システムメッセージ
|
||||
您有\ {0}\ 条新消息,由于消息太多,这里为您合并,请点击查看按钮看详情。=見読メッセージ {0} 件, 省略で表示しているため, クリックで一覧を見る.
|
||||
|
||||
# =========== 个人中心 ===========
|
||||
|
||||
修改密保=セキュリティ変更
|
||||
个人信息=個人情報
|
||||
|
||||
修改头像=アバター変更
|
||||
|
||||
个性签名=署名
|
||||
上次登录=前回ログイン
|
||||
时间=時間
|
||||
首次登录=初めてログイン
|
||||
|
||||
旧密码=旧パスワード
|
||||
新密码=新パスワード
|
||||
确认新密码=新パスワード確認
|
||||
|
||||
您还未设置过密保问题,您可以根据登录密码设置新的密保问题及答案。=セキュリティ合言葉が設定されていません。ログイン後新しいセキュリティ合言葉を設定してください。.
|
||||
旧的密保问题及答案=古いセキュリティ合言葉
|
||||
旧密保问题=古いセキュリティ合言葉の質問
|
||||
旧密保问题答案=古いセキュリティ合言葉の答え
|
||||
新的密保问题及答案=新しいセキュリティ合言葉
|
||||
新密保问题=新しいセキュリティ合言葉の質問
|
||||
新密保问题答案=新しいセキュリティ合言葉の答え
|
||||
|
||||
# =========== 用户管理 ===========
|
||||
|
||||
组织机构=機構
|
||||
新增用户=ユーザー作成
|
||||
编辑用户=ユーザー編集
|
||||
导出=導入
|
||||
导入=を導く
|
||||
|
||||
停用用户=ユーザー無効
|
||||
确认要停用该用户吗?=このユーザーを無効にしてもよろしいですか?
|
||||
启用用户=ユーザー有効
|
||||
确认要启用该用户吗?=このユーザーを有効にしてもよろしいですか?
|
||||
删除用户=ユーザー削除
|
||||
确认要删除该用户吗?=このユーザーを削除してもよろしいですか?
|
||||
用户分配角色=ユーザーロール設定
|
||||
分配角色=ロール設定
|
||||
用户分配数据权限=ユーザーデータ権限設定
|
||||
数据权限=データ権限
|
||||
用户密码重置=パスワードリセット
|
||||
确认要将该用户密码重置到初始状态吗?=ユーザーのログインパスワードをリセットします。よろしいですか?
|
||||
重置密码=パスワードリセット
|
||||
|
||||
保存用户失败,登录账号''{0}''已存在=ユーザーの保存に失敗しました。ログインアカウント '' {0} ''は既に存在します
|
||||
保存用户''{0}''成功=ユーザー ''{0}'' 保存成功
|
||||
停用用户失败,不允许停用当前用户=ユーザー無効に更新する処理失敗。このユーザーは無効にすることできません
|
||||
停用用户''{0}''成功=ユーザー ''{0}'' 無効設定成功
|
||||
启用用户''{0}''成功=ユーザー ''{0}'' 有効設定成功
|
||||
重置用户''{0}''密码成功=ユーザー ''{0}'' のパスワードを初期化成功しました
|
||||
删除用户失败,不允许删除当前用户=ユーザー削除失敗. このユーザーを削除することができません
|
||||
删除用户''{0}''成功=ユーザー ''{0}'' 削除成功
|
||||
用户分配数据权限成功=ユーザーデータ権限設定成功
|
||||
|
||||
账号=アカウント
|
||||
昵称=ニックネーム
|
||||
邮箱=メール
|
||||
手机=携帯
|
||||
电话=電話
|
||||
姓名=氏名
|
||||
机构=機構
|
||||
公司=会社
|
||||
岗位=職位
|
||||
|
||||
归属机构=所属機構
|
||||
归属公司=所属会社
|
||||
登录账号=アカウント
|
||||
登录账号已存在=ログインアカウントがすでに存在します
|
||||
用户昵称=ニックネーム
|
||||
电子邮箱=メール
|
||||
手机号码=携帯電話
|
||||
办公电话=会社電話
|
||||
权重(排序)=レベル(ソート)
|
||||
权重越大排名越靠前,请填写数字。=重要度が大きいほど前に表示します。数字を入力してください.
|
||||
|
||||
员工编号=社員コード
|
||||
员工姓名=氏名
|
||||
所在岗位=所属職位
|
||||
英文名=英語氏名
|
||||
|
||||
附属机构=付属機構
|
||||
附属岗位=付属職位
|
||||
|
||||
角色名称=ロール名称
|
||||
角色编码=ロールコード
|
||||
|
||||
# =========== 機構管理 ===========
|
||||
|
||||
新增机构=機構追加
|
||||
编辑机构=機構編集
|
||||
|
||||
停用机构=機構無効にする
|
||||
确认要停用该机构吗?=機構無効にします、よろしいですか?
|
||||
启用机构=機構有効にする
|
||||
确认要启用该机构吗?=機構有効にします、よろしいですか?
|
||||
删除机构=機構削除
|
||||
确认要删除该机构及所有子机构吗?=機構及び子機構を削除します、よろしいですか?
|
||||
新增下级机构=子機構追加
|
||||
|
||||
保存机构''{0}''成功=機構 ''{0}'' 保存成功
|
||||
该机构包含未停用的子机构!=有効な子機構が含まれています!
|
||||
停用机构''{0}''成功=機構 ''{0}'' 無効にする処理成功
|
||||
启用机构''{0}''成功=機構 ''{0}'' 有効にする処理成功
|
||||
删除机构''{0}''成功=機構 ''{0}'' 削除成功
|
||||
|
||||
上级机构=親機構
|
||||
机构名称=機構名称
|
||||
机构代码=機構コード
|
||||
机构全称=機構フルネーム
|
||||
机构类型=機構タイプ
|
||||
负责人=責任者
|
||||
联系地址=住所
|
||||
邮政编码=郵便番号
|
||||
|
||||
# =========== 公司管理 ===========
|
||||
|
||||
新增公司=会社追加
|
||||
编辑公司=会社編集
|
||||
|
||||
停用公司=会社無効にする
|
||||
确认要停用该公司吗?=会社無効にします、よろしいですか?
|
||||
启用公司=会社有効にする
|
||||
确认要启用该公司吗?=会社有効にします、よろしいですか?
|
||||
删除公司=会社削除
|
||||
确认要删除该公司及所有子公司吗?=会社及び子会社を削除します、よろしいですか?
|
||||
新增下级公司=子会社追加
|
||||
|
||||
保存公司''{0}''成功=会社 ''{0}'' 保存成功
|
||||
该公司包含未停用的子公司!=有効な会社が含まれています!
|
||||
停用公司''{0}''成功=会社 ''{0}'' 無効設定成功
|
||||
启用公司''{0}''成功=会社 ''{0}'' 有効設定成功
|
||||
删除公司''{0}''成功=会社 ''{0}'' 削除成功
|
||||
|
||||
上级公司=親会社
|
||||
公司名称=会社名称
|
||||
公司编码=会社コード
|
||||
公司全称=会社フルネーム
|
||||
归属区域=エリア
|
||||
包含机构=機構
|
||||
|
||||
# =========== 岗位管理 ===========
|
||||
|
||||
新增岗位=職位追加
|
||||
编辑岗位=職位編集
|
||||
|
||||
停用岗位=職位無効にする
|
||||
确认要停用该岗位吗?=職位無効にします、よろしいですか?
|
||||
启用岗位=職位有効にする
|
||||
确认要启用该岗位吗?=職位有効にします、よろしいですか?
|
||||
删除岗位=職位削除
|
||||
确认要删除该岗位吗?=職位を削除します、よろしいですか?
|
||||
|
||||
保存岗位失败,岗位名称''{0}''已存在=職位保存失敗。職位名称 ''{0}'' 既に存在します
|
||||
保存岗位''{0}''成功=職位 ''{0}'' 保存成功
|
||||
停用岗位''{0}''成功=職位 ''{0}'' 無効設定成功
|
||||
启用岗位''{0}''成功=職位 ''{0}'' 有効設定成功
|
||||
删除岗位''{0}''成功=職位 ''{0}'' 削除成功
|
||||
|
||||
岗位名称=職位名称
|
||||
岗位名称已存在=職位名称が既に存在します
|
||||
岗位编码=職位コード
|
||||
岗位分类=職位分類
|
||||
@@ -1,11 +1,12 @@
|
||||
# transactions.properties not found - looking for jta.properties in classpath...
|
||||
com.atomikos.icatch.service=com.atomikos.icatch.standalone.UserTransactionServiceFactory
|
||||
com.atomikos.icatch.max_timeout=-1
|
||||
com.atomikos.icatch.max_actives=-1
|
||||
com.atomikos.icatch.enable_logging=false
|
||||
com.atomikos.icatch.registered=true
|
||||
|
||||
# 提示 oracle.jdbc.xa.OracleXAResource.recover 错误需要授权:
|
||||
#grant select on sys.dba_pending_transactions to jeesite;
|
||||
#grant select on sys.pending_trans$ to jeesite;
|
||||
#grant select on sys.dba_2pc_pending to jeesite;
|
||||
#grant execute on sys.dbms_system to jeesite;
|
||||
# 注意:如果报 oracle.jdbc.xa.OracleXAResource.recover 错误,则需要授权如下:
|
||||
# grant select on sys.dba_pending_transactions to jeesite;
|
||||
# grant select on sys.pending_trans$ to jeesite;
|
||||
# grant select on sys.dba_2pc_pending to jeesite;
|
||||
# grant execute on sys.dbms_system to jeesite;
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
<!-- 查询数据 -->
|
||||
<select id="findList" resultType="MsgInner">
|
||||
SELECT distinct ${sqlMap.column.toSql()}
|
||||
SELECT ${sqlMap.column.toSql()}
|
||||
<if test="record != null and record.receiveUserCode != null and record.receiveUserCode != ''">,
|
||||
r.read_status AS "record.readStatus",
|
||||
r.read_date AS "record.readDate",
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
<?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.jeesite.modules.sys.dao.EmployeeOfficeDao">
|
||||
|
||||
<!-- 查询数据
|
||||
<select id="findList" resultType="EmployeeOffice">
|
||||
SELECT ${sqlMap.column.toSql()}
|
||||
FROM ${sqlMap.table.toSql()}
|
||||
<where>
|
||||
${sqlMap.where.toSql()}
|
||||
</where>
|
||||
ORDER BY ${sqlMap.order.toSql()}
|
||||
</select> -->
|
||||
|
||||
</mapper>
|
||||
@@ -6,13 +6,26 @@
|
||||
* @version 2017-12-24
|
||||
*/
|
||||
(function($) {
|
||||
window.js = window.js || {};
|
||||
js.i18n = $.extend({}, js.i18n, {
|
||||
'tabpanel.newTabPage':'New Page',
|
||||
'loading.message':'Loading ...',
|
||||
'loading.submitMessage':'Submission ...',
|
||||
'showMessage.error':'failure,error',
|
||||
'showMessage.success':'success,completion',
|
||||
'showMessage.warning':'no'
|
||||
});
|
||||
window.js = window.js || {};
|
||||
js.i18n = $.extend({}, js.i18n, {
|
||||
'tabpanel.newTabPage':'New Page',
|
||||
'loading.message':'Loading ...',
|
||||
'loading.submitMessage':'Submission ...',
|
||||
'showMessage.error':'failure,error',
|
||||
'showMessage.success':'success,completion',
|
||||
'showMessage.warning':'no'
|
||||
});
|
||||
// ============ layer ============
|
||||
window.layer = window.layer || {};
|
||||
layer.i18n = $.extend({}, layer.i18n, {
|
||||
btnOk: 'Ok',
|
||||
btnCancel: 'Cancle',
|
||||
title: 'Information',
|
||||
promptTipA: 'Enter ',
|
||||
promptTipB: 'character at most.',
|
||||
noPicture: 'No picture',
|
||||
photoError: 'Current image address error.<br>Next slide?',
|
||||
photoNextPage: 'The next',
|
||||
photoClose: 'Close'
|
||||
});
|
||||
})(jQuery);
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
/*!
|
||||
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||
*
|
||||
* 国际化文件
|
||||
* @author ThinkGem
|
||||
* @version 2017-12-24
|
||||
*/
|
||||
(function($) {
|
||||
window.js = window.js || {};
|
||||
js.i18n = $.extend({}, js.i18n, {
|
||||
'tabpanel.newTabPage':'新タブ',
|
||||
'loading.message':'ローディング...お待ちください...',
|
||||
'loading.submitMessage':'送信中...お待ちください...',
|
||||
'showMessage.error':'失敗,エラー,未完了',
|
||||
'showMessage.success':'成功,完了',
|
||||
'showMessage.warning':'不可,不許可,必須,既に存在,不要,不正確'
|
||||
});
|
||||
// ============ layer ============
|
||||
window.layer = window.layer || {};
|
||||
layer.i18n = $.extend({}, layer.i18n, {
|
||||
btnOk: '確定',
|
||||
btnCancel: 'キャンセル',
|
||||
title: 'メッセージ',
|
||||
promptTipA: '最大入力',
|
||||
promptTipB: '個文字',
|
||||
noPicture: '画像が存在しません',
|
||||
photoError: 'この画像が表示できません<br>次の画像へ遷移しますか?',
|
||||
photoNextPage: '次へ',
|
||||
photoClose: '閉じる'
|
||||
});
|
||||
})(jQuery);
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user