feat:修改档案接收信息

dev
wangxy 2 months ago
parent 09f858a611
commit 26bd04e218

@ -393,7 +393,7 @@
private static Workbook createWorkBook(String filePath) {
XSSFWorkbook xSSFWorkbook;
XSSFWorkbook xSSFWorkbook = null;
Workbook wb = null;
if (filePath == null) {
return null;
@ -473,7 +473,7 @@
}
switch (null.$SwitchMap$org$apache$poi$ss$usermodel$CellType[cellType.ordinal()])
switch (cellType.ordinal())
{

@ -250,7 +250,7 @@
public static int getStyle(String styles) {
switch (styles)
{ case "普通":
sty = 0;
Integer sty = 0;
@ -319,8 +319,9 @@
e.printStackTrace();
} finally {
try {
if (null != os)
os.close();
if (null != os) {
os.close();
}
} catch (Exception e) {
e.printStackTrace();
}
@ -433,8 +434,9 @@
e.printStackTrace();
} finally {
try {
if (null != os)
os.close();
if (null != os) {
os.close();
}
} catch (Exception e) {
e.printStackTrace();
}

@ -12,7 +12,7 @@
/* */ import java.awt.Font;
/* */ import java.awt.Graphics;
/* */ import java.awt.Graphics2D;
/* */ import java.awt.Image;
/* */
/* */ import java.awt.RenderingHints;
/* */ import java.awt.image.BufferedImage;
/* */ import java.io.File;
@ -264,7 +264,7 @@
/* */ public static void changeImgColor(String path, String newPath) throws IOException {
/* 263 */ File file = new File(path);
/* 264 */ BufferedImage bi = ImageIO.read(file);
/* 265 */ Image image = bi;
/* 265 */ java.awt.Image image = bi;
/* */
/* 267 */ ImageIcon imageIcon = new ImageIcon(image);
/* 268 */ int width = imageIcon.getIconWidth();
@ -333,7 +333,7 @@
/* 331 */ return newPath;
/* */ }
/* 333 */ System.out.println("target image's size, width:{" + w + "}, height:{" + h + "}.");
/* 334 */ Image img = ImageIO.read(imgFile);
/* 334 */ java.awt.Image img = ImageIO.read(imgFile);
/* 335 */ if (!force) {
/* */
/* 337 */ int width = img.getWidth(null);

@ -7,13 +7,13 @@
/* */ import java.text.SimpleDateFormat;
/* */ import java.util.Date;
/* */ import org.apache.commons.lang3.time.DateFormatUtils;
/* */ import org.apache.commons.lang3.time.DateUtils;
/* */
/* */
/* */
/* */
/* */
/* */ public class DateUtils
/* */ extends DateUtils
/* */ extends org.apache.commons.lang3.time.DateUtils
/* */ {
/* 16 */ public static String YYYY = "yyyy";
/* */

@ -5,7 +5,7 @@
/* */ import java.util.List;
/* */ import java.util.regex.Matcher;
/* */ import java.util.regex.Pattern;
/* */ import org.springframework.beans.BeanUtils;
/* */
/* */
/* */
/* */
@ -14,7 +14,7 @@
/* */
/* */
/* */ public class BeanUtils
/* */ extends BeanUtils
/* */ extends org.springframework.beans.BeanUtils
/* */ {
/* */ private static final int BEAN_METHOD_PROP_INDEX = 3;
/* 20 */ private static final Pattern GET_PATTERN = Pattern.compile("get(\\p{javaUpperCase}\\w*)");

@ -1,8 +1,7 @@
/* */ package com.archive.common.utils.file;
/* */
/* */ import com.archive.common.utils.StringUtils;
/* */ import com.archive.common.utils.file.FileTypeUtils;
/* */ import com.archive.common.utils.file.MimeTypeUtils;
/* */
/* */ import java.io.File;
/* */ import java.io.FileInputStream;
/* */ import java.io.IOException;
@ -12,13 +11,12 @@
/* */ import java.nio.charset.StandardCharsets;
/* */ import javax.servlet.http.HttpServletRequest;
/* */ import javax.servlet.http.HttpServletResponse;
/* */ import org.apache.commons.io.FileUtils;
/* */ import org.apache.commons.lang3.ArrayUtils;
/* */
/* */
/* */
/* */ public class FileUtils
/* */ extends FileUtils
/* */
/* */ {
/* 23 */ public static String FILENAME_PATTERN = "[a-zA-Z0-9_\\-\\|\\.\\u4e00-\\u9fa5]+";
/* */

@ -1,133 +1,136 @@
/* */ package com.archive.framework.config
package com.archive.framework.config
;
/* */
/* */ import com.alibaba.druid.pool.DruidDataSource;
/* */ import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceBuilder;
/* */ import com.alibaba.druid.spring.boot.autoconfigure.properties.DruidStatProperties;
/* */ import com.archive.common.utils.spring.SpringUtils;
/* */ import com.archive.framework.aspectj.lang.enums.DataSourceType;
/* */ import com.archive.framework.config.properties.DruidProperties;
/* */ import com.archive.framework.datasource.DynamicDataSource;
/* */ import java.util.HashMap;
/* */ import java.util.Map;
/* */ import javax.servlet.Filter;
/* */ import javax.sql.DataSource;
/* */ import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
/* */ import org.springframework.boot.context.properties.ConfigurationProperties;
/* */ import org.springframework.boot.web.servlet.FilterRegistrationBean;
/* */ import org.springframework.context.annotation.Bean;
/* */ import org.springframework.context.annotation.Configuration;
/* */ import org.springframework.context.annotation.Primary;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ @Configuration
/* */ public class DruidConfig
/* */ {
/* */ @Bean
/* */ @ConfigurationProperties("spring.datasource.druid.master")
/* */ public DataSource masterDataSource(DruidProperties druidProperties) {
/* 39 */ DruidDataSource dataSource = DruidDataSourceBuilder.create().build();
/* 40 */ return (DataSource)druidProperties.dataSource(dataSource);
/* */ }
/* */
/* */
/* */ @Bean
/* */ @ConfigurationProperties("spring.datasource.druid.slave")
/* */ @ConditionalOnProperty(prefix = "spring.datasource.druid.slave", name = {"enabled"}, havingValue = "true")
/* */ public DataSource slaveDataSource(DruidProperties druidProperties) {
/* 48 */ DruidDataSource dataSource = DruidDataSourceBuilder.create().build();
/* 49 */ return (DataSource)druidProperties.dataSource(dataSource);
/* */ }
/* */
/* */
/* */ @Bean(name = {"dynamicDataSource"})
/* */ @Primary
/* */ public DynamicDataSource dataSource(DataSource masterDataSource) {
/* 56 */ Map<Object, Object> targetDataSources = new HashMap<>();
/* 57 */ targetDataSources.put(DataSourceType.MASTER.name(), masterDataSource);
/* 58 */ setDataSource(targetDataSources, DataSourceType.SLAVE.name(), "slaveDataSource");
/* 59 */ return new DynamicDataSource(masterDataSource, targetDataSources);
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public void setDataSource(Map<Object, Object> targetDataSources, String sourceName, String beanName) {
/* */ try {
/* 73 */ DataSource dataSource = (DataSource)SpringUtils.getBean(beanName);
/* 74 */ targetDataSources.put(sourceName, dataSource);
/* */ }
/* 76 */ catch (Exception exception) {}
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ @Bean
/* */ @ConditionalOnProperty(name = {"spring.datasource.druid.statViewServlet.enabled"}, havingValue = "true")
/* */ public FilterRegistrationBean removeDruidFilterRegistrationBean(DruidStatProperties properties) {
/* 90 */ DruidStatProperties.StatViewServlet config = properties.getStatViewServlet();
/* */
/* 92 */ String pattern = (config.getUrlPattern() != null) ? config.getUrlPattern() : "/druid/*";
/* 93 */ String commonJsPattern = pattern.replaceAll("\\*", "js/common.js");
/* 94 */ String filePath = "support/http/resources/js/common.js";
/* */
/* 96 */ Object object = new Object(this);
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* 123 */ FilterRegistrationBean registrationBean = new FilterRegistrationBean();
/* 124 */ registrationBean.setFilter((Filter)object);
/* 125 */ registrationBean.addUrlPatterns(new String[] { commonJsPattern });
/* 126 */ return registrationBean;
/* */ }
/* */ }
import com.alibaba.druid.pool.DruidDataSource;
import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceBuilder;
import com.alibaba.druid.spring.boot.autoconfigure.properties.DruidStatProperties;
import com.alibaba.druid.util.Utils;
import com.archive.common.utils.spring.SpringUtils;
import com.archive.framework.aspectj.lang.enums.DataSourceType;
import com.archive.framework.config.properties.DruidProperties;
import com.archive.framework.datasource.DynamicDataSource;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import javax.servlet.*;
import javax.sql.DataSource;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
@Configuration
public class DruidConfig
{
@Bean
@ConfigurationProperties("spring.datasource.druid.master")
public DataSource masterDataSource(DruidProperties druidProperties) {
DruidDataSource dataSource = DruidDataSourceBuilder.create().build();
return (DataSource)druidProperties.dataSource(dataSource);
}
@Bean
@ConfigurationProperties("spring.datasource.druid.slave")
@ConditionalOnProperty(prefix = "spring.datasource.druid.slave", name = {"enabled"}, havingValue = "true")
public DataSource slaveDataSource(DruidProperties druidProperties) {
DruidDataSource dataSource = DruidDataSourceBuilder.create().build();
return (DataSource)druidProperties.dataSource(dataSource);
}
@Bean(name = {"dynamicDataSource"})
@Primary
public DynamicDataSource dataSource(DataSource masterDataSource) {
Map<Object, Object> targetDataSources = new HashMap<>();
targetDataSources.put(DataSourceType.MASTER.name(), masterDataSource);
setDataSource(targetDataSources, DataSourceType.SLAVE.name(), "slaveDataSource");
return new DynamicDataSource(masterDataSource, targetDataSources);
}
public void setDataSource(Map<Object, Object> targetDataSources, String sourceName, String beanName) {
try {
DataSource dataSource = (DataSource)SpringUtils.getBean(beanName);
targetDataSources.put(sourceName, dataSource);
}
catch (Exception exception) {}
}
@Bean
@ConditionalOnProperty(name = {"spring.datasource.druid.statViewServlet.enabled"}, havingValue = "true")
public FilterRegistrationBean removeDruidFilterRegistrationBean(DruidStatProperties properties) {
DruidStatProperties.StatViewServlet config = properties.getStatViewServlet();
String pattern = (config.getUrlPattern() != null) ? config.getUrlPattern() : "/druid/*";
String commonJsPattern = pattern.replaceAll("\\*", "js/common.js");
String filePath = "support/http/resources/js/common.js";
Filter filter = new Filter()
{
@Override
public void init(javax.servlet.FilterConfig filterConfig) throws ServletException
{
}
@Override
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
throws IOException, ServletException
{
chain.doFilter(request, response);
// 重置缓冲区,响应头不会被重置
response.resetBuffer();
// 获取common.js
String text = Utils.readFromResource(filePath);
// 正则替换banner, 除去底部的广告信息
text = text.replaceAll("<a.*?banner\"></a><br/>", "");
text = text.replaceAll("powered.*?shrek.wang</a>", "");
response.getWriter().write(text);
}
@Override
public void destroy()
{
}
};
FilterRegistrationBean registrationBean = new FilterRegistrationBean();
registrationBean.setFilter(filter);
registrationBean.addUrlPatterns(commonJsPattern);
return registrationBean;
}
}
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\config\DruidConfig.class

@ -23,7 +23,7 @@
/* */ import javax.servlet.Filter;
/* */ import net.sf.ehcache.CacheManager;
/* */ import org.apache.commons.io.IOUtils;
/* */ import org.apache.shiro.cache.CacheManager;
/* */
/* */ import org.apache.shiro.cache.ehcache.EhCacheManager;
/* */ import org.apache.shiro.codec.Base64;
/* */ import org.apache.shiro.config.ConfigurationException;
@ -151,7 +151,7 @@
/* */ public UserRealm userRealm(EhCacheManager cacheManager) {
/* 150 */ UserRealm userRealm = new UserRealm();
/* 151 */ userRealm.setAuthorizationCacheName("sys-authCache");
/* 152 */ userRealm.setCacheManager((CacheManager)cacheManager);
/* 152 */ userRealm.setCacheManager(cacheManager);
/* 153 */ return userRealm;
/* */ }
/* */
@ -183,7 +183,7 @@
/* */ public OnlineWebSessionManager sessionManager() {
/* 182 */ OnlineWebSessionManager manager = new OnlineWebSessionManager();
/* */
/* 184 */ manager.setCacheManager((CacheManager)getEhCacheManager());
/* 184 */ manager.setCacheManager(getEhCacheManager());
/* */
/* 186 */ manager.setDeleteInvalidSessions(true);
/* */
@ -213,7 +213,7 @@
/* */
/* 212 */ securityManager.setRememberMeManager((RememberMeManager)rememberMeManager());
/* */
/* 214 */ securityManager.setCacheManager((CacheManager)getEhCacheManager());
/* 214 */ securityManager.setCacheManager(getEhCacheManager());
/* */
/* 216 */ securityManager.setSessionManager((SessionManager)sessionManager());
/* 217 */ return (SecurityManager)securityManager;
@ -344,7 +344,7 @@
/* */
/* */ public KickoutSessionFilter kickoutSessionFilter() {
/* 344 */ KickoutSessionFilter kickoutSessionFilter = new KickoutSessionFilter();
/* 345 */ kickoutSessionFilter.setCacheManager((CacheManager)getEhCacheManager());
/* 345 */ kickoutSessionFilter.setCacheManager(getEhCacheManager());
/* 346 */ kickoutSessionFilter.setSessionManager((SessionManager)sessionManager());
/* */
/* 348 */ kickoutSessionFilter.setMaxSession(this.maxSession);

@ -3,9 +3,11 @@
;
/* */
/* */ import java.util.concurrent.ScheduledExecutorService;
/* */ import java.util.concurrent.ThreadFactory;
/* */ import java.util.concurrent.ScheduledThreadPoolExecutor;
import java.util.concurrent.ThreadFactory;
/* */ import java.util.concurrent.ThreadPoolExecutor;
/* */ import org.apache.commons.lang3.concurrent.BasicThreadFactory;
/* */ import com.archive.common.utils.Threads;
import org.apache.commons.lang3.concurrent.BasicThreadFactory;
/* */ import org.springframework.context.annotation.Bean;
/* */ import org.springframework.context.annotation.Configuration;
/* */ import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
@ -49,10 +51,20 @@
/* */
/* */
/* */ @Bean(name = {"scheduledExecutorService"})
/* */ protected ScheduledExecutorService scheduledExecutorService() {
/* 51 */ return (ScheduledExecutorService)new Object(this, this.corePoolSize, (ThreadFactory)(new BasicThreadFactory.Builder())
/* 52 */ .namingPattern("schedule-pool-%d").daemon(true).build());
/* */ }
/* */ protected ScheduledExecutorService scheduledExecutorService()
{
return new ScheduledThreadPoolExecutor(corePoolSize,
new BasicThreadFactory.Builder().namingPattern("schedule-pool-%d").daemon(true).build(),
new ThreadPoolExecutor.CallerRunsPolicy())
{
@Override
protected void afterExecute(Runnable r, Throwable t)
{
super.afterExecute(r, t);
Threads.printException(r, t);
}
};
}
/* */ }

@ -6,6 +6,7 @@
import com.archive.framework.manager.factory.AsyncFactory;
import com.archive.framework.shiro.session.OnlineSessionFactory;
import com.archive.project.monitor.online.domain.OnlineSession;
import com.archive.project.monitor.online.domain.OnlineStatus;
import com.archive.project.monitor.online.domain.UserOnline;
import com.archive.project.monitor.online.service.IUserOnlineService;
import java.io.Serializable;
@ -56,7 +57,7 @@
@Override
protected Session doReadSession(Serializable sessionId) {
UserOnline userOnline = this.onlineService.selectOnlineById(String.valueOf(sessionId));
if (userOnline == null)
@ -67,7 +68,7 @@
}
@Override
public void update(Session session) throws UnknownSessionException {
super.update(session);
}
@ -115,14 +116,14 @@
@Override
protected void doDelete(Session session) {
OnlineSession onlineSession = (OnlineSession)session;
if (null == onlineSession) {
return;
}
onlineSession.setStatus(OnlineSession.OnlineStatus.off_line);
onlineSession.setStatus(OnlineStatus.off_line);
this.onlineService.deleteOnlineById(String.valueOf(onlineSession.getId()));
}
}

@ -14,7 +14,7 @@
/* */ import javax.servlet.ServletResponse;
/* */ import org.apache.shiro.session.SessionException;
/* */ import org.apache.shiro.subject.Subject;
/* */ import org.apache.shiro.web.filter.authc.LogoutFilter;
/* */
/* */ import org.slf4j.Logger;
/* */ import org.slf4j.LoggerFactory;
/* */
@ -23,7 +23,7 @@
/* */
/* */
/* */ public class LogoutFilter
/* */ extends LogoutFilter
/* */ extends org.apache.shiro.web.filter.authc.LogoutFilter
/* */ {
/* 26 */ private static final Logger log = LoggerFactory.getLogger(com.archive.framework.shiro.web.filter.LogoutFilter.class);
/* */
@ -44,7 +44,7 @@
/* */
/* */
/* */
/* */
/* */ @Override
/* */ protected boolean preHandle(ServletRequest request, ServletResponse response) throws Exception {
/* */ try {
/* 48 */ Subject subject = getSubject(request, response);
@ -80,7 +80,7 @@
/* */
/* */
/* */
/* */
/* */ @Override
/* */ protected String getRedirectUrl(ServletRequest request, ServletResponse response, Subject subject) {
/* 83 */ String url = getLoginUrl();
/* 84 */ if (StringUtils.isNotEmpty(url))

@ -50,7 +50,7 @@
/* */ private long sessionValidationInterval;
/* */
/* */
/* */
/* */ @Override
/* */ public boolean isEnabled() {
/* 53 */ return this.enabled;
/* */ }
@ -75,7 +75,7 @@
/* */
/* */
/* */
/* */
/* */ @Override
/* */ public void enableSessionValidation() {
/* 78 */ this.enabled = true;
/* */
@ -87,9 +87,16 @@
/* */
/* */
/* */ try {
/* 88 */ this.executorService.scheduleAtFixedRate((Runnable)new Object(this), 1000L, this.sessionValidationInterval * 60L * 1000L, TimeUnit.MILLISECONDS);
/* */
/* */
/* */
/* */
executorService.scheduleAtFixedRate(new Runnable() {
@Override
public void run() {
if (enabled) {
sessionManager.validateSessions();
}
}
}, 1000, sessionValidationInterval * 60 * 1000, TimeUnit.MILLISECONDS);
/* */
/* */
/* */
@ -117,7 +124,7 @@
/* */ }
/* */
/* */
/* */
/* */ @Override
/* */ public void disableSessionValidation() {
/* 120 */ if (log.isDebugEnabled())
/* */ {

@ -62,7 +62,7 @@
/* */ public AjaxResult() {}
/* */
/* */ public AjaxResult(Type type, String msg) {
/* 63 */ super.put("code", Integer.valueOf(Type.access$000(type)));
/* 63 */ super.put("code", type);
/* 64 */ super.put("msg", msg);
/* */ }
/* */
@ -75,7 +75,7 @@
/* */
/* */
/* */ public AjaxResult(Type type, String msg, Object data) {
/* 76 */ super.put("code", Integer.valueOf(Type.access$000(type)));
/* 76 */ super.put("code", type);
/* 77 */ super.put("msg", msg);
/* 78 */ if (StringUtils.isNotNull(data))
/* */ {
@ -91,7 +91,7 @@
/* */
/* */
/* */
/* */
/* */ @Override
/* */ public com.archive.framework.web.domain.AjaxResult put(String key, Object value) {
/* 94 */ super.put(key, value);
/* 95 */ return this;

@ -46,7 +46,7 @@
/* */ private PhysicalTableMapper physicalTableMapper;
/* */ @Autowired
/* */ private IExecuteSqlService executeSqlService;
/* */
/* */ @Override
/* */ public Map<String, Object> selectArchiveList(Integer pageNum, Integer pageSize, String orderBy, String orderByColumn, String keyword, String ft, String py, String qw) {
/* 51 */ Map<String, Object> resultMap = new HashMap<>();
/* 52 */ List<LinkedHashMap<String, Object>> resultList = new ArrayList<>();
@ -109,21 +109,21 @@
/* 109 */ String archiveTypeName = (((LinkedHashMap)resultList.get(i)).get("archiveTypeName") == null) ? "" : ((LinkedHashMap)resultList.get(i)).get("archiveTypeName").toString();
/* */
/* 111 */ tm = getRedValueByKeyWord(tm, keyword);
/* 112 */ ((LinkedHashMap<String, String>)resultList.get(i)).put("tm", tm);
/* 112 */ (resultList.get(i)).put("tm", tm);
/* 113 */ zrz = getRedValueByKeyWord(zrz, keyword);
/* 114 */ ((LinkedHashMap<String, String>)resultList.get(i)).put("zrz", zrz);
/* 114 */ (resultList.get(i)).put("zrz", zrz);
/* 115 */ dh = getRedValueByKeyWord(dh, keyword);
/* 116 */ ((LinkedHashMap<String, String>)resultList.get(i)).put("dh", dh);
/* 116 */ (resultList.get(i)).put("dh", dh);
/* 117 */ yearCode = getRedValueByKeyWord(yearCode, keyword);
/* 118 */ ((LinkedHashMap<String, String>)resultList.get(i)).put("yearCode", yearCode);
/* 118 */ (resultList.get(i)).put("yearCode", yearCode);
/* 119 */ qzh = getRedValueByKeyWord(qzh, keyword);
/* 120 */ ((LinkedHashMap<String, String>)resultList.get(i)).put("qzh", qzh);
/* 120 */ (resultList.get(i)).put("qzh", qzh);
/* 121 */ archiveTypeName = getRedValueByKeyWord(archiveTypeName, keyword);
/* 122 */ ((LinkedHashMap<String, String>)resultList.get(i)).put("archiveTypeName", archiveTypeName);
/* 122 */ (resultList.get(i)).put("archiveTypeName", archiveTypeName);
/* 123 */ rq = getRedValueByKeyWord(rq, keyword);
/* 124 */ ((LinkedHashMap<String, String>)resultList.get(i)).put("rq", rq);
/* 124 */ (resultList.get(i)).put("rq", rq);
/* 125 */ qzmc = getRedValueByKeyWord(qzmc, keyword);
/* 126 */ ((LinkedHashMap<String, String>)resultList.get(i)).put("qzmc", qzmc);
/* 126 */ (resultList.get(i)).put("qzmc", qzmc);
/* */ }
/* */ }
/* 129 */ resultMap.put("list", resultList);

@ -292,11 +292,11 @@
/* */
/* */ try {
/* 292 */ int index = 1;
/* 293 */ for (List<E> value : list) {
/* 293 */ for (List<List> value : list) {
/* */
/* 295 */ row = sheet.createRow(index);
/* 296 */ index++;
/* 297 */ List<E> data = value;
/* 297 */ List<List> data = value;
/* 298 */ for (int j = 0; j < data.size(); j++) {
/* 299 */ Cell cell = row.createCell(j);
/* */

@ -2,7 +2,8 @@
;
/* */
/* */ import com.archive.common.utils.StringUtils;
/* */ 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.web.domain.BaseEntity;
/* */ import com.archive.project.monitor.job.util.CronUtils;
/* */ import java.io.Serializable;
@ -32,7 +33,7 @@
/* */ implements Serializable
/* */ {
/* */ private static final long serialVersionUID = 1L;
/* */ @Excel(name = "任务序号", cellType = Excel.ColumnType.NUMERIC)
/* */ @Excel(name = "任务序号", cellType = ColumnType.NUMERIC)
/* */ private Long jobId;
/* */ @Excel(name = "任务名称")
/* */ private String jobName;
@ -149,7 +150,7 @@
/* 148 */ this.status = status;
/* */ }
/* */
/* */
/* */ @Override
/* */ public String toString() {
/* 153 */ return (new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE))
/* 154 */ .append("jobId", getJobId())

@ -3,7 +3,8 @@
;
/* */
/* */ import com.archive.common.constant.ScheduleConstants;
/* */ import com.archive.common.exception.job.TaskException;
/* */ import com.archive.common.constant.Status;
import com.archive.common.exception.job.TaskException;
/* */ import com.archive.common.utils.text.Convert;
/* */ import com.archive.framework.config.ArchiveConfig;
/* */ import com.archive.project.monitor.job.domain.Job;
@ -61,7 +62,7 @@
/* */
/* */
/* */
/* */
/* */ @Override
/* */ public List<Job> selectJobList(Job job) {
/* 64 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) {
/* 65 */ return this.jobMapper.selectJobList(job);
@ -81,7 +82,7 @@
/* */
/* */
/* */
/* */
/* */ @Override
/* */ public Job selectJobById(Long jobId) {
/* 84 */ return this.jobMapper.selectJobById(jobId);
/* */ }
@ -92,12 +93,12 @@
/* */
/* */
/* */
/* */
/* */ @Override
/* */ @Transactional
/* */ public int pauseJob(Job job) throws SchedulerException {
/* 96 */ Long jobId = job.getJobId();
/* 97 */ String jobGroup = job.getJobGroup();
/* 98 */ job.setStatus(ScheduleConstants.Status.PAUSE.getValue());
/* 98 */ job.setStatus(Status.PAUSE.getValue());
/* 99 */ int rows = 0;
/* 100 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) {
/* 101 */ rows = this.jobMapper.updateJob(job);
@ -118,12 +119,12 @@
/* */
/* */
/* */
/* */
/* */ @Override
/* */ @Transactional
/* */ public int resumeJob(Job job) throws SchedulerException {
/* 122 */ Long jobId = job.getJobId();
/* 123 */ String jobGroup = job.getJobGroup();
/* 124 */ job.setStatus(ScheduleConstants.Status.NORMAL.getValue());
/* 124 */ job.setStatus(Status.NORMAL.getValue());
/* 125 */ int rows = 0;
/* 126 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) {
/* 127 */ rows = this.jobMapper.updateJob(job);
@ -145,7 +146,7 @@
/* */
/* */
/* */
/* */
/* */ @Override
/* */ @Transactional
/* */ public int deleteJob(Job job) throws SchedulerException {
/* 149 */ Long jobId = job.getJobId();
@ -165,7 +166,7 @@
/* */
/* */
/* */
/* */
/* */ @Override
/* */ @Transactional
/* */ public void deleteJobByIds(String ids) throws SchedulerException {
/* 169 */ Long[] jobIds = Convert.toLongArray(ids);
@ -182,16 +183,16 @@
/* */
/* */
/* */
/* */
/* */ @Override
/* */ @Transactional
/* */ public int changeStatus(Job job) throws SchedulerException {
/* 186 */ int rows = 0;
/* 187 */ String status = job.getStatus();
/* 188 */ if (ScheduleConstants.Status.NORMAL.getValue().equals(status)) {
/* 188 */ if (Status.NORMAL.getValue().equals(status)) {
/* */
/* 190 */ rows = resumeJob(job);
/* */ }
/* 192 */ else if (ScheduleConstants.Status.PAUSE.getValue().equals(status)) {
/* 192 */ else if (Status.PAUSE.getValue().equals(status)) {
/* */
/* 194 */ rows = pauseJob(job);
/* */ }
@ -204,7 +205,7 @@
/* */
/* */
/* */
/* */
/* */ @Override
/* */ @Transactional
/* */ public void run(Job job) throws SchedulerException {
/* 208 */ Long jobId = job.getJobId();
@ -221,10 +222,10 @@
/* */
/* */
/* */
/* */
/* */ @Override
/* */ @Transactional
/* */ public int insertJob(Job job) throws SchedulerException, TaskException {
/* 225 */ job.setStatus(ScheduleConstants.Status.PAUSE.getValue());
/* 225 */ job.setStatus(Status.PAUSE.getValue());
/* 226 */ int rows = 0;
/* 227 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) {
/* 228 */ rows = this.jobMapper.insertJob(job);
@ -246,7 +247,7 @@
/* */
/* */
/* */
/* */
/* */ @Override
/* */ @Transactional
/* */ public int updateJob(Job job) throws SchedulerException, TaskException {
/* 250 */ Job properties = selectJobById(job.getJobId());
@ -292,7 +293,7 @@
/* */
/* */
/* */
/* */
/* */ @Override
/* */ public boolean checkCronExpressionIsValid(String cronExpression) {
/* 295 */ return CronUtils.isValid(cronExpression);
/* */ }

@ -1,12 +1,13 @@
/* */ package com.archive.project.monitor.job.task;
/* */
/* */ import com.archive.common.utils.DateUtils;
/* */ import com.archive.common.utils.file.FileUtils;
/* */
/* */ import com.archive.project.dasz.ccgl.service.ICcglService;
/* */ import com.archive.project.system.config.service.IConfigService;
/* */ import java.io.File;
/* */ import java.io.IOException;
/* */ import org.springframework.beans.factory.annotation.Autowired;
/* */ import org.apache.commons.io.FileUtils;
import org.springframework.beans.factory.annotation.Autowired;
/* */ import org.springframework.stereotype.Component;
/* */
/* */

@ -1,104 +1,103 @@
/* */ package com.archive.project.monitor.job.util;
package com.archive.project.monitor.job.util;
;
/* */
/* */ import com.archive.common.utils.ExceptionUtil;
/* */ import com.archive.common.utils.StringUtils;
/* */ import com.archive.common.utils.bean.BeanUtils;
/* */ import com.archive.common.utils.spring.SpringUtils;
/* */ import com.archive.project.monitor.job.domain.Job;
/* */ import com.archive.project.monitor.job.domain.JobLog;
/* */ import com.archive.project.monitor.job.service.IJobLogService;
/* */ import java.util.Date;
/* */ import org.quartz.Job;
/* */ import org.quartz.JobExecutionContext;
/* */ import org.quartz.JobExecutionException;
/* */ import org.slf4j.Logger;
/* */ import org.slf4j.LoggerFactory;
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public abstract class AbstractQuartzJob
/* */ implements Job
/* */ {
/* 25 */ private static final Logger log = LoggerFactory.getLogger(com.archive.project.monitor.job.util.AbstractQuartzJob.class);
/* */
/* */
/* */
/* */
/* 30 */ private static ThreadLocal<Date> threadLocal = new ThreadLocal<>();
/* */
/* */
/* */
/* */ public void execute(JobExecutionContext context) throws JobExecutionException {
/* 35 */ Job job = new Job();
/* 36 */ BeanUtils.copyBeanProp(job, context.getMergedJobDataMap().get("TASK_PROPERTIES"));
/* */
/* */ try {
/* 39 */ before(context, job);
/* 40 */ if (job != null)
/* */ {
/* 42 */ doExecute(context, job);
/* */ }
/* 44 */ after(context, job, null);
/* */ }
/* 46 */ catch (Exception e) {
/* */
/* 48 */ log.error("任务执行异常 - ", e);
/* 49 */ after(context, job, e);
/* */ }
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ protected void before(JobExecutionContext context, Job job) {
/* 61 */ threadLocal.set(new Date());
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ protected void after(JobExecutionContext context, Job job, Exception e) {
/* 72 */ Date startTime = threadLocal.get();
/* 73 */ threadLocal.remove();
/* */
/* 75 */ JobLog jobLog = new JobLog();
/* 76 */ jobLog.setJobName(job.getJobName());
/* 77 */ jobLog.setJobGroup(job.getJobGroup());
/* 78 */ jobLog.setInvokeTarget(job.getInvokeTarget());
/* 79 */ jobLog.setStartTime(startTime);
/* 80 */ jobLog.setEndTime(new Date());
/* 81 */ long runMs = jobLog.getEndTime().getTime() - jobLog.getStartTime().getTime();
/* 82 */ jobLog.setJobMessage(jobLog.getJobName() + " 总共耗时:" + runMs + "毫秒");
/* 83 */ if (e != null) {
/* */
/* 85 */ jobLog.setStatus("1");
/* 86 */ String errorMsg = StringUtils.substring(ExceptionUtil.getExceptionMessage(e), 0, 2000);
/* 87 */ jobLog.setExceptionInfo(errorMsg);
/* */ }
/* */ else {
/* */
/* 91 */ jobLog.setStatus("0");
/* */ }
/* */
/* */
/* 95 */ ((IJobLogService)SpringUtils.getBean(IJobLogService.class)).addJobLog(jobLog);
/* */ }
/* */
/* */ protected abstract void doExecute(JobExecutionContext paramJobExecutionContext, Job paramJob) throws Exception;
/* */ }
import com.archive.common.utils.ExceptionUtil;
import com.archive.common.utils.StringUtils;
import com.archive.common.utils.bean.BeanUtils;
import com.archive.common.utils.spring.SpringUtils;
import com.archive.project.monitor.job.domain.Job;
import com.archive.project.monitor.job.domain.JobLog;
import com.archive.project.monitor.job.service.IJobLogService;
import java.util.Date;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public abstract class AbstractQuartzJob
implements org.quartz.Job
{
private static final Logger log = LoggerFactory.getLogger(com.archive.project.monitor.job.util.AbstractQuartzJob.class);
private static ThreadLocal<Date> threadLocal = new ThreadLocal<>();
@Override
public void execute(JobExecutionContext context) throws JobExecutionException {
Job job = new Job();
BeanUtils.copyBeanProp(job, context.getMergedJobDataMap().get("TASK_PROPERTIES"));
try {
before(context, job);
if (job != null)
{
doExecute(context, job);
}
after(context, job, null);
}
catch (Exception e) {
log.error("任务执行异常 - ", e);
after(context, job, e);
}
}
protected void before(JobExecutionContext context, Job job) {
threadLocal.set(new Date());
}
protected void after(JobExecutionContext context, Job job, Exception e) {
Date startTime = threadLocal.get();
threadLocal.remove();
JobLog jobLog = new JobLog();
jobLog.setJobName(job.getJobName());
jobLog.setJobGroup(job.getJobGroup());
jobLog.setInvokeTarget(job.getInvokeTarget());
jobLog.setStartTime(startTime);
jobLog.setEndTime(new Date());
long runMs = jobLog.getEndTime().getTime() - jobLog.getStartTime().getTime();
jobLog.setJobMessage(jobLog.getJobName() + " 总共耗时:" + runMs + "毫秒");
if (e != null) {
jobLog.setStatus("1");
String errorMsg = StringUtils.substring(ExceptionUtil.getExceptionMessage(e), 0, 2000);
jobLog.setExceptionInfo(errorMsg);
}
else {
jobLog.setStatus("0");
}
((IJobLogService)SpringUtils.getBean(IJobLogService.class)).addJobLog(jobLog);
}
protected abstract void doExecute(JobExecutionContext paramJobExecutionContext, Job paramJob) throws Exception;
}
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\monitor\jo\\util\AbstractQuartzJob.class

@ -3,13 +3,15 @@
;
/* */
/* */ import com.archive.common.constant.ScheduleConstants;
/* */ import com.archive.common.exception.job.TaskException;
/* */ import com.archive.common.constant.Status;
import com.archive.common.exception.job.Code;
import com.archive.common.exception.job.TaskException;
/* */ import com.archive.project.monitor.job.domain.Job;
/* */ import com.archive.project.monitor.job.util.QuartzDisallowConcurrentExecution;
/* */ import com.archive.project.monitor.job.util.QuartzJobExecution;
/* */ import org.quartz.CronScheduleBuilder;
/* */ import org.quartz.CronTrigger;
/* */ import org.quartz.Job;
/* */
/* */ import org.quartz.JobBuilder;
/* */ import org.quartz.JobDetail;
/* */ import org.quartz.JobKey;
@ -31,7 +33,7 @@
/* */
/* */ public class ScheduleUtils
/* */ {
/* */ private static Class<? extends Job> getQuartzJobClass(Job job) {
/* */ private static Class<? extends org.quartz.Job> getQuartzJobClass(Job job) {
/* 33 */ boolean isConcurrent = "0".equals(job.getConcurrent());
/* 34 */ return isConcurrent ? (Class)QuartzJobExecution.class : (Class)QuartzDisallowConcurrentExecution.class;
/* */ }
@ -57,7 +59,7 @@
/* */
/* */
/* */ public static void createScheduleJob(Scheduler scheduler, Job job) throws SchedulerException, TaskException {
/* 58 */ Class<? extends Job> jobClass = getQuartzJobClass(job);
/* 58 */ Class<? extends org.quartz.Job> jobClass = getQuartzJobClass(job);
/* */
/* 60 */ Long jobId = job.getJobId();
/* 61 */ String jobGroup = job.getJobGroup();
@ -84,7 +86,7 @@
/* 82 */ scheduler.scheduleJob(jobDetail, (Trigger)trigger);
/* */
/* */
/* 85 */ if (job.getStatus().equals(ScheduleConstants.Status.PAUSE.getValue()))
/* 85 */ if (job.getStatus().equals(Status.PAUSE.getValue()))
/* */ {
/* 87 */ scheduler.pauseJob(getJobKey(jobId, jobGroup));
/* */ }
@ -107,7 +109,7 @@
/* */ case "3":
/* 106 */ return cb.withMisfireHandlingInstructionDoNothing();
/* */ }
/* 108 */ throw new TaskException("The task misfire policy '" + job.getMisfirePolicy() + "' cannot be used in cron schedule tasks", TaskException.Code.CONFIG_ERROR);
/* 108 */ throw new TaskException("The task misfire policy '" + job.getMisfirePolicy() + "' cannot be used in cron schedule tasks", Code.CONFIG_ERROR);
/* */ }
/* */ }

@ -2,7 +2,8 @@
;
/* */
/* */ 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.web.domain.BaseEntity;
/* */ import java.util.Date;
/* */ import org.apache.commons.lang3.builder.ToStringBuilder;
@ -36,7 +37,7 @@
/* */ extends BaseEntity
/* */ {
/* */ private static final long serialVersionUID = 1L;
/* */ @Excel(name = "序号", cellType = Excel.ColumnType.NUMERIC)
/* */ @Excel(name = "序号", cellType = ColumnType.NUMERIC)
/* */ private Long infoId;
/* */ @Excel(name = "用户账号")
/* */ private String loginName;
@ -144,7 +145,7 @@
/* 142 */ this.loginTime = loginTime;
/* */ }
/* */
/* */
/* */ @Override
/* */ public String toString() {
/* 147 */ return (new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE))
/* 148 */ .append("infoId", getInfoId())

@ -2,7 +2,8 @@
;
/* */
/* */ 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.web.domain.BaseEntity;
/* */ import java.util.Date;
/* */ import org.apache.commons.lang3.builder.ToStringBuilder;
@ -52,7 +53,7 @@
/* */ extends BaseEntity
/* */ {
/* */ private static final long serialVersionUID = 1L;
/* */ @Excel(name = "操作序号", cellType = Excel.ColumnType.NUMERIC)
/* */ @Excel(name = "操作序号", cellType = ColumnType.NUMERIC)
/* */ private Long operId;
/* */ @Excel(name = "操作模块")
/* */ private String title;
@ -255,7 +256,7 @@
/* 253 */ this.operTime = operTime;
/* */ }
/* */
/* */
/* */ @Override
/* */ public String toString() {
/* 258 */ return (new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE))
/* 259 */ .append("operId", getOperId())

@ -2,7 +2,8 @@
;
/* */
/* */ 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.web.domain.BaseEntity;
/* */ import javax.validation.constraints.NotBlank;
/* */ import javax.validation.constraints.Size;
@ -28,7 +29,7 @@
/* */ extends BaseEntity
/* */ {
/* */ private static final long serialVersionUID = 1L;
/* */ @Excel(name = "参数主键", cellType = Excel.ColumnType.NUMERIC)
/* */ @Excel(name = "参数主键", cellType = ColumnType.NUMERIC)
/* */ private Long configId;
/* */ @Excel(name = "参数名称")
/* */ private String configName;
@ -94,7 +95,7 @@
/* 92 */ this.configType = configType;
/* */ }
/* */
/* */
/* */ @Override
/* */ public String toString() {
/* 97 */ return (new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE))
/* 98 */ .append("configId", getConfigId())

@ -1,7 +1,8 @@
/* */ package com.archive.project.system.dict.domain
;
/* */
/* */ 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.web.domain.BaseEntity;
/* */ import javax.validation.constraints.NotBlank;
/* */ import javax.validation.constraints.Size;
@ -36,9 +37,9 @@
/* */ extends BaseEntity
/* */ {
/* */ private static final long serialVersionUID = 1L;
/* */ @Excel(name = "字典编码", cellType = Excel.ColumnType.NUMERIC)
/* */ @Excel(name = "字典编码", cellType = ColumnType.NUMERIC)
/* */ private Long dictCode;
/* */ @Excel(name = "字典排序", cellType = Excel.ColumnType.NUMERIC)
/* */ @Excel(name = "字典排序", cellType = ColumnType.NUMERIC)
/* */ private Long dictSort;
/* */ @Excel(name = "字典标签")
/* */ private String dictLabel;
@ -155,7 +156,7 @@
/* 154 */ this.status = status;
/* */ }
/* */
/* */
/* */ @Override
/* */ public String toString() {
/* 159 */ return (new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE))
/* 160 */ .append("dictCode", getDictCode())

@ -2,7 +2,8 @@
;
/* */
/* */ 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.web.domain.BaseEntity;
/* */ import javax.validation.constraints.NotBlank;
/* */ import javax.validation.constraints.Size;
@ -28,7 +29,7 @@
/* */ extends BaseEntity
/* */ {
/* */ private static final long serialVersionUID = 1L;
/* */ @Excel(name = "字典主键", cellType = Excel.ColumnType.NUMERIC)
/* */ @Excel(name = "字典主键", cellType = ColumnType.NUMERIC)
/* */ private Long dictId;
/* */ @Excel(name = "字典名称")
/* */ private String dictName;

@ -2,7 +2,8 @@
;
/* */
/* */ 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.web.domain.BaseEntity;
/* */ import javax.validation.constraints.NotBlank;
/* */ import javax.validation.constraints.Size;
@ -30,7 +31,7 @@
/* */ extends BaseEntity
/* */ {
/* */ private static final long serialVersionUID = 1L;
/* */ @Excel(name = "岗位序号", cellType = Excel.ColumnType.NUMERIC)
/* */ @Excel(name = "岗位序号", cellType = ColumnType.NUMERIC)
/* */ private Long postId;
/* */ @Excel(name = "岗位编码")
/* */ private String postCode;
@ -106,7 +107,7 @@
/* 104 */ this.flag = flag;
/* */ }
/* */
/* */
/* */ @Override
/* */ public String toString() {
/* 109 */ return (new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE))
/* 110 */ .append("postId", getPostId())

@ -2,7 +2,8 @@
;
/* */
/* */ 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.web.domain.BaseEntity;
/* */ import javax.validation.constraints.NotBlank;
/* */ import javax.validation.constraints.Size;
@ -41,7 +42,7 @@
/* */ extends BaseEntity
/* */ {
/* */ private static final long serialVersionUID = 1L;
/* */ @Excel(name = "角色序号", cellType = Excel.ColumnType.NUMERIC)
/* */ @Excel(name = "角色序号", cellType = ColumnType.NUMERIC)
/* */ private Long roleId;
/* */ @Excel(name = "角色名称")
/* */ private String roleName;

@ -2,9 +2,11 @@
;
/* */
/* */ 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.web.domain.BaseEntity;
/* */ import com.archive.framework.aspectj.lang.annotation.Type;
import com.archive.framework.web.domain.BaseEntity;
/* */ import com.archive.project.system.dept.domain.Dept;
/* */ import com.archive.project.system.role.domain.Role;
/* */ import com.fasterxml.jackson.annotation.JsonIgnore;
@ -75,9 +77,9 @@
/* */ extends BaseEntity
/* */ {
/* */ private static final long serialVersionUID = 1L;
/* */ @Excel(name = "用户序号", cellType = Excel.ColumnType.NUMERIC, prompt = "用户编号")
/* */ @Excel(name = "用户序号", cellType = ColumnType.NUMERIC, prompt = "用户编号")
/* */ private Long userId;
/* */ @Excel(name = "部门编号", type = Excel.Type.IMPORT)
/* */ @Excel(name = "部门编号", type = Type.IMPORT)
/* */ private Long deptId;
/* */ private Long parentId;
/* */ private Long roleId;
@ -98,12 +100,12 @@
/* */ @Excel(name = "帐号状态", readConverterExp = "0=正常,1=停用")
/* */ private String status;
/* */ private String delFlag;
/* */ @Excel(name = "最后登录IP", type = Excel.Type.EXPORT)
/* */ @Excel(name = "最后登录IP", type = Type.EXPORT)
/* */ private String loginIp;
/* */ @Excel(name = "最后登录时间", width = 30.0D, dateFormat = "yyyy-MM-dd HH:mm:ss", type = Excel.Type.EXPORT)
/* */ @Excel(name = "最后登录时间", width = 30.0D, dateFormat = "yyyy-MM-dd HH:mm:ss", type = Type.EXPORT)
/* */ private Date loginDate;
/* */ private Date pwdUpdateDate;
/* */ @Excels({@Excel(name = "部门名称", targetAttr = "deptName", type = Excel.Type.EXPORT), @Excel(name = "部门负责人", targetAttr = "leader", type = Excel.Type.EXPORT)})
/* */ @Excels({@Excel(name = "部门名称", targetAttr = "deptName", type = Type.EXPORT), @Excel(name = "部门负责人", targetAttr = "leader", type = Type.EXPORT)})
/* */ private Dept dept;
/* */ private List<Role> roles;
/* */ private Long[] roleIds;
@ -367,7 +369,7 @@
/* 365 */ this.postIds = postIds;
/* */ }
/* */
/* */
/* */ @Override
/* */ public String toString() {
/* 370 */ return (new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE))
/* 371 */ .append("userId", getUserId())

@ -6,7 +6,7 @@
/* */ import com.alibaba.fastjson.JSONObject;
/* */ import com.archive.common.exception.BusinessException;
/* */ import com.archive.common.utils.StringUtils;
/* */ import com.archive.common.utils.file.FileUtils;
/* */
/* */ import com.archive.common.utils.security.ShiroUtils;
/* */ import com.archive.common.utils.text.Convert;
/* */ import com.archive.project.tool.gen.domain.GenTable;
@ -27,7 +27,8 @@
/* */ import java.util.stream.Collectors;
/* */ import java.util.zip.ZipEntry;
/* */ import java.util.zip.ZipOutputStream;
/* */ import org.apache.commons.io.IOUtils;
/* */ import org.apache.commons.io.FileUtils;
import org.apache.commons.io.IOUtils;
/* */ import org.apache.velocity.Template;
/* */ import org.apache.velocity.VelocityContext;
/* */ import org.apache.velocity.app.Velocity;
@ -62,7 +63,7 @@
/* */
/* */
/* */
/* */
/* */ @Override
/* */ public GenTable selectGenTableById(Long id) {
/* 65 */ GenTable genTable = this.genTableMapper.selectGenTableById(id);
/* 66 */ setTableFromOptions(genTable);
@ -76,7 +77,7 @@
/* */
/* */
/* */
/* */
/* */ @Override
/* */ public List<GenTable> selectGenTableList(GenTable genTable) {
/* 79 */ return this.genTableMapper.selectGenTableList(genTable);
/* */ }
@ -88,7 +89,7 @@
/* */
/* */
/* */
/* */
/* */ @Override
/* */ public List<GenTable> selectDbTableList(GenTable genTable) {
/* 91 */ return this.genTableMapper.selectDbTableList(genTable);
/* */ }
@ -100,7 +101,7 @@
/* */
/* */
/* */
/* */
/* */ @Override
/* */ public List<GenTable> selectDbTableListByNames(String[] tableNames) {
/* 103 */ return this.genTableMapper.selectDbTableListByNames(tableNames);
/* */ }
@ -111,7 +112,7 @@
/* */
/* */
/* */
/* */
/* */ @Override
/* */ public List<GenTable> selectGenTableAll() {
/* 114 */ return this.genTableMapper.selectGenTableAll();
/* */ }
@ -123,7 +124,7 @@
/* */
/* */
/* */
/* */
/* */ @Override
/* */ @Transactional
/* */ public void updateGenTable(GenTable genTable) {
/* 127 */ String options = JSON.toJSONString(genTable.getParams());
@ -145,7 +146,7 @@
/* */
/* */
/* */
/* */
/* */ @Override
/* */ @Transactional
/* */ public void deleteGenTableByIds(String ids) {
/* 149 */ this.genTableMapper.deleteGenTableByIds(Convert.toLongArray(ids));
@ -158,7 +159,7 @@
/* */
/* */
/* */
/* */
/* */ @Override
/* */ @Transactional
/* */ public void importGenTable(List<GenTable> tableList) {
/* 162 */ String operName = ShiroUtils.getLoginName();
@ -194,7 +195,7 @@
/* */
/* */
/* */
/* */
/* */ @Override
/* */ public Map<String, String> previewCode(Long tableId) {
/* 197 */ Map<String, String> dataMap = new LinkedHashMap<>();
/* */
@ -227,7 +228,7 @@
/* */
/* */
/* */
/* */
/* */ @Override
/* */ public byte[] downloadCode(String tableName) {
/* 230 */ ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
/* 231 */ ZipOutputStream zip = new ZipOutputStream(outputStream);
@ -243,7 +244,7 @@
/* */
/* */
/* */
/* */
/* */ @Override
/* */ public void generatorCode(String tableName) {
/* 246 */ GenTable table = this.genTableMapper.selectGenTableByName(tableName);
/* */
@ -284,7 +285,7 @@
/* */
/* */
/* */
/* */
/* */ @Override
/* */ @Transactional
/* */ public void synchDb(String tableName) {
/* 288 */ GenTable table = this.genTableMapper.selectGenTableByName(tableName);
@ -320,7 +321,7 @@
/* */
/* */
/* */
/* */
/* */ @Override
/* */ public byte[] downloadCode(String[] tableNames) {
/* 323 */ ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
/* 324 */ ZipOutputStream zip = new ZipOutputStream(outputStream);
@ -378,7 +379,7 @@
/* */
/* */
/* */
/* */
/* */ @Override
/* */ public void validateEdit(GenTable genTable) {
/* 381 */ if ("tree".equals(genTable.getTplCategory())) {
/* */

Loading…
Cancel
Save