feat: 添加slrs业务子项目 修改问题文件
This commit is contained in:
@@ -0,0 +1,168 @@
|
||||
package com.adc.da.http;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class PageInfo<T> {
|
||||
private Integer pageNo;
|
||||
private Integer pageSize;
|
||||
private Long count;
|
||||
private Long pageCount;
|
||||
private List<T> list;
|
||||
private List<Map<String, Object>> title;
|
||||
private Map<String, String> ext;
|
||||
private String orderBy;
|
||||
|
||||
public PageInfo() {
|
||||
this.pageNo = 1;
|
||||
this.pageSize = 10;
|
||||
this.list = new ArrayList();
|
||||
this.title = new ArrayList();
|
||||
this.ext = new HashMap();
|
||||
this.orderBy = "";
|
||||
this.pageSize = 1;
|
||||
}
|
||||
|
||||
public PageInfo(HttpServletRequest request) {
|
||||
this.pageNo = 1;
|
||||
this.pageSize = 10;
|
||||
this.list = new ArrayList();
|
||||
this.title = new ArrayList();
|
||||
this.ext = new HashMap();
|
||||
this.orderBy = "";
|
||||
String no = request.getParameter("pageNo");
|
||||
if (StringUtils.isEmpty(no)) {
|
||||
this.setPageNo(1);
|
||||
} else if (StringUtils.isNumeric(no)) {
|
||||
this.setPageNo(Integer.parseInt(no));
|
||||
}
|
||||
|
||||
String size = request.getParameter("pageSize");
|
||||
if (StringUtils.isEmpty(size)) {
|
||||
this.setPageSize(10);
|
||||
}
|
||||
|
||||
if (StringUtils.isNumeric(size)) {
|
||||
this.setPageSize(Integer.parseInt(size));
|
||||
}
|
||||
|
||||
String orderByParam = request.getParameter("orderBy");
|
||||
if (StringUtils.isNotBlank(orderByParam)) {
|
||||
this.setOrderBy(orderByParam);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public PageInfo(Integer pageNo, Integer pageSize) {
|
||||
this(pageNo, pageSize, 0L);
|
||||
}
|
||||
|
||||
public PageInfo(Integer pageNo, Integer pageSize, Long count) {
|
||||
this(pageNo, pageSize, count, new ArrayList());
|
||||
}
|
||||
|
||||
public PageInfo(Integer pageNo, Integer pageSize, Long count, List<T> list) {
|
||||
this.pageNo = 1;
|
||||
this.pageSize = 10;
|
||||
this.list = new ArrayList();
|
||||
this.title = new ArrayList();
|
||||
this.ext = new HashMap();
|
||||
this.orderBy = "";
|
||||
if (pageNo == null) {
|
||||
pageNo = 1;
|
||||
}
|
||||
|
||||
if (pageSize == null) {
|
||||
pageSize = 10;
|
||||
}
|
||||
|
||||
this.setCount(count);
|
||||
this.setPageNo(Math.abs(pageNo));
|
||||
this.setPageSize(Math.abs(pageSize));
|
||||
this.setList(list);
|
||||
}
|
||||
|
||||
public Long getCount() {
|
||||
return this.count;
|
||||
}
|
||||
|
||||
public void setCount(Long count) {
|
||||
this.count = count;
|
||||
if ((long) this.pageSize >= count) {
|
||||
this.pageNo = 1;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public Integer getPageNo() {
|
||||
return this.pageNo;
|
||||
}
|
||||
|
||||
public void setPageNo(Integer pageNo) {
|
||||
this.pageNo = pageNo;
|
||||
}
|
||||
|
||||
public Integer getPageSize() {
|
||||
return this.pageSize;
|
||||
}
|
||||
|
||||
public void setPageSize(Integer pageSize) {
|
||||
this.pageSize = pageSize <= 0 ? 10 : pageSize;
|
||||
}
|
||||
|
||||
public List<T> getList() {
|
||||
return this.list;
|
||||
}
|
||||
|
||||
public PageInfo<T> setList(List<T> list) {
|
||||
this.list = list;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getOrderBy() {
|
||||
return this.orderBy;
|
||||
}
|
||||
|
||||
public void setOrderBy(String orderBy) {
|
||||
this.orderBy = orderBy;
|
||||
}
|
||||
|
||||
public Map<String, String> getExt() {
|
||||
return this.ext;
|
||||
}
|
||||
|
||||
public void setExt(Map<String, String> ext) {
|
||||
this.ext = ext;
|
||||
}
|
||||
|
||||
public Long getPageCount() {
|
||||
if (this.count % (long) this.pageSize != 0L) {
|
||||
this.pageCount = this.count / (long) this.pageSize + 1L;
|
||||
} else {
|
||||
this.pageCount = this.count / (long) this.pageSize;
|
||||
}
|
||||
|
||||
if (this.pageCount < 1L) {
|
||||
this.pageCount = 1L;
|
||||
}
|
||||
|
||||
return this.pageCount;
|
||||
}
|
||||
|
||||
public void setPageCount(Long pageCount) {
|
||||
this.pageCount = pageCount;
|
||||
}
|
||||
|
||||
public List<Map<String, Object>> getTitle() {
|
||||
return this.title;
|
||||
}
|
||||
|
||||
public void setTitle(List<Map<String, Object>> title) {
|
||||
this.title = title;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
package com.adc.da.http;
|
||||
|
||||
public class ResponseMessage<T> {
|
||||
private String respCode;
|
||||
private String respMsg;
|
||||
private T data;
|
||||
private boolean ok;
|
||||
|
||||
public ResponseMessage() {
|
||||
}
|
||||
|
||||
public ResponseMessage(String respCode, String message) {
|
||||
this.respCode = respCode;
|
||||
this.respMsg = message;
|
||||
}
|
||||
|
||||
public ResponseMessage(String respCode, String message, boolean ok) {
|
||||
this.respCode = respCode;
|
||||
this.respMsg = message;
|
||||
this.ok = ok;
|
||||
}
|
||||
|
||||
public ResponseMessage(String respCode, String message, boolean ok, T data) {
|
||||
this.respCode = respCode;
|
||||
this.respMsg = message;
|
||||
this.ok = ok;
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
public String getRespCode() {
|
||||
return this.respCode;
|
||||
}
|
||||
|
||||
public void setRespCode(String respCode) {
|
||||
this.respCode = respCode;
|
||||
}
|
||||
|
||||
public String getMessage() {
|
||||
return this.respMsg;
|
||||
}
|
||||
|
||||
public void setMessage(String message) {
|
||||
this.respMsg = message;
|
||||
}
|
||||
|
||||
public T getData() {
|
||||
return this.data;
|
||||
}
|
||||
|
||||
public void setData(T data) {
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
public boolean isOk() {
|
||||
return this.ok;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.adc.da.http;
|
||||
|
||||
public enum ResponseMessageCodeEnum {
|
||||
SUCCESS("0"),
|
||||
ERROR("-1"),
|
||||
VALID_ERROR("1000"),
|
||||
SAVE_SUCCESS("r0001"),
|
||||
UPDATE_SUCCESS("r0002"),
|
||||
REMOVE_SUCCESS("r0003");
|
||||
|
||||
private String code;
|
||||
|
||||
private ResponseMessageCodeEnum(String code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return this.code;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.adc.da.http;
|
||||
|
||||
public class Result {
|
||||
public Result() {
|
||||
}
|
||||
|
||||
public static ResponseMessage success() {
|
||||
return new ResponseMessage(ResponseMessageCodeEnum.SUCCESS.getCode(), "", true);
|
||||
}
|
||||
|
||||
public static <T> ResponseMessage<T> success(String code, T t) {
|
||||
return new ResponseMessage(code, "", true, t);
|
||||
}
|
||||
|
||||
public static <T> ResponseMessage<T> success(String code, String message) {
|
||||
return new ResponseMessage(code, message);
|
||||
}
|
||||
|
||||
public static <T> ResponseMessage<T> success(String code, String message, T t) {
|
||||
return new ResponseMessage(code, message, true, t);
|
||||
}
|
||||
|
||||
public static <T> ResponseMessage<T> success(T t) {
|
||||
return new ResponseMessage(ResponseMessageCodeEnum.SUCCESS.getCode(), "", true, t);
|
||||
}
|
||||
|
||||
public static ResponseMessage error() {
|
||||
return error("");
|
||||
}
|
||||
|
||||
public static ResponseMessage error(String message) {
|
||||
return error(ResponseMessageCodeEnum.ERROR.getCode(), message);
|
||||
}
|
||||
|
||||
public static ResponseMessage error(String code, String message) {
|
||||
return error(code, message, (Object)null);
|
||||
}
|
||||
|
||||
public static <T> ResponseMessage<T> error(String code, String message, T t) {
|
||||
return new ResponseMessage(code, message, false, t);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package com.adc.da.util;
|
||||
|
||||
import java.text.DateFormat;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class DateUtils extends org.apache.commons.lang3.time.DateUtils {
|
||||
public static final String yyyy_MM_dd_EN = "yyyy-MM-dd";
|
||||
public static final String yyyy_MM_dd_HH_mm_ss_EN = "yyyy-MM-dd HH:mm:ss";
|
||||
public static final String yyyy_MM_dd_CN = "yyyy年MM月dd日";
|
||||
public static final String yyyy_MM_dd_HH_mm_ss_CN = "yyyy年MM月dd日HH时mm分ss秒";
|
||||
private static Map<String, DateFormat> dateFormatMap = new HashMap();
|
||||
|
||||
public DateUtils() {
|
||||
}
|
||||
|
||||
public static DateFormat getDateFormat(String formatStr) {
|
||||
DateFormat df = (DateFormat)dateFormatMap.get(formatStr);
|
||||
if (df == null) {
|
||||
df = new SimpleDateFormat(formatStr);
|
||||
dateFormatMap.put(formatStr, df);
|
||||
}
|
||||
|
||||
return (DateFormat)df;
|
||||
}
|
||||
|
||||
public static String dateToString(Date date, String dateFormatStr) {
|
||||
DateFormat format = getDateFormat(dateFormatStr);
|
||||
return date != null ? format.format(date) : null;
|
||||
}
|
||||
|
||||
public static Date stringToDate(String dateTimeStr, String dateFormatStr) {
|
||||
try {
|
||||
if (dateTimeStr != null && !dateTimeStr.equals("")) {
|
||||
DateFormat format = getDateFormat(dateFormatStr);
|
||||
Date date = format.parse(dateTimeStr);
|
||||
return date;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
} catch (ParseException var4) {
|
||||
throw new RuntimeException(var4);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
package com.adc.da.util;
|
||||
|
||||
import org.apache.commons.lang3.Validate;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.security.MessageDigest;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.security.SecureRandom;
|
||||
|
||||
public class Digests {
|
||||
private static final String SHA1 = "SHA-1";
|
||||
private static final String MD5 = "MD5";
|
||||
private static SecureRandom random = new SecureRandom();
|
||||
|
||||
public Digests() {
|
||||
}
|
||||
|
||||
public static byte[] sha1(byte[] input) {
|
||||
return digest(input, "SHA-1", (byte[])null, 1);
|
||||
}
|
||||
|
||||
public static byte[] sha1(byte[] input, byte[] salt) {
|
||||
return digest(input, "SHA-1", salt, 1);
|
||||
}
|
||||
|
||||
public static byte[] sha1(byte[] input, byte[] salt, int iterations) {
|
||||
return digest(input, "SHA-1", salt, iterations);
|
||||
}
|
||||
|
||||
private static byte[] digest(byte[] input, String algorithm, byte[] salt, int iterations){
|
||||
|
||||
try {
|
||||
MessageDigest digest = MessageDigest.getInstance(algorithm);
|
||||
if (salt != null) {
|
||||
digest.update(salt);
|
||||
}
|
||||
|
||||
byte[] result = digest.digest(input);
|
||||
|
||||
for(int i = 1; i < iterations; ++i) {
|
||||
digest.reset();
|
||||
result = digest.digest(result);
|
||||
}
|
||||
return result;
|
||||
} catch (NoSuchAlgorithmException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
public static byte[] generateSalt(int numBytes) {
|
||||
Validate.isTrue(numBytes > 0, "numBytes argument must be a positive integer (1 or larger)", (long)numBytes);
|
||||
byte[] bytes = new byte[numBytes];
|
||||
random.nextBytes(bytes);
|
||||
return bytes;
|
||||
}
|
||||
|
||||
public static byte[] md5(InputStream input) throws IOException {
|
||||
return digest(input, "MD5");
|
||||
}
|
||||
|
||||
public static byte[] sha1(InputStream input) throws IOException {
|
||||
return digest(input, "SHA-1");
|
||||
}
|
||||
|
||||
private static byte[] digest(InputStream input, String algorithm) throws IOException {
|
||||
try {
|
||||
MessageDigest messageDigest = MessageDigest.getInstance(algorithm);
|
||||
int bufferLength = 8192;
|
||||
byte[] buffer = new byte[bufferLength];
|
||||
|
||||
for(int read = input.read(buffer, 0, bufferLength); read > -1; read = input.read(buffer, 0, bufferLength)) {
|
||||
messageDigest.update(buffer, 0, read);
|
||||
}
|
||||
|
||||
return messageDigest.digest();
|
||||
|
||||
} catch (NoSuchAlgorithmException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,92 @@
|
||||
package com.adc.da.util;
|
||||
|
||||
import com.adc.da.exception.AdcDaBaseException;
|
||||
import org.apache.commons.codec.DecoderException;
|
||||
import org.apache.commons.codec.binary.Base64;
|
||||
import org.apache.commons.codec.binary.Hex;
|
||||
import org.apache.commons.lang3.StringEscapeUtils;
|
||||
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLDecoder;
|
||||
import java.net.URLEncoder;
|
||||
|
||||
public class Encodes {
|
||||
|
||||
private static final String DEFAULT_URL_ENCODING = "UTF-8";
|
||||
private static final char[] BASE62 = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".toCharArray();
|
||||
|
||||
public Encodes() {
|
||||
}
|
||||
|
||||
public static String encodeHex(byte[] input) {
|
||||
return Hex.encodeHexString(input);
|
||||
}
|
||||
|
||||
public static byte[] decodeHex(String input) {
|
||||
|
||||
try {
|
||||
return Hex.decodeHex(input.toCharArray());
|
||||
} catch (DecoderException e) {
|
||||
throw new AdcDaBaseException(e.getMessage());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static String encodeBase64(byte[] input) {
|
||||
return Base64.encodeBase64String(input);
|
||||
}
|
||||
|
||||
public static String encodeUrlSafeBase64(byte[] input) {
|
||||
return Base64.encodeBase64URLSafeString(input);
|
||||
}
|
||||
|
||||
public static byte[] decodeBase64(String input) {
|
||||
return Base64.decodeBase64(input);
|
||||
}
|
||||
|
||||
public static String encodeBase62(byte[] input) {
|
||||
char[] chars = new char[input.length];
|
||||
|
||||
for(int i = 0; i < input.length; ++i) {
|
||||
chars[i] = BASE62[(input[i] & 255) % BASE62.length];
|
||||
}
|
||||
|
||||
return new String(chars);
|
||||
}
|
||||
|
||||
public static String escapeHtml(String html) {
|
||||
return StringEscapeUtils.escapeHtml4(html);
|
||||
}
|
||||
|
||||
public static String unescapeHtml(String htmlEscaped) {
|
||||
return StringEscapeUtils.unescapeHtml4(htmlEscaped);
|
||||
}
|
||||
|
||||
public static String escapeXml(String xml) {
|
||||
return StringEscapeUtils.escapeXml(xml);
|
||||
}
|
||||
|
||||
public static String unescapeXml(String xmlEscaped) {
|
||||
return StringEscapeUtils.unescapeXml(xmlEscaped);
|
||||
}
|
||||
|
||||
public static String urlEncode(String part) {
|
||||
try {
|
||||
return URLEncoder.encode(part, "UTF-8");
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static String urlDecode(String part) {
|
||||
try {
|
||||
return URLDecoder.decode(part, "UTF-8");
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,253 @@
|
||||
package com.adc.da.util;
|
||||
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.io.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class FileUtil extends FileUtils {
|
||||
|
||||
private static final int BUFF_SIZE = 1024;
|
||||
private static Logger log = LoggerFactory.getLogger(FileUtil.class);
|
||||
|
||||
public FileUtil() {
|
||||
}
|
||||
|
||||
public static void copyFile(String src, String target) {
|
||||
InputStream in = null;
|
||||
BufferedOutputStream out = null;
|
||||
|
||||
try {
|
||||
in = new BufferedInputStream(new FileInputStream(src));
|
||||
out = new BufferedOutputStream(new FileOutputStream(target));
|
||||
byte[] buffer = new byte[1024];
|
||||
|
||||
int len;
|
||||
while((len = in.read(buffer, 0, 1024)) > 0) {
|
||||
out.write(buffer, 0, len);
|
||||
out.flush();
|
||||
}
|
||||
} catch (IOException var9) {
|
||||
var9.printStackTrace();
|
||||
} finally {
|
||||
IOUtils.closeQuietly(in);
|
||||
IOUtils.closeQuietly(out);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static List<String> readAsStringList(String fileName) {
|
||||
List<String> list = new ArrayList();
|
||||
BufferedReader reader = null;
|
||||
FileInputStream fis = null;
|
||||
|
||||
try {
|
||||
File f = new File(fileName);
|
||||
if (f.isFile() && f.exists()) {
|
||||
fis = new FileInputStream(f);
|
||||
reader = new BufferedReader(new InputStreamReader(fis, "UTF-8"));
|
||||
|
||||
String line;
|
||||
while((line = reader.readLine()) != null) {
|
||||
if (!"".equals(line)) {
|
||||
list.add(line);
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (Exception var18) {
|
||||
log.error("readFile", var18);
|
||||
} finally {
|
||||
try {
|
||||
if (reader != null) {
|
||||
reader.close();
|
||||
}
|
||||
} catch (IOException var17) {
|
||||
log.error("InputStream关闭异常", var17);
|
||||
}
|
||||
|
||||
try {
|
||||
if (fis != null) {
|
||||
fis.close();
|
||||
}
|
||||
} catch (IOException var16) {
|
||||
log.error("FileInputStream关闭异常", var16);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
public static byte[] readFile(File file) {
|
||||
byte[] bytes = null;
|
||||
|
||||
try {
|
||||
bytes = IOUtils.readFully(new FileInputStream(file));
|
||||
} catch (Exception var3) {
|
||||
var3.printStackTrace();
|
||||
}
|
||||
|
||||
return bytes;
|
||||
}
|
||||
|
||||
public static byte[] readFile(String fileName) {
|
||||
return readFile(new File(fileName));
|
||||
}
|
||||
|
||||
public static void writeFile(byte[] bytes, String outputFile) {
|
||||
FileOutputStream os = null;
|
||||
|
||||
try {
|
||||
os = new FileOutputStream(outputFile);
|
||||
os.write(bytes);
|
||||
} catch (Exception var7) {
|
||||
var7.printStackTrace();
|
||||
} finally {
|
||||
IOUtils.closeQuietly(os);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static File mkdir(String folderPath) {
|
||||
File file = new File(folderPath);
|
||||
if (!file.exists() || !file.isDirectory()) {
|
||||
boolean success = false;
|
||||
|
||||
do {
|
||||
success = file.mkdirs();
|
||||
} while(success);
|
||||
}
|
||||
|
||||
return file;
|
||||
}
|
||||
|
||||
public static void delFolder(String folderPath) throws Exception {
|
||||
delAllFile(folderPath);
|
||||
File myFilePath = new File(folderPath);
|
||||
myFilePath.delete();
|
||||
}
|
||||
|
||||
public static boolean delAllFile(String path) throws Exception {
|
||||
boolean flag = false;
|
||||
File file = new File(path);
|
||||
if (!file.exists()) {
|
||||
return flag;
|
||||
} else if (!file.isDirectory()) {
|
||||
return flag;
|
||||
} else {
|
||||
String[] tempList = file.list();
|
||||
File temp = null;
|
||||
|
||||
for(int i = 0; i < tempList.length; ++i) {
|
||||
if (path.endsWith(File.separator)) {
|
||||
temp = new File(path + tempList[i]);
|
||||
} else {
|
||||
temp = new File(path + File.separator + tempList[i]);
|
||||
}
|
||||
|
||||
if (temp.isFile()) {
|
||||
temp.delete();
|
||||
}
|
||||
|
||||
if (temp.isDirectory()) {
|
||||
delAllFile(path + "/" + tempList[i]);
|
||||
delFolder(path + "/" + tempList[i]);
|
||||
flag = true;
|
||||
}
|
||||
}
|
||||
|
||||
return flag;
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean delFile(String fileName) {
|
||||
File file = new File(fileName);
|
||||
if (!file.exists()) {
|
||||
log.info(fileName + " 文件不存在!");
|
||||
return true;
|
||||
} else {
|
||||
return file.isFile() ? deleteFile(fileName) : deleteDirectory(fileName);
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean deleteFile(String fileName) {
|
||||
File file = new File(fileName);
|
||||
if (file.exists() && file.isFile()) {
|
||||
if (file.delete()) {
|
||||
log.info("删除单个文件 " + fileName + " 成功!");
|
||||
return true;
|
||||
} else {
|
||||
log.info("删除单个文件 " + fileName + " 失败!");
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
log.info(fileName + " 文件不存在!");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean deleteDirectory(String dirName) {
|
||||
String dirNames = dirName;
|
||||
if (!dirName.endsWith(File.separator)) {
|
||||
dirNames = dirName + File.separator;
|
||||
}
|
||||
|
||||
File dirFile = new File(dirNames);
|
||||
if (dirFile.exists() && dirFile.isDirectory()) {
|
||||
boolean flag = true;
|
||||
File[] files = dirFile.listFiles();
|
||||
|
||||
for(int i = 0; i < files.length; ++i) {
|
||||
if (files[i].isFile()) {
|
||||
flag = deleteFile(files[i].getAbsolutePath());
|
||||
if (!flag) {
|
||||
break;
|
||||
}
|
||||
} else if (files[i].isDirectory()) {
|
||||
flag = deleteDirectory(files[i].getAbsolutePath());
|
||||
if (!flag) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!flag) {
|
||||
log.info("删除目录失败!");
|
||||
return false;
|
||||
} else if (dirFile.delete()) {
|
||||
log.info("删除目录 " + dirName + " 成功!");
|
||||
return true;
|
||||
} else {
|
||||
log.info("删除目录 " + dirName + " 失败!");
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
log.info(dirNames + " 目录不存在!");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean exists(String path) {
|
||||
return (new File(path)).exists();
|
||||
}
|
||||
|
||||
public static void checkAndMkdirs(File file) {
|
||||
if (!file.getParentFile().exists()) {
|
||||
file.getParentFile().mkdirs();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static String getFileExtension(String fileName) {
|
||||
return fileName.substring(fileName.lastIndexOf(".") + 1, fileName.length());
|
||||
}
|
||||
|
||||
public static String getFileName(String fileName) {
|
||||
return fileName.substring(0, fileName.lastIndexOf("."));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.adc.da.util;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
||||
public class IOUtils extends org.apache.commons.io.IOUtils {
|
||||
|
||||
|
||||
public static byte[] readFully(InputStream is) throws IOException {
|
||||
byte[] bytes = new byte[is.available()];
|
||||
readFully(is, bytes);
|
||||
return bytes;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.adc.da.util;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
public class IpUtil {
|
||||
private IpUtil() {
|
||||
throw new IllegalStateException("Utility class");
|
||||
}
|
||||
|
||||
private static boolean checkIp(String ip) {
|
||||
return ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip);
|
||||
}
|
||||
|
||||
public static String getIpAddr(HttpServletRequest request) {
|
||||
String ip = request.getHeader("X-Forwarded-For");
|
||||
if (checkIp(ip)) {
|
||||
ip = request.getHeader("Proxy-Client-IP");
|
||||
if (checkIp(ip)) {
|
||||
ip = request.getHeader("WL-Proxy-Client-IP");
|
||||
}
|
||||
|
||||
if (checkIp(ip)) {
|
||||
ip = request.getHeader("HTTP_CLIENT_IP");
|
||||
}
|
||||
|
||||
if (checkIp(ip)) {
|
||||
ip = request.getHeader("HTTP_X_FORWARDED_FOR");
|
||||
}
|
||||
|
||||
if (checkIp(ip)) {
|
||||
ip = request.getRemoteAddr();
|
||||
}
|
||||
} else if (ip.length() > 15) {
|
||||
String[] ips = ip.split(",");
|
||||
|
||||
for(int index = 0; index < ips.length; ++index) {
|
||||
String strIp = ips[index];
|
||||
if (!"unknown".equalsIgnoreCase(strIp)) {
|
||||
ip = strIp;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return StringUtils.trim(ip);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
package com.adc.da.util;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.apache.shiro.UnavailableSecurityManagerException;
|
||||
import org.apache.shiro.session.InvalidSessionException;
|
||||
import org.apache.shiro.subject.Subject;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public class LoginUserUtil {
|
||||
/**
|
||||
* 获取当前登录用户ID
|
||||
*
|
||||
*/
|
||||
public static String getUserId() {
|
||||
String userId = null;
|
||||
try {
|
||||
Subject subject = SecurityUtils.getSubject();
|
||||
Object object=subject.getPrincipal();
|
||||
if(object!=null){
|
||||
String json = JSONObject.toJSONString(object);
|
||||
if(json!=null && json.length()>0){
|
||||
Map<String, Object> userInfo=JSONObject.parseObject(json, Map.class);
|
||||
userId=userInfo.get("id").toString();
|
||||
}
|
||||
}
|
||||
} catch (UnavailableSecurityManagerException e) {
|
||||
} catch (InvalidSessionException e) {
|
||||
}
|
||||
return userId;
|
||||
}
|
||||
|
||||
public static String getUserParamValue() {
|
||||
String paramValue = null;
|
||||
try {
|
||||
Subject subject = SecurityUtils.getSubject();
|
||||
Object object=subject.getPrincipal();
|
||||
if(object!=null){
|
||||
String json = JSONObject.toJSONString(object);
|
||||
if(json!=null && json.length()>0){
|
||||
Map<String, Object> userInfo=JSONObject.parseObject(json, Map.class);
|
||||
paramValue=userInfo.get("paramValue").toString();
|
||||
}
|
||||
}
|
||||
} catch (UnavailableSecurityManagerException e) {
|
||||
} catch (InvalidSessionException e) {
|
||||
}
|
||||
return paramValue;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
package com.adc.da.util;
|
||||
|
||||
|
||||
import java.security.MessageDigest;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 采用MD5加密解密
|
||||
* @author tfq
|
||||
* @datetime 2011-10-13
|
||||
*/
|
||||
public class MD5Util {
|
||||
|
||||
/***
|
||||
* MD5加码 生成32位md5码
|
||||
*/
|
||||
public static String string2MD5(String inStr){
|
||||
MessageDigest md5 = null;
|
||||
try{
|
||||
md5 = MessageDigest.getInstance("MD5");
|
||||
}catch (Exception e){
|
||||
System.out.println(e.toString());
|
||||
e.printStackTrace();
|
||||
return "";
|
||||
}
|
||||
char[] charArray = inStr.toCharArray();
|
||||
byte[] byteArray = new byte[charArray.length];
|
||||
|
||||
for (int i = 0; i < charArray.length; i++)
|
||||
byteArray[i] = (byte) charArray[i];
|
||||
byte[] md5Bytes = md5.digest(byteArray);
|
||||
StringBuffer hexValue = new StringBuffer();
|
||||
for (int i = 0; i < md5Bytes.length; i++){
|
||||
int val = ((int) md5Bytes[i]) & 0xff;
|
||||
if (val < 16)
|
||||
hexValue.append("0");
|
||||
hexValue.append(Integer.toHexString(val));
|
||||
}
|
||||
return hexValue.toString();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 加密解密算法 执行一次加密,两次解密
|
||||
*/
|
||||
public static String convertMD5(String inStr){
|
||||
|
||||
char[] a = inStr.toCharArray();
|
||||
for (int i = 0; i < a.length; i++){
|
||||
a[i] = (char) (a[i] ^ 't');
|
||||
}
|
||||
String s = new String(a);
|
||||
return s;
|
||||
|
||||
}
|
||||
|
||||
// 测试主函数
|
||||
public static void main(String args[]) {
|
||||
/* String s = new String("tangfuqiang");
|
||||
System.out.println("原始:" + s);
|
||||
System.out.println("MD5后:" + string2MD5(s));
|
||||
|
||||
System.out.println("加密的:" + convertMD5(s));
|
||||
|
||||
System.out.println("解密的:" + convertMD5(convertMD5(s)));*/
|
||||
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH");
|
||||
String time = df.format(new Date());
|
||||
System.out.println(time);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.adc.da.util;
|
||||
|
||||
import cn.hutool.crypto.digest.DigestAlgorithm;
|
||||
import cn.hutool.crypto.digest.Digester;
|
||||
|
||||
public class PasswordUtils {
|
||||
|
||||
public PasswordUtils() {
|
||||
}
|
||||
|
||||
public static String encryptPassword(String plainPassword) {
|
||||
byte[] salt = Digests.generateSalt(8);
|
||||
byte[] hashPassword = Digests.sha1(plainPassword.getBytes(), salt, 1024);
|
||||
return Encodes.encodeHex(salt) + Encodes.encodeHex(hashPassword);
|
||||
}
|
||||
|
||||
public static boolean validatePassword(String plainPassword, String password) {
|
||||
byte[] salt = Encodes.decodeHex(password.substring(0, 16));
|
||||
byte[] hashPassword = Digests.sha1(plainPassword.getBytes(), salt, 1024);
|
||||
return password.equals(Encodes.encodeHex(salt) + Encodes.encodeHex(hashPassword));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package com.adc.da.util;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
public class RequestUtils {
|
||||
public static final String LOGIN_USER = "LOGIN_USER";
|
||||
public static final String LOGIN_USER_ID = "LOGIN_USER_ID";
|
||||
public static final String LOGIN_ROLE_ID = "LOGIN_ROLE_ID";
|
||||
|
||||
private RequestUtils() {
|
||||
throw new IllegalStateException("RequestUtils");
|
||||
}
|
||||
|
||||
public static String getClientIp(HttpServletRequest request) {
|
||||
String remoteAddr = "";
|
||||
if (request != null) {
|
||||
remoteAddr = request.getHeader("X-FORWARDED-FOR");
|
||||
if (StringUtils.isEmpty(remoteAddr)) {
|
||||
remoteAddr = request.getRemoteAddr();
|
||||
}
|
||||
}
|
||||
|
||||
return remoteAddr;
|
||||
}
|
||||
|
||||
public static String getLoginUserId(HttpServletRequest request) {
|
||||
return (String)request.getSession().getAttribute("LOGIN_USER_ID");
|
||||
}
|
||||
|
||||
public static String getLoginRoleId(HttpServletRequest request) {
|
||||
return (String)request.getSession().getAttribute("LOGIN_ROLE_ID");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.adc.da.util;
|
||||
|
||||
import org.springframework.beans.BeansException;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.ApplicationContextAware;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
public class SpringContextHolder implements ApplicationContextAware {
|
||||
|
||||
|
||||
private static ApplicationContext applicationContext;
|
||||
|
||||
@Override
|
||||
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
|
||||
this.applicationContext = applicationContext;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取applicationContext
|
||||
* @return
|
||||
*/
|
||||
public static ApplicationContext getApplicationContext() {
|
||||
return applicationContext;
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过name获取 Bean.
|
||||
* @param name 参数传入要获取的实例的类名 首字母小写,这是默认的
|
||||
* @return
|
||||
*/
|
||||
public static Object getBean(String name){
|
||||
return getApplicationContext().getBean(name);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过class获取Bean.
|
||||
* @param clazz
|
||||
* @param <T>
|
||||
* @return
|
||||
*/
|
||||
public static <T> T getBean(Class<T> clazz){
|
||||
return getApplicationContext().getBean(clazz);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
package com.adc.da.util;
|
||||
|
||||
|
||||
|
||||
import cn.hutool.core.lang.Snowflake;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.core.util.RandomUtil;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
|
||||
public class UUIDUtils {
|
||||
|
||||
public static Snowflake snowflake;
|
||||
|
||||
public static Snowflake getSnowflake() {
|
||||
return snowflake;
|
||||
}
|
||||
|
||||
/**
|
||||
* 服务编码
|
||||
*/
|
||||
private static long serverCode;
|
||||
|
||||
/**
|
||||
* 中心端编码
|
||||
*
|
||||
*/
|
||||
private static long appCenter;
|
||||
|
||||
@Value("${application.code}")
|
||||
public static void setServerCode(long serverCode) {
|
||||
UUIDUtils.serverCode = serverCode;
|
||||
}
|
||||
|
||||
@Value("${application.center}")
|
||||
public static void setAppCenter(long appCenter) {
|
||||
UUIDUtils.appCenter = appCenter;
|
||||
}
|
||||
|
||||
|
||||
public static void setSnowflake(Snowflake snowflake) {
|
||||
IdUtil.getSnowflake(serverCode,appCenter);
|
||||
}
|
||||
|
||||
public static String randomUUID10() {
|
||||
return RandomUtil.randomString(10);
|
||||
}
|
||||
|
||||
public static String randomUUID20() {
|
||||
return RandomUtil.randomString(20);
|
||||
}
|
||||
|
||||
public static String randomUUID(int length) {
|
||||
return RandomUtil.randomString(length);
|
||||
}
|
||||
|
||||
public static String randomSnowflakeID(){
|
||||
return snowflake.nextIdStr();
|
||||
}
|
||||
|
||||
|
||||
public static String getUUIDPath(String uuid){
|
||||
StringBuilder builder=new StringBuilder();
|
||||
builder.append("/");
|
||||
builder.append((uuid.substring(0, 3).hashCode())%100+"").append("/");
|
||||
builder.append((uuid.substring(7,10).hashCode())%100+"").append("/");
|
||||
builder.append((uuid.substring(11,14).hashCode())%100+"").append("/");
|
||||
return builder.toString();
|
||||
}
|
||||
|
||||
public static String getAttTable(){
|
||||
int nextInt = RandomUtil.randomInt(10)+1;
|
||||
StringBuilder builder=new StringBuilder();
|
||||
builder.append("ATT_FILE_").append(String.format("%02d", nextInt));
|
||||
return builder.toString();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
package com.adc.da.util;
|
||||
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
public class ValidateDatas {
|
||||
|
||||
/**
|
||||
* @param 待验证的字符串
|
||||
* @return 如果是符合邮箱格式的字符串,返回<b>true</b>,否则为<b>false</b>
|
||||
*/
|
||||
public static boolean isEmail(String str) {
|
||||
//String regex = "[a-zA-Z_]{1,}[0-9]{0,}@(([a-zA-z0-9]-*){1,}\\.){1,3}[a-zA-z\\-]{1,}";
|
||||
String regex = "([a-zA-Z0-9_-])*@([A-Za-z0-9][-A-Za-z0-9]+\\.)+(com|cn|net|org)";
|
||||
return match(regex, str);
|
||||
}
|
||||
|
||||
/**
|
||||
* 汉字和字母
|
||||
* @param str
|
||||
* @return
|
||||
*/
|
||||
public static boolean isenOrch(String str) {
|
||||
String pattern = "[\u4e00-\u9fa5A-Za-z]+";
|
||||
return match(pattern, str);
|
||||
}
|
||||
|
||||
/**
|
||||
* 汉字,字母,括号,-,下划线
|
||||
* @param str
|
||||
* @return
|
||||
*/
|
||||
public static boolean isDuty(String str) {
|
||||
String pattern = "[\u4e00-\u9fa5A-Za-z0-9_\\-\\(\\)\\(\\)]+";
|
||||
return match(pattern, str);
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否是手机号
|
||||
* @param str
|
||||
* @return
|
||||
*/
|
||||
public static boolean isPhone(String str) {
|
||||
String pattern = "0?(13|14|15|18)[0-9]{9}";
|
||||
return match(pattern, str);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param regex 正则表达式字符串
|
||||
* @param str 要匹配的字符串
|
||||
* @return 如果str 符合 regex的正则表达式格式,返回true, 否则返回 false;
|
||||
*/
|
||||
private static boolean match(String regex ,String str){
|
||||
Pattern pattern = Pattern.compile(regex);
|
||||
Matcher matcher = pattern.matcher(str);
|
||||
return matcher.matches();
|
||||
}
|
||||
|
||||
public static boolean isNumber(String str) {
|
||||
String pattern = "-?[1-9]\\d*";
|
||||
return match(pattern, str);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 汉字、字母、()
|
||||
*
|
||||
* @MethodName:isLetterOrChineseOrChar1
|
||||
* @author: DuYunbao
|
||||
* @date: 2018/5/30 15:53
|
||||
*/
|
||||
public static boolean isLetterOrChineseOrChar1(String str) {
|
||||
String pattern = "^[\\u4E00-\\u9FA5A-Za-z\\(\\)]+$";
|
||||
return !str.matches(pattern);
|
||||
}
|
||||
|
||||
/**
|
||||
* 汉字、数字、字母、()、-、下划线
|
||||
*
|
||||
* @MethodName:isChineseOrNumberOrLetterOrUnderlineOrChar
|
||||
* @author: DuYunbao
|
||||
* @date: 2018/5/30 16:45
|
||||
*/
|
||||
public static boolean isChineseOrNumberOrLetterOrUnderlineOrChar(String str) {
|
||||
String regex = "^[\\u4E00-\\u9FA5A-Za-z0-9_\\-\\(\\)]+$";
|
||||
return !str.matches(regex);
|
||||
}
|
||||
|
||||
|
||||
public static void main(String[] args) {
|
||||
String aa = "9aa";
|
||||
System.out.println(isNumber(aa));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
package com.adc.da.util;
|
||||
|
||||
/**
|
||||
* @Description:水印
|
||||
* @Author: yangxuenan
|
||||
* date: 2020/1/10 15:42
|
||||
*/
|
||||
public class WaterMarkUtil {
|
||||
|
||||
/**
|
||||
* @param inputFile 你的PDF文件地址
|
||||
* @param outputFile 添加水印后生成PDF存放的地址
|
||||
* @param waterMarkName 你的水印
|
||||
* @return
|
||||
*/
|
||||
public static boolean waterMark(String inputFile,
|
||||
String outputFile, String waterMarkName) {
|
||||
/* try {
|
||||
PdfReader reader = new PdfReader(inputFile);
|
||||
Field f = PdfReader.class.getDeclaredField("encrypted");
|
||||
f.setAccessible(true);
|
||||
f.set(reader, Boolean.FALSE);
|
||||
PdfStamper stamper = new PdfStamper(reader, new FileOutputStream(
|
||||
outputFile));
|
||||
//这里的字体设置比较关键,这个设置是支持中文的写法
|
||||
BaseFont base = BaseFont.createFont("STSong-Light",
|
||||
"UniGB-UCS2-H", BaseFont.NOT_EMBEDDED);// 使用系统字体
|
||||
int total = reader.getNumberOfPages() + 1;
|
||||
|
||||
PdfContentByte under;
|
||||
Rectangle pageRect = null;
|
||||
for (int i = 1; i < total; i++) {
|
||||
pageRect = stamper.getReader().
|
||||
getPageSizeWithRotation(i);
|
||||
// 计算水印X,Y坐标
|
||||
// float x = pageRect.getWidth()/10;
|
||||
// float y = pageRect.getHeight()/10-10;
|
||||
// 获得PDF最顶层
|
||||
under = stamper.getOverContent(i);
|
||||
under.saveState();
|
||||
// set Transparency
|
||||
PdfGState gs = new PdfGState();
|
||||
// 设置透明度为0.2
|
||||
gs.setFillOpacity(0.5f);
|
||||
under.setGState(gs);
|
||||
under.restoreState();
|
||||
under.beginText();
|
||||
under.setFontAndSize(base, 13);
|
||||
under.setTextMatrix(30, 30);
|
||||
under.setColorFill(BaseColor.LIGHT_GRAY);
|
||||
for (int y = 0; y < 10; y++) {
|
||||
for (int x = 0; x < 8; x++) {
|
||||
// 水印文字成45度角倾斜
|
||||
under.showTextAligned(Element.ALIGN_LEFT
|
||||
, waterMarkName, 100 + 300 * x, 300 * y, 45); }
|
||||
}
|
||||
|
||||
// 添加水印文字
|
||||
under.endText();
|
||||
under.setLineWidth(1f);
|
||||
under.stroke();
|
||||
}
|
||||
stamper.close();
|
||||
return true;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return false;
|
||||
}*/
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -16,15 +16,17 @@ import java.util.Scanner;
|
||||
|
||||
public class CodeGen {
|
||||
|
||||
private static final String PACKAGE_PATH="/adc-da-sys/src/main";
|
||||
private static final String PACKAGE_PATH="/adc-da-slrs/src/main";
|
||||
|
||||
private static final String AUTHOR="91isoft";
|
||||
private static final String AUTHOR="super_liu";
|
||||
|
||||
private static final String DB_IP="192.168.10.140:1521:orcl";
|
||||
// x.x.x.x:3306/xxxx --MYSQL
|
||||
// 192.168.10.140:1521:foton_slrs_test
|
||||
private static final String DB_IP="127.0.0.1:3306/foton_slrs";
|
||||
|
||||
private static final String DB_USER="GSAR_TEST";
|
||||
private static final String DB_USER="root";
|
||||
|
||||
private static final String DB_PWD="1q2w3e4r";
|
||||
private static final String DB_PWD="root";
|
||||
|
||||
|
||||
/**
|
||||
@@ -60,11 +62,20 @@ public class CodeGen {
|
||||
gc.setMapperName("%sDao");
|
||||
mpg.setGlobalConfig(gc);
|
||||
|
||||
// 数据源配置
|
||||
// 数据源配置 ORACLE
|
||||
// DataSourceConfig dsc = new DataSourceConfig();
|
||||
// dsc.setUrl("jdbc:oracle:thin:@"+DB_IP);
|
||||
// // dsc.setSchemaName("public");
|
||||
// dsc.setDriverName("oracle.jdbc.OracleDriver");
|
||||
// dsc.setUsername(DB_USER);
|
||||
// dsc.setPassword(DB_PWD);
|
||||
// mpg.setDataSource(dsc);
|
||||
|
||||
// 数据源配置 MYSQL
|
||||
DataSourceConfig dsc = new DataSourceConfig();
|
||||
dsc.setUrl("jdbc:oracle:thin:@"+DB_IP);
|
||||
// dsc.setSchemaName("public");
|
||||
dsc.setDriverName("oracle.jdbc.OracleDriver");
|
||||
dsc.setUrl("jdbc:mysql://"+DB_IP+"?useUnicode=true&characterEncoding=utf8&serverTimezone=UTC&useSSL=false");
|
||||
//dsc.setSchemaName("public");//PostgreSQL schemaName
|
||||
dsc.setDriverName("com.mysql.jdbc.Driver");
|
||||
dsc.setUsername(DB_USER);
|
||||
dsc.setPassword(DB_PWD);
|
||||
mpg.setDataSource(dsc);
|
||||
@@ -73,7 +84,7 @@ public class CodeGen {
|
||||
PackageConfig pc = new PackageConfig();
|
||||
pc.setModuleName(scanner("模块名"));
|
||||
pc.setMapper("dao");
|
||||
pc.setParent("com.adc.da");
|
||||
pc.setParent("com.adc.da.slrs");
|
||||
mpg.setPackageInfo(pc);
|
||||
|
||||
// 自定义配置
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>foton-slrs-system-rest</artifactId>
|
||||
<groupId>com.adc</groupId>
|
||||
<version>3.0.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>adc-da-slrs</artifactId>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.adc</groupId>
|
||||
<artifactId>adc-da-base</artifactId>
|
||||
<version>3.0.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
||||
</project>
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
package com.adc.da.slrs.sarStandardsInfo.controller;
|
||||
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import com.adc.da.slrs.sarStandardsInfo.entity.SarStandardsInfo;
|
||||
import io.swagger.annotations.Api;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.adc.da.base.web.BaseController;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-05-31
|
||||
*/
|
||||
@RestController
|
||||
@Api(description = "|SarStandardsInfo|")
|
||||
@RequestMapping("/sarStandardsInfo/sar-standards-info")
|
||||
public class SarStandardsInfoController extends BaseController<SarStandardsInfo> {
|
||||
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
package com.adc.da.slrs.sarStandardsInfo.dao;
|
||||
|
||||
import com.adc.da.slrs.sarStandardsInfo.entity.SarStandardsInfo;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-05-31
|
||||
*/
|
||||
public interface SarStandardsInfoDao extends BaseMapper<SarStandardsInfo> {
|
||||
|
||||
}
|
||||
+117
@@ -0,0 +1,117 @@
|
||||
package com.adc.da.slrs.sarStandardsInfo.entity;
|
||||
|
||||
import com.adc.da.base.entity.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-05-31
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value="SarStandardsInfo对象", description="")
|
||||
public class SarStandardsInfo extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "主键")
|
||||
@TableId("ID")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "标准分类")
|
||||
@TableField("STAND_TYPE")
|
||||
private String standType;
|
||||
|
||||
@ApiModelProperty(value = "国家地区")
|
||||
@TableField("COUNTRY")
|
||||
private String country;
|
||||
|
||||
@ApiModelProperty(value = "标准类别")
|
||||
@TableField("STAND_SORT")
|
||||
private String standSort;
|
||||
|
||||
@ApiModelProperty(value = "标准编号")
|
||||
@TableField("STAND_NUMBER")
|
||||
private String standNumber;
|
||||
|
||||
@ApiModelProperty(value = "标准年份")
|
||||
@TableField("STAND_YEAR")
|
||||
private String standYear;
|
||||
|
||||
@ApiModelProperty(value = "标准名称")
|
||||
@TableField("STAND_NAME")
|
||||
private String standName;
|
||||
|
||||
@ApiModelProperty(value = "标准英文名称")
|
||||
@TableField("STAND_EN_NAME")
|
||||
private String standEnName;
|
||||
|
||||
@ApiModelProperty(value = "标准状态")
|
||||
@TableField("STAND_STATE")
|
||||
private String standState;
|
||||
|
||||
@ApiModelProperty(value = "标准性质")
|
||||
@TableField("STAND_NATURE")
|
||||
private String standNature;
|
||||
|
||||
@ApiModelProperty(value = "发布日期")
|
||||
@TableField("ISSUE_TIME")
|
||||
private String issueTime;
|
||||
|
||||
@ApiModelProperty(value = "实施日期")
|
||||
@TableField("PUT_TIME")
|
||||
private LocalDateTime putTime;
|
||||
|
||||
@ApiModelProperty(value = "内容摘要")
|
||||
@TableField("SYNOPSIS")
|
||||
private String synopsis;
|
||||
|
||||
@ApiModelProperty(value = "代替标准号")
|
||||
@TableField("REPLACE_STAND_NUM")
|
||||
private String replaceStandNum;
|
||||
|
||||
@ApiModelProperty(value = "被代替标准号")
|
||||
@TableField("REPLACED_STAND_NUM")
|
||||
private String replacedStandNum;
|
||||
|
||||
@TableField("CREATION_USER")
|
||||
private String creationUser;
|
||||
|
||||
@ApiModelProperty(value = "是否有效")
|
||||
@TableField("VALID_FLAG")
|
||||
private String validFlag;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
@TableField("CREATION_TIME")
|
||||
private LocalDateTime creationTime;
|
||||
|
||||
@ApiModelProperty(value = "修改时间")
|
||||
@TableField("MODIFY_TIME")
|
||||
private LocalDateTime modifyTime;
|
||||
|
||||
@ApiModelProperty(value = "是否法规清单相关(0否 1是)")
|
||||
@TableField("IS_RELATE_ACCESS")
|
||||
private String isRelateAccess;
|
||||
|
||||
@ApiModelProperty(value = "引用标准")
|
||||
@TableField("CITE_STAND")
|
||||
private String citeStand;
|
||||
|
||||
@ApiModelProperty(value = "被引用标准")
|
||||
@TableField("CITED_STAND")
|
||||
private String citedStand;
|
||||
|
||||
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
package com.adc.da.slrs.sarStandardsInfo.service;
|
||||
|
||||
import com.adc.da.slrs.sarStandardsInfo.entity.SarStandardsInfo;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-05-31
|
||||
*/
|
||||
public interface ISarStandardsInfoService extends IService<SarStandardsInfo> {
|
||||
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
package com.adc.da.slrs.sarStandardsInfo.service.impl;
|
||||
|
||||
import com.adc.da.slrs.sarStandardsInfo.entity.SarStandardsInfo;
|
||||
import com.adc.da.slrs.sarStandardsInfo.dao.SarStandardsInfoDao;
|
||||
import com.adc.da.slrs.sarStandardsInfo.service.ISarStandardsInfoService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author super_liu
|
||||
* @since 2021-05-31
|
||||
*/
|
||||
@Service
|
||||
public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao, SarStandardsInfo> implements ISarStandardsInfoService {
|
||||
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
<?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.adc.da.slrs.sarStandardsInfo.dao.SarStandardsInfoDao">
|
||||
|
||||
</mapper>
|
||||
@@ -4,7 +4,7 @@ import com.adc.da.att.dao.AttFileEODao;
|
||||
import com.adc.da.att.entity.AttFileEO;
|
||||
import com.adc.da.att.service.IAttFileEOService;
|
||||
import com.adc.da.att.vo.AttFileVo;
|
||||
import com.adc.da.common.ValidFlagEnum;
|
||||
import com.adc.da.sys.constant.ValidFlagEnum;
|
||||
import com.adc.da.util.FileUtil;
|
||||
import com.adc.da.util.UUIDUtils;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
@@ -18,15 +18,18 @@ import java.util.List;
|
||||
*/
|
||||
public interface PersonCollectEODao extends BaseMapper<PersonCollectEO> {
|
||||
|
||||
List<PersonCollectEO> queryByList(BasePage page);
|
||||
public List<PersonCollectEO> queryByList(BasePage page);
|
||||
|
||||
int queryByCount(BasePage var1);
|
||||
public int queryByCount(BasePage var1);
|
||||
|
||||
List<PersonCollectEO> queryByPage(BasePage page);
|
||||
public List<PersonCollectEO> queryByPage(BasePage page);
|
||||
|
||||
public List<PersonCollectEO> queryByPersonCollectPage(PersonCollectEOPage page);
|
||||
|
||||
int queryByPersonCollectPageCount(PersonCollectEOPage page);
|
||||
public int queryByPersonCollectPageCount(PersonCollectEOPage page);
|
||||
|
||||
public int deleteByIdList(@Param("idList") List<String> idList);
|
||||
|
||||
public int deleteByResId(@Param("resId") String resId);
|
||||
|
||||
int deleteByIdList(@Param("idList") List<String> idList);
|
||||
}
|
||||
|
||||
@@ -26,4 +26,6 @@ public interface PersonShareEODao extends BaseMapper<PersonShareEO> {
|
||||
void deleteByIdList(@Param("idList") List<String> idList);
|
||||
|
||||
void deleteByIdListForward(@Param("idList") List<String> idList);
|
||||
|
||||
int deleteByResId(@Param("resId") String resId);
|
||||
}
|
||||
|
||||
@@ -18,4 +18,6 @@ public interface IPersonCollectEOService extends IService<PersonCollectEO> {
|
||||
|
||||
public int deleteByIdList(List<String> idList);
|
||||
|
||||
public int deleteByResId(String resId);
|
||||
|
||||
}
|
||||
|
||||
@@ -16,13 +16,13 @@ public interface IPersonConfEOService extends IService<PersonConfEO> {
|
||||
|
||||
public PersonConfEO saveBean(PersonConfEO personConfEO);
|
||||
|
||||
public PersonConfEO insert1(PersonConfEO personConfEO );
|
||||
public PersonConfEO insert1(PersonConfEO personConfEO);
|
||||
|
||||
public List<HashMap> selectByUserid(String userId);
|
||||
|
||||
public Map selectPersonConfByUserid(String userId);
|
||||
|
||||
public String[] updatePersonConfList(String[] kes,String userId);
|
||||
public String[] updatePersonConfList(String[] kes, String userId);
|
||||
|
||||
public List<PersonConfEO> saveConfList(String userId);
|
||||
|
||||
|
||||
@@ -19,4 +19,6 @@ public interface IPersonShareEOService extends IService<PersonShareEO> {
|
||||
|
||||
public void deleteByIdListForward(List<String> idList);
|
||||
|
||||
public int deleteByResId(String resId);
|
||||
|
||||
}
|
||||
|
||||
+5
@@ -91,4 +91,9 @@ public class PersonCollectEOServiceImpl extends ServiceImpl<PersonCollectEODao,
|
||||
public int deleteByIdList(List<String> idList){
|
||||
return this.baseMapper.deleteByIdList(idList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteByResId(String resId) {
|
||||
return this.baseMapper.deleteByResId(resId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,4 +48,9 @@ public class PersonShareEOServiceImpl extends ServiceImpl<PersonShareEODao, Pers
|
||||
this.baseMapper.deleteByIdListForward(idList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteByResId(String resId) {
|
||||
return this.baseMapper.deleteByResId(resId);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.adc.da.sys.common;
|
||||
|
||||
/**
|
||||
* @Description: 用于返回下拉框格式数据
|
||||
* @Author: yangxuenan
|
||||
* date: 2020/9/3 10:05
|
||||
*/
|
||||
public class SelectionResult {
|
||||
|
||||
private String label;
|
||||
|
||||
private String value;
|
||||
|
||||
public String getLabel() {
|
||||
return label;
|
||||
}
|
||||
|
||||
public void setLabel(String label) {
|
||||
this.label = label;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.adc.da.sys.constant;
|
||||
|
||||
public enum CollectEnum {
|
||||
|
||||
INLAND_MSG("INLAND_MSG","国内动态"),
|
||||
FOREIGN_MSG("FOREIGN_MSG","国外动态"),
|
||||
INLAND_STAND("INLAND_STAND","国内标准库"),
|
||||
INLAND_LAWS("INLAND_LAWS","国内法规库"),
|
||||
FOREIGN_STAND("FOREIGN_STAND","国外标准库"),
|
||||
FOREIGN_LAWS("FOREIGN_LAWS","国外法规库"),
|
||||
BUSINESS_STAND("BUSINESS_STAND","企业标准库");
|
||||
|
||||
private String value;
|
||||
private String lable;
|
||||
private CollectEnum(String value, String lable) {
|
||||
this.value = value;
|
||||
this.lable = lable;
|
||||
}
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
public String getLable() {
|
||||
return lable;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.adc.da.sys.constant;
|
||||
|
||||
/**
|
||||
* 工厂/公司类型区分
|
||||
*/
|
||||
public enum FactoryTypeEnum {
|
||||
DLFAC("动力基地","DLFAC"),
|
||||
ZCFAC("整车基地","ZCFAC"),
|
||||
OTFAC("其他","OTFAC");
|
||||
|
||||
|
||||
private String lable;
|
||||
private String value;
|
||||
|
||||
private FactoryTypeEnum(String lable, String value) {
|
||||
this.lable = lable;
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String getLable() {
|
||||
return lable;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.adc.da.sys.constant;
|
||||
|
||||
public enum GenderEnum {
|
||||
|
||||
MAN(0,"男"),WOMAN(1,"女");
|
||||
|
||||
private int value;
|
||||
private String lable;
|
||||
private GenderEnum(int value, String lable) {
|
||||
this.value = value;
|
||||
this.lable = lable;
|
||||
}
|
||||
public int getValue() {
|
||||
return value;
|
||||
}
|
||||
public String getLable() {
|
||||
return lable;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.adc.da.sys.constant;
|
||||
|
||||
public enum OrgTypeEnum {
|
||||
|
||||
ROOM("室","ROOM"),
|
||||
FAMILY("科","FAMILY"),
|
||||
DEPART("部门","DEPART");
|
||||
|
||||
private String lable;
|
||||
private String value;
|
||||
|
||||
private OrgTypeEnum(String lable, String value) {
|
||||
this.lable = lable;
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String getLable() {
|
||||
return lable;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
@@ -14,7 +14,7 @@ public enum PersonModelEnum {
|
||||
private String lable;
|
||||
private String path;
|
||||
|
||||
private PersonModelEnum(String value, String lable, String path) {
|
||||
private PersonModelEnum(String value, String lable,String path) {
|
||||
this.value = value;
|
||||
this.lable = lable;
|
||||
this.path = path;
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.adc.da.sys.constant;
|
||||
|
||||
public enum ResourceTypeEnum {
|
||||
|
||||
INLAND_MSG("INLAND_MSG","国内动态"),
|
||||
FOREIGN_MSG("FOREIGN_MSG","国外动态"),
|
||||
INLAND_STAND("INLAND_STAND","国内标准库"),
|
||||
INLAND_LAWS("INLAND_LAWS","国内法规库"),
|
||||
FOREIGN_STAND("FOREIGN_STAND","国外标准库"),
|
||||
FOREIGN_LAWS("FOREIGN_LAWS","国外法规库"),
|
||||
BUSINESS_STAND("BUSINESS_STAND","企业标准库");
|
||||
|
||||
|
||||
private String value;
|
||||
private String lable;
|
||||
private ResourceTypeEnum(String value, String lable) {
|
||||
this.value = value;
|
||||
this.lable = lable;
|
||||
}
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
public String getLable() {
|
||||
return lable;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.adc.da.sys.constant;
|
||||
|
||||
/**
|
||||
* Created by Administrator on 2018/11/8 15:47
|
||||
*/
|
||||
public enum RoleEnum {
|
||||
LOCAL_USER("LOCAL","广汽研究院用户"),OTHER_USER("OTHER","非广汽研究院用户"),CONADMIN("CONADMIN","配置管理员"),;
|
||||
|
||||
private String value;
|
||||
private String lable;
|
||||
private RoleEnum(String value, String lable) {
|
||||
this.value = value;
|
||||
this.lable = lable;
|
||||
}
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
public String getLable() {
|
||||
return lable;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.adc.da.sys.constant;
|
||||
|
||||
/**
|
||||
* Created by Administrator on 2018/11/5 16:49
|
||||
* 用户状态:启用,禁用
|
||||
*/
|
||||
public enum UserDisableFlagEnum {
|
||||
DISABLE_FLAG_TRUE("0", "启用"), DISABLE_FLAG_FALSE("1", "禁用");
|
||||
|
||||
private String value;
|
||||
private String lable;
|
||||
|
||||
UserDisableFlagEnum(String value, String lable) {
|
||||
this.value = value;
|
||||
this.lable = lable;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
|
||||
public String getLable() {
|
||||
return lable;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.adc.da.sys.constant;
|
||||
|
||||
public enum ValidFlagEnum {
|
||||
VALID_TRUE(0, "有效"), VALID_FALSE(1, "无效");
|
||||
|
||||
private int value;
|
||||
private String lable;
|
||||
|
||||
private ValidFlagEnum(int value, String lable) {
|
||||
this.value = value;
|
||||
this.lable = lable;
|
||||
}
|
||||
|
||||
public int getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public String getLable() {
|
||||
return lable;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.adc.da.sys.constant;
|
||||
|
||||
public enum ValueStateEnum {
|
||||
|
||||
VALUE_TRUE(0,"TRUE"),VALUE_FALSE(1,"FALSE");
|
||||
|
||||
private int value;
|
||||
private String lable;
|
||||
|
||||
|
||||
private ValueStateEnum(int value, String lable) {
|
||||
this.value = value;
|
||||
this.lable = lable;
|
||||
}
|
||||
|
||||
|
||||
public int getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
|
||||
public String getLable() {
|
||||
return lable;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.adc.da.sys.constant;
|
||||
/***
|
||||
* 预警时间枚举
|
||||
* @MethodName:
|
||||
* @author: zhangyanduan
|
||||
* @param:
|
||||
* @return:
|
||||
* date: 2018/9/17 17:26
|
||||
*/
|
||||
public enum WarnTimeEnum {
|
||||
THREEMONTH("THREEMONTH","3个月"),
|
||||
SIXMONTH("SIXMONTH","6个月"),
|
||||
ONEYEAR("SIXMONTH","1年"),
|
||||
TWOYEAR("TWOYEAR","2年");
|
||||
|
||||
private String label;
|
||||
private String value;
|
||||
|
||||
private WarnTimeEnum(String value, String label) {
|
||||
this.value = value;
|
||||
this.label = label;
|
||||
}
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public String getLabel() {
|
||||
return label;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,133 @@
|
||||
package com.adc.da.sys.controller;
|
||||
|
||||
import com.adc.da.base.web.BaseController;
|
||||
import com.adc.da.http.PageInfo;
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.sys.common.SelectionResult;
|
||||
import com.adc.da.sys.entity.DictionaryEO;
|
||||
import com.adc.da.sys.page.DictionaryEOPage;
|
||||
import com.adc.da.sys.service.IDicEOService;
|
||||
import com.adc.da.sys.service.IDicTypeEOService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/${restPath}/sys/dictionary")
|
||||
@Api(description = "数据字典管理")
|
||||
public class DicEORestController extends BaseController<DictionaryEO> {
|
||||
private static final Logger logger = LoggerFactory.getLogger(DictionaryEO.class);
|
||||
|
||||
@Autowired
|
||||
private IDicEOService dicEOService;
|
||||
|
||||
@ApiOperation(value = "|DictionaryEO|分页查询")
|
||||
@GetMapping("/page")
|
||||
// @RequiresPermissions("lawssBase:dictionary:page")
|
||||
public ResponseMessage<PageInfo<DictionaryEO>> page(DictionaryEOPage page) throws Exception {
|
||||
page.setDictionaryCodeOperator("like");
|
||||
page.setDictionaryNameOperator("like");
|
||||
List<DictionaryEO> rows = dicEOService.queryAllDicByPage(page);
|
||||
return Result.success(getPageInfo(page.getPager(), rows));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "|DictionaryEO|查询")
|
||||
@GetMapping("/queryByList")
|
||||
// @RequiresPermissions("lawssBase:dictionary:list")
|
||||
public ResponseMessage<List<DictionaryEO>> list(DictionaryEOPage page) throws Exception {
|
||||
return Result.success(dicEOService.queryByList(page));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "|DictionaryEO|详情")
|
||||
@GetMapping("/{id}")
|
||||
// @RequiresPermissions("lawssBase:dictionary:get")
|
||||
public ResponseMessage<DictionaryEO> find(@PathVariable String id) throws Exception {
|
||||
return Result.success(dicEOService.getById(id));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "|DictionaryEO|新增")
|
||||
@PostMapping("/addDictionary")
|
||||
// @RequiresPermissions("lawssBase:dictionary:save")
|
||||
public ResponseMessage<DictionaryEO> addDictionary(@RequestBody DictionaryEO dictionaryEO) throws Exception {
|
||||
String resultMsg = dicEOService.createDictionary(dictionaryEO);
|
||||
if ("success".equals(resultMsg)) {
|
||||
return Result.success("0","新增成功",dictionaryEO);
|
||||
} else {
|
||||
return Result.error("新增失败," + resultMsg);
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation(value = "|DictionaryEO|修改")
|
||||
@PutMapping("/updateDictionary")
|
||||
// @RequiresPermissions("lawssBase:dictionary:update")
|
||||
public ResponseMessage<DictionaryEO> updateDictionary(@RequestBody DictionaryEO dictionaryEO) throws Exception {
|
||||
String resultMsg = dicEOService.updateDictionary(dictionaryEO);
|
||||
if ("success".equals(resultMsg)) {
|
||||
return Result.success("0","修改成功",dictionaryEO);
|
||||
} else {
|
||||
return Result.error("修改失败," + resultMsg);
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation(value = "|DictionaryEO|删除")
|
||||
@PutMapping("/deleteByIds")
|
||||
// @RequiresPermissions("lawssBase:dictionary:delete")
|
||||
public ResponseMessage deleteByIds(String id) throws Exception {
|
||||
int countRes = dicEOService.queryUseByCount(id);
|
||||
if (countRes > 0) {
|
||||
return Result.error("0","有引用,无法删除",null);
|
||||
} else {
|
||||
dicEOService.deleteDicAndType(id);
|
||||
return Result.success("0","删除成功",null);
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation(value = "|DictionaryEO|删除字典和相关明细")
|
||||
@DeleteMapping("/deleteDicAndType/{id}")
|
||||
// @RequiresPermissions("sys:dic:delete")
|
||||
public ResponseMessage deleteDicAndType(@NotNull @PathVariable(value = "id") String id) throws Exception {
|
||||
dicEOService.deleteDicAndType(id);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
/*
|
||||
* 数据字典下拉框接口(通用)
|
||||
* @MethodName:getByDicCode
|
||||
* @author: DuYunbao
|
||||
* @date: 2018/5/3 10:36
|
||||
*/
|
||||
@ApiOperation(value = "数据字典下拉框接口")
|
||||
@GetMapping("/dicCode/{dicCode}")
|
||||
// @RequiresPermissions("sys:dic:getByDicCode")
|
||||
public ResponseMessage<DictionaryEO> getByDicCode(@NotNull @PathVariable("dicCode") String dicCode) throws Exception {
|
||||
DictionaryEO dictionaryVO = dicEOService.getDicEOAndTypeEoByDicCode(dicCode);
|
||||
return Result.success(dictionaryVO);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "以下拉框格式查询所有类别")
|
||||
@GetMapping("/getDictionarySelList")
|
||||
// @RequiresPermissions("sys:dic:getByDicCode")
|
||||
public ResponseMessage<List<SelectionResult>> getDictionarySelList(String id) {
|
||||
List<SelectionResult> getList = dicEOService.getDictionarySelList(id);
|
||||
return Result.success(getList);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "以下拉框格式查询所有类别Code")
|
||||
@GetMapping("/getDictionaryCodeSelList")
|
||||
// @RequiresPermissions("sys:dic:getByDicCode")
|
||||
public ResponseMessage<List<SelectionResult>> getDictionaryCodeSelList(String id) {
|
||||
List<SelectionResult> getList = dicEOService.getDictionaryCodeSelList(id);
|
||||
return Result.success(getList);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,377 @@
|
||||
package com.adc.da.sys.controller;
|
||||
|
||||
import com.adc.da.base.page.Pager;
|
||||
import com.adc.da.base.web.BaseController;
|
||||
import com.adc.da.http.PageInfo;
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.sys.common.SelectionResult;
|
||||
import com.adc.da.sys.entity.DicTypeEO;
|
||||
import com.adc.da.sys.page.DicTypeEOPage;
|
||||
import com.adc.da.sys.service.IDicTypeEOService;
|
||||
import com.adc.da.sys.vo.DicTypeVO;
|
||||
import com.adc.da.util.UUIDUtils;
|
||||
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.*;
|
||||
|
||||
import static org.springframework.http.MediaType.APPLICATION_JSON_UTF8_VALUE;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/${restPath}/sys/dictype")
|
||||
@Api(description = "字典类型明细管理")
|
||||
public class DicTypeEORestController extends BaseController<DicTypeEO> {
|
||||
private static final Logger logger = LoggerFactory.getLogger(DicTypeEO.class);
|
||||
@Autowired
|
||||
private IDicTypeEOService dicTypeEOService;
|
||||
|
||||
List<DicTypeEO> dicTypeEOTypeNameAndCode = new ArrayList<>();
|
||||
|
||||
/**
|
||||
* @return com.adc.da.util.http.ResponseMessage<com.adc.da.sys.vo.DicTypeVO>
|
||||
* @Author liwenxuan
|
||||
* @Description 新增数据字典,必填字段:字典类型编码、字典类型名称
|
||||
* @Date Administrator 2018/9/17
|
||||
* @Param [dicTypeVO]
|
||||
**/
|
||||
@ApiOperation(value = "|DicTypeEO|新增")
|
||||
@PostMapping("/create")
|
||||
@RequiresPermissions("sys:dicType:create")
|
||||
public ResponseMessage<Integer> create(@RequestBody DicTypeEO dicTypeVO) throws Exception {
|
||||
|
||||
//通过传入的code获取对象(此时id为空,sql做了判断)
|
||||
// List<DicTypeEO> dicTypeEOList = dicTypeEOService.getDicTypeEOByDicTypeCode(dicTypeVO.getDicId(),dicTypeVO.getId(),dicTypeVO.getDicTypeCode(),dicTypeVO.getParentId());
|
||||
//通过传入的name和数据字典id获取对象
|
||||
dicTypeVO.setId(null);
|
||||
List<DicTypeEO> dicTypeEOS = dicTypeEOService.getTypeIdByDicIdAndTypeName(dicTypeVO.getDicId(), dicTypeVO.getId(), dicTypeVO.getDicTypeName(), dicTypeVO.getParentId());
|
||||
if (dicTypeEOS != null && !dicTypeEOS.isEmpty()) {
|
||||
return Result.error("选项已存在");
|
||||
}
|
||||
//前台需要返回message和true,底层封装的返回方法只有这个返回值能用(返回的对象t:1前台不需要)
|
||||
Integer dicTypeEO = dicTypeEOService.saveDictype(dicTypeVO);
|
||||
if (dicTypeEO > 0) {
|
||||
return Result.success("", "新增成功", 1);
|
||||
}
|
||||
return Result.error("新增失败");
|
||||
}
|
||||
|
||||
/**
|
||||
* @return com.adc.da.util.http.ResponseMessage<java.lang.Integer>
|
||||
* @Author liwenxuan
|
||||
* @Description 企业标准大类
|
||||
* @Date Administrator 2018/10/9
|
||||
* @Param [dicTypeVO]
|
||||
**/
|
||||
@ApiOperation(value = "|DicTypeEO|企标大类新增")
|
||||
@PostMapping("/createEnterpriseStandard")
|
||||
@RequiresPermissions("sys:dicType:createEnterpriseStandard")
|
||||
public ResponseMessage<Integer> createEnterpriseStandard(@RequestBody DicTypeEO dicTypeVO) throws Exception {
|
||||
dicTypeVO.setId(UUIDUtils.randomUUID20());
|
||||
// liwenxuan:用来企业大类判断新增是否重复 有parentId代表查询里面的数据 (企业大类分页查找只显示根节点,编辑每条数据里面是他对应的孩子节点,是dicTypeEOService.getDicTypeEOTypeNameAndCode1方法)
|
||||
if (dicTypeVO.getParentId() != null) {
|
||||
dicTypeEOTypeNameAndCode = dicTypeEOService.getDicTypeEOTypeNameAndCode(dicTypeVO.getId(), dicTypeVO.getDicTypeName(), dicTypeVO.getDicTypeCode(), dicTypeVO.getParentId());
|
||||
} else {
|
||||
dicTypeEOTypeNameAndCode = dicTypeEOService.getDicTypeEOTypeNameAndCode1(dicTypeVO.getId(), dicTypeVO.getDicTypeName(), dicTypeVO.getDicTypeCode(), dicTypeVO.getParentId());
|
||||
}
|
||||
if (dicTypeEOTypeNameAndCode.size() != 0) {
|
||||
for (DicTypeEO dicTypeEO : dicTypeEOTypeNameAndCode) {
|
||||
if (dicTypeEO.getDicTypeName().equals(dicTypeVO.getDicTypeName())) {
|
||||
return Result.error("选项已存在");
|
||||
}
|
||||
}
|
||||
}
|
||||
Integer dicTypeEO = dicTypeEOService.saveDictype(dicTypeVO);
|
||||
if (dicTypeEO > 0) {
|
||||
return Result.success("", "新增成功", 1);
|
||||
}
|
||||
|
||||
return Result.error("新增失败");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return com.adc.da.util.http.ResponseMessage<com.adc.da.util.http.PageInfo < com.adc.da.sys.entity.DicTypeEO>>
|
||||
* @Author liwenxuan
|
||||
* @Description 分页查询(根据code也可以进行模糊查找)
|
||||
* 1.供所有的数据字典参照表使用
|
||||
* 2.供国家地区的编辑和查看的回显使用(需要传入id作为parentId进行查找国家地区下面的孩子节点)
|
||||
* @Date Administrator 2018/9/17
|
||||
* @Param [pageNo, pageSize, dicId, dicTypeName, dicTypeCode]
|
||||
**/
|
||||
@ApiOperation(value = "|DicTypeEO|分页列表")
|
||||
@GetMapping("/page")
|
||||
//@RequiresPermissions("sys:dicType:pageListByDicId")
|
||||
public ResponseMessage<PageInfo<DicTypeEO>> pageListByDicId(DicTypeEOPage page) throws Exception {
|
||||
page.setPager(new Pager());
|
||||
page.setValidFlag("0");
|
||||
page.setOrderBy("show_index,modify_time desc");
|
||||
List<DicTypeEO> rows = dicTypeEOService.queryByPage(page);
|
||||
/*企标细类加入分类代号*/
|
||||
if("FGFBTYGHGHMB".equals(page.getDicId()) && rows!=null && rows.size()>0){
|
||||
for(DicTypeEO row:rows){
|
||||
List<DicTypeEO> getClassify = dicTypeEOService.getDicTypeEOByDicTypeCode(null,null,null,row.getId());
|
||||
if(getClassify!=null && getClassify.size()>0){
|
||||
row.setClassifyCode(getClassify.get(0).getDicTypeName());
|
||||
row.setClassifyCodeId(getClassify.get(0).getId());
|
||||
}
|
||||
}
|
||||
}
|
||||
return Result.success(getPageInfo(page.getPager(), rows));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "|DicTypeEO|国家/地区分页列表")
|
||||
@GetMapping("/pageCountry")
|
||||
@RequiresPermissions("sys:dicType:pageListByDicIdAndNoParentId")
|
||||
public ResponseMessage<PageInfo<DicTypeEO>> pageListByDicIdAndNoParentId(DicTypeEOPage page) throws Exception {
|
||||
page.setPager(new Pager());
|
||||
page.setValidFlag("0");
|
||||
page.setOrderBy("show_index,modify_time desc");
|
||||
List<DicTypeEO> rows = dicTypeEOService.queryByPageNoParentId(page);
|
||||
return Result.success(getPageInfo(page.getPager(), rows));
|
||||
}
|
||||
|
||||
/***
|
||||
* 获取数据字典属性所有内容
|
||||
* @MethodName:getDicTypeList
|
||||
* @author: zhangyanduan
|
||||
* @param:[dicId]
|
||||
* @return:com.adc.da.util.http.ResponseMessage<java.util.List<com.adc.da.sys.entity.DicTypeEO>>
|
||||
* date: 2018/11/1 15:42
|
||||
*/
|
||||
@ApiOperation(value = "|DicTypeEO|查询所有数据字典数据")
|
||||
@GetMapping("/getDicTypeList")
|
||||
// @RequiresPermissions("sys:dicType:getDicTypeList")
|
||||
public ResponseMessage<List<DicTypeEO>> getDicTypeList(String dicId) throws Exception {
|
||||
DicTypeEOPage page = new DicTypeEOPage();
|
||||
page.setDicId(dicId);
|
||||
page.setValidFlag("0");
|
||||
List<DicTypeEO> typeEOList = dicTypeEOService.queryByList(page);
|
||||
return Result.success(typeEOList);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return com.adc.da.util.http.ResponseMessage<com.adc.da.sys.vo.DicTypeVO>
|
||||
* @Author liwenxuan
|
||||
* @Description 修改数据字典编码和名称
|
||||
* 1.如果修改的字典类型编码不改变也可以进行修改 通过用户id获得字段名字和输入的名字一致也可以
|
||||
* 2.原name和新输入的name进行对比,如果一样不算在字典类型编码重复
|
||||
* @Date Administrator 2018/9/17
|
||||
* @Param [dicTypeVO]
|
||||
**/
|
||||
@ApiOperation(value = "|DicTypeEO|修改")
|
||||
@PutMapping(consumes = APPLICATION_JSON_UTF8_VALUE)
|
||||
@RequiresPermissions("sys:dicType:update")
|
||||
public ResponseMessage<Integer> update(@RequestBody DicTypeEO dicTypeVO) throws Exception {
|
||||
// liwenxuan:用来企业大类判断新增是否重复 有parentId代表查询里面的数据
|
||||
if (dicTypeVO.getParentId() != null) {
|
||||
dicTypeEOTypeNameAndCode = dicTypeEOService.getDicTypeEOTypeNameAndCode(dicTypeVO.getId(), dicTypeVO.getDicTypeName(), dicTypeVO.getDicTypeCode(), dicTypeVO.getParentId());
|
||||
} else {
|
||||
dicTypeEOTypeNameAndCode = dicTypeEOService.getTypeIdByDicIdAndTypeName(dicTypeVO.getDicId(), dicTypeVO.getId(), dicTypeVO.getDicTypeName(), dicTypeVO.getParentId());
|
||||
}
|
||||
for (DicTypeEO dicTypeEO : dicTypeEOTypeNameAndCode) {
|
||||
if (dicTypeEO.getDicTypeName().equals(dicTypeVO.getDicTypeName())) {
|
||||
return Result.error("选项已存在");
|
||||
}
|
||||
}
|
||||
dicTypeVO.setModifyTime(new Date());
|
||||
int i = dicTypeEOService.updateByPrimaryKeySelective(dicTypeVO);
|
||||
//如果修改数据为标准类别,将国家地区关联的标准类别同时修改
|
||||
if ("JKSADFH564S".equals(dicTypeVO.getDicId())) {
|
||||
dicTypeEOService.updateByDicTypeCode(dicTypeVO);
|
||||
}
|
||||
//修改细类中分类代号
|
||||
if(StringUtils.isNotEmpty(dicTypeVO.getClassifyCode()) && StringUtils.isNotEmpty(dicTypeVO.getClassifyCodeId())){
|
||||
DicTypeEO upClassiEo = new DicTypeEO();
|
||||
upClassiEo.setId(dicTypeVO.getClassifyCodeId());
|
||||
upClassiEo.setDicTypeName(dicTypeVO.getClassifyCode());
|
||||
upClassiEo.setModifyTime(new Date());
|
||||
dicTypeEOService.updateByPrimaryKeySelective(upClassiEo);
|
||||
} else if(StringUtils.isNotEmpty(dicTypeVO.getClassifyCodeId()) && StringUtils.isEmpty(dicTypeVO.getClassifyCode())){
|
||||
DicTypeEO upClassiEo = new DicTypeEO();
|
||||
upClassiEo.setId(dicTypeVO.getClassifyCodeId());
|
||||
upClassiEo.setValidFlag(1);
|
||||
dicTypeEOService.updateByPrimaryKeySelective(upClassiEo);
|
||||
}else if(StringUtils.isEmpty(dicTypeVO.getClassifyCodeId()) && StringUtils.isNotEmpty(dicTypeVO.getClassifyCode())){
|
||||
DicTypeEO dicClassifyCode = new DicTypeEO();
|
||||
dicClassifyCode.setDicTypeName(dicTypeVO.getClassifyCode());
|
||||
dicClassifyCode.setDicId("YDWVSVOAQG");
|
||||
dicClassifyCode.setParentId(dicTypeVO.getId());
|
||||
dicClassifyCode.setId(UUIDUtils.randomUUID20());
|
||||
dicClassifyCode.setValidFlag(0);
|
||||
dicClassifyCode.setCreationTime(new Date());
|
||||
dicClassifyCode.setModifyTime(new Date());
|
||||
dicClassifyCode.setDicTypeCode(UUIDUtils.randomUUID10());
|
||||
dicTypeEOService.insertSelective(dicClassifyCode);
|
||||
}
|
||||
if (i == 0) {
|
||||
return Result.error("修改失败");
|
||||
}
|
||||
return Result.success("true", "修改成功", 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return com.adc.da.util.http.ResponseMessage<com.adc.da.sys.vo.DicTypeVO>
|
||||
* @Author liwenxuan
|
||||
* @Description 根据数据字典参数表id获取数据字典参数表信息
|
||||
* @Date Administrator 2018/9/17
|
||||
* @Param [id]
|
||||
**/
|
||||
@ApiOperation(value = "|DicTypeEO|详情")
|
||||
@GetMapping("/{id}")
|
||||
@RequiresPermissions("sys:dicType:get")
|
||||
public ResponseMessage<DicTypeEO> getById(@NotNull @PathVariable("id") String id) throws Exception {
|
||||
DicTypeEO dicTypeVO = dicTypeEOService.getDicTypeById(id);
|
||||
return Result.success(dicTypeVO);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return com.adc.da.util.http.ResponseMessage
|
||||
* @Author liwenxuan
|
||||
* @Description 删除多条数据 ,实际上设置vilid_flag=1
|
||||
* @Date Administrator 2018/9/17
|
||||
* @Param [ids]
|
||||
**/
|
||||
@ApiOperation(value = "|DicTypeEO|删除多条数据")
|
||||
//@DeleteMapping("/deleteArr/{ids}")
|
||||
@DeleteMapping("/deleteArr")
|
||||
//@RequiresPermissions("sys:dicType:deleteArr")
|
||||
public ResponseMessage deleteArr(String[] ids, String[] dicTypeCodes) throws Exception {
|
||||
if (dicTypeCodes != null) {
|
||||
List<String> list = Arrays.asList(dicTypeCodes);
|
||||
for (String dicTypeCode : list) {
|
||||
boolean dicTypeByDicTypeCode = dicTypeEOService.getDicTypeByDicTypeCode(dicTypeCode);
|
||||
if (dicTypeByDicTypeCode == false) {
|
||||
return Result.error("有引用,无法删除");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// 标准类别判断
|
||||
List<String> list = Arrays.asList(ids);
|
||||
for (String id : list) {
|
||||
DicTypeEO dicTypeEO = dicTypeEOService.getDicTypeById(id);
|
||||
// 通过对应的国家code,和 标准类别code 判断是否被引用
|
||||
DicTypeEO countryEO = dicTypeEOService.getDicTypeById(dicTypeEO.getParentId());
|
||||
//在主表中,标准类别的code和name 是同一个是
|
||||
boolean dicTypeByDicTypeCode = dicTypeEOService.judgeHaveUse(dicTypeEO.getDicTypeCode(),countryEO.getDicTypeCode());
|
||||
if (!dicTypeByDicTypeCode) {
|
||||
return Result.error("有引用,无法删除");
|
||||
}
|
||||
}
|
||||
}
|
||||
dicTypeEOService.delete(Arrays.asList(ids));
|
||||
if (dicTypeCodes != null) {
|
||||
// 如果dicTypeCode不为空,说明删除标准类别,国家下的标准类别也需要同步删除
|
||||
dicTypeEOService.deleteDicTypeByCodeAndParentid(Arrays.asList(dicTypeCodes));
|
||||
}
|
||||
return Result.success("", "删除成功", null);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return com.adc.da.util.http.ResponseMessage
|
||||
* @Author liwenxuan
|
||||
* @Description 删除一条数据
|
||||
* @Date Administrator 2018/9/17
|
||||
* @Param [id]
|
||||
**/
|
||||
@ApiOperation(value = "|DicTypeEO|删除一条数据")
|
||||
@DeleteMapping("/delete")
|
||||
//@RequiresPermissions("sys:dicType:removeDicType")
|
||||
public ResponseMessage delete(String dicTypeEOId, String dicTypeCode) throws Exception {
|
||||
if (dicTypeCode != null) {
|
||||
boolean dicTypeByDicTypeCode = dicTypeEOService.getDicTypeByDicTypeCode(dicTypeCode);
|
||||
if (dicTypeByDicTypeCode == false) {
|
||||
return Result.error("有引用,无法删除");
|
||||
}
|
||||
}else {
|
||||
// 标准类别判断
|
||||
DicTypeEO dicTypeEO = dicTypeEOService.getDicTypeById(dicTypeEOId);
|
||||
// 通过对应的国家code,和 标准类别code 判断是否被引用
|
||||
DicTypeEO countryEO = dicTypeEOService.getDicTypeById(dicTypeEO.getParentId());
|
||||
//在主表中,标准类别的code和name 是同一个是
|
||||
boolean dicTypeByDicTypeCode = dicTypeEOService.judgeHaveUse(dicTypeEO.getDicTypeName(),countryEO.getDicTypeCode());
|
||||
if (!dicTypeByDicTypeCode) {
|
||||
return Result.error("有引用,无法删除");
|
||||
}
|
||||
}
|
||||
dicTypeEOService.deleteDicTypeByDicId(dicTypeEOId);
|
||||
if (dicTypeCode != null) {
|
||||
// 如果dicTypeCode不为空,说明删除标准类别,国家下的标准类别也需要同步删除
|
||||
List<String> codes = new ArrayList<>();
|
||||
codes.add(dicTypeCode);
|
||||
dicTypeEOService.deleteDicTypeByCodeAndParentid(codes);
|
||||
}
|
||||
return Result.success("", "删除成功", null);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return com.adc.da.util.http.ResponseMessage<java.util.Map < java.lang.String , java.lang.String>>
|
||||
* @Author yangxuenan
|
||||
* @Description 根据数据字典编码查询字典类型
|
||||
* Date 2018/9/12 10:12
|
||||
* @Param [dicCode]
|
||||
**/
|
||||
@ApiOperation(value = "|DicTypeEO|查询字典类型")
|
||||
@GetMapping("/getDicTypeByDicCode")
|
||||
// @RequiresPermissions("sys:dicType:getDicTypeByDicCode")
|
||||
public ResponseMessage<List<Map<String, String>>> getDicTypeByDicCode(@RequestParam String dicCode) throws Exception {
|
||||
List<Map<String, String>> dicTypeEO = dicTypeEOService.getDicTypeByDicCode(dicCode);
|
||||
return Result.success(dicTypeEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return com.adc.da.util.http.ResponseMessage<java.util.List < com.adc.da.sys.entity.DicTypeEO>>
|
||||
* @Author gaoyan
|
||||
* @Description 分组查询全部字典类型
|
||||
* Date 2018/9/11 19:09
|
||||
* @Param [dicCode]
|
||||
**/
|
||||
@ApiOperation(value = "|DicTypeEO|查询字典类型")
|
||||
@GetMapping("/getDicTypeListCode")
|
||||
//@RequiresPermissions("sys:dicType:getDicTypeListCode")
|
||||
public ResponseMessage<Map<String, Object>> getDicTypeListCode() throws Exception {
|
||||
Map<String, Object> dicTypeEO = dicTypeEOService.getDicTypeListCode();
|
||||
return Result.success(dicTypeEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return com.adc.da.util.http.ResponseMessage<java.util.List < java.util.Map < java.lang.String , java.lang.String>>>
|
||||
* @Author yangxuenan
|
||||
* @Description 根据父级code查询
|
||||
* Date 2018/10/9 14:11
|
||||
* @Param [dicTypeCode]
|
||||
**/
|
||||
@ApiOperation(value = "|DicTypeEO|根据父级code查询")
|
||||
@GetMapping("/getDicTypeByParentCode")
|
||||
// @RequiresPermissions("sys:dicType:getDicTypeByParentCode")
|
||||
public ResponseMessage<List<Map<String, String>>> getDicTypeByParentCode(@RequestParam String dicTypeCode) throws Exception {
|
||||
List<Map<String, String>> dicTypeEO = dicTypeEOService.getDicTypeByParentCode(dicTypeCode);
|
||||
return Result.success(dicTypeEO);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "|DicTypeEO|根据父级多个code查询")
|
||||
@GetMapping("/getDicTypeByParentCodes")
|
||||
// @RequiresPermissions("sys:dicType:getDicTypeByParentCode")
|
||||
public ResponseMessage<List<Map<String, String>>> getDicTypeByParentCodes(@RequestParam String dicTypeCode) throws Exception {
|
||||
List<Map<String, String>> dicTypeEO = dicTypeEOService.getDicTypeByParentCodes(dicTypeCode);
|
||||
return Result.success(dicTypeEO);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "|DicTypeEO|根据DicId查询下拉列表")
|
||||
@GetMapping("/getDicTypeByDicId")
|
||||
public ResponseMessage<List<SelectionResult>> getDicTypeByDicId(String dicId) {
|
||||
List<SelectionResult> dicTypeEO = dicTypeEOService.getDicTypeByDicId(dicId);
|
||||
return Result.success(dicTypeEO);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -3,11 +3,11 @@ package com.adc.da.sys.controller;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.adc.da.base.page.Pager;
|
||||
import com.adc.da.base.web.BaseController;
|
||||
import com.adc.da.common.ValidFlagEnum;
|
||||
import com.adc.da.http.PageInfo;
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.sys.constant.IsBelongEnum;
|
||||
import com.adc.da.sys.constant.ValidFlagEnum;
|
||||
import com.adc.da.sys.entity.RoleEO;
|
||||
import com.adc.da.sys.entity.UserEO;
|
||||
import com.adc.da.sys.entity.UserRoleEO;
|
||||
|
||||
@@ -3,10 +3,10 @@ package com.adc.da.sys.controller;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.adc.da.base.page.Pager;
|
||||
import com.adc.da.base.web.BaseController;
|
||||
import com.adc.da.common.ValidFlagEnum;
|
||||
import com.adc.da.http.PageInfo;
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.sys.constant.ValidFlagEnum;
|
||||
import com.adc.da.sys.entity.RoleEO;
|
||||
import com.adc.da.sys.entity.UserEO;
|
||||
import com.adc.da.sys.page.UserEOPage;
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package com.adc.da.sys.controller;
|
||||
|
||||
import com.adc.da.base.web.BaseController;
|
||||
import com.adc.da.common.ValidFlagEnum;
|
||||
import com.adc.da.http.PageInfo;
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.sys.constant.ValidFlagEnum;
|
||||
import com.adc.da.sys.entity.RoleEO;
|
||||
import com.adc.da.sys.entity.UserEO;
|
||||
import com.adc.da.sys.entity.UserInfoEO;
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
package com.adc.da.sys.dao;
|
||||
|
||||
import com.adc.da.sys.common.SelectionResult;
|
||||
import com.adc.da.sys.entity.DictionaryEO;
|
||||
import com.adc.da.sys.page.DictionaryEOPage;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface DicEODao extends BaseMapper<DictionaryEO> {
|
||||
|
||||
public DictionaryEO getDictionaryEOById(String id);
|
||||
|
||||
public DictionaryEO getDictionaryEOByDicCode(String dictionaryCode);
|
||||
|
||||
public DictionaryEO getDicEOAndTypeEoByDicCode(String dictionaryCode);
|
||||
|
||||
public DictionaryEO getDictionaryEOByDicName(String dictionaryName);
|
||||
|
||||
public void deleteDic(String id);
|
||||
|
||||
//gaoyan
|
||||
public List<DictionaryEO> getDictionaryEO();
|
||||
|
||||
public Integer countByCodeOrName(DictionaryEOPage page);
|
||||
|
||||
public List<DictionaryEO> queryAllDicByPage(DictionaryEOPage page);
|
||||
|
||||
public Integer queryAllDicByCount(DictionaryEOPage page);
|
||||
|
||||
public List<SelectionResult> getDictionarySelList(@Param("id") String id);
|
||||
|
||||
public List<SelectionResult> getDictionaryCodeSelList(@Param("id") String id);
|
||||
|
||||
public int queryUseByCount(@Param("id") String id);
|
||||
|
||||
public int insertSelective(DictionaryEO dictionaryEO);
|
||||
|
||||
public int updateByPrimaryKeySelective(DictionaryEO dictionaryEO);
|
||||
|
||||
public List<DictionaryEO> queryByPage(DictionaryEOPage page);
|
||||
|
||||
public int queryByCount(DictionaryEOPage page);
|
||||
|
||||
public List<DictionaryEO> queryByList(DictionaryEOPage page);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
package com.adc.da.sys.dao;
|
||||
|
||||
import com.adc.da.sys.common.SelectionResult;
|
||||
import com.adc.da.sys.entity.DicTypeEO;
|
||||
import com.adc.da.sys.page.DicTypeEOPage;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface DicTypeEODao extends BaseMapper<DicTypeEO> {
|
||||
|
||||
public DicTypeEO getDicTypeEOById(String id);
|
||||
|
||||
public void deleteDicTypeByIdInBatch(List<String> ids);
|
||||
|
||||
public List<DicTypeEO> getTypeIdByDicIdAndTypeName(@Param("dicId") String dicId, @Param("id") String id, @Param("typeName") String typeName, @Param("parentId") String parentId);
|
||||
|
||||
|
||||
public List<DicTypeEO> getDicTypeEOByDicTypeCode(@Param("dicId") String dicId, @Param("id") String id, @Param("dicTypeCode") String dicTypeCode, @Param("parentId") String parentId);
|
||||
|
||||
public void batchInsertTypeEo(List<DicTypeEO> ModelType);
|
||||
|
||||
public void deleteDicTypeByDicId(String id);
|
||||
|
||||
/**
|
||||
* @Author yangxuenan
|
||||
* @Description 根据数据字典编码查询字典类型
|
||||
* Date 2018/9/11 15:09
|
||||
* @Param [dictionaryCode]
|
||||
* @return java.util.List<com.adc.da.sys.entity.DicTypeEO>
|
||||
**/
|
||||
public List<DicTypeEO> getDicTypeByDicCode(String dictionaryCode);
|
||||
|
||||
public List<DicTypeEO> getFineDicTypeByDicCode(String dictionaryCode);
|
||||
|
||||
//liwenxuan:国家地区新增
|
||||
public List<DicTypeEO> queryByPageNoParentId(DicTypeEOPage page);
|
||||
|
||||
public int queryByCountCounter(DicTypeEOPage page);
|
||||
public List<DicTypeEO> getDicTypeByParentCode(String dicTypeCode);
|
||||
|
||||
public List<DicTypeEO> getDicTypeByDicTypeName(DicTypeEO dicTypeEO);
|
||||
|
||||
public List<DicTypeEO> getDicTypeEOTypeNameAndCode(@Param("id") String id, @Param("dicTypeName") String dicTypeName, @Param("dicTypeCode") String dicTypeCode, @Param("parentId") String parentId);
|
||||
public List<DicTypeEO> getDicTypeEOTypeNameAndCode1(@Param("id") String id, @Param("dicTypeName") String dicTypeName, @Param("dicTypeCode") String dicTypeCode, @Param("parentId") String parentId);
|
||||
|
||||
// 标准法规属性管理中删除之前查看其它地方是否引用
|
||||
public List<Integer> getDicTypeByDicTypeCode(String dicTypeCode);
|
||||
|
||||
public List<DicTypeEO> getDicEOByDicTypeCode(String dicTypeCode);
|
||||
|
||||
public List<DicTypeEO> getDicEOByDicTypeCodeParent(String dicTypeCode);
|
||||
|
||||
public int deleteByDicIdAndDicTypeCode(DicTypeEO dicTypeEO);
|
||||
|
||||
public int updateByDicTypeCode(DicTypeEO dicTypeEO);
|
||||
|
||||
public int judgeHaveUse(@Param("sortCode") String sortCode, @Param("countryCode") String countryCode);
|
||||
|
||||
public void deleteDicTypeByCodeAndParentid(List<String> codes);
|
||||
|
||||
public int deleteByDictionaryId(@Param("dicId") String dicId);
|
||||
|
||||
public List<SelectionResult> getDicTypeByDicId(@Param("dicId") String dicId);
|
||||
|
||||
public String getDicNamesByCodes(@Param("codeList") List<String> codeList);
|
||||
|
||||
public int insertSelective(DicTypeEO dictionaryEO);
|
||||
|
||||
public int updateByPrimaryKeySelective(DicTypeEO dictionaryEO);
|
||||
|
||||
public List<DicTypeEO> queryByPage(DicTypeEOPage page);
|
||||
|
||||
public int queryByCount(DicTypeEOPage page);
|
||||
|
||||
public List<DicTypeEO> queryByList(DicTypeEOPage page);
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.adc.da.sys.dao;
|
||||
|
||||
import com.adc.da.base.page.BasePage;
|
||||
import com.adc.da.sys.entity.FeedbackInfoEO;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* <br>
|
||||
* <b>功能:</b>TS_FEEDBACK_INFO FeedbackInfoEODao<br>
|
||||
* <b>作者:</b>code generator<br>
|
||||
* <b>日期:</b> 2018-09-17 <br>
|
||||
* <b>版权所有:<b>版权归北京卡达克数据技术中心所有。<br>
|
||||
*/
|
||||
public interface FeedbackInfoEODao extends BaseMapper<FeedbackInfoEO> {
|
||||
|
||||
List<FeedbackInfoEO> queryByList(BasePage page);
|
||||
|
||||
int queryByCount(BasePage var1);
|
||||
|
||||
List<FeedbackInfoEO> queryByPage(BasePage page);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.adc.da.sys.dao;
|
||||
|
||||
import com.adc.da.base.page.BasePage;
|
||||
import com.adc.da.sys.entity.LinkInfoEO;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* <br>
|
||||
* <b>功能:</b>TS_LINK_INFO LinkInfoEODao<br>
|
||||
* <b>作者:</b>code generator<br>
|
||||
* <b>日期:</b> 2020-01-13 <br>
|
||||
* <b>版权所有:<b>版权归北京卡达克数据技术中心所有。<br>
|
||||
*/
|
||||
public interface LinkInfoEODao extends BaseMapper<LinkInfoEO> {
|
||||
|
||||
List<LinkInfoEO> queryByList(BasePage page);
|
||||
|
||||
int queryByCount(BasePage page);
|
||||
|
||||
List<LinkInfoEO> queryByPage(BasePage page);
|
||||
|
||||
int deleteByIds(@Param("idList") List<String> idList);
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.adc.da.sys.dao;
|
||||
|
||||
import com.adc.da.base.page.BasePage;
|
||||
import com.adc.da.sys.entity.LoginInfoEO;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by Administrator on 2018/10/11 17:36
|
||||
*/
|
||||
public interface LoginInfoEODao extends BaseMapper<LoginInfoEO> {
|
||||
|
||||
List<LoginInfoEO> queryByList(BasePage page);
|
||||
|
||||
int queryByCount(BasePage page);
|
||||
|
||||
List<LoginInfoEO> queryByPage(BasePage page);
|
||||
|
||||
// liwenxuan:系统用户访问数量 和 Top10
|
||||
List<String> sysUserVisitCount(Date visitTime);
|
||||
List<String> sysUserVisitCountTop10();
|
||||
int count();
|
||||
|
||||
LoginInfoEO sysUserVisitCountByDate(LoginInfoEO loginInfoEO);
|
||||
|
||||
int sysUserVisitCountByAll(LoginInfoEO loginInfoEO);
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
package com.adc.da.sys.dao;
|
||||
|
||||
import com.adc.da.base.page.BasePage;
|
||||
import com.adc.da.sys.entity.MenuEO;
|
||||
import com.adc.da.sys.page.MenuEOPage;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <br>
|
||||
* <b>功能:</b>TS_MENU MenuEODao<br>
|
||||
* <b>作者:</b>code generator<br>
|
||||
* <b>日期:</b> 2017-11-06 <br>
|
||||
* <b>版权所有:<b>版权归北京卡达克数据技术中心所有。<br>
|
||||
*/
|
||||
public interface MenuEODao extends BaseMapper<MenuEO> {
|
||||
|
||||
List<MenuEO> queryByList(BasePage page);
|
||||
|
||||
int queryByCount(BasePage page);
|
||||
|
||||
/**
|
||||
* 获取所有的菜单
|
||||
* @return 所有菜单
|
||||
*/
|
||||
List<MenuEO> findAll();
|
||||
|
||||
/**
|
||||
* 获取角色对应的所有菜单
|
||||
* @param roleId 角色ID
|
||||
* @return 角色对应的所有菜单
|
||||
*/
|
||||
List<MenuEO> listMenuEOByRoleID(String roleId);
|
||||
|
||||
/**
|
||||
* 获取用户的所有菜单
|
||||
* @param userId 用户ID
|
||||
* @return 用户的所有菜单
|
||||
*/
|
||||
List<MenuEO> listMenuEOByUserId(String userId);
|
||||
|
||||
/**
|
||||
* 获取当前节点的所有子节点
|
||||
* @param parentId 当前节点
|
||||
* @return 返回所有子节点
|
||||
*/
|
||||
List<MenuEO> getChildMenus(String parentId);
|
||||
|
||||
/**
|
||||
* 逻辑删除所有菜单
|
||||
* @param ids 菜单ID
|
||||
*/
|
||||
void deleteMenuLogic(String[] ids);
|
||||
|
||||
/**
|
||||
* 删除角色与当前菜单以及子菜单关系
|
||||
* @param ids
|
||||
*/
|
||||
void deleteRoleMenus(String[] ids);
|
||||
|
||||
/**
|
||||
* 判定菜单是否属于角色
|
||||
* @param roleId 角色ID
|
||||
* @param menuId 菜单ID
|
||||
* @return 如果>0说明存在记录,菜单属于角色
|
||||
*/
|
||||
int isBelong(@Param("roleId") String roleId, @Param("menuId") String menuId);
|
||||
|
||||
List<MenuEO> selectPersonalByUserId(String userId);
|
||||
|
||||
List<MenuEO> queryByAllMenu(MenuEOPage page);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,162 @@
|
||||
package com.adc.da.sys.dao;
|
||||
|
||||
import com.adc.da.sys.entity.OrgEO;
|
||||
import com.adc.da.sys.entity.UserOrgEO;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
public interface OrgEODao extends BaseMapper<OrgEO> {
|
||||
|
||||
public List<OrgEO> listOrgEOByOrgName(@Param("orgName") String orgName);
|
||||
|
||||
public OrgEO getOrgEOByNameAndPid(@Param("orgName") String orgName, @Param("pId") String pId);
|
||||
|
||||
//liwenxuan:判断组织机构名称不重复
|
||||
public OrgEO getOrgEOByorgNameAndPidAndId(@Param("orgName") String orgName, @Param("pId") String pId, @Param("id") String id);
|
||||
|
||||
//liwenxuan:判断组织机构简称不重复
|
||||
public OrgEO getOrgEOByShotNameAndPidAndId(@Param("shotName") String shotName, @Param("pId") String pId, @Param("id") String id);
|
||||
|
||||
|
||||
public List<OrgEO> getOrgEOByPid(@Param("pId") String pId);
|
||||
|
||||
public OrgEO getOrgEOById(String id);
|
||||
|
||||
public int deleteLogic(String id);
|
||||
|
||||
//获取根节点, pid 和 CORP_ID 为 null
|
||||
public LinkedList<OrgEO> selectOrgAllNode();
|
||||
|
||||
List<OrgEO> getChildDept(@Param("orgId") String orgId);
|
||||
|
||||
public LinkedList<OrgEO> selectRootNode();
|
||||
|
||||
public LinkedList<OrgEO> selectNodeByPid(String id);
|
||||
|
||||
public List<OrgEO> queryByObject(OrgEO eo);
|
||||
|
||||
public int delOrgRelatedUser(UserOrgEO userOrgEO);
|
||||
|
||||
public int addOrgRelatedUsers(List<UserOrgEO> userOrgEOs);
|
||||
|
||||
public int delOrgRelatedUserByUserId(String usId);
|
||||
|
||||
public int addOrgRelatedUser(UserOrgEO userOrgEO);
|
||||
|
||||
public int updateUserOrg(UserOrgEO userOrgEO);
|
||||
|
||||
public int deleteUserOrgByOrgId(String orgId);
|
||||
/***
|
||||
* SSO查询组织机构
|
||||
* @MethodName:getOrgListOfSSO
|
||||
* @author: zhangyanduan
|
||||
* @param:[]
|
||||
* @return:java.util.List<com.adc.da.sys.entity.OrgEO>
|
||||
* date: 2018/10/16 19:18
|
||||
*/
|
||||
public List<OrgEO> getOrgListOfSSO();
|
||||
|
||||
/***
|
||||
* 从SSO添加组织机构
|
||||
* @MethodName:addOrgOfSSO
|
||||
* @author: zhangyanduan
|
||||
* @param:[orgEO]
|
||||
* @return:void
|
||||
* date: 2018/10/16 19:19
|
||||
*/
|
||||
public void addOrgOfSSO(OrgEO orgEO);
|
||||
|
||||
/***
|
||||
* SSO更新组织机构
|
||||
* @MethodName:updateOrgOfSSO
|
||||
* @author: zhangyanduan
|
||||
* @param:[orgEO]
|
||||
* @return:void
|
||||
* date: 2018/10/16 20:42
|
||||
*/
|
||||
public void updateOrgOfSSO(OrgEO orgEO);
|
||||
|
||||
/**
|
||||
* @Author liwenxuan
|
||||
* @Description //根据角色名称,查找该角色的用户(用于流程中心)
|
||||
* @Date Administrator 2018/10/24
|
||||
* @Param [roleName]
|
||||
* @return java.lang.String
|
||||
**/
|
||||
public List<OrgEO> getTreeByRole1(String roleName);
|
||||
|
||||
/**
|
||||
* @Author liwenxuan
|
||||
* @Description //根据用户查找其组织结构,筛选出唯一的组织结构
|
||||
* @Date Administrator 2018/10/24
|
||||
* @Param
|
||||
* @return
|
||||
**/
|
||||
public List<OrgEO> getTreeByRole2(String roleName);
|
||||
|
||||
|
||||
// liwenxuan:1.查找该用户所在的组织结构,拿到parent_ids
|
||||
// liwenxuan:2.根据第一步返回的parent_ids,和id 组成list ,使用in查询,筛选组织结构
|
||||
// liwenxuan:3.根据2中获取的组织结构id,和角色名称roleName删选用户
|
||||
public OrgEO getLeaderByUserId1(String usId);
|
||||
public List<String> getLeaderByUserId2(@Param("orgType") String orgType, @Param("parentIds") List<String> parentIds);
|
||||
public List<OrgEO> getLeaderByUserId3(@Param("roleName") String roleName, @Param("id") String id);
|
||||
|
||||
|
||||
// liwenxuan:根据orgId获取其所在的组织结构
|
||||
public List<String> getTreeByRoleAndOrgId1(@Param("orgId") String orgId);
|
||||
//liwenxuan:根据parentIds获取当前组织结构树分支 此parentIds中封装了id
|
||||
public List<OrgEO> getTreeByRoleAndOrgId2(@Param("ids") List<String> ids);
|
||||
// liwenxuan:使用mybatis的foreach标签,遍历list
|
||||
public List<OrgEO> getTreeByRoleAndOrgId3(@Param("roleName") String roleName, @Param("orgEOList") List<OrgEO> orgEOList);
|
||||
|
||||
List<OrgEO> getManagerByOrgId(@Param("roleName") String roleName, @Param("orgId") String orgId);
|
||||
|
||||
//根据orgType查询部及以上组织结构
|
||||
public List<OrgEO> getIdsByorgType();
|
||||
/**
|
||||
* @Author gaoyan
|
||||
* @Description //根据不忙部门名称查询部门id
|
||||
* @Date Administrator 2018/10/24
|
||||
* @Param
|
||||
* @return
|
||||
**/
|
||||
public List<OrgEO> getIdByName(String orgName);
|
||||
|
||||
//liwenxuan:1.根据orgId,roleId查看用户
|
||||
public List<OrgEO> getLeaderByOrgIdAndRoleId(@Param("orgIds") List<String> orgIds);
|
||||
|
||||
//根据orgId查找所有组织结构
|
||||
public OrgEO getAllOrgbyOrgId(String orgId);
|
||||
|
||||
// 根据orgIds查询下面的用户集合
|
||||
public List<OrgEO> getLeaderByUserId4(@Param("id") List<String> id);
|
||||
|
||||
// 查找科级部门下的科级负责人,根据orgId和roleId确定是否有一个用户
|
||||
public OrgEO getHeadOfSection(@Param("orgId") String orgId, @Param("userId") String userId);
|
||||
|
||||
// 查找部门下的部门负责人,根据orgId和roleId确定是否有一个用户
|
||||
public OrgEO getDepartmentHeads(@Param("orgId") String orgId, @Param("userId") String userId);
|
||||
|
||||
// 根据SSOOrgId获取OrgEO对象
|
||||
public OrgEO getOrgInfoBySSOOrgId(String SSOOrgId);
|
||||
|
||||
|
||||
public void updateOrgOfSSOById(OrgEO orgEO);
|
||||
|
||||
List<OrgEO> queryOrgByList(@Param("orgName") String orgName);
|
||||
|
||||
List<OrgEO> getTreeByRole3(String roleId);
|
||||
|
||||
List<OrgEO> getTreeByRole4(String roleId);
|
||||
|
||||
public OrgEO getOrgInfoByOrgId(String OrgId);
|
||||
|
||||
public OrgEO getOrgParentInfoOrgId(OrgEO orgEO);
|
||||
|
||||
public List<OrgEO> getOrgRootTree();
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
package com.adc.da.sys.dao;
|
||||
|
||||
import com.adc.da.base.page.BasePage;
|
||||
import com.adc.da.sys.entity.RoleEO;
|
||||
import com.adc.da.sys.entity.UserRoleEO;
|
||||
import com.adc.da.sys.vo.RoleVO;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <br>
|
||||
* <b>功能:</b>TS_ROLE RoleEODao<br>
|
||||
* <b>作者:</b>code generator<br>
|
||||
* <b>日期:</b> 2017-11-06 <br>
|
||||
* <b>版权所有:<b>版权归北京卡达克数据技术中心所有。<br>
|
||||
*/
|
||||
public interface RoleEODao extends BaseMapper<RoleEO> {
|
||||
|
||||
List<RoleEO> queryByList(BasePage page);
|
||||
|
||||
int queryByCount(BasePage page);
|
||||
|
||||
List<RoleEO> queryByPage(BasePage page);
|
||||
|
||||
|
||||
public void save(RoleEO sysRoleEO);
|
||||
|
||||
public RoleEO getRoleWithMenus(String id);
|
||||
|
||||
public List<RoleEO> getRoleListByUserId(String userId);
|
||||
|
||||
public void deleteLogic(String roleId);
|
||||
|
||||
public void deleteRoleMenuByRoleId(String roleId);
|
||||
|
||||
public List<RoleEO> findAll(RoleVO roleVO);
|
||||
|
||||
/**
|
||||
* 查询角色所对应的用户
|
||||
*/
|
||||
public List<UserRoleEO> getUserRoleListByRoleId(String roleId);
|
||||
|
||||
public List<String> getMenuIdListByRoleId(String roleId);
|
||||
|
||||
public void saveRoleMenu(@Param("roleId") String roleId, @Param("menuId") String menuId);
|
||||
|
||||
/**
|
||||
* 判断角色是否属于相应用户
|
||||
*/
|
||||
public int isBelong(@Param("userId") String userId, @Param("roleId") String roleId);
|
||||
|
||||
public List<RoleEO> findByUserId(String userId);
|
||||
|
||||
/**
|
||||
* 通过用户名查询所有用户信息
|
||||
*/
|
||||
public List<RoleEO> selectByNameAndId(@Param("id") String id, @Param("name") String name);
|
||||
|
||||
/**
|
||||
* @return
|
||||
* @Author liwenxuan
|
||||
* @Description //根据角色id判断此角色对应的用户数量
|
||||
* @Date Administrator 2018/11/5
|
||||
* @Param
|
||||
**/
|
||||
public int countByRoleId(@Param("roleId") String roleId, @Param("userId") String userId);
|
||||
/**
|
||||
* @Author liwenxuan
|
||||
* @Description //所在组织组织机构下科级负责人和部门负责人的个数
|
||||
* @Date Administrator 2018/11/5
|
||||
* @Param
|
||||
* @return
|
||||
**/
|
||||
/*public int countByOrgId(String orgId);*/
|
||||
|
||||
//查找部门负责人和科级负责人
|
||||
public int countByRoleIdOfDepartmentAndSection(String roleId);
|
||||
//查找科级负责人
|
||||
public int querySectionCount(String roleId);
|
||||
//查找部门负责人
|
||||
public int querySectionCount1(String roleId);
|
||||
|
||||
public List<String> selectIdByNames(@Param("nameList") List<String> nameList);
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.adc.da.sys.dao;
|
||||
|
||||
import com.adc.da.base.page.BasePage;
|
||||
import com.adc.da.sys.entity.RoleSarMenuEO;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* <br>
|
||||
* <b>功能:</b>TS_ROLE_SAR_MENU RoleSarMenuEODao<br>
|
||||
* <b>作者:</b>code generator<br>
|
||||
* <b>日期:</b> 2019-02-19 <br>
|
||||
* <b>版权所有:<b>版权归北京卡达克数据技术中心所有。<br>
|
||||
*/
|
||||
public interface RoleSarMenuEODao extends BaseMapper<RoleSarMenuEO> {
|
||||
|
||||
List<RoleSarMenuEO> queryByList(BasePage page);
|
||||
|
||||
int queryByCount(BasePage page);
|
||||
|
||||
List<RoleSarMenuEO> queryByPage(BasePage page);
|
||||
|
||||
List<RoleSarMenuEO> findRoleSarMenu(String roleId);
|
||||
|
||||
String queryBusinessStandRootId(String sorDivide);
|
||||
|
||||
List<RoleSarMenuEO> selectSarMenuRoots();
|
||||
|
||||
int insertSubMenu(RoleSarMenuEO roleSarMenuEO);
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.adc.da.sys.dao;
|
||||
|
||||
|
||||
import com.adc.da.base.page.BasePage;
|
||||
import com.adc.da.sys.entity.LoginInfoEO;
|
||||
import com.adc.da.sys.entity.UserConfigEO;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* <br>
|
||||
* <b>功能:</b>TS_USER_CONFIG UserConfigEODao<br>
|
||||
* <b>作者:</b>code generator<br>
|
||||
* <b>日期:</b> 2018-09-03 <br>
|
||||
* <b>版权所有:<b>版权归北京卡达克数据技术中心所有。<br>
|
||||
*/
|
||||
public interface UserConfigEODao extends BaseMapper<UserConfigEO> {
|
||||
|
||||
List<UserConfigEO> queryByList(BasePage page);
|
||||
|
||||
int queryByCount(BasePage page);
|
||||
|
||||
List<UserConfigEO> queryByPage(BasePage page);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,163 @@
|
||||
package com.adc.da.sys.dao;
|
||||
|
||||
import com.adc.da.base.page.BasePage;
|
||||
import com.adc.da.sys.entity.UserEO;
|
||||
import com.adc.da.sys.page.UserEOPage;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* <br>
|
||||
* <b>功能:</b>TS_USER UserEODao<br>
|
||||
* <b>作者:</b>code generator<br>
|
||||
* <b>日期:</b> 2017-12-18 <br>
|
||||
* <b>版权所有:<b>版权归北京卡达克数据技术中心所有。<br>
|
||||
*/
|
||||
public interface UserEODao extends BaseMapper<UserEO> {
|
||||
|
||||
public void updatePassword(@Param("usid") String usid, @Param("oldPassword") String oldPassword,
|
||||
@Param("newPassword") String newPassword);
|
||||
|
||||
public void updateUserEO(UserEO userEO);
|
||||
|
||||
public List<Integer> getRoleIdListByUserId(Integer usid);
|
||||
|
||||
public void saveUserRole(@Param("usid") String usid, @Param("roleId") String roleId);
|
||||
|
||||
public void saveUserOrg(@Param("usid") String usid, @Param("orgId") String orgId);
|
||||
|
||||
public int queryByCount(BasePage queryPage);
|
||||
|
||||
public List<UserEO> queryByPage(BasePage queryPage);
|
||||
|
||||
/***
|
||||
* 用户管理查询分页
|
||||
* @MethodName:queryUserInfoByCount
|
||||
* @author: zhangyanduan
|
||||
* @param:[basePage]
|
||||
* @return:int
|
||||
* date: 2018/9/15 15:59
|
||||
*/
|
||||
public int queryUserInfoByCount(BasePage basePage);
|
||||
|
||||
public List<UserEO> queryUserInfoByPage(BasePage basePage);
|
||||
|
||||
/**
|
||||
* 物理删除用户角色关联
|
||||
*
|
||||
* @param usid
|
||||
* 用户ID
|
||||
*/
|
||||
public void deleteUserRoleByUsid(String usid);
|
||||
/**
|
||||
* 物理删除用户组织机构关联
|
||||
*
|
||||
* @param usid
|
||||
* 用户ID
|
||||
*/
|
||||
public void deleteUserOrgByUsid(String usid);
|
||||
|
||||
public int deleteLogicInBatch(List<String> usids);
|
||||
|
||||
/**
|
||||
* 批量删除用户角色关联
|
||||
*
|
||||
* @param usids
|
||||
* 用户ID集合
|
||||
*/
|
||||
public int deleteUserRoleByUsidInBatch(List<String> usids);
|
||||
|
||||
/**
|
||||
* 批量删除用户组织机构关联
|
||||
*
|
||||
* @param usids
|
||||
* 用户ID集合
|
||||
*/
|
||||
public int deleteUserOrgByUsidInBatch(List<String> usids);
|
||||
|
||||
public UserEO getUserEOByAccount(@Param("account") String account, @Param("usid") String usid);
|
||||
|
||||
/**
|
||||
* 查询用户及用户所对应的角色
|
||||
*/
|
||||
public UserEO getUserWithRoles(String id);
|
||||
|
||||
public UserEO getUserWithRolesAll(String id);
|
||||
|
||||
public UserEO get(String id);
|
||||
|
||||
/**
|
||||
* 根据当前登录用户id查询个人信息及部门
|
||||
* @param usid
|
||||
* @return
|
||||
*/
|
||||
UserEO selectOrgByPrimaryKey(String usid);
|
||||
|
||||
Integer selectOrgCountByPrimaryKey(String usid);
|
||||
|
||||
UserEO selectRoleMessageByPrimaryKey(String usid);
|
||||
|
||||
public List<UserEO> queryByOrg(BasePage basePage);
|
||||
|
||||
public UserEO selectByUnameAndPwd(UserEO userEO);
|
||||
public int queryByOrgCount(BasePage basePage);
|
||||
|
||||
public int updatePasswordByPrimaryKey(UserEO userEO);
|
||||
|
||||
//liwenxuan:查找未分配组织结构的用户的行数
|
||||
public int findBySetOrgCount(BasePage basePage);
|
||||
//liwenxuan:查询未分配组织机构人员信息
|
||||
public List<UserEO> findBySetOrg(BasePage basePage);
|
||||
|
||||
List<String> selectThatOrgUser(String orgId);
|
||||
|
||||
String selectOrgByUserId(String userId);
|
||||
|
||||
List<UserEO> queryUserEoList(UserEOPage page);
|
||||
/***
|
||||
* 添加SSO来源用户
|
||||
* @MethodName:addSSOUser
|
||||
* @author: zhangyanduan
|
||||
* @param:[userEO]
|
||||
* @return:void
|
||||
* date: 2018/10/23 20:17
|
||||
*/
|
||||
public void addSSOUser(UserEO userEO);
|
||||
/***
|
||||
* 根据工号查询用户信息
|
||||
* @MethodName:selectUserByWorkNum
|
||||
* @author: zhangyanduan
|
||||
* @param:[workNum]
|
||||
* @return:java.util.List<com.adc.da.sys.entity.UserEO>
|
||||
* date: 2018/10/25 16:20
|
||||
*/
|
||||
public List<UserEO> selectUserByWorkNum(String workNum);
|
||||
|
||||
/***
|
||||
* 根据对接ID获取用户信息
|
||||
* @MethodName:getUserBySSOId
|
||||
* @author: DuYunbao
|
||||
* @param:[ssoId]
|
||||
* @return:com.adc.da.sys.entity.UserEO
|
||||
* date: 2018/11/1 21:23
|
||||
*/
|
||||
public List<UserEO> getUserBySSOId(String ssoId);
|
||||
|
||||
public List<UserEO> getUserListByRoleName(String RoleName);
|
||||
//根据角色id查询用户信息
|
||||
public List<UserEO> getUserListByUserId(String userId);
|
||||
|
||||
public List<UserEO> getUserEOBySpecRole(@Param("orgId") String orgId, @Param("userId") String userId);
|
||||
|
||||
public List<UserEO> selectAllUserInfoBySSO();
|
||||
|
||||
//根据用户id查部门id
|
||||
public UserEO getOrgIdByUserId(String userId);
|
||||
|
||||
public UserEO getUserEOByAccountNotDeleted(String account);
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package com.adc.da.sys.dao;
|
||||
|
||||
import com.adc.da.base.page.BasePage;
|
||||
import com.adc.da.sys.entity.UserEO;
|
||||
import com.adc.da.sys.entity.UserInfoEO;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* <br>
|
||||
* <b>功能:</b>TS_USER_INFO UserInfoEODao<br>
|
||||
* <b>作者:</b>code generator<br>
|
||||
* <b>日期:</b> 2018-09-03 <br>
|
||||
* <b>版权所有:<b>版权归北京卡达克数据技术中心所有。<br>
|
||||
*/
|
||||
public interface UserInfoEODao extends BaseMapper<UserInfoEO> {
|
||||
|
||||
List<UserInfoEO> queryByList(BasePage page);
|
||||
|
||||
int queryByCount(BasePage page);
|
||||
|
||||
List<UserInfoEO> queryByPage(BasePage page);
|
||||
|
||||
|
||||
UserInfoEO getUserInfoByUserId(UserInfoEO userInfo);
|
||||
|
||||
|
||||
int updateByUserId(UserInfoEO userId);
|
||||
|
||||
// liwenxuan:修改用户详细信息
|
||||
int updateByPrimaryKey(UserInfoEO userInfoEO);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.adc.da.sys.dao;
|
||||
|
||||
import com.adc.da.sys.entity.UserRoleEO;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
*
|
||||
* <br>
|
||||
* <b>功能:</b>TR_USER_ROLE UserRoleEODao<br>
|
||||
* <b>作者:</b>code generator<br>
|
||||
* <b>日期:</b> 2017-11-07 <br>
|
||||
* <b>版权所有:<b>版权归北京卡达克数据技术中心所有。<br>
|
||||
*/
|
||||
public interface UserRoleEODao extends BaseMapper<UserRoleEO> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.adc.da.sys.dao;
|
||||
|
||||
import com.adc.da.base.page.BasePage;
|
||||
import com.adc.da.sys.entity.WarnTimeEO;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* <br>
|
||||
* <b>功能:</b>TS_WARN_TIME WarnTimeEODao<br>
|
||||
* <b>作者:</b>code generator<br>
|
||||
* <b>日期:</b> 2018-09-17 <br>
|
||||
* <b>版权所有:<b>版权归北京卡达克数据技术中心所有。<br>
|
||||
*/
|
||||
public interface WarnTimeEODao extends BaseMapper<WarnTimeEO> {
|
||||
List<WarnTimeEO> queryByList(BasePage page);
|
||||
|
||||
int queryByCount(BasePage page);
|
||||
|
||||
List<WarnTimeEO> queryByPage(BasePage page);
|
||||
}
|
||||
@@ -0,0 +1,236 @@
|
||||
package com.adc.da.sys.entity;
|
||||
|
||||
import com.adc.da.base.entity.BaseEntity;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
/**
|
||||
* <b>功能:</b>TS_DICTYPE DictypeEOEntity<br>
|
||||
* <b>作者:</b>code generator<br>
|
||||
* <b>日期:</b> 2018-09-03 <br>
|
||||
* <b>版权所有:<b>版权归北京卡达克数据技术中心所有。<br>
|
||||
*/
|
||||
public class DicTypeEO extends BaseEntity {
|
||||
|
||||
private Integer validFlag;
|
||||
private String parentId;
|
||||
private String dicTypeCode;
|
||||
private String dicTypeName;
|
||||
private String dicId;
|
||||
private String id;
|
||||
private String describes;
|
||||
private Integer showIndex;
|
||||
private String addCountrySortFlag;
|
||||
|
||||
// 新增字段
|
||||
private Date creationTime;
|
||||
private Date modifyTime;
|
||||
|
||||
private String classifyCode;
|
||||
private String classifyCodeId;
|
||||
|
||||
//新增字段用于存储企业细类父ID
|
||||
private String businessParentId;
|
||||
private String treePid;
|
||||
private String others;
|
||||
private String creationUser;
|
||||
|
||||
|
||||
/**
|
||||
* java字段名转换为原始数据库列名。<b>如果不存在则返回null</b><br>
|
||||
* <p>字段列表:</p>
|
||||
* <li>validFlag -> valid_flag</li>
|
||||
* <li>parentId -> parent_id</li>
|
||||
* <li>dicTypeCode -> dic_type_code</li>
|
||||
* <li>dicTypeName -> dic_type_name</li>
|
||||
* <li>dicId -> dic_id</li>
|
||||
* <li>id -> id</li>
|
||||
*/
|
||||
public static String fieldToColumn(String fieldName) {
|
||||
if (fieldName == null){ return null;}
|
||||
switch (fieldName) {
|
||||
case "showIndex": return "show_index";
|
||||
case "validFlag": return "valid_flag";
|
||||
case "parentId": return "parent_id";
|
||||
case "dicTypeCode": return "dic_type_code";
|
||||
case "dicTypeName": return "dic_type_name";
|
||||
case "dicId": return "dic_id";
|
||||
case "id": return "id";
|
||||
default: return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 原始数据库列名转换为java字段名。<b>如果不存在则返回null</b><br>
|
||||
* <p>字段列表:</p>
|
||||
* <li>valid_flag -> validFlag</li>
|
||||
* <li>parent_id -> parentId</li>
|
||||
* <li>dic_type_code -> dicTypeCode</li>
|
||||
* <li>dic_type_name -> dicTypeName</li>
|
||||
* <li>dic_id -> dicId</li>
|
||||
* <li>id -> id</li>
|
||||
*/
|
||||
public static String columnToField(String columnName) {
|
||||
if (columnName == null){ return null;}
|
||||
switch (columnName) {
|
||||
case "show_index": return "showIndex";
|
||||
case "valid_flag": return "validFlag";
|
||||
case "parent_id": return "parentId";
|
||||
case "dic_type_code": return "dicTypeCode";
|
||||
case "dic_type_name": return "dicTypeName";
|
||||
case "dic_id": return "dicId";
|
||||
case "id": return "id";
|
||||
default: return null;
|
||||
}
|
||||
}
|
||||
|
||||
/** **/
|
||||
public Integer getValidFlag() {
|
||||
return this.validFlag;
|
||||
}
|
||||
|
||||
/** **/
|
||||
public void setValidFlag(Integer validFlag) {
|
||||
this.validFlag = validFlag;
|
||||
}
|
||||
|
||||
/** **/
|
||||
public String getParentId() {
|
||||
return this.parentId;
|
||||
}
|
||||
|
||||
/** **/
|
||||
public void setParentId(String parentId) {
|
||||
this.parentId = parentId;
|
||||
}
|
||||
|
||||
/** **/
|
||||
public String getDicTypeCode() {
|
||||
return this.dicTypeCode;
|
||||
}
|
||||
|
||||
/** **/
|
||||
public void setDicTypeCode(String dicTypeCode) {
|
||||
this.dicTypeCode = dicTypeCode;
|
||||
}
|
||||
|
||||
/** **/
|
||||
public String getDicTypeName() {
|
||||
return this.dicTypeName;
|
||||
}
|
||||
|
||||
/** **/
|
||||
public void setDicTypeName(String dicTypeName) {
|
||||
this.dicTypeName = dicTypeName;
|
||||
}
|
||||
|
||||
/** **/
|
||||
public String getDicId() {
|
||||
return this.dicId;
|
||||
}
|
||||
|
||||
/** **/
|
||||
public void setDicId(String dicId) {
|
||||
this.dicId = dicId;
|
||||
}
|
||||
|
||||
/** **/
|
||||
public String getId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
/** **/
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
|
||||
public Date getCreationTime() {
|
||||
return creationTime;
|
||||
}
|
||||
|
||||
public void setCreationTime(Date creationTime) {
|
||||
this.creationTime = creationTime;
|
||||
}
|
||||
|
||||
public Date getModifyTime() {
|
||||
return modifyTime;
|
||||
}
|
||||
|
||||
public void setModifyTime(Date modifyTime) {
|
||||
this.modifyTime = modifyTime;
|
||||
}
|
||||
|
||||
public String getDescribes() {
|
||||
return describes;
|
||||
}
|
||||
|
||||
public void setDescribes(String describes) {
|
||||
this.describes = describes;
|
||||
}
|
||||
|
||||
public String getClassifyCode() {
|
||||
return classifyCode;
|
||||
}
|
||||
|
||||
public void setClassifyCode(String classifyCode) {
|
||||
this.classifyCode = classifyCode;
|
||||
}
|
||||
|
||||
public String getClassifyCodeId() {
|
||||
return classifyCodeId;
|
||||
}
|
||||
|
||||
public void setClassifyCodeId(String classifyCodeId) {
|
||||
this.classifyCodeId = classifyCodeId;
|
||||
}
|
||||
|
||||
public Integer getShowIndex() {
|
||||
return showIndex;
|
||||
}
|
||||
|
||||
public void setShowIndex(Integer showIndex) {
|
||||
this.showIndex = showIndex;
|
||||
}
|
||||
|
||||
public String getAddCountrySortFlag() {
|
||||
return addCountrySortFlag;
|
||||
}
|
||||
|
||||
public void setAddCountrySortFlag(String addCountrySortFlag) {
|
||||
this.addCountrySortFlag = addCountrySortFlag;
|
||||
}
|
||||
|
||||
public String getBusinessParentId() {
|
||||
return businessParentId;
|
||||
}
|
||||
|
||||
public void setBusinessParentId(String businessParentId) {
|
||||
this.businessParentId = businessParentId;
|
||||
}
|
||||
|
||||
public String getTreePid() {
|
||||
return treePid;
|
||||
}
|
||||
|
||||
public void setTreePid(String treePid) {
|
||||
this.treePid = treePid;
|
||||
}
|
||||
|
||||
public String getOthers() {
|
||||
return others;
|
||||
}
|
||||
|
||||
public void setOthers(String others) {
|
||||
this.others = others;
|
||||
}
|
||||
|
||||
public String getCreationUser() {
|
||||
return creationUser;
|
||||
}
|
||||
|
||||
public void setCreationUser(String creationUser) {
|
||||
this.creationUser = creationUser;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,186 @@
|
||||
package com.adc.da.sys.entity;
|
||||
|
||||
import com.adc.da.base.entity.BaseEntity;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* <b>功能:</b>TS_DICTIONARY DictionaryEOEntity<br>
|
||||
* <b>作者:</b>code generator<br>
|
||||
* <b>日期:</b> 2018-09-03 <br>
|
||||
* <b>版权所有:<b>版权归北京卡达克数据技术中心所有。<br>
|
||||
*/
|
||||
public class DictionaryEO extends BaseEntity {
|
||||
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date modifyTime;
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date creationTime;
|
||||
private String validFlag;
|
||||
private String dictionaryName;
|
||||
private String dictionaryCode;
|
||||
private String id;
|
||||
private Integer orderNum;
|
||||
private String enable;
|
||||
private String dictionType;
|
||||
private String creationUser;
|
||||
private String isRelate;
|
||||
private String relateDicId;
|
||||
|
||||
/**
|
||||
* java字段名转换为原始数据库列名。<b>如果不存在则返回null</b><br>
|
||||
* <p>字段列表:</p>
|
||||
* <li>modifyTime -> modify_time</li>
|
||||
* <li>creationTime -> creation_time</li>
|
||||
* <li>validFlag -> valid_flag</li>
|
||||
* <li>dictionarySeq -> dictionary_seq</li>
|
||||
* <li>dictionaryName -> dictionary_name</li>
|
||||
* <li>dictionaryCode -> dictionary_code</li>
|
||||
* <li>id -> id</li>
|
||||
*/
|
||||
public static String fieldToColumn(String fieldName) {
|
||||
if (fieldName == null){ return null;}
|
||||
switch (fieldName) {
|
||||
case "modifyTime": return "modify_time";
|
||||
case "creationTime": return "creation_time";
|
||||
case "validFlag": return "valid_flag";
|
||||
case "dictionarySeq": return "dictionary_seq";
|
||||
case "dictionaryName": return "dictionary_name";
|
||||
case "dictionaryCode": return "dictionary_code";
|
||||
case "id": return "id";
|
||||
default: return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 原始数据库列名转换为java字段名。<b>如果不存在则返回null</b><br>
|
||||
* <p>字段列表:</p>
|
||||
* <li>modify_time -> modifyTime</li>
|
||||
* <li>creation_time -> creationTime</li>
|
||||
* <li>valid_flag -> validFlag</li>
|
||||
* <li>dictionary_seq -> dictionarySeq</li>
|
||||
* <li>dictionary_name -> dictionaryName</li>
|
||||
* <li>dictionary_code -> dictionaryCode</li>
|
||||
* <li>id -> id</li>
|
||||
*/
|
||||
public static String columnToField(String columnName) {
|
||||
if (columnName == null){ return null;}
|
||||
switch (columnName) {
|
||||
case "modify_time": return "modifyTime";
|
||||
case "creation_time": return "creationTime";
|
||||
case "valid_flag": return "validFlag";
|
||||
case "dictionary_seq": return "dictionarySeq";
|
||||
case "dictionary_name": return "dictionaryName";
|
||||
case "dictionary_code": return "dictionaryCode";
|
||||
case "id": return "id";
|
||||
default: return null;
|
||||
}
|
||||
}
|
||||
|
||||
/** **/
|
||||
public Date getModifyTime() {
|
||||
return this.modifyTime;
|
||||
}
|
||||
|
||||
/** **/
|
||||
public void setModifyTime(Date modifyTime) {
|
||||
this.modifyTime = modifyTime;
|
||||
}
|
||||
|
||||
/** **/
|
||||
public Date getCreationTime() {
|
||||
return this.creationTime;
|
||||
}
|
||||
|
||||
/** **/
|
||||
public void setCreationTime(Date creationTime) {
|
||||
this.creationTime = creationTime;
|
||||
}
|
||||
|
||||
public String getValidFlag() {
|
||||
return validFlag;
|
||||
}
|
||||
|
||||
public void setValidFlag(String validFlag) {
|
||||
this.validFlag = validFlag;
|
||||
}
|
||||
|
||||
/** **/
|
||||
public String getDictionaryName() {
|
||||
return this.dictionaryName;
|
||||
}
|
||||
|
||||
/** **/
|
||||
public void setDictionaryName(String dictionaryName) {
|
||||
this.dictionaryName = dictionaryName;
|
||||
}
|
||||
|
||||
/** **/
|
||||
public String getDictionaryCode() {
|
||||
return this.dictionaryCode;
|
||||
}
|
||||
|
||||
/** **/
|
||||
public void setDictionaryCode(String dictionaryCode) {
|
||||
this.dictionaryCode = dictionaryCode;
|
||||
}
|
||||
|
||||
/** **/
|
||||
public String getId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
/** **/
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Integer getOrderNum() {
|
||||
return orderNum;
|
||||
}
|
||||
|
||||
public void setOrderNum(Integer orderNum) {
|
||||
this.orderNum = orderNum;
|
||||
}
|
||||
|
||||
public String getEnable() {
|
||||
return enable;
|
||||
}
|
||||
|
||||
public void setEnable(String enable) {
|
||||
this.enable = enable;
|
||||
}
|
||||
|
||||
public String getDictionType() {
|
||||
return dictionType;
|
||||
}
|
||||
|
||||
public void setDictionType(String dictionType) {
|
||||
this.dictionType = dictionType;
|
||||
}
|
||||
|
||||
public String getCreationUser() {
|
||||
return creationUser;
|
||||
}
|
||||
|
||||
public void setCreationUser(String creationUser) {
|
||||
this.creationUser = creationUser;
|
||||
}
|
||||
|
||||
public String getIsRelate() {
|
||||
return isRelate;
|
||||
}
|
||||
|
||||
public void setIsRelate(String isRelate) {
|
||||
this.isRelate = isRelate;
|
||||
}
|
||||
|
||||
public String getRelateDicId() {
|
||||
return relateDicId;
|
||||
}
|
||||
|
||||
public void setRelateDicId(String relateDicId) {
|
||||
this.relateDicId = relateDicId;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,149 @@
|
||||
package com.adc.da.sys.page;
|
||||
|
||||
import com.adc.da.base.page.BasePage;
|
||||
|
||||
|
||||
/**
|
||||
* <b>功能:</b>TS_DICTYPE DictypeEOPage<br>
|
||||
* <b>作者:</b>code generator<br>
|
||||
* <b>日期:</b> 2018-09-03 <br>
|
||||
* <b>版权所有:<b>版权归北京卡达克数据技术中心所有。<br>
|
||||
*/
|
||||
public class DicTypeEOPage extends BasePage {
|
||||
|
||||
private String validFlag;
|
||||
private String validFlagOperator = "like";
|
||||
private String parentId;
|
||||
private String parentIdOperator = "like";
|
||||
private String dicTypeCode;
|
||||
private String dicTypeCodeOperator = "=";
|
||||
private String dicTypeName;
|
||||
private String dicTypeNameOperator = "like";
|
||||
private String dicId;
|
||||
private String dicIdOperator = "like";
|
||||
private String id;
|
||||
private String idOperator = "like";
|
||||
private String describes;
|
||||
private String describesOperator = "like";
|
||||
private Integer showIndex;
|
||||
|
||||
public String getValidFlag() {
|
||||
return this.validFlag;
|
||||
}
|
||||
|
||||
public void setValidFlag(String validFlag) {
|
||||
this.validFlag = validFlag;
|
||||
}
|
||||
|
||||
public String getValidFlagOperator() {
|
||||
return this.validFlagOperator;
|
||||
}
|
||||
|
||||
public void setValidFlagOperator(String validFlagOperator) {
|
||||
this.validFlagOperator = validFlagOperator;
|
||||
}
|
||||
|
||||
public String getParentId() {
|
||||
return this.parentId;
|
||||
}
|
||||
|
||||
public void setParentId(String parentId) {
|
||||
this.parentId = parentId;
|
||||
}
|
||||
|
||||
public String getParentIdOperator() {
|
||||
return this.parentIdOperator;
|
||||
}
|
||||
|
||||
public void setParentIdOperator(String parentIdOperator) {
|
||||
this.parentIdOperator = parentIdOperator;
|
||||
}
|
||||
|
||||
public String getDicTypeCode() {
|
||||
return this.dicTypeCode;
|
||||
}
|
||||
|
||||
public void setDicTypeCode(String dicTypeCode) {
|
||||
this.dicTypeCode = dicTypeCode;
|
||||
}
|
||||
|
||||
public String getDicTypeCodeOperator() {
|
||||
return this.dicTypeCodeOperator;
|
||||
}
|
||||
|
||||
public void setDicTypeCodeOperator(String dicTypeCodeOperator) {
|
||||
this.dicTypeCodeOperator = dicTypeCodeOperator;
|
||||
}
|
||||
|
||||
public String getDicTypeName() {
|
||||
return this.dicTypeName;
|
||||
}
|
||||
|
||||
public void setDicTypeName(String dicTypeName) {
|
||||
this.dicTypeName = dicTypeName;
|
||||
}
|
||||
|
||||
public String getDicTypeNameOperator() {
|
||||
return this.dicTypeNameOperator;
|
||||
}
|
||||
|
||||
public void setDicTypeNameOperator(String dicTypeNameOperator) {
|
||||
this.dicTypeNameOperator = dicTypeNameOperator;
|
||||
}
|
||||
|
||||
public String getDicId() {
|
||||
return this.dicId;
|
||||
}
|
||||
|
||||
public void setDicId(String dicId) {
|
||||
this.dicId = dicId;
|
||||
}
|
||||
|
||||
public String getDicIdOperator() {
|
||||
return this.dicIdOperator;
|
||||
}
|
||||
|
||||
public void setDicIdOperator(String dicIdOperator) {
|
||||
this.dicIdOperator = dicIdOperator;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getIdOperator() {
|
||||
return this.idOperator;
|
||||
}
|
||||
|
||||
public void setIdOperator(String idOperator) {
|
||||
this.idOperator = idOperator;
|
||||
}
|
||||
|
||||
public String getDescribes() {
|
||||
return describes;
|
||||
}
|
||||
|
||||
public void setDescribes(String describes) {
|
||||
this.describes = describes;
|
||||
}
|
||||
|
||||
public String getDescribesOperator() {
|
||||
return describesOperator;
|
||||
}
|
||||
|
||||
public void setDescribesOperator(String describesOperator) {
|
||||
this.describesOperator = describesOperator;
|
||||
}
|
||||
|
||||
public Integer getShowIndex() {
|
||||
return showIndex;
|
||||
}
|
||||
|
||||
public void setShowIndex(Integer showIndex) {
|
||||
this.showIndex = showIndex;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,185 @@
|
||||
package com.adc.da.sys.page;
|
||||
|
||||
|
||||
import com.adc.da.base.page.BasePage;
|
||||
|
||||
/**
|
||||
* <b>功能:</b>TS_DICTIONARY DictionaryEOPage<br>
|
||||
* <b>作者:</b>code generator<br>
|
||||
* <b>日期:</b> 2018-09-03 <br>
|
||||
* <b>版权所有:<b>版权归北京卡达克数据技术中心所有。<br>
|
||||
*/
|
||||
public class DictionaryEOPage extends BasePage {
|
||||
|
||||
private String modifyTime;
|
||||
private String modifyTime1;
|
||||
private String modifyTime2;
|
||||
private String modifyTimeOperator = "=";
|
||||
private String creationTime;
|
||||
private String creationTime1;
|
||||
private String creationTime2;
|
||||
private String creationTimeOperator = "=";
|
||||
private String validFlag;
|
||||
private String validFlagOperator = "=";
|
||||
private String dictionarySeq;
|
||||
private String dictionarySeqOperator = "=";
|
||||
private String dictionaryName;
|
||||
private String dictionaryNameOperator = "=";
|
||||
private String dictionaryCode;
|
||||
private String dictionaryCodeOperator = "=";
|
||||
private String id;
|
||||
private String idOperator = "=";
|
||||
private String notId;
|
||||
|
||||
public String getModifyTime() {
|
||||
return this.modifyTime;
|
||||
}
|
||||
|
||||
public void setModifyTime(String modifyTime) {
|
||||
this.modifyTime = modifyTime;
|
||||
}
|
||||
|
||||
public String getModifyTime1() {
|
||||
return this.modifyTime1;
|
||||
}
|
||||
|
||||
public void setModifyTime1(String modifyTime1) {
|
||||
this.modifyTime1 = modifyTime1;
|
||||
}
|
||||
|
||||
public String getModifyTime2() {
|
||||
return this.modifyTime2;
|
||||
}
|
||||
|
||||
public void setModifyTime2(String modifyTime2) {
|
||||
this.modifyTime2 = modifyTime2;
|
||||
}
|
||||
|
||||
public String getModifyTimeOperator() {
|
||||
return this.modifyTimeOperator;
|
||||
}
|
||||
|
||||
public void setModifyTimeOperator(String modifyTimeOperator) {
|
||||
this.modifyTimeOperator = modifyTimeOperator;
|
||||
}
|
||||
|
||||
public String getCreationTime() {
|
||||
return this.creationTime;
|
||||
}
|
||||
|
||||
public void setCreationTime(String creationTime) {
|
||||
this.creationTime = creationTime;
|
||||
}
|
||||
|
||||
public String getCreationTime1() {
|
||||
return this.creationTime1;
|
||||
}
|
||||
|
||||
public void setCreationTime1(String creationTime1) {
|
||||
this.creationTime1 = creationTime1;
|
||||
}
|
||||
|
||||
public String getCreationTime2() {
|
||||
return this.creationTime2;
|
||||
}
|
||||
|
||||
public void setCreationTime2(String creationTime2) {
|
||||
this.creationTime2 = creationTime2;
|
||||
}
|
||||
|
||||
public String getCreationTimeOperator() {
|
||||
return this.creationTimeOperator;
|
||||
}
|
||||
|
||||
public void setCreationTimeOperator(String creationTimeOperator) {
|
||||
this.creationTimeOperator = creationTimeOperator;
|
||||
}
|
||||
|
||||
public String getValidFlag() {
|
||||
return this.validFlag;
|
||||
}
|
||||
|
||||
public void setValidFlag(String validFlag) {
|
||||
this.validFlag = validFlag;
|
||||
}
|
||||
|
||||
public String getValidFlagOperator() {
|
||||
return this.validFlagOperator;
|
||||
}
|
||||
|
||||
public void setValidFlagOperator(String validFlagOperator) {
|
||||
this.validFlagOperator = validFlagOperator;
|
||||
}
|
||||
|
||||
public String getDictionarySeq() {
|
||||
return this.dictionarySeq;
|
||||
}
|
||||
|
||||
public void setDictionarySeq(String dictionarySeq) {
|
||||
this.dictionarySeq = dictionarySeq;
|
||||
}
|
||||
|
||||
public String getDictionarySeqOperator() {
|
||||
return this.dictionarySeqOperator;
|
||||
}
|
||||
|
||||
public void setDictionarySeqOperator(String dictionarySeqOperator) {
|
||||
this.dictionarySeqOperator = dictionarySeqOperator;
|
||||
}
|
||||
|
||||
public String getDictionaryName() {
|
||||
return this.dictionaryName;
|
||||
}
|
||||
|
||||
public void setDictionaryName(String dictionaryName) {
|
||||
this.dictionaryName = dictionaryName;
|
||||
}
|
||||
|
||||
public String getDictionaryNameOperator() {
|
||||
return this.dictionaryNameOperator;
|
||||
}
|
||||
|
||||
public void setDictionaryNameOperator(String dictionaryNameOperator) {
|
||||
this.dictionaryNameOperator = dictionaryNameOperator;
|
||||
}
|
||||
|
||||
public String getDictionaryCode() {
|
||||
return this.dictionaryCode;
|
||||
}
|
||||
|
||||
public void setDictionaryCode(String dictionaryCode) {
|
||||
this.dictionaryCode = dictionaryCode;
|
||||
}
|
||||
|
||||
public String getDictionaryCodeOperator() {
|
||||
return this.dictionaryCodeOperator;
|
||||
}
|
||||
|
||||
public void setDictionaryCodeOperator(String dictionaryCodeOperator) {
|
||||
this.dictionaryCodeOperator = dictionaryCodeOperator;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getIdOperator() {
|
||||
return this.idOperator;
|
||||
}
|
||||
|
||||
public void setIdOperator(String idOperator) {
|
||||
this.idOperator = idOperator;
|
||||
}
|
||||
|
||||
public String getNotId() {
|
||||
return notId;
|
||||
}
|
||||
|
||||
public void setNotId(String notId) {
|
||||
this.notId = notId;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,266 @@
|
||||
package com.adc.da.sys.page;
|
||||
|
||||
import com.adc.da.base.page.BasePage;
|
||||
|
||||
/**
|
||||
* <b>功能:</b>TS_MENU MenuEOPage<br>
|
||||
* <b>作者:</b>code generator<br>
|
||||
* <b>日期:</b> 2018-09-03 <br>
|
||||
* <b>版权所有:<b>版权归北京卡达克数据技术中心所有。<br>
|
||||
*/
|
||||
public class MenuEOPage extends BasePage {
|
||||
|
||||
private String modifyTime;
|
||||
private String modifyTime1;
|
||||
private String modifyTime2;
|
||||
private String modifyTimeOperator = "=";
|
||||
private String creationTime;
|
||||
private String creationTime1;
|
||||
private String creationTime2;
|
||||
private String creationTimeOperator = "=";
|
||||
private String validFlag;
|
||||
private String validFlagOperator = "=";
|
||||
private String remarks;
|
||||
private String remarksOperator = "=";
|
||||
private String permission;
|
||||
private String permissionOperator = "=";
|
||||
private String isShow;
|
||||
private String isShowOperator = "=";
|
||||
private String icon;
|
||||
private String iconOperator = "=";
|
||||
private String href;
|
||||
private String hrefOperator = "=";
|
||||
private String parentIds;
|
||||
private String parentIdsOperator = "=";
|
||||
private String parentId;
|
||||
private String parentIdOperator = "=";
|
||||
private String name;
|
||||
private String nameOperator = "=";
|
||||
private String id;
|
||||
private String idOperator = "=";
|
||||
|
||||
public String getModifyTime() {
|
||||
return this.modifyTime;
|
||||
}
|
||||
|
||||
public void setModifyTime(String modifyTime) {
|
||||
this.modifyTime = modifyTime;
|
||||
}
|
||||
|
||||
public String getModifyTime1() {
|
||||
return this.modifyTime1;
|
||||
}
|
||||
|
||||
public void setModifyTime1(String modifyTime1) {
|
||||
this.modifyTime1 = modifyTime1;
|
||||
}
|
||||
|
||||
public String getModifyTime2() {
|
||||
return this.modifyTime2;
|
||||
}
|
||||
|
||||
public void setModifyTime2(String modifyTime2) {
|
||||
this.modifyTime2 = modifyTime2;
|
||||
}
|
||||
|
||||
public String getModifyTimeOperator() {
|
||||
return this.modifyTimeOperator;
|
||||
}
|
||||
|
||||
public void setModifyTimeOperator(String modifyTimeOperator) {
|
||||
this.modifyTimeOperator = modifyTimeOperator;
|
||||
}
|
||||
|
||||
public String getCreationTime() {
|
||||
return this.creationTime;
|
||||
}
|
||||
|
||||
public void setCreationTime(String creationTime) {
|
||||
this.creationTime = creationTime;
|
||||
}
|
||||
|
||||
public String getCreationTime1() {
|
||||
return this.creationTime1;
|
||||
}
|
||||
|
||||
public void setCreationTime1(String creationTime1) {
|
||||
this.creationTime1 = creationTime1;
|
||||
}
|
||||
|
||||
public String getCreationTime2() {
|
||||
return this.creationTime2;
|
||||
}
|
||||
|
||||
public void setCreationTime2(String creationTime2) {
|
||||
this.creationTime2 = creationTime2;
|
||||
}
|
||||
|
||||
public String getCreationTimeOperator() {
|
||||
return this.creationTimeOperator;
|
||||
}
|
||||
|
||||
public void setCreationTimeOperator(String creationTimeOperator) {
|
||||
this.creationTimeOperator = creationTimeOperator;
|
||||
}
|
||||
|
||||
public String getValidFlag() {
|
||||
return this.validFlag;
|
||||
}
|
||||
|
||||
public void setValidFlag(String validFlag) {
|
||||
this.validFlag = validFlag;
|
||||
}
|
||||
|
||||
public String getValidFlagOperator() {
|
||||
return this.validFlagOperator;
|
||||
}
|
||||
|
||||
public void setValidFlagOperator(String validFlagOperator) {
|
||||
this.validFlagOperator = validFlagOperator;
|
||||
}
|
||||
|
||||
public String getRemarks() {
|
||||
return this.remarks;
|
||||
}
|
||||
|
||||
public void setRemarks(String remarks) {
|
||||
this.remarks = remarks;
|
||||
}
|
||||
|
||||
public String getRemarksOperator() {
|
||||
return this.remarksOperator;
|
||||
}
|
||||
|
||||
public void setRemarksOperator(String remarksOperator) {
|
||||
this.remarksOperator = remarksOperator;
|
||||
}
|
||||
|
||||
public String getPermission() {
|
||||
return this.permission;
|
||||
}
|
||||
|
||||
public void setPermission(String permission) {
|
||||
this.permission = permission;
|
||||
}
|
||||
|
||||
public String getPermissionOperator() {
|
||||
return this.permissionOperator;
|
||||
}
|
||||
|
||||
public void setPermissionOperator(String permissionOperator) {
|
||||
this.permissionOperator = permissionOperator;
|
||||
}
|
||||
|
||||
public String getIsShow() {
|
||||
return this.isShow;
|
||||
}
|
||||
|
||||
public void setIsShow(String isShow) {
|
||||
this.isShow = isShow;
|
||||
}
|
||||
|
||||
public String getIsShowOperator() {
|
||||
return this.isShowOperator;
|
||||
}
|
||||
|
||||
public void setIsShowOperator(String isShowOperator) {
|
||||
this.isShowOperator = isShowOperator;
|
||||
}
|
||||
|
||||
public String getIcon() {
|
||||
return this.icon;
|
||||
}
|
||||
|
||||
public void setIcon(String icon) {
|
||||
this.icon = icon;
|
||||
}
|
||||
|
||||
public String getIconOperator() {
|
||||
return this.iconOperator;
|
||||
}
|
||||
|
||||
public void setIconOperator(String iconOperator) {
|
||||
this.iconOperator = iconOperator;
|
||||
}
|
||||
|
||||
public String getHref() {
|
||||
return this.href;
|
||||
}
|
||||
|
||||
public void setHref(String href) {
|
||||
this.href = href;
|
||||
}
|
||||
|
||||
public String getHrefOperator() {
|
||||
return this.hrefOperator;
|
||||
}
|
||||
|
||||
public void setHrefOperator(String hrefOperator) {
|
||||
this.hrefOperator = hrefOperator;
|
||||
}
|
||||
|
||||
public String getParentIds() {
|
||||
return this.parentIds;
|
||||
}
|
||||
|
||||
public void setParentIds(String parentIds) {
|
||||
this.parentIds = parentIds;
|
||||
}
|
||||
|
||||
public String getParentIdsOperator() {
|
||||
return this.parentIdsOperator;
|
||||
}
|
||||
|
||||
public void setParentIdsOperator(String parentIdsOperator) {
|
||||
this.parentIdsOperator = parentIdsOperator;
|
||||
}
|
||||
|
||||
public String getParentId() {
|
||||
return this.parentId;
|
||||
}
|
||||
|
||||
public void setParentId(String parentId) {
|
||||
this.parentId = parentId;
|
||||
}
|
||||
|
||||
public String getParentIdOperator() {
|
||||
return this.parentIdOperator;
|
||||
}
|
||||
|
||||
public void setParentIdOperator(String parentIdOperator) {
|
||||
this.parentIdOperator = parentIdOperator;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getNameOperator() {
|
||||
return this.nameOperator;
|
||||
}
|
||||
|
||||
public void setNameOperator(String nameOperator) {
|
||||
this.nameOperator = nameOperator;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getIdOperator() {
|
||||
return this.idOperator;
|
||||
}
|
||||
|
||||
public void setIdOperator(String idOperator) {
|
||||
this.idOperator = idOperator;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,312 @@
|
||||
package com.adc.da.sys.page;
|
||||
|
||||
import com.adc.da.base.page.BasePage;
|
||||
|
||||
/**
|
||||
* <b>功能:</b>TS_ORG OrgEOPage<br>
|
||||
* <b>作者:</b>code generator<br>
|
||||
* <b>日期:</b> 2018-09-03 <br>
|
||||
* <b>版权所有:<b>版权归北京卡达克数据技术中心所有。<br>
|
||||
*/
|
||||
public class OrgEOPage extends BasePage {
|
||||
|
||||
private String modifyTime;
|
||||
private String modifyTime1;
|
||||
private String modifyTime2;
|
||||
private String modifyTimeOperator = "like";
|
||||
private String creationTime;
|
||||
private String creationTime1;
|
||||
private String creationTime2;
|
||||
private String creationTimeOperator = "like";
|
||||
private String validFlag;
|
||||
private String validFlagOperator = "like";
|
||||
private String isShow;
|
||||
private String isShowOperator = "like";
|
||||
private String parentIds;
|
||||
private String parentIdsOperator = "like";
|
||||
private String parentId;
|
||||
private String parentIdOperator = "like";
|
||||
private String shotName;
|
||||
private String shotNameOperator = "like";
|
||||
private String remarks;
|
||||
private String remarksOperator = "like";
|
||||
private String orgDesc;
|
||||
private String orgDescOperator = "like";
|
||||
private String orgType;
|
||||
private String orgTypeOperator = "like";
|
||||
private String orgCode;
|
||||
private String orgCodeOperator = "like";
|
||||
private String orgName;
|
||||
private String orgNameOperator = "like";
|
||||
private String id;
|
||||
private String idOperator = "like";
|
||||
|
||||
private String orgId;
|
||||
private String roleName;
|
||||
|
||||
private String processFlag;
|
||||
|
||||
public String getRoleName() {
|
||||
return roleName;
|
||||
}
|
||||
|
||||
public void setRoleName(String roleName) {
|
||||
this.roleName = roleName;
|
||||
}
|
||||
|
||||
public String getOrgId() {
|
||||
return orgId;
|
||||
}
|
||||
|
||||
public void setOrgId(String orgId) {
|
||||
this.orgId = orgId;
|
||||
}
|
||||
|
||||
public String getModifyTime() {
|
||||
return this.modifyTime;
|
||||
}
|
||||
|
||||
public void setModifyTime(String modifyTime) {
|
||||
this.modifyTime = modifyTime;
|
||||
}
|
||||
|
||||
public String getModifyTime1() {
|
||||
return this.modifyTime1;
|
||||
}
|
||||
|
||||
public void setModifyTime1(String modifyTime1) {
|
||||
this.modifyTime1 = modifyTime1;
|
||||
}
|
||||
|
||||
public String getModifyTime2() {
|
||||
return this.modifyTime2;
|
||||
}
|
||||
|
||||
public void setModifyTime2(String modifyTime2) {
|
||||
this.modifyTime2 = modifyTime2;
|
||||
}
|
||||
|
||||
public String getModifyTimeOperator() {
|
||||
return this.modifyTimeOperator;
|
||||
}
|
||||
|
||||
public void setModifyTimeOperator(String modifyTimeOperator) {
|
||||
this.modifyTimeOperator = modifyTimeOperator;
|
||||
}
|
||||
|
||||
public String getCreationTime() {
|
||||
return this.creationTime;
|
||||
}
|
||||
|
||||
public void setCreationTime(String creationTime) {
|
||||
this.creationTime = creationTime;
|
||||
}
|
||||
|
||||
public String getCreationTime1() {
|
||||
return this.creationTime1;
|
||||
}
|
||||
|
||||
public void setCreationTime1(String creationTime1) {
|
||||
this.creationTime1 = creationTime1;
|
||||
}
|
||||
|
||||
public String getCreationTime2() {
|
||||
return this.creationTime2;
|
||||
}
|
||||
|
||||
public void setCreationTime2(String creationTime2) {
|
||||
this.creationTime2 = creationTime2;
|
||||
}
|
||||
|
||||
public String getCreationTimeOperator() {
|
||||
return this.creationTimeOperator;
|
||||
}
|
||||
|
||||
public void setCreationTimeOperator(String creationTimeOperator) {
|
||||
this.creationTimeOperator = creationTimeOperator;
|
||||
}
|
||||
|
||||
public String getValidFlag() {
|
||||
return this.validFlag;
|
||||
}
|
||||
|
||||
public void setValidFlag(String validFlag) {
|
||||
this.validFlag = validFlag;
|
||||
}
|
||||
|
||||
public String getValidFlagOperator() {
|
||||
return this.validFlagOperator;
|
||||
}
|
||||
|
||||
public void setValidFlagOperator(String validFlagOperator) {
|
||||
this.validFlagOperator = validFlagOperator;
|
||||
}
|
||||
|
||||
public String getIsShow() {
|
||||
return this.isShow;
|
||||
}
|
||||
|
||||
public void setIsShow(String isShow) {
|
||||
this.isShow = isShow;
|
||||
}
|
||||
|
||||
public String getIsShowOperator() {
|
||||
return this.isShowOperator;
|
||||
}
|
||||
|
||||
public void setIsShowOperator(String isShowOperator) {
|
||||
this.isShowOperator = isShowOperator;
|
||||
}
|
||||
|
||||
public String getParentIds() {
|
||||
return this.parentIds;
|
||||
}
|
||||
|
||||
public void setParentIds(String parentIds) {
|
||||
this.parentIds = parentIds;
|
||||
}
|
||||
|
||||
public String getParentIdsOperator() {
|
||||
return this.parentIdsOperator;
|
||||
}
|
||||
|
||||
public void setParentIdsOperator(String parentIdsOperator) {
|
||||
this.parentIdsOperator = parentIdsOperator;
|
||||
}
|
||||
|
||||
public String getParentId() {
|
||||
return this.parentId;
|
||||
}
|
||||
|
||||
public void setParentId(String parentId) {
|
||||
this.parentId = parentId;
|
||||
}
|
||||
|
||||
public String getParentIdOperator() {
|
||||
return this.parentIdOperator;
|
||||
}
|
||||
|
||||
public void setParentIdOperator(String parentIdOperator) {
|
||||
this.parentIdOperator = parentIdOperator;
|
||||
}
|
||||
|
||||
public String getShotName() {
|
||||
return this.shotName;
|
||||
}
|
||||
|
||||
public void setShotName(String shotName) {
|
||||
this.shotName = shotName;
|
||||
}
|
||||
|
||||
public String getShotNameOperator() {
|
||||
return this.shotNameOperator;
|
||||
}
|
||||
|
||||
public void setShotNameOperator(String shotNameOperator) {
|
||||
this.shotNameOperator = shotNameOperator;
|
||||
}
|
||||
|
||||
public String getRemarks() {
|
||||
return this.remarks;
|
||||
}
|
||||
|
||||
public void setRemarks(String remarks) {
|
||||
this.remarks = remarks;
|
||||
}
|
||||
|
||||
public String getRemarksOperator() {
|
||||
return this.remarksOperator;
|
||||
}
|
||||
|
||||
public void setRemarksOperator(String remarksOperator) {
|
||||
this.remarksOperator = remarksOperator;
|
||||
}
|
||||
|
||||
public String getOrgDesc() {
|
||||
return this.orgDesc;
|
||||
}
|
||||
|
||||
public void setOrgDesc(String orgDesc) {
|
||||
this.orgDesc = orgDesc;
|
||||
}
|
||||
|
||||
public String getOrgDescOperator() {
|
||||
return this.orgDescOperator;
|
||||
}
|
||||
|
||||
public void setOrgDescOperator(String orgDescOperator) {
|
||||
this.orgDescOperator = orgDescOperator;
|
||||
}
|
||||
|
||||
public String getOrgType() {
|
||||
return this.orgType;
|
||||
}
|
||||
|
||||
public void setOrgType(String orgType) {
|
||||
this.orgType = orgType;
|
||||
}
|
||||
|
||||
public String getOrgTypeOperator() {
|
||||
return this.orgTypeOperator;
|
||||
}
|
||||
|
||||
public void setOrgTypeOperator(String orgTypeOperator) {
|
||||
this.orgTypeOperator = orgTypeOperator;
|
||||
}
|
||||
|
||||
public String getOrgCode() {
|
||||
return this.orgCode;
|
||||
}
|
||||
|
||||
public void setOrgCode(String orgCode) {
|
||||
this.orgCode = orgCode;
|
||||
}
|
||||
|
||||
public String getOrgCodeOperator() {
|
||||
return this.orgCodeOperator;
|
||||
}
|
||||
|
||||
public void setOrgCodeOperator(String orgCodeOperator) {
|
||||
this.orgCodeOperator = orgCodeOperator;
|
||||
}
|
||||
|
||||
public String getOrgName() {
|
||||
return this.orgName;
|
||||
}
|
||||
|
||||
public void setOrgName(String orgName) {
|
||||
this.orgName = orgName;
|
||||
}
|
||||
|
||||
public String getOrgNameOperator() {
|
||||
return this.orgNameOperator;
|
||||
}
|
||||
|
||||
public void setOrgNameOperator(String orgNameOperator) {
|
||||
this.orgNameOperator = orgNameOperator;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getIdOperator() {
|
||||
return this.idOperator;
|
||||
}
|
||||
|
||||
public void setIdOperator(String idOperator) {
|
||||
this.idOperator = idOperator;
|
||||
}
|
||||
|
||||
public String getProcessFlag() {
|
||||
return processFlag;
|
||||
}
|
||||
|
||||
public void setProcessFlag(String processFlag) {
|
||||
this.processFlag = processFlag;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
package com.adc.da.sys.page;
|
||||
|
||||
import com.adc.da.base.page.BasePage;
|
||||
|
||||
|
||||
/**
|
||||
* <b>功能:</b>TS_ORG_MENU OrgMenuEOPage<br>
|
||||
* <b>作者:</b>code generator<br>
|
||||
* <b>日期:</b> 2020-09-23 <br>
|
||||
* <b>版权所有:<b>版权归北京卡达克数据技术中心所有。<br>
|
||||
*/
|
||||
public class OrgMenuEOPage extends BasePage {
|
||||
|
||||
private String id;
|
||||
private String idOperator = "=";
|
||||
private String orgId;
|
||||
private String orgIdOperator = "=";
|
||||
private String orgRootId;
|
||||
private String orgRootIdOperator = "=";
|
||||
private String validFlag;
|
||||
private String validFlagOperator = "=";
|
||||
|
||||
public String getId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getIdOperator() {
|
||||
return this.idOperator;
|
||||
}
|
||||
|
||||
public void setIdOperator(String idOperator) {
|
||||
this.idOperator = idOperator;
|
||||
}
|
||||
|
||||
public String getOrgId() {
|
||||
return this.orgId;
|
||||
}
|
||||
|
||||
public void setOrgId(String orgId) {
|
||||
this.orgId = orgId;
|
||||
}
|
||||
|
||||
public String getOrgIdOperator() {
|
||||
return this.orgIdOperator;
|
||||
}
|
||||
|
||||
public void setOrgIdOperator(String orgIdOperator) {
|
||||
this.orgIdOperator = orgIdOperator;
|
||||
}
|
||||
|
||||
public String getOrgRootId() {
|
||||
return this.orgRootId;
|
||||
}
|
||||
|
||||
public void setOrgRootId(String orgRootId) {
|
||||
this.orgRootId = orgRootId;
|
||||
}
|
||||
|
||||
public String getOrgRootIdOperator() {
|
||||
return this.orgRootIdOperator;
|
||||
}
|
||||
|
||||
public void setOrgRootIdOperator(String orgRootIdOperator) {
|
||||
this.orgRootIdOperator = orgRootIdOperator;
|
||||
}
|
||||
|
||||
public String getValidFlag() {
|
||||
return this.validFlag;
|
||||
}
|
||||
|
||||
public void setValidFlag(String validFlag) {
|
||||
this.validFlag = validFlag;
|
||||
}
|
||||
|
||||
public String getValidFlagOperator() {
|
||||
return this.validFlagOperator;
|
||||
}
|
||||
|
||||
public void setValidFlagOperator(String validFlagOperator) {
|
||||
this.validFlagOperator = validFlagOperator;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
package com.adc.da.sys.service;
|
||||
|
||||
import com.adc.da.sys.common.SelectionResult;
|
||||
import com.adc.da.sys.entity.DictionaryEO;
|
||||
import com.adc.da.sys.page.DictionaryEOPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface IDicEOService extends IService<DictionaryEO> {
|
||||
|
||||
public DictionaryEO getDictionaryEOById(String id);
|
||||
|
||||
public DictionaryEO getDictionaryEOByDicCode(String dictionaryCode);
|
||||
|
||||
public DictionaryEO getDicEOAndTypeEoByDicCode(String dictionaryCode);
|
||||
|
||||
public DictionaryEO getDictionaryEOByDicName(String dictionaryName);
|
||||
|
||||
public void deleteDic(String id);
|
||||
|
||||
//gaoyan
|
||||
public List<DictionaryEO> getDictionaryEO();
|
||||
|
||||
public Integer countByCodeOrName(DictionaryEOPage page);
|
||||
|
||||
public List<DictionaryEO> queryAllDicByPage(DictionaryEOPage page);
|
||||
|
||||
public Integer queryAllDicByCount(DictionaryEOPage page);
|
||||
|
||||
public List<SelectionResult> getDictionarySelList(String id);
|
||||
|
||||
public List<SelectionResult> getDictionaryCodeSelList(String id);
|
||||
|
||||
public int queryUseByCount(String id);
|
||||
|
||||
public int insertSelective(DictionaryEO dictionaryEO);
|
||||
|
||||
public int updateByPrimaryKeySelective(DictionaryEO dictionaryEO);
|
||||
|
||||
public List<DictionaryEO> queryByPage(DictionaryEOPage page);
|
||||
|
||||
public int queryByCount(DictionaryEOPage page);
|
||||
|
||||
public List<DictionaryEO> queryByList(DictionaryEOPage page);
|
||||
|
||||
public String createDictionary(DictionaryEO dictionaryEO);
|
||||
|
||||
public String updateDictionary(DictionaryEO dictionaryEO);
|
||||
|
||||
public void deleteDicAndType(String id);
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
package com.adc.da.sys.service;
|
||||
|
||||
import com.adc.da.sys.common.SelectionResult;
|
||||
import com.adc.da.sys.entity.DicTypeEO;
|
||||
import com.adc.da.sys.page.DicTypeEOPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public interface IDicTypeEOService extends IService<DicTypeEO> {
|
||||
|
||||
public DicTypeEO getDicTypeEOById(String id);
|
||||
|
||||
public void deleteDicTypeByIdInBatch(List<String> ids);
|
||||
|
||||
public List<DicTypeEO> getTypeIdByDicIdAndTypeName(String dicId, String id, String typeName, String parentId);
|
||||
|
||||
|
||||
public List<DicTypeEO> getDicTypeEOByDicTypeCode(String dicId, String id, String dicTypeCode, String parentId);
|
||||
|
||||
public void batchInsertTypeEo(List<DicTypeEO> ModelType);
|
||||
|
||||
public void deleteDicTypeByDicId(String id);
|
||||
|
||||
/**
|
||||
* @Author yangxuenan
|
||||
* @Description 根据数据字典编码查询字典类型
|
||||
* Date 2018/9/11 15:09
|
||||
* @Param [dictionaryCode]
|
||||
* @return java.util.List<com.adc.da.sys.entity.DicTypeEO>
|
||||
**/
|
||||
public List<Map<String,String>> getDicTypeByDicCode(String dictionaryCode);
|
||||
|
||||
public List<DicTypeEO> getFineDicTypeByDicCode(String dictionaryCode);
|
||||
|
||||
//liwenxuan:国家地区新增
|
||||
public List<DicTypeEO> queryByPageNoParentId(DicTypeEOPage page);
|
||||
|
||||
public int queryByCountCounter(DicTypeEOPage page);
|
||||
public List<Map<String,String>> getDicTypeByParentCode(String dicTypeCode);
|
||||
|
||||
public List<DicTypeEO> getDicTypeByDicTypeName(DicTypeEO dicTypeEO);
|
||||
|
||||
public List<DicTypeEO> getDicTypeEOTypeNameAndCode(String id, String dicTypeName, String dicTypeCode, String parentId);
|
||||
public List<DicTypeEO> getDicTypeEOTypeNameAndCode1(String id, String dicTypeName, String dicTypeCode, String parentId);
|
||||
|
||||
// 标准法规属性管理中删除之前查看其它地方是否引用
|
||||
public boolean getDicTypeByDicTypeCode(String dicTypeCode);
|
||||
|
||||
public List<DicTypeEO> getDicEOByDicTypeCode(String dicTypeCode);
|
||||
|
||||
public List<DicTypeEO> getDicEOByDicTypeCodeParent(String dicTypeCode);
|
||||
|
||||
public int deleteByDicIdAndDicTypeCode(DicTypeEO dicTypeEO);
|
||||
|
||||
public int updateByDicTypeCode(DicTypeEO dicTypeEO);
|
||||
|
||||
public boolean judgeHaveUse(String sortCode, String countryCode);
|
||||
|
||||
public void deleteDicTypeByCodeAndParentid(List<String> codes);
|
||||
|
||||
public int deleteByDictionaryId(String dicId);
|
||||
|
||||
public List<SelectionResult> getDicTypeByDicId(String dicId);
|
||||
|
||||
public String getDicNamesByCodes(List<String> codeList);
|
||||
|
||||
public int insertSelective(DicTypeEO dictionaryEO);
|
||||
|
||||
public int updateByPrimaryKeySelective(DicTypeEO dictionaryEO);
|
||||
|
||||
public List<DicTypeEO> queryByPage(DicTypeEOPage page);
|
||||
|
||||
public int queryByCount(DicTypeEOPage page);
|
||||
|
||||
public List<DicTypeEO> queryByList(DicTypeEOPage page);
|
||||
|
||||
public Integer saveDictype(DicTypeEO dicTypeEO);
|
||||
|
||||
public DicTypeEO getDicTypeById(String id);
|
||||
|
||||
public void delete(List<String> ids);
|
||||
|
||||
public Map<String,Object> getDicTypeListCode();
|
||||
|
||||
public List<Map<String,String>> getDicTypeByParentCodes(String dicTypeCode);
|
||||
|
||||
}
|
||||
@@ -38,6 +38,6 @@ public interface IRoleEOService extends IService<RoleEO> {
|
||||
|
||||
public List<RoleEO> selectByNameAndId(String id, String name);
|
||||
|
||||
|
||||
public List<String> selectIdByNames(List<String> nameList);
|
||||
|
||||
}
|
||||
|
||||
@@ -18,6 +18,6 @@ public interface IRoleSarMenuEOService extends IService<RoleSarMenuEO> {
|
||||
|
||||
public List<RoleSarMenuEO> selectSarMenuRoots();
|
||||
|
||||
public int insertSubMenu (RoleSarMenuEO roleSarMenuEO);
|
||||
public int insertSubMenu(RoleSarMenuEO roleSarMenuEO);
|
||||
|
||||
}
|
||||
|
||||
@@ -12,6 +12,6 @@ public interface IUserConfigEOService extends IService<UserConfigEO> {
|
||||
|
||||
public List<UserConfigEO> queryByList(UserConfigEOPage page);
|
||||
|
||||
public int createPageConfig (String userId);
|
||||
public int createPageConfig(String userId);
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,233 @@
|
||||
package com.adc.da.sys.service.impl;
|
||||
|
||||
import com.adc.da.sys.common.SelectionResult;
|
||||
import com.adc.da.sys.dao.DicEODao;
|
||||
import com.adc.da.sys.entity.DictionaryEO;
|
||||
import com.adc.da.sys.page.DictionaryEOPage;
|
||||
import com.adc.da.sys.service.IDicEOService;
|
||||
import com.adc.da.sys.service.IDicTypeEOService;
|
||||
import com.adc.da.util.LoginUserUtil;
|
||||
import com.adc.da.util.UUIDUtils;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Propagation;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 新增数据字典属性
|
||||
* */
|
||||
@Service("dicEOService")
|
||||
@Transactional(value = "transactionManager", readOnly = false, propagation = Propagation.REQUIRED, rollbackFor = Throwable.class)
|
||||
@Slf4j
|
||||
public class DicEOServiceImpl extends ServiceImpl<DicEODao,DictionaryEO> implements IDicEOService {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(DictionaryEO.class);
|
||||
|
||||
@Autowired
|
||||
private DicEODao dicEODao;
|
||||
@Autowired
|
||||
private IDicTypeEOService dicTypeEODao;
|
||||
|
||||
public DicEODao getDao() {
|
||||
return dicEODao;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询字典详情
|
||||
*/
|
||||
@Transactional(readOnly = true, rollbackFor = Exception.class)
|
||||
public DictionaryEO getDictionaryById(String id) {
|
||||
return dicEODao.getDictionaryEOById(id);
|
||||
}
|
||||
|
||||
@Transactional(readOnly = true, rollbackFor = Exception.class)
|
||||
public DictionaryEO getDictionaryByDicCode(String dictionaryCode) {
|
||||
return dicEODao.getDictionaryEOByDicCode(dictionaryCode);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DictionaryEO getDictionaryEOById(String id) {
|
||||
return dicEODao.getDictionaryEOById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DictionaryEO getDictionaryEOByDicCode(String dictionaryCode) {
|
||||
return dicEODao.getDictionaryEOByDicCode(dictionaryCode);
|
||||
}
|
||||
|
||||
@Transactional(readOnly = true, rollbackFor = Exception.class)
|
||||
public DictionaryEO getDicEOAndTypeEoByDicCode(String dictionaryCode) {
|
||||
return dicEODao.getDicEOAndTypeEoByDicCode(dictionaryCode);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DictionaryEO getDictionaryEOByDicName(String dictionaryName) {
|
||||
return dicEODao.getDictionaryEOByDicName(dictionaryName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteDic(String id) {
|
||||
dicEODao.deleteDic(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DictionaryEO> getDictionaryEO() {
|
||||
return dicEODao.getDictionaryEO();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer countByCodeOrName(DictionaryEOPage page) {
|
||||
return dicEODao.countByCodeOrName(page);
|
||||
}
|
||||
|
||||
@Transactional(readOnly = true, rollbackFor = Exception.class)
|
||||
public DictionaryEO getDictionaryByDicName(String dictionaryName) {
|
||||
return dicEODao.getDictionaryEOByDicName(dictionaryName);
|
||||
}
|
||||
|
||||
//删除字典
|
||||
public void delete(String id) {
|
||||
dicEODao.deleteDic(id);
|
||||
}
|
||||
|
||||
//删除字典
|
||||
public void deleteDicAndType(String id) {
|
||||
dicEODao.deleteDic(id);
|
||||
dicTypeEODao.deleteByDictionaryId(id);
|
||||
}
|
||||
|
||||
public int queryUseByCount(String id){
|
||||
return dicEODao.queryUseByCount(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertSelective(DictionaryEO dictionaryEO) {
|
||||
return dicEODao.insertSelective(dictionaryEO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateByPrimaryKeySelective(DictionaryEO dictionaryEO) {
|
||||
return dicEODao.updateByPrimaryKeySelective(dictionaryEO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DictionaryEO> queryByPage(DictionaryEOPage page) {
|
||||
Integer rowCount = dicEODao.queryByCount(page);
|
||||
page.getPager().setRowCount(rowCount);
|
||||
return dicEODao.queryByPage(page);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int queryByCount(DictionaryEOPage page) {
|
||||
return dicEODao.queryByCount(page);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DictionaryEO> queryByList(DictionaryEOPage page) {
|
||||
return dicEODao.queryByList(page);
|
||||
}
|
||||
|
||||
/***
|
||||
* @Description: 新增数据字典
|
||||
* @Author: yangxuenan
|
||||
* @Date: 2020/8/21 14:34
|
||||
* @Param: [dictionaryEO]
|
||||
* @Return: int
|
||||
*/
|
||||
@Override
|
||||
public String createDictionary(DictionaryEO dictionaryEO){
|
||||
// 验证编码是否存在
|
||||
DictionaryEOPage page = new DictionaryEOPage();
|
||||
page.setDictionaryCode(dictionaryEO.getDictionaryCode());
|
||||
int countCode = dicEODao.countByCodeOrName(page);
|
||||
if (countCode > 0) {
|
||||
return "数据字典编码已存在";
|
||||
}
|
||||
// 验证
|
||||
page.setDictionaryCode(null);
|
||||
page.setDictionaryName(dictionaryEO.getDictionaryName());
|
||||
int countName = dicEODao.countByCodeOrName(page);
|
||||
if (countName > 0) {
|
||||
return "数据字典名称已存在";
|
||||
}
|
||||
dictionaryEO.setId(UUIDUtils.randomUUID20());
|
||||
dictionaryEO.setEnable("1");
|
||||
dictionaryEO.setValidFlag("0");
|
||||
dictionaryEO.setCreationUser(LoginUserUtil.getUserId());
|
||||
dictionaryEO.setCreationTime(new Date());
|
||||
dictionaryEO.setModifyTime(new Date());
|
||||
int countSuc = dicEODao.insertSelective(dictionaryEO);
|
||||
if (countSuc > 0) {
|
||||
return "success";
|
||||
} else {
|
||||
return "error";
|
||||
}
|
||||
}
|
||||
|
||||
/***
|
||||
* @Description: 修改数据字典
|
||||
* @Author: yangxuenan
|
||||
* @Date: 2020/8/21 15:42
|
||||
* @Param: [dictionaryEO]
|
||||
* @Return: java.lang.String
|
||||
*/
|
||||
@Override
|
||||
public String updateDictionary(DictionaryEO dictionaryEO){
|
||||
// 验证编码是否存在
|
||||
DictionaryEOPage page = new DictionaryEOPage();
|
||||
page.setNotId(dictionaryEO.getId());
|
||||
page.setDictionaryCode(dictionaryEO.getDictionaryCode());
|
||||
int countCode = dicEODao.countByCodeOrName(page);
|
||||
if (countCode > 0) {
|
||||
return "数据字典编码已存在";
|
||||
}
|
||||
// 验证
|
||||
page.setDictionaryCode(null);
|
||||
page.setDictionaryName(dictionaryEO.getDictionaryName());
|
||||
int countName = dicEODao.countByCodeOrName(page);
|
||||
if (countName > 0) {
|
||||
return "数据字典名称已存在";
|
||||
}
|
||||
dictionaryEO.setModifyTime(new Date());
|
||||
int countSuc = dicEODao.updateByPrimaryKeySelective(dictionaryEO);
|
||||
if (countSuc > 0) {
|
||||
return "success";
|
||||
} else {
|
||||
return "error";
|
||||
}
|
||||
}
|
||||
|
||||
public List<DictionaryEO> queryAllDicByPage (DictionaryEOPage page) {
|
||||
Integer rowCount = dicEODao.queryAllDicByCount(page);
|
||||
page.getPager().setRowCount(rowCount);
|
||||
return dicEODao.queryAllDicByPage(page);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer queryAllDicByCount(DictionaryEOPage page) {
|
||||
return dicEODao.queryAllDicByCount(page);
|
||||
}
|
||||
|
||||
/***
|
||||
* @Description: 以下拉框格式查询所有类别
|
||||
* @Author: yangxuenan
|
||||
* @Date: 2020/9/3 10:08
|
||||
* @Param: [id]
|
||||
* @Return: java.util.List<com.adc.da.sys.common.SelectionResult>
|
||||
*/
|
||||
public List<SelectionResult> getDictionarySelList(String id){
|
||||
return dicEODao.getDictionarySelList(id);
|
||||
}
|
||||
|
||||
public List<SelectionResult> getDictionaryCodeSelList(String id){
|
||||
return dicEODao.getDictionaryCodeSelList(id);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,414 @@
|
||||
package com.adc.da.sys.service.impl;
|
||||
|
||||
import com.adc.da.sys.common.SelectionResult;
|
||||
import com.adc.da.sys.dao.DicEODao;
|
||||
import com.adc.da.sys.dao.DicTypeEODao;
|
||||
import com.adc.da.sys.entity.DicTypeEO;
|
||||
import com.adc.da.sys.entity.DictionaryEO;
|
||||
import com.adc.da.sys.page.DicTypeEOPage;
|
||||
import com.adc.da.sys.service.IDicEOService;
|
||||
import com.adc.da.sys.service.IDicTypeEOService;
|
||||
import com.adc.da.util.LoginUserUtil;
|
||||
import com.adc.da.util.UUIDUtils;
|
||||
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Propagation;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
@Service("dicTypeEOService")
|
||||
@Transactional(value = "transactionManager", readOnly = false, propagation = Propagation.REQUIRED, rollbackFor = Throwable.class)
|
||||
public class DicTypeEOServiceImpl extends ServiceImpl<DicTypeEODao,DicTypeEO> implements IDicTypeEOService {
|
||||
private
|
||||
static final Logger logger = LoggerFactory.getLogger(DicTypeEO.class);
|
||||
|
||||
@Autowired
|
||||
private DicTypeEODao dicTypeEODao;
|
||||
|
||||
@Autowired
|
||||
private IDicEOService dicEODao;
|
||||
|
||||
|
||||
|
||||
public DicTypeEODao getDao() {
|
||||
return dicTypeEODao;
|
||||
}
|
||||
//李文轩:此方法对应的sql语句必须有parentId,不传入parentId就会报错
|
||||
public DicTypeEO saveDic(DicTypeEO dicTypeEO) {
|
||||
|
||||
String parentId = dicTypeEO.getParentId();
|
||||
|
||||
dicTypeEO.setId(UUIDUtils.randomUUID20());
|
||||
dicTypeEO.setValidFlag(0);
|
||||
|
||||
if(parentId!=null){
|
||||
dicTypeEO.setParentId(parentId);
|
||||
}
|
||||
|
||||
dicTypeEODao.insert(dicTypeEO);
|
||||
return dicTypeEO;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询字典详情
|
||||
*/
|
||||
@Transactional(readOnly = true, rollbackFor = Exception.class)
|
||||
public DicTypeEO getDicTypeById(String id) {
|
||||
return dicTypeEODao.getDicTypeEOById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delete(List<String> ids) {
|
||||
dicTypeEODao.deleteDicTypeByIdInBatch(ids);
|
||||
}
|
||||
|
||||
@Transactional(readOnly = true, rollbackFor = Exception.class)
|
||||
public List<DicTypeEO> getTypeIdByDicIdAndTypeName(String dicId, String id, String typeName, String parentId) {
|
||||
return dicTypeEODao.getTypeIdByDicIdAndTypeName(dicId,id, typeName,parentId);
|
||||
}
|
||||
|
||||
@Transactional(readOnly = true, rollbackFor = Exception.class)
|
||||
public List<DicTypeEO> getDicTypeEOByDicTypeCode(String dicId, String id, String dicTypeCode, String parentId) {
|
||||
return dicTypeEODao.getDicTypeEOByDicTypeCode(dicId,id,dicTypeCode,parentId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void batchInsertTypeEo(List<DicTypeEO> ModelType) {
|
||||
dicTypeEODao.batchInsertTypeEo(ModelType);
|
||||
}
|
||||
|
||||
public void deleteDicTypeByDicId(String id) {
|
||||
dicTypeEODao.deleteDicTypeByDicId(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增数据字典参数表
|
||||
* */
|
||||
@Override
|
||||
public Integer saveDictype(DicTypeEO dicTypeEO){
|
||||
// 此处存在问题, 当当前参数为标准类别时需要输入的code为name值
|
||||
if(StringUtils.isNotEmpty(dicTypeEO.getDicId()) && !"JKSADFH564S".equals(dicTypeEO.getDicId())){
|
||||
if(!StringUtils.isNotEmpty(dicTypeEO.getDicTypeCode())){
|
||||
dicTypeEO.setDicTypeCode(UUIDUtils.randomUUID10());
|
||||
}
|
||||
}
|
||||
String id = UUIDUtils.randomUUID20();
|
||||
dicTypeEO.setId(id);
|
||||
dicTypeEO.setValidFlag(0);
|
||||
dicTypeEO.setCreationTime(new Date());
|
||||
dicTypeEO.setModifyTime(new Date());
|
||||
dicTypeEO.setCreationUser(LoginUserUtil.getUserId());
|
||||
//加分类代号
|
||||
if (StringUtils.isNotEmpty(dicTypeEO.getClassifyCode())) {
|
||||
DicTypeEO dicClassifyCode = new DicTypeEO();
|
||||
dicClassifyCode.setDicTypeName(dicTypeEO.getClassifyCode());
|
||||
dicClassifyCode.setDicId("YDWVSVOAQG");
|
||||
dicClassifyCode.setParentId(id);
|
||||
dicClassifyCode.setId(UUIDUtils.randomUUID20());
|
||||
dicClassifyCode.setValidFlag(0);
|
||||
dicClassifyCode.setCreationTime(new Date());
|
||||
dicClassifyCode.setModifyTime(new Date());
|
||||
dicClassifyCode.setCreationUser(LoginUserUtil.getUserId());
|
||||
dicClassifyCode.setDicTypeCode(UUIDUtils.randomUUID10());
|
||||
dicTypeEODao.insertSelective(dicClassifyCode);
|
||||
}
|
||||
return dicTypeEODao.insertSelective(dicTypeEO);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Author yangxuenan
|
||||
* @Description 根据数据字典编码查询字典类型
|
||||
* Date 2018/9/12 10:18
|
||||
* @Param [dictionaryCode]
|
||||
* @return java.util.List<java.util.Map<java.lang.String,java.lang.String>>
|
||||
**/
|
||||
public List<Map<String,String>> getDicTypeByDicCode(String dictionaryCode){
|
||||
List<DicTypeEO> getDicType = new ArrayList<>();
|
||||
if ("BUSSFINECLASSSHOW".equals(dictionaryCode)) {
|
||||
getDicType = dicTypeEODao.getFineDicTypeByDicCode("BUSSFINECLASS");
|
||||
} else {
|
||||
getDicType = dicTypeEODao.getDicTypeByDicCode(dictionaryCode);
|
||||
}
|
||||
List<Map<String,String>> listMap = new ArrayList<>();
|
||||
for(int i=0;i<getDicType.size();i++){
|
||||
Map<String,String> map = new HashMap<>();
|
||||
map.put("label",getDicType.get(i).getDicTypeName());
|
||||
map.put("value",getDicType.get(i).getDicTypeCode());
|
||||
// gaoyan 新增代码开始,关于企业细类需要查父节点,即企业大类
|
||||
if(dictionaryCode.equals("BUSSFINECLASS") && StringUtils.isNotEmpty(getDicType.get(i).getParentId())){
|
||||
DicTypeEO dicTypeEO = dicTypeEODao.getDicTypeEOById(getDicType.get(i).getParentId());
|
||||
map.put("parentCode",dicTypeEO.getDicTypeCode());
|
||||
}
|
||||
// gaoyan 新增代码结束
|
||||
listMap.add(map);
|
||||
}
|
||||
return listMap;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DicTypeEO> getFineDicTypeByDicCode(String dictionaryCode) {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @Author gaoyan
|
||||
* @Description
|
||||
* Date 2018/9/11 19:12
|
||||
* @Param [dictionaryCode]
|
||||
* @return java.util.List<com.adc.da.sys.entity.DicTypeEO>
|
||||
**/
|
||||
@Override
|
||||
public Map<String,Object> getDicTypeListCode(){
|
||||
Map<String,Object> resultMap = new HashMap<>();
|
||||
List<DictionaryEO> diclist = dicEODao.getDictionaryEO();
|
||||
for (DictionaryEO dictionaryEO : diclist){
|
||||
List<Map<String,String >> relist = getDicTypeByDicCode(dictionaryEO.getDictionaryCode());
|
||||
resultMap.put(dictionaryEO.getDictionaryCode(),relist);
|
||||
}
|
||||
// 查询细类
|
||||
List<Map<String,String >> relist = getDicTypeByDicCode("BUSSFINECLASSSHOW");
|
||||
resultMap.put("BUSSFINECLASSSHOW",relist);
|
||||
List<Map<String,String >> arr = new ArrayList<>();
|
||||
resultMap.put("STANDCLASSIFYSHOW",arr);
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
//liwenxuan:国家地区新增
|
||||
public List<DicTypeEO> queryByPageNoParentId(DicTypeEOPage page){
|
||||
Integer rowCount = dicTypeEODao.queryByCountCounter(page);
|
||||
page.getPager().setRowCount(rowCount);
|
||||
return dicTypeEODao.queryByPageNoParentId(page);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int queryByCountCounter(DicTypeEOPage page) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @Author yangxuenan
|
||||
* @Description 根据父级code查询
|
||||
* Date 2018/10/9 14:08
|
||||
* @Param [dicTypeCode]
|
||||
* @return java.util.List<java.util.Map<java.lang.String,java.lang.String>>
|
||||
**/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public List<Map<String,String>> getDicTypeByParentCode(String dicTypeCode){
|
||||
List<DicTypeEO> getDicType = dicTypeEODao.getDicTypeByParentCode(dicTypeCode);
|
||||
List<Map<String,String>> listMap = new ArrayList<>();
|
||||
for(int i=0;i<getDicType.size();i++){
|
||||
Map<String,String> map = new HashMap<>();
|
||||
map.put("label",getDicType.get(i).getDicTypeName());
|
||||
map.put("value",getDicType.get(i).getDicTypeCode());
|
||||
listMap.add(map);
|
||||
}
|
||||
return listMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* @Author yangxuenan
|
||||
* @Description 传递多个code值
|
||||
* Date 2019/1/2 16:38
|
||||
* @Param [dicTypeCode]
|
||||
* @return java.util.List<java.util.Map<java.lang.String,java.lang.String>>
|
||||
**/
|
||||
public List<Map<String,String>> getDicTypeByParentCodes(String dicTypeCode){
|
||||
String codes[] = dicTypeCode.split(",");
|
||||
List<Map<String,String>> listMap = new ArrayList<>();
|
||||
if (codes != null && codes.length>0) {
|
||||
for(int i=0;i<codes.length;i++) {
|
||||
List<DicTypeEO> getDicType = dicTypeEODao.getDicTypeByParentCode(codes[i]);
|
||||
for(int x=0;x<getDicType.size();x++){
|
||||
Map<String,String> map = new HashMap<>();
|
||||
map.put("label",getDicType.get(x).getDicTypeName());
|
||||
map.put("value",getDicType.get(x).getDicTypeCode());
|
||||
if (!listMap.contains(map)) {
|
||||
listMap.add(map);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return listMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* @Author liwenxuan
|
||||
* @Description 用来企业大类判断新增是否重复
|
||||
* @Date Administrator 2018/10/17
|
||||
* @Param [id, dicypeName, dicTypeCode]
|
||||
* @return java.util.List<com.adc.da.sys.entity.DicTypeEO>
|
||||
**/
|
||||
public List<DicTypeEO> getDicTypeEOTypeNameAndCode(String id, String dicTypeName, String dicTypeCode, String parentId){
|
||||
return dicTypeEODao.getDicTypeEOTypeNameAndCode(id,dicTypeName,dicTypeCode,parentId);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Author liwenxuan
|
||||
* @Description 用来企业大类判断新增是否重复
|
||||
* @Date Administrator 2018/10/17
|
||||
* @Param [id, dicypeName, dicTypeCode]
|
||||
* @return java.util.List<com.adc.da.sys.entity.DicTypeEO>
|
||||
**/
|
||||
public List<DicTypeEO> getDicTypeEOTypeNameAndCode1(String id, String dicTypeName, String dicTypeCode, String parentId){
|
||||
return dicTypeEODao.getDicTypeEOTypeNameAndCode1(id,dicTypeName,dicTypeCode,parentId);
|
||||
}
|
||||
|
||||
// 标准法规属性管理中删除之前查看其它地方是否引用
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean getDicTypeByDicTypeCode(String dicTypeCode){
|
||||
List<Integer> dicTypeByDicTypeCode = dicTypeEODao.getDicTypeByDicTypeCode(dicTypeCode);
|
||||
for (int count: dicTypeByDicTypeCode) {
|
||||
if(count > 0){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DicTypeEO> getDicTypeByDicTypeName(DicTypeEO dicTypeEO){
|
||||
return dicTypeEODao.getDicTypeByDicTypeName(dicTypeEO);
|
||||
}
|
||||
|
||||
public DicTypeEO getDicTypeEOById(String id){
|
||||
return dicTypeEODao.getDicTypeEOById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteDicTypeByIdInBatch(List<String> ids) {
|
||||
dicTypeEODao.deleteDicTypeByIdInBatch(ids);
|
||||
}
|
||||
|
||||
public int deleteByDicIdAndDicTypeCode(DicTypeEO dicTypeEO){
|
||||
return dicTypeEODao.deleteByDicIdAndDicTypeCode(dicTypeEO);
|
||||
}
|
||||
|
||||
public List<DicTypeEO> getDicEOByDicTypeCode(String dicTypeCode){
|
||||
return dicTypeEODao.getDicEOByDicTypeCode(dicTypeCode);
|
||||
}
|
||||
|
||||
|
||||
public void judgeAndUpdateDictype(List<DicTypeEO> dicTypeEOList){
|
||||
List<String> samecodeid = new ArrayList<>();
|
||||
List<String> sameEntercodeid = new ArrayList<>();
|
||||
for(DicTypeEO dicTypeEO:dicTypeEOList){
|
||||
// 通过id判断,如果相同不做处理
|
||||
DicTypeEO dicEO = dicTypeEODao.getDicTypeEOById(dicTypeEO.getId());
|
||||
if (null == dicEO) {
|
||||
if (StringUtils.isNotEmpty(dicTypeEO.getParentId()) && !"".equals(dicTypeEO.getParentId())){
|
||||
// 有父id,是标准类别,进行特殊处理
|
||||
for (DicTypeEO dicTypeJue:dicTypeEOList){
|
||||
if (dicTypeJue.getId().equals(dicTypeEO.getParentId())){
|
||||
DicTypeEOPage dicTypeEOPage = new DicTypeEOPage();
|
||||
dicTypeEOPage.setDicTypeCode(dicTypeEO.getDicTypeCode());
|
||||
if(samecodeid.contains(dicTypeEO.getParentId())){
|
||||
dicTypeEOPage.setParentId(sameEntercodeid.get(samecodeid.indexOf(dicTypeEO.getParentId())));
|
||||
dicTypeEO.setParentId(sameEntercodeid.get(samecodeid.indexOf(dicTypeEO.getParentId())));
|
||||
} else {
|
||||
dicTypeEOPage.setParentId(dicTypeEO.getParentId());
|
||||
}
|
||||
dicTypeEOPage.setValidFlag("0");
|
||||
List<DicTypeEO> codelist = dicTypeEODao.queryByList(dicTypeEOPage);
|
||||
if (codelist == null || codelist.size()==0){
|
||||
// 判断name 值是否相同,如果相同 ,加标记
|
||||
dicTypeEO.setDescribes("同步云端属性");
|
||||
dicTypeEODao.insertSelective(dicTypeEO);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// 通过code去判断,并且parentid是空的数据,如果没有数据进行添加
|
||||
List<DicTypeEO> codelist = dicTypeEODao.getDicEOByDicTypeCodeParent(dicTypeEO.getDicTypeCode());
|
||||
if (codelist == null || codelist.size()==0){
|
||||
// 判断name 值是否相同,如果相同 ,加标记
|
||||
dicTypeEO.setDescribes("同步云端属性");
|
||||
dicTypeEODao.insertSelective(dicTypeEO);
|
||||
} else {
|
||||
// 如果相同,记录id,
|
||||
samecodeid.add(dicTypeEO.getId());
|
||||
sameEntercodeid.add(codelist.get(0).getId());
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// 执行修改语句
|
||||
DicTypeEO dicTypeEOUpdate = new DicTypeEO();
|
||||
dicTypeEOUpdate.setId(dicTypeEO.getId());
|
||||
dicTypeEOUpdate.setDicTypeName(dicTypeEO.getDicTypeName());
|
||||
dicTypeEOUpdate.setShowIndex(dicTypeEO.getShowIndex());
|
||||
dicTypeEOUpdate.setDescribes("同步云端属性");
|
||||
dicTypeEOUpdate.setValidFlag(0);
|
||||
dicTypeEODao.updateByPrimaryKeySelective(dicTypeEOUpdate);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean judgeHaveUse(String sortCode,String countryCode){
|
||||
Integer dicTypeByDicTypeCode = dicTypeEODao.judgeHaveUse(sortCode,countryCode);
|
||||
if (dicTypeByDicTypeCode != null && dicTypeByDicTypeCode>0){
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public int updateByDicTypeCode(DicTypeEO dicTypeEO){
|
||||
return dicTypeEODao.updateByDicTypeCode(dicTypeEO);
|
||||
}
|
||||
|
||||
public List<DicTypeEO> getDicEOByDicTypeCodeParent(String dicTypeCode){
|
||||
return dicTypeEODao.getDicEOByDicTypeCodeParent(dicTypeCode);
|
||||
}
|
||||
public void deleteDicTypeByCodeAndParentid(List<String> codes) {
|
||||
dicTypeEODao.deleteDicTypeByCodeAndParentid(codes);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteByDictionaryId(String dicId) {
|
||||
return dicTypeEODao.deleteByDictionaryId(dicId);
|
||||
}
|
||||
|
||||
public List<SelectionResult> getDicTypeByDicId(String dicId){
|
||||
return dicTypeEODao.getDicTypeByDicId(dicId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDicNamesByCodes(List<String> codeList) {
|
||||
return dicTypeEODao.getDicNamesByCodes(codeList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertSelective(DicTypeEO dictionaryEO) {
|
||||
return dicTypeEODao.insertSelective(dictionaryEO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateByPrimaryKeySelective(DicTypeEO dictionaryEO) {
|
||||
return dicTypeEODao.updateByPrimaryKeySelective(dictionaryEO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DicTypeEO> queryByPage(DicTypeEOPage page) {
|
||||
Integer rowCount = dicTypeEODao.queryByCount(page);
|
||||
page.getPager().setRowCount(rowCount);
|
||||
return dicTypeEODao.queryByPage(page);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int queryByCount(DicTypeEOPage page) {
|
||||
return dicTypeEODao.queryByCount(page);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DicTypeEO> queryByList(DicTypeEOPage page) {
|
||||
return dicTypeEODao.queryByList(page);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -3,7 +3,7 @@ package com.adc.da.sys.service.impl;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.adc.da.base.entity.TreeEntity;
|
||||
import com.adc.da.base.page.BasePage;
|
||||
import com.adc.da.common.ValidFlagEnum;
|
||||
import com.adc.da.sys.constant.ValidFlagEnum;
|
||||
import com.adc.da.sys.dao.MenuEODao;
|
||||
import com.adc.da.sys.entity.MenuEO;
|
||||
import com.adc.da.sys.page.MenuEOPage;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package com.adc.da.sys.service.impl;
|
||||
|
||||
import com.adc.da.common.ValidFlagEnum;
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.sys.constant.ValidFlagEnum;
|
||||
import com.adc.da.sys.dao.OrgEODao;
|
||||
import com.adc.da.sys.entity.OrgEO;
|
||||
import com.adc.da.sys.entity.UserEO;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.adc.da.sys.service.impl;
|
||||
|
||||
import com.adc.da.base.page.BasePage;
|
||||
import com.adc.da.common.ValidFlagEnum;
|
||||
import com.adc.da.sys.constant.ValidFlagEnum;
|
||||
import com.adc.da.sys.dao.RoleEODao;
|
||||
import com.adc.da.sys.entity.RoleEO;
|
||||
import com.adc.da.sys.entity.UserRoleEO;
|
||||
@@ -179,4 +179,9 @@ public class RoleEOServiceImpl extends ServiceImpl<RoleEODao, RoleEO> implements
|
||||
public List<RoleEO> selectByNameAndId(String id, String name){
|
||||
return this.baseMapper.selectByNameAndId(id,name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> selectIdByNames(List<String> nameList) {
|
||||
return this.baseMapper.selectIdByNames(nameList);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package com.adc.da.sys.service.impl;
|
||||
|
||||
import com.adc.da.base.page.BasePage;
|
||||
import com.adc.da.common.ValidFlagEnum;
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.sys.constant.UserSourceEnum;
|
||||
import com.adc.da.sys.constant.ValidFlagEnum;
|
||||
import com.adc.da.sys.dao.OrgEODao;
|
||||
import com.adc.da.sys.dao.UserEODao;
|
||||
import com.adc.da.sys.dao.UserInfoEODao;
|
||||
|
||||
@@ -0,0 +1,122 @@
|
||||
package com.adc.da.sys.vo;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
public class DicTypeVO {
|
||||
private String id;
|
||||
private String dicTypeCode;
|
||||
private String dicTypeName;
|
||||
private String dicId;
|
||||
private Integer validFlag;
|
||||
private String parentId;
|
||||
private Date creationTime;
|
||||
private Date modifyTime;
|
||||
private String describes;
|
||||
private Integer showIndex;
|
||||
|
||||
private String classifyCode;
|
||||
private String classifyCodeId;
|
||||
private String addCountrySortFlag;
|
||||
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getDicTypeCode() {
|
||||
return dicTypeCode;
|
||||
}
|
||||
public void setDicTypeCode(String dicTypeCode) {
|
||||
this.dicTypeCode = dicTypeCode;
|
||||
}
|
||||
|
||||
public String getDicTypeName() {
|
||||
return dicTypeName;
|
||||
}
|
||||
public void setDicTypeName(String dicTypeName) {
|
||||
this.dicTypeName = dicTypeName;
|
||||
}
|
||||
|
||||
public String getDicId() {
|
||||
return dicId;
|
||||
}
|
||||
|
||||
public void setDicId(String dicId) {
|
||||
this.dicId = dicId;
|
||||
}
|
||||
|
||||
public Integer getValidFlag() {
|
||||
return validFlag;
|
||||
}
|
||||
|
||||
public void setValidFlag(Integer validFlag) {
|
||||
this.validFlag = validFlag;
|
||||
}
|
||||
|
||||
public String getParentId() {
|
||||
return parentId;
|
||||
}
|
||||
|
||||
public void setParentId(String parentId) {
|
||||
this.parentId = parentId;
|
||||
}
|
||||
|
||||
public Date getCreationTime() {
|
||||
return creationTime;
|
||||
}
|
||||
|
||||
public void setCreationTime(Date creationTime) {
|
||||
this.creationTime = creationTime;
|
||||
}
|
||||
|
||||
public Date getModifyTime() {
|
||||
return modifyTime;
|
||||
}
|
||||
|
||||
public void setModifyTime(Date modifyTime) {
|
||||
this.modifyTime = modifyTime;
|
||||
}
|
||||
|
||||
public String getDescribes() {
|
||||
return describes;
|
||||
}
|
||||
|
||||
public void setDescribes(String describes) {
|
||||
this.describes = describes;
|
||||
}
|
||||
|
||||
public String getClassifyCode() {
|
||||
return classifyCode;
|
||||
}
|
||||
|
||||
public void setClassifyCode(String classifyCode) {
|
||||
this.classifyCode = classifyCode;
|
||||
}
|
||||
|
||||
public String getClassifyCodeId() {
|
||||
return classifyCodeId;
|
||||
}
|
||||
|
||||
public void setClassifyCodeId(String classifyCodeId) {
|
||||
this.classifyCodeId = classifyCodeId;
|
||||
}
|
||||
|
||||
public Integer getShowIndex() {
|
||||
return showIndex;
|
||||
}
|
||||
|
||||
public void setShowIndex(Integer showIndex) {
|
||||
this.showIndex = showIndex;
|
||||
}
|
||||
|
||||
public String getAddCountrySortFlag() {
|
||||
return addCountrySortFlag;
|
||||
}
|
||||
|
||||
public void setAddCountrySortFlag(String addCountrySortFlag) {
|
||||
this.addCountrySortFlag = addCountrySortFlag;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,111 @@
|
||||
package com.adc.da.sys.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
public class OrgVO extends TreeVO<OrgVO>{
|
||||
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date modifyTime;
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date creationTime;
|
||||
private Integer validFlag;
|
||||
private Integer isShow;
|
||||
private String pId;
|
||||
private String shotName;
|
||||
private String remarks;
|
||||
private Integer orgDesc;
|
||||
private String orgType;
|
||||
private String orgCode;
|
||||
private String orgName;
|
||||
|
||||
public Date getModifyTime() {
|
||||
return modifyTime;
|
||||
}
|
||||
|
||||
public void setModifyTime(Date modifyTime) {
|
||||
this.modifyTime = modifyTime;
|
||||
}
|
||||
|
||||
public Date getCreationTime() {
|
||||
return creationTime;
|
||||
}
|
||||
|
||||
public void setCreationTime(Date creationTime) {
|
||||
this.creationTime = creationTime;
|
||||
}
|
||||
|
||||
public Integer getValidFlag() {
|
||||
return validFlag;
|
||||
}
|
||||
|
||||
public void setValidFlag(Integer validFlag) {
|
||||
this.validFlag = validFlag;
|
||||
}
|
||||
|
||||
public Integer getIsShow() {
|
||||
return isShow;
|
||||
}
|
||||
|
||||
public void setIsShow(Integer isShow) {
|
||||
this.isShow = isShow;
|
||||
}
|
||||
|
||||
public String getShotName() {
|
||||
return shotName;
|
||||
}
|
||||
|
||||
public void setShotName(String shotName) {
|
||||
this.shotName = shotName;
|
||||
}
|
||||
|
||||
public String getRemarks() {
|
||||
return remarks;
|
||||
}
|
||||
|
||||
public void setRemarks(String remarks) {
|
||||
this.remarks = remarks;
|
||||
}
|
||||
|
||||
public Integer getOrgDesc() {
|
||||
return orgDesc;
|
||||
}
|
||||
|
||||
public void setOrgDesc(Integer orgDesc) {
|
||||
this.orgDesc = orgDesc;
|
||||
}
|
||||
|
||||
public String getOrgType() {
|
||||
return orgType;
|
||||
}
|
||||
|
||||
public void setOrgType(String orgType) {
|
||||
this.orgType = orgType;
|
||||
}
|
||||
|
||||
public String getOrgCode() {
|
||||
return orgCode;
|
||||
}
|
||||
|
||||
public void setOrgCode(String orgCode) {
|
||||
this.orgCode = orgCode;
|
||||
}
|
||||
|
||||
public String getOrgName() {
|
||||
return orgName;
|
||||
}
|
||||
|
||||
public void setOrgName(String orgName) {
|
||||
this.orgName = orgName;
|
||||
}
|
||||
|
||||
|
||||
public String getpId() {
|
||||
return pId;
|
||||
}
|
||||
|
||||
public void setpId(String pId) {
|
||||
this.pId = pId;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,209 @@
|
||||
package com.adc.da.sys.vo;
|
||||
|
||||
import com.adc.da.sys.entity.MenuEO;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
public class RoleVO {
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date modifyTime;
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date creationTime;
|
||||
private Integer validFlag;
|
||||
private String operUser;
|
||||
private String extInfo;
|
||||
private String remarks;
|
||||
private Integer isDefault;
|
||||
private Integer useFlag;
|
||||
private String roleType;
|
||||
private String name;
|
||||
//新添字段
|
||||
private String oprUser;
|
||||
private String operUserName;
|
||||
|
||||
|
||||
// 扩展字段
|
||||
private List<MenuEO> menus = new ArrayList<>();
|
||||
private List<String> menusstr = new ArrayList<>();
|
||||
private String rid;
|
||||
private Integer belong;
|
||||
private String rname;
|
||||
private String rdesc;
|
||||
private String enabled;
|
||||
|
||||
private String id;
|
||||
private String roleIds;
|
||||
|
||||
public Date getModifyTime() {
|
||||
return modifyTime;
|
||||
}
|
||||
|
||||
public void setModifyTime(Date modifyTime) {
|
||||
this.modifyTime = modifyTime;
|
||||
}
|
||||
|
||||
public Date getCreationTime() {
|
||||
return creationTime;
|
||||
}
|
||||
|
||||
public void setCreationTime(Date creationTime) {
|
||||
this.creationTime = creationTime;
|
||||
}
|
||||
|
||||
public Integer getValidFlag() {
|
||||
return validFlag;
|
||||
}
|
||||
|
||||
public void setValidFlag(Integer validFlag) {
|
||||
this.validFlag = validFlag;
|
||||
}
|
||||
|
||||
public String getOperUser() {
|
||||
return operUser;
|
||||
}
|
||||
|
||||
public void setOperUser(String operUser) {
|
||||
this.operUser = operUser;
|
||||
}
|
||||
|
||||
public String getExtInfo() {
|
||||
return extInfo;
|
||||
}
|
||||
|
||||
public void setExtInfo(String extInfo) {
|
||||
this.extInfo = extInfo;
|
||||
}
|
||||
|
||||
public String getRemarks() {
|
||||
return remarks;
|
||||
}
|
||||
|
||||
public void setRemarks(String remarks) {
|
||||
this.remarks = remarks;
|
||||
}
|
||||
|
||||
public Integer getIsDefault() {
|
||||
return isDefault;
|
||||
}
|
||||
|
||||
public void setIsDefault(Integer isDefault) {
|
||||
this.isDefault = isDefault;
|
||||
}
|
||||
|
||||
public Integer getUseFlag() {
|
||||
return useFlag;
|
||||
}
|
||||
|
||||
public void setUseFlag(Integer useFlag) {
|
||||
this.useFlag = useFlag;
|
||||
}
|
||||
|
||||
public String getRoleType() {
|
||||
return roleType;
|
||||
}
|
||||
|
||||
public void setRoleType(String roleType) {
|
||||
this.roleType = roleType;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public String getOprUser() {
|
||||
return oprUser;
|
||||
}
|
||||
|
||||
public void setOprUser(String oprUser) {
|
||||
this.oprUser = oprUser;
|
||||
}
|
||||
|
||||
public String getOperUserName() {
|
||||
return operUserName;
|
||||
}
|
||||
|
||||
public void setOperUserName(String operUserName) {
|
||||
this.operUserName = operUserName;
|
||||
}
|
||||
|
||||
public List<MenuEO> getMenus() {
|
||||
return menus;
|
||||
}
|
||||
|
||||
public void setMenus(List<MenuEO> menus) {
|
||||
this.menus = menus;
|
||||
}
|
||||
|
||||
public List<String> getMenusstr() {
|
||||
return menusstr;
|
||||
}
|
||||
|
||||
public void setMenusstr(List<String> menusstr) {
|
||||
this.menusstr = menusstr;
|
||||
}
|
||||
|
||||
public String getRid() {
|
||||
return rid;
|
||||
}
|
||||
|
||||
public void setRid(String rid) {
|
||||
this.rid = rid;
|
||||
}
|
||||
|
||||
public Integer getBelong() {
|
||||
return belong;
|
||||
}
|
||||
|
||||
public void setBelong(Integer belong) {
|
||||
this.belong = belong;
|
||||
}
|
||||
|
||||
public String getRname() {
|
||||
return rname;
|
||||
}
|
||||
|
||||
public void setRname(String rname) {
|
||||
this.rname = rname;
|
||||
}
|
||||
|
||||
public String getRdesc() {
|
||||
return rdesc;
|
||||
}
|
||||
|
||||
public void setRdesc(String rdesc) {
|
||||
this.rdesc = rdesc;
|
||||
}
|
||||
|
||||
public String getEnabled() {
|
||||
return enabled;
|
||||
}
|
||||
|
||||
public void setEnabled(String enabled) {
|
||||
this.enabled = enabled;
|
||||
}
|
||||
|
||||
public void setId(String id){
|
||||
this.id=id;
|
||||
}
|
||||
|
||||
public String getId(){
|
||||
return this.id;
|
||||
}
|
||||
|
||||
public String getRoleIds() {
|
||||
return roleIds;
|
||||
}
|
||||
|
||||
public void setRoleIds(String roleIds) {
|
||||
this.roleIds = roleIds;
|
||||
}
|
||||
}
|
||||
@@ -31,7 +31,7 @@ public interface WebSocketServer {
|
||||
* @param session session 对象
|
||||
* @param throwable 抛出的异常
|
||||
*/
|
||||
public void onError(Session session,Throwable throwable);
|
||||
public void onError(Session session, Throwable throwable);
|
||||
|
||||
/**
|
||||
* 向单个客户端发送消息
|
||||
@@ -48,7 +48,7 @@ public interface WebSocketServer {
|
||||
* @return:void
|
||||
* date: 2018/12/17 15:04
|
||||
*/
|
||||
public void sendMessageOfUserList(List<String> userList,WebSocketMessage message);
|
||||
public void sendMessageOfUserList(List<String> userList, WebSocketMessage message);
|
||||
|
||||
/**
|
||||
* 向所有在线用户群发消息
|
||||
|
||||
@@ -373,4 +373,10 @@
|
||||
</where>
|
||||
</update>
|
||||
|
||||
<update id="deleteByResId" parameterType="java.lang.String">
|
||||
update TS_PERSON_COLLECT
|
||||
set valid_flag=1
|
||||
where collect_res_id = #{resId}
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -240,4 +240,10 @@
|
||||
</if>
|
||||
</where>
|
||||
</update>
|
||||
|
||||
<update id="deleteByResId" parameterType="java.lang.String">
|
||||
update TS_PERSON_SHARE
|
||||
set valid_flag=1
|
||||
where res_id = #{resId}
|
||||
</update>
|
||||
</mapper>
|
||||
|
||||
@@ -0,0 +1,582 @@
|
||||
<?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.adc.da.sys.dao.DicTypeEODao">
|
||||
<!-- Result Map -->
|
||||
<resultMap id="BaseResultMap" type="com.adc.da.sys.entity.DicTypeEO">
|
||||
<id column="id" property="id"/>
|
||||
<result column="dic_type_code" property="dicTypeCode"/>
|
||||
<result column="dic_type_name" property="dicTypeName"/>
|
||||
<result column="parent_id" property="parentId"/>
|
||||
<result column="dic_id" property="dicId"/>
|
||||
<result column="valid_flag" property="validFlag"/>
|
||||
<result column="creation_time" property="creationTime"/>
|
||||
<result column="modify_time" property="modifyTime"/>
|
||||
<result column="show_index" property="showIndex"/>
|
||||
<result column="tree_pid" property="treePid" />
|
||||
<result column="others" property="others" />
|
||||
<result column="creation_user" property="creationUser" />
|
||||
<result column="describes" property="describes" />
|
||||
</resultMap>
|
||||
|
||||
<!-- TS_DICTYPE table all fields -->
|
||||
<sql id="Base_Column_List">
|
||||
creation_time, modify_time,id,parent_id, dic_type_code, dic_type_name, dic_id,valid_flag,show_index, tree_pid, others, creation_user, describes
|
||||
</sql>
|
||||
|
||||
<!--分页显示A-->
|
||||
<sql id="Base_Column_ListPageA">
|
||||
TS_DICTYPE.id,TS_DICTYPE.parent_id, TS_DICTYPE.dic_type_code, TS_DICTYPE.dic_type_name, TS_DICTYPE.dic_id,
|
||||
TS_DICTYPE.valid_flag,TS_DICTYPE.creation_time,TS_DICTYPE.modify_time,TS_DICTYPE.describes,TS_DICTYPE.show_index,tree_pid
|
||||
</sql>
|
||||
|
||||
<!--分页显示B-->
|
||||
<sql id="Base_Column_ListPageB">
|
||||
a.id,a.parent_id, a.dic_type_code, a.dic_type_name, a.dic_id,a.valid_flag,a.creation_time,a.modify_time,a.describes,a.show_index
|
||||
</sql>
|
||||
|
||||
<sql id="Dic_Type_List">
|
||||
u.*, ur.id as type_id,
|
||||
ur.dic_type_code as dic_type_code,
|
||||
ur.dic_type_name as dic_type_name,
|
||||
ur.dic_id as dic_id,
|
||||
ur.parent_id as parent_id,
|
||||
ur.valid_flag as type_valid_flag
|
||||
</sql>
|
||||
|
||||
<!-- 查询条件 -->
|
||||
<sql id="Base_Where_Clause">
|
||||
where valid_flag = 0
|
||||
<trim suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
and id ${idOperator} #{id}
|
||||
</if>
|
||||
<if test="dicId != null">
|
||||
and dic_id ${dicIdOperator} #{dicId}
|
||||
</if>
|
||||
<if test="dicTypeName != null">
|
||||
and dic_type_name ${dicTypeNameOperator} concat(concat('%',#{dicTypeName}),'%')
|
||||
</if>
|
||||
<if test="dicTypeCode != null">
|
||||
and dic_type_code ${dicTypeCodeOperator} concat(concat('%',#{dicTypeCode}),'%')
|
||||
</if>
|
||||
<if test="validFlag != null">
|
||||
and valid_flag ${validFlagOperator} #{validFlag}
|
||||
</if>
|
||||
<if test="parentId != null">
|
||||
and parent_id ${parentIdOperator} #{parentId}
|
||||
</if>
|
||||
</trim>
|
||||
</sql>
|
||||
|
||||
<sql id="Second_Where_Clause">
|
||||
where valid_flag = 0
|
||||
<trim suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
and id ${idOperator} #{id}
|
||||
</if>
|
||||
<if test="dicId != null">
|
||||
and dic_id ${dicIdOperator} #{dicId}
|
||||
</if>
|
||||
<if test="dicTypeName != null">
|
||||
and dic_type_name = #{dicTypeName}
|
||||
</if>
|
||||
<if test="dicTypeCode != null">
|
||||
and dic_type_code = #{dicTypeCode}
|
||||
</if>
|
||||
<if test="validFlag != null">
|
||||
and valid_flag ${validFlagOperator} #{validFlag}
|
||||
</if>
|
||||
<if test="parentId != null">
|
||||
and parent_id ${parentIdOperator} #{parentId}
|
||||
</if>
|
||||
</trim>
|
||||
</sql>
|
||||
|
||||
<!--liwenxuan:分页判断条件-->
|
||||
<sql id="Base_Where_ClausePage">
|
||||
where TS_DICTYPE.valid_flag = 0
|
||||
<trim suffixOverrides=",">
|
||||
<if test="dicId != null">
|
||||
and TS_DICTYPE.dic_id ${dicIdOperator} #{dicId}
|
||||
</if>
|
||||
<if test="dicTypeName != null">
|
||||
and TS_DICTYPE.dic_type_name ${dicTypeNameOperator} concat(concat('%',#{dicTypeName}),'%')
|
||||
</if>
|
||||
<if test="dicTypeCode != null">
|
||||
and TS_DICTYPE.dic_type_code ${dicTypeCodeOperator} concat(concat('%',#{dicTypeCode}),'%')
|
||||
</if>
|
||||
<if test="id != null">
|
||||
and TS_DICTYPE.parent_id = #{id}
|
||||
</if>
|
||||
<if test="describes != null">
|
||||
and TS_DICTYPE.DESCRIBES = #{describes}
|
||||
</if>
|
||||
</trim>
|
||||
</sql>
|
||||
|
||||
<!--liwenxuan:国家和地区分页判断条件-->
|
||||
<sql id="Base_Where_ClausePageNoParentId">
|
||||
where TS_DICTYPE.valid_flag = 0
|
||||
<trim suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
and TS_DICTYPE.id ${idOperator} #{id}
|
||||
</if>
|
||||
<if test="dicId != null">
|
||||
and TS_DICTYPE.dic_id ${dicIdOperator} #{dicId}
|
||||
</if>
|
||||
<if test="dicTypeName != null">
|
||||
and TS_DICTYPE.dic_type_name ${dicTypeNameOperator} concat(concat('%',#{dicTypeName}),'%')
|
||||
</if>
|
||||
<if test="dicTypeCode != null">
|
||||
and TS_DICTYPE.dic_type_code ${dicTypeCodeOperator} concat(concat('%',#{dicTypeCode}),'%')
|
||||
</if>
|
||||
<if test="describes != null">
|
||||
and TS_DICTYPE.DESCRIBES = #{describes}
|
||||
</if>
|
||||
AND TS_DICTYPE.parent_id IS NULL
|
||||
</trim>
|
||||
</sql>
|
||||
|
||||
<!--对修改做了判断-->
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.adc.da.sys.entity.DicTypeEO">
|
||||
update TS_DICTYPE
|
||||
<set>
|
||||
<if test="dicTypeCode != null">
|
||||
dic_type_code = #{dicTypeCode},
|
||||
</if>
|
||||
<if test="dicTypeName != null">
|
||||
dic_type_name = #{dicTypeName},
|
||||
</if>
|
||||
<if test="dicId != null">
|
||||
dic_id = #{dicId},
|
||||
</if>
|
||||
<if test="validFlag != null">
|
||||
valid_flag = #{validFlag},
|
||||
</if>
|
||||
<if test="parentId != null">
|
||||
parent_id = #{parentId},
|
||||
</if>
|
||||
<if test="modifyTime != null">
|
||||
modify_Time = #{modifyTime},
|
||||
</if>
|
||||
<if test="describes != null">
|
||||
DESCRIBES = #{describes},
|
||||
</if>
|
||||
<if test="treePid != null" >
|
||||
tree_pid = #{treePid},
|
||||
</if>
|
||||
<if test="others != null" >
|
||||
others = #{others},
|
||||
</if>
|
||||
<if test="creationUser != null" >
|
||||
creation_user = #{creationUser},
|
||||
</if>
|
||||
<if test="showIndex != null">
|
||||
SHOW_INDEX = #{showIndex}
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<!--李文轩:删除多条数据-->
|
||||
<update id="deleteDicTypeByIdInBatch" parameterType="java.util.List">
|
||||
update TS_DICTYPE
|
||||
SET valid_flag = 1
|
||||
where id in
|
||||
<foreach item="id" collection="list" open="(" separator=","
|
||||
close=")" index="index">
|
||||
#{id}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
|
||||
<select id="getDicTypeEOById" resultMap="BaseResultMap"
|
||||
parameterType="java.lang.String">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from TS_DICTYPE
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="getDicTypeEOByDicTypeCode" resultMap="BaseResultMap"
|
||||
parameterType="java.lang.String">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from TS_DICTYPE
|
||||
where 1=1
|
||||
<if test="dicTypeCode !=null">
|
||||
and dic_type_code = #{dicTypeCode}
|
||||
</if>
|
||||
<!--<if test="dicId !=null">
|
||||
DIC_ID = #{dicId} AND
|
||||
</if>-->
|
||||
AND valid_flag = 0
|
||||
<if test="id !=null">
|
||||
AND id != #{id}
|
||||
</if>
|
||||
<if test="parentId !=null">
|
||||
AND parent_id = #{parentId}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!--liwenxuan:企业大类:查询选项和数据编码 企业大类和企业细类dicId:WEWXFSYUJBNG\FGFBTYGHGHMB-->
|
||||
<select id="getDicTypeEOTypeNameAndCode" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from TS_DICTYPE
|
||||
where DIC_TYPE_NAME = #{dicTypeName} AND valid_flag = 0 AND (DIC_ID = 'WEWXFSYUJBNG' or DIC_ID = 'FGFBTYGHGHMB' )
|
||||
<if test="parentId !=null">
|
||||
AND parent_id = #{parentId}
|
||||
</if>
|
||||
<if test="id !=null">
|
||||
AND id != #{id}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!--liwenxuan:复制上面的,用来判断企业大类里面的新增是否相同 dicId:WEWXFSYUJBNG-->
|
||||
<select id="getDicTypeEOTypeNameAndCode1" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from TS_DICTYPE
|
||||
where DIC_TYPE_NAME = #{dicTypeName}AND valid_flag = 0 AND (DIC_ID = 'WEWXFSYUJBNG' or DIC_ID = 'FGFBTYGHGHMB' )
|
||||
|
||||
AND parent_id is null
|
||||
|
||||
<if test="id !=null">
|
||||
AND id != #{id}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<insert id="insertSelective" parameterType="com.adc.da.sys.entity.DicTypeEO">
|
||||
insert into TS_DICTYPE
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">ID,</if>
|
||||
<if test="parentId != null">parent_id,</if>
|
||||
<if test="validFlag != null">valid_flag,</if>
|
||||
<if test="dicId != null">DIC_ID,</if>
|
||||
<if test="dicTypeName != null">DIC_TYPE_NAME,</if>
|
||||
<if test="dicTypeCode != null">DIC_TYPE_CODE,</if>
|
||||
<if test="creationTime != null">creation_Time,</if>
|
||||
<if test="modifyTime != null">modify_Time,</if>
|
||||
<if test="describes != null">DESCRIBES,</if>
|
||||
<if test="showIndex != null">show_index,</if>
|
||||
<if test="treePid != null" >tree_pid,</if>
|
||||
<if test="others != null" >others,</if>
|
||||
<if test="creationUser != null" >creation_user,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="parentId != null">#{parentId},</if>
|
||||
<if test="validFlag != null">#{validFlag},</if>
|
||||
<if test="dicId != null">#{dicId},</if>
|
||||
<if test="dicTypeName != null">#{dicTypeName},</if>
|
||||
<if test="dicTypeCode != null">#{dicTypeCode},</if>
|
||||
<if test="creationTime != null">#{creationTime},</if>
|
||||
<if test="modifyTime != null">#{modifyTime},</if>
|
||||
<if test="describes != null">#{describes},</if>
|
||||
<if test="showIndex != null">#{showIndex},</if>
|
||||
<if test="treePid != null" >#{treePid, jdbcType=VARCHAR},</if>
|
||||
<if test="others != null" >#{others, jdbcType=VARCHAR},</if>
|
||||
<if test="creationUser != null" >#{creationUser, jdbcType=VARCHAR},</if>
|
||||
</trim>
|
||||
|
||||
</insert>
|
||||
|
||||
<!-- liwenxuan:国家地区TS_DICTYPE 列表总数 -->
|
||||
<select id="queryByCountCounter" resultType="java.lang.Integer"
|
||||
parameterType="com.adc.da.base.page.BasePage">
|
||||
select count(distinct u0.id) from TS_DICTYPE u0
|
||||
<include refid="Base_Where_Clause"/>
|
||||
and u0.valid_flag != 1
|
||||
and u0.parent_id IS NULL
|
||||
</select>
|
||||
|
||||
<!-- 查询TS_DICTYPE列表 -->
|
||||
<select id="queryByPage" resultMap="BaseResultMap" parameterType="com.adc.da.base.page.BasePage">
|
||||
select
|
||||
<include refid="Base_Column_ListPageB"/>
|
||||
from
|
||||
(select tmp_tb.* , rownum rn from
|
||||
(select
|
||||
<include refid="Base_Column_ListPageA"/>
|
||||
from TS_DICTYPE
|
||||
LEFT JOIN TS_DICTIONARY td ON td.id = TS_DICTYPE.dic_id
|
||||
<include refid="Base_Where_ClausePage"/>
|
||||
<if test="pager.orderCondition != null and pager.orderCondition != ''">
|
||||
${pager.orderCondition}
|
||||
</if>
|
||||
) tmp_tb where rownum <= ${pager.endIndex}) a
|
||||
where rn >= ${pager.startIndex}
|
||||
ORDER BY a.show_index
|
||||
</select>
|
||||
<!-- TS_DICTYPE 列表总数 -->
|
||||
<select id="queryByCount" resultType="java.lang.Integer"
|
||||
parameterType="com.adc.da.base.page.BasePage">
|
||||
select count(distinct TS_DICTYPE.id) from TS_DICTYPE
|
||||
LEFT JOIN TS_DICTIONARY td ON td.id = TS_DICTYPE.dic_id
|
||||
<include refid="Base_Where_ClausePage"/>
|
||||
</select>
|
||||
|
||||
<!-- liwenxuan:国家和地区查询TS_DICTYPE列表 -->
|
||||
<select id="queryByPageNoParentId" resultMap="BaseResultMap" parameterType="com.adc.da.base.page.BasePage">
|
||||
select
|
||||
<include refid="Base_Column_ListPageB"/>
|
||||
from
|
||||
(select tmp_tb.* , rownum rn from
|
||||
(select
|
||||
<include refid="Base_Column_ListPageA"/>
|
||||
from TS_DICTYPE
|
||||
LEFT JOIN TS_DICTIONARY td ON td.id = TS_DICTYPE.dic_id
|
||||
<include refid="Base_Where_ClausePageNoParentId"/>
|
||||
<if test="pager.orderCondition != null and pager.orderCondition != ''">
|
||||
${pager.orderCondition}
|
||||
</if>
|
||||
) tmp_tb where rownum <= ${pager.endIndex}) a
|
||||
where rn >= ${pager.startIndex}
|
||||
</select>
|
||||
<select id="queryByList" resultMap="BaseResultMap" parameterType="com.adc.da.base.page.BasePage">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from TS_DICTYPE
|
||||
<include refid="Second_Where_Clause"/>
|
||||
<if test="pager.orderCondition != null and pager.orderCondition != ''">
|
||||
${pager.orderCondition}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getTypeIdByDicIdAndTypeName" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from TS_DICTYPE
|
||||
where
|
||||
<if test="typeName !=null">
|
||||
DIC_TYPE_NAME = #{typeName} AND
|
||||
</if>
|
||||
<if test="dicId !=null">
|
||||
DIC_ID = #{dicId} AND
|
||||
</if>
|
||||
valid_flag = 0
|
||||
<if test="id!=null and id != ''">
|
||||
AND id != #{id}
|
||||
</if>
|
||||
<if test="parentId !=null and parentId != ''">
|
||||
AND parent_id = #{parentId}
|
||||
</if>
|
||||
<if test="parentId == null">
|
||||
AND parent_id is null
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<insert id="batchInsertTypeEo">
|
||||
INSERT INTO TS_DICTYPE ("ID","parent_id","valid_flag", "DIC_ID", "DIC_TYPE_NAME")
|
||||
VALUES
|
||||
<foreach collection="ModelType" item="eo" separator=",">
|
||||
(#{eo.id},#{eo.parentId},#{eo.validFlag},#{eo.dicId},#{eo.dicTypeName})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<update id="deleteDicTypeByDicId" parameterType="java.lang.String">
|
||||
update TS_DICTYPE
|
||||
set valid_flag = 1
|
||||
where ID = #{id}
|
||||
</update>
|
||||
<!--李文轩:这是删除一条数据和上面的写重复了-->
|
||||
<!--<update id="deleteFlagTo1" parameterType="java.lang.String">
|
||||
update TS_DICTYPE
|
||||
set valid_flag = 1
|
||||
where id = #{id}
|
||||
</update>-->
|
||||
|
||||
<!--create by yangxuenan-->
|
||||
<select id="getDicTypeByDicCode" parameterType="java.lang.String" resultMap="BaseResultMap">
|
||||
select
|
||||
dt.id,dt.parent_id,dt.dic_type_code,dt.dic_type_name,dt.dic_id
|
||||
from TS_DICTIONARY dn LEFT JOIN TS_DICTYPE dt ON dn.ID = dt.DIC_ID
|
||||
where dictionary_code = #{dictionaryCode} AND dn.VALID_FLAG = 0 AND dt.VALID_FLAG = 0
|
||||
AND dt.parent_id is NULL
|
||||
order by show_index asc
|
||||
</select>
|
||||
|
||||
<select id="getFineDicTypeByDicCode" parameterType="java.lang.String" resultMap="BaseResultMap">
|
||||
select
|
||||
dt.id,dt.parent_id,dt.dic_type_code,dt.dic_type_name,dt.dic_id
|
||||
from TS_DICTIONARY dn LEFT JOIN TS_DICTYPE dt ON dn.ID = dt.DIC_ID
|
||||
where dictionary_code = #{dictionaryCode} AND dn.VALID_FLAG = 0 AND dt.VALID_FLAG = 0
|
||||
order by show_index asc
|
||||
</select>
|
||||
|
||||
<select id="getDicTypeByParentCode" parameterType="java.lang.String" resultMap="BaseResultMap">
|
||||
select * from TS_DICTYPE
|
||||
where PARENT_ID = (select id from TS_DICTYPE
|
||||
where DIC_TYPE_CODE=#{value}
|
||||
and VALID_FLAG=0)
|
||||
and VALID_FLAG=0
|
||||
order by show_index asc
|
||||
</select>
|
||||
|
||||
<select id="getDicTypeByDicTypeName" parameterType="com.adc.da.sys.entity.DicTypeEO" resultMap="BaseResultMap">
|
||||
select TS_DICTYPE.*
|
||||
from TS_DICTYPE
|
||||
left join TS_DICTIONARY on TS_DICTYPE.DIC_ID = TS_DICTIONARY.ID
|
||||
where TS_DICTYPE.VALID_FLAG = 0
|
||||
<if test="dicTypeName !=null">
|
||||
and TS_DICTYPE.DIC_TYPE_NAME=#{dicTypeName}
|
||||
</if>
|
||||
and TS_DICTIONARY.DICTIONARY_CODE=#{dicTypeCode}
|
||||
<if test="businessParentId !=null">
|
||||
and TS_DICTYPE.PARENT_ID=#{businessParentId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!--标准法规属性管理中删除之前查看其它地方是否引用-->
|
||||
<select id="getDicTypeByDicTypeCode" parameterType="java.lang.String" resultType="java.lang.Integer">
|
||||
select count(*) from SAR_STANDARDS_INFO
|
||||
WHERE
|
||||
(SAR_STANDARDS_INFO.COUNTRY = #{dicTypeCode} or
|
||||
SAR_STANDARDS_INFO.STAND_SORT = #{dicTypeCode} or
|
||||
SAR_STANDARDS_INFO.STAND_STATE = #{dicTypeCode} or
|
||||
SAR_STANDARDS_INFO.STAND_NATURE = #{dicTypeCode})
|
||||
AND SAR_STANDARDS_INFO.VALID_FLAG=0
|
||||
union
|
||||
select count(*) from SAR_STAND_VAL
|
||||
where SAR_STAND_VAL.PROPERTY_VAL = #{dicTypeCode}
|
||||
AND SAR_STAND_VAL.VALID_FLAG =0
|
||||
union
|
||||
select count(*) from SAR_STAND_ITEM_VAL
|
||||
where SAR_STAND_ITEM_VAL.PROPERTY_VAL = #{dicTypeCode}
|
||||
AND SAR_STAND_ITEM_VAL.VALID_FLAG =0
|
||||
union
|
||||
select count(*) from SAR_LAWS_INFO
|
||||
where (SAR_LAWS_INFO.COUNTRY = #{dicTypeCode} or
|
||||
SAR_LAWS_INFO.LAWS_PROPERTY = #{dicTypeCode} or
|
||||
SAR_LAWS_INFO.LAWS_STATE = #{dicTypeCode})
|
||||
AND SAR_LAWS_INFO.VALID_FLAG =0
|
||||
union
|
||||
select count(*) from SAR_LAWS_VAL
|
||||
where SAR_LAWS_VAL.PROPERTY_VAL = #{dicTypeCode}
|
||||
AND SAR_LAWS_VAL.VALID_FLAG =0
|
||||
union
|
||||
select count(*) from SAR_LAWS_ITEM_VAL
|
||||
where SAR_LAWS_ITEM_VAL.PROPERTY_VAL = #{dicTypeCode}
|
||||
AND SAR_LAWS_ITEM_VAL.VALID_FLAG =0
|
||||
union
|
||||
select count(*) from SAR_BUSSIONESS_STAND
|
||||
where (SAR_BUSSIONESS_STAND.STAND_GENERA = #{dicTypeCode} or
|
||||
SAR_BUSSIONESS_STAND.STAND_SUBCLASS = #{dicTypeCode} or
|
||||
SAR_BUSSIONESS_STAND.STAND_STATUS = #{dicTypeCode} or
|
||||
SAR_BUSSIONESS_STAND.STAND_SORT = #{dicTypeCode})
|
||||
and SAR_BUSSIONESS_STAND.VALID_FLAG =0
|
||||
union
|
||||
select count(*) from SAR_BUSS_STAND_VAL
|
||||
where SAR_BUSS_STAND_VAL.PROPERTY_VALUE = #{dicTypeCode}
|
||||
and SAR_BUSS_STAND_VAL.VALID_FLAG =0
|
||||
union
|
||||
select count(*) from SAR_BUSS_STAND_ITEM_VAL
|
||||
where SAR_BUSS_STAND_ITEM_VAL.PROPERTY_VALUE = #{dicTypeCode}
|
||||
and SAR_BUSS_STAND_ITEM_VAL.VALID_FLAG =0
|
||||
union
|
||||
select count(*) from SAR_BUS_SAR_COMPILE
|
||||
where (SAR_BUS_SAR_COMPILE.BUS_STAND_CLASSIFY = #{dicTypeCode} or
|
||||
SAR_BUS_SAR_COMPILE.BUS_STAND_SUBCLASS = #{dicTypeCode})
|
||||
and SAR_BUS_SAR_COMPILE.VALID_FLAG =0
|
||||
union
|
||||
select count(*) from SAR_SAR_ACCESS
|
||||
where SAR_SAR_ACCESS.COUNTRY = #{dicTypeCode}
|
||||
and SAR_SAR_ACCESS.VALID_FLAG =0
|
||||
union
|
||||
select count(*) from SAR_TEST_ITEM_VAL
|
||||
where SAR_TEST_ITEM_VAL.PROPERTY_VALUE = #{dicTypeCode}
|
||||
and SAR_TEST_ITEM_VAL.VALID_FLAG =0
|
||||
union
|
||||
select count(*) from SAR_PRODUCT_VAL
|
||||
where SAR_PRODUCT_VAL.PROPERTY_VALUE = #{dicTypeCode}
|
||||
and SAR_PRODUCT_VAL.VALID_FLAG =0
|
||||
</select>
|
||||
|
||||
<select id="getDicEOByDicTypeCode" resultMap="BaseResultMap" parameterType="java.lang.String">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from TS_DICTYPE
|
||||
where 1=1
|
||||
<if test="_parameter !=null">
|
||||
and DIC_TYPE_CODE=#{_parameter,jdbcType=VARCHAR}
|
||||
</if>
|
||||
AND valid_flag = 0
|
||||
</select>
|
||||
|
||||
<select id="getDicEOByDicTypeCodeParent" resultMap="BaseResultMap" parameterType="java.lang.String">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from TS_DICTYPE
|
||||
where 1=1
|
||||
<if test="_parameter !=null">
|
||||
and DIC_TYPE_CODE=#{_parameter,jdbcType=VARCHAR}
|
||||
</if>
|
||||
and parent_id is null
|
||||
AND valid_flag = 0
|
||||
</select>
|
||||
|
||||
<delete id="deleteByDicIdAndDicTypeCode" parameterType="com.adc.da.sys.entity.DicTypeEO">
|
||||
delete from TS_DICTYPE
|
||||
where PARENT_ID is not null and DIC_TYPE_CODE = #{dicTypeCode}
|
||||
</delete>
|
||||
|
||||
<update id="updateByDicTypeCode" parameterType="com.adc.da.sys.entity.DicTypeEO">
|
||||
update TS_DICTYPE
|
||||
<set>
|
||||
<if test="dicTypeName != null">
|
||||
dic_type_name = #{dicTypeName},
|
||||
</if>
|
||||
<if test="validFlag != null">
|
||||
valid_flag = #{validFlag},
|
||||
</if>
|
||||
</set>
|
||||
where DIC_TYPE_CODE = #{dicTypeCode} and parent_id is not null
|
||||
</update>
|
||||
|
||||
<select id="judgeHaveUse" parameterType="java.lang.String" resultType="java.lang.Integer">
|
||||
select count(*) from SAR_STANDARDS_INFO
|
||||
WHERE
|
||||
SAR_STANDARDS_INFO.valid_flag=0 and
|
||||
SAR_STANDARDS_INFO.COUNTRY = #{countryCode} and
|
||||
SAR_STANDARDS_INFO.STAND_SORT = #{sortCode}
|
||||
</select>
|
||||
|
||||
<update id="deleteDicTypeByCodeAndParentid" parameterType="java.util.List">
|
||||
update TS_DICTYPE
|
||||
set valid_flag = 1
|
||||
where DIC_TYPE_CODE in
|
||||
<foreach item="code" collection="list" open="(" separator=","
|
||||
close=")" index="index">
|
||||
#{code}
|
||||
</foreach>
|
||||
and PARENT_ID IS not null
|
||||
</update>
|
||||
|
||||
<update id="deleteByDictionaryId" parameterType="java.lang.String">
|
||||
delete from TS_DICTYPE
|
||||
where dic_id = #{dicId}
|
||||
</update>
|
||||
|
||||
<select id="getDicTypeByDicId" parameterType="java.lang.String" resultType="com.adc.da.sys.common.SelectionResult">
|
||||
select
|
||||
dic_type_code as value,dic_type_name as label
|
||||
from TS_DICTYPE
|
||||
where dic_id = #{dicId} AND VALID_FLAG = 0
|
||||
AND parent_id is NULL
|
||||
order by show_index asc
|
||||
</select>
|
||||
|
||||
<select id="getDicNamesByCodes" parameterType="java.util.List" resultType="java.lang.String">
|
||||
SELECT
|
||||
listagg ( TS_DICTYPE.DIC_TYPE_NAME, ',' ) within GROUP ( ORDER BY TS_DICTYPE.SHOW_INDEX )
|
||||
FROM
|
||||
TS_DICTYPE
|
||||
WHERE
|
||||
TS_DICTYPE.VALID_FLAG=0 and PARENT_ID is null and DIC_TYPE_CODE in
|
||||
<foreach collection="codeList" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,305 @@
|
||||
<?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.adc.da.sys.dao.DicEODao">
|
||||
<!-- Result Map -->
|
||||
<resultMap id="BaseResultMap" type="com.adc.da.sys.entity.DictionaryEO">
|
||||
<id column="id" property="id" />
|
||||
<result column="dictionary_code" property="dictionaryCode" />
|
||||
<result column="dictionary_name" property="dictionaryName" />
|
||||
<result column="order_num" property="orderNum" />
|
||||
<result column="enable" property="enable" />
|
||||
<result column="diction_type" property="dictionType" />
|
||||
<result column="is_relate" property="isRelate" />
|
||||
<result column="relate_dic_id" property="relateDicId" />
|
||||
<result column="creation_user" property="creationUser" />
|
||||
<result column="valid_flag" property="validFlag" />
|
||||
<result column="creation_time" property="creationTime" />
|
||||
<result column="modify_time" property="modifyTime" />
|
||||
</resultMap>
|
||||
|
||||
<!-- TS_DICTIONARY table all fields -->
|
||||
<sql id="Base_Column_List">
|
||||
modify_time, creation_time, valid_flag, dictionary_name, dictionary_code, id, order_num, enable, diction_type,
|
||||
is_relate,relate_dic_id,creation_user
|
||||
</sql>
|
||||
|
||||
<resultMap id="DicTypeMap" extends="BaseResultMap" type="com.adc.da.sys.entity.DictionaryEO">
|
||||
<collection property="dicTypeEOList" ofType="com.adc.da.sys.entity.DicTypeEO">
|
||||
<id column="type_id" property="id" />
|
||||
<result column="dic_type_code" property="dicTypeCode" />
|
||||
<result column="dic_type_name" property="dicTypeName" />
|
||||
<result column="dic_id" property="dicId" />
|
||||
<result column="parent_id" property="parentId" />
|
||||
<result column="type_valid_flag" property="validFlag" />
|
||||
</collection>
|
||||
</resultMap>
|
||||
|
||||
<!--gaoyan -->
|
||||
<resultMap id="ListMap" type="com.adc.da.sys.entity.DictionaryEO">
|
||||
<id column="id" property="id" />
|
||||
<result column="dictionary_code" property="dictionaryCode" />
|
||||
<result column="dictionary_name" property="dictionaryName" />
|
||||
<result column="valid_flag" property="validFlag" />
|
||||
<result column="creation_time" property="creationTime" />
|
||||
<result column="modify_time" property="modifyTime" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="Dic_Type_List">
|
||||
u.*, ur.id as type_id,
|
||||
ur.dic_type_code as dic_type_code,
|
||||
ur.dic_type_name as dic_type_name,
|
||||
ur.dic_id as dic_id,
|
||||
ur.parent_id as parent_id,
|
||||
ur.valid_flag as type_valid_flag
|
||||
</sql>
|
||||
|
||||
<!-- 查询条件 -->
|
||||
<sql id="Base_Where_Clause">
|
||||
where 1=1 and u0.valid_flag='0'
|
||||
<trim suffixOverrides=",">
|
||||
<if test="id != null and id != ''">
|
||||
and u0.id ${idOperator} #{id}
|
||||
</if>
|
||||
<if test="dictionaryCode != null and dictionaryCode != ''">
|
||||
and u0.dictionary_code ${dictionaryCodeOperator} '%${dictionaryCode}%'
|
||||
</if>
|
||||
<if test="dictionaryName != null and dictionaryName != ''">
|
||||
and u0.dictionary_name ${dictionaryNameOperator} '%${dictionaryName}%'
|
||||
</if>
|
||||
<if test="validFlag != null" >
|
||||
and u0.valid_flag ${validFlagOperator} #{validFlag}
|
||||
</if>
|
||||
<if test="modifyTime != null" >
|
||||
and u0.modify_time ${modifyTimeOperator} #{modifyTime}
|
||||
</if>
|
||||
<if test="modifyTime1 != null" >
|
||||
and u0.modify_time >= #{modifyTime1}
|
||||
</if>
|
||||
<if test="modifyTime2 != null" >
|
||||
and u0.modify_time <= #{modifyTime2}
|
||||
</if>
|
||||
<if test="creationTime != null" >
|
||||
and u0.creation_time ${creationTimeOperator} #{creationTime}
|
||||
</if>
|
||||
<if test="creationTime1 != null" >
|
||||
and u0.creation_time >= #{creationTime1}
|
||||
</if>
|
||||
<if test="creationTime2 != null" >
|
||||
and u0.creation_time <= #{creationTime2}
|
||||
</if>
|
||||
</trim>
|
||||
</sql>
|
||||
|
||||
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.adc.da.sys.entity.DictionaryEO" >
|
||||
update TS_DICTIONARY
|
||||
<set >
|
||||
<if test="validFlag != null" >
|
||||
valid_flag = #{validFlag},
|
||||
</if>
|
||||
<if test="creationTime != null" >
|
||||
creation_time = #{creationTime},
|
||||
</if>
|
||||
<if test="modifyTime != null" >
|
||||
modify_time = #{modifyTime},
|
||||
</if>
|
||||
<if test="dictionaryCode != null" >
|
||||
dictionary_code = #{dictionaryCode},
|
||||
</if>
|
||||
<if test="dictionaryName != null" >
|
||||
dictionary_name = #{dictionaryName},
|
||||
</if>
|
||||
<if test="orderNum != null" >
|
||||
order_num = #{orderNum},
|
||||
</if>
|
||||
<if test="enable != null" >
|
||||
enable = #{enable},
|
||||
</if>
|
||||
<if test="dictionType != null" >
|
||||
diction_type = #{dictionType},
|
||||
</if>
|
||||
<if test="isRelate != null" >
|
||||
is_relate = #{isRelate},
|
||||
</if>
|
||||
<if test="relateDicId != null" >
|
||||
relate_dic_id = #{relateDicId},
|
||||
</if>
|
||||
<if test="creationUser != null" >
|
||||
creation_user = #{creationUser},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
|
||||
<select id="getDictionaryEOById" resultMap="BaseResultMap"
|
||||
parameterType="java.lang.String">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from TS_DICTIONARY
|
||||
where id = #{id}
|
||||
</select>
|
||||
<select id="getDictionaryEOByDicCode" resultMap="BaseResultMap"
|
||||
parameterType="java.lang.String">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from TS_DICTIONARY
|
||||
where dictionary_code = #{dictionaryCode} AND valid_flag = 0
|
||||
</select>
|
||||
|
||||
<!--杜云宝: 根据字典代码查询其详情(俩表)-->
|
||||
<select id="getDicEOAndTypeEoByDicCode" resultMap="DicTypeMap"
|
||||
parameterType="java.lang.String">
|
||||
select
|
||||
<include refid="Dic_Type_List" />
|
||||
from TS_DICTIONARY u LEFT JOIN TS_DICTYPE ur ON u.ID = ur.DIC_ID
|
||||
where dictionary_code = #{dictionaryCode} AND u.valid_flag = 0 AND ur.valid_flag = 0
|
||||
</select>
|
||||
|
||||
|
||||
<select id="getDictionaryEOByDicName" resultMap="BaseResultMap"
|
||||
parameterType="java.lang.String">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from TS_DICTIONARY
|
||||
where dictionary_name = #{dictionaryName}
|
||||
</select>
|
||||
|
||||
<insert id="insertSelective" parameterType="com.adc.da.sys.entity.DictionaryEO" >
|
||||
<!-- <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
|
||||
SELECT SEQ_TS_DICTIONARY.NEXTVAL FROM DUAL
|
||||
</selectKey> -->
|
||||
insert into TS_DICTIONARY
|
||||
<trim prefix="(" suffix=")" suffixOverrides="," >
|
||||
<if test="validFlag != null" >valid_flag,</if>
|
||||
<if test="creationTime != null" >creation_time,</if>
|
||||
<if test="modifyTime != null" >modify_time,</if>
|
||||
<if test="id != null" >id,</if>
|
||||
<if test="dictionaryCode != null" >dictionary_code,</if>
|
||||
<if test="dictionaryName != null" >dictionary_name,</if>
|
||||
<if test="orderNum != null" >order_num,</if>
|
||||
<if test="enable != null" >enable,</if>
|
||||
<if test="dictionType != null" >diction_type,</if>
|
||||
<if test="isRelate != null" >is_relate,</if>
|
||||
<if test="relateDicId != null" >relate_dic_id,</if>
|
||||
<if test="creationUser != null" >creation_user,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
||||
<if test="validFlag != null" >#{validFlag, jdbcType=VARCHAR},</if>
|
||||
<if test="creationTime != null" >#{creationTime, jdbcType=TIMESTAMP},</if>
|
||||
<if test="modifyTime != null" >#{modifyTime, jdbcType=TIMESTAMP},</if>
|
||||
<if test="id != null" >#{id, jdbcType=VARCHAR},</if>
|
||||
<if test="dictionaryCode != null" >#{dictionaryCode, jdbcType=VARCHAR},</if>
|
||||
<if test="dictionaryName != null" >#{dictionaryName, jdbcType=VARCHAR},</if>
|
||||
<if test="orderNum != null" >#{orderNum, jdbcType=INTEGER},</if>
|
||||
<if test="enable != null" >#{enable, jdbcType=VARCHAR},</if>
|
||||
<if test="dictionType != null" >#{dictionType, jdbcType=VARCHAR},</if>
|
||||
<if test="isRelate != null" >#{isRelate, jdbcType=VARCHAR},</if>
|
||||
<if test="relateDicId != null" >#{relateDicId, jdbcType=VARCHAR},</if>
|
||||
<if test="creationUser != null" >#{creationUser, jdbcType=VARCHAR},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
|
||||
<!-- 删除记录 -->
|
||||
|
||||
<update id="deleteDic" parameterType="java.lang.String">
|
||||
update TS_DICTIONARY
|
||||
set valid_flag = 1
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<!-- TS_DICTIONARY 列表总数 -->
|
||||
<select id="queryByCount" resultType="java.lang.Integer"
|
||||
parameterType="com.adc.da.base.page.BasePage">
|
||||
select count(distinct u0.id) from TS_DICTIONARY u0
|
||||
left join TS_DICTYPE ur0 on u0.id = ur0.dic_id
|
||||
<include refid="Base_Where_Clause" />
|
||||
and u0.valid_flag != 1
|
||||
</select>
|
||||
|
||||
<select id="queryByPage" resultMap="DicTypeMap" parameterType="com.adc.da.base.page.BasePage">
|
||||
select <include refid="Dic_Type_List" /> from
|
||||
(select tmp_tb.* , rownum rn from
|
||||
(select distinct u0.* from TS_DICTIONARY u0
|
||||
left join TS_DICTYPE ur0 on u0.id = ur0.dic_id
|
||||
<include refid="Base_Where_Clause"/>
|
||||
and u0.valid_flag != 1
|
||||
order by order_num,u0.id
|
||||
) tmp_tb where rownum <= ${pager.endIndex}) u
|
||||
left join TS_DICTYPE ur on u.id = ur.dic_id
|
||||
where rn >= ${pager.startIndex}
|
||||
</select>
|
||||
|
||||
<select id="queryByList" resultMap="BaseResultMap" parameterType="com.adc.da.base.page.BasePage">
|
||||
select <include refid="Base_Column_List"/> from TS_USER
|
||||
<include refid="Base_Where_Clause"/>
|
||||
order by order_num,id
|
||||
</select>
|
||||
|
||||
<select id="getDictionaryEO" parameterType="java.lang.String" resultMap="ListMap">
|
||||
select
|
||||
*
|
||||
from TS_DICTIONARY dn
|
||||
where dn.VALID_FLAG = 0
|
||||
</select>
|
||||
|
||||
<select id="countByCodeOrName" resultType="java.lang.Integer" parameterType="com.adc.da.base.page.BasePage">
|
||||
select count(1) from TS_DICTIONARY
|
||||
where valid_flag='0'
|
||||
<if test="dictionaryCode != null" >
|
||||
and dictionary_code = #{dictionaryCode}
|
||||
</if>
|
||||
<if test="dictionaryName != null" >
|
||||
and dictionary_name = #{dictionaryName}
|
||||
</if>
|
||||
<if test="notId != null" >
|
||||
and id != #{notId}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- TS_DICTIONARY 列表总数-->
|
||||
<select id="queryAllDicByCount" resultType="java.lang.Integer" parameterType="com.adc.da.base.page.BasePage">
|
||||
select count(1) from TS_DICTIONARY u0
|
||||
<include refid="Base_Where_Clause"/>
|
||||
</select>
|
||||
|
||||
<!-- 查询TS_DICTIONARY列表 -->
|
||||
<select id="queryAllDicByPage" resultMap="BaseResultMap" parameterType="com.adc.da.base.page.BasePage">
|
||||
select <include refid="Base_Column_List" /> from
|
||||
(select tmp_tb.* , rownum rn from
|
||||
(select <include refid="Base_Column_List" /> from TS_DICTIONARY u0
|
||||
<include refid="Base_Where_Clause"/>
|
||||
order by order_num,u0.id
|
||||
) tmp_tb where rownum <= ${pager.endIndex})
|
||||
where rn >= ${pager.startIndex}
|
||||
</select>
|
||||
|
||||
<select id="getDictionarySelList" parameterType="java.lang.String" resultType="com.adc.da.sys.common.SelectionResult">
|
||||
select ID as value,DICTIONARY_NAME as label
|
||||
from TS_DICTIONARY
|
||||
where VALID_FLAG = '0'
|
||||
<if test="id != null" >
|
||||
and id != #{id}
|
||||
</if>
|
||||
order by order_num,id
|
||||
</select>
|
||||
|
||||
<select id="getDictionaryCodeSelList" parameterType="java.lang.String" resultType="com.adc.da.sys.common.SelectionResult">
|
||||
select dictionary_code as value,DICTIONARY_NAME as label
|
||||
from TS_DICTIONARY
|
||||
where VALID_FLAG = '0'
|
||||
<if test="id != null" >
|
||||
and id != #{id}
|
||||
</if>
|
||||
order by order_num,id
|
||||
</select>
|
||||
|
||||
<select id="queryUseByCount" resultType="java.lang.Integer"
|
||||
parameterType="java.lang.String">
|
||||
select count(*) from SAR_STAND_ATTR_DETAILS
|
||||
left join TS_DICTIONARY on TS_DICTIONARY.dictionary_code=SAR_STAND_ATTR_DETAILS.sel_val
|
||||
where SAR_STAND_ATTR_DETAILS.valid_flag =0 and TS_DICTIONARY.id=#{id}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user