diff --git a/src/main/java/com/archive/common/utils/DateUtils.java b/src/main/java/com/archive/common/utils/DateUtils.java index 15be862..ce11b3e 100644 --- a/src/main/java/com/archive/common/utils/DateUtils.java +++ b/src/main/java/com/archive/common/utils/DateUtils.java @@ -1,168 +1,168 @@ -/* */ package com.archive.common.utils + package com.archive.common.utils ; -/* */ -/* */ import java.lang.management.ManagementFactory; -/* */ import java.text.ParseException; -/* */ import java.text.SimpleDateFormat; -/* */ import java.util.Date; -/* */ import org.apache.commons.lang3.time.DateFormatUtils; -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ public class DateUtils -/* */ extends org.apache.commons.lang3.time.DateUtils -/* */ { -/* 16 */ public static String YYYY = "yyyy"; -/* */ -/* 18 */ public static String YYYY_MM = "yyyy-MM"; -/* */ -/* 20 */ public static String YYYY_MM_DD = "yyyy-MM-dd"; -/* */ -/* 22 */ public static String YYYYMMDDHHMMSS = "yyyyMMddHHmmss"; -/* */ -/* 24 */ public static String YYYY_MM_DD_HH_MM_SS = "yyyy-MM-dd HH:mm:ss"; -/* */ -/* 26 */ private static String[] parsePatterns = new String[] { "yyyy-MM-dd", "yyyy-MM-dd HH:mm:ss", "yyyy-MM-dd HH:mm", "yyyy-MM", "yyyy/MM/dd", "yyyy/MM/dd HH:mm:ss", "yyyy/MM/dd HH:mm", "yyyy/MM", "yyyy.MM.dd", "yyyy.MM.dd HH:mm:ss", "yyyy.MM.dd HH:mm", "yyyy.MM" }; -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ public static Date getNowDate() { -/* 38 */ return new Date(); -/* */ } -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ public static String getDate() { -/* 48 */ return dateTimeNow(YYYY_MM_DD); -/* */ } -/* */ -/* */ -/* */ public static final String getTime() { -/* 53 */ return dateTimeNow(YYYY_MM_DD_HH_MM_SS); -/* */ } -/* */ -/* */ -/* */ public static final String dateTimeNow() { -/* 58 */ return dateTimeNow(YYYYMMDDHHMMSS); -/* */ } -/* */ -/* */ -/* */ public static final String dateTimeNow(String format) { -/* 63 */ return parseDateToStr(format, new Date()); -/* */ } -/* */ -/* */ -/* */ public static final String dateTime(Date date) { -/* 68 */ return parseDateToStr(YYYY_MM_DD, date); -/* */ } -/* */ -/* */ -/* */ public static final String parseDateToStr(String format, Date date) { -/* 73 */ return (new SimpleDateFormat(format)).format(date); -/* */ } -/* */ -/* */ -/* */ -/* */ public static final Date dateTime(String format, String ts) { -/* */ try { -/* 80 */ return (new SimpleDateFormat(format)).parse(ts); -/* */ } -/* 82 */ catch (ParseException e) { -/* */ -/* 84 */ throw new RuntimeException(e); -/* */ } -/* */ } -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ public static final String datePath() { -/* 93 */ Date now = new Date(); -/* 94 */ return DateFormatUtils.format(now, "yyyy/MM/dd"); -/* */ } -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ public static final String dateTime() { -/* 102 */ Date now = new Date(); -/* 103 */ return DateFormatUtils.format(now, "yyyyMMdd"); -/* */ } -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ public static Date parseDate(Object str) { -/* 111 */ if (str == null) -/* */ { -/* 113 */ return null; -/* */ } -/* */ -/* */ try { -/* 117 */ return parseDate(str.toString(), parsePatterns); -/* */ } -/* 119 */ catch (ParseException e) { -/* */ -/* 121 */ return null; -/* */ } -/* */ } -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ public static Date getServerStartDate() { -/* 130 */ long time = ManagementFactory.getRuntimeMXBean().getStartTime(); -/* 131 */ return new Date(time); -/* */ } -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ public static int differentDaysByMillisecond(Date date1, Date date2) { -/* 139 */ return Math.abs((int)((date2.getTime() - date1.getTime()) / 86400000L)); -/* */ } -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ public static String getDatePoor(Date endDate, Date nowDate) { -/* 147 */ long nd = 86400000L; -/* 148 */ long nh = 3600000L; -/* 149 */ long nm = 60000L; -/* */ -/* */ -/* 152 */ long diff = endDate.getTime() - nowDate.getTime(); -/* */ -/* 154 */ long day = diff / nd; -/* */ -/* 156 */ long hour = diff % nd / nh; -/* */ -/* 158 */ long min = diff % nd % nh / nm; -/* */ -/* */ -/* 161 */ return day + "天" + hour + "小时" + min + "分钟"; -/* */ } -/* */ } + + import java.lang.management.ManagementFactory; + import java.text.ParseException; + import java.text.SimpleDateFormat; + import java.util.Date; + import org.apache.commons.lang3.time.DateFormatUtils; + + + + + + public class DateUtils + extends org.apache.commons.lang3.time.DateUtils + { + public static String YYYY = "yyyy"; + + public static String YYYY_MM = "yyyy-MM"; + + public static String YYYY_MM_DD = "yyyy-MM-dd"; + + public static String YYYYMMDDHHMMSS = "yyyyMMddHHmmss"; + + public static String YYYY_MM_DD_HH_MM_SS = "yyyy-MM-dd HH:mm:ss"; + + private static String[] parsePatterns = new String[] { "yyyy-MM-dd", "yyyy-MM-dd HH:mm:ss", "yyyy-MM-dd HH:mm", "yyyy-MM", "yyyy/MM/dd", "yyyy/MM/dd HH:mm:ss", "yyyy/MM/dd HH:mm", "yyyy/MM", "yyyy.MM.dd", "yyyy.MM.dd HH:mm:ss", "yyyy.MM.dd HH:mm", "yyyy.MM" }; + + + + + + + + + + + public static Date getNowDate() { + return new Date(); + } + + + + + + + + public static String getDate() { + return dateTimeNow(YYYY_MM_DD); + } + + + public static final String getTime() { + return dateTimeNow(YYYY_MM_DD_HH_MM_SS); + } + + + public static final String dateTimeNow() { + return dateTimeNow(YYYYMMDDHHMMSS); + } + + + public static final String dateTimeNow(String format) { + return parseDateToStr(format, new Date()); + } + + + public static final String dateTime(Date date) { + return parseDateToStr(YYYY_MM_DD, date); + } + + + public static final String parseDateToStr(String format, Date date) { + return (new SimpleDateFormat(format)).format(date); + } + + + + public static final Date dateTime(String format, String ts) { + try { + return (new SimpleDateFormat(format)).parse(ts); + } + catch (ParseException e) { + + throw new RuntimeException(e); + } + } + + + + + + public static final String datePath() { + Date now = new Date(); + return DateFormatUtils.format(now, "yyyy/MM/dd"); + } + + + + + + public static final String dateTime() { + Date now = new Date(); + return DateFormatUtils.format(now, "yyyyMMdd"); + } + + + + + + public static Date parseDate(Object str) { + if (str == null) + { + return null; + } + + try { + return parseDate(str.toString(), parsePatterns); + } + catch (ParseException e) { + + return null; + } + } + + + + + + public static Date getServerStartDate() { + long time = ManagementFactory.getRuntimeMXBean().getStartTime(); + return new Date(time); + } + + + + + + public static int differentDaysByMillisecond(Date date1, Date date2) { + return Math.abs((int)((date2.getTime() - date1.getTime()) / 86400000L)); + } + + + + + + public static String getDatePoor(Date endDate, Date nowDate) { + long nd = 86400000L; + long nh = 3600000L; + long nm = 60000L; + + + long diff = endDate.getTime() - nowDate.getTime(); + + long day = diff / nd; + + long hour = diff % nd / nh; + + long min = diff % nd % nh / nm; + + + return day + "天" + hour + "小时" + min + "分钟"; + } + } /* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\commo\\utils\DateUtils.class diff --git a/src/main/java/com/archive/framework/aspectj/DataScopeAspect.java b/src/main/java/com/archive/framework/aspectj/DataScopeAspect.java index 78d0aa5..9520a4e 100644 --- a/src/main/java/com/archive/framework/aspectj/DataScopeAspect.java +++ b/src/main/java/com/archive/framework/aspectj/DataScopeAspect.java @@ -1,170 +1,170 @@ -/* */ package com.archive.framework.aspectj + package com.archive.framework.aspectj ; -/* */ -/* */ import com.archive.common.utils.StringUtils; -/* */ import com.archive.common.utils.security.ShiroUtils; -/* */ import com.archive.framework.aspectj.lang.annotation.DataScope; -/* */ import com.archive.framework.web.domain.BaseEntity; -/* */ import com.archive.project.system.role.domain.Role; -/* */ import com.archive.project.system.user.domain.User; -/* */ import java.lang.reflect.Method; -/* */ import org.aspectj.lang.JoinPoint; -/* */ import org.aspectj.lang.Signature; -/* */ import org.aspectj.lang.annotation.Aspect; -/* */ import org.aspectj.lang.annotation.Before; -/* */ import org.aspectj.lang.annotation.Pointcut; -/* */ import org.aspectj.lang.reflect.MethodSignature; -/* */ import org.springframework.stereotype.Component; -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ @Aspect -/* */ @Component -/* */ public class DataScopeAspect -/* */ { -/* */ public static final String DATA_SCOPE_ALL = "1"; -/* */ public static final String DATA_SCOPE_CUSTOM = "2"; -/* */ public static final String DATA_SCOPE_DEPT = "3"; -/* */ public static final String DATA_SCOPE_DEPT_AND_CHILD = "4"; -/* */ public static final String DATA_SCOPE_SELF = "5"; -/* */ public static final String DATA_SCOPE = "dataScope"; -/* */ -/* */ @Pointcut("@annotation(com.archive.framework.aspectj.lang.annotation.DataScope)") -/* */ public void dataScopePointCut() {} -/* */ -/* */ @Before("dataScopePointCut()") -/* */ public void doBefore(JoinPoint point) throws Throwable { -/* 66 */ handleDataScope(point); -/* */ } -/* */ -/* */ -/* */ -/* */ protected void handleDataScope(JoinPoint joinPoint) { -/* 72 */ DataScope controllerDataScope = getAnnotationLog(joinPoint); -/* 73 */ if (controllerDataScope == null) { -/* */ return; -/* */ } -/* */ -/* */ -/* 78 */ User currentUser = ShiroUtils.getSysUser(); -/* 79 */ if (currentUser != null) -/* */ { -/* */ -/* 82 */ if (!currentUser.isAdmin()) -/* */ { -/* 84 */ dataScopeFilter(joinPoint, currentUser, controllerDataScope.deptAlias(), controllerDataScope -/* 85 */ .userAlias()); -/* */ } -/* */ } -/* */ } -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ public static void dataScopeFilter(JoinPoint joinPoint, User user, String deptAlias, String userAlias) { -/* 100 */ StringBuilder sqlString = new StringBuilder(); -/* */ -/* 102 */ for (Role role : user.getRoles()) { -/* */ -/* 104 */ String dataScope = role.getDataScope(); -/* 105 */ if ("1".equals(dataScope)) { -/* */ -/* 107 */ sqlString = new StringBuilder(); -/* */ break; -/* */ } -/* 110 */ if ("2".equals(dataScope)) { -/* */ -/* 112 */ sqlString.append(StringUtils.format(" OR {}.dept_id IN ( SELECT dept_id FROM sys_role_dept WHERE role_id = {} ) ", new Object[] { deptAlias, role -/* */ -/* 114 */ .getRoleId() })); continue; -/* */ } -/* 116 */ if ("3".equals(dataScope)) { -/* */ -/* 118 */ sqlString.append(StringUtils.format(" OR {}.dept_id = {} ", new Object[] { deptAlias, user.getDeptId() })); continue; -/* */ } -/* 120 */ if ("4".equals(dataScope)) { -/* */ -/* 122 */ sqlString.append(StringUtils.format(" OR {}.dept_id IN ( SELECT dept_id FROM sys_dept WHERE dept_id = {} or find_in_set( {} , ancestors ) )", new Object[] { deptAlias, user -/* */ -/* 124 */ .getDeptId(), user.getDeptId() })); continue; -/* */ } -/* 126 */ if ("5".equals(dataScope)) { -/* */ -/* 128 */ if (StringUtils.isNotBlank(userAlias)) { -/* */ -/* 130 */ sqlString.append(StringUtils.format(" OR {}.user_id = {} ", new Object[] { userAlias, user.getUserId() })); -/* */ -/* */ continue; -/* */ } -/* */ -/* 135 */ sqlString.append(" OR 1=0 "); -/* */ } -/* */ } -/* */ -/* */ -/* 140 */ if (StringUtils.isNotBlank(sqlString.toString())) { -/* */ -/* 142 */ Object params = joinPoint.getArgs()[0]; -/* 143 */ if (StringUtils.isNotNull(params) && params instanceof BaseEntity) { -/* */ -/* 145 */ BaseEntity baseEntity = (BaseEntity)params; -/* 146 */ baseEntity.getParams().put("dataScope", " AND (" + sqlString.substring(4) + ")"); -/* */ } -/* */ } -/* */ } -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ private DataScope getAnnotationLog(JoinPoint joinPoint) { -/* 156 */ Signature signature = joinPoint.getSignature(); -/* 157 */ MethodSignature methodSignature = (MethodSignature)signature; -/* 158 */ Method method = methodSignature.getMethod(); -/* */ -/* 160 */ if (method != null) -/* */ { -/* 162 */ return method.getAnnotation(DataScope.class); -/* */ } -/* 164 */ return null; -/* */ } -/* */ } + + import com.archive.common.utils.StringUtils; + import com.archive.common.utils.security.ShiroUtils; + import com.archive.framework.aspectj.lang.annotation.DataScope; + import com.archive.framework.web.domain.BaseEntity; + import com.archive.project.system.role.domain.Role; + import com.archive.project.system.user.domain.User; + import java.lang.reflect.Method; + import org.aspectj.lang.JoinPoint; + import org.aspectj.lang.Signature; + import org.aspectj.lang.annotation.Aspect; + import org.aspectj.lang.annotation.Before; + import org.aspectj.lang.annotation.Pointcut; + import org.aspectj.lang.reflect.MethodSignature; + import org.springframework.stereotype.Component; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @Aspect + @Component + public class DataScopeAspect + { + public static final String DATA_SCOPE_ALL = "1"; + public static final String DATA_SCOPE_CUSTOM = "2"; + public static final String DATA_SCOPE_DEPT = "3"; + public static final String DATA_SCOPE_DEPT_AND_CHILD = "4"; + public static final String DATA_SCOPE_SELF = "5"; + public static final String DATA_SCOPE = "dataScope"; + + @Pointcut("@annotation(com.archive.framework.aspectj.lang.annotation.DataScope)") + public void dataScopePointCut() {} + + @Before("dataScopePointCut()") + public void doBefore(JoinPoint point) throws Throwable { + handleDataScope(point); + } + + + + protected void handleDataScope(JoinPoint joinPoint) { + DataScope controllerDataScope = getAnnotationLog(joinPoint); + if (controllerDataScope == null) { + return; + } + + + User currentUser = ShiroUtils.getSysUser(); + if (currentUser != null) + { + + if (!currentUser.isAdmin()) + { + dataScopeFilter(joinPoint, currentUser, controllerDataScope.deptAlias(), controllerDataScope + .userAlias()); + } + } + } + + + + + + + + + + + public static void dataScopeFilter(JoinPoint joinPoint, User user, String deptAlias, String userAlias) { + StringBuilder sqlString = new StringBuilder(); + + for (Role role : user.getRoles()) { + + String dataScope = role.getDataScope(); + if ("1".equals(dataScope)) { + + sqlString = new StringBuilder(); + break; + } + if ("2".equals(dataScope)) { + + sqlString.append(StringUtils.format(" OR {}.dept_id IN ( SELECT dept_id FROM sys_role_dept WHERE role_id = {} ) ", new Object[] { deptAlias, role + + .getRoleId() })); continue; + } + if ("3".equals(dataScope)) { + + sqlString.append(StringUtils.format(" OR {}.dept_id = {} ", new Object[] { deptAlias, user.getDeptId() })); continue; + } + if ("4".equals(dataScope)) { + + sqlString.append(StringUtils.format(" OR {}.dept_id IN ( SELECT dept_id FROM sys_dept WHERE dept_id = {} or find_in_set( {} , ancestors ) )", new Object[] { deptAlias, user + + .getDeptId(), user.getDeptId() })); continue; + } + if ("5".equals(dataScope)) { + + if (StringUtils.isNotBlank(userAlias)) { + + sqlString.append(StringUtils.format(" OR {}.user_id = {} ", new Object[] { userAlias, user.getUserId() })); + + continue; + } + + sqlString.append(" OR 1=0 "); + } + } + + + if (StringUtils.isNotBlank(sqlString.toString())) { + + Object params = joinPoint.getArgs()[0]; + if (StringUtils.isNotNull(params) && params instanceof BaseEntity) { + + BaseEntity baseEntity = (BaseEntity)params; + baseEntity.getParams().put("dataScope", " AND (" + sqlString.substring(4) + ")"); + } + } + } + + + + + + private DataScope getAnnotationLog(JoinPoint joinPoint) { + Signature signature = joinPoint.getSignature(); + MethodSignature methodSignature = (MethodSignature)signature; + Method method = methodSignature.getMethod(); + + if (method != null) + { + return method.getAnnotation(DataScope.class); + } + return null; + } + } /* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\aspectj\DataScopeAspect.class diff --git a/src/main/java/com/archive/framework/aspectj/DataSourceAspect.java b/src/main/java/com/archive/framework/aspectj/DataSourceAspect.java index a342122..daf0f17 100644 --- a/src/main/java/com/archive/framework/aspectj/DataSourceAspect.java +++ b/src/main/java/com/archive/framework/aspectj/DataSourceAspect.java @@ -1,77 +1,77 @@ -/* */ package com.archive.framework.aspectj + package com.archive.framework.aspectj ; -/* */ -/* */ import com.archive.common.utils.StringUtils; -/* */ import com.archive.framework.aspectj.lang.annotation.DataSource; -/* */ import com.archive.framework.datasource.DynamicDataSourceContextHolder; -/* */ import java.util.Objects; -/* */ import org.aspectj.lang.ProceedingJoinPoint; -/* */ import org.aspectj.lang.annotation.Around; -/* */ import org.aspectj.lang.annotation.Aspect; -/* */ import org.aspectj.lang.annotation.Pointcut; -/* */ import org.aspectj.lang.reflect.MethodSignature; -/* */ import org.slf4j.Logger; -/* */ import org.slf4j.LoggerFactory; -/* */ import org.springframework.core.annotation.AnnotationUtils; -/* */ import org.springframework.core.annotation.Order; -/* */ import org.springframework.stereotype.Component; -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ @Aspect -/* */ @Order(1) -/* */ @Component -/* */ public class DataSourceAspect -/* */ { -/* 28 */ protected Logger logger = LoggerFactory.getLogger(getClass()); -/* */ -/* */ -/* */ -/* */ -/* */ @Pointcut("@annotation(com.archive.framework.aspectj.lang.annotation.DataSource)|| @within(com.archive.framework.aspectj.lang.annotation.DataSource)") -/* */ public void dsPointCut() {} -/* */ -/* */ -/* */ -/* */ @Around("dsPointCut()") -/* */ public Object around(ProceedingJoinPoint point) throws Throwable { -/* 40 */ DataSource dataSource = getDataSource(point); -/* */ -/* 42 */ if (StringUtils.isNotNull(dataSource)) -/* */ { -/* 44 */ DynamicDataSourceContextHolder.setDataSourceType(dataSource.value().name()); -/* */ } -/* */ -/* */ -/* */ try { -/* 49 */ return point.proceed(); -/* */ -/* */ } -/* */ finally { -/* */ -/* 54 */ DynamicDataSourceContextHolder.clearDataSourceType(); -/* */ } -/* */ } -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ public DataSource getDataSource(ProceedingJoinPoint point) { -/* 63 */ MethodSignature signature = (MethodSignature)point.getSignature(); -/* 64 */ DataSource dataSource = (DataSource)AnnotationUtils.findAnnotation(signature.getMethod(), DataSource.class); -/* 65 */ if (Objects.nonNull(dataSource)) -/* */ { -/* 67 */ return dataSource; -/* */ } -/* */ -/* 70 */ return (DataSource)AnnotationUtils.findAnnotation(signature.getDeclaringType(), DataSource.class); -/* */ } -/* */ } + + import com.archive.common.utils.StringUtils; + import com.archive.framework.aspectj.lang.annotation.DataSource; + import com.archive.framework.datasource.DynamicDataSourceContextHolder; + import java.util.Objects; + import org.aspectj.lang.ProceedingJoinPoint; + import org.aspectj.lang.annotation.Around; + import org.aspectj.lang.annotation.Aspect; + import org.aspectj.lang.annotation.Pointcut; + import org.aspectj.lang.reflect.MethodSignature; + import org.slf4j.Logger; + import org.slf4j.LoggerFactory; + import org.springframework.core.annotation.AnnotationUtils; + import org.springframework.core.annotation.Order; + import org.springframework.stereotype.Component; + + + + + + + @Aspect + @Order(1) + @Component + public class DataSourceAspect + { + protected Logger logger = LoggerFactory.getLogger(getClass()); + + + + + @Pointcut("@annotation(com.archive.framework.aspectj.lang.annotation.DataSource)|| @within(com.archive.framework.aspectj.lang.annotation.DataSource)") + public void dsPointCut() {} + + + + @Around("dsPointCut()") + public Object around(ProceedingJoinPoint point) throws Throwable { + DataSource dataSource = getDataSource(point); + + if (StringUtils.isNotNull(dataSource)) + { + DynamicDataSourceContextHolder.setDataSourceType(dataSource.value().name()); + } + + + try { + return point.proceed(); + + } + finally { + + DynamicDataSourceContextHolder.clearDataSourceType(); + } + } + + + + + + public DataSource getDataSource(ProceedingJoinPoint point) { + MethodSignature signature = (MethodSignature)point.getSignature(); + DataSource dataSource = (DataSource)AnnotationUtils.findAnnotation(signature.getMethod(), DataSource.class); + if (Objects.nonNull(dataSource)) + { + return dataSource; + } + + return (DataSource)AnnotationUtils.findAnnotation(signature.getDeclaringType(), DataSource.class); + } + } /* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\aspectj\DataSourceAspect.class diff --git a/src/main/java/com/archive/framework/aspectj/lang/enums/DataSourceType.java b/src/main/java/com/archive/framework/aspectj/lang/enums/DataSourceType.java index 4bca75d..1f3dba9 100644 --- a/src/main/java/com/archive/framework/aspectj/lang/enums/DataSourceType.java +++ b/src/main/java/com/archive/framework/aspectj/lang/enums/DataSourceType.java @@ -1,22 +1,22 @@ -/* */ package com.archive.framework.aspectj.lang.enums; -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ public enum DataSourceType -/* */ { -/* 13 */ MASTER, -/* */ -/* */ -/* */ -/* */ -/* 18 */ SLAVE; -/* */ } + package com.archive.framework.aspectj.lang.enums; + + + + + + + + + + public enum DataSourceType + { + MASTER, + + + + + SLAVE; + } /* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\aspectj\lang\enums\DataSourceType.class diff --git a/src/main/java/com/archive/framework/web/domain/CxSelect.java b/src/main/java/com/archive/framework/web/domain/CxSelect.java index f247e4a..0c6f1b0 100644 --- a/src/main/java/com/archive/framework/web/domain/CxSelect.java +++ b/src/main/java/com/archive/framework/web/domain/CxSelect.java @@ -1,74 +1,74 @@ -/* */ package com.archive.framework.web.domain + package com.archive.framework.web.domain ; -/* */ -/* */ import java.io.Serializable; -/* */ import java.util.List; -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ public class CxSelect -/* */ implements Serializable -/* */ { -/* */ private static final long serialVersionUID = 1L; -/* */ private String v; -/* */ private String n; -/* */ private List s; -/* */ -/* */ public CxSelect() {} -/* */ -/* */ public CxSelect(String v, String n) { -/* 36 */ this.v = v; -/* 37 */ this.n = n; -/* */ } -/* */ -/* */ -/* */ public List getS() { -/* 42 */ return this.s; -/* */ } -/* */ -/* */ -/* */ public void setN(String n) { -/* 47 */ this.n = n; -/* */ } -/* */ -/* */ -/* */ public String getN() { -/* 52 */ return this.n; -/* */ } -/* */ -/* */ -/* */ public void setS(List s) { -/* 57 */ this.s = s; -/* */ } -/* */ -/* */ -/* */ public String getV() { -/* 62 */ return this.v; -/* */ } -/* */ -/* */ -/* */ public void setV(String v) { -/* 67 */ this.v = v; -/* */ } -/* */ } + + import java.io.Serializable; + import java.util.List; + + + + + + + + + + + + + + + + + + + + + public class CxSelect + implements Serializable + { + private static final long serialVersionUID = 1L; + private String v; + private String n; + private List s; + + public CxSelect() {} + + public CxSelect(String v, String n) { + this.v = v; + this.n = n; + } + + + public List getS() { + return this.s; + } + + + public void setN(String n) { + this.n = n; + } + + + public String getN() { + return this.n; + } + + + public void setS(List s) { + this.s = s; + } + + + public String getV() { + return this.v; + } + + + public void setV(String v) { + this.v = v; + } + } /* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\web\domain\CxSelect.class diff --git a/src/main/java/com/archive/project/dazl/dagl/controller/DaglController.java b/src/main/java/com/archive/project/dazl/dagl/controller/DaglController.java index 93bffed..bb571f2 100644 --- a/src/main/java/com/archive/project/dazl/dagl/controller/DaglController.java +++ b/src/main/java/com/archive/project/dazl/dagl/controller/DaglController.java @@ -1,170 +1,170 @@ -/* */ package com.archive.project.dazl.dagl.controller + package com.archive.project.dazl.dagl.controller ; -/* */ -/* */ import com.archive.common.utils.file.FileUtils; -/* */ import com.archive.framework.aspectj.lang.annotation.Log; -/* */ import com.archive.framework.aspectj.lang.enums.BusinessType; -/* */ import com.archive.framework.web.controller.BaseController; -/* */ import com.archive.framework.web.domain.AjaxResult; -/* */ import com.archive.project.dasz.archivetype.domain.ArchiveCollationTree; -/* */ import com.archive.project.dasz.archivetype.service.IArchiveTypeService; -/* */ import com.archive.project.dazl.dagl.service.IDaglService; -/* */ import com.archive.project.system.config.service.IConfigService; -/* */ import com.archive.project.system.dict.domain.DictData; -/* */ import com.archive.project.system.dict.domain.DictType; -/* */ import com.archive.project.system.dict.service.IDictTypeService; -/* */ import java.io.File; -/* */ import java.io.IOException; -/* */ import java.io.OutputStream; -/* */ import java.util.HashMap; -/* */ import java.util.List; -/* */ import java.util.Map; -/* */ import javax.servlet.http.HttpServletResponse; -/* */ import org.apache.shiro.authz.annotation.RequiresPermissions; -/* */ import org.springframework.beans.factory.annotation.Autowired; -/* */ import org.springframework.stereotype.Controller; -/* */ import org.springframework.ui.ModelMap; -/* */ import org.springframework.validation.annotation.Validated; -/* */ import org.springframework.web.bind.annotation.GetMapping; -/* */ import org.springframework.web.bind.annotation.PathVariable; -/* */ import org.springframework.web.bind.annotation.PostMapping; -/* */ import org.springframework.web.bind.annotation.RequestMapping; -/* */ import org.springframework.web.bind.annotation.RequestParam; -/* */ import org.springframework.web.bind.annotation.ResponseBody; -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ @Controller -/* */ @RequestMapping({"/dazl/dagl"}) -/* */ public class DaglController -/* */ extends BaseController -/* */ { -/* */ @Autowired -/* */ private IArchiveTypeService archiveTypeService; -/* */ @Autowired -/* */ private IDictTypeService dictTypeService; -/* */ @Autowired -/* */ private IDaglService daglService; -/* */ @Autowired -/* */ private IConfigService configService; -/* 67 */ private String prefix = "dazl/dagl"; -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ @RequiresPermissions({"dazl:dagl:view"}) -/* */ @GetMapping -/* */ public String dagl(ModelMap mmap) { -/* 76 */ List ztrees = this.archiveTypeService.archiveCollationTreeData(); -/* 77 */ if (ztrees != null && ztrees.size() > 2) { -/* 78 */ mmap.put("firstNode", ztrees.get(1)); -/* */ } else { -/* 80 */ mmap.put("firstNode", null); -/* */ } -/* */ -/* */ -/* 84 */ DictType dictType = new DictType(); dictType.setLabel("column_bind"); -/* 85 */ List dictTypeList = this.dictTypeService.selectDictTypeList(dictType); -/* 86 */ Map> dictDataMap = new HashMap<>(); -/* 87 */ for (DictType dictTypeTemp : dictTypeList) { -/* 88 */ List dictDatas = this.dictTypeService.selectDictDataByType(dictTypeTemp.getDictType()); -/* 89 */ dictDataMap.put(dictTypeTemp.getDictType(), dictDatas); -/* */ } -/* 91 */ mmap.put("dictDataMap", dictDataMap); -/* 92 */ return this.prefix + "/dagl"; -/* */ } -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ @Log(title = "档案整理-退回接收库", businessType = BusinessType.THJSK) -/* */ @PostMapping({"/thjsk"}) -/* */ @ResponseBody -/* */ public AjaxResult thjsk(@Validated String query, @Validated String archiveTypeId, @Validated String type, @Validated String ids) { -/* 109 */ boolean flag = false; -/* */ try { -/* 111 */ flag = this.daglService.thjsk(query, archiveTypeId, type, ids); -/* 112 */ } catch (Exception ex) { -/* 113 */ System.out.println("退回接收库出现异常:" + ex.getMessage()); -/* 114 */ return error("退回接收库失败!"); -/* */ } -/* 116 */ if (flag) { -/* 117 */ return success("退回接收库成功!"); -/* */ } -/* 119 */ return error("退回接收库失败!"); -/* */ } -/* */ -/* */ -/* */ @Log(title = "档案整理-编目打印", businessType = BusinessType.BMDY) -/* */ @PostMapping({"/bmdy"}) -/* */ public void bmdy(@RequestParam Map formData, @Validated String query, @Validated String archiveTypeId, @Validated String type, @Validated String ids, HttpServletResponse response) { -/* 126 */ String path = ""; -/* 127 */ path = this.daglService.bmdyData(query, archiveTypeId, type, ids); -/* 128 */ response.setContentType("application/octet-stream"); -/* */ try { -/* 130 */ FileUtils.setAttachmentResponseHeader(response, (new File(path)).getName()); -/* 131 */ FileUtils.writeBytes(path, (OutputStream)response.getOutputStream()); -/* 132 */ } catch (IOException e) { -/* 133 */ e.printStackTrace(); -/* */ } -/* */ } -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ @GetMapping({"/folderFile/{archiveId}/{id}"}) -/* */ public String folderFile(@PathVariable("archiveId") String archiveId, @PathVariable("id") String id, ModelMap mmap) { -/* 152 */ mmap.put("archiveId", archiveId); -/* 153 */ mmap.put("folderId", id); -/* */ -/* 155 */ DictType dictType = new DictType(); dictType.setLabel("column_bind"); -/* 156 */ List dictTypeList = this.dictTypeService.selectDictTypeList(dictType); -/* 157 */ Map> dictDataMap = new HashMap<>(); -/* 158 */ for (DictType dictTypeTemp : dictTypeList) { -/* 159 */ List dictDatas = this.dictTypeService.selectDictDataByType(dictTypeTemp.getDictType()); -/* 160 */ dictDataMap.put(dictTypeTemp.getDictType(), dictDatas); -/* */ } -/* 162 */ mmap.put("dictDataMap", dictDataMap); -/* 163 */ return this.prefix + "/dajn"; -/* */ } -/* */ } + + import com.archive.common.utils.file.FileUtils; + import com.archive.framework.aspectj.lang.annotation.Log; + import com.archive.framework.aspectj.lang.enums.BusinessType; + import com.archive.framework.web.controller.BaseController; + import com.archive.framework.web.domain.AjaxResult; + import com.archive.project.dasz.archivetype.domain.ArchiveCollationTree; + import com.archive.project.dasz.archivetype.service.IArchiveTypeService; + import com.archive.project.dazl.dagl.service.IDaglService; + import com.archive.project.system.config.service.IConfigService; + import com.archive.project.system.dict.domain.DictData; + import com.archive.project.system.dict.domain.DictType; + import com.archive.project.system.dict.service.IDictTypeService; + import java.io.File; + import java.io.IOException; + import java.io.OutputStream; + import java.util.HashMap; + import java.util.List; + import java.util.Map; + import javax.servlet.http.HttpServletResponse; + import org.apache.shiro.authz.annotation.RequiresPermissions; + import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.stereotype.Controller; + import org.springframework.ui.ModelMap; + import org.springframework.validation.annotation.Validated; + import org.springframework.web.bind.annotation.GetMapping; + import org.springframework.web.bind.annotation.PathVariable; + import org.springframework.web.bind.annotation.PostMapping; + import org.springframework.web.bind.annotation.RequestMapping; + import org.springframework.web.bind.annotation.RequestParam; + import org.springframework.web.bind.annotation.ResponseBody; + + + + + + + + + + + + + + + + + + + + + + @Controller + @RequestMapping({"/dazl/dagl"}) + public class DaglController + extends BaseController + { + @Autowired + private IArchiveTypeService archiveTypeService; + @Autowired + private IDictTypeService dictTypeService; + @Autowired + private IDaglService daglService; + @Autowired + private IConfigService configService; + private String prefix = "dazl/dagl"; + + + + + + @RequiresPermissions({"dazl:dagl:view"}) + @GetMapping + public String dagl(ModelMap mmap) { + List ztrees = this.archiveTypeService.archiveCollationTreeData(); + if (ztrees != null && ztrees.size() > 2) { + mmap.put("firstNode", ztrees.get(1)); + } else { + mmap.put("firstNode", null); + } + + + DictType dictType = new DictType(); dictType.setLabel("column_bind"); + List dictTypeList = this.dictTypeService.selectDictTypeList(dictType); + Map> dictDataMap = new HashMap<>(); + for (DictType dictTypeTemp : dictTypeList) { + List dictDatas = this.dictTypeService.selectDictDataByType(dictTypeTemp.getDictType()); + dictDataMap.put(dictTypeTemp.getDictType(), dictDatas); + } + mmap.put("dictDataMap", dictDataMap); + return this.prefix + "/dagl"; + } + + + + + + + + + + + + @Log(title = "档案整理-退回接收库", businessType = BusinessType.THJSK) + @PostMapping({"/thjsk"}) + @ResponseBody + public AjaxResult thjsk(@Validated String query, @Validated String archiveTypeId, @Validated String type, @Validated String ids) { + boolean flag = false; + try { + flag = this.daglService.thjsk(query, archiveTypeId, type, ids); + } catch (Exception ex) { + System.out.println("退回接收库出现异常:" + ex.getMessage()); + return error("退回接收库失败!"); + } + if (flag) { + return success("退回接收库成功!"); + } + return error("退回接收库失败!"); + } + + + @Log(title = "档案整理-编目打印", businessType = BusinessType.BMDY) + @PostMapping({"/bmdy"}) + public void bmdy(@RequestParam Map formData, @Validated String query, @Validated String archiveTypeId, @Validated String type, @Validated String ids, HttpServletResponse response) { + String path = ""; + path = this.daglService.bmdyData(query, archiveTypeId, type, ids); + response.setContentType("application/octet-stream"); + try { + FileUtils.setAttachmentResponseHeader(response, (new File(path)).getName()); + FileUtils.writeBytes(path, (OutputStream)response.getOutputStream()); + } catch (IOException e) { + e.printStackTrace(); + } + } + + + + + + + + + + + + + + + @GetMapping({"/folderFile/{archiveId}/{id}"}) + public String folderFile(@PathVariable("archiveId") String archiveId, @PathVariable("id") String id, ModelMap mmap) { + mmap.put("archiveId", archiveId); + mmap.put("folderId", id); + + DictType dictType = new DictType(); dictType.setLabel("column_bind"); + List dictTypeList = this.dictTypeService.selectDictTypeList(dictType); + Map> dictDataMap = new HashMap<>(); + for (DictType dictTypeTemp : dictTypeList) { + List dictDatas = this.dictTypeService.selectDictDataByType(dictTypeTemp.getDictType()); + dictDataMap.put(dictTypeTemp.getDictType(), dictDatas); + } + mmap.put("dictDataMap", dictDataMap); + return this.prefix + "/dajn"; + } + } /* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dazl\dagl\controller\DaglController.class diff --git a/src/main/java/com/archive/project/dazl/dagl/service/impl/DaglServiceImpl.java b/src/main/java/com/archive/project/dazl/dagl/service/impl/DaglServiceImpl.java index b9e9723..5a532cf 100644 --- a/src/main/java/com/archive/project/dazl/dagl/service/impl/DaglServiceImpl.java +++ b/src/main/java/com/archive/project/dazl/dagl/service/impl/DaglServiceImpl.java @@ -1,282 +1,282 @@ -/* */ package com.archive.project.dazl.dagl.service.impl + package com.archive.project.dazl.dagl.service.impl ; -/* */ -/* */ import com.archive.common.archiveUtil.CreatePdfUtil; -/* */ import com.archive.common.utils.StringUtils; -/* */ import com.archive.framework.config.ArchiveConfig; -/* */ import com.archive.project.common.service.IExecuteSqlService; -/* */ import com.archive.project.dajs.archiveimportbatch.service.IArchiveImportBatchService; -/* */ import com.archive.project.dajs.jsgl.service.impl.JsglServiceImpl; -/* */ import com.archive.project.dasz.archivetype.domain.ArchiveType; -/* */ import com.archive.project.dasz.archivetype.service.IArchiveTypeService; -/* */ import com.archive.project.dasz.physicaltable.mapper.PhysicalTableMapper; -/* */ import com.archive.project.dazl.dagl.service.IDaglService; -/* */ import com.archive.project.system.dict.service.IDictTypeService; -/* */ import com.itextpdf.text.Document; -/* */ import com.itextpdf.text.PageSize; -/* */ import com.itextpdf.text.Rectangle; -/* */ import com.itextpdf.text.pdf.PdfWriter; -/* */ import java.io.File; -/* */ import java.io.FileOutputStream; -/* */ import java.text.SimpleDateFormat; -/* */ import java.util.ArrayList; -/* */ import java.util.Date; -/* */ import java.util.LinkedHashMap; -/* */ import java.util.List; -/* */ import org.springframework.beans.factory.annotation.Autowired; -/* */ import org.springframework.stereotype.Service; -/* */ import org.springframework.transaction.annotation.Transactional; -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ @Service -/* */ public class DaglServiceImpl -/* */ implements IDaglService -/* */ { -/* */ @Autowired -/* */ private PhysicalTableMapper physicalTableMapper; -/* */ @Autowired -/* */ private JsglServiceImpl jsglService; -/* */ @Autowired -/* */ private IArchiveTypeService iArchiveTypeService; -/* */ @Autowired -/* */ private IExecuteSqlService executeSqlService; -/* */ @Autowired -/* */ private IDictTypeService dictTypeService; -/* */ @Autowired -/* */ private IArchiveImportBatchService archiveImportBatchService; -/* */ -/* */ @Transactional -/* */ public boolean thjsk(String query, String archiveTypeId, String type, String ids) { -/* 82 */ boolean res = false; -/* 83 */ ArchiveType archiveType = this.iArchiveTypeService.selectArchiveTypeById(Long.valueOf(Long.parseLong(archiveTypeId))); -/* 84 */ String archiveCode = archiveType.getArhciveCode(); -/* 85 */ if (StringUtils.isNotEmpty(ids)) { -/* 86 */ if (type.toLowerCase().equals("folder")) { -/* */ -/* 88 */ String documentSql = "update t_ar_" + archiveCode + "_document set status='60' where is_delete='0' and ownerid in (select id from t_ar_" + archiveCode + "_file where ownerid in (" + ids + "))"; -/* 89 */ String filesql = "update t_ar_" + archiveCode + "_file set status='60' where is_delete='0' and ownerid in (" + ids + ")"; -/* 90 */ String folderSql = "update t_ar_" + archiveCode + "_folder set status='60' where is_delete='0' and id in (" + ids + ")"; -/* 91 */ this.executeSqlService.update(documentSql); -/* 92 */ this.executeSqlService.update(filesql); -/* 93 */ this.executeSqlService.update(folderSql); -/* 94 */ } else if (type.toLowerCase().equals("file")) { -/* */ -/* 96 */ String documentSql = "update t_ar_" + archiveCode + "_document set status='60' where is_delete='0' and ownerid in (" + ids + ")"; -/* 97 */ String filesql = "update t_ar_" + archiveCode + "_file set status='60' where is_delete='0' and id in (" + ids + ")"; -/* 98 */ this.executeSqlService.update(documentSql); -/* 99 */ this.executeSqlService.update(filesql); -/* */ } -/* 101 */ res = true; -/* */ } else { -/* 103 */ String condition = this.jsglService.appendQueryCondition(query, archiveTypeId, type); -/* 104 */ if (type.toLowerCase().equals("folder")) { -/* */ -/* 106 */ String documentSql = "update t_ar_" + archiveCode + "_document set status='60' where is_delete='0' and ownerid in (select id from t_ar_" + archiveCode + "_file where ownerid in (select id from t_ar_" + archiveCode + "_folder where " + condition + "))"; -/* 107 */ String filesql = "update t_ar_" + archiveCode + "_file set status='60' where is_delete='0' and ownerid in (select id from t_ar_" + archiveCode + "_folder where " + condition + ")"; -/* 108 */ String folderSql = "update t_ar_" + archiveCode + "_folder set status='60' where is_delete='0' and " + condition + ""; -/* 109 */ this.executeSqlService.update(documentSql); -/* 110 */ this.executeSqlService.update(filesql); -/* 111 */ this.executeSqlService.update(folderSql); -/* 112 */ } else if (type.toLowerCase().equals("file")) { -/* */ -/* 114 */ String documentSql = "update t_ar_" + archiveCode + "_document set status='60' where is_delete='0' and ownerid in (select id from t_ar_" + archiveCode + "_file where " + condition + ")"; -/* 115 */ String filesql = "update t_ar_" + archiveCode + "_file set status='60' where is_delete='0' and " + condition; -/* 116 */ this.executeSqlService.update(documentSql); -/* 117 */ this.executeSqlService.update(filesql); -/* */ } -/* 119 */ res = true; -/* */ } -/* 121 */ return res; -/* */ } -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ public String bmdyData(String query, String archiveTypeId, String type, String ids) { -/* 135 */ String downloadPath = ""; -/* */ try { -/* 137 */ SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMdd"); -/* 138 */ String dateString = formatter.format(new Date()); -/* */ -/* 140 */ ArchiveType archiveType = this.iArchiveTypeService.selectArchiveTypeById(Long.valueOf(Long.parseLong(archiveTypeId))); -/* 141 */ String fileName = archiveType.getArchiveName() + "_" + dateString + ".pdf"; -/* 142 */ String title = archiveType.getArchiveName(); -/* 143 */ float[] columnWidth = null; -/* 144 */ String[] heads = null; -/* 145 */ List resDataList = new ArrayList(); -/* 146 */ String selectDataSql = ""; -/* 147 */ if (StringUtils.isNotEmpty(ids)) { -/* 148 */ if (type.toLowerCase().equals("folder")) { -/* */ -/* 150 */ title = title + "-案卷目录"; -/* 151 */ columnWidth = new float[] { 10.0F, 20.0F, 40.0F, 10.0F, 10.0F, 10.0F }; -/* 152 */ heads = new String[] { "序号", "档号", "题名", "起始日期", "截止日期", "备注" }; -/* */ -/* 154 */ selectDataSql = "select id,dh,tm,qs_time,zz_time,bz from t_ar_" + archiveType.getArhciveCode() + "_folder where id in (" + ids + ")"; -/* */ -/* 156 */ List> datalist = this.executeSqlService.queryList(selectDataSql); -/* 157 */ for (int i = 0; i < datalist.size(); i++) { -/* 158 */ if (datalist.get(i) != null) { -/* 159 */ Object[] objects = new Object[6]; -/* 160 */ objects[0] = ((LinkedHashMap)datalist.get(i)).get("id"); -/* 161 */ objects[1] = ((LinkedHashMap)datalist.get(i)).get("dh"); -/* 162 */ objects[2] = ((LinkedHashMap)datalist.get(i)).get("tm"); -/* 163 */ objects[3] = ((LinkedHashMap)datalist.get(i)).get("qs_time"); -/* 164 */ objects[4] = ((LinkedHashMap)datalist.get(i)).get("zz_time"); -/* 165 */ objects[5] = ((LinkedHashMap)datalist.get(i)).get("bz"); -/* 166 */ resDataList.add(objects); -/* */ } -/* */ } -/* 169 */ } else if (type.toLowerCase().equals("file")) { -/* */ -/* 171 */ if (archiveType.getType().equals("folder")) { -/* */ -/* 173 */ title = title + "-卷内目录"; -/* */ } else { -/* */ -/* 176 */ title = title + "-文件目录"; -/* */ } -/* 178 */ columnWidth = new float[] { 10.0F, 20.0F, 40.0F, 10.0F, 10.0F, 10.0F }; -/* 179 */ heads = new String[] { "序号", "档号", "题名", "保管期限", "日期", "开放情况" }; -/* */ -/* 181 */ selectDataSql = "select id,dh,tm,bgqx,wjrq,kfqk from t_ar_" + archiveType.getArhciveCode() + "_file where id in (" + ids + ")"; -/* */ -/* 183 */ List> datalist = this.executeSqlService.queryList(selectDataSql); -/* 184 */ for (int i = 0; i < datalist.size(); i++) { -/* 185 */ if (datalist.get(i) != null) { -/* 186 */ Object[] objects = new Object[6]; -/* 187 */ objects[0] = ((LinkedHashMap)datalist.get(i)).get("id"); -/* 188 */ objects[1] = ((LinkedHashMap)datalist.get(i)).get("dh"); -/* 189 */ objects[2] = ((LinkedHashMap)datalist.get(i)).get("tm"); -/* 190 */ objects[3] = ((LinkedHashMap)datalist.get(i)).get("bgqx"); -/* 191 */ objects[4] = ((LinkedHashMap)datalist.get(i)).get("wjrq"); -/* 192 */ objects[5] = ((LinkedHashMap)datalist.get(i)).get("kfqk"); -/* */ -/* 194 */ resDataList.add(objects); -/* */ } -/* */ } -/* */ } -/* */ } else { -/* 199 */ String condition = this.jsglService.appendQueryCondition(query, archiveTypeId, type); -/* 200 */ if (type.toLowerCase().equals("folder")) { -/* */ -/* 202 */ title = title + "-案卷目录"; -/* 203 */ columnWidth = new float[] { 10.0F, 20.0F, 40.0F, 10.0F, 10.0F, 10.0F }; -/* 204 */ heads = new String[] { "序号", "档号", "题名", "起始日期", "截止日期", "备注" }; -/* */ -/* 206 */ selectDataSql = "select id,dh,tm,qs_time,zz_time,bz from t_ar_" + archiveType.getArhciveCode() + "_folder where is_delete='0' and " + condition + ""; -/* */ -/* 208 */ List> datalist = this.executeSqlService.queryList(selectDataSql); -/* 209 */ for (int i = 0; i < datalist.size(); i++) { -/* 210 */ if (datalist.get(i) != null) { -/* 211 */ Object[] objects = new Object[6]; -/* 212 */ objects[0] = ((LinkedHashMap)datalist.get(i)).get("id"); -/* 213 */ objects[1] = ((LinkedHashMap)datalist.get(i)).get("dh"); -/* 214 */ objects[2] = ((LinkedHashMap)datalist.get(i)).get("tm"); -/* 215 */ objects[3] = ((LinkedHashMap)datalist.get(i)).get("qs_time"); -/* 216 */ objects[4] = ((LinkedHashMap)datalist.get(i)).get("zz_time"); -/* 217 */ objects[5] = ((LinkedHashMap)datalist.get(i)).get("bz"); -/* 218 */ resDataList.add(objects); -/* */ } -/* */ } -/* 221 */ } else if (type.toLowerCase().equals("file")) { -/* */ -/* 223 */ if (archiveType.getType().equals("folder")) { -/* */ -/* 225 */ title = title + "-卷内目录"; -/* */ } else { -/* */ -/* 228 */ title = title + "-文件目录"; -/* */ } -/* 230 */ columnWidth = new float[] { 10.0F, 20.0F, 40.0F, 10.0F, 10.0F, 10.0F }; -/* 231 */ heads = new String[] { "序号", "档号", "题名", "保管期限", "日期", "开放情况" }; -/* */ -/* 233 */ selectDataSql = "select id,dh,tm,bgqx,wjrq,kfqk from t_ar_" + archiveType.getArhciveCode() + "_file where is_delete='0' and " + condition + ""; -/* */ -/* 235 */ List> datalist = this.executeSqlService.queryList(selectDataSql); -/* 236 */ for (int i = 0; i < datalist.size(); i++) { -/* 237 */ if (datalist.get(i) != null) { -/* 238 */ Object[] objects = new Object[6]; -/* 239 */ objects[0] = ((LinkedHashMap)datalist.get(i)).get("id"); -/* 240 */ objects[1] = ((LinkedHashMap)datalist.get(i)).get("dh"); -/* 241 */ objects[2] = ((LinkedHashMap)datalist.get(i)).get("tm"); -/* 242 */ objects[3] = ((LinkedHashMap)datalist.get(i)).get("bgqx"); -/* 243 */ objects[4] = ((LinkedHashMap)datalist.get(i)).get("wjrq"); -/* 244 */ objects[5] = ((LinkedHashMap)datalist.get(i)).get("kfqk"); -/* */ -/* 246 */ resDataList.add(objects); -/* */ } -/* */ } -/* */ } -/* */ } -/* */ -/* 252 */ downloadPath = ArchiveConfig.getInstance().getDownloadPath() + fileName; -/* 253 */ File desc = new File(downloadPath); -/* 254 */ if (desc.exists()) { -/* 255 */ desc.delete(); -/* */ } -/* 257 */ if (!desc.getParentFile().exists()) -/* */ { -/* 259 */ desc.getParentFile().mkdirs(); -/* */ } -/* */ -/* */ -/* 263 */ Rectangle rect = new Rectangle(PageSize.A4); -/* */ -/* 265 */ Document doc = new Document(rect); -/* 266 */ PdfWriter writer = PdfWriter.getInstance(doc, new FileOutputStream(new File(downloadPath))); -/* 267 */ doc.open(); -/* 268 */ doc.newPage(); -/* 269 */ CreatePdfUtil.createTableByData(writer, doc, columnWidth, title, heads, resDataList); -/* 270 */ doc.close(); -/* 271 */ } catch (Exception ex) { -/* 272 */ ex.printStackTrace(); -/* */ } -/* */ -/* 275 */ return downloadPath; -/* */ } -/* */ } + + import com.archive.common.archiveUtil.CreatePdfUtil; + import com.archive.common.utils.StringUtils; + import com.archive.framework.config.ArchiveConfig; + import com.archive.project.common.service.IExecuteSqlService; + import com.archive.project.dajs.archiveimportbatch.service.IArchiveImportBatchService; + import com.archive.project.dajs.jsgl.service.impl.JsglServiceImpl; + import com.archive.project.dasz.archivetype.domain.ArchiveType; + import com.archive.project.dasz.archivetype.service.IArchiveTypeService; + import com.archive.project.dasz.physicaltable.mapper.PhysicalTableMapper; + import com.archive.project.dazl.dagl.service.IDaglService; + import com.archive.project.system.dict.service.IDictTypeService; + import com.itextpdf.text.Document; + import com.itextpdf.text.PageSize; + import com.itextpdf.text.Rectangle; + import com.itextpdf.text.pdf.PdfWriter; + import java.io.File; + import java.io.FileOutputStream; + import java.text.SimpleDateFormat; + import java.util.ArrayList; + import java.util.Date; + import java.util.LinkedHashMap; + import java.util.List; + import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.stereotype.Service; + import org.springframework.transaction.annotation.Transactional; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @Service + public class DaglServiceImpl + implements IDaglService + { + @Autowired + private PhysicalTableMapper physicalTableMapper; + @Autowired + private JsglServiceImpl jsglService; + @Autowired + private IArchiveTypeService iArchiveTypeService; + @Autowired + private IExecuteSqlService executeSqlService; + @Autowired + private IDictTypeService dictTypeService; + @Autowired + private IArchiveImportBatchService archiveImportBatchService; + + @Transactional + public boolean thjsk(String query, String archiveTypeId, String type, String ids) { + boolean res = false; + ArchiveType archiveType = this.iArchiveTypeService.selectArchiveTypeById(Long.valueOf(Long.parseLong(archiveTypeId))); + String archiveCode = archiveType.getArhciveCode(); + if (StringUtils.isNotEmpty(ids)) { + if (type.toLowerCase().equals("folder")) { + + String documentSql = "update t_ar_" + archiveCode + "_document set status='60' where is_delete='0' and ownerid in (select id from t_ar_" + archiveCode + "_file where ownerid in (" + ids + "))"; + String filesql = "update t_ar_" + archiveCode + "_file set status='60' where is_delete='0' and ownerid in (" + ids + ")"; + String folderSql = "update t_ar_" + archiveCode + "_folder set status='60' where is_delete='0' and id in (" + ids + ")"; + this.executeSqlService.update(documentSql); + this.executeSqlService.update(filesql); + this.executeSqlService.update(folderSql); + } else if (type.toLowerCase().equals("file")) { + + String documentSql = "update t_ar_" + archiveCode + "_document set status='60' where is_delete='0' and ownerid in (" + ids + ")"; + String filesql = "update t_ar_" + archiveCode + "_file set status='60' where is_delete='0' and id in (" + ids + ")"; + this.executeSqlService.update(documentSql); + this.executeSqlService.update(filesql); + } + res = true; + } else { + String condition = this.jsglService.appendQueryCondition(query, archiveTypeId, type); + if (type.toLowerCase().equals("folder")) { + + String documentSql = "update t_ar_" + archiveCode + "_document set status='60' where is_delete='0' and ownerid in (select id from t_ar_" + archiveCode + "_file where ownerid in (select id from t_ar_" + archiveCode + "_folder where " + condition + "))"; + String filesql = "update t_ar_" + archiveCode + "_file set status='60' where is_delete='0' and ownerid in (select id from t_ar_" + archiveCode + "_folder where " + condition + ")"; + String folderSql = "update t_ar_" + archiveCode + "_folder set status='60' where is_delete='0' and " + condition + ""; + this.executeSqlService.update(documentSql); + this.executeSqlService.update(filesql); + this.executeSqlService.update(folderSql); + } else if (type.toLowerCase().equals("file")) { + + String documentSql = "update t_ar_" + archiveCode + "_document set status='60' where is_delete='0' and ownerid in (select id from t_ar_" + archiveCode + "_file where " + condition + ")"; + String filesql = "update t_ar_" + archiveCode + "_file set status='60' where is_delete='0' and " + condition; + this.executeSqlService.update(documentSql); + this.executeSqlService.update(filesql); + } + res = true; + } + return res; + } + + + + + + + + + + + + public String bmdyData(String query, String archiveTypeId, String type, String ids) { + String downloadPath = ""; + try { + SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMdd"); + String dateString = formatter.format(new Date()); + + ArchiveType archiveType = this.iArchiveTypeService.selectArchiveTypeById(Long.valueOf(Long.parseLong(archiveTypeId))); + String fileName = archiveType.getArchiveName() + "_" + dateString + ".pdf"; + String title = archiveType.getArchiveName(); + float[] columnWidth = null; + String[] heads = null; + List resDataList = new ArrayList(); + String selectDataSql = ""; + if (StringUtils.isNotEmpty(ids)) { + if (type.toLowerCase().equals("folder")) { + + title = title + "-案卷目录"; + columnWidth = new float[] { 10.0F, 20.0F, 40.0F, 10.0F, 10.0F, 10.0F }; + heads = new String[] { "序号", "档号", "题名", "起始日期", "截止日期", "备注" }; + + selectDataSql = "select id,dh,tm,qs_time,zz_time,bz from t_ar_" + archiveType.getArhciveCode() + "_folder where id in (" + ids + ")"; + + List> datalist = this.executeSqlService.queryList(selectDataSql); + for (int i = 0; i < datalist.size(); i++) { + if (datalist.get(i) != null) { + Object[] objects = new Object[6]; + objects[0] = ((LinkedHashMap)datalist.get(i)).get("id"); + objects[1] = ((LinkedHashMap)datalist.get(i)).get("dh"); + objects[2] = ((LinkedHashMap)datalist.get(i)).get("tm"); + objects[3] = ((LinkedHashMap)datalist.get(i)).get("qs_time"); + objects[4] = ((LinkedHashMap)datalist.get(i)).get("zz_time"); + objects[5] = ((LinkedHashMap)datalist.get(i)).get("bz"); + resDataList.add(objects); + } + } + } else if (type.toLowerCase().equals("file")) { + + if (archiveType.getType().equals("folder")) { + + title = title + "-卷内目录"; + } else { + + title = title + "-文件目录"; + } + columnWidth = new float[] { 10.0F, 20.0F, 40.0F, 10.0F, 10.0F, 10.0F }; + heads = new String[] { "序号", "档号", "题名", "保管期限", "日期", "开放情况" }; + + selectDataSql = "select id,dh,tm,bgqx,wjrq,kfqk from t_ar_" + archiveType.getArhciveCode() + "_file where id in (" + ids + ")"; + + List> datalist = this.executeSqlService.queryList(selectDataSql); + for (int i = 0; i < datalist.size(); i++) { + if (datalist.get(i) != null) { + Object[] objects = new Object[6]; + objects[0] = ((LinkedHashMap)datalist.get(i)).get("id"); + objects[1] = ((LinkedHashMap)datalist.get(i)).get("dh"); + objects[2] = ((LinkedHashMap)datalist.get(i)).get("tm"); + objects[3] = ((LinkedHashMap)datalist.get(i)).get("bgqx"); + objects[4] = ((LinkedHashMap)datalist.get(i)).get("wjrq"); + objects[5] = ((LinkedHashMap)datalist.get(i)).get("kfqk"); + + resDataList.add(objects); + } + } + } + } else { + String condition = this.jsglService.appendQueryCondition(query, archiveTypeId, type); + if (type.toLowerCase().equals("folder")) { + + title = title + "-案卷目录"; + columnWidth = new float[] { 10.0F, 20.0F, 40.0F, 10.0F, 10.0F, 10.0F }; + heads = new String[] { "序号", "档号", "题名", "起始日期", "截止日期", "备注" }; + + selectDataSql = "select id,dh,tm,qs_time,zz_time,bz from t_ar_" + archiveType.getArhciveCode() + "_folder where is_delete='0' and " + condition + ""; + + List> datalist = this.executeSqlService.queryList(selectDataSql); + for (int i = 0; i < datalist.size(); i++) { + if (datalist.get(i) != null) { + Object[] objects = new Object[6]; + objects[0] = ((LinkedHashMap)datalist.get(i)).get("id"); + objects[1] = ((LinkedHashMap)datalist.get(i)).get("dh"); + objects[2] = ((LinkedHashMap)datalist.get(i)).get("tm"); + objects[3] = ((LinkedHashMap)datalist.get(i)).get("qs_time"); + objects[4] = ((LinkedHashMap)datalist.get(i)).get("zz_time"); + objects[5] = ((LinkedHashMap)datalist.get(i)).get("bz"); + resDataList.add(objects); + } + } + } else if (type.toLowerCase().equals("file")) { + + if (archiveType.getType().equals("folder")) { + + title = title + "-卷内目录"; + } else { + + title = title + "-文件目录"; + } + columnWidth = new float[] { 10.0F, 20.0F, 40.0F, 10.0F, 10.0F, 10.0F }; + heads = new String[] { "序号", "档号", "题名", "保管期限", "日期", "开放情况" }; + + selectDataSql = "select id,dh,tm,bgqx,wjrq,kfqk from t_ar_" + archiveType.getArhciveCode() + "_file where is_delete='0' and " + condition + ""; + + List> datalist = this.executeSqlService.queryList(selectDataSql); + for (int i = 0; i < datalist.size(); i++) { + if (datalist.get(i) != null) { + Object[] objects = new Object[6]; + objects[0] = ((LinkedHashMap)datalist.get(i)).get("id"); + objects[1] = ((LinkedHashMap)datalist.get(i)).get("dh"); + objects[2] = ((LinkedHashMap)datalist.get(i)).get("tm"); + objects[3] = ((LinkedHashMap)datalist.get(i)).get("bgqx"); + objects[4] = ((LinkedHashMap)datalist.get(i)).get("wjrq"); + objects[5] = ((LinkedHashMap)datalist.get(i)).get("kfqk"); + + resDataList.add(objects); + } + } + } + } + + downloadPath = ArchiveConfig.getInstance().getDownloadPath() + fileName; + File desc = new File(downloadPath); + if (desc.exists()) { + desc.delete(); + } + if (!desc.getParentFile().exists()) + { + desc.getParentFile().mkdirs(); + } + + + Rectangle rect = new Rectangle(PageSize.A4); + + Document doc = new Document(rect); + PdfWriter writer = PdfWriter.getInstance(doc, new FileOutputStream(new File(downloadPath))); + doc.open(); + doc.newPage(); + CreatePdfUtil.createTableByData(writer, doc, columnWidth, title, heads, resDataList); + doc.close(); + } catch (Exception ex) { + ex.printStackTrace(); + } + + return downloadPath; + } + } /* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dazl\dagl\service\impl\DaglServiceImpl.class diff --git a/src/main/java/com/archive/project/monitor/job/util/CronUtils.java b/src/main/java/com/archive/project/monitor/job/util/CronUtils.java index b744ba9..c59a6eb 100644 --- a/src/main/java/com/archive/project/monitor/job/util/CronUtils.java +++ b/src/main/java/com/archive/project/monitor/job/util/CronUtils.java @@ -1,68 +1,68 @@ -/* */ package com.archive.project.monitor.job.util + package com.archive.project.monitor.job.util ; -/* */ -/* */ import java.text.ParseException; -/* */ import java.util.Date; -/* */ import org.quartz.CronExpression; -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ public class CronUtils -/* */ { -/* */ public static boolean isValid(String cronExpression) { -/* 23 */ return CronExpression.isValidExpression(cronExpression); -/* */ } -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ public static String getInvalidMessage(String cronExpression) { -/* */ try { -/* 36 */ new CronExpression(cronExpression); -/* 37 */ return null; -/* */ } -/* 39 */ catch (ParseException pe) { -/* */ -/* 41 */ return pe.getMessage(); -/* */ } -/* */ } -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ public static Date getNextExecution(String cronExpression) { -/* */ try { -/* 55 */ CronExpression cron = new CronExpression(cronExpression); -/* 56 */ return cron.getNextValidTimeAfter(new Date(System.currentTimeMillis())); -/* */ } -/* 58 */ catch (ParseException e) { -/* */ -/* 60 */ throw new IllegalArgumentException(e.getMessage()); -/* */ } -/* */ } -/* */ } + + import java.text.ParseException; + import java.util.Date; + import org.quartz.CronExpression; + + + + + + + + + + + + + + + public class CronUtils + { + public static boolean isValid(String cronExpression) { + return CronExpression.isValidExpression(cronExpression); + } + + + + + + + + + + public static String getInvalidMessage(String cronExpression) { + try { + new CronExpression(cronExpression); + return null; + } + catch (ParseException pe) { + + return pe.getMessage(); + } + } + + + + + + + + + + public static Date getNextExecution(String cronExpression) { + try { + CronExpression cron = new CronExpression(cronExpression); + return cron.getNextValidTimeAfter(new Date(System.currentTimeMillis())); + } + catch (ParseException e) { + + throw new IllegalArgumentException(e.getMessage()); + } + } + } /* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\monitor\jo\\util\CronUtils.class diff --git a/src/main/java/com/archive/project/monitor/server/domain/Cpu.java b/src/main/java/com/archive/project/monitor/server/domain/Cpu.java index f071c15..5c66b4e 100644 --- a/src/main/java/com/archive/project/monitor/server/domain/Cpu.java +++ b/src/main/java/com/archive/project/monitor/server/domain/Cpu.java @@ -1,106 +1,106 @@ -/* */ package com.archive.project.monitor.server.domain + package com.archive.project.monitor.server.domain ; -/* */ -/* */ import com.archive.common.utils.Arith; -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ public class Cpu -/* */ { -/* */ private int cpuNum; -/* */ private double total; -/* */ private double sys; -/* */ private double used; -/* */ private double wait; -/* */ private double free; -/* */ -/* */ public int getCpuNum() { -/* 44 */ return this.cpuNum; -/* */ } -/* */ -/* */ -/* */ public void setCpuNum(int cpuNum) { -/* 49 */ this.cpuNum = cpuNum; -/* */ } -/* */ -/* */ -/* */ public double getTotal() { -/* 54 */ return Arith.round(Arith.mul(this.total, 100.0D), 2); -/* */ } -/* */ -/* */ -/* */ public void setTotal(double total) { -/* 59 */ this.total = total; -/* */ } -/* */ -/* */ -/* */ public double getSys() { -/* 64 */ return Arith.round(Arith.mul(this.sys / this.total, 100.0D), 2); -/* */ } -/* */ -/* */ -/* */ public void setSys(double sys) { -/* 69 */ this.sys = sys; -/* */ } -/* */ -/* */ -/* */ public double getUsed() { -/* 74 */ return Arith.round(Arith.mul(this.used / this.total, 100.0D), 2); -/* */ } -/* */ -/* */ -/* */ public void setUsed(double used) { -/* 79 */ this.used = used; -/* */ } -/* */ -/* */ -/* */ public double getWait() { -/* 84 */ return Arith.round(Arith.mul(this.wait / this.total, 100.0D), 2); -/* */ } -/* */ -/* */ -/* */ public void setWait(double wait) { -/* 89 */ this.wait = wait; -/* */ } -/* */ -/* */ -/* */ public double getFree() { -/* 94 */ return Arith.round(Arith.mul(this.free / this.total, 100.0D), 2); -/* */ } -/* */ -/* */ -/* */ public void setFree(double free) { -/* 99 */ this.free = free; -/* */ } -/* */ } + + import com.archive.common.utils.Arith; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + public class Cpu + { + private int cpuNum; + private double total; + private double sys; + private double used; + private double wait; + private double free; + + public int getCpuNum() { + return this.cpuNum; + } + + + public void setCpuNum(int cpuNum) { + this.cpuNum = cpuNum; + } + + + public double getTotal() { + return Arith.round(Arith.mul(this.total, 100.0D), 2); + } + + + public void setTotal(double total) { + this.total = total; + } + + + public double getSys() { + return Arith.round(Arith.mul(this.sys / this.total, 100.0D), 2); + } + + + public void setSys(double sys) { + this.sys = sys; + } + + + public double getUsed() { + return Arith.round(Arith.mul(this.used / this.total, 100.0D), 2); + } + + + public void setUsed(double used) { + this.used = used; + } + + + public double getWait() { + return Arith.round(Arith.mul(this.wait / this.total, 100.0D), 2); + } + + + public void setWait(double wait) { + this.wait = wait; + } + + + public double getFree() { + return Arith.round(Arith.mul(this.free / this.total, 100.0D), 2); + } + + + public void setFree(double free) { + this.free = free; + } + } /* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\monitor\server\domain\Cpu.class diff --git a/src/main/java/com/archive/project/system/dept/controller/DeptController.java b/src/main/java/com/archive/project/system/dept/controller/DeptController.java index 2f6719f..8cdccbc 100644 --- a/src/main/java/com/archive/project/system/dept/controller/DeptController.java +++ b/src/main/java/com/archive/project/system/dept/controller/DeptController.java @@ -1,203 +1,203 @@ -/* */ package com.archive.project.system.dept.controller; -/* */ -/* */ import com.archive.common.utils.StringUtils; -/* */ import com.archive.framework.aspectj.lang.annotation.Log; -/* */ import com.archive.framework.aspectj.lang.enums.BusinessType; -/* */ import com.archive.framework.web.controller.BaseController; -/* */ import com.archive.framework.web.domain.AjaxResult; -/* */ import com.archive.framework.web.domain.Ztree; -/* */ import com.archive.project.system.dept.domain.Dept; -/* */ import com.archive.project.system.dept.service.IDeptService; -/* */ import com.archive.project.system.role.domain.Role; -/* */ import java.util.List; -/* */ import org.apache.shiro.authz.annotation.RequiresPermissions; -/* */ import org.springframework.beans.factory.annotation.Autowired; -/* */ import org.springframework.stereotype.Controller; -/* */ import org.springframework.ui.ModelMap; -/* */ import org.springframework.validation.annotation.Validated; -/* */ import org.springframework.web.bind.annotation.GetMapping; -/* */ import org.springframework.web.bind.annotation.PathVariable; -/* */ import org.springframework.web.bind.annotation.PostMapping; -/* */ import org.springframework.web.bind.annotation.RequestMapping; -/* */ import org.springframework.web.bind.annotation.ResponseBody; -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ @Controller -/* */ @RequestMapping({"/system/dept"}) -/* */ public class DeptController -/* */ extends BaseController -/* */ { -/* 34 */ private String prefix = "system/dept"; -/* */ -/* */ @Autowired -/* */ private IDeptService deptService; -/* */ -/* */ -/* */ @RequiresPermissions({"system:dept:view"}) -/* */ @GetMapping -/* */ public String dept() { -/* 43 */ return this.prefix + "/dept"; -/* */ } -/* */ -/* */ -/* */ @RequiresPermissions({"system:dept:list"}) -/* */ @PostMapping({"/list"}) -/* */ @ResponseBody -/* */ public List list(Dept dept) { -/* 51 */ List deptList = this.deptService.selectDeptList(dept); -/* 52 */ return deptList; -/* */ } -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ @GetMapping({"/add/{parentId}"}) -/* */ public String add(@PathVariable("parentId") Long parentId, ModelMap mmap) { -/* 61 */ mmap.put("dept", this.deptService.selectDeptById(parentId)); -/* 62 */ return this.prefix + "/add"; -/* */ } -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ @Log(title = "部门管理", businessType = BusinessType.INSERT) -/* */ @RequiresPermissions({"system:dept:add"}) -/* */ @PostMapping({"/add"}) -/* */ @ResponseBody -/* */ public AjaxResult addSave(@Validated Dept dept) { -/* 74 */ if ("1".equals(this.deptService.checkDeptNameUnique(dept))) -/* */ { -/* 76 */ return error("新增部门'" + dept.getDeptName() + "'失败,部门名称已存在"); -/* */ } -/* 78 */ return toAjax(this.deptService.insertDept(dept)); -/* */ } -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ @GetMapping({"/edit/{deptId}"}) -/* */ public String edit(@PathVariable("deptId") Long deptId, ModelMap mmap) { -/* 87 */ Dept dept = this.deptService.selectDeptById(deptId); -/* 88 */ if (StringUtils.isNotNull(dept) && 100L == deptId.longValue()) -/* */ { -/* 90 */ dept.setParentName("无"); -/* */ } -/* 92 */ mmap.put("dept", dept); -/* 93 */ return this.prefix + "/edit"; -/* */ } -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ @Log(title = "部门管理", businessType = BusinessType.UPDATE) -/* */ @RequiresPermissions({"system:dept:edit"}) -/* */ @PostMapping({"/edit"}) -/* */ @ResponseBody -/* */ public AjaxResult editSave(@Validated Dept dept) { -/* 105 */ if ("1".equals(this.deptService.checkDeptNameUnique(dept))) -/* */ { -/* 107 */ return error("修改部门'" + dept.getDeptName() + "'失败,部门名称已存在"); -/* */ } -/* 109 */ if (dept.getParentId().equals(dept.getDeptId())) -/* */ { -/* 111 */ return error("修改部门'" + dept.getDeptName() + "'失败,上级部门不能是自己"); -/* */ } -/* 113 */ if (StringUtils.equals("1", dept.getStatus()) && this.deptService -/* 114 */ .selectNormalChildrenDeptById(dept.getDeptId()) > 0) -/* */ { -/* 116 */ return AjaxResult.error("该部门包含未停用的子部门!"); -/* */ } -/* 118 */ return toAjax(this.deptService.updateDept(dept)); -/* */ } -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ @Log(title = "部门管理", businessType = BusinessType.DELETE) -/* */ @RequiresPermissions({"system:dept:remove"}) -/* */ @GetMapping({"/remove/{deptId}"}) -/* */ @ResponseBody -/* */ public AjaxResult remove(@PathVariable("deptId") Long deptId) { -/* 130 */ if (this.deptService.selectDeptCount(deptId) > 0) -/* */ { -/* 132 */ return AjaxResult.warn("存在下级部门,不允许删除"); -/* */ } -/* 134 */ if (this.deptService.checkDeptExistUser(deptId)) -/* */ { -/* 136 */ return AjaxResult.warn("部门存在用户,不允许删除"); -/* */ } -/* 138 */ return toAjax(this.deptService.deleteDeptById(deptId)); -/* */ } -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ @PostMapping({"/checkDeptNameUnique"}) -/* */ @ResponseBody -/* */ public String checkDeptNameUnique(Dept dept) { -/* 148 */ return this.deptService.checkDeptNameUnique(dept); -/* */ } -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ @GetMapping({"/selectDeptTree/{deptId}", "/selectDeptTree/{deptId}/{excludeId}"}) -/* */ public String selectDeptTree(@PathVariable("deptId") Long deptId, @PathVariable(value = "excludeId", required = false) String excludeId, ModelMap mmap) { -/* 161 */ mmap.put("dept", this.deptService.selectDeptById(deptId)); -/* 162 */ mmap.put("excludeId", excludeId); -/* 163 */ return this.prefix + "/tree"; -/* */ } -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ @GetMapping({"/treeData"}) -/* */ @ResponseBody -/* */ public List treeData() { -/* 173 */ List ztrees = this.deptService.selectDeptTree(new Dept()); -/* 174 */ return ztrees; -/* */ } -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ @GetMapping({"/treeData/{excludeId}"}) -/* */ @ResponseBody -/* */ public List treeDataExcludeChild(@PathVariable(value = "excludeId", required = false) Long excludeId) { -/* 184 */ Dept dept = new Dept(); -/* 185 */ dept.setDeptId(excludeId); -/* 186 */ List ztrees = this.deptService.selectDeptTreeExcludeChild(dept); -/* 187 */ return ztrees; -/* */ } -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ @GetMapping({"/roleDeptTreeData"}) -/* */ @ResponseBody -/* */ public List deptTreeData(Role role) { -/* 197 */ List ztrees = this.deptService.roleDeptTreeData(role); -/* 198 */ return ztrees; -/* */ } -/* */ } + package com.archive.project.system.dept.controller; + + import com.archive.common.utils.StringUtils; + import com.archive.framework.aspectj.lang.annotation.Log; + import com.archive.framework.aspectj.lang.enums.BusinessType; + import com.archive.framework.web.controller.BaseController; + import com.archive.framework.web.domain.AjaxResult; + import com.archive.framework.web.domain.Ztree; + import com.archive.project.system.dept.domain.Dept; + import com.archive.project.system.dept.service.IDeptService; + import com.archive.project.system.role.domain.Role; + import java.util.List; + import org.apache.shiro.authz.annotation.RequiresPermissions; + import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.stereotype.Controller; + import org.springframework.ui.ModelMap; + import org.springframework.validation.annotation.Validated; + import org.springframework.web.bind.annotation.GetMapping; + import org.springframework.web.bind.annotation.PathVariable; + import org.springframework.web.bind.annotation.PostMapping; + import org.springframework.web.bind.annotation.RequestMapping; + import org.springframework.web.bind.annotation.ResponseBody; + + + + + + + @Controller + @RequestMapping({"/system/dept"}) + public class DeptController + extends BaseController + { + private String prefix = "system/dept"; + + @Autowired + private IDeptService deptService; + + + @RequiresPermissions({"system:dept:view"}) + @GetMapping + public String dept() { + return this.prefix + "/dept"; + } + + + @RequiresPermissions({"system:dept:list"}) + @PostMapping({"/list"}) + @ResponseBody + public List list(Dept dept) { + List deptList = this.deptService.selectDeptList(dept); + return deptList; + } + + + + + + @GetMapping({"/add/{parentId}"}) + public String add(@PathVariable("parentId") Long parentId, ModelMap mmap) { + mmap.put("dept", this.deptService.selectDeptById(parentId)); + return this.prefix + "/add"; + } + + + + + + @Log(title = "部门管理", businessType = BusinessType.INSERT) + @RequiresPermissions({"system:dept:add"}) + @PostMapping({"/add"}) + @ResponseBody + public AjaxResult addSave(@Validated Dept dept) { + if ("1".equals(this.deptService.checkDeptNameUnique(dept))) + { + return error("新增部门'" + dept.getDeptName() + "'失败,部门名称已存在"); + } + return toAjax(this.deptService.insertDept(dept)); + } + + + + + + @GetMapping({"/edit/{deptId}"}) + public String edit(@PathVariable("deptId") Long deptId, ModelMap mmap) { + Dept dept = this.deptService.selectDeptById(deptId); + if (StringUtils.isNotNull(dept) && 100L == deptId.longValue()) + { + dept.setParentName("无"); + } + mmap.put("dept", dept); + return this.prefix + "/edit"; + } + + + + + + @Log(title = "部门管理", businessType = BusinessType.UPDATE) + @RequiresPermissions({"system:dept:edit"}) + @PostMapping({"/edit"}) + @ResponseBody + public AjaxResult editSave(@Validated Dept dept) { + if ("1".equals(this.deptService.checkDeptNameUnique(dept))) + { + return error("修改部门'" + dept.getDeptName() + "'失败,部门名称已存在"); + } + if (dept.getParentId().equals(dept.getDeptId())) + { + return error("修改部门'" + dept.getDeptName() + "'失败,上级部门不能是自己"); + } + if (StringUtils.equals("1", dept.getStatus()) && this.deptService + .selectNormalChildrenDeptById(dept.getDeptId()) > 0) + { + return AjaxResult.error("该部门包含未停用的子部门!"); + } + return toAjax(this.deptService.updateDept(dept)); + } + + + + + + @Log(title = "部门管理", businessType = BusinessType.DELETE) + @RequiresPermissions({"system:dept:remove"}) + @GetMapping({"/remove/{deptId}"}) + @ResponseBody + public AjaxResult remove(@PathVariable("deptId") Long deptId) { + if (this.deptService.selectDeptCount(deptId) > 0) + { + return AjaxResult.warn("存在下级部门,不允许删除"); + } + if (this.deptService.checkDeptExistUser(deptId)) + { + return AjaxResult.warn("部门存在用户,不允许删除"); + } + return toAjax(this.deptService.deleteDeptById(deptId)); + } + + + + + + @PostMapping({"/checkDeptNameUnique"}) + @ResponseBody + public String checkDeptNameUnique(Dept dept) { + return this.deptService.checkDeptNameUnique(dept); + } + + + + + + + + + + @GetMapping({"/selectDeptTree/{deptId}", "/selectDeptTree/{deptId}/{excludeId}"}) + public String selectDeptTree(@PathVariable("deptId") Long deptId, @PathVariable(value = "excludeId", required = false) String excludeId, ModelMap mmap) { + mmap.put("dept", this.deptService.selectDeptById(deptId)); + mmap.put("excludeId", excludeId); + return this.prefix + "/tree"; + } + + + + + + @GetMapping({"/treeData"}) + @ResponseBody + public List treeData() { + List ztrees = this.deptService.selectDeptTree(new Dept()); + return ztrees; + } + + + + + + @GetMapping({"/treeData/{excludeId}"}) + @ResponseBody + public List treeDataExcludeChild(@PathVariable(value = "excludeId", required = false) Long excludeId) { + Dept dept = new Dept(); + dept.setDeptId(excludeId); + List ztrees = this.deptService.selectDeptTreeExcludeChild(dept); + return ztrees; + } + + + + + + @GetMapping({"/roleDeptTreeData"}) + @ResponseBody + public List deptTreeData(Role role) { + List ztrees = this.deptService.roleDeptTreeData(role); + return ztrees; + } + } /* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\system\dept\controller\DeptController.class diff --git a/src/main/java/com/archive/project/system/dept/domain/Dept.java b/src/main/java/com/archive/project/system/dept/domain/Dept.java index 11797b3..33475b0 100644 --- a/src/main/java/com/archive/project/system/dept/domain/Dept.java +++ b/src/main/java/com/archive/project/system/dept/domain/Dept.java @@ -1,190 +1,190 @@ -/* */ package com.archive.project.system.dept.domain + package com.archive.project.system.dept.domain ; -/* */ -/* */ import com.archive.framework.web.domain.BaseEntity; -/* */ import javax.validation.constraints.Email; -/* */ import javax.validation.constraints.NotBlank; -/* */ import javax.validation.constraints.Size; -/* */ import org.apache.commons.lang3.builder.ToStringBuilder; -/* */ import org.apache.commons.lang3.builder.ToStringStyle; -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ public class Dept -/* */ extends BaseEntity -/* */ { -/* */ private static final long serialVersionUID = 1L; -/* */ private Long deptId; -/* */ private Long parentId; -/* */ private String ancestors; -/* */ private String deptName; -/* */ private String orderNum; -/* */ private String leader; -/* */ private String phone; -/* */ private String email; -/* */ private String status; -/* */ private String delFlag; -/* */ private String parentName; -/* */ -/* */ public Long getDeptId() { -/* 52 */ return this.deptId; -/* */ } -/* */ -/* */ -/* */ public void setDeptId(Long deptId) { -/* 57 */ this.deptId = deptId; -/* */ } -/* */ -/* */ -/* */ public Long getParentId() { -/* 62 */ return this.parentId; -/* */ } -/* */ -/* */ -/* */ public void setParentId(Long parentId) { -/* 67 */ this.parentId = parentId; -/* */ } -/* */ -/* */ -/* */ public String getAncestors() { -/* 72 */ return this.ancestors; -/* */ } -/* */ -/* */ -/* */ public void setAncestors(String ancestors) { -/* 77 */ this.ancestors = ancestors; -/* */ } -/* */ -/* */ -/* */ @NotBlank(message = "部门名称不能为空") -/* */ @Size(min = 0, max = 30, message = "部门名称长度不能超过30个字符") -/* */ public String getDeptName() { -/* 84 */ return this.deptName; -/* */ } -/* */ -/* */ -/* */ public void setDeptName(String deptName) { -/* 89 */ this.deptName = deptName; -/* */ } -/* */ -/* */ -/* */ @NotBlank(message = "显示顺序不能为空") -/* */ public String getOrderNum() { -/* 95 */ return this.orderNum; -/* */ } -/* */ -/* */ -/* */ public void setOrderNum(String orderNum) { -/* 100 */ this.orderNum = orderNum; -/* */ } -/* */ -/* */ -/* */ public String getLeader() { -/* 105 */ return this.leader; -/* */ } -/* */ -/* */ -/* */ public void setLeader(String leader) { -/* 110 */ this.leader = leader; -/* */ } -/* */ -/* */ -/* */ @Size(min = 0, max = 11, message = "联系电话长度不能超过11个字符") -/* */ public String getPhone() { -/* 116 */ return this.phone; -/* */ } -/* */ -/* */ -/* */ public void setPhone(String phone) { -/* 121 */ this.phone = phone; -/* */ } -/* */ -/* */ -/* */ @Email(message = "邮箱格式不正确") -/* */ @Size(min = 0, max = 50, message = "邮箱长度不能超过50个字符") -/* */ public String getEmail() { -/* 128 */ return this.email; -/* */ } -/* */ -/* */ -/* */ public void setEmail(String email) { -/* 133 */ this.email = email; -/* */ } -/* */ -/* */ -/* */ public String getStatus() { -/* 138 */ return this.status; -/* */ } -/* */ -/* */ -/* */ public void setStatus(String status) { -/* 143 */ this.status = status; -/* */ } -/* */ -/* */ -/* */ public String getDelFlag() { -/* 148 */ return this.delFlag; -/* */ } -/* */ -/* */ -/* */ public void setDelFlag(String delFlag) { -/* 153 */ this.delFlag = delFlag; -/* */ } -/* */ -/* */ -/* */ public String getParentName() { -/* 158 */ return this.parentName; -/* */ } -/* */ -/* */ -/* */ public void setParentName(String parentName) { -/* 163 */ this.parentName = parentName; -/* */ } -/* */ -/* */ -/* */ public String toString() { -/* 168 */ return (new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)) -/* 169 */ .append("deptId", getDeptId()) -/* 170 */ .append("parentId", getParentId()) -/* 171 */ .append("ancestors", getAncestors()) -/* 172 */ .append("deptName", getDeptName()) -/* 173 */ .append("orderNum", getOrderNum()) -/* 174 */ .append("leader", getLeader()) -/* 175 */ .append("phone", getPhone()) -/* 176 */ .append("email", getEmail()) -/* 177 */ .append("status", getStatus()) -/* 178 */ .append("delFlag", getDelFlag()) -/* 179 */ .append("createBy", getCreateBy()) -/* 180 */ .append("createTime", getCreateTime()) -/* 181 */ .append("updateBy", getUpdateBy()) -/* 182 */ .append("updateTime", getUpdateTime()) -/* 183 */ .toString(); -/* */ } -/* */ } + + import com.archive.framework.web.domain.BaseEntity; + import javax.validation.constraints.Email; + import javax.validation.constraints.NotBlank; + import javax.validation.constraints.Size; + import org.apache.commons.lang3.builder.ToStringBuilder; + import org.apache.commons.lang3.builder.ToStringStyle; + + + + + + + + + + + + + + + + + + + + + + + + + + + public class Dept + extends BaseEntity + { + private static final long serialVersionUID = 1L; + private Long deptId; + private Long parentId; + private String ancestors; + private String deptName; + private String orderNum; + private String leader; + private String phone; + private String email; + private String status; + private String delFlag; + private String parentName; + + public Long getDeptId() { + return this.deptId; + } + + + public void setDeptId(Long deptId) { + this.deptId = deptId; + } + + + public Long getParentId() { + return this.parentId; + } + + + public void setParentId(Long parentId) { + this.parentId = parentId; + } + + + public String getAncestors() { + return this.ancestors; + } + + + public void setAncestors(String ancestors) { + this.ancestors = ancestors; + } + + + @NotBlank(message = "部门名称不能为空") + @Size(min = 0, max = 30, message = "部门名称长度不能超过30个字符") + public String getDeptName() { + return this.deptName; + } + + + public void setDeptName(String deptName) { + this.deptName = deptName; + } + + + @NotBlank(message = "显示顺序不能为空") + public String getOrderNum() { + return this.orderNum; + } + + + public void setOrderNum(String orderNum) { + this.orderNum = orderNum; + } + + + public String getLeader() { + return this.leader; + } + + + public void setLeader(String leader) { + this.leader = leader; + } + + + @Size(min = 0, max = 11, message = "联系电话长度不能超过11个字符") + public String getPhone() { + return this.phone; + } + + + public void setPhone(String phone) { + this.phone = phone; + } + + + @Email(message = "邮箱格式不正确") + @Size(min = 0, max = 50, message = "邮箱长度不能超过50个字符") + public String getEmail() { + return this.email; + } + + + public void setEmail(String email) { + this.email = email; + } + + + public String getStatus() { + return this.status; + } + + + public void setStatus(String status) { + this.status = status; + } + + + public String getDelFlag() { + return this.delFlag; + } + + + public void setDelFlag(String delFlag) { + this.delFlag = delFlag; + } + + + public String getParentName() { + return this.parentName; + } + + + public void setParentName(String parentName) { + this.parentName = parentName; + } + + + public String toString() { + return (new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)) + .append("deptId", getDeptId()) + .append("parentId", getParentId()) + .append("ancestors", getAncestors()) + .append("deptName", getDeptName()) + .append("orderNum", getOrderNum()) + .append("leader", getLeader()) + .append("phone", getPhone()) + .append("email", getEmail()) + .append("status", getStatus()) + .append("delFlag", getDelFlag()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .toString(); + } + } /* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\system\dept\domain\Dept.class diff --git a/src/main/java/com/archive/project/zhtj/datj/controller/DatjController.java b/src/main/java/com/archive/project/zhtj/datj/controller/DatjController.java index 2ff711f..53c86d1 100644 --- a/src/main/java/com/archive/project/zhtj/datj/controller/DatjController.java +++ b/src/main/java/com/archive/project/zhtj/datj/controller/DatjController.java @@ -1,226 +1,226 @@ -/* */ package com.archive.project.zhtj.datj.controller + package com.archive.project.zhtj.datj.controller ; -/* */ -/* */ import com.archive.framework.web.controller.BaseController; -/* */ import com.archive.framework.web.domain.AjaxResult; -/* */ import com.archive.project.zhtj.datj.service.IDatjService; -/* */ import java.util.ArrayList; -/* */ import java.util.HashMap; -/* */ import java.util.List; -/* */ import java.util.Map; -/* */ import org.apache.shiro.authz.annotation.RequiresPermissions; -/* */ import org.springframework.beans.factory.annotation.Autowired; -/* */ import org.springframework.stereotype.Controller; -/* */ import org.springframework.ui.ModelMap; -/* */ import org.springframework.web.bind.annotation.GetMapping; -/* */ import org.springframework.web.bind.annotation.RequestMapping; -/* */ import org.springframework.web.bind.annotation.ResponseBody; -/* */ -/* */ -/* */ -/* */ -/* */ @Controller -/* */ @RequestMapping({"/zhtj/datj"}) -/* */ public class DatjController -/* */ extends BaseController -/* */ { -/* 26 */ private String prefix = "zhtj/datj"; -/* */ -/* */ @Autowired -/* */ private IDatjService datjService; -/* */ -/* */ -/* */ @RequiresPermissions({"zhtj:datj:view"}) -/* */ @GetMapping -/* */ public String archivesearch(ModelMap mmap) { -/* 35 */ return this.prefix + "/datj"; -/* */ } -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ @RequiresPermissions({"zhtj:datj:view"}) -/* */ @GetMapping({"/mlsltj"}) -/* */ public String mlsltj(ModelMap mmap) { -/* 47 */ return this.prefix + "/mlsltj"; -/* */ } -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ @GetMapping({"/qztj"}) -/* */ public String qztj(ModelMap mmap) { -/* 58 */ return this.prefix + "/qztj"; -/* */ } -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ @GetMapping({"/bgqxtj"}) -/* */ public String bgqxtj(ModelMap mmap) { -/* 69 */ return this.prefix + "/bgqxtj"; -/* */ } -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ @GetMapping({"/getMlslData"}) -/* */ @ResponseBody -/* */ public Map getMlslData() { -/* 80 */ return this.datjService.getMlslData(); -/* */ } -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ @GetMapping({"/getMlslTableData"}) -/* */ @ResponseBody -/* */ public AjaxResult getMlslTableData() { -/* 90 */ List> list = new ArrayList<>(); -/* */ try { -/* 92 */ list = this.datjService.getMlslTableData(); -/* 93 */ } catch (Exception e) { -/* 94 */ e.printStackTrace(); -/* */ } -/* 96 */ return AjaxResult.success(list); -/* */ } -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ @GetMapping({"/getMlslTxData"}) -/* */ @ResponseBody -/* */ public AjaxResult getMlslTxData() { -/* 107 */ Map> map = new HashMap<>(); -/* */ try { -/* 109 */ map = this.datjService.getMlslTxData(); -/* 110 */ } catch (Exception e) { -/* 111 */ e.printStackTrace(); -/* */ } -/* 113 */ return AjaxResult.success(map); -/* */ } -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ @GetMapping({"/getQztjTableData"}) -/* */ @ResponseBody -/* */ public AjaxResult getQztjTableData() { -/* 124 */ List> list = new ArrayList<>(); -/* */ try { -/* 126 */ list = this.datjService.getQztjTableData(); -/* 127 */ } catch (Exception e) { -/* 128 */ e.printStackTrace(); -/* */ } -/* 130 */ return AjaxResult.success(list); -/* */ } -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ @GetMapping({"/getQzTxData"}) -/* */ @ResponseBody -/* */ public AjaxResult getQzTxData() { -/* 140 */ Map> map = new HashMap<>(); -/* */ try { -/* 142 */ map = this.datjService.getQzTxData(); -/* 143 */ } catch (Exception e) { -/* 144 */ e.printStackTrace(); -/* */ } -/* 146 */ return AjaxResult.success(map); -/* */ } -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ @GetMapping({"/getBgqx"}) -/* */ @ResponseBody -/* */ public AjaxResult getBgqx() { -/* 156 */ List list = this.datjService.getBgqx(); -/* 157 */ List res = new ArrayList<>(); -/* 158 */ for (int i = 0; i < list.size(); i++) { -/* 159 */ String bgqx = list.get(i); -/* 160 */ if (bgqx.equals("Y")) { -/* 161 */ res.add("永久"); -/* 162 */ } else if (bgqx.equals("C")) { -/* 163 */ res.add("长期"); -/* 164 */ } else if (bgqx.equals("D")) { -/* 165 */ res.add("短期"); -/* 166 */ } else if (bgqx.equals("D100")) { -/* 167 */ res.add("100年"); -/* 168 */ } else if (bgqx.equals("D50")) { -/* 169 */ res.add("50年"); -/* 170 */ } else if (bgqx.equals("D30")) { -/* 171 */ res.add("30年"); -/* 172 */ } else if (bgqx.equals("D20")) { -/* 173 */ res.add("20年"); -/* 174 */ } else if (bgqx.equals("D15")) { -/* 175 */ res.add("15年"); -/* 176 */ } else if (bgqx.equals("D10")) { -/* 177 */ res.add("10年"); -/* 178 */ } else if (bgqx.equals("D5")) { -/* 179 */ res.add("5年"); -/* */ } else { -/* 181 */ res.add(bgqx); -/* */ } -/* */ } -/* 184 */ return AjaxResult.success(res); -/* */ } -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ @GetMapping({"/getBgqxtjTableData"}) -/* */ @ResponseBody -/* */ public AjaxResult getBgqxtjTableData() { -/* 195 */ List> list = new ArrayList<>(); -/* */ try { -/* 197 */ list = this.datjService.getBgqxtjTableData(); -/* 198 */ } catch (Exception e) { -/* 199 */ e.printStackTrace(); -/* */ } -/* 201 */ return AjaxResult.success(list); -/* */ } -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ @GetMapping({"/getArchiveCount"}) -/* */ @ResponseBody -/* */ public AjaxResult getArchiveCount() { -/* 213 */ Map map = new HashMap<>(); -/* */ try { -/* 215 */ map = this.datjService.getArchiveCount(); -/* 216 */ } catch (Exception e) { -/* 217 */ e.printStackTrace(); -/* */ } -/* 219 */ return AjaxResult.success(map); -/* */ } -/* */ } + + import com.archive.framework.web.controller.BaseController; + import com.archive.framework.web.domain.AjaxResult; + import com.archive.project.zhtj.datj.service.IDatjService; + import java.util.ArrayList; + import java.util.HashMap; + import java.util.List; + import java.util.Map; + import org.apache.shiro.authz.annotation.RequiresPermissions; + import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.stereotype.Controller; + import org.springframework.ui.ModelMap; + import org.springframework.web.bind.annotation.GetMapping; + import org.springframework.web.bind.annotation.RequestMapping; + import org.springframework.web.bind.annotation.ResponseBody; + + + + + @Controller + @RequestMapping({"/zhtj/datj"}) + public class DatjController + extends BaseController + { + private String prefix = "zhtj/datj"; + + @Autowired + private IDatjService datjService; + + + @RequiresPermissions({"zhtj:datj:view"}) + @GetMapping + public String archivesearch(ModelMap mmap) { + return this.prefix + "/datj"; + } + + + + + + + + @RequiresPermissions({"zhtj:datj:view"}) + @GetMapping({"/mlsltj"}) + public String mlsltj(ModelMap mmap) { + return this.prefix + "/mlsltj"; + } + + + + + + + + @GetMapping({"/qztj"}) + public String qztj(ModelMap mmap) { + return this.prefix + "/qztj"; + } + + + + + + + + @GetMapping({"/bgqxtj"}) + public String bgqxtj(ModelMap mmap) { + return this.prefix + "/bgqxtj"; + } + + + + + + + @GetMapping({"/getMlslData"}) + @ResponseBody + public Map getMlslData() { + return this.datjService.getMlslData(); + } + + + + + + @GetMapping({"/getMlslTableData"}) + @ResponseBody + public AjaxResult getMlslTableData() { + List> list = new ArrayList<>(); + try { + list = this.datjService.getMlslTableData(); + } catch (Exception e) { + e.printStackTrace(); + } + return AjaxResult.success(list); + } + + + + + + + @GetMapping({"/getMlslTxData"}) + @ResponseBody + public AjaxResult getMlslTxData() { + Map> map = new HashMap<>(); + try { + map = this.datjService.getMlslTxData(); + } catch (Exception e) { + e.printStackTrace(); + } + return AjaxResult.success(map); + } + + + + + + + @GetMapping({"/getQztjTableData"}) + @ResponseBody + public AjaxResult getQztjTableData() { + List> list = new ArrayList<>(); + try { + list = this.datjService.getQztjTableData(); + } catch (Exception e) { + e.printStackTrace(); + } + return AjaxResult.success(list); + } + + + + + + @GetMapping({"/getQzTxData"}) + @ResponseBody + public AjaxResult getQzTxData() { + Map> map = new HashMap<>(); + try { + map = this.datjService.getQzTxData(); + } catch (Exception e) { + e.printStackTrace(); + } + return AjaxResult.success(map); + } + + + + + + @GetMapping({"/getBgqx"}) + @ResponseBody + public AjaxResult getBgqx() { + List list = this.datjService.getBgqx(); + List res = new ArrayList<>(); + for (int i = 0; i < list.size(); i++) { + String bgqx = list.get(i); + if (bgqx.equals("Y")) { + res.add("永久"); + } else if (bgqx.equals("C")) { + res.add("长期"); + } else if (bgqx.equals("D")) { + res.add("短期"); + } else if (bgqx.equals("D100")) { + res.add("100年"); + } else if (bgqx.equals("D50")) { + res.add("50年"); + } else if (bgqx.equals("D30")) { + res.add("30年"); + } else if (bgqx.equals("D20")) { + res.add("20年"); + } else if (bgqx.equals("D15")) { + res.add("15年"); + } else if (bgqx.equals("D10")) { + res.add("10年"); + } else if (bgqx.equals("D5")) { + res.add("5年"); + } else { + res.add(bgqx); + } + } + return AjaxResult.success(res); + } + + + + + + + @GetMapping({"/getBgqxtjTableData"}) + @ResponseBody + public AjaxResult getBgqxtjTableData() { + List> list = new ArrayList<>(); + try { + list = this.datjService.getBgqxtjTableData(); + } catch (Exception e) { + e.printStackTrace(); + } + return AjaxResult.success(list); + } + + + + + + + + @GetMapping({"/getArchiveCount"}) + @ResponseBody + public AjaxResult getArchiveCount() { + Map map = new HashMap<>(); + try { + map = this.datjService.getArchiveCount(); + } catch (Exception e) { + e.printStackTrace(); + } + return AjaxResult.success(map); + } + } /* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\zhtj\datj\controller\DatjController.class diff --git a/src/main/java/com/archive/project/zhtj/datj/service/impl/DatjServiceImpl.java b/src/main/java/com/archive/project/zhtj/datj/service/impl/DatjServiceImpl.java index 2e0240f..1046be1 100644 --- a/src/main/java/com/archive/project/zhtj/datj/service/impl/DatjServiceImpl.java +++ b/src/main/java/com/archive/project/zhtj/datj/service/impl/DatjServiceImpl.java @@ -1,398 +1,398 @@ -/* */ package com.archive.project.zhtj.datj.service.impl + package com.archive.project.zhtj.datj.service.impl ; -/* */ -/* */ import com.archive.framework.config.ArchiveConfig; -/* */ import com.archive.project.common.service.IExecuteSqlService; -/* */ import com.archive.project.dasz.physicaltable.mapper.PhysicalTableMapper; -/* */ import com.archive.project.dasz.physicaltablecolumn.mapper.PhysicalTableColumnMapper; -/* */ import com.archive.project.system.config.service.IConfigService; -/* */ import com.archive.project.system.dict.service.IDictTypeService; -/* */ import com.archive.project.zhtj.datj.service.IDatjService; -/* */ import java.text.NumberFormat; -/* */ import java.util.ArrayList; -/* */ import java.util.HashMap; -/* */ import java.util.LinkedHashMap; -/* */ import java.util.List; -/* */ import java.util.Map; -/* */ import org.springframework.beans.factory.annotation.Autowired; -/* */ import org.springframework.stereotype.Service; -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ @Service -/* */ public class DatjServiceImpl -/* */ implements IDatjService -/* */ { -/* */ @Autowired -/* */ private PhysicalTableMapper physicalTableMapper; -/* */ @Autowired -/* */ private PhysicalTableColumnMapper physicalTableColumnMapper; -/* */ @Autowired -/* */ private IExecuteSqlService executeSqlService; -/* */ @Autowired -/* */ private IConfigService configService; -/* */ @Autowired -/* */ private IDictTypeService dictTypeService; -/* */ @Autowired -/* */ private ArchiveConfig archiveConfig; -/* */ -/* */ public List> getMlslTableData() { -/* 57 */ List> list = new ArrayList<>(); -/* 58 */ int zjs = 0; -/* 59 */ int zjns = 0; -/* 60 */ int zjas = 0; -/* 61 */ int zyws = 0; -/* */ -/* 63 */ String sql = "SELECT type,arhcive_code,archive_name FROM t_xtpz_archive_type order by show_order"; -/* 64 */ List> datalist = this.executeSqlService.queryList(sql); -/* 65 */ for (int i = 0; i < datalist.size(); i++) { -/* 66 */ String type = (((LinkedHashMap)datalist.get(i)).get("type") == null) ? "" : ((LinkedHashMap)datalist.get(i)).get("type").toString(); -/* 67 */ String code = (((LinkedHashMap)datalist.get(i)).get("arhcive_code") == null) ? "" : ((LinkedHashMap)datalist.get(i)).get("arhcive_code").toString(); -/* 68 */ String name = (((LinkedHashMap)datalist.get(i)).get("archive_name") == null) ? "" : ((LinkedHashMap)datalist.get(i)).get("archive_name").toString(); -/* 69 */ Map map1 = new HashMap<>(); -/* 70 */ map1.put("name", name); -/* 71 */ if (type.toLowerCase().equals("file")) { -/* */ -/* */ -/* 74 */ String zsSql = "select count(1) from t_ar_" + code + "_file where is_delete='0' and status='80'"; -/* 75 */ String zsS = this.executeSqlService.getSingle(zsSql); -/* 76 */ map1.put("jas", zsS); -/* 77 */ zjas += Integer.parseInt(zsS); -/* */ -/* 79 */ String ywSql = "select count(1) from t_ar_" + code + "_file where is_delete='0' and status='80' and dqzws>0"; -/* 80 */ String ywS = this.executeSqlService.getSingle(ywSql); -/* 81 */ zyws += Integer.parseInt(ywS); -/* 82 */ map1.put("yws", ywS); -/* 83 */ map1.put("js", "0"); -/* 84 */ map1.put("jns", "0"); -/* 85 */ } else if (type.toLowerCase().equals("folder")) { -/* */ -/* */ -/* 88 */ String zsSql = "select count(1) from t_ar_" + code + "_folder where is_delete='0' and status='80'"; -/* 89 */ String zsS = this.executeSqlService.getSingle(zsSql); -/* 90 */ map1.put("js", zsS); -/* 91 */ zjs += Integer.parseInt(zsS); -/* */ -/* 93 */ String zjnsSql = "select count(1) from t_ar_" + code + "_file where is_delete='0' and status='80'"; -/* 94 */ String jns = this.executeSqlService.getSingle(zjnsSql); -/* 95 */ map1.put("jns", jns); -/* 96 */ zjns += Integer.parseInt(jns); -/* */ -/* 98 */ String ywSql = "select count(1) from t_ar_" + code + "_file where is_delete='0' and status='80' and dqzws>0"; -/* 99 */ String yws = this.executeSqlService.getSingle(ywSql); -/* 100 */ map1.put("yws", yws); -/* 101 */ zyws += Integer.parseInt(yws); -/* */ -/* 103 */ map1.put("jas", "0"); -/* */ } -/* 105 */ list.add(map1); -/* */ } -/* */ -/* 108 */ Map map = new HashMap<>(); -/* 109 */ map.put("name", "合计"); -/* 110 */ map.put("js", String.valueOf(zjs)); -/* 111 */ map.put("jns", String.valueOf(zjns)); -/* 112 */ map.put("jas", String.valueOf(zjas)); -/* 113 */ map.put("yws", String.valueOf(zyws)); -/* 114 */ list.add(map); -/* 115 */ return list; -/* */ } -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ public Map> getMlslTxData() { -/* 124 */ Map> map = new HashMap<>(); -/* */ -/* 126 */ String sql = "SELECT type,arhcive_code,archive_name FROM t_xtpz_archive_type order by show_order"; -/* 127 */ List> datalist = this.executeSqlService.queryList(sql); -/* 128 */ List jssttr = new ArrayList<>(); -/* 129 */ List jnsttr = new ArrayList<>(); -/* 130 */ List jasttr = new ArrayList<>(); -/* 131 */ List ywsttr = new ArrayList<>(); -/* 132 */ List nameSttr = new ArrayList<>(); -/* 133 */ for (int i = 0; i < datalist.size(); i++) { -/* 134 */ String type = (((LinkedHashMap)datalist.get(i)).get("type") == null) ? "" : ((LinkedHashMap)datalist.get(i)).get("type").toString(); -/* 135 */ String code = (((LinkedHashMap)datalist.get(i)).get("arhcive_code") == null) ? "" : ((LinkedHashMap)datalist.get(i)).get("arhcive_code").toString(); -/* 136 */ String name = (((LinkedHashMap)datalist.get(i)).get("archive_name") == null) ? "" : ((LinkedHashMap)datalist.get(i)).get("archive_name").toString(); -/* 137 */ nameSttr.add(name); -/* 138 */ if (type.toLowerCase().equals("file")) { -/* */ -/* */ -/* 141 */ String zsSql = "select count(1) from t_ar_" + code + "_file where is_delete='0' and status='80'"; -/* 142 */ String zsS = this.executeSqlService.getSingle(zsSql); -/* 143 */ jasttr.add(zsS); -/* */ -/* 145 */ String ywSql = "select count(1) from t_ar_" + code + "_file where is_delete='0' and status='80' and dqzws>0"; -/* 146 */ String ywS = this.executeSqlService.getSingle(ywSql); -/* 147 */ ywsttr.add(ywS); -/* 148 */ jssttr.add("0"); -/* 149 */ jnsttr.add("0"); -/* 150 */ } else if (type.toLowerCase().equals("folder")) { -/* */ -/* */ -/* 153 */ String zsSql = "select count(1) from t_ar_" + code + "_folder where is_delete='0' and status='80'"; -/* 154 */ String zsS = this.executeSqlService.getSingle(zsSql); -/* 155 */ jssttr.add(zsS); -/* */ -/* 157 */ String zjnsSql = "select count(1) from t_ar_" + code + "_file where is_delete='0' and status='80'"; -/* 158 */ String jns = this.executeSqlService.getSingle(zjnsSql); -/* 159 */ jnsttr.add(jns); -/* */ -/* 161 */ String ywSql = "select count(1) from t_ar_" + code + "_file where is_delete='0' and status='80' and dqzws>0"; -/* 162 */ String yws = this.executeSqlService.getSingle(ywSql); -/* 163 */ ywsttr.add(yws); -/* */ -/* 165 */ jasttr.add("0"); -/* */ } -/* */ } -/* 168 */ map.put("name", nameSttr); -/* 169 */ map.put("js", jssttr); -/* 170 */ map.put("jns", jnsttr); -/* 171 */ map.put("jas", jasttr); -/* 172 */ map.put("yws", ywsttr); -/* 173 */ return map; -/* */ } -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ public List> getQztjTableData() { -/* 183 */ List> list = new ArrayList<>(); -/* */ -/* 185 */ String sql = ""; -/* 186 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { -/* 187 */ sql = "select concat_ws('-',qzh,qzmc) as qz from t_ar_total group by concat_ws('-',qzh,qzmc) "; -/* */ } -/* 189 */ else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { -/* 190 */ sql = "select qzh||'-'||qzmc as qz from t_ar_total group by qzh||'-'||qzmc "; -/* */ } -/* */ -/* */ -/* 194 */ List> datalist = this.executeSqlService.queryList(sql); -/* 195 */ for (int i = 0; i < datalist.size(); i++) { -/* 196 */ if (datalist.get(i) != null) { -/* 197 */ Map map = new HashMap<>(); -/* 198 */ String qz = (((LinkedHashMap)datalist.get(i)).get("qz") == null) ? "" : ((LinkedHashMap)datalist.get(i)).get("qz").toString(); -/* 199 */ if (!qz.equals("")) { -/* 200 */ map.put("name", qz); -/* 201 */ String qzh = qz.split("-")[0]; -/* 202 */ String jsql = "select count(1) from t_ar_total where qzh='" + qzh + "' and tableName like '%_FOLDER' and archiveType='folder' "; -/* 203 */ String zsS = this.executeSqlService.getSingle(jsql); -/* 204 */ map.put("js", zsS); -/* 205 */ String jnsql = "select count(1) from t_ar_total where qzh='" + qzh + "' and tableName like '%_FILE' and archiveType='folder'"; -/* 206 */ String jns = this.executeSqlService.getSingle(jnsql); -/* 207 */ map.put("jns", jns); -/* 208 */ String jasql = "select count(1) from t_ar_total where qzh='" + qzh + "' and tableName like '%_FILE' and archiveType='file'"; -/* 209 */ String jas = this.executeSqlService.getSingle(jasql); -/* 210 */ map.put("jas", jas); -/* 211 */ String ywsql = "select count(1) from t_ar_total where qzh='" + qzh + "' and tableName like '%_FILE' and dzqw>0"; -/* 212 */ String yws = this.executeSqlService.getSingle(ywsql); -/* 213 */ map.put("yws", yws); -/* 214 */ list.add(map); -/* */ } -/* */ } -/* */ } -/* 218 */ return list; -/* */ } -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ public Map> getQzTxData() { -/* 229 */ Map> map = new HashMap<>(); -/* */ -/* 231 */ String sql = ""; -/* 232 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { -/* 233 */ sql = "select concat_ws('-',qzh,qzmc) as qz from t_ar_total group by concat_ws('-',qzh,qzmc) "; -/* */ } -/* 235 */ else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { -/* 236 */ sql = "select qzh||'-'||qzmc as qz from t_ar_total group by qzh||'-'||qzmc "; -/* */ } -/* */ -/* 239 */ List> datalist = this.executeSqlService.queryList(sql); -/* 240 */ List jssttr = new ArrayList<>(); -/* 241 */ List jnsttr = new ArrayList<>(); -/* 242 */ List jasttr = new ArrayList<>(); -/* 243 */ List ywsttr = new ArrayList<>(); -/* 244 */ List nameSttr = new ArrayList<>(); -/* 245 */ for (int i = 0; i < datalist.size(); i++) { -/* 246 */ if (datalist.get(i) != null) { -/* 247 */ String qz = (((LinkedHashMap)datalist.get(i)).get("qz") == null) ? "" : ((LinkedHashMap)datalist.get(i)).get("qz").toString(); -/* 248 */ nameSttr.add(qz); -/* 249 */ String qzh = qz.split("-")[0]; -/* 250 */ String jsql = "select count(1) from t_ar_total where qzh='" + qzh + "' and tableName like '%_FOLDER' and archiveType='folder' "; -/* 251 */ String zsS = this.executeSqlService.getSingle(jsql); -/* 252 */ jssttr.add(zsS); -/* 253 */ String jnsql = "select count(1) from t_ar_total where qzh='" + qzh + "' and tableName like '%_FILE' and archiveType='folder'"; -/* 254 */ String jns = this.executeSqlService.getSingle(jnsql); -/* 255 */ jnsttr.add(jns); -/* 256 */ String jasql = "select count(1) from t_ar_total where qzh='" + qzh + "' and tableName like '%_FILE' and archiveType='file'"; -/* 257 */ String jas = this.executeSqlService.getSingle(jasql); -/* 258 */ jasttr.add(jas); -/* 259 */ String ywsql = "select count(1) from t_ar_total where qzh='" + qzh + "' and tableName like '%_FILE' and dzqw>0"; -/* 260 */ String yws = this.executeSqlService.getSingle(ywsql); -/* 261 */ ywsttr.add(yws); -/* */ } -/* */ } -/* 264 */ map.put("name", nameSttr); -/* 265 */ map.put("js", jssttr); -/* 266 */ map.put("jns", jnsttr); -/* 267 */ map.put("jas", jasttr); -/* 268 */ map.put("yws", ywsttr); -/* 269 */ return map; -/* */ } -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ public List getBgqx() { -/* 279 */ List list = new ArrayList<>(); -/* 280 */ String sql = "select bgqx from t_ar_total group by bgqx order by bgqx"; -/* 281 */ List> datalist = this.executeSqlService.queryList(sql); -/* 282 */ for (int i = 0; i < datalist.size(); i++) { -/* 283 */ String bgqx = (((LinkedHashMap)datalist.get(i)).get("bgqx") == null) ? "" : ((LinkedHashMap)datalist.get(i)).get("bgqx").toString(); -/* 284 */ if (!bgqx.equals("")) { -/* 285 */ list.add(bgqx); -/* */ } -/* */ } -/* 288 */ return list; -/* */ } -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ public List> getBgqxtjTableData() { -/* 297 */ List> list = new ArrayList<>(); -/* 298 */ List bgqxList = getBgqx(); -/* 299 */ String sql = "select archiveTypeName,archiveType from t_ar_total group by archiveTypeName,archiveType "; -/* 300 */ List> datalist = this.executeSqlService.queryList(sql); -/* 301 */ for (int i = 0; i < datalist.size(); i++) { -/* 302 */ List rowList = new ArrayList<>(); -/* 303 */ String archiveTypeName = (((LinkedHashMap)datalist.get(i)).get("archiveTypeName") == null) ? "" : ((LinkedHashMap)datalist.get(i)).get("archiveTypeName").toString(); -/* 304 */ String archiveType = (((LinkedHashMap)datalist.get(i)).get("archiveType") == null) ? "" : ((LinkedHashMap)datalist.get(i)).get("archiveType").toString(); -/* 305 */ if (!archiveTypeName.equals("")) { -/* 306 */ rowList.add(archiveTypeName); -/* 307 */ for (int j = 0; j < bgqxList.size(); j++) { -/* 308 */ if (archiveType.toLowerCase().equals("folder")) { -/* 309 */ String jsql = "select count(1) from t_ar_total where archiveTypeName='" + archiveTypeName + "' and tableName like '%_FOLDER' and bgqx='" + (String)bgqxList.get(j) + "' "; -/* 310 */ String js = this.executeSqlService.getSingle(jsql); -/* 311 */ rowList.add(js); -/* 312 */ String jnsql = "select count(1) from t_ar_total where archiveTypeName='" + archiveTypeName + "' and tableName like '%_FILE' and bgqx='" + (String)bgqxList.get(j) + "' "; -/* 313 */ String jns = this.executeSqlService.getSingle(jnsql); -/* 314 */ rowList.add(jns); -/* 315 */ rowList.add("0"); -/* */ } else { -/* */ -/* 318 */ rowList.add("0"); -/* 319 */ rowList.add("0"); -/* 320 */ String jasql = "select count(1) from t_ar_total where archiveTypeName='" + archiveTypeName + "' and tableName like '%_FILE' and bgqx='" + (String)bgqxList.get(j) + "' "; -/* 321 */ String jas = this.executeSqlService.getSingle(jasql); -/* 322 */ rowList.add(jas); -/* */ } -/* */ } -/* 325 */ list.add(rowList); -/* */ } -/* */ } -/* 328 */ return list; -/* */ } -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ -/* */ public Map getArchiveCount() { -/* 339 */ Map map = new HashMap<>(); -/* 340 */ String jsql = "select count(1) from t_ar_total where tableName like '%_FOLDER' and archiveType='folder' "; -/* 341 */ String zsS = this.executeSqlService.getSingle(jsql); -/* 342 */ map.put("js", zsS); -/* 343 */ String jnsql = "select count(1) from t_ar_total where tableName like '%_FILE' and archiveType='folder'"; -/* 344 */ String jns = this.executeSqlService.getSingle(jnsql); -/* 345 */ map.put("jns", jns); -/* 346 */ String jasql = "select count(1) from t_ar_total where tableName like '%_FILE' and archiveType='file'"; -/* 347 */ String jas = this.executeSqlService.getSingle(jasql); -/* 348 */ map.put("jas", jas); -/* 349 */ String ywsql = "select count(1) from t_ar_total where tableName like '%_FILE' and dzqw>0"; -/* 350 */ String yws = this.executeSqlService.getSingle(ywsql); -/* 351 */ map.put("yws", yws); -/* */ -/* */ -/* 354 */ int count = Integer.parseInt(jns) + Integer.parseInt(jas); -/* 355 */ NumberFormat numberFormat = NumberFormat.getInstance(); -/* */ -/* 357 */ numberFormat.setMaximumFractionDigits(2); -/* 358 */ String result = numberFormat.format((Integer.parseInt(yws) / count * 100.0F)); -/* 359 */ System.out.println("百分比为:" + result + "%"); -/* 360 */ map.put("szhl", result + "%"); -/* 361 */ return map; -/* */ } -/* */ -/* */ -/* */ public Map getMlslData() { -/* 366 */ Map resultMap = new HashMap<>(); -/* */ -/* 368 */ String sql = "SELECT type,arhcive_code,archive_name FROM t_xtpz_archive_type order by show_order"; -/* 369 */ List> datalist = this.executeSqlService.queryList(sql); -/* */ -/* 371 */ Object[] xAxisData = new Object[datalist.size()]; -/* 372 */ Object[] seriesJsData = new Object[datalist.size()]; -/* 373 */ Object[] seriesDzqwData = new Object[datalist.size()]; -/* 374 */ for (int i = 0; i < datalist.size(); i++) { -/* 375 */ LinkedHashMap tempMap = datalist.get(i); -/* 376 */ xAxisData[i] = tempMap.get("archive_name"); -/* */ -/* 378 */ String code = (((LinkedHashMap)datalist.get(i)).get("arhcive_code") == null) ? "" : ((LinkedHashMap)datalist.get(i)).get("arhcive_code").toString(); -/* */ -/* 380 */ String jsSql = "select count(1) from t_ar_" + code + "_file where is_delete='0' and status='80'"; -/* 381 */ String js = this.executeSqlService.getSingle(jsSql); -/* 382 */ seriesJsData[i] = js; -/* */ -/* 384 */ String dzqwsSql = "select count(dqzws) from t_ar_" + code + "_file where is_delete='0' and status='80'"; -/* 385 */ String dzqws = this.executeSqlService.getSingle(dzqwsSql); -/* 386 */ seriesDzqwData[i] = dzqws; -/* */ } -/* 388 */ resultMap.put("xAxisData", xAxisData); -/* 389 */ resultMap.put("seriesJsData", seriesJsData); -/* 390 */ resultMap.put("seriesDzqwData", seriesDzqwData); -/* 391 */ return resultMap; -/* */ } -/* */ } + + import com.archive.framework.config.ArchiveConfig; + import com.archive.project.common.service.IExecuteSqlService; + import com.archive.project.dasz.physicaltable.mapper.PhysicalTableMapper; + import com.archive.project.dasz.physicaltablecolumn.mapper.PhysicalTableColumnMapper; + import com.archive.project.system.config.service.IConfigService; + import com.archive.project.system.dict.service.IDictTypeService; + import com.archive.project.zhtj.datj.service.IDatjService; + import java.text.NumberFormat; + import java.util.ArrayList; + import java.util.HashMap; + import java.util.LinkedHashMap; + import java.util.List; + import java.util.Map; + import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.stereotype.Service; + + + + + + + + + + + + + + + + + + + + + + @Service + public class DatjServiceImpl + implements IDatjService + { + @Autowired + private PhysicalTableMapper physicalTableMapper; + @Autowired + private PhysicalTableColumnMapper physicalTableColumnMapper; + @Autowired + private IExecuteSqlService executeSqlService; + @Autowired + private IConfigService configService; + @Autowired + private IDictTypeService dictTypeService; + @Autowired + private ArchiveConfig archiveConfig; + + public List> getMlslTableData() { + List> list = new ArrayList<>(); + int zjs = 0; + int zjns = 0; + int zjas = 0; + int zyws = 0; + + String sql = "SELECT type,arhcive_code,archive_name FROM t_xtpz_archive_type order by show_order"; + List> datalist = this.executeSqlService.queryList(sql); + for (int i = 0; i < datalist.size(); i++) { + String type = (((LinkedHashMap)datalist.get(i)).get("type") == null) ? "" : ((LinkedHashMap)datalist.get(i)).get("type").toString(); + String code = (((LinkedHashMap)datalist.get(i)).get("arhcive_code") == null) ? "" : ((LinkedHashMap)datalist.get(i)).get("arhcive_code").toString(); + String name = (((LinkedHashMap)datalist.get(i)).get("archive_name") == null) ? "" : ((LinkedHashMap)datalist.get(i)).get("archive_name").toString(); + Map map1 = new HashMap<>(); + map1.put("name", name); + if (type.toLowerCase().equals("file")) { + + + String zsSql = "select count(1) from t_ar_" + code + "_file where is_delete='0' and status='80'"; + String zsS = this.executeSqlService.getSingle(zsSql); + map1.put("jas", zsS); + zjas += Integer.parseInt(zsS); + + String ywSql = "select count(1) from t_ar_" + code + "_file where is_delete='0' and status='80' and dqzws>0"; + String ywS = this.executeSqlService.getSingle(ywSql); + zyws += Integer.parseInt(ywS); + map1.put("yws", ywS); + map1.put("js", "0"); + map1.put("jns", "0"); + } else if (type.toLowerCase().equals("folder")) { + + + String zsSql = "select count(1) from t_ar_" + code + "_folder where is_delete='0' and status='80'"; + String zsS = this.executeSqlService.getSingle(zsSql); + map1.put("js", zsS); + zjs += Integer.parseInt(zsS); + + String zjnsSql = "select count(1) from t_ar_" + code + "_file where is_delete='0' and status='80'"; + String jns = this.executeSqlService.getSingle(zjnsSql); + map1.put("jns", jns); + zjns += Integer.parseInt(jns); + + String ywSql = "select count(1) from t_ar_" + code + "_file where is_delete='0' and status='80' and dqzws>0"; + String yws = this.executeSqlService.getSingle(ywSql); + map1.put("yws", yws); + zyws += Integer.parseInt(yws); + + map1.put("jas", "0"); + } + list.add(map1); + } + + Map map = new HashMap<>(); + map.put("name", "合计"); + map.put("js", String.valueOf(zjs)); + map.put("jns", String.valueOf(zjns)); + map.put("jas", String.valueOf(zjas)); + map.put("yws", String.valueOf(zyws)); + list.add(map); + return list; + } + + + + + + + public Map> getMlslTxData() { + Map> map = new HashMap<>(); + + String sql = "SELECT type,arhcive_code,archive_name FROM t_xtpz_archive_type order by show_order"; + List> datalist = this.executeSqlService.queryList(sql); + List jssttr = new ArrayList<>(); + List jnsttr = new ArrayList<>(); + List jasttr = new ArrayList<>(); + List ywsttr = new ArrayList<>(); + List nameSttr = new ArrayList<>(); + for (int i = 0; i < datalist.size(); i++) { + String type = (((LinkedHashMap)datalist.get(i)).get("type") == null) ? "" : ((LinkedHashMap)datalist.get(i)).get("type").toString(); + String code = (((LinkedHashMap)datalist.get(i)).get("arhcive_code") == null) ? "" : ((LinkedHashMap)datalist.get(i)).get("arhcive_code").toString(); + String name = (((LinkedHashMap)datalist.get(i)).get("archive_name") == null) ? "" : ((LinkedHashMap)datalist.get(i)).get("archive_name").toString(); + nameSttr.add(name); + if (type.toLowerCase().equals("file")) { + + + String zsSql = "select count(1) from t_ar_" + code + "_file where is_delete='0' and status='80'"; + String zsS = this.executeSqlService.getSingle(zsSql); + jasttr.add(zsS); + + String ywSql = "select count(1) from t_ar_" + code + "_file where is_delete='0' and status='80' and dqzws>0"; + String ywS = this.executeSqlService.getSingle(ywSql); + ywsttr.add(ywS); + jssttr.add("0"); + jnsttr.add("0"); + } else if (type.toLowerCase().equals("folder")) { + + + String zsSql = "select count(1) from t_ar_" + code + "_folder where is_delete='0' and status='80'"; + String zsS = this.executeSqlService.getSingle(zsSql); + jssttr.add(zsS); + + String zjnsSql = "select count(1) from t_ar_" + code + "_file where is_delete='0' and status='80'"; + String jns = this.executeSqlService.getSingle(zjnsSql); + jnsttr.add(jns); + + String ywSql = "select count(1) from t_ar_" + code + "_file where is_delete='0' and status='80' and dqzws>0"; + String yws = this.executeSqlService.getSingle(ywSql); + ywsttr.add(yws); + + jasttr.add("0"); + } + } + map.put("name", nameSttr); + map.put("js", jssttr); + map.put("jns", jnsttr); + map.put("jas", jasttr); + map.put("yws", ywsttr); + return map; + } + + + + + + + + public List> getQztjTableData() { + List> list = new ArrayList<>(); + + String sql = ""; + if ("mysql".equals(this.archiveConfig.getDatabaseType())) { + sql = "select concat_ws('-',qzh,qzmc) as qz from t_ar_total group by concat_ws('-',qzh,qzmc) "; + } + else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { + sql = "select qzh||'-'||qzmc as qz from t_ar_total group by qzh||'-'||qzmc "; + } + + + List> datalist = this.executeSqlService.queryList(sql); + for (int i = 0; i < datalist.size(); i++) { + if (datalist.get(i) != null) { + Map map = new HashMap<>(); + String qz = (((LinkedHashMap)datalist.get(i)).get("qz") == null) ? "" : ((LinkedHashMap)datalist.get(i)).get("qz").toString(); + if (!qz.equals("")) { + map.put("name", qz); + String qzh = qz.split("-")[0]; + String jsql = "select count(1) from t_ar_total where qzh='" + qzh + "' and tableName like '%_FOLDER' and archiveType='folder' "; + String zsS = this.executeSqlService.getSingle(jsql); + map.put("js", zsS); + String jnsql = "select count(1) from t_ar_total where qzh='" + qzh + "' and tableName like '%_FILE' and archiveType='folder'"; + String jns = this.executeSqlService.getSingle(jnsql); + map.put("jns", jns); + String jasql = "select count(1) from t_ar_total where qzh='" + qzh + "' and tableName like '%_FILE' and archiveType='file'"; + String jas = this.executeSqlService.getSingle(jasql); + map.put("jas", jas); + String ywsql = "select count(1) from t_ar_total where qzh='" + qzh + "' and tableName like '%_FILE' and dzqw>0"; + String yws = this.executeSqlService.getSingle(ywsql); + map.put("yws", yws); + list.add(map); + } + } + } + return list; + } + + + + + + + + + public Map> getQzTxData() { + Map> map = new HashMap<>(); + + String sql = ""; + if ("mysql".equals(this.archiveConfig.getDatabaseType())) { + sql = "select concat_ws('-',qzh,qzmc) as qz from t_ar_total group by concat_ws('-',qzh,qzmc) "; + } + else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { + sql = "select qzh||'-'||qzmc as qz from t_ar_total group by qzh||'-'||qzmc "; + } + + List> datalist = this.executeSqlService.queryList(sql); + List jssttr = new ArrayList<>(); + List jnsttr = new ArrayList<>(); + List jasttr = new ArrayList<>(); + List ywsttr = new ArrayList<>(); + List nameSttr = new ArrayList<>(); + for (int i = 0; i < datalist.size(); i++) { + if (datalist.get(i) != null) { + String qz = (((LinkedHashMap)datalist.get(i)).get("qz") == null) ? "" : ((LinkedHashMap)datalist.get(i)).get("qz").toString(); + nameSttr.add(qz); + String qzh = qz.split("-")[0]; + String jsql = "select count(1) from t_ar_total where qzh='" + qzh + "' and tableName like '%_FOLDER' and archiveType='folder' "; + String zsS = this.executeSqlService.getSingle(jsql); + jssttr.add(zsS); + String jnsql = "select count(1) from t_ar_total where qzh='" + qzh + "' and tableName like '%_FILE' and archiveType='folder'"; + String jns = this.executeSqlService.getSingle(jnsql); + jnsttr.add(jns); + String jasql = "select count(1) from t_ar_total where qzh='" + qzh + "' and tableName like '%_FILE' and archiveType='file'"; + String jas = this.executeSqlService.getSingle(jasql); + jasttr.add(jas); + String ywsql = "select count(1) from t_ar_total where qzh='" + qzh + "' and tableName like '%_FILE' and dzqw>0"; + String yws = this.executeSqlService.getSingle(ywsql); + ywsttr.add(yws); + } + } + map.put("name", nameSttr); + map.put("js", jssttr); + map.put("jns", jnsttr); + map.put("jas", jasttr); + map.put("yws", ywsttr); + return map; + } + + + + + + + + public List getBgqx() { + List list = new ArrayList<>(); + String sql = "select bgqx from t_ar_total group by bgqx order by bgqx"; + List> datalist = this.executeSqlService.queryList(sql); + for (int i = 0; i < datalist.size(); i++) { + String bgqx = (((LinkedHashMap)datalist.get(i)).get("bgqx") == null) ? "" : ((LinkedHashMap)datalist.get(i)).get("bgqx").toString(); + if (!bgqx.equals("")) { + list.add(bgqx); + } + } + return list; + } + + + + + + + public List> getBgqxtjTableData() { + List> list = new ArrayList<>(); + List bgqxList = getBgqx(); + String sql = "select archiveTypeName,archiveType from t_ar_total group by archiveTypeName,archiveType "; + List> datalist = this.executeSqlService.queryList(sql); + for (int i = 0; i < datalist.size(); i++) { + List rowList = new ArrayList<>(); + String archiveTypeName = (((LinkedHashMap)datalist.get(i)).get("archiveTypeName") == null) ? "" : ((LinkedHashMap)datalist.get(i)).get("archiveTypeName").toString(); + String archiveType = (((LinkedHashMap)datalist.get(i)).get("archiveType") == null) ? "" : ((LinkedHashMap)datalist.get(i)).get("archiveType").toString(); + if (!archiveTypeName.equals("")) { + rowList.add(archiveTypeName); + for (int j = 0; j < bgqxList.size(); j++) { + if (archiveType.toLowerCase().equals("folder")) { + String jsql = "select count(1) from t_ar_total where archiveTypeName='" + archiveTypeName + "' and tableName like '%_FOLDER' and bgqx='" + (String)bgqxList.get(j) + "' "; + String js = this.executeSqlService.getSingle(jsql); + rowList.add(js); + String jnsql = "select count(1) from t_ar_total where archiveTypeName='" + archiveTypeName + "' and tableName like '%_FILE' and bgqx='" + (String)bgqxList.get(j) + "' "; + String jns = this.executeSqlService.getSingle(jnsql); + rowList.add(jns); + rowList.add("0"); + } else { + + rowList.add("0"); + rowList.add("0"); + String jasql = "select count(1) from t_ar_total where archiveTypeName='" + archiveTypeName + "' and tableName like '%_FILE' and bgqx='" + (String)bgqxList.get(j) + "' "; + String jas = this.executeSqlService.getSingle(jasql); + rowList.add(jas); + } + } + list.add(rowList); + } + } + return list; + } + + + + + + + + + public Map getArchiveCount() { + Map map = new HashMap<>(); + String jsql = "select count(1) from t_ar_total where tableName like '%_FOLDER' and archiveType='folder' "; + String zsS = this.executeSqlService.getSingle(jsql); + map.put("js", zsS); + String jnsql = "select count(1) from t_ar_total where tableName like '%_FILE' and archiveType='folder'"; + String jns = this.executeSqlService.getSingle(jnsql); + map.put("jns", jns); + String jasql = "select count(1) from t_ar_total where tableName like '%_FILE' and archiveType='file'"; + String jas = this.executeSqlService.getSingle(jasql); + map.put("jas", jas); + String ywsql = "select count(1) from t_ar_total where tableName like '%_FILE' and dzqw>0"; + String yws = this.executeSqlService.getSingle(ywsql); + map.put("yws", yws); + + + int count = Integer.parseInt(jns) + Integer.parseInt(jas); + NumberFormat numberFormat = NumberFormat.getInstance(); + + numberFormat.setMaximumFractionDigits(2); + String result = numberFormat.format((Integer.parseInt(yws) / count * 100.0F)); + System.out.println("百分比为:" + result + "%"); + map.put("szhl", result + "%"); + return map; + } + + + public Map getMlslData() { + Map resultMap = new HashMap<>(); + + String sql = "SELECT type,arhcive_code,archive_name FROM t_xtpz_archive_type order by show_order"; + List> datalist = this.executeSqlService.queryList(sql); + + Object[] xAxisData = new Object[datalist.size()]; + Object[] seriesJsData = new Object[datalist.size()]; + Object[] seriesDzqwData = new Object[datalist.size()]; + for (int i = 0; i < datalist.size(); i++) { + LinkedHashMap tempMap = datalist.get(i); + xAxisData[i] = tempMap.get("archive_name"); + + String code = (((LinkedHashMap)datalist.get(i)).get("arhcive_code") == null) ? "" : ((LinkedHashMap)datalist.get(i)).get("arhcive_code").toString(); + + String jsSql = "select count(1) from t_ar_" + code + "_file where is_delete='0' and status='80'"; + String js = this.executeSqlService.getSingle(jsSql); + seriesJsData[i] = js; + + String dzqwsSql = "select count(dqzws) from t_ar_" + code + "_file where is_delete='0' and status='80'"; + String dzqws = this.executeSqlService.getSingle(dzqwsSql); + seriesDzqwData[i] = dzqws; + } + resultMap.put("xAxisData", xAxisData); + resultMap.put("seriesJsData", seriesJsData); + resultMap.put("seriesDzqwData", seriesDzqwData); + return resultMap; + } + } /* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\zhtj\datj\service\impl\DatjServiceImpl.class