feat:修改档案接收信息

dev
wangxy 8 months ago
parent 2394a60c5d
commit 09f858a611

@ -1,413 +1,412 @@
/* */ package com.archive.common.utils package com.archive.common.utils
; ;
/* */
/* */ import com.archive.common.utils.text.StrFormatter; import com.archive.common.utils.text.StrFormatter;
/* */ import java.util.Collection; import java.util.Collection;
/* */ import java.util.Map; import java.util.Map;
/* */ import org.apache.commons.lang3.StringUtils;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class StringUtils
/* */ public class StringUtils extends org.apache.commons.lang3.StringUtils
/* */ extends StringUtils {
/* */ { private static final String NULLSTR = "";
/* */ private static final String NULLSTR = ""; private static final char SEPARATOR = '_';
/* */ private static final char SEPARATOR = '_';
/* */ public static <T> T nvl(T value, T defaultValue) {
/* */ public static <T> T nvl(T value, T defaultValue) { return (value != null) ? value : defaultValue;
/* 28 */ return (value != null) ? value : defaultValue; }
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static boolean isEmpty(Collection<?> coll) {
/* */ public static boolean isEmpty(Collection<?> coll) { return (isNull(coll) || coll.isEmpty());
/* 39 */ return (isNull(coll) || coll.isEmpty()); }
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static boolean isNotEmpty(Collection<?> coll) {
/* */ public static boolean isNotEmpty(Collection<?> coll) { return !isEmpty(coll);
/* 50 */ return !isEmpty(coll); }
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static boolean isEmpty(Object[] objects) {
/* */ public static boolean isEmpty(Object[] objects) { return (isNull(objects) || objects.length == 0);
/* 61 */ return (isNull(objects) || objects.length == 0); }
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static boolean isNotEmpty(Object[] objects) {
/* */ public static boolean isNotEmpty(Object[] objects) { return !isEmpty(objects);
/* 72 */ return !isEmpty(objects); }
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static boolean isEmpty(Map<?, ?> map) {
/* */ public static boolean isEmpty(Map<?, ?> map) { return (isNull(map) || map.isEmpty());
/* 83 */ return (isNull(map) || map.isEmpty()); }
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static boolean isNotEmpty(Map<?, ?> map) {
/* */ public static boolean isNotEmpty(Map<?, ?> map) { return !isEmpty(map);
/* 94 */ return !isEmpty(map); }
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static boolean isEmpty(String str) {
/* */ public static boolean isEmpty(String str) { return (isNull(str) || "".equals(str.trim()));
/* 105 */ return (isNull(str) || "".equals(str.trim())); }
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static boolean isNotEmpty(String str) {
/* */ public static boolean isNotEmpty(String str) { return !isEmpty(str);
/* 116 */ return !isEmpty(str); }
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static boolean isNull(Object object) {
/* */ public static boolean isNull(Object object) { return (object == null);
/* 127 */ return (object == null); }
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static boolean isNotNull(Object object) {
/* */ public static boolean isNotNull(Object object) { return !isNull(object);
/* 138 */ return !isNull(object); }
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static boolean isArray(Object object) {
/* */ public static boolean isArray(Object object) { return (isNotNull(object) && object.getClass().isArray());
/* 149 */ return (isNotNull(object) && object.getClass().isArray()); }
/* */ }
/* */
/* */
/* */
/* */
/* */ public static String trim(String str) {
/* */ public static String trim(String str) { return (str == null) ? "" : str.trim();
/* 157 */ return (str == null) ? "" : str.trim(); }
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static String substring(String str, int start) {
/* */ public static String substring(String str, int start) { if (str == null)
/* 169 */ if (str == null) {
/* */ { return "";
/* 171 */ return ""; }
/* */ }
/* */ if (start < 0)
/* 174 */ if (start < 0) {
/* */ { start = str.length() + start;
/* 176 */ start = str.length() + start; }
/* */ }
/* */ if (start < 0)
/* 179 */ if (start < 0) {
/* */ { start = 0;
/* 181 */ start = 0; }
/* */ } if (start > str.length())
/* 183 */ if (start > str.length()) {
/* */ { return "";
/* 185 */ return ""; }
/* */ }
/* */ return str.substring(start);
/* 188 */ return str.substring(start); }
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static String substring(String str, int start, int end) {
/* */ public static String substring(String str, int start, int end) { if (str == null)
/* 201 */ if (str == null) {
/* */ { return "";
/* 203 */ return ""; }
/* */ }
/* */ if (end < 0)
/* 206 */ if (end < 0) {
/* */ { end = str.length() + end;
/* 208 */ end = str.length() + end; }
/* */ } if (start < 0)
/* 210 */ if (start < 0) {
/* */ { start = str.length() + start;
/* 212 */ start = str.length() + start; }
/* */ }
/* */ if (end > str.length())
/* 215 */ if (end > str.length()) {
/* */ { end = str.length();
/* 217 */ end = str.length(); }
/* */ }
/* */ if (start > end)
/* 220 */ if (start > end) {
/* */ { return "";
/* 222 */ return ""; }
/* */ }
/* */ if (start < 0)
/* 225 */ if (start < 0) {
/* */ { start = 0;
/* 227 */ start = 0; }
/* */ } if (end < 0)
/* 229 */ if (end < 0) {
/* */ { end = 0;
/* 231 */ end = 0; }
/* */ }
/* */ return str.substring(start, end);
/* 234 */ return str.substring(start, end); }
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static String format(String template, Object... params) {
/* */ public static String format(String template, Object... params) { if (isEmpty(params) || isEmpty(template))
/* 252 */ if (isEmpty(params) || isEmpty(template)) {
/* */ { return template;
/* 254 */ return template; }
/* */ } return StrFormatter.format(template, params);
/* 256 */ return StrFormatter.format(template, params); }
/* */ }
/* */
/* */
/* */
/* */
/* */ public static String toUnderScoreCase(String str) {
/* */ public static String toUnderScoreCase(String str) { if (str == null)
/* 264 */ if (str == null) {
/* */ { return null;
/* 266 */ return null; }
/* */ } StringBuilder sb = new StringBuilder();
/* 268 */ StringBuilder sb = new StringBuilder();
/* */ boolean preCharIsUpperCase = true;
/* 270 */ boolean preCharIsUpperCase = true;
/* */ boolean curreCharIsUpperCase = true;
/* 272 */ boolean curreCharIsUpperCase = true;
/* */ boolean nexteCharIsUpperCase = true;
/* 274 */ boolean nexteCharIsUpperCase = true; for (int i = 0; i < str.length(); i++) {
/* 275 */ for (int i = 0; i < str.length(); i++) {
/* */ char c = str.charAt(i);
/* 277 */ char c = str.charAt(i); if (i > 0) {
/* 278 */ if (i > 0) {
/* */ preCharIsUpperCase = Character.isUpperCase(str.charAt(i - 1));
/* 280 */ preCharIsUpperCase = Character.isUpperCase(str.charAt(i - 1)); }
/* */ } else {
/* */ else {
/* */ preCharIsUpperCase = false;
/* 284 */ preCharIsUpperCase = false; }
/* */ }
/* */ curreCharIsUpperCase = Character.isUpperCase(c);
/* 287 */ curreCharIsUpperCase = Character.isUpperCase(c);
/* */ if (i < str.length() - 1)
/* 289 */ if (i < str.length() - 1) {
/* */ { nexteCharIsUpperCase = Character.isUpperCase(str.charAt(i + 1));
/* 291 */ nexteCharIsUpperCase = Character.isUpperCase(str.charAt(i + 1)); }
/* */ }
/* */ if (preCharIsUpperCase && curreCharIsUpperCase && !nexteCharIsUpperCase) {
/* 294 */ if (preCharIsUpperCase && curreCharIsUpperCase && !nexteCharIsUpperCase) {
/* */ sb.append('_');
/* 296 */ sb.append('_'); }
/* */ } else if (i != 0 && !preCharIsUpperCase && curreCharIsUpperCase) {
/* 298 */ else if (i != 0 && !preCharIsUpperCase && curreCharIsUpperCase) {
/* */ sb.append('_');
/* 300 */ sb.append('_'); }
/* */ } sb.append(Character.toLowerCase(c));
/* 302 */ sb.append(Character.toLowerCase(c)); }
/* */ } return sb.toString();
/* 304 */ return sb.toString(); }
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static boolean inStringIgnoreCase(String str, String... strs) {
/* */ public static boolean inStringIgnoreCase(String str, String... strs) { if (str != null && strs != null)
/* 316 */ if (str != null && strs != null) {
/* */ { for (String s : strs) {
/* 318 */ for (String s : strs) {
/* */ if (str.equalsIgnoreCase(trim(s)))
/* 320 */ if (str.equalsIgnoreCase(trim(s))) {
/* */ { return true;
/* 322 */ return true; }
/* */ } }
/* */ } }
/* */ } return false;
/* 326 */ return false; }
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static String convertToCamelCase(String name) {
/* */ public static String convertToCamelCase(String name) { StringBuilder result = new StringBuilder();
/* 337 */ StringBuilder result = new StringBuilder();
/* */ if (name == null || name.isEmpty())
/* 339 */ if (name == null || name.isEmpty()) {
/* */ {
/* */ return "";
/* 342 */ return ""; }
/* */ } if (!name.contains("_"))
/* 344 */ if (!name.contains("_")) {
/* */ {
/* */ return name.substring(0, 1).toUpperCase() + name.substring(1);
/* 347 */ return name.substring(0, 1).toUpperCase() + name.substring(1); }
/* */ }
/* */ String[] camels = name.split("_");
/* 350 */ String[] camels = name.split("_"); for (String camel : camels) {
/* 351 */ for (String camel : camels) {
/* */
/* */ if (!camel.isEmpty()) {
/* 354 */ if (!camel.isEmpty()) {
/* */
/* */
/* */
/* */ result.append(camel.substring(0, 1).toUpperCase());
/* 359 */ result.append(camel.substring(0, 1).toUpperCase()); result.append(camel.substring(1).toLowerCase());
/* 360 */ result.append(camel.substring(1).toLowerCase()); }
/* */ } } return result.toString();
/* 362 */ } return result.toString(); }
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */ public static String toCamelCase(String s) {
/* */ public static String toCamelCase(String s) { if (s == null)
/* 371 */ if (s == null) {
/* */ { return null;
/* 373 */ return null; }
/* */ } if (s.indexOf('_') == -1)
/* 375 */ if (s.indexOf('_') == -1) {
/* */ { return s;
/* 377 */ return s; }
/* */ } s = s.toLowerCase();
/* 379 */ s = s.toLowerCase(); StringBuilder sb = new StringBuilder(s.length());
/* 380 */ StringBuilder sb = new StringBuilder(s.length()); boolean upperCase = false;
/* 381 */ boolean upperCase = false; for (int i = 0; i < s.length(); i++) {
/* 382 */ for (int i = 0; i < s.length(); i++) {
/* */ char c = s.charAt(i);
/* 384 */ char c = s.charAt(i);
/* */ if (c == '_') {
/* 386 */ if (c == '_') {
/* */ upperCase = true;
/* 388 */ upperCase = true; }
/* */ } else if (upperCase) {
/* 390 */ else if (upperCase) {
/* */ sb.append(Character.toUpperCase(c));
/* 392 */ sb.append(Character.toUpperCase(c)); upperCase = false;
/* 393 */ upperCase = false; }
/* */ } else {
/* */ else {
/* */ sb.append(c);
/* 397 */ sb.append(c); }
/* */ } }
/* */ } return sb.toString();
/* 400 */ return sb.toString(); }
/* */ }
/* */
/* */
/* */ public static <T> T cast(Object obj) {
/* */ public static <T> T cast(Object obj) { return (T)obj;
/* 406 */ return (T)obj; }
/* */ } }
/* */ }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\commo\\utils\StringUtils.class /* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\commo\\utils\StringUtils.class

@ -7,9 +7,11 @@
/* */ import com.archive.common.utils.file.ImageUtils; /* */ import com.archive.common.utils.file.ImageUtils;
/* */ import com.archive.common.utils.reflect.ReflectUtils; /* */ import com.archive.common.utils.reflect.ReflectUtils;
/* */ import com.archive.common.utils.text.Convert; /* */ import com.archive.common.utils.text.Convert;
/* */ import com.archive.framework.aspectj.lang.annotation.Excel; /* */ import com.archive.framework.aspectj.lang.annotation.ColumnType;
import com.archive.framework.aspectj.lang.annotation.Excel;
/* */ import com.archive.framework.aspectj.lang.annotation.Excels; /* */ import com.archive.framework.aspectj.lang.annotation.Excels;
/* */ import com.archive.framework.config.ArchiveConfig; /* */ import com.archive.framework.aspectj.lang.annotation.Type;
import com.archive.framework.config.ArchiveConfig;
/* */ import com.archive.framework.web.domain.AjaxResult; /* */ import com.archive.framework.web.domain.AjaxResult;
/* */ import com.archive.project.system.dict.utils.DictUtils; /* */ import com.archive.project.system.dict.utils.DictUtils;
/* */ import java.io.File; /* */ import java.io.File;
@ -80,7 +82,7 @@
/* */ /* */
/* */ /* */
/* */ /* */
/* */ private Excel.Type type; /* */ private Type type;
/* */ /* */
/* */ /* */
/* */ /* */
@ -133,7 +135,7 @@
/* */ } /* */ }
/* */ /* */
/* */ /* */
/* */ public void init(List<T> list, String sheetName, Excel.Type type) { /* */ public void init(List<T> list, String sheetName, Type type) {
/* 137 */ if (list == null) /* 137 */ if (list == null)
/* */ { /* */ {
/* 139 */ list = new ArrayList<>(); /* 139 */ list = new ArrayList<>();
@ -165,7 +167,7 @@
/* */ /* */
/* */ /* */
/* */ public List<T> importExcel(String sheetName, InputStream is) throws Exception { /* */ public List<T> importExcel(String sheetName, InputStream is) throws Exception {
/* 168 */ this.type = Excel.Type.IMPORT; /* 168 */ this.type = Type.IMPORT;
/* 169 */ this.wb = WorkbookFactory.create(is); /* 169 */ this.wb = WorkbookFactory.create(is);
/* 170 */ List<T> list = new ArrayList<>(); /* 170 */ List<T> list = new ArrayList<>();
/* 171 */ Sheet sheet = null; /* 171 */ Sheet sheet = null;
@ -215,7 +217,7 @@
/* */ /* */
/* 216 */ Field field = allFields[col]; /* 216 */ Field field = allFields[col];
/* 217 */ Excel attr = field.<Excel>getAnnotation(Excel.class); /* 217 */ Excel attr = field.<Excel>getAnnotation(Excel.class);
/* 218 */ if (attr != null && (attr.type() == Excel.Type.ALL || attr.type() == this.type)) { /* 218 */ if (attr != null && (attr.type() == Type.ALL || attr.type() == this.type)) {
/* */ /* */
/* */ /* */
/* 221 */ field.setAccessible(true); /* 221 */ field.setAccessible(true);
@ -335,7 +337,7 @@
/* */ /* */
/* */ /* */
/* */ public AjaxResult exportExcel(List<T> list, String sheetName) { /* */ public AjaxResult exportExcel(List<T> list, String sheetName) {
/* 338 */ init(list, sheetName, Excel.Type.EXPORT); /* 338 */ init(list, sheetName, Type.EXPORT);
/* 339 */ return exportExcel(); /* 339 */ return exportExcel();
/* */ } /* */ }
/* */ /* */
@ -347,7 +349,7 @@
/* */ /* */
/* */ /* */
/* */ public AjaxResult importTemplateExcel(String sheetName) { /* */ public AjaxResult importTemplateExcel(String sheetName) {
/* 350 */ init(null, sheetName, Excel.Type.IMPORT); /* 350 */ init(null, sheetName, Type.IMPORT);
/* 351 */ return exportExcel(); /* 351 */ return exportExcel();
/* */ } /* */ }
/* */ /* */
@ -376,7 +378,7 @@
/* 376 */ Excel excel = (Excel)os[1]; /* 376 */ Excel excel = (Excel)os[1];
/* 377 */ createCell(excel, row, column++); /* 377 */ createCell(excel, row, column++);
/* */ } /* */ }
/* 379 */ if (Excel.Type.EXPORT.equals(this.type)) { /* 379 */ if (Type.EXPORT.equals(this.type)) {
/* */ /* */
/* 381 */ fillExcelData(index, row); /* 381 */ fillExcelData(index, row);
/* 382 */ addStatisticsRow(); /* 382 */ addStatisticsRow();
@ -537,15 +539,15 @@
/* */ /* */
/* */ /* */
/* */ public void setCellVo(Object value, Excel attr, Cell cell) { /* */ public void setCellVo(Object value, Excel attr, Cell cell) {
/* 540 */ if (Excel.ColumnType.STRING == attr.cellType()) { /* 540 */ if (ColumnType.STRING == attr.cellType()) {
/* */ /* */
/* 542 */ cell.setCellValue(StringUtils.isNull(value) ? attr.defaultValue() : (value + attr.suffix())); /* 542 */ cell.setCellValue(StringUtils.isNull(value) ? attr.defaultValue() : (value + attr.suffix()));
/* */ } /* */ }
/* 544 */ else if (Excel.ColumnType.NUMERIC == attr.cellType()) { /* 544 */ else if (ColumnType.NUMERIC == attr.cellType()) {
/* */ /* */
/* 546 */ cell.setCellValue(StringUtils.contains(Convert.toStr(value), ".") ? Convert.toDouble(value).doubleValue() : Convert.toInt(value).intValue()); /* 546 */ cell.setCellValue(StringUtils.contains(Convert.toStr(value), ".") ? Convert.toDouble(value).doubleValue() : Convert.toInt(value).intValue());
/* */ } /* */ }
/* 548 */ else if (Excel.ColumnType.IMAGE == attr.cellType()) { /* 548 */ else if (ColumnType.IMAGE == attr.cellType()) {
/* */ /* */
/* */ /* */
/* 551 */ XSSFClientAnchor xSSFClientAnchor = new XSSFClientAnchor(0, 0, 0, 0, (short)cell.getColumnIndex(), cell.getRow().getRowNum(), (short)(cell.getColumnIndex() + 1), cell.getRow().getRowNum() + 1); /* 551 */ XSSFClientAnchor xSSFClientAnchor = new XSSFClientAnchor(0, 0, 0, 0, (short)cell.getColumnIndex(), cell.getRow().getRowNum(), (short)(cell.getColumnIndex() + 1), cell.getRow().getRowNum() + 1);
@ -1002,7 +1004,7 @@
/* */ /* */
/* */ /* */
/* */ private void putToField(Field field, Excel attr) { /* */ private void putToField(Field field, Excel attr) {
/* 1005 */ if (attr != null && (attr.type() == Excel.Type.ALL || attr.type() == this.type)) /* 1005 */ if (attr != null && (attr.type() == Type.ALL || attr.type() == this.type))
/* */ { /* */ {
/* 1007 */ this.fields.add(new Object[] { field, attr }); /* 1007 */ this.fields.add(new Object[] { field, attr });
/* */ } /* */ }

@ -0,0 +1,135 @@
package com.archive.framework.aspectj.lang.annotation
;
import com.archive.framework.aspectj.lang.annotation.Excel;
public enum Align
{
AUTO(0), LEFT(1), CENTER(2), RIGHT(3);
private final int value;
Align(int value) {
this.value = value;
}
public int value() {
return this.value;
}
}
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\aspectj\lang\annotation\Excel$Align.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/

@ -1,135 +0,0 @@
/* */ package com.archive.framework.aspectj.lang.annotation
;
/* */
/* */ import com.archive.framework.aspectj.lang.annotation.Excel;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public enum Align
/* */ {
/* 115 */ AUTO(0), LEFT(1), CENTER(2), RIGHT(3);
/* */
/* */ private final int value;
/* */
/* */ Align(int value) {
/* 120 */ this.value = value;
/* */ }
/* */
/* */
/* */ public int value() {
/* 125 */ return this.value;
/* */ }
/* */ }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\aspectj\lang\annotation\Excel$Align.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/

@ -1,182 +1,273 @@
/* */ package com.archive.framework.web.controller
package com.archive.framework.web.controller
; ;
/* */
/* */ import com.archive.common.utils.StringUtils;
/* */ import com.archive.common.utils.security.ShiroUtils;
/* */ import com.archive.common.utils.sql.SqlUtil; import com.archive.common.utils.DateUtils;
/* */ import com.archive.framework.web.domain.AjaxResult; import com.archive.common.utils.StringUtils;
/* */ import com.archive.framework.web.page.PageDomain; import com.archive.common.utils.security.ShiroUtils;
/* */ import com.archive.framework.web.page.TableDataInfo; import com.archive.common.utils.sql.SqlUtil;
/* */ import com.archive.framework.web.page.TableSupport; import com.archive.framework.web.domain.AjaxResult;
/* */ import com.archive.project.system.user.domain.User; import com.archive.framework.web.domain.Type;
/* */ import com.github.pagehelper.PageHelper; import com.archive.framework.web.page.PageDomain;
/* */ import com.github.pagehelper.PageInfo; import com.archive.framework.web.page.TableDataInfo;
/* */ import java.beans.PropertyEditor; import com.archive.framework.web.page.TableSupport;
/* */ import java.util.Date; import com.archive.project.system.user.domain.User;
/* */ import java.util.List; import com.github.pagehelper.PageHelper;
/* */ import org.springframework.web.bind.WebDataBinder; import com.github.pagehelper.PageInfo;
/* */ import org.springframework.web.bind.annotation.InitBinder; import java.beans.PropertyEditor;
/* */ import java.beans.PropertyEditorSupport;
/* */ import java.util.Date;
/* */ import java.util.List;
/* */ import org.springframework.web.bind.WebDataBinder;
/* */ import org.springframework.web.bind.annotation.InitBinder;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class BaseController
/* */ {
/* */ @InitBinder
/* */ public void initBinder(WebDataBinder binder) {
/* 35 */ binder.registerCustomEditor(Date.class, (PropertyEditor)new Object(this));
/* */ }
/* */ public class BaseController
/* */ {
/* */
/* */ @InitBinder
/* */ public void initBinder(WebDataBinder binder) {
/* */ // Date 类型转换
/* */ binder.registerCustomEditor(Date.class, new PropertyEditorSupport() {
/* */ @Override
/* */ public void setAsText(String text) {
/* */ setValue(DateUtils.parseDate(text));
/* */ }
/* */ });
/* */ protected void startPage() { }
/* 50 */ PageDomain pageDomain = TableSupport.buildPageRequest();
/* 51 */ Integer pageNum = pageDomain.getPageNum();
/* 52 */ Integer pageSize = pageDomain.getPageSize();
/* 53 */ if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)) {
/* */
/* 55 */ String orderBy = SqlUtil.escapeOrderBySql(pageDomain.getOrderBy());
/* 56 */ PageHelper.startPage(pageNum.intValue(), pageSize.intValue(), orderBy);
/* */ }
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */ protected void startOrderBy() { protected void startPage() {
/* 65 */ PageDomain pageDomain = TableSupport.buildPageRequest();
/* 66 */ if (StringUtils.isNotEmpty(pageDomain.getOrderBy())) { PageDomain pageDomain = TableSupport.buildPageRequest();
/* */
/* 68 */ String orderBy = SqlUtil.escapeOrderBySql(pageDomain.getOrderBy()); Integer pageNum = pageDomain.getPageNum();
/* 69 */ PageHelper.orderBy(orderBy);
/* */ } Integer pageSize = pageDomain.getPageSize();
/* */ }
/* */ if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)) {
/* */
/* */
/* */ String orderBy = SqlUtil.escapeOrderBySql(pageDomain.getOrderBy());
/* */
/* */ PageHelper.startPage(pageNum.intValue(), pageSize.intValue(), orderBy);
/* */ protected TableDataInfo getDataTable(List<?> list) {
/* 79 */ TableDataInfo rspData = new TableDataInfo(); }
/* 80 */ if (list != null) {
/* 81 */ rspData.setCode(0); }
/* 82 */ rspData.setRows(list);
/* 83 */ rspData.setTotal((new PageInfo(list)).getTotal());
/* */ }
/* 85 */ return rspData;
/* */ }
/* */
/* */
/* */ protected void startOrderBy() {
/* */
/* */ PageDomain pageDomain = TableSupport.buildPageRequest();
/* */
/* */ if (StringUtils.isNotEmpty(pageDomain.getOrderBy())) {
/* */
/* */ protected AjaxResult toAjax(int rows) {
/* 96 */ return (rows > 0) ? success() : error(); String orderBy = SqlUtil.escapeOrderBySql(pageDomain.getOrderBy());
/* */ }
/* */ PageHelper.orderBy(orderBy);
/* */
/* */ }
/* */
/* */ }
/* */
/* */
/* */
/* */ protected AjaxResult toAjax(boolean result) {
/* 107 */ return result ? success() : error();
/* */ }
/* */
/* */
/* */ protected TableDataInfo getDataTable(List<?> list) {
/* */
/* */ TableDataInfo rspData = new TableDataInfo();
/* */ public AjaxResult success() {
/* 115 */ return AjaxResult.success(); if (list != null) {
/* */ }
/* */ rspData.setCode(0);
/* */
/* */ rspData.setRows(list);
/* */
/* */ rspData.setTotal((new PageInfo(list)).getTotal());
/* */ public AjaxResult error() {
/* 123 */ return AjaxResult.error(); }
/* */ }
/* */ return rspData;
/* */
/* */ }
/* */
/* */
/* */ public AjaxResult success(String message) {
/* 131 */ return AjaxResult.success(message);
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */ public AjaxResult error(String message) { protected AjaxResult toAjax(int rows) {
/* 139 */ return AjaxResult.error(message);
/* */ } return (rows > 0) ? success() : error();
/* */
/* */ }
/* */
/* */
/* */
/* */ public AjaxResult error(AjaxResult.Type type, String message) {
/* 147 */ return new AjaxResult(type, message);
/* */ }
/* */
/* */
/* */
/* */
/* */ protected AjaxResult toAjax(boolean result) {
/* */ public String redirect(String url) {
/* 155 */ return StringUtils.format("redirect:{}", new Object[] { url }); return result ? success() : error();
/* */ }
/* */ }
/* */
/* */ public User getSysUser() {
/* 160 */ return ShiroUtils.getSysUser();
/* */ }
/* */
/* */
/* */ public void setSysUser(User user) {
/* 165 */ ShiroUtils.setSysUser(user); public AjaxResult success() {
/* */ }
/* */ return AjaxResult.success();
/* */
/* */ public Long getUserId() { }
/* 170 */ return getSysUser().getUserId();
/* */ }
/* */
/* */
/* */ public String getLoginName() {
/* 175 */ return getSysUser().getLoginName();
/* */ }
/* */ } public AjaxResult error() {
return AjaxResult.error();
}
public AjaxResult success(String message) {
return AjaxResult.success(message);
}
public AjaxResult error(String message) {
return AjaxResult.error(message);
}
public AjaxResult error(Type type, String message) {
return new AjaxResult(type, message);
}
public String redirect(String url) {
return StringUtils.format("redirect:{}", new Object[]{url});
}
public User getSysUser() {
return ShiroUtils.getSysUser();
}
public void setSysUser(User user) {
ShiroUtils.setSysUser(user);
}
public Long getUserId() {
return getSysUser().getUserId();
}
public String getLoginName() {
return getSysUser().getLoginName();
}
}
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\web\controller\BaseController.class /* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\web\controller\BaseController.class

@ -48,7 +48,7 @@
/* */ private Date startTimestamp; /* */ private Date startTimestamp;
/* */ private Date lastAccessTime; /* */ private Date lastAccessTime;
/* */ private Long expireTime; /* */ private Long expireTime;
/* 49 */ private OnlineSession.OnlineStatus status = OnlineSession.OnlineStatus.on_line; /* 49 */ private OnlineStatus status = OnlineStatus.on_line;
/* */ /* */
/* */ /* */
/* */ private OnlineSession session; /* */ private OnlineSession session;
@ -154,12 +154,12 @@
/* */ } /* */ }
/* */ /* */
/* */ /* */
/* */ public OnlineSession.OnlineStatus getStatus() { /* */ public OnlineStatus getStatus() {
/* 156 */ return this.status; /* 156 */ return this.status;
/* */ } /* */ }
/* */ /* */
/* */ /* */
/* */ public void setStatus(OnlineSession.OnlineStatus status) { /* */ public void setStatus(OnlineStatus status) {
/* 161 */ this.status = status; /* 161 */ this.status = status;
/* */ } /* */ }
/* */ /* */
@ -173,7 +173,7 @@
/* 171 */ this.session = session; /* 171 */ this.session = session;
/* */ } /* */ }
/* */ /* */
/* */ /* */ @Override
/* */ public String toString() { /* */ public String toString() {
/* 176 */ return (new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)) /* 176 */ return (new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE))
/* 177 */ .append("sessionId", getSessionId()) /* 177 */ .append("sessionId", getSessionId())

Loading…
Cancel
Save