Commit d95e129b authored by 耿迪迪's avatar 耿迪迪

正元项目初始化

parents

Too many changes to show.

To preserve performance only 1000 of ${real_size} files are displayed.

######################################################################
# Build Tools
.gradle
/build/
!gradle/wrapper/gradle-wrapper.jar
target/
!.mvn/wrapper/maven-wrapper.jar
######################################################################
# IDE
### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
/target/
*.class
*.jar
*.log
/logs/*
/target/*
.settings*
### NetBeans ###
nbproject/private/
build/*
nbbuild/
dist/
nbdist/
.nb-gradle/
######################################################################
# Others
*.log
*.xml.versionsBackup
*.swp
!*/build/*.java
!*/build/*.html
!*/build/*.xml
.DS_Store
node_modules
/dist
# local env files
.env.local
.env.*.local
# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
The MIT License (MIT)
Copyright (c) 2018 RuoYi
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file
## 内置功能
1. 用户管理:用户是系统操作者,该功能主要完成系统用户配置。
2. 部门管理:配置系统组织机构(公司、部门、小组),树结构展现支持数据权限。
3. 岗位管理:配置系统用户所属担任职务。
4. 菜单管理:配置系统菜单,操作权限,按钮权限标识等。
5. 角色管理:角色菜单权限分配、设置角色按机构进行数据范围权限划分。
6. 字典管理:对系统中经常使用的一些较为固定的数据进行维护。
7. 参数管理:对系统动态配置常用参数。
8. 通知公告:系统通知公告信息发布维护。
9. 操作日志:系统正常操作日志记录和查询;系统异常信息日志记录和查询。
10. 登录日志:系统登录日志记录查询包含登录异常。
11. 在线用户:当前系统中活跃用户状态监控。
12. 定时任务:在线(添加、修改、删除)任务调度包含执行结果日志。
13. 代码生成:前后端代码的生成(java、html、xml、sql)支持CRUD下载 。
14. 系统接口:根据业务代码自动生成相关的api接口文档。
15. 服务监控:监视当前系统CPU、内存、磁盘、堆栈等相关信息。
16. 缓存监控:对系统的缓存信息查询,命令统计等。
17. 在线构建器:拖动表单元素生成相应的HTML代码。
18. 连接池监视:监视当前系统数据库连接池状态,可进行分析SQL找出系统性能瓶颈。
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>zehong</artifactId>
<groupId>com.zehong</groupId>
<version>3.5.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<packaging>jar</packaging>
<artifactId>danger-manage-admin</artifactId>
<description>
web服务入口
</description>
<dependencies>
<!-- spring-boot-devtools -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional> <!-- 表示依赖不会传递 -->
</dependency>
<!-- swagger3-->
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-boot-starter</artifactId>
</dependency>
<!-- 防止进入swagger页面报类型转换错误,排除3.0.0中的引用,手动增加1.6.2版本 -->
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-models</artifactId>
<version>1.6.2</version>
</dependency>
<!-- Mysql驱动包 -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
<!-- 核心模块-->
<dependency>
<groupId>com.zehong</groupId>
<artifactId>danger-manage-framework</artifactId>
</dependency>
<!-- 定时任务-->
<dependency>
<groupId>com.zehong</groupId>
<artifactId>danger-manage-quartz</artifactId>
</dependency>
<!-- 代码生成-->
<dependency>
<groupId>com.zehong</groupId>
<artifactId>danger-manage-generator</artifactId>
</dependency>
<!--海康-->
<dependency>
<groupId>com.hikvision.ga</groupId>
<artifactId>artemis-http-client</artifactId>
<version>1.1.3</version>
</dependency>
</dependencies>
<build>
<finalName>danger-manage-${project.version}</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.4</version>
<configuration>
<excludes>
<!--<exclude>*</exclude>-->
<!--<exclude>*.sh</exclude>-->
<!--<exclude>*.bat</exclude>-->
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>copy</id>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>
${project.build.directory}/danger-manage-${project.version}/lib
</outputDirectory>
<overWriteReleases>false</overWriteReleases>
<overWriteSnapshots>false</overWriteSnapshots>
<overWriteIfNewer>true</overWriteIfNewer>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.6</version>
<executions>
<execution>
<id>copy-config</id>
<phase>package</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<encoding>UTF-8</encoding>
<outputDirectory>${project.build.directory}/danger-manage-${project.version}/conf</outputDirectory>
<resources>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>**/*.yml</include>
<include>**/logback.xml</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
<execution>
<id>copy-sh</id>
<phase>package</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<encoding>UTF-8</encoding>
<outputDirectory>${project.build.directory}/danger-manage-${project.version}/bin</outputDirectory>
<resources>
<resource>
<directory>src/main/bin</directory>
<includes>
<include>*.sh</include>
<include>*.bat</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
<execution>
<id>copy-dist-jar</id>
<phase>package</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<encoding>UTF-8</encoding>
<outputDirectory>${project.build.directory}/danger-manage-${project.version}/lib</outputDirectory>
<resources>
<resource>
<directory>target</directory>
<includes>
<include>*.jar</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
\ No newline at end of file
#!/bin/bash
cd `dirname $0`
cd ..
DEPLOY_DIR=`pwd`
CONF_DIR=$DEPLOY_DIR/conf
LOGS_DIR=$DEPLOY_DIR/logs
#部署需修改
APP_MAINCLASS=com.zehong.ProjectNameApplication
PIDS=`ps -ef | grep -v grep | grep "$CONF_DIR" |awk '{print $2}'`
if [ -n "$PIDS" ]; then
echo "ERROR: already started!"
echo "PID: $PIDS"
exit 1
fi
if [ ! -d $LOGS_DIR ]; then
mkdir $LOGS_DIR
fi
STDOUT_FILE=$LOGS_DIR/stdout.log
CLOG_FILE=$LOGS_DIR/gc.logli
#SYS_FILE=$LOGS_DIR/communication.log
LIB_DIR=$DEPLOY_DIR/lib
LIB_JARS=`ls $LIB_DIR|grep .jar|awk '{print "'$LIB_DIR'/"$0}'| xargs | sed "s/ /:/g"`
JAVA_OPTS=" -Djava.awt.headless=true"
JAVA_DEBUG_OPTS=""
if [ "$1" = "debug" ]; then
JAVA_DEBUG_OPTS=" -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n "
fi
JAVA_JMX_OPTS=""
if [ "$1" = "jmx" ]; then
JAVA_JMX_OPTS=" -Dcom.sun.management.jmxremote.port=1099 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false "
fi
JAVA_MEM_OPTS="-server -Xms2048M -Xmx2048M -Xmn1024M"
#JAVA_MEM_OPTS="-server -Xms5120M -Xmx5120M -Xmn1024M -Xnoclassgc -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled -XX:+CMSParallelRemarkEnabled -XX:CMSInitiatingOccupancyFraction=80 -XX:SoftRefLRUPolicyMSPerMB=0 -XX:+PrintClassHistogram -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintHeapAtGC -Xloggc:$CLOG_FILE"
echo -e "Starting the CommunicationApplication ...\c"
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$DEPLOY_DIR/libs/linux_64
nohup java -Dlog.path=$LOGS_DIR -Dapp.home=$DEPLOY_DIR $JAVA_OPTS $JAVA_MEM_OPTS $JAVA_DEBUG_OPTS $JAVA_JMX_OPTS -classpath $CONF_DIR:$LIB_JARS $APP_MAINCLASS &
sleep 1
echo "started"
PIDS=`ps -ef | grep java | grep "$DEPLOY_DIR" | awk '{print $2}'`
echo "PID: $PIDS"
#!/bin/bash
cd `dirname $0`
BIN_DIR=`pwd`
cd ..
DEPLOY_DIR=`pwd`
LOGS_DIR=$DEPLOY_DIR/logs
if [ ! -d $LOGS_DIR ]; then
mkdir $LOGS_DIR
fi
STDOUT_FILE=$LOGS_DIR/stdout.log
PID=`ps -ef | grep -v grep | grep "$DEPLOY_DIR/conf" | awk '{print $2}'`
echo "PID: $PID"
if [ -z "$PID" ]; then
echo "ERROR: The Application does not started!"
exit 1
fi
echo -e "Stopping the Application ...\c"
kill $PID > $STDOUT_FILE 2>&1
COUNT=0
while [ $COUNT -lt 1 ]; do
echo -e ".\c"
sleep 1
COUNT=1
PID_EXIST=`ps -f -p $PID | grep java`
if [ -n "$PID_EXIST" ]; then
COUNT=0
fi
done
echo "stopped"
echo "PID: $PID"
package com.zehong;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
/**
* 启动程序
*
* @author zehong
*/
@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class })
public class ProjectNameApplication
{
public static void main(String[] args)
{
// System.setProperty("spring.devtools.restart.enabled", "false");
SpringApplication.run(ProjectNameApplication.class, args);
System.out.println("(♥◠‿◠)ノ゙ 泽宏启动成功");
}
}
package com.zehong;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
/**
* web容器中进行部署
*
* @author zehong
*/
public class ProjectNameServletInitializer extends SpringBootServletInitializer
{
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application)
{
return application.sources(ProjectNameApplication.class);
}
}
package com.zehong.web.controller.common;
import java.awt.image.BufferedImage;
import java.io.IOException;
import java.util.concurrent.TimeUnit;
import javax.annotation.Resource;
import javax.imageio.ImageIO;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.util.FastByteArrayOutputStream;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import com.google.code.kaptcha.Producer;
import com.zehong.common.constant.Constants;
import com.zehong.common.core.domain.AjaxResult;
import com.zehong.common.core.redis.RedisCache;
import com.zehong.common.utils.sign.Base64;
import com.zehong.common.utils.uuid.IdUtils;
/**
* 验证码操作处理
*
* @author zehong
*/
@RestController
public class CaptchaController
{
@Resource(name = "captchaProducer")
private Producer captchaProducer;
@Resource(name = "captchaProducerMath")
private Producer captchaProducerMath;
@Autowired
private RedisCache redisCache;
// 验证码类型
@Value("${zehong.captchaType}")
private String captchaType;
/**
* 生成验证码
*/
@GetMapping("/captchaImage")
public AjaxResult getCode(HttpServletResponse response) throws IOException
{
// 保存验证码信息
String uuid = IdUtils.simpleUUID();
String verifyKey = Constants.CAPTCHA_CODE_KEY + uuid;
String capStr = null, code = null;
BufferedImage image = null;
// 生成验证码
if ("math".equals(captchaType))
{
String capText = captchaProducerMath.createText();
capStr = capText.substring(0, capText.lastIndexOf("@"));
code = capText.substring(capText.lastIndexOf("@") + 1);
image = captchaProducerMath.createImage(capStr);
}
else if ("char".equals(captchaType))
{
capStr = code = captchaProducer.createText();
image = captchaProducer.createImage(capStr);
}
redisCache.setCacheObject(verifyKey, code, Constants.CAPTCHA_EXPIRATION, TimeUnit.MINUTES);
// 转换流信息写出
FastByteArrayOutputStream os = new FastByteArrayOutputStream();
try
{
ImageIO.write(image, "jpg", os);
}
catch (IOException e)
{
return AjaxResult.error(e.getMessage());
}
AjaxResult ajax = AjaxResult.success();
ajax.put("uuid", uuid);
ajax.put("img", Base64.encode(os.toByteArray()));
return ajax;
}
}
package com.zehong.web.controller.common;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
import com.zehong.common.config.ProjectNameConfig;
import com.zehong.common.constant.Constants;
import com.zehong.common.core.domain.AjaxResult;
import com.zehong.common.utils.StringUtils;
import com.zehong.common.utils.file.FileUploadUtils;
import com.zehong.common.utils.file.FileUtils;
import com.zehong.framework.config.ServerConfig;
/**
* 通用请求处理
*
* @author zehong
*/
@RestController
public class CommonController
{
private static final Logger log = LoggerFactory.getLogger(CommonController.class);
@Autowired
private ServerConfig serverConfig;
/**
* 通用下载请求
*
* @param fileName 文件名称
* @param delete 是否删除
*/
@GetMapping("common/download")
public void fileDownload(String fileName, Boolean delete, HttpServletResponse response, HttpServletRequest request)
{
try
{
if (!FileUtils.checkAllowDownload(fileName))
{
throw new Exception(StringUtils.format("文件名称({})非法,不允许下载。 ", fileName));
}
String realFileName = System.currentTimeMillis() + fileName.substring(fileName.indexOf("_") + 1);
String filePath = ProjectNameConfig.getDownloadPath() + fileName;
response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE);
FileUtils.setAttachmentResponseHeader(response, realFileName);
FileUtils.writeBytes(filePath, response.getOutputStream());
if (delete)
{
FileUtils.deleteFile(filePath);
}
}
catch (Exception e)
{
log.error("下载文件失败", e);
}
}
/**
* 通用上传请求
*/
@PostMapping("/common/upload")
public AjaxResult uploadFile(MultipartFile file) throws Exception
{
try
{
// 上传文件路径
String filePath = ProjectNameConfig.getUploadPath();
// 上传并返回新文件名称
String fileName = file.getOriginalFilename();
String url = serverConfig.getUrl() + FileUploadUtils.upload(filePath, file);
AjaxResult ajax = AjaxResult.success();
ajax.put("fileName", fileName);
ajax.put("url", url);
return ajax;
}
catch (Exception e)
{
return AjaxResult.error(e.getMessage());
}
}
/**
* 本地资源通用下载
*/
@GetMapping("/common/download/resource")
public void resourceDownload(String resource, HttpServletRequest request, HttpServletResponse response)
throws Exception
{
try
{
if (!FileUtils.checkAllowDownload(resource))
{
throw new Exception(StringUtils.format("资源文件({})非法,不允许下载。 ", resource));
}
// 本地资源路径
String localPath = ProjectNameConfig.getProfile();
// 数据库资源地址
String downloadPath = localPath + StringUtils.substringAfter(resource, Constants.RESOURCE_PREFIX);
// 下载名称
String downloadName = StringUtils.substringAfterLast(downloadPath, "/");
response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE);
FileUtils.setAttachmentResponseHeader(response, downloadName);
FileUtils.writeBytes(downloadPath, response.getOutputStream());
}
catch (Exception e)
{
log.error("下载文件失败", e);
}
}
}
package com.zehong.web.controller.contractor;
import java.util.List;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.zehong.common.annotation.Log;
import com.zehong.common.core.controller.BaseController;
import com.zehong.common.core.domain.AjaxResult;
import com.zehong.common.enums.BusinessType;
import com.zehong.system.domain.TContractor;
import com.zehong.system.service.ITContractorService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 承包商信息Controller
*
* @author zehong
* @date 2022-06-29
*/
@RestController
@RequestMapping("/contractor/contractorInfo")
public class TContractorController extends BaseController
{
@Autowired
private ITContractorService tContractorService;
/**
* 查询承包商信息列表
*/
@PreAuthorize("@ss.hasPermi('contractor:contractorInfo:list')")
@GetMapping("/list")
public TableDataInfo list(TContractor tContractor)
{
startPage();
List<TContractor> list = tContractorService.selectTContractorList(tContractor);
return getDataTable(list);
}
/**
* 查询承包商信息树
*/
@GetMapping("/listAll")
public AjaxResult listAll(TContractor tContractor)
{
List<TContractor> list = tContractorService.selectTContractorList(tContractor);
return AjaxResult.success(list);
}
/**
* 导出承包商信息列表
*/
@Log(title = "承包商信息", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TContractor tContractor)
{
List<TContractor> list = tContractorService.selectTContractorList(tContractor);
ExcelUtil<TContractor> util = new ExcelUtil<TContractor>(TContractor.class);
return util.exportExcel(list, "承包商信息数据");
}
/**
* 获取承包商信息详细信息
*/
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(tContractorService.selectTContractorById(id));
}
/**
* 新增承包商信息
*/
@Log(title = "承包商信息", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TContractor tContractor)
{
return toAjax(tContractorService.insertTContractor(tContractor));
}
/**
* 修改承包商信息
*/
@Log(title = "承包商信息", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TContractor tContractor)
{
return toAjax(tContractorService.updateTContractor(tContractor));
}
/**
* 删除承包商信息
*/
@Log(title = "承包商信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(tContractorService.deleteTContractorByIds(ids));
}
}
package com.zehong.web.controller.contractor;
import java.util.List;
import com.zehong.system.domain.vo.TContractorPersonVo;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.zehong.common.annotation.Log;
import com.zehong.common.core.controller.BaseController;
import com.zehong.common.core.domain.AjaxResult;
import com.zehong.common.enums.BusinessType;
import com.zehong.system.domain.TContractorPerson;
import com.zehong.system.service.ITContractorPersonService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 承包商人员信息Controller
*
* @author zehong
* @date 2022-06-29
*/
@RestController
@RequestMapping("/contractor/contractorPerson")
public class TContractorPersonController extends BaseController
{
@Autowired
private ITContractorPersonService tContractorPersonService;
/**
* 查询承包商人员信息列表
*/
@PreAuthorize("@ss.hasPermi('contractor:contractorPerson:list')")
@GetMapping("/list")
public TableDataInfo list(TContractorPerson tContractorPerson)
{
startPage();
List<TContractorPersonVo> list = tContractorPersonService.selectTContractorPersonList(tContractorPerson);
return getDataTable(list);
}
/**
* 导出承包商人员信息列表
*/
@Log(title = "承包商人员信息", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TContractorPerson tContractorPerson)
{
List<TContractorPersonVo> list = tContractorPersonService.selectTContractorPersonList(tContractorPerson);
ExcelUtil<TContractorPersonVo> util = new ExcelUtil<TContractorPersonVo>(TContractorPersonVo.class);
return util.exportExcel(list, "承包商人员信息数据");
}
/**
* 获取承包商人员信息详细信息
*/
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(tContractorPersonService.selectTContractorPersonById(id));
}
/**
* 新增承包商人员信息
*/
@Log(title = "承包商人员信息", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TContractorPerson tContractorPerson)
{
return toAjax(tContractorPersonService.insertTContractorPerson(tContractorPerson));
}
/**
* 修改承包商人员信息
*/
@Log(title = "承包商人员信息", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TContractorPerson tContractorPerson)
{
return toAjax(tContractorPersonService.updateTContractorPerson(tContractorPerson));
}
/**
* 删除承包商人员信息
*/
@Log(title = "承包商人员信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(tContractorPersonService.deleteTContractorPersonByIds(ids));
}
}
package com.zehong.web.controller.deviceManagement;
import java.util.List;
import com.zehong.common.core.domain.model.LoginUser;
import com.zehong.common.utils.ServletUtils;
import com.zehong.framework.web.service.TokenService;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.zehong.common.annotation.Log;
import com.zehong.common.core.controller.BaseController;
import com.zehong.common.core.domain.AjaxResult;
import com.zehong.common.enums.BusinessType;
import com.zehong.system.domain.TDeviceInfo;
import com.zehong.system.service.ITDeviceInfoService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
import org.springframework.web.multipart.MultipartFile;
/**
* 设备信息管理Controller
*
* @author zehong
* @date 2022-07-02
*/
@RestController
@RequestMapping("/deviceManagement/deviceInfo")
public class TDeviceInfoController extends BaseController
{
@Autowired
private ITDeviceInfoService tDeviceInfoService;
@Autowired
private TokenService tokenService;
/**
* 查询设备信息管理列表
*/
@PreAuthorize("@ss.hasPermi('deviceManagement:deviceInfo:list')")
@GetMapping("/list")
public TableDataInfo list(TDeviceInfo tDeviceInfo)
{
startPage();
List<TDeviceInfo> list = tDeviceInfoService.selectTDeviceInfoList(tDeviceInfo);
return getDataTable(list);
}
/**
* 查询特种设备列表
*/
@GetMapping("/listSpecial")
public AjaxResult listSpecial(TDeviceInfo tDeviceInfo)
{
tDeviceInfo.setIsSpecial("1");
List<TDeviceInfo> list = tDeviceInfoService.selectTDeviceInfoList(tDeviceInfo);
return AjaxResult.success(list);
}
/**
* 导出设备信息管理列表
*/
@Log(title = "设备信息管理", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TDeviceInfo tDeviceInfo)
{
List<TDeviceInfo> list = tDeviceInfoService.selectTDeviceInfoList(tDeviceInfo);
ExcelUtil<TDeviceInfo> util = new ExcelUtil<TDeviceInfo>(TDeviceInfo.class);
return util.exportExcel(list, "设备信息管理数据");
}
/**
* 导入设备信息管理列表
*/
@Log(title = "设备信息管理", businessType = BusinessType.IMPORT)
@PostMapping("/import")
public AjaxResult importDevice(MultipartFile file, boolean updateSupport) throws Exception
{
ExcelUtil<TDeviceInfo> util = new ExcelUtil<TDeviceInfo>(TDeviceInfo.class);
List<TDeviceInfo> userList = util.importExcel(file.getInputStream());
String message = tDeviceInfoService.importDevice(userList, updateSupport);
return AjaxResult.success(message);
}
@GetMapping("/importTemplate")
public AjaxResult importTemplate()
{
ExcelUtil<TDeviceInfo> util = new ExcelUtil<TDeviceInfo>(TDeviceInfo.class);
return util.importTemplateExcel("设备数据");
}
/**
* 获取设备信息管理详细信息
*/
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(tDeviceInfoService.selectTDeviceInfoById(id));
}
/**
* 新增设备信息管理
*/
@Log(title = "设备信息管理", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TDeviceInfo tDeviceInfo)
{
return toAjax(tDeviceInfoService.insertTDeviceInfo(tDeviceInfo));
}
/**
* 修改设备信息管理
*/
@Log(title = "设备信息管理", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TDeviceInfo tDeviceInfo)
{
return toAjax(tDeviceInfoService.updateTDeviceInfo(tDeviceInfo));
}
/**
* 删除设备信息管理
*/
@Log(title = "设备信息管理", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(tDeviceInfoService.deleteTDeviceInfoByIds(ids));
}
}
package com.zehong.web.controller.deviceManagement;
import java.util.List;
import com.zehong.system.domain.vo.TMaintainPlanVo;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.zehong.common.annotation.Log;
import com.zehong.common.core.controller.BaseController;
import com.zehong.common.core.domain.AjaxResult;
import com.zehong.common.enums.BusinessType;
import com.zehong.system.domain.TMaintainPlan;
import com.zehong.system.service.ITMaintainPlanService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 设备保养计划Controller
*
* @author zehong
* @date 2022-07-04
*/
@RestController
@RequestMapping("/deviceManagement/maintainPlan")
public class TMaintainPlanController extends BaseController
{
@Autowired
private ITMaintainPlanService tMaintainPlanService;
/**
* 查询设备保养计划列表
*/
@PreAuthorize("@ss.hasPermi('deviceManagement:maintainPlan:list')")
@GetMapping("/list")
public TableDataInfo list(TMaintainPlan tMaintainPlan)
{
startPage();
List<TMaintainPlanVo> list = tMaintainPlanService.selectTMaintainPlanList(tMaintainPlan);
return getDataTable(list);
}
/**
* 导出设备保养计划列表
*/
@Log(title = "设备保养计划", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TMaintainPlan tMaintainPlan)
{
List<TMaintainPlanVo> list = tMaintainPlanService.selectTMaintainPlanList(tMaintainPlan);
ExcelUtil<TMaintainPlanVo> util = new ExcelUtil<TMaintainPlanVo>(TMaintainPlanVo.class);
return util.exportExcel(list, "设备保养计划数据");
}
/**
* 获取设备保养计划详细信息
*/
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(tMaintainPlanService.selectTMaintainPlanById(id));
}
/**
* 新增设备保养计划
*/
@Log(title = "设备保养计划", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TMaintainPlan tMaintainPlan)
{
return toAjax(tMaintainPlanService.insertTMaintainPlan(tMaintainPlan));
}
/**
* 修改设备保养计划
*/
@Log(title = "设备保养计划", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TMaintainPlan tMaintainPlan)
{
return toAjax(tMaintainPlanService.updateTMaintainPlan(tMaintainPlan));
}
/**
* 删除设备保养计划
*/
@Log(title = "设备保养计划", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(tMaintainPlanService.deleteTMaintainPlanByIds(ids));
}
}
package com.zehong.web.controller.deviceManagement;
import java.util.List;
import com.zehong.system.domain.vo.TRepairOrderVo;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.zehong.common.annotation.Log;
import com.zehong.common.core.controller.BaseController;
import com.zehong.common.core.domain.AjaxResult;
import com.zehong.common.enums.BusinessType;
import com.zehong.system.domain.TRepairOrder;
import com.zehong.system.service.ITRepairOrderService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 设备维修工单Controller
*
* @author zehong
* @date 2022-07-04
*/
@RestController
@RequestMapping("/deviceManagement/repairOrder")
public class TRepairOrderController extends BaseController
{
@Autowired
private ITRepairOrderService tRepairOrderService;
/**
* 查询设备维修工单列表
*/
@PreAuthorize("@ss.hasPermi('deviceManagement:repairOrder:list')")
@GetMapping("/list")
public TableDataInfo list(TRepairOrder tRepairOrder)
{
startPage();
List<TRepairOrderVo> list = tRepairOrderService.selectTRepairOrderList(tRepairOrder);
return getDataTable(list);
}
/**
* 导出设备维修工单列表
*/
@Log(title = "设备维修工单", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TRepairOrder tRepairOrder)
{
List<TRepairOrderVo> list = tRepairOrderService.selectTRepairOrderList(tRepairOrder);
ExcelUtil<TRepairOrderVo> util = new ExcelUtil<TRepairOrderVo>(TRepairOrderVo.class);
return util.exportExcel(list, "设备维修工单数据");
}
/**
* 获取设备维修工单详细信息
*/
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(tRepairOrderService.selectTRepairOrderById(id));
}
/**
* 新增设备维修工单
*/
@Log(title = "设备维修工单", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TRepairOrder tRepairOrder)
{
return toAjax(tRepairOrderService.insertTRepairOrder(tRepairOrder));
}
/**
* 修改设备维修工单
*/
@Log(title = "设备维修工单", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TRepairOrder tRepairOrder)
{
return toAjax(tRepairOrderService.updateTRepairOrder(tRepairOrder));
}
/**
* 删除设备维修工单
*/
@Log(title = "设备维修工单", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(tRepairOrderService.deleteTRepairOrderByIds(ids));
}
}
package com.zehong.web.controller.deviceManagement;
import java.util.List;
import com.zehong.system.domain.vo.TSpecialDeviceRecordVo;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.zehong.common.annotation.Log;
import com.zehong.common.core.controller.BaseController;
import com.zehong.common.core.domain.AjaxResult;
import com.zehong.common.enums.BusinessType;
import com.zehong.system.domain.TSpecialDeviceRecord;
import com.zehong.system.service.ITSpecialDeviceRecordService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 特种设备台账Controller
*
* @author zehong
* @date 2022-07-02
*/
@RestController
@RequestMapping("/deviceManagement/specialDeviceRecord")
public class TSpecialDeviceRecordController extends BaseController
{
@Autowired
private ITSpecialDeviceRecordService tSpecialDeviceRecordService;
/**
* 查询特种设备台账列表
*/
@PreAuthorize("@ss.hasPermi('deviceManagement:specialDeviceRecord:list')")
@GetMapping("/list")
public TableDataInfo list(TSpecialDeviceRecord tSpecialDeviceRecord)
{
startPage();
List<TSpecialDeviceRecordVo> list = tSpecialDeviceRecordService.selectTSpecialDeviceRecordList(tSpecialDeviceRecord);
return getDataTable(list);
}
/**
* 导出特种设备台账列表
*/
@Log(title = "特种设备台账", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TSpecialDeviceRecord tSpecialDeviceRecord)
{
List<TSpecialDeviceRecordVo> list = tSpecialDeviceRecordService.selectTSpecialDeviceRecordList(tSpecialDeviceRecord);
ExcelUtil<TSpecialDeviceRecordVo> util = new ExcelUtil<TSpecialDeviceRecordVo>(TSpecialDeviceRecordVo.class);
return util.exportExcel(list, "特种设备台账数据");
}
/**
* 获取特种设备台账详细信息
*/
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(tSpecialDeviceRecordService.selectTSpecialDeviceRecordById(id));
}
/**
* 新增特种设备台账
*/
@Log(title = "特种设备台账", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TSpecialDeviceRecord tSpecialDeviceRecord)
{
return toAjax(tSpecialDeviceRecordService.insertTSpecialDeviceRecord(tSpecialDeviceRecord));
}
/**
* 修改特种设备台账
*/
@Log(title = "特种设备台账", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TSpecialDeviceRecord tSpecialDeviceRecord)
{
return toAjax(tSpecialDeviceRecordService.updateTSpecialDeviceRecord(tSpecialDeviceRecord));
}
/**
* 删除特种设备台账
*/
@Log(title = "特种设备台账", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(tSpecialDeviceRecordService.deleteTSpecialDeviceRecordByIds(ids));
}
}
package com.zehong.web.controller.emergency;
import java.util.List;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.zehong.common.annotation.Log;
import com.zehong.common.core.controller.BaseController;
import com.zehong.common.core.domain.AjaxResult;
import com.zehong.common.enums.BusinessType;
import com.zehong.system.domain.TEmergencyCrew;
import com.zehong.system.service.ITEmergencyCrewService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 应急通讯人员管理Controller
*
* @author zehong
* @date 2022-06-29
*/
@RestController
@RequestMapping("/emergency/crew")
public class TEmergencyCrewController extends BaseController
{
@Autowired
private ITEmergencyCrewService tEmergencyCrewService;
/**
* 查询应急通讯人员管理列表
*/
@GetMapping("/list")
public TableDataInfo list(TEmergencyCrew tEmergencyCrew)
{
startPage();
List<TEmergencyCrew> list = tEmergencyCrewService.selectTEmergencyCrewList(tEmergencyCrew);
return getDataTable(list);
}
/**
* 导出应急通讯人员管理列表
*/
@Log(title = "应急通讯人员管理", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TEmergencyCrew tEmergencyCrew)
{
List<TEmergencyCrew> list = tEmergencyCrewService.selectTEmergencyCrewList(tEmergencyCrew);
ExcelUtil<TEmergencyCrew> util = new ExcelUtil<TEmergencyCrew>(TEmergencyCrew.class);
return util.exportExcel(list, "应急通讯人员管理数据");
}
/**
* 获取应急通讯人员管理详细信息
*/
@GetMapping(value = "/{communicationId}")
public AjaxResult getInfo(@PathVariable("communicationId") Long communicationId)
{
return AjaxResult.success(tEmergencyCrewService.selectTEmergencyCrewById(communicationId));
}
/**
* 新增应急通讯人员管理
*/
@Log(title = "应急通讯人员管理", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TEmergencyCrew tEmergencyCrew)
{
return toAjax(tEmergencyCrewService.insertTEmergencyCrew(tEmergencyCrew));
}
/**
* 修改应急通讯人员管理
*/
@Log(title = "应急通讯人员管理", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TEmergencyCrew tEmergencyCrew)
{
return toAjax(tEmergencyCrewService.updateTEmergencyCrew(tEmergencyCrew));
}
/**
* 删除应急通讯人员管理
*/
@Log(title = "应急通讯人员管理", businessType = BusinessType.DELETE)
@DeleteMapping("/{communicationIds}")
public AjaxResult remove(@PathVariable Long[] communicationIds)
{
return toAjax(tEmergencyCrewService.deleteTEmergencyCrewByIds(communicationIds));
}
}
package com.zehong.web.controller.hiddenDanger;
import java.util.List;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.zehong.common.annotation.Log;
import com.zehong.common.core.controller.BaseController;
import com.zehong.common.core.domain.AjaxResult;
import com.zehong.common.enums.BusinessType;
import com.zehong.system.domain.THiddenLibrary;
import com.zehong.system.service.ITHiddenLibraryService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 隐患排查库Controller
*
* @author zehong
* @date 2022-07-13
*/
@RestController
@RequestMapping("/system/library")
public class THiddenLibraryController extends BaseController
{
@Autowired
private ITHiddenLibraryService tHiddenLibraryService;
/**
* 查询隐患排查库列表
*/
@PreAuthorize("@ss.hasPermi('system:library:list')")
@GetMapping("/list")
public TableDataInfo list(THiddenLibrary tHiddenLibrary)
{
startPage();
List<THiddenLibrary> list = tHiddenLibraryService.selectTHiddenLibraryList(tHiddenLibrary);
return getDataTable(list);
}
/**
* 导出隐患排查库列表
*/
@PreAuthorize("@ss.hasPermi('system:library:export')")
@Log(title = "隐患排查库", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(THiddenLibrary tHiddenLibrary)
{
List<THiddenLibrary> list = tHiddenLibraryService.selectTHiddenLibraryList(tHiddenLibrary);
ExcelUtil<THiddenLibrary> util = new ExcelUtil<THiddenLibrary>(THiddenLibrary.class);
return util.exportExcel(list, "隐患排查库数据");
}
/**
* 获取隐患排查库详细信息
*/
@PreAuthorize("@ss.hasPermi('system:library:query')")
@GetMapping(value = "/{libraryId}")
public AjaxResult getInfo(@PathVariable("libraryId") Long libraryId)
{
return AjaxResult.success(tHiddenLibraryService.selectTHiddenLibraryById(libraryId));
}
/**
* 新增隐患排查库
*/
@PreAuthorize("@ss.hasPermi('system:library:add')")
@Log(title = "隐患排查库", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody THiddenLibrary tHiddenLibrary)
{
return toAjax(tHiddenLibraryService.insertTHiddenLibrary(tHiddenLibrary));
}
/**
* 修改隐患排查库
*/
@PreAuthorize("@ss.hasPermi('system:library:edit')")
@Log(title = "隐患排查库", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody THiddenLibrary tHiddenLibrary)
{
return toAjax(tHiddenLibraryService.updateTHiddenLibrary(tHiddenLibrary));
}
/**
* 删除隐患排查库
*/
@PreAuthorize("@ss.hasPermi('system:library:remove')")
@Log(title = "隐患排查库", businessType = BusinessType.DELETE)
@DeleteMapping("/{libraryIds}")
public AjaxResult remove(@PathVariable Long[] libraryIds)
{
return toAjax(tHiddenLibraryService.deleteTHiddenLibraryByIds(libraryIds));
}
}
package com.zehong.web.controller.hiddenDanger;
import java.util.List;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.zehong.common.annotation.Log;
import com.zehong.common.core.controller.BaseController;
import com.zehong.common.core.domain.AjaxResult;
import com.zehong.common.enums.BusinessType;
import com.zehong.system.domain.THiddenTroubleAssessment;
import com.zehong.system.service.ITHiddenTroubleAssessmentService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 排查评估Controller
*
* @author zehong
* @date 2022-07-12
*/
@RestController
@RequestMapping("/system/assessment")
public class THiddenTroubleAssessmentController extends BaseController
{
@Autowired
private ITHiddenTroubleAssessmentService tHiddenTroubleAssessmentService;
/**
* 查询排查评估列表
*/
//@PreAuthorize("@ss.hasPermi('system:assessment:list')")
@GetMapping("/list")
public TableDataInfo list(THiddenTroubleAssessment tHiddenTroubleAssessment)
{
startPage();
List<THiddenTroubleAssessment> list = tHiddenTroubleAssessmentService.selectTHiddenTroubleAssessmentList(tHiddenTroubleAssessment);
return getDataTable(list);
}
/**
* 导出排查评估列表
*/
//@PreAuthorize("@ss.hasPermi('system:assessment:export')")
@Log(title = "排查评估", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(THiddenTroubleAssessment tHiddenTroubleAssessment)
{
List<THiddenTroubleAssessment> list = tHiddenTroubleAssessmentService.selectTHiddenTroubleAssessmentList(tHiddenTroubleAssessment);
ExcelUtil<THiddenTroubleAssessment> util = new ExcelUtil<THiddenTroubleAssessment>(THiddenTroubleAssessment.class);
return util.exportExcel(list, "排查评估数据");
}
/**
* 获取排查评估详细信息
*/
//@PreAuthorize("@ss.hasPermi('system:assessment:query')")
@GetMapping(value = "/{assessmentId}")
public AjaxResult getInfo(@PathVariable("assessmentId") Long assessmentId)
{
return AjaxResult.success(tHiddenTroubleAssessmentService.selectTHiddenTroubleAssessmentById(assessmentId));
}
@GetMapping(value = "/workId/{workId}")
public AjaxResult getAssessmentWorkId(@PathVariable("workId") Long workId)
{
return AjaxResult.success(tHiddenTroubleAssessmentService.selectTHiddenTroubleAssessmentByWorkId(workId));
}
/**
* 新增排查评估
*/
//@PreAuthorize("@ss.hasPermi('system:assessment:add')")
@Log(title = "排查评估", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody THiddenTroubleAssessment tHiddenTroubleAssessment)
{
return toAjax(tHiddenTroubleAssessmentService.insertTHiddenTroubleAssessment(tHiddenTroubleAssessment));
}
/**
* 修改排查评估
*/
//@PreAuthorize("@ss.hasPermi('system:assessment:edit')")
@Log(title = "排查评估", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody THiddenTroubleAssessment tHiddenTroubleAssessment)
{
return toAjax(tHiddenTroubleAssessmentService.updateTHiddenTroubleAssessment(tHiddenTroubleAssessment));
}
/**
* 删除排查评估
*/
//@PreAuthorize("@ss.hasPermi('system:assessment:remove')")
@Log(title = "排查评估", businessType = BusinessType.DELETE)
@DeleteMapping("/{assessmentIds}")
public AjaxResult remove(@PathVariable Long[] assessmentIds)
{
return toAjax(tHiddenTroubleAssessmentService.deleteTHiddenTroubleAssessmentByIds(assessmentIds));
}
}
package com.zehong.web.controller.hiddenDanger;
import java.util.List;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.zehong.common.annotation.Log;
import com.zehong.common.core.controller.BaseController;
import com.zehong.common.core.domain.AjaxResult;
import com.zehong.common.enums.BusinessType;
import com.zehong.system.domain.THiddenTroubleWork;
import com.zehong.system.service.ITHiddenTroubleWorkService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 隐患排查任务Controller
*
* @author zehong
* @date 2022-07-11
*/
@RestController
@RequestMapping("/system/workCheck")
public class THiddenTroubleWorkController extends BaseController
{
@Autowired
private ITHiddenTroubleWorkService tHiddenTroubleWorkService;
/**
* 查询隐患排查任务列表
*/
@PreAuthorize("@ss.hasPermi('system:workCheck:list')")
@GetMapping("/list")
public TableDataInfo list(THiddenTroubleWork tHiddenTroubleWork)
{
startPage();
List<THiddenTroubleWork> list = tHiddenTroubleWorkService.selectTHiddenTroubleWorkList(tHiddenTroubleWork);
return getDataTable(list);
}
/**
* 导出隐患排查任务列表
*/
@PreAuthorize("@ss.hasPermi('system:workCheck:export')")
@Log(title = "隐患排查任务", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(THiddenTroubleWork tHiddenTroubleWork)
{
List<THiddenTroubleWork> list = tHiddenTroubleWorkService.selectTHiddenTroubleWorkList(tHiddenTroubleWork);
ExcelUtil<THiddenTroubleWork> util = new ExcelUtil<THiddenTroubleWork>(THiddenTroubleWork.class);
return util.exportExcel(list, "隐患排查任务数据");
}
/**
* 获取隐患排查任务详细信息
*/
@PreAuthorize("@ss.hasPermi('system:workCheck:query')")
@GetMapping(value = "/{workId}")
public AjaxResult getInfo(@PathVariable("workId") Long workId)
{
return AjaxResult.success(tHiddenTroubleWorkService.selectTHiddenTroubleWorkById(workId));
}
/**
* 新增隐患排查任务
*/
@PreAuthorize("@ss.hasPermi('system:workCheck:add')")
@Log(title = "隐患排查任务", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody THiddenTroubleWork tHiddenTroubleWork)
{
int a = tHiddenTroubleWorkService.insertTHiddenTroubleWork(tHiddenTroubleWork);
if(a==-2){
return AjaxResult.error("任务进行中不可重复创建");
}
return toAjax(a);
}
/**
* 修改隐患排查任务
*/
@PreAuthorize("@ss.hasPermi('system:workCheck:edit')")
@Log(title = "隐患排查任务", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody THiddenTroubleWork tHiddenTroubleWork)
{
return toAjax(tHiddenTroubleWorkService.updateTHiddenTroubleWork(tHiddenTroubleWork));
}
/**
* 删除隐患排查任务
*/
@PreAuthorize("@ss.hasPermi('system:workCheck:remove')")
@Log(title = "隐患排查任务", businessType = BusinessType.DELETE)
@DeleteMapping("/{workIds}")
public AjaxResult remove(@PathVariable Long[] workIds)
{
return toAjax(tHiddenTroubleWorkService.deleteTHiddenTroubleWorkByIds(workIds));
}
}
package com.zehong.web.controller.hiddenDanger;
import java.util.List;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.zehong.common.annotation.Log;
import com.zehong.common.core.controller.BaseController;
import com.zehong.common.core.domain.AjaxResult;
import com.zehong.common.enums.BusinessType;
import com.zehong.system.domain.TStaningBook;
import com.zehong.system.service.ITStaningBookService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 隐患台账Controller
*
* @author zehong
* @date 2022-07-09
*/
@RestController
@RequestMapping("/system/book")
public class TStaningBookController extends BaseController
{
@Autowired
private ITStaningBookService tStaningBookService;
/**
* 查询隐患台账列表
*/
@PreAuthorize("@ss.hasPermi('system:book:list')")
@GetMapping("/list")
public TableDataInfo list(TStaningBook tStaningBook)
{
startPage();
List<TStaningBook> list = tStaningBookService.selectTStaningBookList(tStaningBook);
return getDataTable(list);
}
/**
* 导出隐患台账列表
*/
@PreAuthorize("@ss.hasPermi('system:book:export')")
@Log(title = "隐患台账", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TStaningBook tStaningBook)
{
List<TStaningBook> list = tStaningBookService.selectTStaningBookList(tStaningBook);
ExcelUtil<TStaningBook> util = new ExcelUtil<TStaningBook>(TStaningBook.class);
return util.exportExcel(list, "隐患台账数据");
}
/**
* 获取隐患台账详细信息
*/
@PreAuthorize("@ss.hasPermi('system:book:query')")
@GetMapping(value = "/{bookId}")
public AjaxResult getInfo(@PathVariable("bookId") Long bookId)
{
return AjaxResult.success(tStaningBookService.selectTStaningBookById(bookId));
}
/**
* 新增隐患台账
*/
@PreAuthorize("@ss.hasPermi('system:book:add')")
@Log(title = "隐患台账", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TStaningBook tStaningBook)
{
return toAjax(tStaningBookService.insertTStaningBook(tStaningBook));
}
/**
* 修改隐患台账
*/
@PreAuthorize("@ss.hasPermi('system:book:edit')")
@Log(title = "隐患台账", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TStaningBook tStaningBook)
{
return toAjax(tStaningBookService.updateTStaningBook(tStaningBook));
}
/**
* 删除隐患台账
*/
@PreAuthorize("@ss.hasPermi('system:book:remove')")
@Log(title = "隐患台账", businessType = BusinessType.DELETE)
@DeleteMapping("/{bookIds}")
public AjaxResult remove(@PathVariable Long[] bookIds)
{
return toAjax(tStaningBookService.deleteTStaningBookByIds(bookIds));
}
}
package com.zehong.web.controller.monitor;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisCallback;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.zehong.common.core.domain.AjaxResult;
import com.zehong.common.utils.StringUtils;
/**
* 缓存监控
*
* @author zehong
*/
@RestController
@RequestMapping("/monitor/cache")
public class CacheController
{
@Autowired
private RedisTemplate<String, String> redisTemplate;
@PreAuthorize("@ss.hasPermi('monitor:cache:list')")
@GetMapping()
public AjaxResult getInfo() throws Exception
{
Properties info = (Properties) redisTemplate.execute((RedisCallback<Object>) connection -> connection.info());
Properties commandStats = (Properties) redisTemplate.execute((RedisCallback<Object>) connection -> connection.info("commandstats"));
Object dbSize = redisTemplate.execute((RedisCallback<Object>) connection -> connection.dbSize());
Map<String, Object> result = new HashMap<>(3);
result.put("info", info);
result.put("dbSize", dbSize);
List<Map<String, String>> pieList = new ArrayList<>();
commandStats.stringPropertyNames().forEach(key -> {
Map<String, String> data = new HashMap<>(2);
String property = commandStats.getProperty(key);
data.put("name", StringUtils.removeStart(key, "cmdstat_"));
data.put("value", StringUtils.substringBetween(property, "calls=", ",usec"));
pieList.add(data);
});
result.put("commandStats", pieList);
return AjaxResult.success(result);
}
}
package com.zehong.web.controller.monitor;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.zehong.common.core.domain.AjaxResult;
import com.zehong.framework.web.domain.Server;
/**
* 服务器监控
*
* @author zehong
*/
@RestController
@RequestMapping("/monitor/server")
public class ServerController
{
@PreAuthorize("@ss.hasPermi('monitor:server:list')")
@GetMapping()
public AjaxResult getInfo() throws Exception
{
Server server = new Server();
server.copyTo();
return AjaxResult.success(server);
}
}
package com.zehong.web.controller.monitor;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.zehong.common.annotation.Log;
import com.zehong.common.core.controller.BaseController;
import com.zehong.common.core.domain.AjaxResult;
import com.zehong.common.core.page.TableDataInfo;
import com.zehong.common.enums.BusinessType;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.system.domain.SysLogininfor;
import com.zehong.system.service.ISysLogininforService;
/**
* 系统访问记录
*
* @author zehong
*/
@RestController
@RequestMapping("/monitor/logininfor")
public class SysLogininforController extends BaseController
{
@Autowired
private ISysLogininforService logininforService;
@PreAuthorize("@ss.hasPermi('monitor:logininfor:list')")
@GetMapping("/list")
public TableDataInfo list(SysLogininfor logininfor)
{
startPage();
List<SysLogininfor> list = logininforService.selectLogininforList(logininfor);
return getDataTable(list);
}
@Log(title = "登录日志", businessType = BusinessType.EXPORT)
@PreAuthorize("@ss.hasPermi('monitor:logininfor:export')")
@GetMapping("/export")
public AjaxResult export(SysLogininfor logininfor)
{
List<SysLogininfor> list = logininforService.selectLogininforList(logininfor);
ExcelUtil<SysLogininfor> util = new ExcelUtil<SysLogininfor>(SysLogininfor.class);
return util.exportExcel(list, "登录日志");
}
@PreAuthorize("@ss.hasPermi('monitor:logininfor:remove')")
@Log(title = "登录日志", businessType = BusinessType.DELETE)
@DeleteMapping("/{infoIds}")
public AjaxResult remove(@PathVariable Long[] infoIds)
{
return toAjax(logininforService.deleteLogininforByIds(infoIds));
}
@PreAuthorize("@ss.hasPermi('monitor:logininfor:remove')")
@Log(title = "登录日志", businessType = BusinessType.CLEAN)
@DeleteMapping("/clean")
public AjaxResult clean()
{
logininforService.cleanLogininfor();
return AjaxResult.success();
}
}
package com.zehong.web.controller.monitor;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.zehong.common.annotation.Log;
import com.zehong.common.core.controller.BaseController;
import com.zehong.common.core.domain.AjaxResult;
import com.zehong.common.core.page.TableDataInfo;
import com.zehong.common.enums.BusinessType;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.system.domain.SysOperLog;
import com.zehong.system.service.ISysOperLogService;
/**
* 操作日志记录
*
* @author zehong
*/
@RestController
@RequestMapping("/monitor/operlog")
public class SysOperlogController extends BaseController
{
@Autowired
private ISysOperLogService operLogService;
@PreAuthorize("@ss.hasPermi('monitor:operlog:list')")
@GetMapping("/list")
public TableDataInfo list(SysOperLog operLog)
{
startPage();
List<SysOperLog> list = operLogService.selectOperLogList(operLog);
return getDataTable(list);
}
@Log(title = "操作日志", businessType = BusinessType.EXPORT)
@PreAuthorize("@ss.hasPermi('monitor:operlog:export')")
@GetMapping("/export")
public AjaxResult export(SysOperLog operLog)
{
List<SysOperLog> list = operLogService.selectOperLogList(operLog);
ExcelUtil<SysOperLog> util = new ExcelUtil<SysOperLog>(SysOperLog.class);
return util.exportExcel(list, "操作日志");
}
@Log(title = "操作日志", businessType = BusinessType.DELETE)
@PreAuthorize("@ss.hasPermi('monitor:operlog:remove')")
@DeleteMapping("/{operIds}")
public AjaxResult remove(@PathVariable Long[] operIds)
{
return toAjax(operLogService.deleteOperLogByIds(operIds));
}
@Log(title = "操作日志", businessType = BusinessType.CLEAN)
@PreAuthorize("@ss.hasPermi('monitor:operlog:remove')")
@DeleteMapping("/clean")
public AjaxResult clean()
{
operLogService.cleanOperLog();
return AjaxResult.success();
}
}
package com.zehong.web.controller.monitor;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.zehong.common.annotation.Log;
import com.zehong.common.constant.Constants;
import com.zehong.common.core.controller.BaseController;
import com.zehong.common.core.domain.AjaxResult;
import com.zehong.common.core.domain.model.LoginUser;
import com.zehong.common.core.page.TableDataInfo;
import com.zehong.common.core.redis.RedisCache;
import com.zehong.common.enums.BusinessType;
import com.zehong.common.utils.StringUtils;
import com.zehong.system.domain.SysUserOnline;
import com.zehong.system.service.ISysUserOnlineService;
/**
* 在线用户监控
*
* @author zehong
*/
@RestController
@RequestMapping("/monitor/online")
public class SysUserOnlineController extends BaseController
{
@Autowired
private ISysUserOnlineService userOnlineService;
@Autowired
private RedisCache redisCache;
@PreAuthorize("@ss.hasPermi('monitor:online:list')")
@GetMapping("/list")
public TableDataInfo list(String ipaddr, String userName)
{
Collection<String> keys = redisCache.keys(Constants.LOGIN_TOKEN_KEY + "*");
List<SysUserOnline> userOnlineList = new ArrayList<SysUserOnline>();
for (String key : keys)
{
LoginUser user = redisCache.getCacheObject(key);
if (StringUtils.isNotEmpty(ipaddr) && StringUtils.isNotEmpty(userName))
{
if (StringUtils.equals(ipaddr, user.getIpaddr()) && StringUtils.equals(userName, user.getUsername()))
{
userOnlineList.add(userOnlineService.selectOnlineByInfo(ipaddr, userName, user));
}
}
else if (StringUtils.isNotEmpty(ipaddr))
{
if (StringUtils.equals(ipaddr, user.getIpaddr()))
{
userOnlineList.add(userOnlineService.selectOnlineByIpaddr(ipaddr, user));
}
}
else if (StringUtils.isNotEmpty(userName) && StringUtils.isNotNull(user.getUser()))
{
if (StringUtils.equals(userName, user.getUsername()))
{
userOnlineList.add(userOnlineService.selectOnlineByUserName(userName, user));
}
}
else
{
userOnlineList.add(userOnlineService.loginUserToUserOnline(user));
}
}
Collections.reverse(userOnlineList);
userOnlineList.removeAll(Collections.singleton(null));
return getDataTable(userOnlineList);
}
/**
* 强退用户
*/
@PreAuthorize("@ss.hasPermi('monitor:online:forceLogout')")
@Log(title = "在线用户", businessType = BusinessType.FORCE)
@DeleteMapping("/{tokenId}")
public AjaxResult forceLogout(@PathVariable String tokenId)
{
redisCache.deleteObject(Constants.LOGIN_TOKEN_KEY + tokenId);
return AjaxResult.success();
}
}
package com.zehong.web.controller.patrol;
import java.util.List;
import com.zehong.common.core.domain.model.LoginUser;
import com.zehong.common.utils.ServletUtils;
import com.zehong.framework.web.service.TokenService;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.zehong.common.annotation.Log;
import com.zehong.common.core.controller.BaseController;
import com.zehong.common.core.domain.AjaxResult;
import com.zehong.common.enums.BusinessType;
import com.zehong.system.domain.TInspectWorkInfo;
import com.zehong.system.service.ITInspectWorkInfoService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
import javax.servlet.http.HttpServletRequest;
/**
* 巡检任务信息Controller
*
* @author zehong
* @date 2022-06-20
*/
@RestController
@RequestMapping("/system/workinfo")
public class TInspectWorkInfoController extends BaseController
{
@Autowired
private ITInspectWorkInfoService tInspectWorkInfoService;
@Autowired
private TokenService tokenService;
/**
* 查询巡检任务信息列表
*/
@PreAuthorize("@ss.hasPermi('system:workinfo:list')")
@GetMapping("/list")
public TableDataInfo list(TInspectWorkInfo tInspectWorkInfo)
{
startPage();
List<TInspectWorkInfo> list = tInspectWorkInfoService.selectTInspectWorkInfoList(tInspectWorkInfo);
return getDataTable(list);
}
@GetMapping("/listTwo")
public TableDataInfo listTwo(TInspectWorkInfo tInspectWorkInfo)
{
startPage();
List<TInspectWorkInfo> list = tInspectWorkInfoService.selectTInspectWorkInfoListChildren(tInspectWorkInfo);
return getDataTable(list);
}
/**
* 个人巡检任务查询
* @return
*/
@GetMapping("/taskList")
public TableDataInfo taskList(HttpServletRequest request)
{
LoginUser loginUser = tokenService.getLoginUser(request);
Long deptId = loginUser.getUser().getDeptId();
startPage();
List<TInspectWorkInfo> list = tInspectWorkInfoService.taskList(deptId);
return getDataTable(list);
}
/**
* 导出巡检任务信息列表
*/
@PreAuthorize("@ss.hasPermi('system:workinfo:export')")
@Log(title = "巡检任务信息", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TInspectWorkInfo tInspectWorkInfo)
{
List<TInspectWorkInfo> list = tInspectWorkInfoService.selectTInspectWorkInfoList(tInspectWorkInfo);
ExcelUtil<TInspectWorkInfo> util = new ExcelUtil<TInspectWorkInfo>(TInspectWorkInfo.class);
return util.exportExcel(list, "巡检任务信息数据");
}
/**
* 获取巡检任务信息详细信息
*/
@PreAuthorize("@ss.hasPermi('system:workinfo:query')")
@GetMapping(value = "/{workId}")
public AjaxResult getInfo(@PathVariable("workId") Long workId)
{
return AjaxResult.success(tInspectWorkInfoService.selectTInspectWorkInfoById(workId));
}
/**
* 新增巡检任务信息
*/
@PreAuthorize("@ss.hasPermi('system:workinfo:add')")
@Log(title = "巡检任务信息", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TInspectWorkInfo tInspectWorkInfo)
{
LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
tInspectWorkInfo.setCreateBy(loginUser.getUsername());
return toAjax(tInspectWorkInfoService.insertTInspectWorkInfo(tInspectWorkInfo));
}
/**
* 修改巡检任务信息
*/
@PreAuthorize("@ss.hasPermi('system:workinfo:edit')")
@Log(title = "巡检任务信息", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TInspectWorkInfo tInspectWorkInfo)
{
return toAjax(tInspectWorkInfoService.updateTInspectWorkInfo(tInspectWorkInfo));
}
/**
* 删除巡检任务信息
*/
@PreAuthorize("@ss.hasPermi('system:workinfo:remove')")
@Log(title = "巡检任务信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{workIds}")
public AjaxResult remove(@PathVariable Long[] workIds)
{
return toAjax(tInspectWorkInfoService.deleteTInspectWorkInfoByIds(workIds));
}
}
package com.zehong.web.controller.patrol;
import java.util.List;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.zehong.common.annotation.Log;
import com.zehong.common.core.controller.BaseController;
import com.zehong.common.core.domain.AjaxResult;
import com.zehong.common.enums.BusinessType;
import com.zehong.system.domain.TInspectWorkPointRecorde;
import com.zehong.system.service.ITInspectWorkPointRecordeService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 巡检点记录信息Controller
*
* @author zehong
* @date 2022-06-21
*/
@RestController
@RequestMapping("/system/recorde")
public class TInspectWorkPointRecordeController extends BaseController
{
@Autowired
private ITInspectWorkPointRecordeService tInspectWorkPointRecordeService;
/**
* 查询巡检点记录信息列表
*/
@GetMapping("/list")
public TableDataInfo list(TInspectWorkPointRecorde tInspectWorkPointRecorde)
{
startPage();
List<TInspectWorkPointRecorde> list = tInspectWorkPointRecordeService.selectTInspectWorkPointRecordeList(tInspectWorkPointRecorde);
return getDataTable(list);
}
/**
* 导出巡检点记录信息列表
*/
@Log(title = "巡检点记录信息", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TInspectWorkPointRecorde tInspectWorkPointRecorde)
{
List<TInspectWorkPointRecorde> list = tInspectWorkPointRecordeService.selectTInspectWorkPointRecordeList(tInspectWorkPointRecorde);
ExcelUtil<TInspectWorkPointRecorde> util = new ExcelUtil<TInspectWorkPointRecorde>(TInspectWorkPointRecorde.class);
return util.exportExcel(list, "巡检点记录信息数据");
}
/**
* 获取巡检点记录信息详细信息
*/
@GetMapping(value = "/{pointId}")
public AjaxResult getInfo(@PathVariable("pointId") Long pointId)
{
return AjaxResult.success(tInspectWorkPointRecordeService.selectTInspectWorkPointRecordeById(pointId));
}
/**
* 新增巡检点记录信息
*/
@Log(title = "巡检点记录信息", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TInspectWorkPointRecorde tInspectWorkPointRecorde)
{
return toAjax(tInspectWorkPointRecordeService.insertTInspectWorkPointRecorde(tInspectWorkPointRecorde));
}
/**
* 修改巡检点记录信息
*/
@Log(title = "巡检点记录信息", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TInspectWorkPointRecorde tInspectWorkPointRecorde)
{
return toAjax(tInspectWorkPointRecordeService.updateTInspectWorkPointRecorde(tInspectWorkPointRecorde));
}
/**
* 删除巡检点记录信息
*/
@Log(title = "巡检点记录信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{pointIds}")
public AjaxResult remove(@PathVariable Long[] pointIds)
{
return toAjax(tInspectWorkPointRecordeService.deleteTInspectWorkPointRecordeByIds(pointIds));
}
}
package com.zehong.web.controller.patrol;
import java.util.List;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.zehong.common.annotation.Log;
import com.zehong.common.core.controller.BaseController;
import com.zehong.common.core.domain.AjaxResult;
import com.zehong.common.enums.BusinessType;
import com.zehong.system.domain.TPatrolPosition;
import com.zehong.system.service.ITPatrolPositionService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 巡检点Controller
*
* @author zehong
* @date 2022-06-17
*/
@RestController
@RequestMapping("/system/position")
public class TPatrolPositionController extends BaseController
{
@Autowired
private ITPatrolPositionService tPatrolPositionService;
/**
* 查询巡检点列表
*/
@PreAuthorize("@ss.hasPermi('system:position:list')")
@GetMapping("/list")
public TableDataInfo list(TPatrolPosition tPatrolPosition)
{
startPage();
List<TPatrolPosition> list = tPatrolPositionService.selectTPatrolPositionList(tPatrolPosition);
return getDataTable(list);
}
/**
* 导出巡检点列表
*/
@PreAuthorize("@ss.hasPermi('system:position:export')")
@Log(title = "巡检点", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TPatrolPosition tPatrolPosition)
{
List<TPatrolPosition> list = tPatrolPositionService.selectTPatrolPositionList(tPatrolPosition);
ExcelUtil<TPatrolPosition> util = new ExcelUtil<TPatrolPosition>(TPatrolPosition.class);
return util.exportExcel(list, "巡检点数据");
}
/**
* 获取巡检点详细信息
*/
@PreAuthorize("@ss.hasPermi('system:position:query')")
@GetMapping(value = "/{patrolId}")
public AjaxResult getInfo(@PathVariable("patrolId") Long patrolId)
{
return AjaxResult.success(tPatrolPositionService.selectTPatrolPositionById(patrolId));
}
/**
* 巡检点树
*/
@GetMapping(value = "/treeDetail")
public AjaxResult getInfo()
{
return AjaxResult.success(tPatrolPositionService.selectTPatrolPositionTree());
}
/**
* 新增巡检点
*/
@PreAuthorize("@ss.hasPermi('system:position:add')")
@Log(title = "巡检点", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TPatrolPosition tPatrolPosition)
{
return toAjax(tPatrolPositionService.insertTPatrolPosition(tPatrolPosition));
}
/**
* 修改巡检点
*/
@PreAuthorize("@ss.hasPermi('system:position:edit')")
@Log(title = "巡检点", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TPatrolPosition tPatrolPosition)
{
return toAjax(tPatrolPositionService.updateTPatrolPosition(tPatrolPosition));
}
/**
* 删除巡检点
*/
@PreAuthorize("@ss.hasPermi('system:position:remove')")
@Log(title = "巡检点", businessType = BusinessType.DELETE)
@DeleteMapping("/{patrolIds}")
public AjaxResult remove(@PathVariable Long[] patrolIds)
{
return toAjax(tPatrolPositionService.deleteTPatrolPositionByIds(patrolIds));
}
}
package com.zehong.web.controller.resources;
import java.util.List;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.zehong.common.annotation.Log;
import com.zehong.common.core.controller.BaseController;
import com.zehong.common.core.domain.AjaxResult;
import com.zehong.common.enums.BusinessType;
import com.zehong.system.domain.TEmergencyDrill;
import com.zehong.system.service.ITEmergencyDrillService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 应急演练Controller
*
* @author zehong
* @date 2022-06-29
*/
@RestController
@RequestMapping("/system/drill")
public class TEmergencyDrillController extends BaseController
{
@Autowired
private ITEmergencyDrillService tEmergencyDrillService;
/**
* 查询应急演练列表
*/
@PreAuthorize("@ss.hasPermi('system:drill:list')")
@GetMapping("/list")
public TableDataInfo list(TEmergencyDrill tEmergencyDrill)
{
startPage();
List<TEmergencyDrill> list = tEmergencyDrillService.selectTEmergencyDrillList(tEmergencyDrill);
return getDataTable(list);
}
/**
* 导出应急演练列表
*/
@PreAuthorize("@ss.hasPermi('system:drill:export')")
@Log(title = "应急演练", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TEmergencyDrill tEmergencyDrill)
{
List<TEmergencyDrill> list = tEmergencyDrillService.selectTEmergencyDrillList(tEmergencyDrill);
ExcelUtil<TEmergencyDrill> util = new ExcelUtil<TEmergencyDrill>(TEmergencyDrill.class);
return util.exportExcel(list, "应急演练数据");
}
/**
* 获取应急演练详细信息
*/
@PreAuthorize("@ss.hasPermi('system:drill:query')")
@GetMapping(value = "/{drillId}")
public AjaxResult getInfo(@PathVariable("drillId") Long drillId)
{
return AjaxResult.success(tEmergencyDrillService.selectTEmergencyDrillById(drillId));
}
/**
* 新增应急演练
*/
@PreAuthorize("@ss.hasPermi('system:drill:add')")
@Log(title = "应急演练", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TEmergencyDrill tEmergencyDrill)
{
return toAjax(tEmergencyDrillService.insertTEmergencyDrill(tEmergencyDrill));
}
/**
* 修改应急演练
*/
@PreAuthorize("@ss.hasPermi('system:drill:edit')")
@Log(title = "应急演练", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TEmergencyDrill tEmergencyDrill)
{
return toAjax(tEmergencyDrillService.updateTEmergencyDrill(tEmergencyDrill));
}
/**
* 删除应急演练
*/
@PreAuthorize("@ss.hasPermi('system:drill:remove')")
@Log(title = "应急演练", businessType = BusinessType.DELETE)
@DeleteMapping("/{drillIds}")
public AjaxResult remove(@PathVariable Long[] drillIds)
{
return toAjax(tEmergencyDrillService.deleteTEmergencyDrillByIds(drillIds));
}
}
package com.zehong.web.controller.resources;
import java.util.List;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.zehong.common.annotation.Log;
import com.zehong.common.core.controller.BaseController;
import com.zehong.common.core.domain.AjaxResult;
import com.zehong.common.enums.BusinessType;
import com.zehong.system.domain.TMaterialInfo;
import com.zehong.system.service.ITMaterialInfoService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 应急物资管理Controller
*
* @author zehong
* @date 2022-07-01
*/
@RestController
@RequestMapping("/system/info")
public class TMaterialInfoController extends BaseController
{
@Autowired
private ITMaterialInfoService tMaterialInfoService;
/**
* 查询应急物资管理列表
*/
@PreAuthorize("@ss.hasPermi('system:info:list')")
@GetMapping("/list")
public TableDataInfo list(TMaterialInfo tMaterialInfo)
{
startPage();
List<TMaterialInfo> list = tMaterialInfoService.selectTMaterialInfoList(tMaterialInfo);
return getDataTable(list);
}
/**
* 导出应急物资管理列表
*/
@PreAuthorize("@ss.hasPermi('system:info:export')")
@Log(title = "应急物资管理", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TMaterialInfo tMaterialInfo)
{
List<TMaterialInfo> list = tMaterialInfoService.selectTMaterialInfoList(tMaterialInfo);
ExcelUtil<TMaterialInfo> util = new ExcelUtil<TMaterialInfo>(TMaterialInfo.class);
return util.exportExcel(list, "应急物资管理数据");
}
/**
* 获取应急物资管理详细信息
*/
@PreAuthorize("@ss.hasPermi('system:info:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(tMaterialInfoService.selectTMaterialInfoById(id));
}
/**
* 新增应急物资管理
*/
@PreAuthorize("@ss.hasPermi('system:info:add')")
@Log(title = "应急物资管理", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TMaterialInfo tMaterialInfo)
{
return toAjax(tMaterialInfoService.insertTMaterialInfo(tMaterialInfo));
}
/**
* 修改应急物资管理
*/
@PreAuthorize("@ss.hasPermi('system:info:edit')")
@Log(title = "应急物资管理", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TMaterialInfo tMaterialInfo)
{
return toAjax(tMaterialInfoService.updateTMaterialInfo(tMaterialInfo));
}
/**
* 删除应急物资管理
*/
@PreAuthorize("@ss.hasPermi('system:info:remove')")
@Log(title = "应急物资管理", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(tMaterialInfoService.deleteTMaterialInfoByIds(ids));
}
}
package com.zehong.web.controller.resources;
import com.zehong.common.annotation.Log;
import com.zehong.common.core.controller.BaseController;
import com.zehong.common.core.domain.AjaxResult;
import com.zehong.common.core.domain.model.LoginUser;
import com.zehong.common.core.page.TableDataInfo;
import com.zehong.common.enums.BusinessType;
import com.zehong.common.utils.ServletUtils;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.framework.web.service.TokenService;
import com.zehong.system.domain.TPlanInfo;
import com.zehong.system.service.ITPlanInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* 预案管理Controller
*
* @author zehong
* @date 2022-06-01
*/
@RestController
@RequestMapping("/system/reservePlan")
public class TPlanInfoController extends BaseController
{
@Autowired
private ITPlanInfoService tPlanInfoService;
@Autowired
private TokenService tokenService;
/**
* 查询预案管理列表
*/
@PreAuthorize("@ss.hasPermi('plan:reservePlan:list')")
@GetMapping("/list")
public TableDataInfo list(TPlanInfo tPlanInfo)
{
startPage();
List<TPlanInfo> list = tPlanInfoService.selectTPlanInfoList(tPlanInfo);
return getDataTable(list);
}
/**
* 导出预案管理列表
*/
@PreAuthorize("@ss.hasPermi('plan:reservePlan:export')")
@Log(title = "应急处置方案", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TPlanInfo tPlanInfo)
{
List<TPlanInfo> list = tPlanInfoService.selectTPlanInfoList(tPlanInfo);
ExcelUtil<TPlanInfo> util = new ExcelUtil<TPlanInfo>(TPlanInfo.class);
return util.exportExcel(list, "应急处置方案数据");
}
/**
* 获取预案管理详细信息
*/
@PreAuthorize("@ss.hasPermi('plan:reservePlan:query')")
@GetMapping(value = "/{planId}")
public AjaxResult getInfo(@PathVariable("planId") Long planId)
{
return AjaxResult.success(tPlanInfoService.selectTPlanInfoById(planId));
}
/**
* 新增预案管理
*/
@PreAuthorize("@ss.hasPermi('plan:reservePlan:add')")
@Log(title = "应急处置方案", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TPlanInfo tPlanInfo)
{
LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
tPlanInfo.setCreateBy(loginUser.getUsername());
return toAjax(tPlanInfoService.insertTPlanInfo(tPlanInfo));
}
/**
* 修改预案管理
*/
@PreAuthorize("@ss.hasPermi('plan:reservePlan:edit')")
@Log(title = "应急处置方案", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TPlanInfo tPlanInfo)
{
LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
tPlanInfo.setUpdateBy(loginUser.getUsername());
return toAjax(tPlanInfoService.updateTPlanInfo(tPlanInfo));
}
/**
* 删除预案管理
*/
@PreAuthorize("@ss.hasPermi('plan:reservePlan:remove')")
@Log(title = "应急处置方案", businessType = BusinessType.DELETE)
@DeleteMapping("/{planIds}")
public AjaxResult remove(@PathVariable Long[] planIds)
{
return toAjax(tPlanInfoService.deleteTPlanInfoByIds(planIds));
}
}
package com.zehong.web.controller.riskManager;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.zehong.common.annotation.Log;
import com.zehong.common.core.controller.BaseController;
import com.zehong.common.core.domain.AjaxResult;
import com.zehong.common.enums.BusinessType;
import com.zehong.system.domain.TRiskManager;
import com.zehong.system.service.ITRiskManagerService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 【请填写功能名称】Controller
*
* @author zehong
* @date 2022-07-01
*/
@RestController
@RequestMapping("/system/riskManager")
public class TRiskManagerController extends BaseController
{
@Autowired
private ITRiskManagerService tRiskManagerService;
/**
* 查询【请填写功能名称】列表
*/
// @PreAuthorize("@ss.hasPermi('system:manager:list')")
@GetMapping("/list")
public TableDataInfo list(TRiskManager tRiskManager)
{
startPage();
List<TRiskManager> list = tRiskManagerService.selectTRiskManagerList(tRiskManager);
return getDataTable(list);
}
/**
* 导出【请填写功能名称】列表
*/
// @PreAuthorize("@ss.hasPermi('system:manager:export')")
@Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TRiskManager tRiskManager)
{
List<TRiskManager> list = tRiskManagerService.selectTRiskManagerList(tRiskManager);
ExcelUtil<TRiskManager> util = new ExcelUtil<TRiskManager>(TRiskManager.class);
return util.exportExcel(list, "【请填写功能名称】数据");
}
/**
* 获取【请填写功能名称】详细信息
*/
// @PreAuthorize("@ss.hasPermi('system:manager:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(tRiskManagerService.selectTRiskManagerById(id));
}
/**
* 新增【请填写功能名称】
*/
// @PreAuthorize("@ss.hasPermi('system:manager:add')")
@Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TRiskManager tRiskManager)
{
return toAjax(tRiskManagerService.insertTRiskManager(tRiskManager));
}
/**
* 修改【请填写功能名称】
*/
// @PreAuthorize("@ss.hasPermi('system:manager:edit')")
@Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TRiskManager tRiskManager)
{
return toAjax(tRiskManagerService.updateTRiskManager(tRiskManager));
}
/**
* 删除【请填写功能名称】
*/
// @PreAuthorize("@ss.hasPermi('system:manager:remove')")
@Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(tRiskManagerService.deleteTRiskManagerByIds(ids));
}
}
package com.zehong.web.controller.safetyManagement;
import java.util.List;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.zehong.common.annotation.Log;
import com.zehong.common.core.controller.BaseController;
import com.zehong.common.core.domain.AjaxResult;
import com.zehong.common.enums.BusinessType;
import com.zehong.system.domain.TEnterpriseCertificate;
import com.zehong.system.service.ITEnterpriseCertificateService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 企业资质证照管理Controller
*
* @author zehong
* @date 2022-06-23
*/
@RestController
@RequestMapping("/safetyManagement/enterpriseCertificate")
public class TEnterpriseCertificateController extends BaseController
{
@Autowired
private ITEnterpriseCertificateService tEnterpriseCertificateService;
/**
* 查询企业资质证照管理列表
*/
@PreAuthorize("@ss.hasPermi('safetyManagement:enterpriseCertificate:list')")
@GetMapping("/list")
public TableDataInfo list(TEnterpriseCertificate tEnterpriseCertificate)
{
startPage();
List<TEnterpriseCertificate> list = tEnterpriseCertificateService.selectTEnterpriseCertificateList(tEnterpriseCertificate);
return getDataTable(list);
}
/**
* 导出企业资质证照管理列表
*/
@Log(title = "企业资质证照管理", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TEnterpriseCertificate tEnterpriseCertificate)
{
List<TEnterpriseCertificate> list = tEnterpriseCertificateService.selectTEnterpriseCertificateList(tEnterpriseCertificate);
ExcelUtil<TEnterpriseCertificate> util = new ExcelUtil<TEnterpriseCertificate>(TEnterpriseCertificate.class);
return util.exportExcel(list, "企业资质证照管理数据");
}
/**
* 获取企业资质证照管理详细信息
*/
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(tEnterpriseCertificateService.selectTEnterpriseCertificateById(id));
}
/**
* 新增企业资质证照管理
*/
@Log(title = "企业资质证照管理", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TEnterpriseCertificate tEnterpriseCertificate)
{
return toAjax(tEnterpriseCertificateService.insertTEnterpriseCertificate(tEnterpriseCertificate));
}
/**
* 修改企业资质证照管理
*/
@Log(title = "企业资质证照管理", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TEnterpriseCertificate tEnterpriseCertificate)
{
return toAjax(tEnterpriseCertificateService.updateTEnterpriseCertificate(tEnterpriseCertificate));
}
/**
* 删除企业资质证照管理
*/
@Log(title = "企业资质证照管理", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(tEnterpriseCertificateService.deleteTEnterpriseCertificateByIds(ids));
}
}
package com.zehong.web.controller.safetyManagement;
import java.util.List;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.zehong.common.annotation.Log;
import com.zehong.common.core.controller.BaseController;
import com.zehong.common.core.domain.AjaxResult;
import com.zehong.common.enums.BusinessType;
import com.zehong.system.domain.TEnterpriseInfo;
import com.zehong.system.service.ITEnterpriseInfoService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 企业基础信息管理Controller
*
* @author zehong
* @date 2022-06-23
*/
@RestController
@RequestMapping("/safetyManagement/enterpriseInfo")
public class TEnterpriseInfoController extends BaseController
{
@Autowired
private ITEnterpriseInfoService tEnterpriseInfoService;
/**
* 查询企业基础信息管理列表
*/
@PreAuthorize("@ss.hasPermi('safetyManagement:enterpriseInfo:list')")
@GetMapping("/list")
public TableDataInfo list(TEnterpriseInfo tEnterpriseInfo)
{
startPage();
List<TEnterpriseInfo> list = tEnterpriseInfoService.selectTEnterpriseInfoList(tEnterpriseInfo);
return getDataTable(list);
}
/**
* 导出企业基础信息管理列表
*/
@Log(title = "企业基础信息管理", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TEnterpriseInfo tEnterpriseInfo)
{
List<TEnterpriseInfo> list = tEnterpriseInfoService.selectTEnterpriseInfoList(tEnterpriseInfo);
ExcelUtil<TEnterpriseInfo> util = new ExcelUtil<TEnterpriseInfo>(TEnterpriseInfo.class);
return util.exportExcel(list, "企业基础信息管理数据");
}
/**
* 获取企业基础信息管理详细信息
*/
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(tEnterpriseInfoService.selectTEnterpriseInfoById(id));
}
/**
* 新增企业基础信息管理
*/
@Log(title = "企业基础信息管理", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TEnterpriseInfo tEnterpriseInfo)
{
return toAjax(tEnterpriseInfoService.insertTEnterpriseInfo(tEnterpriseInfo));
}
/**
* 修改企业基础信息管理
*/
@Log(title = "企业基础信息管理", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TEnterpriseInfo tEnterpriseInfo)
{
return toAjax(tEnterpriseInfoService.updateTEnterpriseInfo(tEnterpriseInfo));
}
/**
* 删除企业基础信息管理
*/
@Log(title = "企业基础信息管理", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(tEnterpriseInfoService.deleteTEnterpriseInfoByIds(ids));
}
}
package com.zehong.web.controller.safetyManagement;
import java.util.List;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.zehong.common.annotation.Log;
import com.zehong.common.core.controller.BaseController;
import com.zehong.common.core.domain.AjaxResult;
import com.zehong.common.enums.BusinessType;
import com.zehong.system.domain.TEnterpriseSystem;
import com.zehong.system.service.ITEnterpriseSystemService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 企业制度管理Controller
*
* @author zehong
* @date 2022-06-21
*/
@RestController
@RequestMapping("/safetyManagement/enterpriseSystem")
public class TEnterpriseSystemController extends BaseController
{
@Autowired
private ITEnterpriseSystemService tEnterpriseSystemService;
/**
* 查询企业制度管理列表
*/
@PreAuthorize("@ss.hasPermi('safetyManagement:enterpriseSystem:list')")
@GetMapping("/list")
public TableDataInfo list(TEnterpriseSystem tEnterpriseSystem)
{
startPage();
List<TEnterpriseSystem> list = tEnterpriseSystemService.selectTEnterpriseSystemList(tEnterpriseSystem);
return getDataTable(list);
}
/**
* 导出企业制度管理列表
*/
@Log(title = "企业制度管理", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TEnterpriseSystem tEnterpriseSystem)
{
List<TEnterpriseSystem> list = tEnterpriseSystemService.selectTEnterpriseSystemList(tEnterpriseSystem);
ExcelUtil<TEnterpriseSystem> util = new ExcelUtil<TEnterpriseSystem>(TEnterpriseSystem.class);
return util.exportExcel(list, "企业制度管理数据");
}
/**
* 获取企业制度管理详细信息
*/
@GetMapping(value = "/{systemId}")
public AjaxResult getInfo(@PathVariable("systemId") Long systemId)
{
return AjaxResult.success(tEnterpriseSystemService.selectTEnterpriseSystemById(systemId));
}
/**
* 新增企业制度管理
*/
@Log(title = "企业制度管理", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TEnterpriseSystem tEnterpriseSystem)
{
return toAjax(tEnterpriseSystemService.insertTEnterpriseSystem(tEnterpriseSystem));
}
/**
* 修改企业制度管理
*/
@Log(title = "企业制度管理", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TEnterpriseSystem tEnterpriseSystem)
{
return toAjax(tEnterpriseSystemService.updateTEnterpriseSystem(tEnterpriseSystem));
}
/**
* 删除企业制度管理
*/
@Log(title = "企业制度管理", businessType = BusinessType.DELETE)
@DeleteMapping("/{systemIds}")
public AjaxResult remove(@PathVariable Long[] systemIds)
{
return toAjax(tEnterpriseSystemService.deleteTEnterpriseSystemByIds(systemIds));
}
}
package com.zehong.web.controller.safetyManagement;
import java.util.List;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.zehong.common.annotation.Log;
import com.zehong.common.core.controller.BaseController;
import com.zehong.common.core.domain.AjaxResult;
import com.zehong.common.enums.BusinessType;
import com.zehong.system.domain.TInvestment;
import com.zehong.system.service.ITInvestmentService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 投入台账Controller
*
* @author zehong
* @date 2022-06-24
*/
@RestController
@RequestMapping("/safetyManagement/investment")
public class TInvestmentController extends BaseController
{
@Autowired
private ITInvestmentService tInvestmentService;
/**
* 查询投入台账列表
*/
@PreAuthorize("@ss.hasPermi('safetyManagement:investment:list')")
@GetMapping("/list")
public TableDataInfo list(TInvestment tInvestment)
{
startPage();
List<TInvestment> list = tInvestmentService.selectTInvestmentList(tInvestment);
return getDataTable(list);
}
/**
* 导出投入台账列表
*/
@Log(title = "投入台账", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TInvestment tInvestment)
{
List<TInvestment> list = tInvestmentService.selectTInvestmentList(tInvestment);
ExcelUtil<TInvestment> util = new ExcelUtil<TInvestment>(TInvestment.class);
return util.exportExcel(list, "投入台账数据");
}
/**
* 获取投入台账详细信息
*/
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(tInvestmentService.selectTInvestmentById(id));
}
/**
* 新增投入台账
*/
@Log(title = "投入台账", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TInvestment tInvestment)
{
return toAjax(tInvestmentService.insertTInvestment(tInvestment));
}
/**
* 修改投入台账
*/
@Log(title = "投入台账", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TInvestment tInvestment)
{
return toAjax(tInvestmentService.updateTInvestment(tInvestment));
}
/**
* 删除投入台账
*/
@Log(title = "投入台账", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(tInvestmentService.deleteTInvestmentByIds(ids));
}
}
package com.zehong.web.controller.safetyManagement;
import java.util.List;
import java.util.stream.Collectors;
import com.zehong.common.core.domain.entity.SysRole;
import com.zehong.common.core.domain.entity.SysUser;
import com.zehong.system.domain.form.TStaffForm;
import com.zehong.system.domain.vo.TStaffVo;
import com.zehong.system.service.ISysPostService;
import com.zehong.system.service.ISysRoleService;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.zehong.common.annotation.Log;
import com.zehong.common.core.controller.BaseController;
import com.zehong.common.core.domain.AjaxResult;
import com.zehong.common.enums.BusinessType;
import com.zehong.system.domain.TStaff;
import com.zehong.system.service.ITStaffService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 员工信息管理Controller
*
* @author zehong
* @date 2022-06-17
*/
@RestController
@RequestMapping("/safetyManagement/staff")
public class TStaffController extends BaseController
{
@Autowired
private ITStaffService tStaffService;
@Autowired
private ISysRoleService roleService;
@Autowired
private ISysPostService postService;
/**
* 查询员工信息管理列表
*/
@PreAuthorize("@ss.hasPermi('safetyManagement:staff:list')")
@GetMapping("/list")
public TableDataInfo list(TStaffForm tStaff)
{
startPage();
List<TStaffVo> list = tStaffService.selectTStaffList(tStaff);
return getDataTable(list);
}
/**
* 导出员工信息管理列表
*/
@Log(title = "员工信息管理", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TStaffForm tStaff)
{
List<TStaffVo> list = tStaffService.selectTStaffList(tStaff);
ExcelUtil<TStaffVo> util = new ExcelUtil<TStaffVo>(TStaffVo.class);
return util.exportExcel(list, "员工信息管理数据");
}
/**
* 获取员工信息管理详细信息
*/
@GetMapping(value = {"/", "/{staffId}"})
public AjaxResult getInfo(@PathVariable(value = "staffId", required = false) Long staffId)
{
AjaxResult ajax = AjaxResult.success();
ajax.put("roles", roleService.selectRoleAll());
ajax.put("posts", postService.selectPostAll());
ajax.put("data", tStaffService.selectTStaffById(staffId));
return ajax;
}
/**
* 新增员工信息管理
*/
@Log(title = "员工信息管理", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TStaff tStaff)
{
return toAjax(tStaffService.insertTStaff(tStaff));
}
/**
* 修改员工信息管理
*/
@Log(title = "员工信息管理", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TStaff tStaff)
{
return toAjax(tStaffService.updateTStaff(tStaff));
}
/**
* 删除员工信息管理
*/
@Log(title = "员工信息管理", businessType = BusinessType.DELETE)
@DeleteMapping("/{staffIds}")
public AjaxResult remove(@PathVariable Long[] staffIds)
{
return toAjax(tStaffService.deleteTStaffByIds(staffIds));
}
}
package com.zehong.web.controller.system;
import com.alibaba.fastjson.JSONObject;
import com.hikvision.artemis.sdk.ArtemisHttpUtil;
import com.hikvision.artemis.sdk.config.ArtemisConfig;
import com.zehong.common.core.domain.AjaxResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.HashMap;
import java.util.Map;
/**
* 海康视频接口
*/
@RestController
@RequestMapping("artemis")
public class ArtemisController {
/**
* 请根据自己的appKey和appSecret更换static静态块中的三个参数. [1 host]
* 如果你选择的是和现场环境对接,host要修改为现场环境的ip,https端口默认为443,http端口默认为80.例如10.33.25.22:443 或者10.33.25.22:80
* appKey和appSecret请按照或得到的appKey和appSecret更改.
*/
static {
// 代理API网关nginx服务器ip端口
ArtemisConfig.host = "27.128.189.137:1443";
// 秘钥appkey
ArtemisConfig.appKey = "28616162";
// 秘钥appSecret
ArtemisConfig.appSecret = "5ueTWDOJ21jRbpHACAzF";
}
/**
* 能力开放平台的网站路径
*/
private static final String ARTEMIS_PATH = "/artemis";
/**
* 获取监控点预览取流URL
*/
private static final String GET_PREVIEWURLS = ARTEMIS_PATH + "/api/video/v1/cameras/previewURLs";
/**
* 获取对讲url
*/
private static final String GET_TALKURLS = ARTEMIS_PATH + "/api/video/v1/cameras/talkURLs";
/**
* 分页获取监控点资源
*/
private static final String GET_CAMERAS = ARTEMIS_PATH + "/api/resource/v1/cameras";
//搜索
private static final String GET_CAMERAS_SEARCH = ARTEMIS_PATH + "/api/resource/v2/camera/search";
private static final String VEDIO_CONTROLLING = ARTEMIS_PATH + "/api/video/v1/ptzs/controlling";
/**
* 获取监控点预览取流URL
* @return
*/
@GetMapping("/getPreviewURLs")
public Object getPreviewURLs(@RequestParam(value = "cameraIndexCode") String cameraIndexCode){
/**
* 根据API文档可以看出来,这是一个POST请求的Rest接口,而且传入的参数值为一个json
* ArtemisHttpUtil工具类提供了doPostStringArtemis这个函数,一共六个参数在文档里写明其中的意思,因为接口是https,
* 所以第一个参数path是一个hashmap类型,请put一个key-value,query为传入的参数,body为传入的json数据
* 传入的contentType为application/json,accept不指定为null
* header没有额外参数可不传,指定为null
*
*/
Map<String, String> path = new HashMap<String, String>(2) {
{
//根据现场环境部署确认是http还是https
put("https://", GET_PREVIEWURLS);
}
};
JSONObject jsonBody = new JSONObject();
//jsonBody.put("cameraIndexCode", "2a9891a194c24747b277f3ea4836d433");
jsonBody.put("cameraIndexCode", cameraIndexCode);
jsonBody.put("streamType", 1);
jsonBody.put("protocol", "ws");
jsonBody.put("transmode", 1);
String body = jsonBody.toJSONString();
// post请求application/json类型参数
String result = ArtemisHttpUtil.doPostStringArtemis(path,body,null,null,"application/json",null);
return AjaxResult.success(JSONObject.parseObject(result));
}
/**
* 分页获取监控点资源
* @param pageNo 页码
* @param pageSize 每页条数
* @return
*/
@GetMapping("/getCameras")
public AjaxResult getCameras(@RequestParam("pageNum") int pageNo ,@RequestParam("pageSize") int pageSize){
Map<String, String> path = new HashMap<String, String>(2) {
{
//根据现场环境部署确认是http还是https
put("https://", GET_CAMERAS);
}
};
JSONObject jsonBody = new JSONObject();
jsonBody.put("pageNo", pageNo);
jsonBody.put("pageSize", pageSize);
jsonBody.put("treeCode", 0);
String body = jsonBody.toJSONString();
// post请求application/json类型参数
String result = ArtemisHttpUtil.doPostStringArtemis(path,body,null,null,"application/json",null);
//return JSONObject.parseObject(result);
return AjaxResult.success(JSONObject.parseObject(result));
}
/**
* 分页获取监控点资源
* @param pageNo 页码
* @param pageSize 每页条数
* @return
*/
@GetMapping("/search")
public AjaxResult getCamerasSearch(@RequestParam("pageNum") int pageNo ,@RequestParam("pageSize") int pageSize,@RequestParam("name") String name){
Map<String, String> path = new HashMap<String, String>(2) {
{
//根据现场环境部署确认是http还是https
put("https://", GET_CAMERAS_SEARCH);
}
};
JSONObject jsonBody = new JSONObject();
jsonBody.put("pageNo", pageNo);
jsonBody.put("pageSize", pageSize);
jsonBody.put("name", name);
jsonBody.put("treeCode", 0);
String body = jsonBody.toJSONString();
// post请求application/json类型参数
String result = ArtemisHttpUtil.doPostStringArtemis(path,body,null,null,"application/json",null);
//return JSONObject.parseObject(result);
return AjaxResult.success(JSONObject.parseObject(result));
}
/**
* 云控操作
* @param cameraIndexCode
* @param command
* @param action
* @return
*/
@RequestMapping("/videoControlling")
public Object videoControlling(@RequestParam("cameraIndexCode") String cameraIndexCode, @RequestParam("command") String command, @RequestParam("action") String action){
Map<String, String> path = new HashMap<String, String>(2) {
{
//根据现场环境部署确认是http还是https
put("https://", VEDIO_CONTROLLING);
}
};
JSONObject jsonBody = new JSONObject();
jsonBody.put("cameraIndexCode", cameraIndexCode);
jsonBody.put("action", action);
jsonBody.put("command", command);
jsonBody.put("speed", 40);
String body = jsonBody.toJSONString();
// post请求application/json类型参数
String result = ArtemisHttpUtil.doPostStringArtemis(path,body,null,null,"application/json",null);
return JSONObject.parseObject(result);
}
/**
* 获取通话链接
* @param cameraIndexCode
* @return
*/
@GetMapping("/getTalkURLs")
public Object getTalkURLs(@RequestParam(value = "cameraIndexCode") String cameraIndexCode,
@RequestParam(value = "expand",required=false) String expand,
@RequestParam(value = "streamType",required=false) Integer streamType){
Map<String, String> path = new HashMap<String, String>(2) {
{
//根据现场环境部署确认是http还是https
put("https://", GET_TALKURLS);
}
};
JSONObject jsonBody = new JSONObject();
if(expand==null){
expand = "streamform=ps";
}
if(streamType==null){
streamType = 1;
}
//jsonBody.put("cameraIndexCode", "2a9891a194c24747b277f3ea4836d433");
jsonBody.put("cameraIndexCode", cameraIndexCode);
jsonBody.put("streamType", streamType);
jsonBody.put("expand", expand);
jsonBody.put("eurlExpand", "url");
String body = jsonBody.toJSONString();
// post请求application/json类型参数
String result = ArtemisHttpUtil.doPostStringArtemis(path,body,null,null,"application/json",null);
return AjaxResult.success(JSONObject.parseObject(result));
}
}
package com.zehong.web.controller.system;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.DeleteMapping;
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.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.zehong.common.annotation.Log;
import com.zehong.common.annotation.RepeatSubmit;
import com.zehong.common.constant.UserConstants;
import com.zehong.common.core.controller.BaseController;
import com.zehong.common.core.domain.AjaxResult;
import com.zehong.common.core.page.TableDataInfo;
import com.zehong.common.enums.BusinessType;
import com.zehong.common.utils.SecurityUtils;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.system.domain.SysConfig;
import com.zehong.system.service.ISysConfigService;
/**
* 参数配置 信息操作处理
*
* @author zehong
*/
@RestController
@RequestMapping("/system/config")
public class SysConfigController extends BaseController
{
@Autowired
private ISysConfigService configService;
/**
* 获取参数配置列表
*/
@PreAuthorize("@ss.hasPermi('system:config:list')")
@GetMapping("/list")
public TableDataInfo list(SysConfig config)
{
startPage();
List<SysConfig> list = configService.selectConfigList(config);
return getDataTable(list);
}
@Log(title = "参数管理", businessType = BusinessType.EXPORT)
@PreAuthorize("@ss.hasPermi('system:config:export')")
@GetMapping("/export")
public AjaxResult export(SysConfig config)
{
List<SysConfig> list = configService.selectConfigList(config);
ExcelUtil<SysConfig> util = new ExcelUtil<SysConfig>(SysConfig.class);
return util.exportExcel(list, "参数数据");
}
/**
* 根据参数编号获取详细信息
*/
@PreAuthorize("@ss.hasPermi('system:config:query')")
@GetMapping(value = "/{configId}")
public AjaxResult getInfo(@PathVariable Long configId)
{
return AjaxResult.success(configService.selectConfigById(configId));
}
/**
* 根据参数键名查询参数值
*/
@GetMapping(value = "/configKey/{configKey}")
public AjaxResult getConfigKey(@PathVariable String configKey)
{
return AjaxResult.success(configService.selectConfigByKey(configKey));
}
/**
* 新增参数配置
*/
@PreAuthorize("@ss.hasPermi('system:config:add')")
@Log(title = "参数管理", businessType = BusinessType.INSERT)
@PostMapping
@RepeatSubmit
public AjaxResult add(@Validated @RequestBody SysConfig config)
{
if (UserConstants.NOT_UNIQUE.equals(configService.checkConfigKeyUnique(config)))
{
return AjaxResult.error("新增参数'" + config.getConfigName() + "'失败,参数键名已存在");
}
config.setCreateBy(SecurityUtils.getUsername());
return toAjax(configService.insertConfig(config));
}
/**
* 修改参数配置
*/
@PreAuthorize("@ss.hasPermi('system:config:edit')")
@Log(title = "参数管理", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@Validated @RequestBody SysConfig config)
{
if (UserConstants.NOT_UNIQUE.equals(configService.checkConfigKeyUnique(config)))
{
return AjaxResult.error("修改参数'" + config.getConfigName() + "'失败,参数键名已存在");
}
config.setUpdateBy(SecurityUtils.getUsername());
return toAjax(configService.updateConfig(config));
}
/**
* 删除参数配置
*/
@PreAuthorize("@ss.hasPermi('system:config:remove')")
@Log(title = "参数管理", businessType = BusinessType.DELETE)
@DeleteMapping("/{configIds}")
public AjaxResult remove(@PathVariable Long[] configIds)
{
configService.deleteConfigByIds(configIds);
return success();
}
/**
* 刷新参数缓存
*/
@PreAuthorize("@ss.hasPermi('system:config:remove')")
@Log(title = "参数管理", businessType = BusinessType.CLEAN)
@DeleteMapping("/refreshCache")
public AjaxResult refreshCache()
{
configService.resetConfigCache();
return AjaxResult.success();
}
}
package com.zehong.web.controller.system;
import java.util.Iterator;
import java.util.List;
import org.apache.commons.lang3.ArrayUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.DeleteMapping;
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.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.zehong.common.annotation.Log;
import com.zehong.common.constant.UserConstants;
import com.zehong.common.core.controller.BaseController;
import com.zehong.common.core.domain.AjaxResult;
import com.zehong.common.core.domain.entity.SysDept;
import com.zehong.common.enums.BusinessType;
import com.zehong.common.utils.SecurityUtils;
import com.zehong.common.utils.StringUtils;
import com.zehong.system.service.ISysDeptService;
/**
* 部门信息
*
* @author zehong
*/
@RestController
@RequestMapping("/system/dept")
public class SysDeptController extends BaseController
{
@Autowired
private ISysDeptService deptService;
/**
* 获取部门列表
*/
@PreAuthorize("@ss.hasPermi('system:dept:list')")
@GetMapping("/list")
public AjaxResult list(SysDept dept)
{
List<SysDept> depts = deptService.selectDeptList(dept);
return AjaxResult.success(depts);
}
/**
* 查询部门列表(排除节点)
*/
@PreAuthorize("@ss.hasPermi('system:dept:list')")
@GetMapping("/list/exclude/{deptId}")
public AjaxResult excludeChild(@PathVariable(value = "deptId", required = false) Long deptId)
{
List<SysDept> depts = deptService.selectDeptList(new SysDept());
Iterator<SysDept> it = depts.iterator();
while (it.hasNext())
{
SysDept d = (SysDept) it.next();
if (d.getDeptId().intValue() == deptId
|| ArrayUtils.contains(StringUtils.split(d.getAncestors(), ","), deptId + ""))
{
it.remove();
}
}
return AjaxResult.success(depts);
}
/**
* 根据部门编号获取详细信息
*/
@PreAuthorize("@ss.hasPermi('system:dept:query')")
@GetMapping(value = "/{deptId}")
public AjaxResult getInfo(@PathVariable Long deptId)
{
return AjaxResult.success(deptService.selectDeptById(deptId));
}
/**
* 获取部门下拉树列表
*/
@GetMapping("/treeselect")
public AjaxResult treeselect(SysDept dept)
{
List<SysDept> depts = deptService.selectDeptList(dept);
return AjaxResult.success(deptService.buildDeptTreeSelect(depts));
}
/**
* 加载对应角色部门列表树
*/
@GetMapping(value = "/roleDeptTreeselect/{roleId}")
public AjaxResult roleDeptTreeselect(@PathVariable("roleId") Long roleId)
{
List<SysDept> depts = deptService.selectDeptList(new SysDept());
AjaxResult ajax = AjaxResult.success();
ajax.put("checkedKeys", deptService.selectDeptListByRoleId(roleId));
ajax.put("depts", deptService.buildDeptTreeSelect(depts));
return ajax;
}
/**
* 新增部门
*/
@PreAuthorize("@ss.hasPermi('system:dept:add')")
@Log(title = "部门管理", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@Validated @RequestBody SysDept dept)
{
if (UserConstants.NOT_UNIQUE.equals(deptService.checkDeptNameUnique(dept)))
{
return AjaxResult.error("新增部门'" + dept.getDeptName() + "'失败,部门名称已存在");
}
dept.setCreateBy(SecurityUtils.getUsername());
return toAjax(deptService.insertDept(dept));
}
/**
* 修改部门
*/
@PreAuthorize("@ss.hasPermi('system:dept:edit')")
@Log(title = "部门管理", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@Validated @RequestBody SysDept dept)
{
if (UserConstants.NOT_UNIQUE.equals(deptService.checkDeptNameUnique(dept)))
{
return AjaxResult.error("修改部门'" + dept.getDeptName() + "'失败,部门名称已存在");
}
else if (dept.getParentId().equals(dept.getDeptId()))
{
return AjaxResult.error("修改部门'" + dept.getDeptName() + "'失败,上级部门不能是自己");
}
else if (StringUtils.equals(UserConstants.DEPT_DISABLE, dept.getStatus())
&& deptService.selectNormalChildrenDeptById(dept.getDeptId()) > 0)
{
return AjaxResult.error("该部门包含未停用的子部门!");
}
dept.setUpdateBy(SecurityUtils.getUsername());
return toAjax(deptService.updateDept(dept));
}
/**
* 删除部门
*/
@PreAuthorize("@ss.hasPermi('system:dept:remove')")
@Log(title = "部门管理", businessType = BusinessType.DELETE)
@DeleteMapping("/{deptId}")
public AjaxResult remove(@PathVariable Long deptId)
{
if (deptService.hasChildByDeptId(deptId))
{
return AjaxResult.error("存在下级部门,不允许删除");
}
if (deptService.checkDeptExistUser(deptId))
{
return AjaxResult.error("部门存在用户,不允许删除");
}
return toAjax(deptService.deleteDeptById(deptId));
}
}
package com.zehong.web.controller.system;
import java.util.ArrayList;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.DeleteMapping;
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.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.zehong.common.annotation.Log;
import com.zehong.common.core.controller.BaseController;
import com.zehong.common.core.domain.AjaxResult;
import com.zehong.common.core.domain.entity.SysDictData;
import com.zehong.common.core.page.TableDataInfo;
import com.zehong.common.enums.BusinessType;
import com.zehong.common.utils.SecurityUtils;
import com.zehong.common.utils.StringUtils;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.system.service.ISysDictDataService;
import com.zehong.system.service.ISysDictTypeService;
/**
* 数据字典信息
*
* @author zehong
*/
@RestController
@RequestMapping("/system/dict/data")
public class SysDictDataController extends BaseController
{
@Autowired
private ISysDictDataService dictDataService;
@Autowired
private ISysDictTypeService dictTypeService;
@PreAuthorize("@ss.hasPermi('system:dict:list')")
@GetMapping("/list")
public TableDataInfo list(SysDictData dictData)
{
startPage();
List<SysDictData> list = dictDataService.selectDictDataList(dictData);
return getDataTable(list);
}
@Log(title = "字典数据", businessType = BusinessType.EXPORT)
@PreAuthorize("@ss.hasPermi('system:dict:export')")
@GetMapping("/export")
public AjaxResult export(SysDictData dictData)
{
List<SysDictData> list = dictDataService.selectDictDataList(dictData);
ExcelUtil<SysDictData> util = new ExcelUtil<SysDictData>(SysDictData.class);
return util.exportExcel(list, "字典数据");
}
/**
* 查询字典数据详细
*/
@PreAuthorize("@ss.hasPermi('system:dict:query')")
@GetMapping(value = "/{dictCode}")
public AjaxResult getInfo(@PathVariable Long dictCode)
{
return AjaxResult.success(dictDataService.selectDictDataById(dictCode));
}
/**
* 根据字典类型查询字典数据信息
*/
@GetMapping(value = "/type/{dictType}")
public AjaxResult dictType(@PathVariable String dictType)
{
List<SysDictData> data = dictTypeService.selectDictDataByType(dictType);
if (StringUtils.isNull(data))
{
data = new ArrayList<SysDictData>();
}
return AjaxResult.success(data);
}
/**
* 新增字典类型
*/
@PreAuthorize("@ss.hasPermi('system:dict:add')")
@Log(title = "字典数据", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@Validated @RequestBody SysDictData dict)
{
dict.setCreateBy(SecurityUtils.getUsername());
return toAjax(dictDataService.insertDictData(dict));
}
/**
* 修改保存字典类型
*/
@PreAuthorize("@ss.hasPermi('system:dict:edit')")
@Log(title = "字典数据", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@Validated @RequestBody SysDictData dict)
{
dict.setUpdateBy(SecurityUtils.getUsername());
return toAjax(dictDataService.updateDictData(dict));
}
/**
* 删除字典类型
*/
@PreAuthorize("@ss.hasPermi('system:dict:remove')")
@Log(title = "字典类型", businessType = BusinessType.DELETE)
@DeleteMapping("/{dictCodes}")
public AjaxResult remove(@PathVariable Long[] dictCodes)
{
dictDataService.deleteDictDataByIds(dictCodes);
return success();
}
}
package com.zehong.web.controller.system;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.DeleteMapping;
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.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.zehong.common.annotation.Log;
import com.zehong.common.constant.UserConstants;
import com.zehong.common.core.controller.BaseController;
import com.zehong.common.core.domain.AjaxResult;
import com.zehong.common.core.domain.entity.SysDictType;
import com.zehong.common.core.page.TableDataInfo;
import com.zehong.common.enums.BusinessType;
import com.zehong.common.utils.SecurityUtils;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.system.service.ISysDictTypeService;
/**
* 数据字典信息
*
* @author zehong
*/
@RestController
@RequestMapping("/system/dict/type")
public class SysDictTypeController extends BaseController
{
@Autowired
private ISysDictTypeService dictTypeService;
@PreAuthorize("@ss.hasPermi('system:dict:list')")
@GetMapping("/list")
public TableDataInfo list(SysDictType dictType)
{
startPage();
List<SysDictType> list = dictTypeService.selectDictTypeList(dictType);
return getDataTable(list);
}
@Log(title = "字典类型", businessType = BusinessType.EXPORT)
@PreAuthorize("@ss.hasPermi('system:dict:export')")
@GetMapping("/export")
public AjaxResult export(SysDictType dictType)
{
List<SysDictType> list = dictTypeService.selectDictTypeList(dictType);
ExcelUtil<SysDictType> util = new ExcelUtil<SysDictType>(SysDictType.class);
return util.exportExcel(list, "字典类型");
}
/**
* 查询字典类型详细
*/
@PreAuthorize("@ss.hasPermi('system:dict:query')")
@GetMapping(value = "/{dictId}")
public AjaxResult getInfo(@PathVariable Long dictId)
{
return AjaxResult.success(dictTypeService.selectDictTypeById(dictId));
}
/**
* 新增字典类型
*/
@PreAuthorize("@ss.hasPermi('system:dict:add')")
@Log(title = "字典类型", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@Validated @RequestBody SysDictType dict)
{
if (UserConstants.NOT_UNIQUE.equals(dictTypeService.checkDictTypeUnique(dict)))
{
return AjaxResult.error("新增字典'" + dict.getDictName() + "'失败,字典类型已存在");
}
dict.setCreateBy(SecurityUtils.getUsername());
return toAjax(dictTypeService.insertDictType(dict));
}
/**
* 修改字典类型
*/
@PreAuthorize("@ss.hasPermi('system:dict:edit')")
@Log(title = "字典类型", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@Validated @RequestBody SysDictType dict)
{
if (UserConstants.NOT_UNIQUE.equals(dictTypeService.checkDictTypeUnique(dict)))
{
return AjaxResult.error("修改字典'" + dict.getDictName() + "'失败,字典类型已存在");
}
dict.setUpdateBy(SecurityUtils.getUsername());
return toAjax(dictTypeService.updateDictType(dict));
}
/**
* 删除字典类型
*/
@PreAuthorize("@ss.hasPermi('system:dict:remove')")
@Log(title = "字典类型", businessType = BusinessType.DELETE)
@DeleteMapping("/{dictIds}")
public AjaxResult remove(@PathVariable Long[] dictIds)
{
dictTypeService.deleteDictTypeByIds(dictIds);
return success();
}
/**
* 刷新字典缓存
*/
@PreAuthorize("@ss.hasPermi('system:dict:remove')")
@Log(title = "字典类型", businessType = BusinessType.CLEAN)
@DeleteMapping("/refreshCache")
public AjaxResult refreshCache()
{
dictTypeService.resetDictCache();
return AjaxResult.success();
}
/**
* 获取字典选择框列表
*/
@GetMapping("/optionselect")
public AjaxResult optionselect()
{
List<SysDictType> dictTypes = dictTypeService.selectDictTypeAll();
return AjaxResult.success(dictTypes);
}
}
package com.zehong.web.controller.system;
import java.util.List;
import java.util.Set;
import com.zehong.framework.systemsetting.SystemSetting;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import com.zehong.common.constant.Constants;
import com.zehong.common.core.domain.AjaxResult;
import com.zehong.common.core.domain.entity.SysMenu;
import com.zehong.common.core.domain.entity.SysUser;
import com.zehong.common.core.domain.model.LoginBody;
import com.zehong.common.core.domain.model.LoginUser;
import com.zehong.common.utils.ServletUtils;
import com.zehong.framework.web.service.SysLoginService;
import com.zehong.framework.web.service.SysPermissionService;
import com.zehong.framework.web.service.TokenService;
import com.zehong.system.service.ISysMenuService;
/**
* 登录验证
*
* @author zehong
*/
@RestController
public class SysLoginController
{
@Autowired
private SysLoginService loginService;
@Autowired
private ISysMenuService menuService;
@Autowired
private SysPermissionService permissionService;
@Autowired
private TokenService tokenService;
@Autowired
private SystemSetting systemSetting;
/**
* 登录方法
*
* @param loginBody 登录信息
* @return 结果
*/
@PostMapping("/login")
public AjaxResult login(@RequestBody LoginBody loginBody)
{
AjaxResult ajax = AjaxResult.success();
// 生成令牌
String token = loginService.login(loginBody.getUsername(), loginBody.getPassword(), loginBody.getCode(),
loginBody.getUuid());
ajax.put(Constants.TOKEN, token);
return ajax;
}
/**
* 获取用户信息
*
* @return 用户信息
*/
@GetMapping("getInfo")
public AjaxResult getInfo()
{
LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
SysUser user = loginUser.getUser();
// 角色集合
Set<String> roles = permissionService.getRolePermission(user);
// 权限集合
Set<String> permissions = permissionService.getMenuPermission(user);
AjaxResult ajax = AjaxResult.success();
ajax.put("user", user);
ajax.put("roles", roles);
ajax.put("permissions", permissions);
ajax.put("systemSetting",systemSetting.getSystemWebSetting());
return ajax;
}
/**
* 获取路由信息
*
* @return 路由信息
*/
@GetMapping("getRouters")
public AjaxResult getRouters()
{
LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
// 用户信息
SysUser user = loginUser.getUser();
List<SysMenu> menus = menuService.selectMenuTreeByUserId(user.getUserId());
return AjaxResult.success(menuService.buildMenus(menus));
}
}
package com.zehong.web.controller.system;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.DeleteMapping;
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.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.zehong.common.annotation.Log;
import com.zehong.common.constant.Constants;
import com.zehong.common.constant.UserConstants;
import com.zehong.common.core.controller.BaseController;
import com.zehong.common.core.domain.AjaxResult;
import com.zehong.common.core.domain.entity.SysMenu;
import com.zehong.common.core.domain.model.LoginUser;
import com.zehong.common.enums.BusinessType;
import com.zehong.common.utils.SecurityUtils;
import com.zehong.common.utils.ServletUtils;
import com.zehong.common.utils.StringUtils;
import com.zehong.framework.web.service.TokenService;
import com.zehong.system.service.ISysMenuService;
/**
* 菜单信息
*
* @author zehong
*/
@RestController
@RequestMapping("/system/menu")
public class SysMenuController extends BaseController
{
@Autowired
private ISysMenuService menuService;
@Autowired
private TokenService tokenService;
/**
* 获取菜单列表
*/
@PreAuthorize("@ss.hasPermi('system:menu:list')")
@GetMapping("/list")
public AjaxResult list(SysMenu menu)
{
LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
Long userId = loginUser.getUser().getUserId();
List<SysMenu> menus = menuService.selectMenuList(menu, userId);
return AjaxResult.success(menus);
}
/**
* 根据菜单编号获取详细信息
*/
@PreAuthorize("@ss.hasPermi('system:menu:query')")
@GetMapping(value = "/{menuId}")
public AjaxResult getInfo(@PathVariable Long menuId)
{
return AjaxResult.success(menuService.selectMenuById(menuId));
}
/**
* 获取菜单下拉树列表
*/
@GetMapping("/treeselect")
public AjaxResult treeselect(SysMenu menu)
{
LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
Long userId = loginUser.getUser().getUserId();
List<SysMenu> menus = menuService.selectMenuList(menu, userId);
return AjaxResult.success(menuService.buildMenuTreeSelect(menus));
}
/**
* 加载对应角色菜单列表树
*/
@GetMapping(value = "/roleMenuTreeselect/{roleId}")
public AjaxResult roleMenuTreeselect(@PathVariable("roleId") Long roleId)
{
LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
List<SysMenu> menus = menuService.selectMenuList(loginUser.getUser().getUserId());
AjaxResult ajax = AjaxResult.success();
ajax.put("checkedKeys", menuService.selectMenuListByRoleId(roleId));
ajax.put("menus", menuService.buildMenuTreeSelect(menus));
return ajax;
}
/**
* 新增菜单
*/
@PreAuthorize("@ss.hasPermi('system:menu:add')")
@Log(title = "菜单管理", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@Validated @RequestBody SysMenu menu)
{
if (UserConstants.NOT_UNIQUE.equals(menuService.checkMenuNameUnique(menu)))
{
return AjaxResult.error("新增菜单'" + menu.getMenuName() + "'失败,菜单名称已存在");
}
else if (UserConstants.YES_FRAME.equals(menu.getIsFrame())
&& !StringUtils.startsWithAny(menu.getPath(), Constants.HTTP, Constants.HTTPS))
{
return AjaxResult.error("新增菜单'" + menu.getMenuName() + "'失败,地址必须以http(s)://开头");
}
menu.setCreateBy(SecurityUtils.getUsername());
return toAjax(menuService.insertMenu(menu));
}
/**
* 修改菜单
*/
@PreAuthorize("@ss.hasPermi('system:menu:edit')")
@Log(title = "菜单管理", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@Validated @RequestBody SysMenu menu)
{
if (UserConstants.NOT_UNIQUE.equals(menuService.checkMenuNameUnique(menu)))
{
return AjaxResult.error("修改菜单'" + menu.getMenuName() + "'失败,菜单名称已存在");
}
else if (UserConstants.YES_FRAME.equals(menu.getIsFrame())
&& !StringUtils.startsWithAny(menu.getPath(), Constants.HTTP, Constants.HTTPS))
{
return AjaxResult.error("修改菜单'" + menu.getMenuName() + "'失败,地址必须以http(s)://开头");
}
else if (menu.getMenuId().equals(menu.getParentId()))
{
return AjaxResult.error("修改菜单'" + menu.getMenuName() + "'失败,上级菜单不能选择自己");
}
menu.setUpdateBy(SecurityUtils.getUsername());
return toAjax(menuService.updateMenu(menu));
}
/**
* 删除菜单
*/
@PreAuthorize("@ss.hasPermi('system:menu:remove')")
@Log(title = "菜单管理", businessType = BusinessType.DELETE)
@DeleteMapping("/{menuId}")
public AjaxResult remove(@PathVariable("menuId") Long menuId)
{
if (menuService.hasChildByMenuId(menuId))
{
return AjaxResult.error("存在子菜单,不允许删除");
}
if (menuService.checkMenuExistRole(menuId))
{
return AjaxResult.error("菜单已分配,不允许删除");
}
return toAjax(menuService.deleteMenuById(menuId));
}
}
\ No newline at end of file
package com.zehong.web.controller.system;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.DeleteMapping;
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.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.zehong.common.annotation.Log;
import com.zehong.common.core.controller.BaseController;
import com.zehong.common.core.domain.AjaxResult;
import com.zehong.common.core.page.TableDataInfo;
import com.zehong.common.enums.BusinessType;
import com.zehong.common.utils.SecurityUtils;
import com.zehong.system.domain.SysNotice;
import com.zehong.system.service.ISysNoticeService;
/**
* 公告 信息操作处理
*
* @author zehong
*/
@RestController
@RequestMapping("/system/notice")
public class SysNoticeController extends BaseController
{
@Autowired
private ISysNoticeService noticeService;
/**
* 获取通知公告列表
*/
@PreAuthorize("@ss.hasPermi('system:notice:list')")
@GetMapping("/list")
public TableDataInfo list(SysNotice notice)
{
startPage();
List<SysNotice> list = noticeService.selectNoticeList(notice);
return getDataTable(list);
}
/**
* 根据通知公告编号获取详细信息
*/
@PreAuthorize("@ss.hasPermi('system:notice:query')")
@GetMapping(value = "/{noticeId}")
public AjaxResult getInfo(@PathVariable Long noticeId)
{
return AjaxResult.success(noticeService.selectNoticeById(noticeId));
}
/**
* 新增通知公告
*/
@PreAuthorize("@ss.hasPermi('system:notice:add')")
@Log(title = "通知公告", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@Validated @RequestBody SysNotice notice)
{
notice.setCreateBy(SecurityUtils.getUsername());
return toAjax(noticeService.insertNotice(notice));
}
/**
* 修改通知公告
*/
@PreAuthorize("@ss.hasPermi('system:notice:edit')")
@Log(title = "通知公告", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@Validated @RequestBody SysNotice notice)
{
notice.setUpdateBy(SecurityUtils.getUsername());
return toAjax(noticeService.updateNotice(notice));
}
/**
* 删除通知公告
*/
@PreAuthorize("@ss.hasPermi('system:notice:remove')")
@Log(title = "通知公告", businessType = BusinessType.DELETE)
@DeleteMapping("/{noticeIds}")
public AjaxResult remove(@PathVariable Long[] noticeIds)
{
return toAjax(noticeService.deleteNoticeByIds(noticeIds));
}
}
package com.zehong.web.controller.system;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.DeleteMapping;
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.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.zehong.common.annotation.Log;
import com.zehong.common.constant.UserConstants;
import com.zehong.common.core.controller.BaseController;
import com.zehong.common.core.domain.AjaxResult;
import com.zehong.common.core.page.TableDataInfo;
import com.zehong.common.enums.BusinessType;
import com.zehong.common.utils.SecurityUtils;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.system.domain.SysPost;
import com.zehong.system.service.ISysPostService;
/**
* 岗位信息操作处理
*
* @author zehong
*/
@RestController
@RequestMapping("/system/post")
public class SysPostController extends BaseController
{
@Autowired
private ISysPostService postService;
/**
* 获取岗位列表
*/
@PreAuthorize("@ss.hasPermi('system:post:list')")
@GetMapping("/list")
public TableDataInfo list(SysPost post)
{
startPage();
List<SysPost> list = postService.selectPostList(post);
return getDataTable(list);
}
@Log(title = "岗位管理", businessType = BusinessType.EXPORT)
@PreAuthorize("@ss.hasPermi('system:post:export')")
@GetMapping("/export")
public AjaxResult export(SysPost post)
{
List<SysPost> list = postService.selectPostList(post);
ExcelUtil<SysPost> util = new ExcelUtil<SysPost>(SysPost.class);
return util.exportExcel(list, "岗位数据");
}
/**
* 根据岗位编号获取详细信息
*/
@PreAuthorize("@ss.hasPermi('system:post:query')")
@GetMapping(value = "/{postId}")
public AjaxResult getInfo(@PathVariable Long postId)
{
return AjaxResult.success(postService.selectPostById(postId));
}
/**
* 新增岗位
*/
@PreAuthorize("@ss.hasPermi('system:post:add')")
@Log(title = "岗位管理", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@Validated @RequestBody SysPost post)
{
if (UserConstants.NOT_UNIQUE.equals(postService.checkPostNameUnique(post)))
{
return AjaxResult.error("新增岗位'" + post.getPostName() + "'失败,岗位名称已存在");
}
else if (UserConstants.NOT_UNIQUE.equals(postService.checkPostCodeUnique(post)))
{
return AjaxResult.error("新增岗位'" + post.getPostName() + "'失败,岗位编码已存在");
}
post.setCreateBy(SecurityUtils.getUsername());
return toAjax(postService.insertPost(post));
}
/**
* 修改岗位
*/
@PreAuthorize("@ss.hasPermi('system:post:edit')")
@Log(title = "岗位管理", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@Validated @RequestBody SysPost post)
{
if (UserConstants.NOT_UNIQUE.equals(postService.checkPostNameUnique(post)))
{
return AjaxResult.error("修改岗位'" + post.getPostName() + "'失败,岗位名称已存在");
}
else if (UserConstants.NOT_UNIQUE.equals(postService.checkPostCodeUnique(post)))
{
return AjaxResult.error("修改岗位'" + post.getPostName() + "'失败,岗位编码已存在");
}
post.setUpdateBy(SecurityUtils.getUsername());
return toAjax(postService.updatePost(post));
}
/**
* 删除岗位
*/
@PreAuthorize("@ss.hasPermi('system:post:remove')")
@Log(title = "岗位管理", businessType = BusinessType.DELETE)
@DeleteMapping("/{postIds}")
public AjaxResult remove(@PathVariable Long[] postIds)
{
return toAjax(postService.deletePostByIds(postIds));
}
/**
* 获取岗位选择框列表
*/
@GetMapping("/optionselect")
public AjaxResult optionselect()
{
List<SysPost> posts = postService.selectPostAll();
return AjaxResult.success(posts);
}
}
package com.zehong.web.controller.system;
import java.io.IOException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
import com.zehong.common.annotation.Log;
import com.zehong.common.config.ProjectNameConfig;
import com.zehong.common.constant.UserConstants;
import com.zehong.common.core.controller.BaseController;
import com.zehong.common.core.domain.AjaxResult;
import com.zehong.common.core.domain.entity.SysUser;
import com.zehong.common.core.domain.model.LoginUser;
import com.zehong.common.enums.BusinessType;
import com.zehong.common.utils.SecurityUtils;
import com.zehong.common.utils.ServletUtils;
import com.zehong.common.utils.StringUtils;
import com.zehong.common.utils.file.FileUploadUtils;
import com.zehong.framework.web.service.TokenService;
import com.zehong.system.service.ISysUserService;
/**
* 个人信息 业务处理
*
* @author zehong
*/
@RestController
@RequestMapping("/system/user/profile")
public class SysProfileController extends BaseController
{
@Autowired
private ISysUserService userService;
@Autowired
private TokenService tokenService;
/**
* 个人信息
*/
@GetMapping
public AjaxResult profile()
{
LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
SysUser user = loginUser.getUser();
AjaxResult ajax = AjaxResult.success(user);
ajax.put("roleGroup", userService.selectUserRoleGroup(loginUser.getUsername()));
ajax.put("postGroup", userService.selectUserPostGroup(loginUser.getUsername()));
return ajax;
}
/**
* 修改用户
*/
@Log(title = "个人信息", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult updateProfile(@RequestBody SysUser user)
{
if (StringUtils.isNotEmpty(user.getPhonenumber())
&& UserConstants.NOT_UNIQUE.equals(userService.checkPhoneUnique(user)))
{
return AjaxResult.error("修改用户'" + user.getUserName() + "'失败,手机号码已存在");
}
if (StringUtils.isNotEmpty(user.getEmail())
&& UserConstants.NOT_UNIQUE.equals(userService.checkEmailUnique(user)))
{
return AjaxResult.error("修改用户'" + user.getUserName() + "'失败,邮箱账号已存在");
}
if (userService.updateUserProfile(user) > 0)
{
LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
// 更新缓存用户信息
loginUser.getUser().setNickName(user.getNickName());
loginUser.getUser().setPhonenumber(user.getPhonenumber());
loginUser.getUser().setEmail(user.getEmail());
loginUser.getUser().setSex(user.getSex());
tokenService.setLoginUser(loginUser);
return AjaxResult.success();
}
return AjaxResult.error("修改个人信息异常,请联系管理员");
}
/**
* 重置密码
*/
@Log(title = "个人信息", businessType = BusinessType.UPDATE)
@PutMapping("/updatePwd")
public AjaxResult updatePwd(String oldPassword, String newPassword)
{
LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
String userName = loginUser.getUsername();
String password = loginUser.getPassword();
if (!SecurityUtils.matchesPassword(oldPassword, password))
{
return AjaxResult.error("修改密码失败,旧密码错误");
}
if (SecurityUtils.matchesPassword(newPassword, password))
{
return AjaxResult.error("新密码不能与旧密码相同");
}
if (userService.resetUserPwd(userName, SecurityUtils.encryptPassword(newPassword)) > 0)
{
// 更新缓存用户密码
loginUser.getUser().setPassword(SecurityUtils.encryptPassword(newPassword));
tokenService.setLoginUser(loginUser);
return AjaxResult.success();
}
return AjaxResult.error("修改密码异常,请联系管理员");
}
/**
* 头像上传
*/
@Log(title = "用户头像", businessType = BusinessType.UPDATE)
@PostMapping("/avatar")
public AjaxResult avatar(@RequestParam("avatarfile") MultipartFile file) throws IOException
{
if (!file.isEmpty())
{
LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
String avatar = FileUploadUtils.upload(ProjectNameConfig.getAvatarPath(), file);
if (userService.updateUserAvatar(loginUser.getUsername(), avatar))
{
AjaxResult ajax = AjaxResult.success();
ajax.put("imgUrl", avatar);
// 更新缓存用户头像
loginUser.getUser().setAvatar(avatar);
tokenService.setLoginUser(loginUser);
return ajax;
}
}
return AjaxResult.error("上传图片异常,请联系管理员");
}
}
package com.zehong.web.controller.system;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.DeleteMapping;
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.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.zehong.common.annotation.Log;
import com.zehong.common.constant.UserConstants;
import com.zehong.common.core.controller.BaseController;
import com.zehong.common.core.domain.AjaxResult;
import com.zehong.common.core.domain.entity.SysRole;
import com.zehong.common.core.domain.model.LoginUser;
import com.zehong.common.core.page.TableDataInfo;
import com.zehong.common.enums.BusinessType;
import com.zehong.common.utils.SecurityUtils;
import com.zehong.common.utils.ServletUtils;
import com.zehong.common.utils.StringUtils;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.framework.web.service.SysPermissionService;
import com.zehong.framework.web.service.TokenService;
import com.zehong.system.service.ISysRoleService;
import com.zehong.system.service.ISysUserService;
/**
* 角色信息
*
* @author zehong
*/
@RestController
@RequestMapping("/system/role")
public class SysRoleController extends BaseController
{
@Autowired
private ISysRoleService roleService;
@Autowired
private TokenService tokenService;
@Autowired
private SysPermissionService permissionService;
@Autowired
private ISysUserService userService;
@PreAuthorize("@ss.hasPermi('system:role:list')")
@GetMapping("/list")
public TableDataInfo list(SysRole role)
{
startPage();
List<SysRole> list = roleService.selectRoleList(role);
return getDataTable(list);
}
@Log(title = "角色管理", businessType = BusinessType.EXPORT)
@PreAuthorize("@ss.hasPermi('system:role:export')")
@GetMapping("/export")
public AjaxResult export(SysRole role)
{
List<SysRole> list = roleService.selectRoleList(role);
ExcelUtil<SysRole> util = new ExcelUtil<SysRole>(SysRole.class);
return util.exportExcel(list, "角色数据");
}
/**
* 根据角色编号获取详细信息
*/
@PreAuthorize("@ss.hasPermi('system:role:query')")
@GetMapping(value = "/{roleId}")
public AjaxResult getInfo(@PathVariable Long roleId)
{
return AjaxResult.success(roleService.selectRoleById(roleId));
}
/**
* 新增角色
*/
@PreAuthorize("@ss.hasPermi('system:role:add')")
@Log(title = "角色管理", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@Validated @RequestBody SysRole role)
{
if (UserConstants.NOT_UNIQUE.equals(roleService.checkRoleNameUnique(role)))
{
return AjaxResult.error("新增角色'" + role.getRoleName() + "'失败,角色名称已存在");
}
else if (UserConstants.NOT_UNIQUE.equals(roleService.checkRoleKeyUnique(role)))
{
return AjaxResult.error("新增角色'" + role.getRoleName() + "'失败,角色权限已存在");
}
role.setCreateBy(SecurityUtils.getUsername());
return toAjax(roleService.insertRole(role));
}
/**
* 修改保存角色
*/
@PreAuthorize("@ss.hasPermi('system:role:edit')")
@Log(title = "角色管理", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@Validated @RequestBody SysRole role)
{
roleService.checkRoleAllowed(role);
if (UserConstants.NOT_UNIQUE.equals(roleService.checkRoleNameUnique(role)))
{
return AjaxResult.error("修改角色'" + role.getRoleName() + "'失败,角色名称已存在");
}
else if (UserConstants.NOT_UNIQUE.equals(roleService.checkRoleKeyUnique(role)))
{
return AjaxResult.error("修改角色'" + role.getRoleName() + "'失败,角色权限已存在");
}
role.setUpdateBy(SecurityUtils.getUsername());
if (roleService.updateRole(role) > 0)
{
// 更新缓存用户权限
LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
if (StringUtils.isNotNull(loginUser.getUser()) && !loginUser.getUser().isAdmin())
{
loginUser.setPermissions(permissionService.getMenuPermission(loginUser.getUser()));
loginUser.setUser(userService.selectUserByUserName(loginUser.getUser().getUserName()));
tokenService.setLoginUser(loginUser);
}
return AjaxResult.success();
}
return AjaxResult.error("修改角色'" + role.getRoleName() + "'失败,请联系管理员");
}
/**
* 修改保存数据权限
*/
@PreAuthorize("@ss.hasPermi('system:role:edit')")
@Log(title = "角色管理", businessType = BusinessType.UPDATE)
@PutMapping("/dataScope")
public AjaxResult dataScope(@RequestBody SysRole role)
{
roleService.checkRoleAllowed(role);
return toAjax(roleService.authDataScope(role));
}
/**
* 状态修改
*/
@PreAuthorize("@ss.hasPermi('system:role:edit')")
@Log(title = "角色管理", businessType = BusinessType.UPDATE)
@PutMapping("/changeStatus")
public AjaxResult changeStatus(@RequestBody SysRole role)
{
roleService.checkRoleAllowed(role);
role.setUpdateBy(SecurityUtils.getUsername());
return toAjax(roleService.updateRoleStatus(role));
}
/**
* 删除角色
*/
@PreAuthorize("@ss.hasPermi('system:role:remove')")
@Log(title = "角色管理", businessType = BusinessType.DELETE)
@DeleteMapping("/{roleIds}")
public AjaxResult remove(@PathVariable Long[] roleIds)
{
return toAjax(roleService.deleteRoleByIds(roleIds));
}
/**
* 获取角色选择框列表
*/
@PreAuthorize("@ss.hasPermi('system:role:query')")
@GetMapping("/optionselect")
public AjaxResult optionselect()
{
return AjaxResult.success(roleService.selectRoleAll());
}
}
package com.zehong.web.controller.tool;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import com.zehong.common.core.controller.BaseController;
/**
* swagger 接口
*
* @author zehong
*/
@Controller
@RequestMapping("/tool/swagger")
public class SwaggerController extends BaseController
{
@PreAuthorize("@ss.hasPermi('tool:swagger:view')")
@GetMapping()
public String index()
{
return redirect("/swagger-ui.html");
}
}
package com.zehong.web.controller.workPermit;
public enum WorkPermitEnum {
SAFEANALYSE("safeAnalyse"),APPROVAL("approval"),REVIEW("review"),WORKPERMIT("workPermit"),CHECK("check"),WORKING("working"),MOVE("move"),CLOSE("close");
private final String value;
WorkPermitEnum(String value) {
this.value = value;
}
public String getValue() {
return value;
}
}
restart.include.json=/com.alibaba.fastjson.*.jar
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Application Version: ${zehong.version}
Spring Boot Version: ${spring-boot.version}
////////////////////////////////////////////////////////////////////
// _ooOoo_ //
// o8888888o //
// 88" . "88 //
// (| ^_^ |) //
// O\ = /O //
// ____/`---'\____ //
// .' \\| |// `. //
// / \\||| : |||// \ //
// / _||||| -:- |||||- \ //
// | | \\\ - /// | | //
// | \_| ''\---/'' | | //
// \ .-\__ `-` ___/-. / //
// ___`. .' /--.--\ `. . ___ //
// ."" '< `.___\_<|>_/___.' >'"". //
// | | : `- \`.;`\ _ /`;.`/ - ` : | | //
// \ \ `-. \_ __\ /__ _/ .-` / / //
// ========`-.____`-.___\_____/___.-`____.-'======== //
// `=---=' //
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ //
// 佛祖保佑 永不宕机 永无BUG //
////////////////////////////////////////////////////////////////////
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment