feat:修改文件处理类型

dev
wangxy 8 months ago
parent 7f632da282
commit e6395c3828

@ -1,8 +1,8 @@
/* */ package com.archive.common.archiveUtil; package com.archive.common.archiveUtil;
/* */
/* */ import com.archive.common.archiveUtil.ExcelUtilArchive; import com.archive.common.archiveUtil.ExcelUtilArchive;
/* */ import org.apache.poi.ss.usermodel.CellType; import org.apache.poi.ss.usermodel.CellType;
/* */
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\archiveUtil\ExcelUtilArchive$1.class /* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\archiveUtil\ExcelUtilArchive$1.class

@ -1,146 +1,146 @@
/* */ package com.archive.common.convert; package com.archive.common.convert;
/* */
/* */ import com.aspose.cells.IndividualFontConfigs; import com.aspose.cells.IndividualFontConfigs;
/* */ import com.aspose.cells.License; import com.aspose.cells.License;
/* */ import com.aspose.cells.LoadOptions; import com.aspose.cells.LoadOptions;
/* */ import com.aspose.cells.PdfSaveOptions; import com.aspose.cells.PdfSaveOptions;
/* */ import com.aspose.cells.SaveOptions; import com.aspose.cells.SaveOptions;
/* */ import com.aspose.cells.Workbook; import com.aspose.cells.Workbook;
/* */ import java.io.ByteArrayInputStream; import java.io.ByteArrayInputStream;
/* */ import java.io.FileOutputStream; import java.io.FileOutputStream;
/* */ import java.io.InputStream; import java.io.InputStream;
/* */
/* */
/* */
/* */
/* */
/* */ public class ExcelToPdf public class ExcelToPdf
/* */ { {
/* */ public static void main(String[] args) { public static void main(String[] args) {
/* 20 */ excel2pdf("D:\\temp\\1.xls", "D:\\temp\\31.pdf"); excel2pdf("D:\\temp\\1.xls", "D:\\temp\\31.pdf");
/* */ } }
/* */
/* */
/* */
/* */
/* */ public static boolean getLicense() { public static boolean getLicense() {
/* 27 */ boolean result = false; boolean result = false;
/* */ try { try {
/* 29 */ String license = "<License>\r\n <Data>\r\n <Products>\r\n <Product>Aspose.Total for Java</Product>\r\n <Product>Aspose.Words for Java</Product>\r\n </Products>\r\n <EditionType>Enterprise</EditionType>\r\n <SubscriptionExpiry>20991231</SubscriptionExpiry>\r\n <LicenseExpiry>20991231</LicenseExpiry>\r\n <SerialNumber>8bfe198c-7f0c-4ef8-8ff0-acc3237bf0d7</SerialNumber>\r\n </Data>\r\n <Signature>sNLLKGMUdF0r8O1kKilWAGdgfs2BvJb/2Xp8p5iuDVfZXmhppo+d0Ran1P9TKdjV4ABwAgKXxJ3jcQTqE/2IRfqwnPf8itN8aFZlV3TJPYeD3yWE7IT55Gz6EijUpC7aKeoohTb4w2fpox58wWoF3SNp6sK6jDfiAUGEHYJ9pjU=</Signature>\r\n</License>"; String license = "<License>\r\n <Data>\r\n <Products>\r\n <Product>Aspose.Total for Java</Product>\r\n <Product>Aspose.Words for Java</Product>\r\n </Products>\r\n <EditionType>Enterprise</EditionType>\r\n <SubscriptionExpiry>20991231</SubscriptionExpiry>\r\n <LicenseExpiry>20991231</LicenseExpiry>\r\n <SerialNumber>8bfe198c-7f0c-4ef8-8ff0-acc3237bf0d7</SerialNumber>\r\n </Data>\r\n <Signature>sNLLKGMUdF0r8O1kKilWAGdgfs2BvJb/2Xp8p5iuDVfZXmhppo+d0Ran1P9TKdjV4ABwAgKXxJ3jcQTqE/2IRfqwnPf8itN8aFZlV3TJPYeD3yWE7IT55Gz6EijUpC7aKeoohTb4w2fpox58wWoF3SNp6sK6jDfiAUGEHYJ9pjU=</Signature>\r\n</License>";
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* 43 */ InputStream is = new ByteArrayInputStream(license.getBytes("UTF-8")); InputStream is = new ByteArrayInputStream(license.getBytes("UTF-8"));
/* 44 */ License aposeLic = new License(); License aposeLic = new License();
/* 45 */ aposeLic.setLicense(is); aposeLic.setLicense(is);
/* 46 */ result = true; result = true;
/* 47 */ } catch (Exception e) { } catch (Exception e) {
/* 48 */ e.printStackTrace(); e.printStackTrace();
/* */ } }
/* 50 */ return result; return result;
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static void excel2pdf(String sourceFilePath, String desFilePathd) { public static void excel2pdf(String sourceFilePath, String desFilePathd) {
/* 60 */ if (!getLicense()) { if (!getLicense()) {
/* */ return; return;
/* */ } }
/* */ try { try {
/* 64 */ if (isLinux()) { if (isLinux()) {
/* 65 */ IndividualFontConfigs configs = new IndividualFontConfigs(); IndividualFontConfigs configs = new IndividualFontConfigs();
/* 66 */ configs.setFontFolder("/usr/share/fonts/chinese", true); configs.setFontFolder("/usr/share/fonts/chinese", true);
/* 67 */ LoadOptions loadOptions = new LoadOptions(); LoadOptions loadOptions = new LoadOptions();
/* 68 */ loadOptions.setFontConfigs(configs); loadOptions.setFontConfigs(configs);
/* */ } }
/* */
/* */
/* */
/* 73 */ Workbook wb = new Workbook(sourceFilePath); Workbook wb = new Workbook(sourceFilePath);
/* */
/* 75 */ FileOutputStream fileOS = new FileOutputStream(desFilePathd); FileOutputStream fileOS = new FileOutputStream(desFilePathd);
/* 76 */ PdfSaveOptions pdfSaveOptions = new PdfSaveOptions(); PdfSaveOptions pdfSaveOptions = new PdfSaveOptions();
/* 77 */ pdfSaveOptions.setOnePagePerSheet(true); pdfSaveOptions.setOnePagePerSheet(true);
/* 78 */ int[] autoDrawSheets = { 3 }; int[] autoDrawSheets = { 3 };
/* */
/* 80 */ autoDraw(wb, autoDrawSheets); autoDraw(wb, autoDrawSheets);
/* 81 */ int[] showSheets = { 0 }; int[] showSheets = { 0 };
/* */
/* 83 */ printSheetPage(wb, showSheets); printSheetPage(wb, showSheets);
/* 84 */ wb.save(fileOS, (SaveOptions)pdfSaveOptions); wb.save(fileOS, (SaveOptions)pdfSaveOptions);
/* 85 */ fileOS.flush(); fileOS.flush();
/* 86 */ fileOS.close(); fileOS.close();
/* */ } }
/* 88 */ catch (Exception e) { catch (Exception e) {
/* 89 */ e.printStackTrace(); e.printStackTrace();
/* */ } }
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static void autoDraw(Workbook wb, int[] page) { public static void autoDraw(Workbook wb, int[] page) {
/* 99 */ if (null != page && page.length > 0) { if (null != page && page.length > 0) {
/* 100 */ for (int i = 0; i < page.length; i++) { for (int i = 0; i < page.length; i++) {
/* 101 */ wb.getWorksheets().get(i).getHorizontalPageBreaks().clear(); wb.getWorksheets().get(i).getHorizontalPageBreaks().clear();
/* 102 */ wb.getWorksheets().get(i).getVerticalPageBreaks().clear(); wb.getWorksheets().get(i).getVerticalPageBreaks().clear();
/* */ } }
/* */ } }
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static void printSheetPage(Workbook wb, int[] page) { public static void printSheetPage(Workbook wb, int[] page) {
/* */ int i; int i;
/* 114 */ for (i = 1; i < wb.getWorksheets().getCount(); i++) { for (i = 1; i < wb.getWorksheets().getCount(); i++) {
/* 115 */ wb.getWorksheets().get(i).setVisible(false); wb.getWorksheets().get(i).setVisible(false);
/* */ } }
/* 117 */ if (null == page || page.length == 0) { if (null == page || page.length == 0) {
/* 118 */ wb.getWorksheets().get(0).setVisible(true); wb.getWorksheets().get(0).setVisible(true);
/* */ } else { } else {
/* 120 */ for (i = 0; i < page.length; i++) { for (i = 0; i < page.length; i++) {
/* 121 */ wb.getWorksheets().get(i).setVisible(true); wb.getWorksheets().get(i).setVisible(true);
/* */ } }
/* */ } }
/* */ } }
/* */
/* */
/* */ public static boolean isLinux() { public static boolean isLinux() {
/* 128 */ return System.getProperty("os.name").toLowerCase().contains("linux"); return System.getProperty("os.name").toLowerCase().contains("linux");
/* */ } }
/* */
/* */ public static boolean isWindows() { public static boolean isWindows() {
/* 132 */ return System.getProperty("os.name").toLowerCase().contains("windows"); return System.getProperty("os.name").toLowerCase().contains("windows");
/* */ } }
/* */
/* */ public String JudgeSystem() { public String JudgeSystem() {
/* 136 */ if (isLinux()) if (isLinux())
/* 137 */ return "linux"; return "linux";
/* 138 */ if (isWindows()) { if (isWindows()) {
/* 139 */ return "windows"; return "windows";
/* */ } }
/* 141 */ return "other system"; return "other system";
/* */ } }
/* */ } }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\convert\ExcelToPdf.class /* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\common\convert\ExcelToPdf.class

@ -1,45 +1,45 @@
/* */ package com.archive.common.utils package com.archive.common.utils
; ;
/* */
/* */ import com.archive.common.utils.StringUtils; import com.archive.common.utils.StringUtils;
/* */ import java.io.PrintWriter; import java.io.PrintWriter;
/* */ import java.io.StringWriter; import java.io.StringWriter;
/* */ import org.apache.commons.lang3.exception.ExceptionUtils; import org.apache.commons.lang3.exception.ExceptionUtils;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class ExceptionUtil public class ExceptionUtil
/* */ { {
/* */ public static String getExceptionMessage(Throwable e) { public static String getExceptionMessage(Throwable e) {
/* 20 */ StringWriter sw = new StringWriter(); StringWriter sw = new StringWriter();
/* 21 */ e.printStackTrace(new PrintWriter(sw, true)); e.printStackTrace(new PrintWriter(sw, true));
/* 22 */ String str = sw.toString(); String str = sw.toString();
/* 23 */ return str; return str;
/* */ } }
/* */
/* */
/* */ public static String getRootErrorMseeage(Exception e) { public static String getRootErrorMseeage(Exception e) {
/* 28 */ Throwable root = ExceptionUtils.getRootCause(e); Throwable root = ExceptionUtils.getRootCause(e);
/* 29 */ root = (root == null) ? e : root; root = (root == null) ? e : root;
/* 30 */ if (root == null) if (root == null)
/* */ { {
/* 32 */ return ""; return "";
/* */ } }
/* 34 */ String msg = root.getMessage(); String msg = root.getMessage();
/* 35 */ if (msg == null) if (msg == null)
/* */ { {
/* 37 */ return "null"; return "null";
/* */ } }
/* 39 */ return StringUtils.defaultString(msg); return StringUtils.defaultString(msg);
/* */ } }
/* */ } }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\commo\\utils\ExceptionUtil.class /* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\commo\\utils\ExceptionUtil.class

@ -1,158 +1,158 @@
/* */ package com.archive.common.utils.html; package com.archive.common.utils.html;
/* */
/* */ import com.archive.common.utils.StringUtils; import com.archive.common.utils.StringUtils;
/* */ import com.archive.common.utils.html.HTMLFilter; import com.archive.common.utils.html.HTMLFilter;
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class EscapeUtil public class EscapeUtil
/* */ { {
/* */ public static final String RE_HTML_MARK = "(<[^<]*?>)|(<[\\s]*?/[^<]*?>)|(<[^<]*?/[\\s]*?>)"; public static final String RE_HTML_MARK = "(<[^<]*?>)|(<[\\s]*?/[^<]*?>)|(<[^<]*?/[\\s]*?>)";
/* 14 */ private static final char[][] TEXT = new char[64][]; private static final char[][] TEXT = new char[64][];
/* */
/* */
/* */ static { static {
/* 18 */ for (int i = 0; i < 64; i++) { for (int i = 0; i < 64; i++) {
/* */
/* 20 */ (new char[1])[0] = (char)i; TEXT[i] = new char[1]; (new char[1])[0] = (char)i; TEXT[i] = new char[1];
/* */ } }
/* */
/* */
/* 24 */ TEXT[39] = "&#039;".toCharArray(); TEXT[39] = "&#039;".toCharArray();
/* 25 */ TEXT[34] = "&#34;".toCharArray(); TEXT[34] = "&#34;".toCharArray();
/* 26 */ TEXT[38] = "&#38;".toCharArray(); TEXT[38] = "&#38;".toCharArray();
/* 27 */ TEXT[60] = "&#60;".toCharArray(); TEXT[60] = "&#60;".toCharArray();
/* 28 */ TEXT[62] = "&#62;".toCharArray(); TEXT[62] = "&#62;".toCharArray();
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static String escape(String text) { public static String escape(String text) {
/* 39 */ return encode(text); return encode(text);
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static String unescape(String content) { public static String unescape(String content) {
/* 50 */ return decode(content); return decode(content);
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static String clean(String content) { public static String clean(String content) {
/* 61 */ return (new HTMLFilter()).filter(content); return (new HTMLFilter()).filter(content);
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ private static String encode(String text) { private static String encode(String text) {
/* */ int len; int len;
/* 73 */ if (text == null || (len = text.length()) == 0) if (text == null || (len = text.length()) == 0)
/* */ { {
/* 75 */ return ""; return "";
/* */ } }
/* 77 */ StringBuilder buffer = new StringBuilder(len + (len >> 2)); StringBuilder buffer = new StringBuilder(len + (len >> 2));
/* */
/* 79 */ for (int i = 0; i < len; i++) { for (int i = 0; i < len; i++) {
/* */
/* 81 */ char c = text.charAt(i); char c = text.charAt(i);
/* 82 */ if (c < '@') { if (c < '@') {
/* */
/* 84 */ buffer.append(TEXT[c]); buffer.append(TEXT[c]);
/* */ } }
/* */ else { else {
/* */
/* 88 */ buffer.append(c); buffer.append(c);
/* */ } }
/* */ } }
/* 91 */ return buffer.toString(); return buffer.toString();
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static String decode(String content) { public static String decode(String content) {
/* 102 */ if (StringUtils.isEmpty(content)) if (StringUtils.isEmpty(content))
/* */ { {
/* 104 */ return content; return content;
/* */ } }
/* */
/* 107 */ StringBuilder tmp = new StringBuilder(content.length()); StringBuilder tmp = new StringBuilder(content.length());
/* 108 */ int lastPos = 0, pos = 0; int lastPos = 0, pos = 0;
/* */
/* 110 */ while (lastPos < content.length()) { while (lastPos < content.length()) {
/* */
/* 112 */ pos = content.indexOf("%", lastPos); pos = content.indexOf("%", lastPos);
/* 113 */ if (pos == lastPos) { if (pos == lastPos) {
/* */
/* 115 */ if (content.charAt(pos + 1) == 'u') { if (content.charAt(pos + 1) == 'u') {
/* */
/* 117 */ char c = (char)Integer.parseInt(content.substring(pos + 2, pos + 6), 16); char c = (char)Integer.parseInt(content.substring(pos + 2, pos + 6), 16);
/* 118 */ tmp.append(c); tmp.append(c);
/* 119 */ lastPos = pos + 6; lastPos = pos + 6;
/* */
/* */ continue; continue;
/* */ } }
/* 123 */ char ch = (char)Integer.parseInt(content.substring(pos + 1, pos + 3), 16); char ch = (char)Integer.parseInt(content.substring(pos + 1, pos + 3), 16);
/* 124 */ tmp.append(ch); tmp.append(ch);
/* 125 */ lastPos = pos + 3; lastPos = pos + 3;
/* */
/* */ continue; continue;
/* */ } }
/* */
/* 130 */ if (pos == -1) { if (pos == -1) {
/* */
/* 132 */ tmp.append(content.substring(lastPos)); tmp.append(content.substring(lastPos));
/* 133 */ lastPos = content.length(); lastPos = content.length();
/* */
/* */ continue; continue;
/* */ } }
/* 137 */ tmp.append(content.substring(lastPos, pos)); tmp.append(content.substring(lastPos, pos));
/* 138 */ lastPos = pos; lastPos = pos;
/* */ } }
/* */
/* */
/* 142 */ return tmp.toString(); return tmp.toString();
/* */ } }
/* */
/* */
/* */ public static void main(String[] args) { public static void main(String[] args) {
/* 147 */ String html = "<script>alert(1);</script>"; String html = "<script>alert(1);</script>";
/* */
/* */
/* */
/* 151 */ System.out.println(clean(html)); System.out.println(clean(html));
/* 152 */ System.out.println(escape(html)); System.out.println(escape(html));
/* 153 */ System.out.println(unescape(html)); System.out.println(unescape(html));
/* */ } }
/* */ } }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\commo\\utils\html\EscapeUtil.class /* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\commo\\utils\html\EscapeUtil.class

File diff suppressed because it is too large Load Diff

@ -1,82 +1,82 @@
/* */ package com.archive.framework.config.properties package com.archive.framework.config.properties
; ;
/* */
/* */ import com.alibaba.druid.pool.DruidDataSource; import com.alibaba.druid.pool.DruidDataSource;
/* */ import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
/* */ import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ @Configuration @Configuration
/* */ public class DruidProperties public class DruidProperties
/* */ { {
/* */ @Value("${spring.datasource.druid.initialSize}") @Value("${spring.datasource.druid.initialSize}")
/* */ private int initialSize; private int initialSize;
/* */ @Value("${spring.datasource.druid.minIdle}") @Value("${spring.datasource.druid.minIdle}")
/* */ private int minIdle; private int minIdle;
/* */ @Value("${spring.datasource.druid.maxActive}") @Value("${spring.datasource.druid.maxActive}")
/* */ private int maxActive; private int maxActive;
/* */ @Value("${spring.datasource.druid.maxWait}") @Value("${spring.datasource.druid.maxWait}")
/* */ private int maxWait; private int maxWait;
/* */ @Value("${spring.datasource.druid.timeBetweenEvictionRunsMillis}") @Value("${spring.datasource.druid.timeBetweenEvictionRunsMillis}")
/* */ private int timeBetweenEvictionRunsMillis; private int timeBetweenEvictionRunsMillis;
/* */ @Value("${spring.datasource.druid.minEvictableIdleTimeMillis}") @Value("${spring.datasource.druid.minEvictableIdleTimeMillis}")
/* */ private int minEvictableIdleTimeMillis; private int minEvictableIdleTimeMillis;
/* */ @Value("${spring.datasource.druid.maxEvictableIdleTimeMillis}") @Value("${spring.datasource.druid.maxEvictableIdleTimeMillis}")
/* */ private int maxEvictableIdleTimeMillis; private int maxEvictableIdleTimeMillis;
/* */ @Value("${spring.datasource.druid.validationQuery}") @Value("${spring.datasource.druid.validationQuery}")
/* */ private String validationQuery; private String validationQuery;
/* */ @Value("${spring.datasource.druid.testWhileIdle}") @Value("${spring.datasource.druid.testWhileIdle}")
/* */ private boolean testWhileIdle; private boolean testWhileIdle;
/* */ @Value("${spring.datasource.druid.testOnBorrow}") @Value("${spring.datasource.druid.testOnBorrow}")
/* */ private boolean testOnBorrow; private boolean testOnBorrow;
/* */ @Value("${spring.datasource.druid.testOnReturn}") @Value("${spring.datasource.druid.testOnReturn}")
/* */ private boolean testOnReturn; private boolean testOnReturn;
/* */
/* */ public DruidDataSource dataSource(DruidDataSource datasource) { public DruidDataSource dataSource(DruidDataSource datasource) {
/* 51 */ datasource.setInitialSize(this.initialSize); datasource.setInitialSize(this.initialSize);
/* 52 */ datasource.setMaxActive(this.maxActive); datasource.setMaxActive(this.maxActive);
/* 53 */ datasource.setMinIdle(this.minIdle); datasource.setMinIdle(this.minIdle);
/* */
/* */
/* 56 */ datasource.setMaxWait(this.maxWait); datasource.setMaxWait(this.maxWait);
/* */
/* */
/* 59 */ datasource.setTimeBetweenEvictionRunsMillis(this.timeBetweenEvictionRunsMillis); datasource.setTimeBetweenEvictionRunsMillis(this.timeBetweenEvictionRunsMillis);
/* */
/* */
/* 62 */ datasource.setMinEvictableIdleTimeMillis(this.minEvictableIdleTimeMillis); datasource.setMinEvictableIdleTimeMillis(this.minEvictableIdleTimeMillis);
/* 63 */ datasource.setMaxEvictableIdleTimeMillis(this.maxEvictableIdleTimeMillis); datasource.setMaxEvictableIdleTimeMillis(this.maxEvictableIdleTimeMillis);
/* */
/* */
/* */
/* */
/* 68 */ datasource.setValidationQuery(this.validationQuery); datasource.setValidationQuery(this.validationQuery);
/* */
/* 70 */ datasource.setTestWhileIdle(this.testWhileIdle); datasource.setTestWhileIdle(this.testWhileIdle);
/* */
/* 72 */ datasource.setTestOnBorrow(this.testOnBorrow); datasource.setTestOnBorrow(this.testOnBorrow);
/* */
/* 74 */ datasource.setTestOnReturn(this.testOnReturn); datasource.setTestOnReturn(this.testOnReturn);
/* 75 */ return datasource; return datasource;
/* */ } }
/* */ } }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\config\properties\DruidProperties.class /* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\config\properties\DruidProperties.class

@ -1,31 +1,31 @@
/* */ package com.archive.framework.datasource package com.archive.framework.datasource
; ;
/* */
/* */ import com.archive.framework.datasource.DynamicDataSourceContextHolder; import com.archive.framework.datasource.DynamicDataSourceContextHolder;
/* */ import java.util.Map; import java.util.Map;
/* */ import javax.sql.DataSource; import javax.sql.DataSource;
/* */ import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource; import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource;
/* */
/* */
/* */
/* */
/* */
/* */ public class DynamicDataSource public class DynamicDataSource
/* */ extends AbstractRoutingDataSource extends AbstractRoutingDataSource
/* */ { {
/* */ public DynamicDataSource(DataSource defaultTargetDataSource, Map<Object, Object> targetDataSources) { public DynamicDataSource(DataSource defaultTargetDataSource, Map<Object, Object> targetDataSources) {
/* 16 */ setDefaultTargetDataSource(defaultTargetDataSource); setDefaultTargetDataSource(defaultTargetDataSource);
/* 17 */ setTargetDataSources(targetDataSources); setTargetDataSources(targetDataSources);
/* 18 */ afterPropertiesSet(); afterPropertiesSet();
/* */ } }
/* */
/* */
/* */
/* */ protected Object determineCurrentLookupKey() { protected Object determineCurrentLookupKey() {
/* 24 */ return DynamicDataSourceContextHolder.getDataSourceType(); return DynamicDataSourceContextHolder.getDataSourceType();
/* */ } }
/* */ } }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\datasource\DynamicDataSource.class /* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\datasource\DynamicDataSource.class

@ -1,50 +1,50 @@
/* */ package com.archive.framework.datasource package com.archive.framework.datasource
; ;
/* */
/* */ import org.slf4j.Logger; import org.slf4j.Logger;
/* */ import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class DynamicDataSourceContextHolder public class DynamicDataSourceContextHolder
/* */ { {
/* 13 */ public static final Logger log = LoggerFactory.getLogger(com.archive.framework.datasource.DynamicDataSourceContextHolder.class); public static final Logger log = LoggerFactory.getLogger(com.archive.framework.datasource.DynamicDataSourceContextHolder.class);
/* */
/* */
/* */
/* */
/* */
/* 19 */ private static final ThreadLocal<String> CONTEXT_HOLDER = new ThreadLocal<>(); private static final ThreadLocal<String> CONTEXT_HOLDER = new ThreadLocal<>();
/* */
/* */
/* */
/* */
/* */
/* */ public static void setDataSourceType(String dsType) { public static void setDataSourceType(String dsType) {
/* 26 */ log.info("切换到{}数据源", dsType); log.info("切换到{}数据源", dsType);
/* 27 */ CONTEXT_HOLDER.set(dsType); CONTEXT_HOLDER.set(dsType);
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */ public static String getDataSourceType() { public static String getDataSourceType() {
/* 35 */ return CONTEXT_HOLDER.get(); return CONTEXT_HOLDER.get();
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */ public static void clearDataSourceType() { public static void clearDataSourceType() {
/* 43 */ CONTEXT_HOLDER.remove(); CONTEXT_HOLDER.remove();
/* */ } }
/* */ } }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\datasource\DynamicDataSourceContextHolder.class /* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\datasource\DynamicDataSourceContextHolder.class

@ -1,51 +1,51 @@
/* */ package com.archive.framework.web.service package com.archive.framework.web.service
; ;
/* */
/* */ import com.archive.project.system.dict.domain.DictData; import com.archive.project.system.dict.domain.DictData;
/* */ import com.archive.project.system.dict.service.IDictDataService; import com.archive.project.system.dict.service.IDictDataService;
/* */ import com.archive.project.system.dict.service.IDictTypeService; import com.archive.project.system.dict.service.IDictTypeService;
/* */ import java.util.List; import java.util.List;
/* */ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
/* */ import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ @Service("dict") @Service("dict")
/* */ public class DictService public class DictService
/* */ { {
/* */ @Autowired @Autowired
/* */ private IDictTypeService dictTypeService; private IDictTypeService dictTypeService;
/* */ @Autowired @Autowired
/* */ private IDictDataService dictDataService; private IDictDataService dictDataService;
/* */
/* */ public List<DictData> getType(String dictType) { public List<DictData> getType(String dictType) {
/* 32 */ return this.dictTypeService.selectDictDataByType(dictType); return this.dictTypeService.selectDictDataByType(dictType);
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public String getLabel(String dictType, String dictValue) { public String getLabel(String dictType, String dictValue) {
/* 44 */ return this.dictDataService.selectDictLabel(dictType, dictValue); return this.dictDataService.selectDictLabel(dictType, dictValue);
/* */ } }
/* */ } }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\web\service\DictService.class /* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\web\service\DictService.class

@ -1,113 +1,113 @@
/* */ package com.archive.project.document.controller package com.archive.project.document.controller
; ;
/* */
/* */ import com.archive.common.archiveUtil.TableUtil; import com.archive.common.archiveUtil.TableUtil;
/* */ import com.archive.framework.web.controller.BaseController; import com.archive.framework.web.controller.BaseController;
/* */ import com.archive.framework.web.domain.AjaxResult; import com.archive.framework.web.domain.AjaxResult;
/* */ import com.archive.framework.web.page.TableDataInfo; import com.archive.framework.web.page.TableDataInfo;
/* */ import com.archive.project.dasz.archivetype.domain.ArchiveType; import com.archive.project.dasz.archivetype.domain.ArchiveType;
/* */ import com.archive.project.dasz.archivetype.service.IArchiveTypeService; import com.archive.project.dasz.archivetype.service.IArchiveTypeService;
/* */ import com.archive.project.dasz.physicaltable.service.IPhysicalTableService; import com.archive.project.dasz.physicaltable.service.IPhysicalTableService;
/* */ import com.archive.project.dasz.physicaltablecolumn.service.IPhysicalTableColumnService; import com.archive.project.dasz.physicaltablecolumn.service.IPhysicalTableColumnService;
/* */ import com.archive.project.document.domain.Document; import com.archive.project.document.domain.Document;
/* */ import com.archive.project.document.service.IDocumentService; import com.archive.project.document.service.IDocumentService;
/* */ import java.util.List; import java.util.List;
/* */ import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
/* */ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
/* */ import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
/* */ import org.springframework.ui.ModelMap; import org.springframework.ui.ModelMap;
/* */ import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
/* */ import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PathVariable;
/* */ import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
/* */ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
/* */ import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseBody;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ @Controller @Controller
/* */ @RequestMapping({"/document"}) @RequestMapping({"/document"})
/* */ public class DocumentController public class DocumentController
/* */ extends BaseController extends BaseController
/* */ { {
/* 47 */ private String prefix = "document"; private String prefix = "document";
/* */
/* */ @Autowired @Autowired
/* */ private IDocumentService documentService; private IDocumentService documentService;
/* */
/* */ @Autowired @Autowired
/* */ private IArchiveTypeService archiveTypeService; private IArchiveTypeService archiveTypeService;
/* */
/* */ @Autowired @Autowired
/* */ private IPhysicalTableColumnService physicalTableColumnService; private IPhysicalTableColumnService physicalTableColumnService;
/* */
/* */ @Autowired @Autowired
/* */ private IPhysicalTableService physicalTableService; private IPhysicalTableService physicalTableService;
/* */
/* */
/* */ @RequiresPermissions({"document"}) @RequiresPermissions({"document"})
/* */ @GetMapping @GetMapping
/* */ public String document() { public String document() {
/* 65 */ return this.prefix + "/document"; return this.prefix + "/document";
/* */ } }
/* */
/* */
/* */ @RequiresPermissions({"document:qwgl"}) @RequiresPermissions({"document:qwgl"})
/* */ @GetMapping({"/qwgl/{archiveId}/{type}/{id}"}) @GetMapping({"/qwgl/{archiveId}/{type}/{id}"})
/* */ public String qwgl(@PathVariable("archiveId") long archiveId, @PathVariable("type") String type, @PathVariable("id") String id, ModelMap mmap) { public String qwgl(@PathVariable("archiveId") long archiveId, @PathVariable("type") String type, @PathVariable("id") String id, ModelMap mmap) {
/* 72 */ long tableId = TableUtil.getTableIdByArchiveTypeId(archiveId); long tableId = TableUtil.getTableIdByArchiveTypeId(archiveId);
/* 73 */ mmap.put("tableId", Long.valueOf(tableId)); mmap.put("tableId", Long.valueOf(tableId));
/* 74 */ mmap.put("fileId", id); mmap.put("fileId", id);
/* 75 */ mmap.put("archiveTypeId", Long.valueOf(archiveId)); mmap.put("archiveTypeId", Long.valueOf(archiveId));
/* 76 */ return this.prefix + "/document"; return this.prefix + "/document";
/* */ } }
/* */
/* */
/* */
/* */
/* */ @RequiresPermissions({"document:list"}) @RequiresPermissions({"document:list"})
/* */ @PostMapping({"/list"}) @PostMapping({"/list"})
/* */ @ResponseBody @ResponseBody
/* */ public TableDataInfo list(String ownerId, String tableId) { public TableDataInfo list(String ownerId, String tableId) {
/* 86 */ startPage(); startPage();
/* 87 */ Document document = new Document(); Document document = new Document();
/* 88 */ document.setTableId(tableId); document.setTableId(tableId);
/* 89 */ document.setOwnerid(ownerId); document.setOwnerid(ownerId);
/* 90 */ List<Document> list = this.documentService.selectDocumentList(document); List<Document> list = this.documentService.selectDocumentList(document);
/* 91 */ return getDataTable(list); return getDataTable(list);
/* */ } }
/* */
/* */ @PostMapping({"/delete"}) @PostMapping({"/delete"})
/* */ @ResponseBody @ResponseBody
/* */ public AjaxResult delete(String id, String tableId) throws Exception { public AjaxResult delete(String id, String tableId) throws Exception {
/* 97 */ boolean res = this.documentService.deleteDocument(id, tableId); boolean res = this.documentService.deleteDocument(id, tableId);
/* */
/* 99 */ return AjaxResult.success(!res ? "false" : "true"); return AjaxResult.success(!res ? "false" : "true");
/* */ } }
/* */
/* */ @PostMapping({"/getArchiveTypeByTableId"}) @PostMapping({"/getArchiveTypeByTableId"})
/* */ @ResponseBody @ResponseBody
/* */ public AjaxResult getArchiveTypeByTableId(String tableId) { public AjaxResult getArchiveTypeByTableId(String tableId) {
/* 105 */ ArchiveType archiveType = this.documentService.selectArchiveTypeByTableId(tableId); ArchiveType archiveType = this.documentService.selectArchiveTypeByTableId(tableId);
/* 106 */ return AjaxResult.success(archiveType); return AjaxResult.success(archiveType);
/* */ } }
/* */ } }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\document\controller\DocumentController.class /* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\document\controller\DocumentController.class

@ -1,140 +1,140 @@
/* */ package com.archive.project.document.domain; package com.archive.project.document.domain;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class Document public class Document
/* */ { {
/* */ private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/* */ private Long id; private Long id;
/* */ private String createTime; private String createTime;
/* */ private String createUser; private String createUser;
/* */ private String fileName; private String fileName;
/* */ private String filehz; private String filehz;
/* */ private String filesize; private String filesize;
/* */ private String filepath; private String filepath;
/* */ private String filewaterpath; private String filewaterpath;
/* */ private Long batcharchivetypeid; private Long batcharchivetypeid;
/* */ private String ownerid; private String ownerid;
/* */ private String tableId; private String tableId;
/* */
/* */ public Long getId() { public Long getId() {
/* 51 */ return this.id; return this.id;
/* */ } }
/* */
/* */ public void setId(Long id) { public void setId(Long id) {
/* 55 */ this.id = id; this.id = id;
/* */ } }
/* */
/* */ public String getCreateTime() { public String getCreateTime() {
/* 59 */ return this.createTime; return this.createTime;
/* */ } }
/* */
/* */ public void setCreateTime(String createTime) { public void setCreateTime(String createTime) {
/* 63 */ this.createTime = createTime; this.createTime = createTime;
/* */ } }
/* */
/* */ public String getCreateUser() { public String getCreateUser() {
/* 67 */ return this.createUser; return this.createUser;
/* */ } }
/* */
/* */ public void setCreateUser(String createUser) { public void setCreateUser(String createUser) {
/* 71 */ this.createUser = createUser; this.createUser = createUser;
/* */ } }
/* */
/* */ public String getFileName() { public String getFileName() {
/* 75 */ return this.fileName; return this.fileName;
/* */ } }
/* */
/* */ public void setFileName(String fileName) { public void setFileName(String fileName) {
/* 79 */ this.fileName = fileName; this.fileName = fileName;
/* */ } }
/* */
/* */ public String getFilehz() { public String getFilehz() {
/* 83 */ return this.filehz; return this.filehz;
/* */ } }
/* */
/* */ public void setFilehz(String filehz) { public void setFilehz(String filehz) {
/* 87 */ this.filehz = filehz; this.filehz = filehz;
/* */ } }
/* */
/* */ public String getFilesize() { public String getFilesize() {
/* 91 */ return this.filesize; return this.filesize;
/* */ } }
/* */
/* */ public void setFilesize(String filesize) { public void setFilesize(String filesize) {
/* 95 */ this.filesize = filesize; this.filesize = filesize;
/* */ } }
/* */
/* */ public String getFilepath() { public String getFilepath() {
/* 99 */ return this.filepath; return this.filepath;
/* */ } }
/* */
/* */ public void setFilepath(String filepath) { public void setFilepath(String filepath) {
/* 103 */ this.filepath = filepath; this.filepath = filepath;
/* */ } }
/* */
/* */ public String getFilewaterpath() { public String getFilewaterpath() {
/* 107 */ return this.filewaterpath; return this.filewaterpath;
/* */ } }
/* */
/* */ public void setFilewaterpath(String filewaterpath) { public void setFilewaterpath(String filewaterpath) {
/* 111 */ this.filewaterpath = filewaterpath; this.filewaterpath = filewaterpath;
/* */ } }
/* */
/* */ public Long getBatcharchivetypeid() { public Long getBatcharchivetypeid() {
/* 115 */ return this.batcharchivetypeid; return this.batcharchivetypeid;
/* */ } }
/* */
/* */ public void setBatcharchivetypeid(Long batcharchivetypeid) { public void setBatcharchivetypeid(Long batcharchivetypeid) {
/* 119 */ this.batcharchivetypeid = batcharchivetypeid; this.batcharchivetypeid = batcharchivetypeid;
/* */ } }
/* */
/* */ public String getOwnerid() { public String getOwnerid() {
/* 123 */ return this.ownerid; return this.ownerid;
/* */ } }
/* */
/* */ public void setOwnerid(String ownerid) { public void setOwnerid(String ownerid) {
/* 127 */ this.ownerid = ownerid; this.ownerid = ownerid;
/* */ } }
/* */
/* */ public String getTableId() { public String getTableId() {
/* 131 */ return this.tableId; return this.tableId;
/* */ } }
/* */
/* */ public void setTableId(String tableId) { public void setTableId(String tableId) {
/* 135 */ this.tableId = tableId; this.tableId = tableId;
/* */ } }
/* */ } }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\document\domain\Document.class /* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\document\domain\Document.class

@ -1,211 +1,211 @@
/* */ package com.archive.project.document.service.impl package com.archive.project.document.service.impl
; ;
/* */
/* */ import com.archive.common.archiveUtil.FileUtils; import com.archive.common.archiveUtil.FileUtils;
/* */ import com.archive.common.archiveUtil.TableUtil; import com.archive.common.archiveUtil.TableUtil;
/* */ import com.archive.common.utils.DateUtils; import com.archive.common.utils.DateUtils;
/* */ import com.archive.common.utils.security.ShiroUtils; import com.archive.common.utils.security.ShiroUtils;
/* */ import com.archive.framework.config.ArchiveConfig; import com.archive.framework.config.ArchiveConfig;
/* */ import com.archive.project.common.service.IExecuteSqlService; import com.archive.project.common.service.IExecuteSqlService;
/* */ import com.archive.project.dajs.archiveimportbatch.service.IArchiveImportBatchService; import com.archive.project.dajs.archiveimportbatch.service.IArchiveImportBatchService;
/* */ import com.archive.project.dasz.archivetype.domain.ArchiveType; import com.archive.project.dasz.archivetype.domain.ArchiveType;
/* */ import com.archive.project.dasz.archivetype.mapper.ArchiveTypeMapper; import com.archive.project.dasz.archivetype.mapper.ArchiveTypeMapper;
/* */ import com.archive.project.dasz.ccgl.service.ICcglService; import com.archive.project.dasz.ccgl.service.ICcglService;
/* */ import com.archive.project.dasz.physicaltable.domain.PhysicalTable; import com.archive.project.dasz.physicaltable.domain.PhysicalTable;
/* */ import com.archive.project.dasz.physicaltable.mapper.PhysicalTableMapper; import com.archive.project.dasz.physicaltable.mapper.PhysicalTableMapper;
/* */ import com.archive.project.dasz.physicaltablecolumn.mapper.PhysicalTableColumnMapper; import com.archive.project.dasz.physicaltablecolumn.mapper.PhysicalTableColumnMapper;
/* */ import com.archive.project.document.domain.Document; import com.archive.project.document.domain.Document;
/* */ import com.archive.project.document.service.IDocumentService; import com.archive.project.document.service.IDocumentService;
/* */ import com.archive.project.system.dict.service.IDictTypeService; import com.archive.project.system.dict.service.IDictTypeService;
/* */ import com.archive.project.system.user.domain.User; import com.archive.project.system.user.domain.User;
/* */ import java.io.File; import java.io.File;
/* */ import java.io.IOException; import java.io.IOException;
/* */ import java.util.ArrayList; import java.util.ArrayList;
/* */ import java.util.HashMap; import java.util.HashMap;
/* */ import java.util.LinkedHashMap; import java.util.LinkedHashMap;
/* */ import java.util.List; import java.util.List;
/* */ import java.util.Map; import java.util.Map;
/* */ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
/* */ import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
/* */ import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ @Service @Service
/* */ public class DocumentServiceImpl public class DocumentServiceImpl
/* */ implements IDocumentService implements IDocumentService
/* */ { {
/* */ @Autowired @Autowired
/* */ private ArchiveTypeMapper archiveTypeMapper; private ArchiveTypeMapper archiveTypeMapper;
/* */ @Autowired @Autowired
/* */ private PhysicalTableMapper physicalTableMapper; private PhysicalTableMapper physicalTableMapper;
/* */ @Autowired @Autowired
/* */ private PhysicalTableColumnMapper physicalTableColumnMapper; private PhysicalTableColumnMapper physicalTableColumnMapper;
/* */ @Autowired @Autowired
/* */ private IExecuteSqlService executeSqlService; private IExecuteSqlService executeSqlService;
/* */ @Autowired @Autowired
/* */ private ICcglService ccglService; private ICcglService ccglService;
/* */ @Autowired @Autowired
/* */ private IDictTypeService dictTypeService; private IDictTypeService dictTypeService;
/* */ @Autowired @Autowired
/* */ private IArchiveImportBatchService iArchiveImportBatchService; private IArchiveImportBatchService iArchiveImportBatchService;
/* */
/* */ public List<Document> selectDocumentList(Document document) { public List<Document> selectDocumentList(Document document) {
/* 64 */ List<Document> list = new ArrayList<>(); List<Document> list = new ArrayList<>();
/* 65 */ if (document.getOwnerid() != null && document.getTableId() != null) { if (document.getOwnerid() != null && document.getTableId() != null) {
/* 66 */ String ownerid = document.getOwnerid(); String ownerid = document.getOwnerid();
/* 67 */ String tableId = document.getTableId(); String tableId = document.getTableId();
/* 68 */ String tableName = TableUtil.getTableName(Long.valueOf(Long.parseLong(tableId))); String tableName = TableUtil.getTableName(Long.valueOf(Long.parseLong(tableId)));
/* 69 */ String docuumentTableName = tableName.toLowerCase().replace("_folder", "_document"); String docuumentTableName = tableName.toLowerCase().replace("_folder", "_document");
/* 70 */ docuumentTableName = docuumentTableName.toLowerCase().replace("_file", "_document"); docuumentTableName = docuumentTableName.toLowerCase().replace("_file", "_document");
/* 71 */ String docTableId = TableUtil.getTableId(docuumentTableName); String docTableId = TableUtil.getTableId(docuumentTableName);
/* 72 */ String sql = "select id,create_Time,create_User,fileName,filehz,filesize,filepath,filewaterpath,batcharchivetypeid,ownerid,tableId from " + docuumentTableName + " where ownerid='" + ownerid + "' and tableId='" + tableId + "'"; String sql = "select id,create_Time,create_User,fileName,filehz,filesize,filepath,filewaterpath,batcharchivetypeid,ownerid,tableId from " + docuumentTableName + " where ownerid='" + ownerid + "' and tableId='" + tableId + "'";
/* */
/* 74 */ List<LinkedHashMap<String, Object>> datalist = this.executeSqlService.queryList(sql); List<LinkedHashMap<String, Object>> datalist = this.executeSqlService.queryList(sql);
/* 75 */ for (int i = 0; i < datalist.size(); i++) { for (int i = 0; i < datalist.size(); i++) {
/* 76 */ Document dc = new Document(); Document dc = new Document();
/* 77 */ dc.setId(Long.valueOf((((LinkedHashMap)datalist.get(i)).get("id") == null) ? 0L : Long.parseLong(((LinkedHashMap)datalist.get(i)).get("id").toString()))); dc.setId(Long.valueOf((((LinkedHashMap)datalist.get(i)).get("id") == null) ? 0L : Long.parseLong(((LinkedHashMap)datalist.get(i)).get("id").toString())));
/* 78 */ dc.setCreateTime((((LinkedHashMap)datalist.get(i)).get("create_Time") == null) ? "" : ((LinkedHashMap)datalist.get(i)).get("create_Time").toString()); dc.setCreateTime((((LinkedHashMap)datalist.get(i)).get("create_Time") == null) ? "" : ((LinkedHashMap)datalist.get(i)).get("create_Time").toString());
/* 79 */ dc.setCreateUser((((LinkedHashMap)datalist.get(i)).get("create_User") == null) ? "" : ((LinkedHashMap)datalist.get(i)).get("create_User").toString()); dc.setCreateUser((((LinkedHashMap)datalist.get(i)).get("create_User") == null) ? "" : ((LinkedHashMap)datalist.get(i)).get("create_User").toString());
/* 80 */ dc.setFileName((((LinkedHashMap)datalist.get(i)).get("fileName") == null) ? "" : ((LinkedHashMap)datalist.get(i)).get("fileName").toString()); dc.setFileName((((LinkedHashMap)datalist.get(i)).get("fileName") == null) ? "" : ((LinkedHashMap)datalist.get(i)).get("fileName").toString());
/* 81 */ dc.setFilehz((((LinkedHashMap)datalist.get(i)).get("filehz") == null) ? "" : ((LinkedHashMap)datalist.get(i)).get("filehz").toString()); dc.setFilehz((((LinkedHashMap)datalist.get(i)).get("filehz") == null) ? "" : ((LinkedHashMap)datalist.get(i)).get("filehz").toString());
/* 82 */ dc.setFilesize((((LinkedHashMap)datalist.get(i)).get("filesize") == null) ? "" : ((LinkedHashMap)datalist.get(i)).get("filesize").toString()); dc.setFilesize((((LinkedHashMap)datalist.get(i)).get("filesize") == null) ? "" : ((LinkedHashMap)datalist.get(i)).get("filesize").toString());
/* 83 */ dc.setFilepath((((LinkedHashMap)datalist.get(i)).get("filepath") == null) ? "" : ((LinkedHashMap)datalist.get(i)).get("filepath").toString()); dc.setFilepath((((LinkedHashMap)datalist.get(i)).get("filepath") == null) ? "" : ((LinkedHashMap)datalist.get(i)).get("filepath").toString());
/* 84 */ dc.setFilewaterpath((((LinkedHashMap)datalist.get(i)).get("filewaterpath") == null) ? "" : ((LinkedHashMap)datalist.get(i)).get("filewaterpath").toString()); dc.setFilewaterpath((((LinkedHashMap)datalist.get(i)).get("filewaterpath") == null) ? "" : ((LinkedHashMap)datalist.get(i)).get("filewaterpath").toString());
/* 85 */ dc.setBatcharchivetypeid(Long.valueOf((((LinkedHashMap)datalist.get(i)).get("batcharchivetypeid") == null) ? 0L : Long.parseLong(((LinkedHashMap)datalist.get(i)).get("batcharchivetypeid").toString()))); dc.setBatcharchivetypeid(Long.valueOf((((LinkedHashMap)datalist.get(i)).get("batcharchivetypeid") == null) ? 0L : Long.parseLong(((LinkedHashMap)datalist.get(i)).get("batcharchivetypeid").toString())));
/* 86 */ dc.setOwnerid((((LinkedHashMap)datalist.get(i)).get("ownerid") == null) ? "0" : ((LinkedHashMap)datalist.get(i)).get("ownerid").toString()); dc.setOwnerid((((LinkedHashMap)datalist.get(i)).get("ownerid") == null) ? "0" : ((LinkedHashMap)datalist.get(i)).get("ownerid").toString());
/* 87 */ dc.setTableId((((LinkedHashMap)datalist.get(i)).get("tableId") == null) ? "0" : ((LinkedHashMap)datalist.get(i)).get("tableId").toString()); dc.setTableId((((LinkedHashMap)datalist.get(i)).get("tableId") == null) ? "0" : ((LinkedHashMap)datalist.get(i)).get("tableId").toString());
/* 88 */ list.add(dc); list.add(dc);
/* */ } }
/* */ } }
/* 91 */ return list; return list;
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public Map<String, Object> getTableIdByArchiveTypeId(String archiveTypeId, String type) { public Map<String, Object> getTableIdByArchiveTypeId(String archiveTypeId, String type) {
/* 105 */ Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
/* 106 */ PhysicalTable physicalTable = new PhysicalTable(); PhysicalTable physicalTable = new PhysicalTable();
/* 107 */ physicalTable.setTableCode(type); physicalTable.setTableCode(type);
/* 108 */ physicalTable.setArchivetypeid(archiveTypeId); physicalTable.setArchivetypeid(archiveTypeId);
/* 109 */ List<PhysicalTable> tablesList = this.physicalTableMapper.selectPhysicalTableList(physicalTable); List<PhysicalTable> tablesList = this.physicalTableMapper.selectPhysicalTableList(physicalTable);
/* 110 */ if (tablesList != null && tablesList.size() > 0) { if (tablesList != null && tablesList.size() > 0) {
/* 111 */ String tableName = ((PhysicalTable)tablesList.get(0)).getTablename(); String tableName = ((PhysicalTable)tablesList.get(0)).getTablename();
/* 112 */ Long tableId = ((PhysicalTable)tablesList.get(0)).getId(); Long tableId = ((PhysicalTable)tablesList.get(0)).getId();
/* 113 */ map.put("tableId", tableId); map.put("tableId", tableId);
/* 114 */ map.put("tableName", tableName); map.put("tableName", tableName);
/* */ } }
/* 116 */ return map; return map;
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public boolean uploadFile(MultipartFile[] files, long tableId, long id) throws IOException { public boolean uploadFile(MultipartFile[] files, long tableId, long id) throws IOException {
/* 128 */ boolean res = false; boolean res = false;
/* 129 */ if (files != null) { if (files != null) {
/* 130 */ for (int i = 0; i < files.length; i++) { for (int i = 0; i < files.length; i++) {
/* 131 */ String fileName = files[i].getOriginalFilename(); String fileName = files[i].getOriginalFilename();
/* */
/* */
/* 134 */ String xdlj = this.ccglService.getCreateDocumentPathByFile(id, tableId); String xdlj = this.ccglService.getCreateDocumentPathByFile(id, tableId);
/* 135 */ String filepath = ArchiveConfig.getInstance().getUploadPath() + File.separator + "DocumentFile" + File.separator + xdlj; String filepath = ArchiveConfig.getInstance().getUploadPath() + File.separator + "DocumentFile" + File.separator + xdlj;
/* */
/* 137 */ File localFile = new File(filepath); File localFile = new File(filepath);
/* 138 */ if (!localFile.exists()) { if (!localFile.exists()) {
/* 139 */ localFile.mkdirs(); localFile.mkdirs();
/* */ } }
/* 141 */ String path = filepath + File.separator + fileName; String path = filepath + File.separator + fileName;
/* 142 */ File server_file = new File(path); File server_file = new File(path);
/* 143 */ files[i].transferTo(server_file); files[i].transferTo(server_file);
/* 144 */ String newfileName = server_file.getName().substring(0, server_file.getName().lastIndexOf(".")); String newfileName = server_file.getName().substring(0, server_file.getName().lastIndexOf("."));
/* 145 */ String hz = server_file.getName().substring(server_file.getName().lastIndexOf(".") + 1, server_file.getName().length()); String hz = server_file.getName().substring(server_file.getName().lastIndexOf(".") + 1, server_file.getName().length());
/* 146 */ String fileSize = FileUtils.changeValueType(Long.valueOf(server_file.length())); String fileSize = FileUtils.changeValueType(Long.valueOf(server_file.length()));
/* */
/* 148 */ String tableName = TableUtil.getTableName(Long.valueOf(tableId)); String tableName = TableUtil.getTableName(Long.valueOf(tableId));
/* 149 */ String docuumentTableName = tableName.toLowerCase().replace("_file", "_document"); String docuumentTableName = tableName.toLowerCase().replace("_file", "_document");
/* 150 */ String docTableId = TableUtil.getTableId(docuumentTableName); String docTableId = TableUtil.getTableId(docuumentTableName);
/* 151 */ long newId = this.iArchiveImportBatchService.getTableNewId(Long.parseLong(docTableId)); long newId = this.iArchiveImportBatchService.getTableNewId(Long.parseLong(docTableId));
/* 152 */ User user = ShiroUtils.getSysUser(); User user = ShiroUtils.getSysUser();
/* 153 */ String loginName = user.getLoginName(); String loginName = user.getLoginName();
/* */
/* */
/* 156 */ String inserSql = "insert into " + docuumentTableName + "(id,ownerid,filename,filesize,filepath,filehz,tableId,create_user,create_time) values(" + newId + "," + id + ",'" + newfileName + "','" + fileSize + "','" + server_file.getPath().replaceAll("\\\\", "\\\\\\\\") + "','" + hz + "','" + tableId + "','" + loginName + "','" + DateUtils.getTime() + "')"; String inserSql = "insert into " + docuumentTableName + "(id,ownerid,filename,filesize,filepath,filehz,tableId,create_user,create_time) values(" + newId + "," + id + ",'" + newfileName + "','" + fileSize + "','" + server_file.getPath().replaceAll("\\\\", "\\\\\\\\") + "','" + hz + "','" + tableId + "','" + loginName + "','" + DateUtils.getTime() + "')";
/* 157 */ res = this.executeSqlService.insert(inserSql); res = this.executeSqlService.insert(inserSql);
/* 158 */ System.out.println("文件" + path + "上传成功"); System.out.println("文件" + path + "上传成功");
/* */ } }
/* */ } }
/* 161 */ return res; return res;
/* */ } }
/* */
/* */
/* */ public boolean deleteDocument(String id, String tableId) throws Exception { public boolean deleteDocument(String id, String tableId) throws Exception {
/* 166 */ boolean res = false; boolean res = false;
/* 167 */ String fileTableName = TableUtil.getTableName(Long.valueOf(Long.parseLong(tableId))); String fileTableName = TableUtil.getTableName(Long.valueOf(Long.parseLong(tableId)));
/* 168 */ String docTableName = fileTableName.toUpperCase().replace("_FOLDER", "_DOCUMENT"); String docTableName = fileTableName.toUpperCase().replace("_FOLDER", "_DOCUMENT");
/* 169 */ docTableName = docTableName.toUpperCase().replace("_FILE", "_DOCUMENT"); docTableName = docTableName.toUpperCase().replace("_FILE", "_DOCUMENT");
/* */
/* */
/* 172 */ String selectSql = "select filepath,filewaterpath,ownerid from " + docTableName + " where id=" + id; String selectSql = "select filepath,filewaterpath,ownerid from " + docTableName + " where id=" + id;
/* 173 */ List<LinkedHashMap<String, Object>> datalist = this.executeSqlService.queryList(selectSql); List<LinkedHashMap<String, Object>> datalist = this.executeSqlService.queryList(selectSql);
/* 174 */ if (datalist != null && datalist.size() > 0 && datalist.get(0) != null) { if (datalist != null && datalist.size() > 0 && datalist.get(0) != null) {
/* 175 */ String path = (((LinkedHashMap)datalist.get(0)).get("filepath") == null) ? "" : ((LinkedHashMap)datalist.get(0)).get("filepath").toString(); String path = (((LinkedHashMap)datalist.get(0)).get("filepath") == null) ? "" : ((LinkedHashMap)datalist.get(0)).get("filepath").toString();
/* */
/* 177 */ String waterPath = (((LinkedHashMap)datalist.get(0)).get("filewaterpath") == null) ? "" : ((LinkedHashMap)datalist.get(0)).get("filewaterpath").toString(); String waterPath = (((LinkedHashMap)datalist.get(0)).get("filewaterpath") == null) ? "" : ((LinkedHashMap)datalist.get(0)).get("filewaterpath").toString();
/* 178 */ String ownerId = (((LinkedHashMap)datalist.get(0)).get("ownerid") == null) ? "" : ((LinkedHashMap)datalist.get(0)).get("ownerid").toString(); String ownerId = (((LinkedHashMap)datalist.get(0)).get("ownerid") == null) ? "" : ((LinkedHashMap)datalist.get(0)).get("ownerid").toString();
/* 179 */ File file = new File(path); File file = new File(path);
/* 180 */ if (file.exists()) { if (file.exists()) {
/* 181 */ file.delete(); file.delete();
/* */ } }
/* 183 */ File waterFile = new File(waterPath); File waterFile = new File(waterPath);
/* 184 */ if (waterFile.exists()) { if (waterFile.exists()) {
/* 185 */ waterFile.delete(); waterFile.delete();
/* */ } }
/* 187 */ String sql = "delete from " + docTableName + " where id=" + id; String sql = "delete from " + docTableName + " where id=" + id;
/* 188 */ res = this.executeSqlService.delete(sql); res = this.executeSqlService.delete(sql);
/* */
/* 190 */ String updateSql = "update " + fileTableName + " set dqzws=dqzws-1 where id=" + ownerId; String updateSql = "update " + fileTableName + " set dqzws=dqzws-1 where id=" + ownerId;
/* 191 */ this.executeSqlService.update(updateSql); this.executeSqlService.update(updateSql);
/* */ } }
/* 193 */ return res; return res;
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public ArchiveType selectArchiveTypeByTableId(String tableId) { public ArchiveType selectArchiveTypeByTableId(String tableId) {
/* 203 */ long archiveTypeId = TableUtil.getArchiveTypeIdByTableId(Long.parseLong(tableId)); long archiveTypeId = TableUtil.getArchiveTypeIdByTableId(Long.parseLong(tableId));
/* 204 */ return this.archiveTypeMapper.selectArchiveTypeById(Long.valueOf(archiveTypeId)); return this.archiveTypeMapper.selectArchiveTypeById(Long.valueOf(archiveTypeId));
/* */ } }
/* */ } }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\document\service\impl\DocumentServiceImpl.class /* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\document\service\impl\DocumentServiceImpl.class

@ -1,30 +1,30 @@
/* */ package com.archive.project.monitor.druid package com.archive.project.monitor.druid
; ;
/* */
/* */ import com.archive.framework.web.controller.BaseController; import com.archive.framework.web.controller.BaseController;
/* */ import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
/* */ import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
/* */ import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
/* */ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
/* */
/* */
/* */
/* */
/* */
/* */ @Controller @Controller
/* */ @RequestMapping({"/monitor/data"}) @RequestMapping({"/monitor/data"})
/* */ public class DruidController public class DruidController
/* */ extends BaseController extends BaseController
/* */ { {
/* 18 */ private String prefix = "/druid"; private String prefix = "/druid";
/* */
/* */
/* */ @RequiresPermissions({"monitor:data:view"}) @RequiresPermissions({"monitor:data:view"})
/* */ @GetMapping @GetMapping
/* */ public String index() { public String index() {
/* 24 */ return redirect(this.prefix + "/index"); return redirect(this.prefix + "/index");
/* */ } }
/* */ } }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\monitor\druid\DruidController.class /* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\monitor\druid\DruidController.class

@ -1,408 +1,408 @@
/* */ package com.archive.project.system.dept.service package com.archive.project.system.dept.service
; ;
/* */
/* */ import com.archive.common.exception.BusinessException; import com.archive.common.exception.BusinessException;
/* */ import com.archive.common.utils.StringUtils; import com.archive.common.utils.StringUtils;
/* */ import com.archive.common.utils.security.ShiroUtils; import com.archive.common.utils.security.ShiroUtils;
/* */ import com.archive.framework.aspectj.lang.annotation.DataScope; import com.archive.framework.aspectj.lang.annotation.DataScope;
/* */ import com.archive.framework.config.ArchiveConfig; import com.archive.framework.config.ArchiveConfig;
/* */ import com.archive.framework.web.domain.Ztree; import com.archive.framework.web.domain.Ztree;
/* */ import com.archive.project.system.dept.domain.Dept; import com.archive.project.system.dept.domain.Dept;
/* */ import com.archive.project.system.dept.mapper.DeptMapper; import com.archive.project.system.dept.mapper.DeptMapper;
/* */ import com.archive.project.system.dept.service.IDeptService; import com.archive.project.system.dept.service.IDeptService;
/* */ import com.archive.project.system.role.domain.Role; import com.archive.project.system.role.domain.Role;
/* */ import java.util.ArrayList; import java.util.ArrayList;
/* */ import java.util.Iterator; import java.util.Iterator;
/* */ import java.util.List; import java.util.List;
/* */ import org.apache.commons.lang3.ArrayUtils; import org.apache.commons.lang3.ArrayUtils;
/* */ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
/* */ import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
/* */ import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ @Service @Service
/* */ public class DeptServiceImpl public class DeptServiceImpl
/* */ implements IDeptService implements IDeptService
/* */ { {
/* */ @Autowired @Autowired
/* */ private DeptMapper deptMapper; private DeptMapper deptMapper;
/* */ @Autowired @Autowired
/* */ private ArchiveConfig archiveConfig; private ArchiveConfig archiveConfig;
/* */
/* */ @DataScope(deptAlias = "d") @DataScope(deptAlias = "d")
/* */ public List<Dept> selectDeptList(Dept dept) { public List<Dept> selectDeptList(Dept dept) {
/* 47 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { if ("mysql".equals(this.archiveConfig.getDatabaseType())) {
/* 48 */ return this.deptMapper.selectDeptList(dept); return this.deptMapper.selectDeptList(dept);
/* */ } }
/* 50 */ if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { if ("sqlite".equals(this.archiveConfig.getDatabaseType())) {
/* 51 */ return this.deptMapper.selectDeptListSqlite(dept); return this.deptMapper.selectDeptListSqlite(dept);
/* */ } }
/* 53 */ return this.deptMapper.selectDeptList(dept); return this.deptMapper.selectDeptList(dept);
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ @DataScope(deptAlias = "d") @DataScope(deptAlias = "d")
/* */ public List<Ztree> selectDeptTree(Dept dept) { public List<Ztree> selectDeptTree(Dept dept) {
/* 68 */ List<Dept> deptList = null; List<Dept> deptList = null;
/* 69 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { if ("mysql".equals(this.archiveConfig.getDatabaseType())) {
/* 70 */ deptList = this.deptMapper.selectDeptList(dept); deptList = this.deptMapper.selectDeptList(dept);
/* */ } }
/* 72 */ else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) {
/* 73 */ deptList = this.deptMapper.selectDeptListSqlite(dept); deptList = this.deptMapper.selectDeptListSqlite(dept);
/* */ } }
/* 75 */ List<Ztree> ztrees = initZtree(deptList); List<Ztree> ztrees = initZtree(deptList);
/* 76 */ return ztrees; return ztrees;
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ @DataScope(deptAlias = "d") @DataScope(deptAlias = "d")
/* */ public List<Ztree> selectDeptTreeExcludeChild(Dept dept) { public List<Ztree> selectDeptTreeExcludeChild(Dept dept) {
/* 89 */ Long deptId = dept.getDeptId(); Long deptId = dept.getDeptId();
/* 90 */ List<Dept> deptList = null; List<Dept> deptList = null;
/* 91 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { if ("mysql".equals(this.archiveConfig.getDatabaseType())) {
/* 92 */ deptList = this.deptMapper.selectDeptList(dept); deptList = this.deptMapper.selectDeptList(dept);
/* */ } }
/* 94 */ else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) {
/* 95 */ deptList = this.deptMapper.selectDeptListSqlite(dept); deptList = this.deptMapper.selectDeptListSqlite(dept);
/* */ } }
/* 97 */ Iterator<Dept> it = deptList.iterator(); Iterator<Dept> it = deptList.iterator();
/* 98 */ while (it.hasNext()) { while (it.hasNext()) {
/* */
/* 100 */ Dept d = it.next(); Dept d = it.next();
/* 101 */ if (d.getDeptId().intValue() == deptId.longValue() || if (d.getDeptId().intValue() == deptId.longValue() ||
/* 102 */ ArrayUtils.contains((Object[])StringUtils.split(d.getAncestors(), ","), deptId + "")) ArrayUtils.contains((Object[])StringUtils.split(d.getAncestors(), ","), deptId + ""))
/* */ { {
/* 104 */ it.remove(); it.remove();
/* */ } }
/* */ } }
/* 107 */ List<Ztree> ztrees = initZtree(deptList); List<Ztree> ztrees = initZtree(deptList);
/* 108 */ return ztrees; return ztrees;
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public List<Ztree> roleDeptTreeData(Role role) { public List<Ztree> roleDeptTreeData(Role role) {
/* 120 */ Long roleId = role.getRoleId(); Long roleId = role.getRoleId();
/* 121 */ List<Ztree> ztrees = new ArrayList<>(); List<Ztree> ztrees = new ArrayList<>();
/* 122 */ List<Dept> deptList = selectDeptList(new Dept()); List<Dept> deptList = selectDeptList(new Dept());
/* 123 */ if (StringUtils.isNotNull(roleId)) { if (StringUtils.isNotNull(roleId)) {
/* */
/* 125 */ List<String> roleDeptList = null; List<String> roleDeptList = null;
/* 126 */ if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { if ("sqlite".equals(this.archiveConfig.getDatabaseType())) {
/* 127 */ roleDeptList = this.deptMapper.selectRoleDeptTreeSqlite(roleId); roleDeptList = this.deptMapper.selectRoleDeptTreeSqlite(roleId);
/* */ } else { } else {
/* 129 */ roleDeptList = this.deptMapper.selectRoleDeptTree(roleId); roleDeptList = this.deptMapper.selectRoleDeptTree(roleId);
/* */ } }
/* */
/* 132 */ ztrees = initZtree(deptList, roleDeptList); ztrees = initZtree(deptList, roleDeptList);
/* */ } }
/* */ else { else {
/* */
/* 136 */ ztrees = initZtree(deptList); ztrees = initZtree(deptList);
/* */ } }
/* 138 */ return ztrees; return ztrees;
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public List<Ztree> initZtree(List<Dept> deptList) { public List<Ztree> initZtree(List<Dept> deptList) {
/* 149 */ return initZtree(deptList, null); return initZtree(deptList, null);
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public List<Ztree> initZtree(List<Dept> deptList, List<String> roleDeptList) { public List<Ztree> initZtree(List<Dept> deptList, List<String> roleDeptList) {
/* 161 */ List<Ztree> ztrees = new ArrayList<>(); List<Ztree> ztrees = new ArrayList<>();
/* 162 */ boolean isCheck = StringUtils.isNotNull(roleDeptList); boolean isCheck = StringUtils.isNotNull(roleDeptList);
/* 163 */ for (Dept dept : deptList) { for (Dept dept : deptList) {
/* */
/* 165 */ if ("0".equals(dept.getStatus())) { if ("0".equals(dept.getStatus())) {
/* */
/* 167 */ Ztree ztree = new Ztree(); Ztree ztree = new Ztree();
/* 168 */ ztree.setId(dept.getDeptId()); ztree.setId(dept.getDeptId());
/* 169 */ ztree.setpId(dept.getParentId()); ztree.setpId(dept.getParentId());
/* 170 */ ztree.setName(dept.getDeptName()); ztree.setName(dept.getDeptName());
/* 171 */ ztree.setTitle(dept.getDeptName()); ztree.setTitle(dept.getDeptName());
/* 172 */ if (isCheck) if (isCheck)
/* */ { {
/* 174 */ ztree.setChecked(roleDeptList.contains(dept.getDeptId() + dept.getDeptName())); ztree.setChecked(roleDeptList.contains(dept.getDeptId() + dept.getDeptName()));
/* */ } }
/* 176 */ ztrees.add(ztree); ztrees.add(ztree);
/* */ } }
/* */ } }
/* 179 */ return ztrees; return ztrees;
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public int selectDeptCount(Long parentId) { public int selectDeptCount(Long parentId) {
/* 191 */ Dept dept = new Dept(); Dept dept = new Dept();
/* 192 */ dept.setParentId(parentId); dept.setParentId(parentId);
/* 193 */ return this.deptMapper.selectDeptCount(dept); return this.deptMapper.selectDeptCount(dept);
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public boolean checkDeptExistUser(Long deptId) { public boolean checkDeptExistUser(Long deptId) {
/* 205 */ int result = this.deptMapper.checkDeptExistUser(deptId); int result = this.deptMapper.checkDeptExistUser(deptId);
/* 206 */ return (result > 0); return (result > 0);
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public int deleteDeptById(Long deptId) { public int deleteDeptById(Long deptId) {
/* 218 */ return this.deptMapper.deleteDeptById(deptId); return this.deptMapper.deleteDeptById(deptId);
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public int insertDept(Dept dept) { public int insertDept(Dept dept) {
/* 230 */ Dept info = this.deptMapper.selectDeptById(dept.getParentId()); Dept info = this.deptMapper.selectDeptById(dept.getParentId());
/* */
/* 232 */ if (!"0".equals(info.getStatus())) if (!"0".equals(info.getStatus()))
/* */ { {
/* 234 */ throw new BusinessException("部门停用,不允许新增"); throw new BusinessException("部门停用,不允许新增");
/* */ } }
/* 236 */ dept.setCreateBy(ShiroUtils.getLoginName()); dept.setCreateBy(ShiroUtils.getLoginName());
/* 237 */ dept.setAncestors(info.getAncestors() + "," + dept.getParentId()); dept.setAncestors(info.getAncestors() + "," + dept.getParentId());
/* 238 */ if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { if ("sqlite".equals(this.archiveConfig.getDatabaseType())) {
/* 239 */ return this.deptMapper.insertDeptSqlite(dept); return this.deptMapper.insertDeptSqlite(dept);
/* */ } }
/* 241 */ return this.deptMapper.insertDept(dept); return this.deptMapper.insertDept(dept);
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ @Transactional @Transactional
/* */ public int updateDept(Dept dept) { public int updateDept(Dept dept) {
/* 255 */ Dept newParentDept = this.deptMapper.selectDeptById(dept.getParentId()); Dept newParentDept = this.deptMapper.selectDeptById(dept.getParentId());
/* 256 */ Dept oldDept = selectDeptById(dept.getDeptId()); Dept oldDept = selectDeptById(dept.getDeptId());
/* 257 */ if (StringUtils.isNotNull(newParentDept) && StringUtils.isNotNull(oldDept)) { if (StringUtils.isNotNull(newParentDept) && StringUtils.isNotNull(oldDept)) {
/* */
/* 259 */ String newAncestors = newParentDept.getAncestors() + "," + newParentDept.getDeptId(); String newAncestors = newParentDept.getAncestors() + "," + newParentDept.getDeptId();
/* 260 */ String oldAncestors = oldDept.getAncestors(); String oldAncestors = oldDept.getAncestors();
/* 261 */ dept.setAncestors(newAncestors); dept.setAncestors(newAncestors);
/* 262 */ updateDeptChildren(dept.getDeptId(), newAncestors, oldAncestors); updateDeptChildren(dept.getDeptId(), newAncestors, oldAncestors);
/* */ } }
/* 264 */ dept.setUpdateBy(ShiroUtils.getLoginName()); dept.setUpdateBy(ShiroUtils.getLoginName());
/* 265 */ int result = 0; int result = 0;
/* 266 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { if ("mysql".equals(this.archiveConfig.getDatabaseType())) {
/* 267 */ result = this.deptMapper.updateDept(dept); result = this.deptMapper.updateDept(dept);
/* */ } }
/* 269 */ else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) {
/* 270 */ result = this.deptMapper.updateDeptSqlite(dept); result = this.deptMapper.updateDeptSqlite(dept);
/* */ } }
/* */
/* 273 */ if ("0".equals(dept.getStatus())) if ("0".equals(dept.getStatus()))
/* */ { {
/* */
/* 276 */ updateParentDeptStatus(dept); updateParentDeptStatus(dept);
/* */ } }
/* 278 */ return result; return result;
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ private void updateParentDeptStatus(Dept dept) { private void updateParentDeptStatus(Dept dept) {
/* 288 */ String updateBy = dept.getUpdateBy(); String updateBy = dept.getUpdateBy();
/* 289 */ dept = this.deptMapper.selectDeptById(dept.getDeptId()); dept = this.deptMapper.selectDeptById(dept.getDeptId());
/* 290 */ dept.setUpdateBy(updateBy); dept.setUpdateBy(updateBy);
/* 291 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { if ("mysql".equals(this.archiveConfig.getDatabaseType())) {
/* 292 */ this.deptMapper.updateDeptStatus(dept); this.deptMapper.updateDeptStatus(dept);
/* */ } }
/* 294 */ else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) {
/* 295 */ this.deptMapper.updateDeptStatusSqlite(dept); this.deptMapper.updateDeptStatusSqlite(dept);
/* */ } }
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public void updateDeptChildren(Long deptId, String newAncestors, String oldAncestors) { public void updateDeptChildren(Long deptId, String newAncestors, String oldAncestors) {
/* 309 */ List<Dept> children = null; List<Dept> children = null;
/* 310 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { if ("mysql".equals(this.archiveConfig.getDatabaseType())) {
/* 311 */ children = this.deptMapper.selectChildrenDeptById(deptId); children = this.deptMapper.selectChildrenDeptById(deptId);
/* */ } }
/* 313 */ else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) {
/* 314 */ children = this.deptMapper.selectChildrenDeptByIdSqlite(deptId); children = this.deptMapper.selectChildrenDeptByIdSqlite(deptId);
/* */ } }
/* */
/* 317 */ for (Dept child : children) for (Dept child : children)
/* */ { {
/* 319 */ child.setAncestors(child.getAncestors().replace(oldAncestors, newAncestors)); child.setAncestors(child.getAncestors().replace(oldAncestors, newAncestors));
/* */ } }
/* 321 */ if (children.size() > 0) if (children.size() > 0)
/* */ { {
/* 323 */ this.deptMapper.updateDeptChildren(children); this.deptMapper.updateDeptChildren(children);
/* */ } }
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public void updateDeptChildren(Long deptId, String ancestors) { public void updateDeptChildren(Long deptId, String ancestors) {
/* 335 */ Dept dept = new Dept(); Dept dept = new Dept();
/* 336 */ dept.setParentId(deptId); dept.setParentId(deptId);
/* 337 */ List<Dept> childrens = null; List<Dept> childrens = null;
/* 338 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { if ("mysql".equals(this.archiveConfig.getDatabaseType())) {
/* 339 */ childrens = this.deptMapper.selectDeptList(dept); childrens = this.deptMapper.selectDeptList(dept);
/* */ } }
/* 341 */ else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) {
/* 342 */ childrens = this.deptMapper.selectDeptListSqlite(dept); childrens = this.deptMapper.selectDeptListSqlite(dept);
/* */ } }
/* 344 */ for (Dept children : childrens) for (Dept children : childrens)
/* */ { {
/* 346 */ children.setAncestors(ancestors + "," + dept.getParentId()); children.setAncestors(ancestors + "," + dept.getParentId());
/* */ } }
/* 348 */ if (childrens.size() > 0) if (childrens.size() > 0)
/* */ { {
/* 350 */ this.deptMapper.updateDeptChildren(childrens); this.deptMapper.updateDeptChildren(childrens);
/* */ } }
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public Dept selectDeptById(Long deptId) { public Dept selectDeptById(Long deptId) {
/* 363 */ return this.deptMapper.selectDeptById(deptId); return this.deptMapper.selectDeptById(deptId);
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public int selectNormalChildrenDeptById(Long deptId) { public int selectNormalChildrenDeptById(Long deptId) {
/* 375 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { if ("mysql".equals(this.archiveConfig.getDatabaseType())) {
/* 376 */ return this.deptMapper.selectNormalChildrenDeptById(deptId); return this.deptMapper.selectNormalChildrenDeptById(deptId);
/* */ } }
/* 378 */ if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { if ("sqlite".equals(this.archiveConfig.getDatabaseType())) {
/* 379 */ return this.deptMapper.selectNormalChildrenDeptByIdSqlite(deptId); return this.deptMapper.selectNormalChildrenDeptByIdSqlite(deptId);
/* */ } }
/* 381 */ return this.deptMapper.selectNormalChildrenDeptById(deptId); return this.deptMapper.selectNormalChildrenDeptById(deptId);
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public String checkDeptNameUnique(Dept dept) { public String checkDeptNameUnique(Dept dept) {
/* 395 */ Long deptId = Long.valueOf(StringUtils.isNull(dept.getDeptId()) ? -1L : dept.getDeptId().longValue()); Long deptId = Long.valueOf(StringUtils.isNull(dept.getDeptId()) ? -1L : dept.getDeptId().longValue());
/* 396 */ Dept info = this.deptMapper.checkDeptNameUnique(dept.getDeptName(), dept.getParentId()); Dept info = this.deptMapper.checkDeptNameUnique(dept.getDeptName(), dept.getParentId());
/* 397 */ if (StringUtils.isNotNull(info) && info.getDeptId().longValue() != deptId.longValue()) if (StringUtils.isNotNull(info) && info.getDeptId().longValue() != deptId.longValue())
/* */ { {
/* 399 */ return "1"; return "1";
/* */ } }
/* 401 */ return "0"; return "0";
/* */ } }
/* */ } }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\system\dept\service\DeptServiceImpl.class /* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\system\dept\service\DeptServiceImpl.class

@ -1,122 +1,122 @@
/* */ package com.archive.project.system.dict.controller package com.archive.project.system.dict.controller
; ;
/* */
/* */ import com.archive.common.utils.poi.ExcelUtil; import com.archive.common.utils.poi.ExcelUtil;
/* */ import com.archive.framework.aspectj.lang.annotation.Log; import com.archive.framework.aspectj.lang.annotation.Log;
/* */ import com.archive.framework.aspectj.lang.enums.BusinessType; import com.archive.framework.aspectj.lang.enums.BusinessType;
/* */ import com.archive.framework.web.controller.BaseController; import com.archive.framework.web.controller.BaseController;
/* */ import com.archive.framework.web.domain.AjaxResult; import com.archive.framework.web.domain.AjaxResult;
/* */ import com.archive.framework.web.page.TableDataInfo; import com.archive.framework.web.page.TableDataInfo;
/* */ import com.archive.project.system.dict.domain.DictData; import com.archive.project.system.dict.domain.DictData;
/* */ import com.archive.project.system.dict.service.IDictDataService; import com.archive.project.system.dict.service.IDictDataService;
/* */ import java.util.List; import java.util.List;
/* */ import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
/* */ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
/* */ import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
/* */ import org.springframework.ui.ModelMap; import org.springframework.ui.ModelMap;
/* */ import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
/* */ import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
/* */ import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PathVariable;
/* */ import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
/* */ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
/* */ import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseBody;
/* */
/* */
/* */
/* */
/* */
/* */ @Controller @Controller
/* */ @RequestMapping({"/system/dict/data"}) @RequestMapping({"/system/dict/data"})
/* */ public class DictDataController public class DictDataController
/* */ extends BaseController extends BaseController
/* */ { {
/* 32 */ private String prefix = "system/dict/data"; private String prefix = "system/dict/data";
/* */
/* */ @Autowired @Autowired
/* */ private IDictDataService dictDataService; private IDictDataService dictDataService;
/* */
/* */
/* */ @RequiresPermissions({"system:dict:view"}) @RequiresPermissions({"system:dict:view"})
/* */ @GetMapping @GetMapping
/* */ public String dictData() { public String dictData() {
/* 41 */ return this.prefix + "/data"; return this.prefix + "/data";
/* */ } }
/* */
/* */
/* */ @PostMapping({"/list"}) @PostMapping({"/list"})
/* */ @RequiresPermissions({"system:dict:list"}) @RequiresPermissions({"system:dict:list"})
/* */ @ResponseBody @ResponseBody
/* */ public TableDataInfo list(DictData dictData) { public TableDataInfo list(DictData dictData) {
/* 49 */ startPage(); startPage();
/* 50 */ List<DictData> list = this.dictDataService.selectDictDataList(dictData); List<DictData> list = this.dictDataService.selectDictDataList(dictData);
/* 51 */ return getDataTable(list); return getDataTable(list);
/* */ } }
/* */
/* */
/* */ @Log(title = "字典数据", businessType = BusinessType.EXPORT) @Log(title = "字典数据", businessType = BusinessType.EXPORT)
/* */ @RequiresPermissions({"system:dict:export"}) @RequiresPermissions({"system:dict:export"})
/* */ @PostMapping({"/export"}) @PostMapping({"/export"})
/* */ @ResponseBody @ResponseBody
/* */ public AjaxResult export(DictData dictData) { public AjaxResult export(DictData dictData) {
/* 60 */ List<DictData> list = this.dictDataService.selectDictDataList(dictData); List<DictData> list = this.dictDataService.selectDictDataList(dictData);
/* 61 */ ExcelUtil<DictData> util = new ExcelUtil(DictData.class); ExcelUtil<DictData> util = new ExcelUtil(DictData.class);
/* 62 */ return util.exportExcel(list, "字典数据"); return util.exportExcel(list, "字典数据");
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */ @GetMapping({"/add/{dictType}"}) @GetMapping({"/add/{dictType}"})
/* */ public String add(@PathVariable("dictType") String dictType, ModelMap mmap) { public String add(@PathVariable("dictType") String dictType, ModelMap mmap) {
/* 71 */ mmap.put("dictType", dictType); mmap.put("dictType", dictType);
/* 72 */ return this.prefix + "/add"; return this.prefix + "/add";
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */ @Log(title = "字典数据", businessType = BusinessType.INSERT) @Log(title = "字典数据", businessType = BusinessType.INSERT)
/* */ @RequiresPermissions({"system:dict:add"}) @RequiresPermissions({"system:dict:add"})
/* */ @PostMapping({"/add"}) @PostMapping({"/add"})
/* */ @ResponseBody @ResponseBody
/* */ public AjaxResult addSave(@Validated DictData dict) { public AjaxResult addSave(@Validated DictData dict) {
/* 84 */ return toAjax(this.dictDataService.insertDictData(dict)); return toAjax(this.dictDataService.insertDictData(dict));
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */ @GetMapping({"/edit/{dictCode}"}) @GetMapping({"/edit/{dictCode}"})
/* */ public String edit(@PathVariable("dictCode") Long dictCode, ModelMap mmap) { public String edit(@PathVariable("dictCode") Long dictCode, ModelMap mmap) {
/* 93 */ mmap.put("dict", this.dictDataService.selectDictDataById(dictCode)); mmap.put("dict", this.dictDataService.selectDictDataById(dictCode));
/* 94 */ return this.prefix + "/edit"; return this.prefix + "/edit";
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */ @Log(title = "字典数据", businessType = BusinessType.UPDATE) @Log(title = "字典数据", businessType = BusinessType.UPDATE)
/* */ @RequiresPermissions({"system:dict:edit"}) @RequiresPermissions({"system:dict:edit"})
/* */ @PostMapping({"/edit"}) @PostMapping({"/edit"})
/* */ @ResponseBody @ResponseBody
/* */ public AjaxResult editSave(@Validated DictData dict) { public AjaxResult editSave(@Validated DictData dict) {
/* 106 */ return toAjax(this.dictDataService.updateDictData(dict)); return toAjax(this.dictDataService.updateDictData(dict));
/* */ } }
/* */
/* */
/* */ @Log(title = "字典数据", businessType = BusinessType.DELETE) @Log(title = "字典数据", businessType = BusinessType.DELETE)
/* */ @RequiresPermissions({"system:dict:remove"}) @RequiresPermissions({"system:dict:remove"})
/* */ @PostMapping({"/remove"}) @PostMapping({"/remove"})
/* */ @ResponseBody @ResponseBody
/* */ public AjaxResult remove(String ids) { public AjaxResult remove(String ids) {
/* 115 */ return toAjax(this.dictDataService.deleteDictDataByIds(ids)); return toAjax(this.dictDataService.deleteDictDataByIds(ids));
/* */ } }
/* */ } }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\system\dict\controller\DictDataController.class /* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\system\dict\controller\DictDataController.class

@ -1,190 +1,190 @@
/* */ package com.archive.project.system.dict.controller package com.archive.project.system.dict.controller
; ;
/* */
/* */ import com.archive.common.utils.poi.ExcelUtil; import com.archive.common.utils.poi.ExcelUtil;
/* */ import com.archive.framework.aspectj.lang.annotation.Log; import com.archive.framework.aspectj.lang.annotation.Log;
/* */ import com.archive.framework.aspectj.lang.enums.BusinessType; import com.archive.framework.aspectj.lang.enums.BusinessType;
/* */ import com.archive.framework.web.controller.BaseController; import com.archive.framework.web.controller.BaseController;
/* */ import com.archive.framework.web.domain.AjaxResult; import com.archive.framework.web.domain.AjaxResult;
/* */ import com.archive.framework.web.domain.Ztree; import com.archive.framework.web.domain.Ztree;
/* */ import com.archive.framework.web.page.TableDataInfo; import com.archive.framework.web.page.TableDataInfo;
/* */ import com.archive.project.system.dict.domain.DictType; import com.archive.project.system.dict.domain.DictType;
/* */ import com.archive.project.system.dict.service.IDictTypeService; import com.archive.project.system.dict.service.IDictTypeService;
/* */ import java.util.List; import java.util.List;
/* */ import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
/* */ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
/* */ import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
/* */ import org.springframework.ui.ModelMap; import org.springframework.ui.ModelMap;
/* */ import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
/* */ import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
/* */ import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PathVariable;
/* */ import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
/* */ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
/* */ import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseBody;
/* */
/* */
/* */
/* */
/* */
/* */
/* */ @Controller @Controller
/* */ @RequestMapping({"/system/dict"}) @RequestMapping({"/system/dict"})
/* */ public class DictTypeController public class DictTypeController
/* */ extends BaseController extends BaseController
/* */ { {
/* 34 */ private String prefix = "system/dict/type"; private String prefix = "system/dict/type";
/* */
/* */ @Autowired @Autowired
/* */ private IDictTypeService dictTypeService; private IDictTypeService dictTypeService;
/* */
/* */
/* */ @RequiresPermissions({"system:dict:view"}) @RequiresPermissions({"system:dict:view"})
/* */ @GetMapping @GetMapping
/* */ public String dictType() { public String dictType() {
/* 43 */ return this.prefix + "/type"; return this.prefix + "/type";
/* */ } }
/* */
/* */
/* */ @PostMapping({"/list"}) @PostMapping({"/list"})
/* */ @RequiresPermissions({"system:dict:list"}) @RequiresPermissions({"system:dict:list"})
/* */ @ResponseBody @ResponseBody
/* */ public TableDataInfo list(DictType dictType) { public TableDataInfo list(DictType dictType) {
/* 51 */ startPage(); startPage();
/* 52 */ List<DictType> list = this.dictTypeService.selectDictTypeList(dictType); List<DictType> list = this.dictTypeService.selectDictTypeList(dictType);
/* 53 */ return getDataTable(list); return getDataTable(list);
/* */ } }
/* */
/* */
/* */
/* */ @Log(title = "字典类型", businessType = BusinessType.EXPORT) @Log(title = "字典类型", businessType = BusinessType.EXPORT)
/* */ @RequiresPermissions({"system:dict:export"}) @RequiresPermissions({"system:dict:export"})
/* */ @PostMapping({"/export"}) @PostMapping({"/export"})
/* */ @ResponseBody @ResponseBody
/* */ public AjaxResult export(DictType dictType) { public AjaxResult export(DictType dictType) {
/* 63 */ List<DictType> list = this.dictTypeService.selectDictTypeList(dictType); List<DictType> list = this.dictTypeService.selectDictTypeList(dictType);
/* 64 */ ExcelUtil<DictType> util = new ExcelUtil(DictType.class); ExcelUtil<DictType> util = new ExcelUtil(DictType.class);
/* 65 */ return util.exportExcel(list, "字典类型"); return util.exportExcel(list, "字典类型");
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */ @GetMapping({"/add"}) @GetMapping({"/add"})
/* */ public String add() { public String add() {
/* 74 */ return this.prefix + "/add"; return this.prefix + "/add";
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */ @Log(title = "字典类型", businessType = BusinessType.INSERT) @Log(title = "字典类型", businessType = BusinessType.INSERT)
/* */ @RequiresPermissions({"system:dict:add"}) @RequiresPermissions({"system:dict:add"})
/* */ @PostMapping({"/add"}) @PostMapping({"/add"})
/* */ @ResponseBody @ResponseBody
/* */ public AjaxResult addSave(@Validated DictType dict) { public AjaxResult addSave(@Validated DictType dict) {
/* 86 */ if ("1".equals(this.dictTypeService.checkDictTypeUnique(dict))) if ("1".equals(this.dictTypeService.checkDictTypeUnique(dict)))
/* */ { {
/* 88 */ return error("新增字典'" + dict.getDictName() + "'失败,字典类型已存在"); return error("新增字典'" + dict.getDictName() + "'失败,字典类型已存在");
/* */ } }
/* 90 */ return toAjax(this.dictTypeService.insertDictType(dict)); return toAjax(this.dictTypeService.insertDictType(dict));
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */ @GetMapping({"/edit/{dictId}"}) @GetMapping({"/edit/{dictId}"})
/* */ public String edit(@PathVariable("dictId") Long dictId, ModelMap mmap) { public String edit(@PathVariable("dictId") Long dictId, ModelMap mmap) {
/* 99 */ mmap.put("dict", this.dictTypeService.selectDictTypeById(dictId)); mmap.put("dict", this.dictTypeService.selectDictTypeById(dictId));
/* 100 */ return this.prefix + "/edit"; return this.prefix + "/edit";
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */ @Log(title = "字典类型", businessType = BusinessType.UPDATE) @Log(title = "字典类型", businessType = BusinessType.UPDATE)
/* */ @RequiresPermissions({"system:dict:edit"}) @RequiresPermissions({"system:dict:edit"})
/* */ @PostMapping({"/edit"}) @PostMapping({"/edit"})
/* */ @ResponseBody @ResponseBody
/* */ public AjaxResult editSave(@Validated DictType dict) { public AjaxResult editSave(@Validated DictType dict) {
/* 112 */ if ("1".equals(this.dictTypeService.checkDictTypeUnique(dict))) if ("1".equals(this.dictTypeService.checkDictTypeUnique(dict)))
/* */ { {
/* 114 */ return error("修改字典'" + dict.getDictName() + "'失败,字典类型已存在"); return error("修改字典'" + dict.getDictName() + "'失败,字典类型已存在");
/* */ } }
/* 116 */ return toAjax(this.dictTypeService.updateDictType(dict)); return toAjax(this.dictTypeService.updateDictType(dict));
/* */ } }
/* */
/* */
/* */ @Log(title = "字典类型", businessType = BusinessType.DELETE) @Log(title = "字典类型", businessType = BusinessType.DELETE)
/* */ @RequiresPermissions({"system:dict:remove"}) @RequiresPermissions({"system:dict:remove"})
/* */ @PostMapping({"/remove"}) @PostMapping({"/remove"})
/* */ @ResponseBody @ResponseBody
/* */ public AjaxResult remove(String ids) { public AjaxResult remove(String ids) {
/* 125 */ return toAjax(this.dictTypeService.deleteDictTypeByIds(ids)); return toAjax(this.dictTypeService.deleteDictTypeByIds(ids));
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */ @RequiresPermissions({"system:dict:remove"}) @RequiresPermissions({"system:dict:remove"})
/* */ @Log(title = "字典类型", businessType = BusinessType.CLEAN) @Log(title = "字典类型", businessType = BusinessType.CLEAN)
/* */ @GetMapping({"/clearCache"}) @GetMapping({"/clearCache"})
/* */ @ResponseBody @ResponseBody
/* */ public AjaxResult clearCache() { public AjaxResult clearCache() {
/* 137 */ this.dictTypeService.clearCache(); this.dictTypeService.clearCache();
/* 138 */ return success(); return success();
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */ @RequiresPermissions({"system:dict:list"}) @RequiresPermissions({"system:dict:list"})
/* */ @GetMapping({"/detail/{dictId}"}) @GetMapping({"/detail/{dictId}"})
/* */ public String detail(@PathVariable("dictId") Long dictId, ModelMap mmap) { public String detail(@PathVariable("dictId") Long dictId, ModelMap mmap) {
/* 148 */ mmap.put("dict", this.dictTypeService.selectDictTypeById(dictId)); mmap.put("dict", this.dictTypeService.selectDictTypeById(dictId));
/* 149 */ mmap.put("dictList", this.dictTypeService.selectDictTypeAll()); mmap.put("dictList", this.dictTypeService.selectDictTypeAll());
/* 150 */ return "system/dict/data/data"; return "system/dict/data/data";
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */ @PostMapping({"/checkDictTypeUnique"}) @PostMapping({"/checkDictTypeUnique"})
/* */ @ResponseBody @ResponseBody
/* */ public String checkDictTypeUnique(DictType dictType) { public String checkDictTypeUnique(DictType dictType) {
/* 160 */ return this.dictTypeService.checkDictTypeUnique(dictType); return this.dictTypeService.checkDictTypeUnique(dictType);
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */
/* */ @GetMapping({"/selectDictTree/{columnId}/{dictType}"}) @GetMapping({"/selectDictTree/{columnId}/{dictType}"})
/* */ public String selectDeptTree(@PathVariable("columnId") Long columnId, @PathVariable("dictType") String dictType, ModelMap mmap) { public String selectDeptTree(@PathVariable("columnId") Long columnId, @PathVariable("dictType") String dictType, ModelMap mmap) {
/* 170 */ mmap.put("columnId", columnId); mmap.put("columnId", columnId);
/* 171 */ mmap.put("dict", this.dictTypeService.selectDictTypeByType(dictType)); mmap.put("dict", this.dictTypeService.selectDictTypeByType(dictType));
/* 172 */ return this.prefix + "/tree"; return this.prefix + "/tree";
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */ @GetMapping({"/treeData"}) @GetMapping({"/treeData"})
/* */ @ResponseBody @ResponseBody
/* */ public List<Ztree> treeData() { public List<Ztree> treeData() {
/* 182 */ List<Ztree> ztrees = this.dictTypeService.selectDictTree(new DictType()); List<Ztree> ztrees = this.dictTypeService.selectDictTree(new DictType());
/* 183 */ return ztrees; return ztrees;
/* */ } }
/* */ } }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\system\dict\controller\DictTypeController.class /* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\system\dict\controller\DictTypeController.class

@ -1,181 +1,181 @@
/* */ package com.archive.project.system.dict.domain package com.archive.project.system.dict.domain
; ;
/* */
/* */ import com.archive.framework.aspectj.lang.annotation.ColumnType; import com.archive.framework.aspectj.lang.annotation.ColumnType;
import com.archive.framework.aspectj.lang.annotation.Excel; import com.archive.framework.aspectj.lang.annotation.Excel;
/* */ import com.archive.framework.web.domain.BaseEntity; import com.archive.framework.web.domain.BaseEntity;
/* */ import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotBlank;
/* */ import javax.validation.constraints.Size; import javax.validation.constraints.Size;
/* */ import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringBuilder;
/* */ import org.apache.commons.lang3.builder.ToStringStyle; import org.apache.commons.lang3.builder.ToStringStyle;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class DictData public class DictData
/* */ extends BaseEntity extends BaseEntity
/* */ { {
/* */ private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/* */ @Excel(name = "字典编码", cellType = ColumnType.NUMERIC) @Excel(name = "字典编码", cellType = ColumnType.NUMERIC)
/* */ private Long dictCode; private Long dictCode;
/* */ @Excel(name = "字典排序", cellType = ColumnType.NUMERIC) @Excel(name = "字典排序", cellType = ColumnType.NUMERIC)
/* */ private Long dictSort; private Long dictSort;
/* */ @Excel(name = "字典标签") @Excel(name = "字典标签")
/* */ private String dictLabel; private String dictLabel;
/* */ @Excel(name = "字典键值") @Excel(name = "字典键值")
/* */ private String dictValue; private String dictValue;
/* */ @Excel(name = "字典类型") @Excel(name = "字典类型")
/* */ private String dictType; private String dictType;
/* */ @Excel(name = "字典样式") @Excel(name = "字典样式")
/* */ private String cssClass; private String cssClass;
/* */ private String listClass; private String listClass;
/* */ @Excel(name = "是否默认", readConverterExp = "Y=是,N=否") @Excel(name = "是否默认", readConverterExp = "Y=是,N=否")
/* */ private String isDefault; private String isDefault;
/* */ @Excel(name = "状态", readConverterExp = "0=正常,1=停用") @Excel(name = "状态", readConverterExp = "0=正常,1=停用")
/* */ private String status; private String status;
/* */
/* */ public Long getDictCode() { public Long getDictCode() {
/* 57 */ return this.dictCode; return this.dictCode;
/* */ } }
/* */
/* */
/* */ public void setDictCode(Long dictCode) { public void setDictCode(Long dictCode) {
/* 62 */ this.dictCode = dictCode; this.dictCode = dictCode;
/* */ } }
/* */
/* */
/* */ public Long getDictSort() { public Long getDictSort() {
/* 67 */ return this.dictSort; return this.dictSort;
/* */ } }
/* */
/* */
/* */ public void setDictSort(Long dictSort) { public void setDictSort(Long dictSort) {
/* 72 */ this.dictSort = dictSort; this.dictSort = dictSort;
/* */ } }
/* */
/* */
/* */ @NotBlank(message = "字典标签不能为空") @NotBlank(message = "字典标签不能为空")
/* */ @Size(min = 0, max = 100, message = "字典标签长度不能超过100个字符") @Size(min = 0, max = 100, message = "字典标签长度不能超过100个字符")
/* */ public String getDictLabel() { public String getDictLabel() {
/* 79 */ return this.dictLabel; return this.dictLabel;
/* */ } }
/* */
/* */
/* */ public void setDictLabel(String dictLabel) { public void setDictLabel(String dictLabel) {
/* 84 */ this.dictLabel = dictLabel; this.dictLabel = dictLabel;
/* */ } }
/* */
/* */
/* */ @NotBlank(message = "字典键值不能为空") @NotBlank(message = "字典键值不能为空")
/* */ @Size(min = 0, max = 100, message = "字典键值长度不能超过100个字符") @Size(min = 0, max = 100, message = "字典键值长度不能超过100个字符")
/* */ public String getDictValue() { public String getDictValue() {
/* 91 */ return this.dictValue; return this.dictValue;
/* */ } }
/* */
/* */
/* */ public void setDictValue(String dictValue) { public void setDictValue(String dictValue) {
/* 96 */ this.dictValue = dictValue; this.dictValue = dictValue;
/* */ } }
/* */
/* */
/* */ @NotBlank(message = "字典类型不能为空") @NotBlank(message = "字典类型不能为空")
/* */ @Size(min = 0, max = 100, message = "字典类型长度不能超过100个字符") @Size(min = 0, max = 100, message = "字典类型长度不能超过100个字符")
/* */ public String getDictType() { public String getDictType() {
/* 103 */ return this.dictType; return this.dictType;
/* */ } }
/* */
/* */
/* */ public void setDictType(String dictType) { public void setDictType(String dictType) {
/* 108 */ this.dictType = dictType; this.dictType = dictType;
/* */ } }
/* */
/* */
/* */ @Size(min = 0, max = 100, message = "样式属性长度不能超过100个字符") @Size(min = 0, max = 100, message = "样式属性长度不能超过100个字符")
/* */ public String getCssClass() { public String getCssClass() {
/* 114 */ return this.cssClass; return this.cssClass;
/* */ } }
/* */
/* */
/* */ public void setCssClass(String cssClass) { public void setCssClass(String cssClass) {
/* 119 */ this.cssClass = cssClass; this.cssClass = cssClass;
/* */ } }
/* */
/* */
/* */ public String getListClass() { public String getListClass() {
/* 124 */ return this.listClass; return this.listClass;
/* */ } }
/* */
/* */
/* */ public void setListClass(String listClass) { public void setListClass(String listClass) {
/* 129 */ this.listClass = listClass; this.listClass = listClass;
/* */ } }
/* */
/* */
/* */ public boolean getDefault() { public boolean getDefault() {
/* 134 */ return "Y".equals(this.isDefault); return "Y".equals(this.isDefault);
/* */ } }
/* */
/* */
/* */ public String getIsDefault() { public String getIsDefault() {
/* 139 */ return this.isDefault; return this.isDefault;
/* */ } }
/* */
/* */
/* */ public void setIsDefault(String isDefault) { public void setIsDefault(String isDefault) {
/* 144 */ this.isDefault = isDefault; this.isDefault = isDefault;
/* */ } }
/* */
/* */
/* */ public String getStatus() { public String getStatus() {
/* 149 */ return this.status; return this.status;
/* */ } }
/* */
/* */
/* */ public void setStatus(String status) { public void setStatus(String status) {
/* 154 */ this.status = status; this.status = status;
/* */ } }
/* */
/* */ @Override @Override
/* */ public String toString() { public String toString() {
/* 159 */ return (new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)) return (new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE))
/* 160 */ .append("dictCode", getDictCode()) .append("dictCode", getDictCode())
/* 161 */ .append("dictSort", getDictSort()) .append("dictSort", getDictSort())
/* 162 */ .append("dictLabel", getDictLabel()) .append("dictLabel", getDictLabel())
/* 163 */ .append("dictValue", getDictValue()) .append("dictValue", getDictValue())
/* 164 */ .append("dictType", getDictType()) .append("dictType", getDictType())
/* 165 */ .append("cssClass", getCssClass()) .append("cssClass", getCssClass())
/* 166 */ .append("listClass", getListClass()) .append("listClass", getListClass())
/* 167 */ .append("isDefault", getIsDefault()) .append("isDefault", getIsDefault())
/* 168 */ .append("status", getStatus()) .append("status", getStatus())
/* 169 */ .append("createBy", getCreateBy()) .append("createBy", getCreateBy())
/* 170 */ .append("createTime", getCreateTime()) .append("createTime", getCreateTime())
/* 171 */ .append("updateBy", getUpdateBy()) .append("updateBy", getUpdateBy())
/* 172 */ .append("updateTime", getUpdateTime()) .append("updateTime", getUpdateTime())
/* 173 */ .append("remark", getRemark()) .append("remark", getRemark())
/* 174 */ .toString(); .toString();
/* */ } }
/* */ } }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\system\dict\domain\DictData.class /* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\system\dict\domain\DictData.class

@ -1,111 +1,111 @@
/* */ package com.archive.project.system.dict.domain package com.archive.project.system.dict.domain
; ;
/* */
/* */ import com.archive.framework.aspectj.lang.annotation.ColumnType; import com.archive.framework.aspectj.lang.annotation.ColumnType;
import com.archive.framework.aspectj.lang.annotation.Excel; import com.archive.framework.aspectj.lang.annotation.Excel;
/* */ import com.archive.framework.web.domain.BaseEntity; import com.archive.framework.web.domain.BaseEntity;
/* */ import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotBlank;
/* */ import javax.validation.constraints.Size; import javax.validation.constraints.Size;
/* */ import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringBuilder;
/* */ import org.apache.commons.lang3.builder.ToStringStyle; import org.apache.commons.lang3.builder.ToStringStyle;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class DictType public class DictType
/* */ extends BaseEntity extends BaseEntity
/* */ { {
/* */ private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/* */ @Excel(name = "字典主键", cellType = ColumnType.NUMERIC) @Excel(name = "字典主键", cellType = ColumnType.NUMERIC)
/* */ private Long dictId; private Long dictId;
/* */ @Excel(name = "字典名称") @Excel(name = "字典名称")
/* */ private String dictName; private String dictName;
/* */ @Excel(name = "字典类型") @Excel(name = "字典类型")
/* */ private String dictType; private String dictType;
/* */ @Excel(name = "状态", readConverterExp = "0=正常,1=停用") @Excel(name = "状态", readConverterExp = "0=正常,1=停用")
/* */ private String status; private String status;
/* */ @Excel(name = "标签") @Excel(name = "标签")
/* */ private String label; private String label;
/* */
/* */ public Long getDictId() { public Long getDictId() {
/* 41 */ return this.dictId; return this.dictId;
/* */ } }
/* */
/* */
/* */ public void setDictId(Long dictId) { public void setDictId(Long dictId) {
/* 46 */ this.dictId = dictId; this.dictId = dictId;
/* */ } }
/* */
/* */
/* */ @NotBlank(message = "字典名称不能为空") @NotBlank(message = "字典名称不能为空")
/* */ @Size(min = 0, max = 100, message = "字典类型名称长度不能超过100个字符") @Size(min = 0, max = 100, message = "字典类型名称长度不能超过100个字符")
/* */ public String getDictName() { public String getDictName() {
/* 53 */ return this.dictName; return this.dictName;
/* */ } }
/* */
/* */
/* */ public void setDictName(String dictName) { public void setDictName(String dictName) {
/* 58 */ this.dictName = dictName; this.dictName = dictName;
/* */ } }
/* */
/* */
/* */ @NotBlank(message = "字典类型不能为空") @NotBlank(message = "字典类型不能为空")
/* */ @Size(min = 0, max = 100, message = "字典类型类型长度不能超过100个字符") @Size(min = 0, max = 100, message = "字典类型类型长度不能超过100个字符")
/* */ public String getDictType() { public String getDictType() {
/* 65 */ return this.dictType; return this.dictType;
/* */ } }
/* */
/* */
/* */ public void setDictType(String dictType) { public void setDictType(String dictType) {
/* 70 */ this.dictType = dictType; this.dictType = dictType;
/* */ } }
/* */
/* */
/* */ public String getStatus() { public String getStatus() {
/* 75 */ return this.status; return this.status;
/* */ } }
/* */
/* */
/* */ public void setStatus(String status) { public void setStatus(String status) {
/* 80 */ this.status = status; this.status = status;
/* */ } }
/* */
/* */ public String getLabel() { public String getLabel() {
/* 84 */ return this.label; return this.label;
/* */ } }
/* */
/* */ public void setLabel(String label) { public void setLabel(String label) {
/* 88 */ this.label = label; this.label = label;
/* */ } }
/* */
/* */
/* */ public String toString() { public String toString() {
/* 93 */ return (new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)) return (new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE))
/* 94 */ .append("dictId", getDictId()) .append("dictId", getDictId())
/* 95 */ .append("dictName", getDictName()) .append("dictName", getDictName())
/* 96 */ .append("dictType", getDictType()) .append("dictType", getDictType())
/* 97 */ .append("status", getStatus()) .append("status", getStatus())
/* 98 */ .append("createBy", getCreateBy()) .append("createBy", getCreateBy())
/* 99 */ .append("createTime", getCreateTime()) .append("createTime", getCreateTime())
/* 100 */ .append("updateBy", getUpdateBy()) .append("updateBy", getUpdateBy())
/* 101 */ .append("updateTime", getUpdateTime()) .append("updateTime", getUpdateTime())
/* 102 */ .append("remark", getRemark()) .append("remark", getRemark())
/* 103 */ .toString(); .toString();
/* */ } }
/* */ } }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\system\dict\domain\DictType.class /* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\system\dict\domain\DictType.class

@ -1,146 +1,146 @@
/* */ package com.archive.project.system.dict.service package com.archive.project.system.dict.service
; ;
/* */
/* */ import com.archive.common.utils.security.ShiroUtils; import com.archive.common.utils.security.ShiroUtils;
/* */ import com.archive.common.utils.text.Convert; import com.archive.common.utils.text.Convert;
/* */ import com.archive.framework.config.ArchiveConfig; import com.archive.framework.config.ArchiveConfig;
/* */ import com.archive.project.system.dict.domain.DictData; import com.archive.project.system.dict.domain.DictData;
/* */ import com.archive.project.system.dict.mapper.DictDataMapper; import com.archive.project.system.dict.mapper.DictDataMapper;
/* */ import com.archive.project.system.dict.service.IDictDataService; import com.archive.project.system.dict.service.IDictDataService;
/* */ import com.archive.project.system.dict.utils.DictUtils; import com.archive.project.system.dict.utils.DictUtils;
/* */ import java.util.List; import java.util.List;
/* */ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
/* */ import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ @Service @Service
/* */ public class DictDataServiceImpl public class DictDataServiceImpl
/* */ implements IDictDataService implements IDictDataService
/* */ { {
/* */ @Autowired @Autowired
/* */ private DictDataMapper dictDataMapper; private DictDataMapper dictDataMapper;
/* */ @Autowired @Autowired
/* */ private ArchiveConfig archiveConfig; private ArchiveConfig archiveConfig;
/* */
/* */ public List<DictData> selectDictDataList(DictData dictData) { public List<DictData> selectDictDataList(DictData dictData) {
/* 40 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { if ("mysql".equals(this.archiveConfig.getDatabaseType())) {
/* 41 */ return this.dictDataMapper.selectDictDataList(dictData); return this.dictDataMapper.selectDictDataList(dictData);
/* */ } }
/* 43 */ if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { if ("sqlite".equals(this.archiveConfig.getDatabaseType())) {
/* 44 */ return this.dictDataMapper.selectDictDataListSqlite(dictData); return this.dictDataMapper.selectDictDataListSqlite(dictData);
/* */ } }
/* 46 */ return this.dictDataMapper.selectDictDataList(dictData); return this.dictDataMapper.selectDictDataList(dictData);
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public String selectDictLabel(String dictType, String dictValue) { public String selectDictLabel(String dictType, String dictValue) {
/* 60 */ return this.dictDataMapper.selectDictLabel(dictType, dictValue); return this.dictDataMapper.selectDictLabel(dictType, dictValue);
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public DictData selectDictDataById(Long dictCode) { public DictData selectDictDataById(Long dictCode) {
/* 72 */ return this.dictDataMapper.selectDictDataById(dictCode); return this.dictDataMapper.selectDictDataById(dictCode);
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public int deleteDictDataByIds(String ids) { public int deleteDictDataByIds(String ids) {
/* 84 */ int row = this.dictDataMapper.deleteDictDataByIds(Convert.toStrArray(ids)); int row = this.dictDataMapper.deleteDictDataByIds(Convert.toStrArray(ids));
/* 85 */ if (row > 0) if (row > 0)
/* */ { {
/* 87 */ DictUtils.clearDictCache(); DictUtils.clearDictCache();
/* */ } }
/* 89 */ return row; return row;
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public int insertDictData(DictData dictData) { public int insertDictData(DictData dictData) {
/* 101 */ dictData.setCreateBy(ShiroUtils.getLoginName()); dictData.setCreateBy(ShiroUtils.getLoginName());
/* 102 */ int row = 0; int row = 0;
/* 103 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { if ("mysql".equals(this.archiveConfig.getDatabaseType())) {
/* 104 */ row = this.dictDataMapper.insertDictData(dictData); row = this.dictDataMapper.insertDictData(dictData);
/* */ } }
/* 106 */ else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) {
/* 107 */ row = this.dictDataMapper.insertDictDataSqlite(dictData); row = this.dictDataMapper.insertDictDataSqlite(dictData);
/* */ } }
/* */
/* 110 */ if (row > 0) if (row > 0)
/* */ { {
/* 112 */ DictUtils.clearDictCache(); DictUtils.clearDictCache();
/* */ } }
/* 114 */ return row; return row;
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public int updateDictData(DictData dictData) { public int updateDictData(DictData dictData) {
/* 126 */ dictData.setUpdateBy(ShiroUtils.getLoginName()); dictData.setUpdateBy(ShiroUtils.getLoginName());
/* 127 */ int row = 0; int row = 0;
/* 128 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { if ("mysql".equals(this.archiveConfig.getDatabaseType())) {
/* 129 */ row = this.dictDataMapper.updateDictData(dictData); row = this.dictDataMapper.updateDictData(dictData);
/* */ } }
/* 131 */ else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) {
/* 132 */ row = this.dictDataMapper.updateDictDataSqlite(dictData); row = this.dictDataMapper.updateDictDataSqlite(dictData);
/* */ } }
/* */
/* 135 */ if (row > 0) if (row > 0)
/* */ { {
/* 137 */ DictUtils.clearDictCache(); DictUtils.clearDictCache();
/* */ } }
/* 139 */ return row; return row;
/* */ } }
/* */ } }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\system\dict\service\DictDataServiceImpl.class /* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\system\dict\service\DictDataServiceImpl.class

@ -1,277 +1,277 @@
/* */ package com.archive.project.system.dict.service package com.archive.project.system.dict.service
; ;
/* */
/* */ import com.archive.common.exception.BusinessException; import com.archive.common.exception.BusinessException;
/* */ import com.archive.common.utils.StringUtils; import com.archive.common.utils.StringUtils;
/* */ import com.archive.common.utils.security.ShiroUtils; import com.archive.common.utils.security.ShiroUtils;
/* */ import com.archive.common.utils.text.Convert; import com.archive.common.utils.text.Convert;
/* */ import com.archive.framework.config.ArchiveConfig; import com.archive.framework.config.ArchiveConfig;
/* */ import com.archive.framework.web.domain.Ztree; import com.archive.framework.web.domain.Ztree;
/* */ import com.archive.project.system.dict.domain.DictData; import com.archive.project.system.dict.domain.DictData;
/* */ import com.archive.project.system.dict.domain.DictType; import com.archive.project.system.dict.domain.DictType;
/* */ import com.archive.project.system.dict.mapper.DictDataMapper; import com.archive.project.system.dict.mapper.DictDataMapper;
/* */ import com.archive.project.system.dict.mapper.DictTypeMapper; import com.archive.project.system.dict.mapper.DictTypeMapper;
/* */ import com.archive.project.system.dict.service.IDictTypeService; import com.archive.project.system.dict.service.IDictTypeService;
/* */ import com.archive.project.system.dict.utils.DictUtils; import com.archive.project.system.dict.utils.DictUtils;
/* */ import java.util.ArrayList; import java.util.ArrayList;
/* */ import java.util.List; import java.util.List;
/* */ import javax.annotation.PostConstruct; import javax.annotation.PostConstruct;
/* */ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
/* */ import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
/* */ import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ @Service @Service
/* */ public class DictTypeServiceImpl public class DictTypeServiceImpl
/* */ implements IDictTypeService implements IDictTypeService
/* */ { {
/* */ @Autowired @Autowired
/* */ private DictTypeMapper dictTypeMapper; private DictTypeMapper dictTypeMapper;
/* */ @Autowired @Autowired
/* */ private DictDataMapper dictDataMapper; private DictDataMapper dictDataMapper;
/* */ @Autowired @Autowired
/* */ private ArchiveConfig archiveConfig; private ArchiveConfig archiveConfig;
/* */
/* */ @PostConstruct @PostConstruct
/* */ public void init() { public void init() {
/* 48 */ List<DictType> dictTypeList = this.dictTypeMapper.selectDictTypeAll(); List<DictType> dictTypeList = this.dictTypeMapper.selectDictTypeAll();
/* 49 */ for (DictType dictType : dictTypeList) { for (DictType dictType : dictTypeList) {
/* */
/* 51 */ List<DictData> dictDatas = this.dictDataMapper.selectDictDataByType(dictType.getDictType()); List<DictData> dictDatas = this.dictDataMapper.selectDictDataByType(dictType.getDictType());
/* 52 */ DictUtils.setDictCache(dictType.getDictType(), dictDatas); DictUtils.setDictCache(dictType.getDictType(), dictDatas);
/* */ } }
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public List<DictType> selectDictTypeList(DictType dictType) { public List<DictType> selectDictTypeList(DictType dictType) {
/* 65 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { if ("mysql".equals(this.archiveConfig.getDatabaseType())) {
/* 66 */ return this.dictTypeMapper.selectDictTypeList(dictType); return this.dictTypeMapper.selectDictTypeList(dictType);
/* */ } }
/* 68 */ if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { if ("sqlite".equals(this.archiveConfig.getDatabaseType())) {
/* 69 */ return this.dictTypeMapper.selectDictTypeListSqlite(dictType); return this.dictTypeMapper.selectDictTypeListSqlite(dictType);
/* */ } }
/* 71 */ return this.dictTypeMapper.selectDictTypeList(dictType); return this.dictTypeMapper.selectDictTypeList(dictType);
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public List<DictType> selectDictTypeAll() { public List<DictType> selectDictTypeAll() {
/* 84 */ return this.dictTypeMapper.selectDictTypeAll(); return this.dictTypeMapper.selectDictTypeAll();
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public List<DictData> selectDictDataByType(String dictType) { public List<DictData> selectDictDataByType(String dictType) {
/* 96 */ List<DictData> dictDatas = DictUtils.getDictCache(dictType); List<DictData> dictDatas = DictUtils.getDictCache(dictType);
/* 97 */ if (StringUtils.isNotEmpty(dictDatas)) if (StringUtils.isNotEmpty(dictDatas))
/* */ { {
/* 99 */ return dictDatas; return dictDatas;
/* */ } }
/* 101 */ dictDatas = this.dictDataMapper.selectDictDataByType(dictType); dictDatas = this.dictDataMapper.selectDictDataByType(dictType);
/* 102 */ if (StringUtils.isNotEmpty(dictDatas)) { if (StringUtils.isNotEmpty(dictDatas)) {
/* */
/* 104 */ DictUtils.setDictCache(dictType, dictDatas); DictUtils.setDictCache(dictType, dictDatas);
/* 105 */ return dictDatas; return dictDatas;
/* */ } }
/* 107 */ return null; return null;
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public DictType selectDictTypeById(Long dictId) { public DictType selectDictTypeById(Long dictId) {
/* 119 */ return this.dictTypeMapper.selectDictTypeById(dictId); return this.dictTypeMapper.selectDictTypeById(dictId);
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public DictType selectDictTypeByType(String dictType) { public DictType selectDictTypeByType(String dictType) {
/* 131 */ return this.dictTypeMapper.selectDictTypeByType(dictType); return this.dictTypeMapper.selectDictTypeByType(dictType);
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public int deleteDictTypeByIds(String ids) { public int deleteDictTypeByIds(String ids) {
/* 143 */ Long[] dictIds = Convert.toLongArray(ids); Long[] dictIds = Convert.toLongArray(ids);
/* 144 */ for (Long dictId : dictIds) { for (Long dictId : dictIds) {
/* */
/* 146 */ DictType dictType = selectDictTypeById(dictId); DictType dictType = selectDictTypeById(dictId);
/* 147 */ if (this.dictDataMapper.countDictDataByType(dictType.getDictType()) > 0) if (this.dictDataMapper.countDictDataByType(dictType.getDictType()) > 0)
/* */ { {
/* 149 */ throw new BusinessException(String.format("%1$s已分配,不能删除", new Object[] { dictType.getDictName() })); throw new BusinessException(String.format("%1$s已分配,不能删除", new Object[] { dictType.getDictName() }));
/* */ } }
/* */ } }
/* 152 */ int count = this.dictTypeMapper.deleteDictTypeByIds(dictIds); int count = this.dictTypeMapper.deleteDictTypeByIds(dictIds);
/* 153 */ if (count > 0) if (count > 0)
/* */ { {
/* 155 */ DictUtils.clearDictCache(); DictUtils.clearDictCache();
/* */ } }
/* 157 */ return count; return count;
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public void clearCache() { public void clearCache() {
/* 166 */ DictUtils.clearDictCache(); DictUtils.clearDictCache();
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public int insertDictType(DictType dictType) { public int insertDictType(DictType dictType) {
/* 178 */ dictType.setCreateBy(ShiroUtils.getLoginName()); dictType.setCreateBy(ShiroUtils.getLoginName());
/* 179 */ int row = 0; int row = 0;
/* 180 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { if ("mysql".equals(this.archiveConfig.getDatabaseType())) {
/* 181 */ row = this.dictTypeMapper.insertDictType(dictType); row = this.dictTypeMapper.insertDictType(dictType);
/* */ } }
/* 183 */ else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) {
/* 184 */ row = this.dictTypeMapper.insertDictTypeSqlite(dictType); row = this.dictTypeMapper.insertDictTypeSqlite(dictType);
/* */ } }
/* */
/* 187 */ if (row > 0) if (row > 0)
/* */ { {
/* 189 */ DictUtils.clearDictCache(); DictUtils.clearDictCache();
/* */ } }
/* 191 */ return row; return row;
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ @Transactional @Transactional
/* */ public int updateDictType(DictType dictType) { public int updateDictType(DictType dictType) {
/* 204 */ dictType.setUpdateBy(ShiroUtils.getLoginName()); dictType.setUpdateBy(ShiroUtils.getLoginName());
/* 205 */ DictType oldDict = this.dictTypeMapper.selectDictTypeById(dictType.getDictId()); DictType oldDict = this.dictTypeMapper.selectDictTypeById(dictType.getDictId());
/* 206 */ this.dictDataMapper.updateDictDataType(oldDict.getDictType(), dictType.getDictType()); this.dictDataMapper.updateDictDataType(oldDict.getDictType(), dictType.getDictType());
/* 207 */ int row = 0; int row = 0;
/* 208 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { if ("mysql".equals(this.archiveConfig.getDatabaseType())) {
/* 209 */ row = this.dictTypeMapper.updateDictType(dictType); row = this.dictTypeMapper.updateDictType(dictType);
/* */ } }
/* 211 */ else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) {
/* 212 */ row = this.dictTypeMapper.updateDictTypeSqlite(dictType); row = this.dictTypeMapper.updateDictTypeSqlite(dictType);
/* */ } }
/* */
/* 215 */ if (row > 0) if (row > 0)
/* */ { {
/* 217 */ DictUtils.clearDictCache(); DictUtils.clearDictCache();
/* */ } }
/* 219 */ return row; return row;
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public String checkDictTypeUnique(DictType dict) { public String checkDictTypeUnique(DictType dict) {
/* 231 */ Long dictId = Long.valueOf(StringUtils.isNull(dict.getDictId()) ? -1L : dict.getDictId().longValue()); Long dictId = Long.valueOf(StringUtils.isNull(dict.getDictId()) ? -1L : dict.getDictId().longValue());
/* 232 */ DictType dictType = this.dictTypeMapper.checkDictTypeUnique(dict.getDictType()); DictType dictType = this.dictTypeMapper.checkDictTypeUnique(dict.getDictType());
/* 233 */ if (StringUtils.isNotNull(dictType) && dictType.getDictId().longValue() != dictId.longValue()) if (StringUtils.isNotNull(dictType) && dictType.getDictId().longValue() != dictId.longValue())
/* */ { {
/* 235 */ return "1"; return "1";
/* */ } }
/* 237 */ return "0"; return "0";
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public List<Ztree> selectDictTree(DictType dictType) { public List<Ztree> selectDictTree(DictType dictType) {
/* 249 */ List<Ztree> ztrees = new ArrayList<>(); List<Ztree> ztrees = new ArrayList<>();
/* 250 */ List<DictType> dictList = this.dictTypeMapper.selectDictTypeList(dictType); List<DictType> dictList = this.dictTypeMapper.selectDictTypeList(dictType);
/* 251 */ for (DictType dict : dictList) { for (DictType dict : dictList) {
/* */
/* 253 */ if ("0".equals(dict.getStatus())) { if ("0".equals(dict.getStatus())) {
/* */
/* 255 */ Ztree ztree = new Ztree(); Ztree ztree = new Ztree();
/* 256 */ ztree.setId(dict.getDictId()); ztree.setId(dict.getDictId());
/* 257 */ ztree.setName(transDictName(dict)); ztree.setName(transDictName(dict));
/* 258 */ ztree.setTitle(dict.getDictType()); ztree.setTitle(dict.getDictType());
/* 259 */ ztrees.add(ztree); ztrees.add(ztree);
/* */ } }
/* */ } }
/* 262 */ return ztrees; return ztrees;
/* */ } }
/* */
/* */
/* */ public String transDictName(DictType dictType) { public String transDictName(DictType dictType) {
/* 267 */ StringBuffer sb = new StringBuffer(); StringBuffer sb = new StringBuffer();
/* 268 */ sb.append("(" + dictType.getDictName() + ")"); sb.append("(" + dictType.getDictName() + ")");
/* 269 */ sb.append("&nbsp;&nbsp;&nbsp;" + dictType.getDictType()); sb.append("&nbsp;&nbsp;&nbsp;" + dictType.getDictType());
/* 270 */ return sb.toString(); return sb.toString();
/* */ } }
/* */ } }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\system\dict\service\DictTypeServiceImpl.class /* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\system\dict\service\DictTypeServiceImpl.class

@ -1,186 +1,186 @@
/* */ package com.archive.project.system.dict.utils package com.archive.project.system.dict.utils
; ;
/* */
/* */ import com.archive.common.utils.CacheUtils; import com.archive.common.utils.CacheUtils;
/* */ import com.archive.common.utils.StringUtils; import com.archive.common.utils.StringUtils;
/* */ import com.archive.project.system.dict.domain.DictData; import com.archive.project.system.dict.domain.DictData;
/* */ import java.util.List; import java.util.List;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class DictUtils public class DictUtils
/* */ { {
/* */ public static final String SEPARATOR = ","; public static final String SEPARATOR = ",";
/* */
/* */ public static void setDictCache(String key, List<DictData> dictDatas) { public static void setDictCache(String key, List<DictData> dictDatas) {
/* 29 */ CacheUtils.put(getCacheName(), getCacheKey(key), dictDatas); CacheUtils.put(getCacheName(), getCacheKey(key), dictDatas);
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static List<DictData> getDictCache(String key) { public static List<DictData> getDictCache(String key) {
/* 40 */ Object cacheObj = CacheUtils.get(getCacheName(), getCacheKey(key)); Object cacheObj = CacheUtils.get(getCacheName(), getCacheKey(key));
/* 41 */ if (StringUtils.isNotNull(cacheObj)) { if (StringUtils.isNotNull(cacheObj)) {
/* */
/* 43 */ List<DictData> DictDatas = (List<DictData>)StringUtils.cast(cacheObj); List<DictData> DictDatas = (List<DictData>)StringUtils.cast(cacheObj);
/* 44 */ return DictDatas; return DictDatas;
/* */ } }
/* 46 */ return null; return null;
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static String getDictLabel(String dictType, String dictValue) { public static String getDictLabel(String dictType, String dictValue) {
/* 58 */ return getDictLabel(dictType, dictValue, ","); return getDictLabel(dictType, dictValue, ",");
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static String getDictValue(String dictType, String dictLabel) { public static String getDictValue(String dictType, String dictLabel) {
/* 70 */ return getDictValue(dictType, dictLabel, ","); return getDictValue(dictType, dictLabel, ",");
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static String getDictLabel(String dictType, String dictValue, String separator) { public static String getDictLabel(String dictType, String dictValue, String separator) {
/* 83 */ StringBuilder propertyString = new StringBuilder(); StringBuilder propertyString = new StringBuilder();
/* 84 */ List<DictData> datas = getDictCache(dictType); List<DictData> datas = getDictCache(dictType);
/* */
/* 86 */ if (StringUtils.containsAny(separator, dictValue) && StringUtils.isNotEmpty(datas)) { if (StringUtils.containsAny(separator, dictValue) && StringUtils.isNotEmpty(datas)) {
/* */
/* 88 */ for (DictData dict : datas) { for (DictData dict : datas) {
/* */
/* 90 */ for (String value : dictValue.split(separator)) { for (String value : dictValue.split(separator)) {
/* */
/* 92 */ if (value.equals(dict.getDictValue())) { if (value.equals(dict.getDictValue())) {
/* */
/* 94 */ propertyString.append(dict.getDictLabel() + separator); propertyString.append(dict.getDictLabel() + separator);
/* */
/* */
/* */ break; break;
/* */ } }
/* */ } }
/* */ } }
/* */ } else { } else {
/* 102 */ for (DictData dict : datas) { for (DictData dict : datas) {
/* */
/* 104 */ if (dictValue.equals(dict.getDictValue())) if (dictValue.equals(dict.getDictValue()))
/* */ { {
/* 106 */ return dict.getDictLabel(); return dict.getDictLabel();
/* */ } }
/* */ } }
/* */ } }
/* 110 */ return StringUtils.stripEnd(propertyString.toString(), separator); return StringUtils.stripEnd(propertyString.toString(), separator);
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static String getDictValue(String dictType, String dictLabel, String separator) { public static String getDictValue(String dictType, String dictLabel, String separator) {
/* 123 */ StringBuilder propertyString = new StringBuilder(); StringBuilder propertyString = new StringBuilder();
/* 124 */ List<DictData> datas = getDictCache(dictType); List<DictData> datas = getDictCache(dictType);
/* */
/* 126 */ if (StringUtils.containsAny(separator, dictLabel) && StringUtils.isNotEmpty(datas)) { if (StringUtils.containsAny(separator, dictLabel) && StringUtils.isNotEmpty(datas)) {
/* */
/* 128 */ for (DictData dict : datas) { for (DictData dict : datas) {
/* */
/* 130 */ for (String label : dictLabel.split(separator)) { for (String label : dictLabel.split(separator)) {
/* */
/* 132 */ if (label.equals(dict.getDictLabel())) { if (label.equals(dict.getDictLabel())) {
/* */
/* 134 */ propertyString.append(dict.getDictValue() + separator); propertyString.append(dict.getDictValue() + separator);
/* */
/* */
/* */ break; break;
/* */ } }
/* */ } }
/* */ } }
/* */ } else { } else {
/* 142 */ for (DictData dict : datas) { for (DictData dict : datas) {
/* */
/* 144 */ if (dictLabel.equals(dict.getDictLabel())) if (dictLabel.equals(dict.getDictLabel()))
/* */ { {
/* 146 */ return dict.getDictValue(); return dict.getDictValue();
/* */ } }
/* */ } }
/* */ } }
/* 150 */ return StringUtils.stripEnd(propertyString.toString(), separator); return StringUtils.stripEnd(propertyString.toString(), separator);
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */ public static void clearDictCache() { public static void clearDictCache() {
/* 158 */ CacheUtils.removeAll(getCacheName()); CacheUtils.removeAll(getCacheName());
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static String getCacheName() { public static String getCacheName() {
/* 168 */ return "sys-dict"; return "sys-dict";
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static String getCacheKey(String configKey) { public static String getCacheKey(String configKey) {
/* 179 */ return "sys_dict:" + configKey; return "sys_dict:" + configKey;
/* */ } }
/* */ } }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\system\dic\\utils\DictUtils.class /* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\system\dic\\utils\DictUtils.class

@ -1,34 +1,34 @@
/* */ package com.archive.project.ycts package com.archive.project.ycts
; ;
/* */
/* */ import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
/* */ import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
/* */ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ @Controller @Controller
/* */ @RequestMapping({"/ycts"}) @RequestMapping({"/ycts"})
/* */ public class ExceptionInfoController public class ExceptionInfoController
/* */ { {
/* 19 */ private String prefix = "ycts"; private String prefix = "ycts";
/* */
/* */
/* */
/* */
/* */
/* */ @GetMapping({"/fileNotExists"}) @GetMapping({"/fileNotExists"})
/* */ public String fileNotExists() { public String fileNotExists() {
/* 27 */ return this.prefix + "/fileNotExists"; return this.prefix + "/fileNotExists";
/* */ } }
/* */ } }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\ycts\ExceptionInfoController.class /* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\ycts\ExceptionInfoController.class

Loading…
Cancel
Save