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

项目名称修改

parent fcc0585c

Too many changes to show.

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

<?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>huaxin-admin</artifactId>
<description>
web服务入口
</description>
<dependencies>
<!-- spring-boot-devtools -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional> <!-- 表示依赖不会传递 -->
</dependency>
<!--&lt;!&ndash; swagger3&ndash;&gt;-->
<!--<dependency>-->
<!--<groupId>io.springfox</groupId>-->
<!--<artifactId>springfox-boot-starter</artifactId>-->
<!--</dependency>-->
<!--&lt;!&ndash; 防止进入swagger页面报类型转换错误,排除3.0.0中的引用,手动增加1.6.2版本 &ndash;&gt;-->
<!--<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>huaxin-framework</artifactId>
</dependency>
<!-- 定时任务-->
<dependency>
<groupId>com.zehong</groupId>
<artifactId>huaxin-quartz</artifactId>
</dependency>
<!-- 代码生成-->
<dependency>
<groupId>com.zehong</groupId>
<artifactId>huaxin-generator</artifactId>
</dependency>
<!--海康-->
<dependency>
<groupId>com.hikvision.ga</groupId>
<artifactId>artemis-http-client</artifactId>
<version>1.1.3</version>
</dependency>
</dependencies>
<build>
<finalName>huaxin-${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}/huaxin-${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}/huaxin-${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}/huaxin-${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}/huaxin-${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 HuaXinApplication
{
public static void main(String[] args)
{
// System.setProperty("spring.devtools.restart.enabled", "false");
SpringApplication.run(HuaXinApplication.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 HuaXinServletInitializer extends SpringBootServletInitializer
{
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application)
{
return application.sources(HuaXinApplication.class);
}
}
package com.zehong.web.controller.baseinfo;
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.TArea;
import com.zehong.system.service.ITAreaService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 地区县镇Controller
*
* @author zehong
* @date 2023-11-03
*/
@RestController
@RequestMapping("/system/area")
public class TAreaController extends BaseController
{
@Autowired
private ITAreaService tAreaService;
/**
* 查询地区县镇列表
*/
//@PreAuthorize("@ss.hasPermi('system:area:list')")
@GetMapping("/list")
public TableDataInfo list(TArea tArea)
{
startPage();
List<TArea> list = tAreaService.selectTAreaList(tArea);
return getDataTable(list);
}
/**
* 地区列表
* @return
*/
@GetMapping("/aLLAreaListInfo")
public AjaxResult aLLAreaListInfo(TArea tArea){
return AjaxResult.success(tAreaService.selectTAreaList(tArea));
}
/**
* 导出地区县镇列表
*/
//@PreAuthorize("@ss.hasPermi('system:area:export')")
@Log(title = "地区县镇", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TArea tArea)
{
List<TArea> list = tAreaService.selectTAreaList(tArea);
ExcelUtil<TArea> util = new ExcelUtil<TArea>(TArea.class);
return util.exportExcel(list, "地区县镇数据");
}
/**
* 获取地区县镇详细信息
*/
//@PreAuthorize("@ss.hasPermi('system:area:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(tAreaService.selectTAreaById(id));
}
/**
* 新增地区县镇
*/
//@PreAuthorize("@ss.hasPermi('system:area:add')")
@Log(title = "地区县镇", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TArea tArea)
{
return toAjax(tAreaService.insertTArea(tArea));
}
/**
* 修改地区县镇
*/
//@PreAuthorize("@ss.hasPermi('system:area:edit')")
@Log(title = "地区县镇", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TArea tArea)
{
return toAjax(tAreaService.updateTArea(tArea));
}
/**
* 删除地区县镇
*/
//@PreAuthorize("@ss.hasPermi('system:area:remove')")
@Log(title = "地区县镇", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(tAreaService.deleteTAreaByIds(ids));
}
}
package com.zehong.web.controller.baseinfo;
import java.util.List;
import com.zehong.system.domain.TArea;
import com.zehong.system.service.ITAreaService;
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.TBusiness;
import com.zehong.system.service.ITBusinessService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 工商业用户Controller
*
* @author zehong
* @date 2023-11-03
*/
@RestController
@RequestMapping("/baseInfo/business")
public class TBusinessController extends BaseController
{
@Autowired
private ITBusinessService tBusinessService;
@Autowired
private ITAreaService tAreaService;
/**
* 查询工商业用户列表
*/
//@PreAuthorize("@ss.hasPermi('baseInfo:business:list')")
@GetMapping("/list")
public TableDataInfo list(TBusiness tBusiness)
{
startPage();
List<TBusiness> list = tBusinessService.selectTBusinessList(tBusiness);
return getDataTable(list);
}
/**
* 导出工商业用户列表
*/
//@PreAuthorize("@ss.hasPermi('baseInfo:business:export')")
@Log(title = "工商业用户", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TBusiness tBusiness)
{
List<TBusiness> list = tBusinessService.selectTBusinessList(tBusiness);
for(TBusiness business : list){
if(null != business.getCity()){
TArea county = tAreaService.selectTAreaById(business.getCity());
business.setCityName(null != county.getAreaName() ? county.getAreaName() : "");
}
if(null != business.getCounty()){
TArea county = tAreaService.selectTAreaById(business.getCounty());
business.setCountyName(null != county.getAreaName() ? county.getAreaName() : "");
}
if(null != business.getStreet()){
TArea stree = tAreaService.selectTAreaById(business.getStreet());
business.setStreetName(null !=stree ? stree.getAreaName() : "");
}
}
ExcelUtil<TBusiness> util = new ExcelUtil<TBusiness>(TBusiness.class);
return util.exportExcel(list, "工商业用户数据");
}
/**
* 获取工商业用户详细信息
*/
//@PreAuthorize("@ss.hasPermi('baseInfo:business:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(tBusinessService.selectTBusinessById(id));
}
@GetMapping(value = "businessInfo/{id}")
public AjaxResult getBusinessInfo(@PathVariable("id") Long id){
return AjaxResult.success(tBusinessService.selectTBusinessById(id));
}
/**
* 新增工商业用户
*/
//@PreAuthorize("@ss.hasPermi('baseInfo:business:add')")
@Log(title = "工商业用户", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TBusiness tBusiness)
{
return toAjax(tBusinessService.insertTBusiness(tBusiness));
}
/**
* 修改工商业用户
*/
//@PreAuthorize("@ss.hasPermi('baseInfo:business:edit')")
@Log(title = "工商业用户", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TBusiness tBusiness)
{
return toAjax(tBusinessService.updateTBusiness(tBusiness));
}
/**
* 删除工商业用户
*/
//@PreAuthorize("@ss.hasPermi('baseInfo:business:remove')")
@Log(title = "工商业用户", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(tBusinessService.deleteTBusinessByIds(ids));
}
}
package com.zehong.web.controller.baseinfo;
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.TCommunity;
import com.zehong.system.service.ITCommunityService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 居民小区(村)Controller
*
* @author zehong
* @date 2023-11-03
*/
@RestController
@RequestMapping("/system/community")
public class TCommunityController extends BaseController
{
@Autowired
private ITCommunityService tCommunityService;
/**
* 查询居民小区(村)列表
*/
//@PreAuthorize("@ss.hasPermi('system:community:list')")
@GetMapping("/list")
public TableDataInfo list(TCommunity tCommunity)
{
startPage();
List<TCommunity> list = tCommunityService.selectTCommunityList(tCommunity);
return getDataTable(list);
}
/**
* 小区列表
* @param tCommunity 小区实体
* @return
*/
@GetMapping("/communityList")
public AjaxResult communityList(TCommunity tCommunity){
List<TCommunity> list = tCommunityService.selectTCommunityList(tCommunity);
return AjaxResult.success(list);
}
/**
* 导出居民小区(村)列表
*/
//@PreAuthorize("@ss.hasPermi('system:community:export')")
@Log(title = "居民小区(村)", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TCommunity tCommunity)
{
List<TCommunity> list = tCommunityService.selectTCommunityList(tCommunity);
ExcelUtil<TCommunity> util = new ExcelUtil<TCommunity>(TCommunity.class);
return util.exportExcel(list, "居民小区(村)数据");
}
/**
* 获取居民小区(村)详细信息
*/
//@PreAuthorize("@ss.hasPermi('system:community:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(tCommunityService.selectTCommunityById(id));
}
/**
* 新增居民小区(村)
*/
//@PreAuthorize("@ss.hasPermi('system:community:add')")
@Log(title = "居民小区(村)", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TCommunity tCommunity)
{
return toAjax(tCommunityService.insertTCommunity(tCommunity));
}
/**
* 修改居民小区(村)
*/
//@PreAuthorize("@ss.hasPermi('system:community:edit')")
@Log(title = "居民小区(村)", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TCommunity tCommunity)
{
return toAjax(tCommunityService.updateTCommunity(tCommunity));
}
/**
* 删除居民小区(村)
*/
//@PreAuthorize("@ss.hasPermi('system:community:remove')")
@Log(title = "居民小区(村)", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(tCommunityService.deleteTCommunityByIds(ids));
}
}
package com.zehong.web.controller.baseinfo;
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.TDeviceInfo;
import com.zehong.system.service.ITDeviceInfoService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 设备信息Controller
*
* @author zehong
* @date 2023-11-01
*/
@RestController
@RequestMapping("/baseInfo/device")
public class TDeviceInfoController extends BaseController
{
@Autowired
private ITDeviceInfoService tDeviceInfoService;
/**
* 查询设备信息列表
*/
@PreAuthorize("@ss.hasPermi('baseInfo:device:list')")
@GetMapping("/list")
public TableDataInfo list(TDeviceInfo tDeviceInfo)
{
startPage();
List<TDeviceInfo> list = tDeviceInfoService.selectTDeviceInfoList(tDeviceInfo);
return getDataTable(list);
}
@GetMapping("/deviceInfoList")
public AjaxResult deviceInfoList(TDeviceInfo tDeviceInfo){
List<TDeviceInfo> list = tDeviceInfoService.selectTDeviceInfoList(tDeviceInfo);
return AjaxResult.success(list);
}
/**
* 导出设备信息列表
*/
@PreAuthorize("@ss.hasPermi('baseInfo:device:export')")
@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, "设备信息数据");
}
/**
* 获取设备信息详细信息
*/
@PreAuthorize("@ss.hasPermi('baseInfo:device:query')")
@GetMapping(value = "/{deviceId}")
public AjaxResult getInfo(@PathVariable("deviceId") Long deviceId)
{
return AjaxResult.success(tDeviceInfoService.selectTDeviceInfoById(deviceId));
}
/**
* 新增设备信息
*/
@PreAuthorize("@ss.hasPermi('baseInfo:device:add')")
@Log(title = "设备信息", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TDeviceInfo tDeviceInfo)
{
return toAjax(tDeviceInfoService.insertTDeviceInfo(tDeviceInfo));
}
/**
* 修改设备信息
*/
@PreAuthorize("@ss.hasPermi('baseInfo:device:edit')")
@Log(title = "设备信息", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TDeviceInfo tDeviceInfo)
{
return toAjax(tDeviceInfoService.updateTDeviceInfo(tDeviceInfo));
}
/**
* 删除设备信息
*/
@PreAuthorize("@ss.hasPermi('baseInfo:device:remove')")
@Log(title = "设备信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{deviceIds}")
public AjaxResult remove(@PathVariable Long[] deviceIds)
{
return toAjax(tDeviceInfoService.deleteTDeviceInfoByIds(deviceIds));
}
}
package com.zehong.web.controller.baseinfo;
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.TIndustry;
import com.zehong.system.service.ITIndustryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* 工业用户Controller
*
* @author zehong
* @date 2023-11-04
*/
@RestController
@RequestMapping("/baseinfo/industry")
public class TIndustryController extends BaseController
{
@Autowired
private ITIndustryService tIndustryService;
/**
* 查询工业用户列表
*/
//@PreAuthorize("@ss.hasPermi('baseinfo:industry:list')")
@GetMapping("/list")
public TableDataInfo list(TIndustry tIndustry)
{
startPage();
List<TIndustry> list = tIndustryService.selectTIndustryList(tIndustry);
return getDataTable(list);
}
/**
* 导出工业用户列表
*/
//@PreAuthorize("@ss.hasPermi('baseinfo:industry:export')")
@Log(title = "工业用户", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TIndustry tIndustry)
{
List<TIndustry> list = tIndustryService.selectTIndustryList(tIndustry);
ExcelUtil<TIndustry> util = new ExcelUtil<TIndustry>(TIndustry.class);
return util.exportExcel(list, "工业用户数据");
}
/**
* 获取工业用户详细信息
*/
//@PreAuthorize("@ss.hasPermi('baseinfo:industry:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(tIndustryService.selectTIndustryById(id));
}
@GetMapping(value = "industryInfo/{id}")
public AjaxResult getIndustryInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(tIndustryService.selectTIndustryById(id));
}
/**
* 新增工业用户
*/
//@PreAuthorize("@ss.hasPermi('baseinfo:industry:add')")
@Log(title = "工业用户", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TIndustry tIndustry)
{
return toAjax(tIndustryService.insertTIndustry(tIndustry));
}
/**
* 修改工业用户
*/
//@PreAuthorize("@ss.hasPermi('baseinfo:industry:edit')")
@Log(title = "工业用户", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TIndustry tIndustry)
{
return toAjax(tIndustryService.updateTIndustry(tIndustry));
}
/**
* 删除工业用户
*/
//@PreAuthorize("@ss.hasPermi('baseinfo:industry:remove')")
@Log(title = "工业用户", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(tIndustryService.deleteTIndustryByIds(ids));
}
/**
* 查询工业用户入户安检信息
* @param industry 工业用户信息
* @return
*/
@GetMapping("/getIndustryInspectInfo")
public TableDataInfo getIndustryInspectInfo(TIndustry industry){
startPage();
return getDataTable(tIndustryService.getIndustryInspectInfo(industry));
}
}
package com.zehong.web.controller.baseinfo;
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.TPipeInfo;
import com.zehong.system.service.ITPipeInfoService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 管道信息Controller
*
* @author zehong
* @date 2023-11-02
*/
@RestController
@RequestMapping("/baseInfo/pipe")
public class TPipeInfoController extends BaseController
{
@Autowired
private ITPipeInfoService tPipeInfoService;
/**
* 查询管道信息列表
*/
//@PreAuthorize("@ss.hasPermi('baseInfo:pipe:list')")
@GetMapping("/list")
public TableDataInfo list(TPipeInfo tPipeInfo)
{
startPage();
List<TPipeInfo> list = tPipeInfoService.selectTPipeInfoList(tPipeInfo);
return getDataTable(list);
}
@GetMapping("/pipeList")
public AjaxResult pipeList(TPipeInfo tPipeInfo)
{
List<TPipeInfo> list = tPipeInfoService.selectTPipeInfoList(tPipeInfo);
return AjaxResult.success(list);
}
/**
* 导出管道信息列表
*/
//@PreAuthorize("@ss.hasPermi('baseInfo:pipe:export')")
@Log(title = "管道信息", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TPipeInfo tPipeInfo)
{
List<TPipeInfo> list = tPipeInfoService.selectTPipeInfoList(tPipeInfo);
ExcelUtil<TPipeInfo> util = new ExcelUtil<TPipeInfo>(TPipeInfo.class);
return util.exportExcel(list, "管道信息数据");
}
/**
* 获取管道信息详细信息
*/
//@PreAuthorize("@ss.hasPermi('baseInfo:pipe:query')")
@GetMapping(value = "/{pipeId}")
public AjaxResult getInfo(@PathVariable("pipeId") Long pipeId)
{
return AjaxResult.success(tPipeInfoService.selectTPipeInfoById(pipeId));
}
/**
* 新增管道信息
*/
//@PreAuthorize("@ss.hasPermi('baseInfo:pipe:add')")
@Log(title = "管道信息", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TPipeInfo tPipeInfo)
{
return toAjax(tPipeInfoService.insertTPipeInfo(tPipeInfo));
}
/**
* 修改管道信息
*/
//@PreAuthorize("@ss.hasPermi('baseInfo:pipe:edit')")
@Log(title = "管道信息", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TPipeInfo tPipeInfo)
{
return toAjax(tPipeInfoService.updateTPipeInfo(tPipeInfo));
}
/**
* 删除管道信息
*/
//@PreAuthorize("@ss.hasPermi('baseInfo:pipe:remove')")
@Log(title = "管道信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{pipeIds}")
public AjaxResult remove(@PathVariable Long[] pipeIds)
{
return toAjax(tPipeInfoService.deleteTPipeInfoByIds(pipeIds));
}
/**
* 根据巡线查询管道信息
* @param tPipeInfo 管道信息
* @return
*/
@GetMapping("/selectPipeInfoByUser")
public AjaxResult selectPipeInfoByUser(TPipeInfo tPipeInfo){
return AjaxResult.success(tPipeInfoService.selectPipeInfoByUser(tPipeInfo));
}
}
package com.zehong.web.controller.baseinfo;
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.TPipePoint;
import com.zehong.system.service.ITPipePointService;
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 2023-11-15
*/
@RestController
@RequestMapping("/baseInfo/point")
public class TPipePointController extends BaseController
{
@Autowired
private ITPipePointService tPipePointService;
/**
* 查询管线打卡点列表
*/
//@PreAuthorize("@ss.hasPermi('baseInfo:point:list')")
@GetMapping("/list")
public TableDataInfo list(TPipePoint tPipePoint)
{
startPage();
List<TPipePoint> list = tPipePointService.selectTPipePointList(tPipePoint);
return getDataTable(list);
}
@GetMapping("/pointInfoList")
public AjaxResult pointInfoList(TPipePoint tPipePoint)
{
List<TPipePoint> list = tPipePointService.selectTPipePointList(tPipePoint);
return AjaxResult.success(list);
}
/**
* 导出管线打卡点列表
*/
//@PreAuthorize("@ss.hasPermi('baseInfo:point:export')")
@Log(title = "管线打卡点", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TPipePoint tPipePoint)
{
List<TPipePoint> list = tPipePointService.selectTPipePointList(tPipePoint);
ExcelUtil<TPipePoint> util = new ExcelUtil<TPipePoint>(TPipePoint.class);
return util.exportExcel(list, "管线打卡点数据");
}
/**
* 获取管线打卡点详细信息
*/
//@PreAuthorize("@ss.hasPermi('baseInfo:point:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(tPipePointService.selectTPipePointById(id));
}
/**
* 新增管线打卡点
*/
//@PreAuthorize("@ss.hasPermi('baseInfo:point:add')")
@Log(title = "管线打卡点", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TPipePoint tPipePoint)
{
return toAjax(tPipePointService.insertTPipePoint(tPipePoint));
}
/**
* 修改管线打卡点
*/
// @PreAuthorize("@ss.hasPermi('baseInfo:point:edit')")
@Log(title = "管线打卡点", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TPipePoint tPipePoint)
{
return toAjax(tPipePointService.updateTPipePoint(tPipePoint));
}
/**
* 删除管线打卡点
*/
// @PreAuthorize("@ss.hasPermi('baseInfo:point:remove')")
@Log(title = "管线打卡点", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(tPipePointService.deleteTPipePointByIds(ids));
}
/**
* 获取管线打卡点
* @param pipeType 管线类型
* @return
*/
@GetMapping("/selectPointDetail")
public AjaxResult selectPointDetail(@RequestParam(value = "pipeType") String pipeType){
return AjaxResult.success(tPipePointService.selectPointDetail(pipeType));
}
}
package com.zehong.web.controller.baseinfo;
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.TSiteStationInfo;
import com.zehong.system.service.ITSiteStationInfoService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 场站信息Controller
*
* @author zehong
* @date 2023-11-02
*/
@RestController
@RequestMapping("/baseInfo/station")
public class TSiteStationInfoController extends BaseController
{
@Autowired
private ITSiteStationInfoService tSiteStationInfoService;
/**
* 查询场站信息列表
*/
//@PreAuthorize("@ss.hasPermi('baseInfo:station:list')")
@GetMapping("/list")
public TableDataInfo list(TSiteStationInfo tSiteStationInfo)
{
startPage();
List<TSiteStationInfo> list = tSiteStationInfoService.selectTSiteStationInfoList(tSiteStationInfo);
return getDataTable(list);
}
@GetMapping("/stationInfoList")
public AjaxResult stationInfoList(TSiteStationInfo tSiteStationInfo){
List<TSiteStationInfo> list = tSiteStationInfoService.selectTSiteStationInfoList(tSiteStationInfo);
return AjaxResult.success(list);
}
/**
* 小程序 巡检状态
* @param tSiteStationInfo
* @return
*/
@GetMapping("/stationlist")
public TableDataInfo stationInspectList(TSiteStationInfo tSiteStationInfo)
{
startPage();
List<TSiteStationInfo> list = tSiteStationInfoService.stationInspectList(tSiteStationInfo);
return getDataTable(list);
}
/**
* 导出场站信息列表
*/
//@PreAuthorize("@ss.hasPermi('baseInfo:station:export')")
@Log(title = "场站信息", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TSiteStationInfo tSiteStationInfo)
{
List<TSiteStationInfo> list = tSiteStationInfoService.selectTSiteStationInfoList(tSiteStationInfo);
ExcelUtil<TSiteStationInfo> util = new ExcelUtil<TSiteStationInfo>(TSiteStationInfo.class);
return util.exportExcel(list, "场站信息数据");
}
/**
* 获取场站信息详细信息
*/
//@PreAuthorize("@ss.hasPermi('baseInfo:station:query')")
@GetMapping(value = "/{siteStationId}")
public AjaxResult getInfo(@PathVariable("siteStationId") Long siteStationId)
{
return AjaxResult.success(tSiteStationInfoService.selectTSiteStationInfoById(siteStationId));
}
/**
* 获取安检模板
* @param stationId
* @return
*/
@GetMapping(value = "site/{stationId}")
public AjaxResult getJson(@PathVariable("stationId") Long stationId)
{
return AjaxResult.success(tSiteStationInfoService.selectStationJsonById(stationId));
}
/**
* 新增场站信息
*/
//@PreAuthorize("@ss.hasPermi('baseInfo:station:add')")
@Log(title = "场站信息", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TSiteStationInfo tSiteStationInfo)
{
return toAjax(tSiteStationInfoService.insertTSiteStationInfo(tSiteStationInfo));
}
/**
* 修改场站信息
*/
//@PreAuthorize("@ss.hasPermi('baseInfo:station:edit')")
@Log(title = "场站信息", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TSiteStationInfo tSiteStationInfo)
{
return toAjax(tSiteStationInfoService.updateTSiteStationInfo(tSiteStationInfo));
}
/**
* 删除场站信息
*/
//@PreAuthorize("@ss.hasPermi('baseInfo:station:remove')")
@Log(title = "场站信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{siteStationIds}")
public AjaxResult remove(@PathVariable Long[] siteStationIds)
{
return toAjax(tSiteStationInfoService.deleteTSiteStationInfoByIds(siteStationIds));
}
}
package com.zehong.web.controller.baseinfo;
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.TUser;
import com.zehong.system.service.ITUserService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 居民用户Controller
*
* @author zehong
* @date 2023-11-03
*/
@RestController
@RequestMapping("/system/jmuser")
public class TUserController extends BaseController
{
@Autowired
private ITUserService tUserService;
/**
* 查询居民用户列表
*/
//@PreAuthorize("@ss.hasPermi('system:user:list')")
@GetMapping("/list")
public TableDataInfo list(TUser tUser)
{
startPage();
List<TUser> list = tUserService.selectTUserList(tUser);
return getDataTable(list);
}
/**
* 导出居民用户列表
*/
//@PreAuthorize("@ss.hasPermi('system:user:export')")
@Log(title = "居民用户", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TUser tUser)
{
List<TUser> list = tUserService.selectTUserList(tUser);
ExcelUtil<TUser> util = new ExcelUtil<TUser>(TUser.class);
return util.exportExcel(list, "居民用户数据");
}
/**
* 获取居民用户详细信息
*/
//@PreAuthorize("@ss.hasPermi('system:user:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(tUserService.selectTUserById(id));
}
@GetMapping(value = "userInfo/{id}")
public AjaxResult getUserInfo(@PathVariable("id") Long id){
return AjaxResult.success(tUserService.selectTUserById(id));
}
/**
* 新增居民用户
*/
//@PreAuthorize("@ss.hasPermi('system:user:add')")
@Log(title = "居民用户", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TUser tUser)
{
return toAjax(tUserService.insertTUser(tUser));
}
/**
* 修改居民用户
*/
//@PreAuthorize("@ss.hasPermi('system:user:edit')")
@Log(title = "居民用户", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TUser tUser)
{
return toAjax(tUserService.updateTUser(tUser));
}
/**
* 删除居民用户
*/
//@PreAuthorize("@ss.hasPermi('system:user:remove')")
@Log(title = "居民用户", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(tUserService.deleteTUserByIds(ids));
}
}
package com.zehong.web.controller.book;
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.TFailure;
import com.zehong.system.service.ITFailureService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 事故台账Controller
*
* @author zehong
* @date 2023-12-20
*/
@RestController
@RequestMapping("/book/failure")
public class TFailureController extends BaseController
{
@Autowired
private ITFailureService tFailureService;
/**
* 查询事故台账列表
*/
//@PreAuthorize("@ss.hasPermi('book:failure:list')")
@GetMapping("/list")
public TableDataInfo list(TFailure tFailure)
{
startPage();
List<TFailure> list = tFailureService.selectTFailureList(tFailure);
return getDataTable(list);
}
/**
* 导出事故台账列表
*/
@PreAuthorize("@ss.hasPermi('book:failure:export')")
@Log(title = "事故台账", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TFailure tFailure)
{
List<TFailure> list = tFailureService.selectTFailureList(tFailure);
ExcelUtil<TFailure> util = new ExcelUtil<TFailure>(TFailure.class);
return util.exportExcel(list, "事故台账数据");
}
/**
* 获取事故台账详细信息
*/
//@PreAuthorize("@ss.hasPermi('book:failure:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(tFailureService.selectTFailureById(id));
}
/**
* 新增事故台账
*/
@PreAuthorize("@ss.hasPermi('book:failure:add')")
@Log(title = "事故台账", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TFailure tFailure)
{
return toAjax(tFailureService.insertTFailure(tFailure));
}
/**
* 修改事故台账
*/
@PreAuthorize("@ss.hasPermi('book:failure:edit')")
@Log(title = "事故台账", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TFailure tFailure)
{
return toAjax(tFailureService.updateTFailure(tFailure));
}
/**
* 删除事故台账
*/
@PreAuthorize("@ss.hasPermi('book:failure:remove')")
@Log(title = "事故台账", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(tFailureService.deleteTFailureByIds(ids));
}
}
package com.zehong.web.controller.checktask;
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.common.utils.SecurityUtils;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.CollectionUtils;
import org.springframework.web.bind.annotation.*;
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.TDanger;
import com.zehong.system.service.ITDangerService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 安检隐患整改Controller
*
* @author zehong
* @date 2023-11-09
*/
@RestController
@RequestMapping("/checkTask/danger")
public class TDangerController extends BaseController
{
@Autowired
private ITDangerService tDangerService;
/**
* 查询安检隐患整改列表
*/
// @PreAuthorize("@ss.hasPermi('checkTask:danger:list')")
@GetMapping("/list")
public TableDataInfo list(TDanger tDanger)
{
startPage();
List<SysRole> visitor = SecurityUtils.getLoginUser().getUser().getRoles().stream().filter(item ->"visitor".equals(item.getRoleKey())).collect(Collectors.toList());
if(!CollectionUtils.isEmpty(visitor)){
tDanger.setIsVisitor("1");
}
List<TDanger> list = tDangerService.selectTDangerList(tDanger);
return getDataTable(list);
}
@GetMapping("/dangerInfoList")
public TableDataInfo dangerInfoList(TDanger tDanger){
startPage();
SysUser user = SecurityUtils.getLoginUser().getUser();
//客服运营部
if(200 == user.getDeptId()){
tDanger.setAdminId(user.getUserId().intValue());
tDanger.setFlag(2);
}
//生产运营部
if(102 == user.getDeptId()){
tDanger.setAdminId(user.getUserId().intValue());
tDanger.setFlag(3);
}
//205 安全管理部
if(205 != user.getDeptId() && 200 != user.getDeptId() && 102 != user.getDeptId()){
tDanger.setAdminId(user.getUserId().intValue());
}
List<TDanger> list = tDangerService.selectTDangerList(tDanger);
return getDataTable(list);
}
/**
* 导出安检隐患整改列表
*/
// @PreAuthorize("@ss.hasPermi('checkTask:danger:export')")
@Log(title = "安检隐患整改", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TDanger tDanger)
{
List<SysRole> visitor = SecurityUtils.getLoginUser().getUser().getRoles().stream().filter(item ->"visitor".equals(item.getRoleKey())).collect(Collectors.toList());
if(!CollectionUtils.isEmpty(visitor)){
tDanger.setIsVisitor("1");
}
List<TDanger> list = tDangerService.selectTDangerList(tDanger);
ExcelUtil<TDanger> util = new ExcelUtil<TDanger>(TDanger.class);
return util.exportExcel(list, "安检隐患整改数据");
}
/**
* 获取安检隐患整改详细信息
*/
//@PreAuthorize("@ss.hasPermi('checkTask:danger:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(tDangerService.selectTDangerById(id));
}
/**
* 新增安检隐患整改
*/
// @PreAuthorize("@ss.hasPermi('checkTask:danger:add')")
@Log(title = "安检隐患整改", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TDanger tDanger)
{
Integer a = tDangerService.insertTDanger(tDanger);
return AjaxResult.success(tDanger.getId());
}
/**
* 修改安检隐患整改
*/
//@PreAuthorize("@ss.hasPermi('checkTask:danger:edit')")
@Log(title = "安检隐患整改", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TDanger tDanger)
{
return toAjax(tDangerService.updateTDanger(tDanger));
}
/**
* 删除安检隐患整改
*/
//@PreAuthorize("@ss.hasPermi('checkTask:danger:remove')")
@Log(title = "安检隐患整改", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(tDangerService.deleteTDangerByIds(ids));
}
/**
* 游客数据权限设置
* @param isVisitor 游客是否可访问
* @param ids 隐患主键
* @return
*/
@GetMapping("/dangerDataPermission")
public AjaxResult dangerDataVisitorPermission(@RequestParam(value="isVisitor")String isVisitor,@RequestParam(value="ids")Long[] ids){
return toAjax(tDangerService.dangerDataVisitorPermission(isVisitor,ids));
}
}
package com.zehong.web.controller.checktask;
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.TDangerStatus;
import com.zehong.system.service.ITDangerStatusService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 隐患状态记录Controller
*
* @author zehong
* @date 2023-12-01
*/
@RestController
@RequestMapping("/danger/status")
public class TDangerStatusController extends BaseController
{
@Autowired
private ITDangerStatusService tDangerStatusService;
/**
* 查询隐患状态记录列表
*/
//@PreAuthorize("@ss.hasPermi('system:status:list')")
@GetMapping("/list")
public TableDataInfo list(TDangerStatus tDangerStatus)
{
startPage();
List<TDangerStatus> list = tDangerStatusService.selectTDangerStatusList(tDangerStatus);
return getDataTable(list);
}
@GetMapping("/dangerStatusList")
public AjaxResult dangerStatusList(TDangerStatus tDangerStatus){
List<TDangerStatus> list = tDangerStatusService.selectTDangerStatusList(tDangerStatus);
return AjaxResult.success(list);
}
/**
* 导出隐患状态记录列表
*/
//@PreAuthorize("@ss.hasPermi('system:status:export')")
@Log(title = "隐患状态记录", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TDangerStatus tDangerStatus)
{
List<TDangerStatus> list = tDangerStatusService.selectTDangerStatusList(tDangerStatus);
ExcelUtil<TDangerStatus> util = new ExcelUtil<TDangerStatus>(TDangerStatus.class);
return util.exportExcel(list, "隐患状态记录数据");
}
/**
* 获取隐患状态记录详细信息
*/
//@PreAuthorize("@ss.hasPermi('system:status:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(tDangerStatusService.selectTDangerStatusById(id));
}
/**
* 新增隐患状态记录
*/
//@PreAuthorize("@ss.hasPermi('system:status:add')")
@Log(title = "隐患状态记录", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TDangerStatus tDangerStatus)
{
return toAjax(tDangerStatusService.insertTDangerStatus(tDangerStatus));
}
/**
* 修改隐患状态记录
*/
//@PreAuthorize("@ss.hasPermi('system:status:edit')")
@Log(title = "隐患状态记录", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TDangerStatus tDangerStatus)
{
return toAjax(tDangerStatusService.updateTDangerStatus(tDangerStatus));
}
/**
* 删除隐患状态记录
*/
//@PreAuthorize("@ss.hasPermi('system:status:remove')")
@Log(title = "隐患状态记录", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(tDangerStatusService.deleteTDangerStatusByIds(ids));
}
}
package com.zehong.web.controller.checktask;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.zehong.common.core.domain.model.LoginUser;
import com.zehong.common.utils.ServletUtils;
import com.zehong.common.utils.StringUtils;
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.*;
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.TTask;
import com.zehong.system.service.ITTaskService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 入户安检任务Controller
*
* @author zehong
* @date 2023-11-06
*/
@RestController
@RequestMapping("/checktask/task")
public class TTaskController extends BaseController
{
@Autowired
private ITTaskService tTaskService;
@Autowired
private TokenService tokenService;
/**
* 查询入户安检任务列表
*/
//@PreAuthorize("@ss.hasPermi('checktask:task:list')")
@GetMapping("/list")
public TableDataInfo list(TTask tTask)
{
startPage();
List<TTask> list = tTaskService.selectTTaskList(tTask);
return getDataTable(list);
}
/**
* 所有任务信息
* @param tTask 入参
* @return
*/
@GetMapping("/taskInfoList")
public AjaxResult taskInfoList(TTask tTask){
return AjaxResult.success( tTaskService.selectTTaskList(tTask));
}
/**
* 导出入户安检任务列表
*/
//@PreAuthorize("@ss.hasPermi('checktask:task:export')")
@Log(title = "入户安检任务", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TTask tTask)
{
List<TTask> list = tTaskService.selectTTaskList(tTask);
ExcelUtil<TTask> util = new ExcelUtil<TTask>(TTask.class);
return util.exportExcel(list, "入户安检任务数据");
}
/**
* 小程序r任务列表
* @param tTask
* @return
*/
@GetMapping("/selecttasknums")
public TableDataInfo selecttasknums(TTask tTask)
{
startPage();
List<TTask> list = tTaskService.selecttasknums(tTask);
return getDataTable(list);
}
/**
* 获取入户安检任务详细信息
*/
//@PreAuthorize("@ss.hasPermi('checktask:task:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(tTaskService.selectTTaskById(id));
}
/**
* 新增入户安检任务
*/
//@PreAuthorize("@ss.hasPermi('checktask:task:add')")
@Log(title = "入户安检任务", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TTask tTask)
{
LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
Long userId = loginUser.getUser().getUserId();
tTask.setAdminId(userId);
return toAjax(tTaskService.insertTTask(tTask));
}
/**
* 修改入户安检任务
*/
//@PreAuthorize("@ss.hasPermi('checktask:task:edit')")
@Log(title = "入户安检任务", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TTask tTask)
{
return toAjax(tTaskService.updateTTask(tTask));
}
/**
* 删除入户安检任务
*/
//@PreAuthorize("@ss.hasPermi('checktask:task:remove')")
@Log(title = "入户安检任务", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(tTaskService.deleteTTaskByIds(ids));
}
/**
* 根据任务类型获取最新任务
* @param type 任务类型
* @param checkType 工业安检类型
* @param taskType 居民用户安检类型
* @return
*/
@GetMapping("/selectCurrentTaskByType")
public AjaxResult selectCurrentTaskByType(@RequestParam(value="type") Integer type,@RequestParam(value="checkType",required = false) Integer checkType,@RequestParam(value="taskType",required = false) Integer taskType){
Map<String,Object> param = new HashMap<>();
param.put("type",type);
param.put("checkType",checkType);
param.put("taskType",taskType);
return AjaxResult.success(tTaskService.selectCurrentTaskByType(param));
}
/**
* 任务详情 任务统计
* @param taskId 任务主键
* @return
*/
@GetMapping("/taskDetailInfo")
public AjaxResult taskDetailInfo(@RequestParam(value="taskId") Long taskId){
return AjaxResult.success(tTaskService.taskDetailInfo(taskId));
}
/**
* 任务详情任务进度统计
* @param taskId 任务主键
* @param type 任务类型
* @param taskType 居民用户安检类型
* @return
*/
@GetMapping("/taskInspectDetailInfo")
public AjaxResult taskInspectDetailInfo(@RequestParam(value = "taskId") Long taskId,@RequestParam(value = "type") int type,@RequestParam(value = "taskType",required = false) String taskType){
Map<String,Object> param = new HashMap<>();
param.put("taskId",taskId);
param.put("type",type);
if(StringUtils.isNotEmpty(taskType)) param.put("taskType",taskType);
return AjaxResult.success(tTaskService.taskInspectDetailInfo(param));
}
/**
* 任务详情隐患统计
* @param taskId 任务主键
* @return
*/
@GetMapping("/taskInspectDangerDetailInfo")
public AjaxResult taskInspectDangerDetailInfo(Long taskId){
return AjaxResult.success(tTaskService.taskInspectDangerDetailInfo(taskId));
}
}
package com.zehong.web.controller.checktask;
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.TInspectStatisticsInfo;
import com.zehong.system.domain.TTask;
import com.zehong.system.domain.TTaskInspect;
import com.zehong.system.domain.TTaskInspectExport;
import com.zehong.system.domain.vo.*;
import com.zehong.system.service.ITStatisticsInspectItemService;
import com.zehong.system.service.ITTaskInspectExportService;
import com.zehong.system.service.ITTaskInspectService;
import com.zehong.system.service.ITTaskService;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
/**
* 安检任务执行Controller
*
* @author zehong
* @date 2023-11-07
*/
@RestController
@RequestMapping("/checktask/inspect")
public class TTaskInspectController extends BaseController
{
@Autowired
private ITTaskInspectService tTaskInspectService;
@Autowired
private ITTaskService taskService;
@Autowired
private ITTaskInspectExportService taskInspectExportService;
@Autowired
private ITStatisticsInspectItemService itStatisticsInspectItemService;
/**
* 查询安检任务执行列表
*/
//@PreAuthorize("@ss.hasPermi('checktask:inspect:list')")
@GetMapping("/list")
public TableDataInfo list(TTaskInspect tTaskInspect)
{
startPage();
List<TTaskInspect> list = tTaskInspectService.selectTTaskInspectList(tTaskInspect);
return getDataTable(list);
}
@GetMapping("/juminlist")
public TableDataInfo juminlist(TTaskInspect tTaskInspect)
{
startPage();
List<TTaskInspect> list = tTaskInspectService.selectJuminInspectList(tTaskInspect);
return getDataTable(list);
}
/**
* 查询是否有未完成的安检单
* @param tTaskInspect
* @return
*/
@GetMapping("/incomplete")
public AjaxResult incomplete(TTaskInspect tTaskInspect)
{
TTaskInspect inspect = tTaskInspectService.selectBytaskIduserId(tTaskInspect);
return AjaxResult.success(inspect);
}
/**
* 居民用户安检任务执行
* @return
*/
@GetMapping("/jmlist")
public TableDataInfo selectJMinspect(UserTaskInspect userTaskInspect)
{
startPage();
List<UserTaskInspect> list = tTaskInspectService.selectJMinspect(userTaskInspect);
return getDataTable(list);
}
/**
* 餐饮用户安检任务执行
* @param userTaskInspect
* @return
*/
@GetMapping("/cylist")
public TableDataInfo selectCYinspect(UserTaskInspect userTaskInspect)
{
startPage();
List<UserTaskInspect> list = tTaskInspectService.selectCYinspect(userTaskInspect);
return getDataTable(list);
}
/**
* 导出安检任务执行列表
*/
//@PreAuthorize("@ss.hasPermi('checktask:inspect:export')")
@Log(title = "安检任务执行", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TTaskInspect tTaskInspect)
{
List<TTaskInspect> list = tTaskInspectService.selectTTaskInspectList(tTaskInspect);
ExcelUtil<TTaskInspect> util = new ExcelUtil<TTaskInspect>(TTaskInspect.class);
return util.exportExcel(list, "安检任务执行数据");
}
/**
* 居民安检导出
* @param userTaskInspect
* @return
*/
@GetMapping("/jmInspectExport")
public AjaxResult jmInspectExport(UserTaskInspect userTaskInspect){
List<UserTaskInspect> list = tTaskInspectService.selectJMinspect(userTaskInspect);
ExcelUtil<UserTaskInspect> util = new ExcelUtil<>(UserTaskInspect.class);
return util.exportExcel(list, "居民安检任务数据");
}
/**
* 获取安检任务执行详细信息
*/
//@PreAuthorize("@ss.hasPermi('checktask:inspect:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(tTaskInspectService.selectTTaskInspectById(id));
}
@GetMapping(value = "inspectInfo/{id}")
public AjaxResult getInspectInfo(@PathVariable("id") Long id){
return AjaxResult.success(tTaskInspectService.selectTTaskInspectById(id));
}
/**
* 新增安检任务执行
*/
//@PreAuthorize("@ss.hasPermi('checktask:inspect:add')")
@Log(title = "安检任务执行", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TTaskInspect tTaskInspect)
{
int a = tTaskInspectService.insertTTaskInspect(tTaskInspect);
return AjaxResult.success(tTaskInspect.getId());
}
/**
* 修改安检任务执行
*/
//@PreAuthorize("@ss.hasPermi('checktask:inspect:edit')")
@Log(title = "安检任务执行", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TTaskInspect tTaskInspect)
{
return toAjax(tTaskInspectService.updateTTaskInspect(tTaskInspect));
}
/**
* 删除安检任务执行
*/
//@PreAuthorize("@ss.hasPermi('checktask:inspect:remove')")
@Log(title = "安检任务执行", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(tTaskInspectService.deleteTTaskInspectByIds(ids));
}
/**
* 安检任务统计
* @param tTaskInspect 安检实体
* @return
*/
@GetMapping("/taskInspectStatistics")
public AjaxResult taskInspectStatistics(TTaskInspect tTaskInspect){
return AjaxResult.success(tTaskInspectService.taskInspectStatistics(tTaskInspect));
}
/**
*
* @param userTaskInspect
* @return
*/
@GetMapping("/anjiandetaillist")
public TableDataInfo anjiandetaillist(Userinstpect userinstpect)
{
TTask task = taskService.selectTTaskById(userinstpect.getTaskId());
userinstpect.setType(task.getType().intValue());
userinstpect.setTaskType(task.getTaskType());
startPage();
List<Userinstpect> list = tTaskInspectService.anjiandetaillist(userinstpect);
return getDataTable(list);
}
@GetMapping("/exportInspectZip")
public AjaxResult exportInspectZip(TTaskInspectExport export) {
return AjaxResult.success(taskInspectExportService.exportInspectZip(export));
}
/**
* 到访不遇查询
* @param userTaskInspect
* @return
*/
@GetMapping("/selectVisitorMissInfo")
public TableDataInfo selectVisitorMissInfo (UserTaskInspect userTaskInspect){
startPage();
return getDataTable(tTaskInspectService.selectVisitorMissInfo(userTaskInspect));
}
@GetMapping("/visitorMissInfoExport")
public AjaxResult visitorMissInfoExport(UserTaskInspect userTaskInspect) {
List<UserTaskInspect> list = tTaskInspectService.selectVisitorMissInfo(userTaskInspect);
if("1".equals( userTaskInspect.getBtype())){
List<UserVisitorMissInfoExport> userInspectExportList = new ArrayList<>();
for(UserTaskInspect inspect : list){
UserVisitorMissInfoExport userInspectExport = new UserVisitorMissInfoExport();
BeanUtils.copyProperties(inspect,userInspectExport);
userInspectExportList.add(userInspectExport);
}
ExcelUtil<UserVisitorMissInfoExport> util = new ExcelUtil<>(UserVisitorMissInfoExport.class);
return util.exportExcel(userInspectExportList, "到访不遇数据");
}else if("2".equals( userTaskInspect.getBtype())){
List<BusinessVisitorMissInfoExport> businessVisitorMissInfoExportList = new ArrayList<>();
for(UserTaskInspect inspect : list){
BusinessVisitorMissInfoExport businessVisitorMissInfoExport = new BusinessVisitorMissInfoExport();
BeanUtils.copyProperties(inspect,businessVisitorMissInfoExport);
businessVisitorMissInfoExportList.add(businessVisitorMissInfoExport);
}
ExcelUtil<BusinessVisitorMissInfoExport> util = new ExcelUtil<>(BusinessVisitorMissInfoExport.class);
return util.exportExcel(businessVisitorMissInfoExportList, "到访不遇数据");
}else{
List<IndustryVisitorMissInfoExport> industryVisitorMissInfoExportList = new ArrayList<>();
for(UserTaskInspect inspect : list){
IndustryVisitorMissInfoExport industryVisitorMissInfoExport = new IndustryVisitorMissInfoExport();
BeanUtils.copyProperties(inspect,industryVisitorMissInfoExport);
industryVisitorMissInfoExportList.add(industryVisitorMissInfoExport);
}
ExcelUtil<IndustryVisitorMissInfoExport> util = new ExcelUtil<>(IndustryVisitorMissInfoExport.class);
return util.exportExcel(industryVisitorMissInfoExportList, "到访不遇数据");
}
}
/**
* 任务检查项统计
* @param inspectStatisticsInfo 统计条件
* @return
*/
@GetMapping("/statisticsInspectItems")
public AjaxResult statisticsInspectItems(TInspectStatisticsInfo inspectStatisticsInfo){
return AjaxResult.success(itStatisticsInspectItemService.statisticsInspectItems(inspectStatisticsInfo));
}
}
package com.zehong.web.controller.checktask;
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.TUserInspect;
import com.zehong.system.service.ITUserInspectService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 【请填写功能名称】Controller
*
* @author zehong
* @date 2023-11-08
*/
@RestController
@RequestMapping("/checkTask/userInspect")
public class TUserInspectController extends BaseController
{
@Autowired
private ITUserInspectService tUserInspectService;
/**
* 查询【请填写功能名称】列表
*/
//@PreAuthorize("@ss.hasPermi('checkTask:userInspect:list')")
@GetMapping("/list")
public TableDataInfo list(TUserInspect tUserInspect)
{
startPage();
List<TUserInspect> list = tUserInspectService.selectTUserInspectList(tUserInspect);
return getDataTable(list);
}
/**
* 导出【请填写功能名称】列表
*/
//@PreAuthorize("@ss.hasPermi('checkTask:userInspect:export')")
@Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TUserInspect tUserInspect)
{
List<TUserInspect> list = tUserInspectService.selectTUserInspectList(tUserInspect);
ExcelUtil<TUserInspect> util = new ExcelUtil<TUserInspect>(TUserInspect.class);
return util.exportExcel(list, "【请填写功能名称】数据");
}
/**
* 获取【请填写功能名称】详细信息
*/
// @PreAuthorize("@ss.hasPermi('checkTask:userInspect:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(tUserInspectService.selectTUserInspectById(id));
}
/**
* 新增【请填写功能名称】
*/
// @PreAuthorize("@ss.hasPermi('checkTask:userInspect:add')")
@Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TUserInspect tUserInspect)
{
return toAjax(tUserInspectService.insertTUserInspect(tUserInspect));
}
/**
* 修改【请填写功能名称】
*/
// @PreAuthorize("@ss.hasPermi('checkTask:userInspect:edit')")
@Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TUserInspect tUserInspect)
{
return toAjax(tUserInspectService.updateTUserInspect(tUserInspect));
}
/**
* 删除【请填写功能名称】
*/
//@PreAuthorize("@ss.hasPermi('checkTask:userInspect:remove')")
@Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(tUserInspectService.deleteTUserInspectByIds(ids));
}
}
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 fileServer = serverConfig.getUrl();
if(fileServer.contains("yhq.zhkjgf.com")){
fileServer = serverConfig.getUrl().replace("http://yhq.zhkjgf.com","https://yhq.zhkjgf.com:8898");
}
// 上传并返回新文件名称
String fileName = FileUploadUtils.upload(filePath, file);
String url = fileServer + fileName;
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.cycle;
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.TDevInspect;
import com.zehong.system.domain.TDevLifeCycle;
import com.zehong.system.service.ITDevInspectService;
import com.zehong.system.service.ITDevLifeCycleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* 设备台账Controller
*
* @author zehong
* @date 2023-12-12
*/
@RestController
@RequestMapping("/system/cycle")
public class TDevLifeCycleController extends BaseController
{
@Autowired
private ITDevLifeCycleService tDevLifeCycleService;
@Autowired
private ITDevInspectService tDevInspectService;
/**
* 查询设备台账列表
*/
@GetMapping("/list")
public TableDataInfo list(TDevLifeCycle tDevLifeCycle)
{
startPage();
List<TDevLifeCycle> list = tDevLifeCycleService.selectTDevLifeCycleList(tDevLifeCycle);
return getDataTable(list);
}
@GetMapping("/listByParam")
public TableDataInfo listByParam(TDevLifeCycle tDevLifeCycle)
{
startPage();
List<TDevLifeCycle> list = tDevLifeCycleService.selectTDevLifeCycleListByParam(tDevLifeCycle);
return getDataTable(list);
}
/**
* 临检设备
* @param tDevLifeCycle 参数
* @return
*/
@GetMapping("/closeInspectDevice")
public AjaxResult closeInspectDevice(TDevLifeCycle tDevLifeCycle){
List<TDevLifeCycle> list = tDevLifeCycleService.closeInspectDevice(tDevLifeCycle);
return AjaxResult.success(list);
}
/**
* 导出设备台账列表
*/
@Log(title = "设备台账", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TDevLifeCycle tDevLifeCycle)
{
List<TDevLifeCycle> list = tDevLifeCycleService.selectTDevLifeCycleList(tDevLifeCycle);
ExcelUtil<TDevLifeCycle> util = new ExcelUtil<TDevLifeCycle>(TDevLifeCycle.class);
return util.exportExcel(list, "设备台账数据");
}
/**
* 获取设备台账详细信息
*/
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(tDevLifeCycleService.selectTDevLifeCycleById(id));
}
/**
* 新增设备台账
*/
@Log(title = "设备台账", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TDevLifeCycle tDevLifeCycle)
{
return toAjax(tDevLifeCycleService.insertTDevLifeCycle(tDevLifeCycle));
}
/**
* 新增维修/保养记录
* @param
* @return
*/
@Log(title = "设备保养/维修记录", businessType = BusinessType.INSERT)
@PostMapping("/inspect")
public AjaxResult addInspect(@RequestBody TDevInspect tDevInspect)
{
TDevLifeCycle tDevLifeCycle =new TDevLifeCycle();
tDevLifeCycle.setId(tDevInspect.getDevLifeId());
tDevLifeCycle.setCurrOverhaulDate(tDevInspect.getCurrDate());
tDevLifeCycle.setNextOverhaulDate(tDevInspect.getNextDate());
if("9".equals(tDevInspect.getInsType().toString())){//报废操作
tDevLifeCycle.setDevStatus("9");
}
tDevLifeCycleService.updateTDevLifeCycle(tDevLifeCycle);
return toAjax(tDevInspectService.insertTDevInspect(tDevInspect));
}
@GetMapping("/inspect/list")
public TableDataInfo list(TDevInspect tDevInspect)
{
startPage();
List<TDevInspect> list = tDevInspectService.selectTDevInspectList(tDevInspect);
return getDataTable(list);
}
/**
* 修改设备台账
*/
@Log(title = "设备台账", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TDevLifeCycle tDevLifeCycle)
{
return toAjax(tDevLifeCycleService.updateTDevLifeCycle(tDevLifeCycle));
}
/**
* 删除设备台账
*/
@Log(title = "设备台账", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(tDevLifeCycleService.deleteTDevLifeCycleByIds(ids));
}
/**
* 设备类型统计
* @return
*/
@GetMapping("/devLifeStatistic")
public AjaxResult devLifeStatistic(){
return AjaxResult.success(tDevLifeCycleService.devLifeStatistic());
}
/**
* 批量新增检查单
* @return
*/
@PostMapping("/batchAddInspect")
public AjaxResult batchAddInspect(@RequestBody TDevInspect tDevInspect){
return toAjax(tDevLifeCycleService.batchAddInspect(tDevInspect));
}
}
package com.zehong.web.controller.dangerinspect;
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.TDangerInspectRecordInfo;
import com.zehong.system.service.ITDangerInspectRecordInfoService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 隐患日常巡检记录Controller
*
* @author zehong
* @date 2024-12-17
*/
@RestController
@RequestMapping("/dangerInspect/inspect")
public class TDangerInspectRecordInfoController extends BaseController
{
@Autowired
private ITDangerInspectRecordInfoService tDangerInspectRecordInfoService;
/**
* 查询隐患日常巡检记录列表
*/
//@PreAuthorize("@ss.hasPermi('system:info:list')")
@GetMapping("/list")
public TableDataInfo list(TDangerInspectRecordInfo tDangerInspectRecordInfo)
{
startPage();
List<TDangerInspectRecordInfo> list = tDangerInspectRecordInfoService.selectTDangerInspectRecordInfoList(tDangerInspectRecordInfo);
return getDataTable(list);
}
/**
* 导出隐患日常巡检记录列表
*/
//@PreAuthorize("@ss.hasPermi('system:info:export')")
@Log(title = "隐患日常巡检记录", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TDangerInspectRecordInfo tDangerInspectRecordInfo)
{
List<TDangerInspectRecordInfo> list = tDangerInspectRecordInfoService.selectTDangerInspectRecordInfoList(tDangerInspectRecordInfo);
ExcelUtil<TDangerInspectRecordInfo> util = new ExcelUtil<TDangerInspectRecordInfo>(TDangerInspectRecordInfo.class);
return util.exportExcel(list, "隐患日常巡检记录数据");
}
/**
* 获取隐患日常巡检记录详细信息
*/
//@PreAuthorize("@ss.hasPermi('system:info:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(tDangerInspectRecordInfoService.selectTDangerInspectRecordInfoById(id));
}
/**
* 新增隐患日常巡检记录
*/
//@PreAuthorize("@ss.hasPermi('system:info:add')")
@Log(title = "隐患日常巡检记录", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TDangerInspectRecordInfo tDangerInspectRecordInfo)
{
return toAjax(tDangerInspectRecordInfoService.insertTDangerInspectRecordInfo(tDangerInspectRecordInfo));
}
/**
* 修改隐患日常巡检记录
*/
//@PreAuthorize("@ss.hasPermi('system:info:edit')")
@Log(title = "隐患日常巡检记录", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TDangerInspectRecordInfo tDangerInspectRecordInfo)
{
return toAjax(tDangerInspectRecordInfoService.updateTDangerInspectRecordInfo(tDangerInspectRecordInfo));
}
/**
* 删除隐患日常巡检记录
*/
//@PreAuthorize("@ss.hasPermi('system:info:remove')")
@Log(title = "隐患日常巡检记录", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(tDangerInspectRecordInfoService.deleteTDangerInspectRecordInfoByIds(ids));
}
}
package com.zehong.web.controller.dangerinspect;
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.TDangerInspectTemplateInfo;
import com.zehong.system.service.ITDangerInspectTemplateInfoService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 隐患日常巡检模版Controller
*
* @author zehong
* @date 2024-12-16
*/
@RestController
@RequestMapping("/dangerInspect/template")
public class TDangerInspectTemplateInfoController extends BaseController
{
@Autowired
private ITDangerInspectTemplateInfoService tDangerInspectTemplateInfoService;
/**
* 查询隐患日常巡检模版列表
*/
//@PreAuthorize("@ss.hasPermi('system:info:list')")
@GetMapping("/list")
public TableDataInfo list(TDangerInspectTemplateInfo tDangerInspectTemplateInfo)
{
startPage();
List<TDangerInspectTemplateInfo> list = tDangerInspectTemplateInfoService.selectTDangerInspectTemplateInfoList(tDangerInspectTemplateInfo);
return getDataTable(list);
}
@GetMapping("/dangerInspectTemplateList")
public AjaxResult dangerInspectTemplateList(TDangerInspectTemplateInfo tDangerInspectTemplateInfo)
{
List<TDangerInspectTemplateInfo> list = tDangerInspectTemplateInfoService.selectTDangerInspectTemplateInfoList(tDangerInspectTemplateInfo);
return AjaxResult.success(list);
}
/**
* 导出隐患日常巡检模版列表
*/
//@PreAuthorize("@ss.hasPermi('system:info:export')")
@Log(title = "隐患日常巡检模版", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TDangerInspectTemplateInfo tDangerInspectTemplateInfo)
{
List<TDangerInspectTemplateInfo> list = tDangerInspectTemplateInfoService.selectTDangerInspectTemplateInfoList(tDangerInspectTemplateInfo);
ExcelUtil<TDangerInspectTemplateInfo> util = new ExcelUtil<TDangerInspectTemplateInfo>(TDangerInspectTemplateInfo.class);
return util.exportExcel(list, "隐患日常巡检模版数据");
}
/**
* 获取隐患日常巡检模版详细信息
*/
//@PreAuthorize("@ss.hasPermi('system:info:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(tDangerInspectTemplateInfoService.selectTDangerInspectTemplateInfoById(id));
}
/**
* 新增隐患日常巡检模版
*/
//@PreAuthorize("@ss.hasPermi('system:info:add')")
@Log(title = "隐患日常巡检模版", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TDangerInspectTemplateInfo tDangerInspectTemplateInfo)
{
return toAjax(tDangerInspectTemplateInfoService.insertTDangerInspectTemplateInfo(tDangerInspectTemplateInfo));
}
/**
* 修改隐患日常巡检模版
*/
//@PreAuthorize("@ss.hasPermi('system:info:edit')")
@Log(title = "隐患日常巡检模版", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TDangerInspectTemplateInfo tDangerInspectTemplateInfo)
{
return toAjax(tDangerInspectTemplateInfoService.updateTDangerInspectTemplateInfo(tDangerInspectTemplateInfo));
}
/**
* 删除隐患日常巡检模版
*/
// @PreAuthorize("@ss.hasPermi('system:info:remove')")
@Log(title = "隐患日常巡检模版", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(tDangerInspectTemplateInfoService.deleteTDangerInspectTemplateInfoByIds(ids));
}
}
package com.zehong.web.controller.devicemanage;
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.TDeviceTask;
import com.zehong.system.service.ITDeviceTaskService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 设备巡检任务Controller
*
* @author zehong
* @date 2023-12-11
*/
@RestController
@RequestMapping("/device/task")
public class TDeviceTaskController extends BaseController
{
@Autowired
private ITDeviceTaskService tDeviceTaskService;
/**
* 查询设备巡检任务列表
*/
//@PreAuthorize("@ss.hasPermi('device:task:list')")
@GetMapping("/list")
public TableDataInfo list(TDeviceTask tDeviceTask)
{
startPage();
List<TDeviceTask> list = tDeviceTaskService.selectTDeviceTaskList(tDeviceTask);
return getDataTable(list);
}
/**
* 小程序 设备任务列表
* @param tDeviceTask
* @return
*/
@GetMapping("/wxlist")
public TableDataInfo wxlist(TDeviceTask tDeviceTask)
{
startPage();
List<TDeviceTask> list = tDeviceTaskService.selectTDeviceTaskNum(tDeviceTask);
return getDataTable(list);
}
/**
* 导出设备巡检任务列表
*/
///@PreAuthorize("@ss.hasPermi('device:task:export')")
@Log(title = "设备巡检任务", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TDeviceTask tDeviceTask)
{
List<TDeviceTask> list = tDeviceTaskService.selectTDeviceTaskList(tDeviceTask);
ExcelUtil<TDeviceTask> util = new ExcelUtil<TDeviceTask>(TDeviceTask.class);
return util.exportExcel(list, "设备巡检任务数据");
}
/**
* 获取设备巡检任务详细信息
*/
//@PreAuthorize("@ss.hasPermi('device:task:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(tDeviceTaskService.selectTDeviceTaskById(id));
}
/**
* 新增设备巡检任务
*/
///@PreAuthorize("@ss.hasPermi('device:task:add')")
@Log(title = "设备巡检任务", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TDeviceTask tDeviceTask)
{
return toAjax(tDeviceTaskService.insertTDeviceTask(tDeviceTask));
}
/**
* 修改设备巡检任务
*/
//@PreAuthorize("@ss.hasPermi('device:task:edit')")
@Log(title = "设备巡检任务", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TDeviceTask tDeviceTask)
{
return toAjax(tDeviceTaskService.updateTDeviceTask(tDeviceTask));
}
/**
* 删除设备巡检任务
*/
//@PreAuthorize("@ss.hasPermi('device:task:remove')")
@Log(title = "设备巡检任务", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(tDeviceTaskService.deleteTDeviceTaskByIds(ids));
}
}
package com.zehong.web.controller.devicemanage;
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 com.zehong.system.domain.TDeviceInfo;
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.core.page.TableDataInfo;
import com.zehong.common.enums.BusinessType;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.system.domain.TDeviceTaskInspect;
import com.zehong.system.service.ITDeviceTaskInspectService;
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 2023-12-11
*/
@RestController
@RequestMapping("/device/inspect")
public class TDeviceTaskInspectController extends BaseController
{
@Autowired
private ITDeviceTaskInspectService tDeviceTaskInspectService;
@Autowired
private TokenService tokenService;
/**
* 查询设备巡检执行列表
*/
//@PreAuthorize("@ss.hasPermi('device:inspect:list')")
@GetMapping("/list")
public TableDataInfo list(TDeviceTaskInspect tDeviceTaskInspect)
{
startPage();
List<TDeviceTaskInspect> list = tDeviceTaskInspectService.selectTDeviceTaskInspectList(tDeviceTaskInspect);
return getDataTable(list);
}
/**
* 设备检测情况列表
* @param tDeviceTaskInspect
* @return
*/
@GetMapping("/deviceInspectList")
public TableDataInfo deviceInspectList(TDeviceInfo tDeviceInfo)
{
startPage();
List<TDeviceInfo> list = tDeviceTaskInspectService.deviceInspectList(tDeviceInfo);
return getDataTable(list);
}
/**
* 导出设备巡检执行列表
*/
//@PreAuthorize("@ss.hasPermi('device:inspect:export')")
@Log(title = "设备巡检执行", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TDeviceTaskInspect tDeviceTaskInspect)
{
List<TDeviceTaskInspect> list = tDeviceTaskInspectService.selectTDeviceTaskInspectList(tDeviceTaskInspect);
ExcelUtil<TDeviceTaskInspect> util = new ExcelUtil<TDeviceTaskInspect>(TDeviceTaskInspect.class);
return util.exportExcel(list, "设备巡检执行数据");
}
/**
* 获取设备巡检执行详细信息
*/
//@PreAuthorize("@ss.hasPermi('device:inspect:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(tDeviceTaskInspectService.selectTDeviceTaskInspectById(id));
}
/**
* 新增设备巡检执行
*/
//@PreAuthorize("@ss.hasPermi('device:inspect:add')")
@Log(title = "设备巡检执行", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TDeviceTaskInspect tDeviceTaskInspect)
{
LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
Long userId = loginUser.getUser().getUserId();
tDeviceTaskInspect.setAdminId(userId);
return toAjax(tDeviceTaskInspectService.insertTDeviceTaskInspect(tDeviceTaskInspect));
}
/**
* 修改设备巡检执行
*/
//@PreAuthorize("@ss.hasPermi('device:inspect:edit')")
@Log(title = "设备巡检执行", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TDeviceTaskInspect tDeviceTaskInspect)
{
return toAjax(tDeviceTaskInspectService.updateTDeviceTaskInspect(tDeviceTaskInspect));
}
/**
* 删除设备巡检执行
*/
//@PreAuthorize("@ss.hasPermi('device:inspect:remove')")
@Log(title = "设备巡检执行", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(tDeviceTaskInspectService.deleteTDeviceTaskInspectByIds(ids));
}
/**
* 设备巡检信息
* @param tDeviceTaskInspect 巡检实体
* @return
*/
@GetMapping("/selectTDeviceTaskInspectInfoList")
public TableDataInfo selectTDeviceTaskInspectInfoList(TDeviceTaskInspect tDeviceTaskInspect){
startPage();
return getDataTable(tDeviceTaskInspectService.selectTDeviceTaskInspectInfoList(tDeviceTaskInspect));
}
}
package com.zehong.web.controller.devicemanage;
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.TMapDot;
import com.zehong.system.service.ITMapDotService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* 地图打点Controller
*
* @author zehong
* @date 2024-01-17
*/
@RestController
@RequestMapping("/device/mapDot")
public class TMapDotController extends BaseController
{
@Autowired
private ITMapDotService tMapDotService;
/**
* 查询地图打点列表
*/
//@PreAuthorize("@ss.hasPermi('system:MapDot:list')")
@GetMapping("/list")
public TableDataInfo list(TMapDot tMapDot)
{
startPage();
List<TMapDot> list = tMapDotService.selectTMapDotList(tMapDot);
return getDataTable(list);
}
@GetMapping("/mapDotList")
public AjaxResult mapDotList(TMapDot tMapDot){
List<TMapDot> list = tMapDotService.selectTMapDotList(tMapDot);
return AjaxResult.success(list);
}
/**
* 导出地图打点列表
*/
// @PreAuthorize("@ss.hasPermi('system:MapDot:export')")
@Log(title = "地图打点", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TMapDot tMapDot)
{
List<TMapDot> list = tMapDotService.selectTMapDotList(tMapDot);
ExcelUtil<TMapDot> util = new ExcelUtil<TMapDot>(TMapDot.class);
return util.exportExcel(list, "地图打点数据");
}
/**
* 获取地图打点详细信息
*/
// @PreAuthorize("@ss.hasPermi('system:MapDot:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(tMapDotService.selectTMapDotById(id));
}
/**
* 新增地图打点
*/
// @PreAuthorize("@ss.hasPermi('system:MapDot:add')")
@Log(title = "地图打点", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TMapDot tMapDot)
{
int code = tMapDotService.insertTMapDot(tMapDot);
return code >0 ?AjaxResult.success(tMapDot) : AjaxResult.error();
}
/**
* 修改地图打点
*/
// @PreAuthorize("@ss.hasPermi('system:MapDot:edit')")
@Log(title = "地图打点", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TMapDot tMapDot)
{
return toAjax(tMapDotService.updateTMapDot(tMapDot));
}
/**
* 删除地图打点
*/
//@PreAuthorize("@ss.hasPermi('system:MapDot:remove')")
@Log(title = "地图打点", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(tMapDotService.deleteTMapDotByIds(ids));
}
}
package com.zehong.web.controller.devicemanage;
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.TSiteTask;
import com.zehong.system.service.ITSiteTaskService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 场站巡检任务Controller
*
* @author zehong
* @date 2023-12-15
*/
@RestController
@RequestMapping("/site/task")
public class TSiteTaskController extends BaseController
{
@Autowired
private ITSiteTaskService tSiteTaskService;
/**
* 查询场站巡检任务列表
*/
//@PreAuthorize("@ss.hasPermi('site:task:list')")
@GetMapping("/list")
public TableDataInfo list(TSiteTask tSiteTask)
{
startPage();
List<TSiteTask> list = tSiteTaskService.selectTSiteTaskList(tSiteTask);
return getDataTable(list);
}
@GetMapping("/wxlist")
public TableDataInfo wxlist(TSiteTask tSiteTask)
{
startPage();
List<TSiteTask> list = tSiteTaskService.selectTSiteTaskwxList(tSiteTask);
return getDataTable(list);
}
/**
* 导出场站巡检任务列表
*/
//@PreAuthorize("@ss.hasPermi('site:task:export')")
@Log(title = "场站巡检任务", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TSiteTask tSiteTask)
{
List<TSiteTask> list = tSiteTaskService.selectTSiteTaskList(tSiteTask);
ExcelUtil<TSiteTask> util = new ExcelUtil<TSiteTask>(TSiteTask.class);
return util.exportExcel(list, "场站巡检任务数据");
}
/**
* 获取场站巡检任务详细信息
*/
//@PreAuthorize("@ss.hasPermi('site:task:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(tSiteTaskService.selectTSiteTaskById(id));
}
/**
* 新增场站巡检任务
*/
//@PreAuthorize("@ss.hasPermi('site:task:add')")
@Log(title = "场站巡检任务", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TSiteTask tSiteTask)
{
return toAjax(tSiteTaskService.insertTSiteTask(tSiteTask));
}
/**
* 修改场站巡检任务
*/
//@PreAuthorize("@ss.hasPermi('site:task:edit')")
@Log(title = "场站巡检任务", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TSiteTask tSiteTask)
{
return toAjax(tSiteTaskService.updateTSiteTask(tSiteTask));
}
/**
* 删除场站巡检任务
*/
//@PreAuthorize("@ss.hasPermi('site:task:remove')")
@Log(title = "场站巡检任务", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(tSiteTaskService.deleteTSiteTaskByIds(ids));
}
}
package com.zehong.web.controller.devicemanage;
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.TSiteTaskInspect;
import com.zehong.system.service.ITSiteTaskInspectService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 场站巡检执行Controller
*
* @author zehong
* @date 2023-12-15
*/
@RestController
@RequestMapping("/site/inspect")
public class TSiteTaskInspectController extends BaseController
{
@Autowired
private ITSiteTaskInspectService tSiteTaskInspectService;
@Autowired
private TokenService tokenService;
/**
* 查询场站巡检执行列表
*/
// @PreAuthorize("@ss.hasPermi('site:inspect:list')")
@GetMapping("/list")
public TableDataInfo list(TSiteTaskInspect tSiteTaskInspect)
{
startPage();
List<TSiteTaskInspect> list = tSiteTaskInspectService.selectTSiteTaskInspectList(tSiteTaskInspect);
return getDataTable(list);
}
/**
* 导出场站巡检执行列表
*/
//@PreAuthorize("@ss.hasPermi('site:inspect:export')")
@Log(title = "场站巡检执行", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TSiteTaskInspect tSiteTaskInspect)
{
List<TSiteTaskInspect> list = tSiteTaskInspectService.selectTSiteTaskInspectList(tSiteTaskInspect);
ExcelUtil<TSiteTaskInspect> util = new ExcelUtil<TSiteTaskInspect>(TSiteTaskInspect.class);
return util.exportExcel(list, "场站巡检执行数据");
}
/**
* 获取场站巡检执行详细信息
*/
// @PreAuthorize("@ss.hasPermi('site:inspect:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(tSiteTaskInspectService.selectTSiteTaskInspectById(id));
}
/**
* 新增场站巡检执行
*/
//@PreAuthorize("@ss.hasPermi('site:inspect:add')")
@Log(title = "场站巡检执行", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TSiteTaskInspect tSiteTaskInspect)
{
LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
Long userId = loginUser.getUser().getUserId();
tSiteTaskInspect.setAdminId(userId);
return toAjax(tSiteTaskInspectService.insertTSiteTaskInspect(tSiteTaskInspect));
}
/**
* 修改场站巡检执行
*/
//@PreAuthorize("@ss.hasPermi('site:inspect:edit')")
@Log(title = "场站巡检执行", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TSiteTaskInspect tSiteTaskInspect)
{
return toAjax(tSiteTaskInspectService.updateTSiteTaskInspect(tSiteTaskInspect));
}
/**
* 删除场站巡检执行
*/
//@PreAuthorize("@ss.hasPermi('site:inspect:remove')")
@Log(title = "场站巡检执行", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(tSiteTaskInspectService.deleteTSiteTaskInspectByIds(ids));
}
/**
* 场站巡检记录
* @param tSiteTaskInspect 巡检实体
* @return
*/
@GetMapping("/selectSiteStationInspectInfo")
public TableDataInfo selectSiteStationInspectInfo(TSiteTaskInspect tSiteTaskInspect){
startPage();
return getDataTable(tSiteTaskInspectService.selectSiteStationInspectInfo(tSiteTaskInspect));
}
}
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.TEmergencyAlarmInfo;
import com.zehong.system.service.ITEmergencyAlarmInfoService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 应急报警Controller
*
* @author zehong
* @date 2024-12-09
*/
@RestController
@RequestMapping("/emergency/alarm")
public class TEmergencyAlarmInfoController extends BaseController
{
@Autowired
private ITEmergencyAlarmInfoService tEmergencyAlarmInfoService;
/**
* 查询应急报警列表
*/
//@PreAuthorize("@ss.hasPermi('system:info:list')")
@GetMapping("/list")
public TableDataInfo list(TEmergencyAlarmInfo tEmergencyAlarmInfo)
{
startPage();
List<TEmergencyAlarmInfo> list = tEmergencyAlarmInfoService.selectTEmergencyAlarmInfoList(tEmergencyAlarmInfo);
return getDataTable(list);
}
/**
* 导出应急报警列表
*/
//@PreAuthorize("@ss.hasPermi('system:info:export')")
@Log(title = "应急报警", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TEmergencyAlarmInfo tEmergencyAlarmInfo)
{
List<TEmergencyAlarmInfo> list = tEmergencyAlarmInfoService.selectTEmergencyAlarmInfoList(tEmergencyAlarmInfo);
ExcelUtil<TEmergencyAlarmInfo> util = new ExcelUtil<TEmergencyAlarmInfo>(TEmergencyAlarmInfo.class);
return util.exportExcel(list, "应急报警数据");
}
/**
* 获取应急报警详细信息
*/
//@PreAuthorize("@ss.hasPermi('system:info:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(tEmergencyAlarmInfoService.selectTEmergencyAlarmInfoById(id));
}
/**
* 新增应急报警
*/
//@PreAuthorize("@ss.hasPermi('system:info:add')")
@Log(title = "应急报警", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TEmergencyAlarmInfo tEmergencyAlarmInfo)
{
return toAjax(tEmergencyAlarmInfoService.insertTEmergencyAlarmInfo(tEmergencyAlarmInfo));
}
/**
* 修改应急报警
*/
//@PreAuthorize("@ss.hasPermi('system:info:edit')")
@Log(title = "应急报警", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TEmergencyAlarmInfo tEmergencyAlarmInfo)
{
return toAjax(tEmergencyAlarmInfoService.updateTEmergencyAlarmInfo(tEmergencyAlarmInfo));
}
/**
* 删除应急报警
*/
// @PreAuthorize("@ss.hasPermi('system:info:remove')")
@Log(title = "应急报警", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(tEmergencyAlarmInfoService.deleteTEmergencyAlarmInfoByIds(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.*;
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.TEmergencyAlarmNotifyRecord;
import com.zehong.system.service.ITEmergencyAlarmNotifyRecordService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 应急报警通知记录Controller
*
* @author zehong
* @date 2024-12-10
*/
@RestController
@RequestMapping("/emergency/notify")
public class TEmergencyAlarmNotifyRecordController extends BaseController
{
@Autowired
private ITEmergencyAlarmNotifyRecordService tEmergencyAlarmNotifyRecordService;
/**
* 查询应急报警通知记录列表
*/
// @PreAuthorize("@ss.hasPermi('system:record:list')")
@GetMapping("/list")
public TableDataInfo list(TEmergencyAlarmNotifyRecord tEmergencyAlarmNotifyRecord)
{
startPage();
List<TEmergencyAlarmNotifyRecord> list = tEmergencyAlarmNotifyRecordService.selectTEmergencyAlarmNotifyRecordList(tEmergencyAlarmNotifyRecord);
return getDataTable(list);
}
/**
* 导出应急报警通知记录列表
*/
// @PreAuthorize("@ss.hasPermi('system:record:export')")
@Log(title = "应急报警通知记录", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TEmergencyAlarmNotifyRecord tEmergencyAlarmNotifyRecord)
{
List<TEmergencyAlarmNotifyRecord> list = tEmergencyAlarmNotifyRecordService.selectTEmergencyAlarmNotifyRecordList(tEmergencyAlarmNotifyRecord);
ExcelUtil<TEmergencyAlarmNotifyRecord> util = new ExcelUtil<TEmergencyAlarmNotifyRecord>(TEmergencyAlarmNotifyRecord.class);
return util.exportExcel(list, "应急报警通知记录数据");
}
/**
* 获取应急报警通知记录详细信息
*/
//@PreAuthorize("@ss.hasPermi('system:record:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(tEmergencyAlarmNotifyRecordService.selectTEmergencyAlarmNotifyRecordById(id));
}
/**
* 新增应急报警通知记录
*/
//@PreAuthorize("@ss.hasPermi('system:record:add')")
@Log(title = "应急报警通知记录", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TEmergencyAlarmNotifyRecord tEmergencyAlarmNotifyRecord)
{
return toAjax(tEmergencyAlarmNotifyRecordService.insertTEmergencyAlarmNotifyRecord(tEmergencyAlarmNotifyRecord));
}
/**
* 修改应急报警通知记录
*/
//@PreAuthorize("@ss.hasPermi('system:record:edit')")
@Log(title = "应急报警通知记录", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TEmergencyAlarmNotifyRecord tEmergencyAlarmNotifyRecord)
{
return toAjax(tEmergencyAlarmNotifyRecordService.updateTEmergencyAlarmNotifyRecord(tEmergencyAlarmNotifyRecord));
}
/**
* 删除应急报警通知记录
*/
// @PreAuthorize("@ss.hasPermi('system:record:remove')")
@Log(title = "应急报警通知记录", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(tEmergencyAlarmNotifyRecordService.deleteTEmergencyAlarmNotifyRecordByIds(ids));
}
/**
* 发送通知
* @param alarmId 报警主键
* @return
*/
@GetMapping(value = "/alarmNotify")
public AjaxResult alarmNotify(@RequestParam(value="alarmId") Long alarmId) {
tEmergencyAlarmNotifyRecordService.alarmNotify(alarmId);
return AjaxResult.success();
}
}
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.TEmergencyDisposeStep;
import com.zehong.system.service.ITEmergencyDisposeStepService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 应急处置步骤Controller
*
* @author zehong
* @date 2024-09-07
*/
@RestController
@RequestMapping("/emergency/step")
public class TEmergencyDisposeStepController extends BaseController
{
@Autowired
private ITEmergencyDisposeStepService tEmergencyDisposeStepService;
/**
* 查询应急处置步骤列表
*/
//@PreAuthorize("@ss.hasPermi('system:step:list')")
@GetMapping("/list")
public TableDataInfo list(TEmergencyDisposeStep tEmergencyDisposeStep)
{
startPage();
List<TEmergencyDisposeStep> list = tEmergencyDisposeStepService.selectTEmergencyDisposeStepList(tEmergencyDisposeStep);
return getDataTable(list);
}
@GetMapping("/stepListInfo")
public AjaxResult stepListInfo(TEmergencyDisposeStep tEmergencyDisposeStep)
{
List<TEmergencyDisposeStep> list = tEmergencyDisposeStepService.selectTEmergencyDisposeStepList(tEmergencyDisposeStep);
return AjaxResult.success(list);
}
/**
* 导出应急处置步骤列表
*/
//@PreAuthorize("@ss.hasPermi('system:step:export')")
@Log(title = "应急处置步骤", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TEmergencyDisposeStep tEmergencyDisposeStep)
{
List<TEmergencyDisposeStep> list = tEmergencyDisposeStepService.selectTEmergencyDisposeStepList(tEmergencyDisposeStep);
ExcelUtil<TEmergencyDisposeStep> util = new ExcelUtil<TEmergencyDisposeStep>(TEmergencyDisposeStep.class);
return util.exportExcel(list, "应急处置步骤数据");
}
/**
* 获取应急处置步骤详细信息
*/
//@PreAuthorize("@ss.hasPermi('system:step:query')")
@GetMapping(value = "/{stepId}")
public AjaxResult getInfo(@PathVariable("stepId") Long stepId)
{
return AjaxResult.success(tEmergencyDisposeStepService.selectTEmergencyDisposeStepById(stepId));
}
/**
* 新增应急处置步骤
*/
//@PreAuthorize("@ss.hasPermi('system:step:add')")
@Log(title = "应急处置步骤", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TEmergencyDisposeStep tEmergencyDisposeStep)
{
return toAjax(tEmergencyDisposeStepService.insertTEmergencyDisposeStep(tEmergencyDisposeStep));
}
/**
* 修改应急处置步骤
*/
//@PreAuthorize("@ss.hasPermi('system:step:edit')")
@Log(title = "应急处置步骤", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TEmergencyDisposeStep tEmergencyDisposeStep)
{
return toAjax(tEmergencyDisposeStepService.updateTEmergencyDisposeStep(tEmergencyDisposeStep));
}
/**
* 删除应急处置步骤
*/
//@PreAuthorize("@ss.hasPermi('system:step:remove')")
@Log(title = "应急处置步骤", businessType = BusinessType.DELETE)
@DeleteMapping("/{stepIds}")
public AjaxResult remove(@PathVariable Long[] stepIds)
{
return toAjax(tEmergencyDisposeStepService.deleteTEmergencyDisposeStepByIds(stepIds));
}
}
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.TEmergencyResponse;
import com.zehong.system.service.ITEmergencyResponseService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 应急响应Controller
*
* @author zehong
* @date 2024-09-06
*/
@RestController
@RequestMapping("/emergency/response")
public class TEmergencyResponseController extends BaseController
{
@Autowired
private ITEmergencyResponseService tEmergencyResponseService;
/**
* 查询应急响应列表
*/
// @PreAuthorize("@ss.hasPermi('emergency:response:list')")
@GetMapping("/list")
public TableDataInfo list(TEmergencyResponse tEmergencyResponse)
{
startPage();
List<TEmergencyResponse> list = tEmergencyResponseService.selectTEmergencyResponseList(tEmergencyResponse);
return getDataTable(list);
}
@GetMapping("/emergencyResponseList")
public AjaxResult emergencyResponseList(TEmergencyResponse tEmergencyResponse)
{
List<TEmergencyResponse> list = tEmergencyResponseService.selectTEmergencyResponseList(tEmergencyResponse);
return AjaxResult.success(list);
}
/**
* 导出应急响应列表
*/
//@PreAuthorize("@ss.hasPermi('emergency:response:export')")
@Log(title = "应急响应", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TEmergencyResponse tEmergencyResponse)
{
List<TEmergencyResponse> list = tEmergencyResponseService.selectTEmergencyResponseList(tEmergencyResponse);
ExcelUtil<TEmergencyResponse> util = new ExcelUtil<TEmergencyResponse>(TEmergencyResponse.class);
return util.exportExcel(list, "应急响应数据");
}
/**
* 获取应急响应详细信息
*/
//@PreAuthorize("@ss.hasPermi('emergency:response:query')")
@GetMapping(value = "/{responseId}")
public AjaxResult getInfo(@PathVariable("responseId") Long responseId)
{
return AjaxResult.success(tEmergencyResponseService.selectTEmergencyResponseById(responseId));
}
/**
* 新增应急响应
*/
//@PreAuthorize("@ss.hasPermi('emergency:response:add')")
@Log(title = "应急响应", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TEmergencyResponse tEmergencyResponse)
{
return toAjax(tEmergencyResponseService.insertTEmergencyResponse(tEmergencyResponse));
}
/**
* 修改应急响应
*/
//@PreAuthorize("@ss.hasPermi('emergency:response:edit')")
@Log(title = "应急响应", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TEmergencyResponse tEmergencyResponse)
{
return toAjax(tEmergencyResponseService.updateTEmergencyResponse(tEmergencyResponse));
}
/**
* 删除应急响应
*/
//@PreAuthorize("@ss.hasPermi('emergency:response:remove')")
@Log(title = "应急响应", businessType = BusinessType.DELETE)
@DeleteMapping("/{responseIds}")
public AjaxResult remove(@PathVariable Long[] responseIds)
{
return toAjax(tEmergencyResponseService.deleteTEmergencyResponseByIds(responseIds));
}
}
package com.zehong.web.controller.gasdata;
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.TGasAlarm;
import com.zehong.system.service.ITGasAlarmService;
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 2024-09-10
*/
@RestController
@RequestMapping("/gas/alarm")
public class TGasAlarmController extends BaseController
{
@Autowired
private ITGasAlarmService tGasAlarmService;
/**
* 查询报警器报警记录列表
*/
@PreAuthorize("@ss.hasPermi('gas:alarm:list')")
@GetMapping("/list")
public TableDataInfo list(TGasAlarm tGasAlarm)
{
startPage();
List<TGasAlarm> list = tGasAlarmService.selectTGasAlarmList(tGasAlarm);
return getDataTable(list);
}
/**
* 导出报警器报警记录列表
*/
@PreAuthorize("@ss.hasPermi('gas:alarm:export')")
@Log(title = "报警器报警记录", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TGasAlarm tGasAlarm)
{
List<TGasAlarm> list = tGasAlarmService.selectTGasAlarmList(tGasAlarm);
ExcelUtil<TGasAlarm> util = new ExcelUtil<TGasAlarm>(TGasAlarm.class);
return util.exportExcel(list, "报警器报警记录数据");
}
/**
* 获取报警器报警记录详细信息
*/
@PreAuthorize("@ss.hasPermi('gas:alarm:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(tGasAlarmService.selectTGasAlarmById(id));
}
/**
* 新增报警器报警记录
*/
@PreAuthorize("@ss.hasPermi('gas:alarm:add')")
@Log(title = "报警器报警记录", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TGasAlarm tGasAlarm)
{
return toAjax(tGasAlarmService.insertTGasAlarm(tGasAlarm));
}
/**
* 修改报警器报警记录
*/
@PreAuthorize("@ss.hasPermi('gas:alarm:edit')")
@Log(title = "报警器报警记录", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TGasAlarm tGasAlarm)
{
return toAjax(tGasAlarmService.updateTGasAlarm(tGasAlarm));
}
/**
* 删除报警器报警记录
*/
@PreAuthorize("@ss.hasPermi('gas:alarm:remove')")
@Log(title = "报警器报警记录", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(tGasAlarmService.deleteTGasAlarmByIds(ids));
}
/**
* 获取缓存中报警信息
* @return
*/
@GetMapping("/getCacheAlarmInfo")
public AjaxResult getCacheAlarmInfo(){
return AjaxResult.success(tGasAlarmService.getCacheAlarmInfo());
}
}
package com.zehong.web.controller.gasdata;
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.TGasData;
import com.zehong.system.service.ITGasDataService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 监测设备数据Controller
*
* @author zehong
* @date 2024-03-02
*/
@RestController
@RequestMapping("/gas/data")
public class TGasDataController extends BaseController
{
@Autowired
private ITGasDataService tGasDataService;
/**
* 查询监测设备数据列表
*/
//@PreAuthorize("@ss.hasPermi('gas:data:list')")
@GetMapping("/list")
public TableDataInfo list(TGasData tGasData)
{
startPage();
List<TGasData> list = tGasDataService.selectTGasDataList(tGasData);
return getDataTable(list);
}
/**
* 导出监测设备数据列表
*/
//@PreAuthorize("@ss.hasPermi('gas:data:export')")
@Log(title = "监测设备数据", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TGasData tGasData)
{
List<TGasData> list = tGasDataService.selectTGasDataList(tGasData);
ExcelUtil<TGasData> util = new ExcelUtil<TGasData>(TGasData.class);
return util.exportExcel(list, "监测设备数据数据");
}
/**
* 获取监测设备数据详细信息
*/
//@PreAuthorize("@ss.hasPermi('gas:data:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(tGasDataService.selectTGasDataById(id));
}
/**
* 新增监测设备数据
*/
//@PreAuthorize("@ss.hasPermi('gas:data:add')")
@Log(title = "监测设备数据", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TGasData tGasData)
{
return toAjax(tGasDataService.insertTGasData(tGasData));
}
/**
* 修改监测设备数据
*/
//@PreAuthorize("@ss.hasPermi('gas:data:edit')")
@Log(title = "监测设备数据", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TGasData tGasData)
{
return toAjax(tGasDataService.updateTGasData(tGasData));
}
/**
* 删除监测设备数据
*/
//@PreAuthorize("@ss.hasPermi('gas:data:remove')")
@Log(title = "监测设备数据", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(tGasDataService.deleteTGasDataByIds(ids));
}
}
package com.zehong.web.controller.gasuserthirdinterface;
import com.alibaba.fastjson.JSONObject;
import com.zehong.common.core.domain.AjaxResult;
import com.zehong.common.utils.StringUtils;
import com.zehong.common.utils.http.HttpClientUtils;
import com.zehong.common.utils.http.HttpUtils;
import com.zehong.common.utils.sign.Base64;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
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.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
/**
* @author zehong
* 居民用气量第三方查询
*/
@RestController
@RequestMapping("/gas/use")
public class GasUseThirdController {
/**
* 日志
*/
private static final Logger log = LoggerFactory.getLogger(GasUseThirdController.class);
@Value("${thirdGasUse.qinUrl}")
private String qinUrl;
@Value("${thirdGasUse.jinKa.appId}")
private String appId;
@Value("${thirdGasUse.jinKa.tenantId}")
private String tenantId;
@Value("${thirdGasUse.jinKa.loginUrl}")
private String loginUrl;
@Value("${thirdGasUse.jinKa.accessKeyId}")
private String accessKeyId;
@Value("${thirdGasUse.jinKa.accessKeySecret}")
private String accessKeySecret;
@Value("${thirdGasUse.jinKa.meterDetailUrl}")
private String meterDetailUrl;
/**
* 秦川燃气表用气量查询
* @param realMeterId 燃气表号
* @return
*/
@GetMapping("/getQinChuanGasStayCount")
public AjaxResult getQinChuanGasStayCount(@RequestParam(value="realMeterId")String realMeterId){
try{
String result = HttpUtils.sendPost(qinUrl,"Data={\"OPType\":3,\"PayCode\":\"\",\"RealMeterID\":"+ realMeterId +"}");
log.info("秦川燃气表用户用气量查询结果=================" + result);
if(StringUtils.isEmpty(result)) return AjaxResult.error("秦川燃气表用气量查询失败");
JSONObject resultJson = JSONObject.parseObject(result);
if(!"1".equals(resultJson.getString("ResultCode"))) return AjaxResult.error(resultJson.getString("ResultMsg"));
return AjaxResult.success(resultJson);
}catch (Throwable a){
log.error("秦川燃气表用气量查询失败:",a);
return AjaxResult.error("秦川燃气表用气量查询失败");
}
}
/**
* 金卡燃气表用气量查询
* @param meterNo 燃气表号
* @return
*/
@GetMapping("/getJinKaGasStayCount")
public AjaxResult getJinKaGasStayCount(@RequestParam(value="meterNo")String meterNo){
try{
Map<String,Object> head = new HashMap<>();
head.put("AccessToken",getJinKaToken());
head.put("Authorization", Base64.encode((appId + ":" + tenantId + ":" + new SimpleDateFormat("yyyyMMddHHmmss").format(new Date())).getBytes()));
head.put("Accept","application/json");
head.put("Content-Type","application/json;charset=utf-8");
Map<String,Object> param = new HashMap<>();
param.put("meterNo",meterNo);
String result = HttpClientUtils.doGet(meterDetailUrl,param,head);
log.info("金卡燃气表用户用气量查询结果=================" + result);
if(StringUtils.isEmpty(result)) return AjaxResult.error("金卡燃气表用户用气量查询失败");
return AjaxResult.success(JSONObject.parseObject(result));
}catch (Throwable a){
log.error("金卡燃气表用户用气量查询失败:",a);
return AjaxResult.error("金卡燃气表用户用气量查询失败");
}
}
/**
* 金卡登录获取token
* @return
* @throws Exception
*/
private String getJinKaToken() throws Exception {
//入参
JSONObject param = new JSONObject();
param.put("accessKeyID",accessKeyId);
param.put("accessKeySecret",accessKeySecret);
//请求头
Map<String, Object> head = new HashMap<>();
head.put("appid",appId);
head.put("tenantId",tenantId);
head.put("Accept","application/json");
head.put("Content-Type","application/json;charset=utf-8");
String result = HttpClientUtils.doPost(loginUrl,param.toJSONString(),head);
log.info("金卡登录token结果==============" + result);
JSONObject jsonResult = JSONObject.parseObject(result);
if(StringUtils.isEmpty(result) || !"00".equals(jsonResult.getString("code")) || null == jsonResult.getString("data")) throw new Exception("金卡token接口请求异常!");
return jsonResult.getJSONObject("data").getString("accessToken");
}
}
package com.zehong.web.controller.linepatrol;
import java.util.List;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
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.TPipeUser;
import com.zehong.system.service.ITPipeUserService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 管线巡线人员分配Controller
*
* @author zehong
* @date 2023-11-16
*/
@RestController
@RequestMapping("/linePatrol/user")
public class TPipeUserController extends BaseController
{
@Autowired
private ITPipeUserService tPipeUserService;
/**
* 查询管线巡线人员分配列表
*/
//@PreAuthorize("@ss.hasPermi('linePatrol:user:list')")
@GetMapping("/list")
public TableDataInfo list(TPipeUser tPipeUser)
{
startPage();
List<TPipeUser> list = tPipeUserService.selectTPipeUserList(tPipeUser);
return getDataTable(list);
}
@GetMapping("/pipeUserList")
public AjaxResult pipeUserList(TPipeUser tPipeUser){
return AjaxResult.success(tPipeUserService.selectTPipeUserList(tPipeUser));
}
/**
* 导出管线巡线人员分配列表
*/
//@PreAuthorize("@ss.hasPermi('linePatrol:user:export')")
@Log(title = "管线巡线人员分配", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TPipeUser tPipeUser)
{
List<TPipeUser> list = tPipeUserService.selectTPipeUserList(tPipeUser);
ExcelUtil<TPipeUser> util = new ExcelUtil<TPipeUser>(TPipeUser.class);
return util.exportExcel(list, "管线巡线人员分配数据");
}
/**
* 获取管线巡线人员分配详细信息
*/
//@PreAuthorize("@ss.hasPermi('linePatrol:user:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(tPipeUserService.selectTPipeUserById(id));
}
/**
* 新增管线巡线人员分配
*/
//@PreAuthorize("@ss.hasPermi('linePatrol:user:add')")
@Log(title = "管线巡线人员分配", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TPipeUser tPipeUser)
{
return toAjax(tPipeUserService.insertTPipeUser(tPipeUser));
}
/**
* 修改管线巡线人员分配
*/
//@PreAuthorize("@ss.hasPermi('linePatrol:user:edit')")
@Log(title = "管线巡线人员分配", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TPipeUser tPipeUser)
{
return toAjax(tPipeUserService.updateTPipeUser(tPipeUser));
}
/**
* 删除管线巡线人员分配
*/
//@PreAuthorize("@ss.hasPermi('linePatrol:user:remove')")
@Log(title = "管线巡线人员分配", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(tPipeUserService.deleteTPipeUserByIds(ids));
}
/**
* 根据用户和管道主键删除
* @param userId 用户主键
* @param pipeId 管道主键
* @return
*/
@GetMapping("/deleteTPipeUserByUserIdAndPipeId")
public AjaxResult deleteTPipeUserByUserIdAndPipeId(@RequestParam("userId") Long userId, @RequestParam("pipeId")Long pipeId){
return toAjax(tPipeUserService.deleteTPipeUserByUserIdAndPipeId(userId,pipeId));
}
}
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.pipetask;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.zehong.common.core.domain.model.LoginUser;
import com.zehong.framework.web.service.TokenService;
import com.zehong.system.domain.vo.TaskInspectStatisticsByPipVo;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
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.TPipeTask;
import com.zehong.system.service.ITPipeTaskService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
import javax.servlet.http.HttpServletRequest;
/**
* 管线巡线任务Controller
*
* @author zehong
* @date 2023-11-17
*/
@RestController
@RequestMapping("/pipetask/task")
public class TPipeTaskController extends BaseController
{
@Autowired
private ITPipeTaskService tPipeTaskService;
@Autowired
private TokenService tokenService;
/**
* 查询管线巡线任务列表
*/
//@PreAuthorize("@ss.hasPermi('pipetask:task:list')")
@GetMapping("/list")
public TableDataInfo list(TPipeTask tPipeTask)
{
startPage();
List<TPipeTask> list = tPipeTaskService.selectTPipeTaskList(tPipeTask);
return getDataTable(list);
}
@GetMapping("/wxpipelist")
public TableDataInfo wxpipelist(TPipeTask tPipeTask)
{
startPage();
List<TPipeTask> list = tPipeTaskService.selectTwxPipeTaskList(tPipeTask);
return getDataTable(list);
}
/**
* 导出管线巡线任务列表
*/
//@PreAuthorize("@ss.hasPermi('pipetask:task:export')")
@Log(title = "管线巡线任务", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TPipeTask tPipeTask)
{
List<TPipeTask> list = tPipeTaskService.selectTPipeTaskList(tPipeTask);
ExcelUtil<TPipeTask> util = new ExcelUtil<TPipeTask>(TPipeTask.class);
return util.exportExcel(list, "管线巡线任务数据");
}
/**
* 获取管线巡线任务详细信息
*/
//@PreAuthorize("@ss.hasPermi('pipetask:task:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(tPipeTaskService.selectTPipeTaskById(id));
}
/**
* 新增管线巡线任务
*/
//@PreAuthorize("@ss.hasPermi('pipetask:task:add')")
@Log(title = "管线巡线任务", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TPipeTask tPipeTask, HttpServletRequest request)
{
LoginUser user = tokenService.getLoginUser(request);
tPipeTask.setAdminId(user.getUser().getUserId());
return toAjax(tPipeTaskService.insertTPipeTask(tPipeTask));
}
/**
* 修改管线巡线任务
*/
//@PreAuthorize("@ss.hasPermi('pipetask:task:edit')")
@Log(title = "管线巡线任务", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TPipeTask tPipeTask)
{
return toAjax(tPipeTaskService.updateTPipeTask(tPipeTask));
}
/**
* 删除管线巡线任务
*/
//@PreAuthorize("@ss.hasPermi('pipetask:task:remove')")
@Log(title = "管线巡线任务", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(tPipeTaskService.deleteTPipeTaskByIds(ids));
}
/**
* 巡线人巡线点统计
* @param taskId 巡线任务主键
* @return
*/
@GetMapping("/selectTaskInspectStatisticsByUser")
public TableDataInfo selectTaskInspectStatisticsByUser(@RequestParam(value = "taskId") Long taskId,@RequestParam(value = "inspector",required = false)String inspector){
startPage();
Map<String,Object> param = new HashMap<>();
param.put("taskId",taskId);
param.put("inspector",inspector);
return getDataTable(tPipeTaskService.selectTaskInspectStatisticsByUser(param));
}
/**
* 管道巡检点统计
* @param param 入参
* @return
*/
@GetMapping("/selectTaskInspectStatisticsByPipe")
public TableDataInfo selectTaskInspectStatisticsByPipe(TaskInspectStatisticsByPipVo param){
startPage();
return getDataTable(tPipeTaskService.selectTaskInspectStatisticsByPipe(param));
}
}
package com.zehong.web.controller.pipetask;
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.TPipeTaskInspect;
import com.zehong.system.service.ITPipeTaskInspectService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 管线巡线任务执行Controller
*
* @author zehong
* @date 2023-11-17
*/
@RestController
@RequestMapping("/pipetask/pipeinspect")
public class TPipeTaskInspectController extends BaseController
{
@Autowired
private ITPipeTaskInspectService tPipeTaskInspectService;
/**
* 查询管线巡线任务执行列表
*/
//@PreAuthorize("@ss.hasPermi('pipetask:pipeinspect:list')")
@GetMapping("/list")
public TableDataInfo list(TPipeTaskInspect tPipeTaskInspect)
{
startPage();
List<TPipeTaskInspect> list = tPipeTaskInspectService.selectTPipeTaskInspectList(tPipeTaskInspect);
return getDataTable(list);
}
/**
* 打卡排序
* @param tPipeTaskInspect
* @return
*/
@GetMapping("/listDistance")
public TableDataInfo selectPipeDistance(TPipeTaskInspect tPipeTaskInspect)
{
startPage();
List<TPipeTaskInspect> list = tPipeTaskInspectService.selectPipeDistance(tPipeTaskInspect);
return getDataTable(list);
}
/**
* 导出管线巡线任务执行列表
*/
//@PreAuthorize("@ss.hasPermi('pipetask:pipeinspect:export')")
@Log(title = "管线巡线任务执行", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TPipeTaskInspect tPipeTaskInspect)
{
List<TPipeTaskInspect> list = tPipeTaskInspectService.selectTPipeTaskInspectList(tPipeTaskInspect);
ExcelUtil<TPipeTaskInspect> util = new ExcelUtil<TPipeTaskInspect>(TPipeTaskInspect.class);
return util.exportExcel(list, "管线巡线任务执行数据");
}
/**
* 获取管线巡线任务执行详细信息
*/
//@PreAuthorize("@ss.hasPermi('pipetask:pipeinspect:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(tPipeTaskInspectService.selectTPipeTaskInspectById(id));
}
/**
* 新增管线巡线任务执行
*/
//@PreAuthorize("@ss.hasPermi('pipetask:pipeinspect:add')")
@Log(title = "管线巡线任务执行", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TPipeTaskInspect tPipeTaskInspect)
{
return toAjax(tPipeTaskInspectService.insertTPipeTaskInspect(tPipeTaskInspect));
}
/**
* 修改管线巡线任务执行
*/
//@PreAuthorize("@ss.hasPermi('pipetask:pipeinspect:edit')")
@Log(title = "管线巡线任务执行", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TPipeTaskInspect tPipeTaskInspect)
{
return toAjax(tPipeTaskInspectService.updateTPipeTaskInspect(tPipeTaskInspect));
}
/**
* 删除管线巡线任务执行
*/
//@PreAuthorize("@ss.hasPermi('pipetask:pipeinspect:remove')")
// @Log(title = "管线巡线任务执行", businessType = BusinessType.DELETE)
// @DeleteMapping("/{ids}")
// public AjaxResult remove(@PathVariable Long[] ids)
// {
// return toAjax(tPipeTaskInspectService.deleteTPipeTaskInspectByIds(ids));
// }
@DeleteMapping("/{id}")
public AjaxResult remove(@PathVariable Long id)
{
return toAjax(tPipeTaskInspectService.deleteTPipeTaskInspectById(id));
}
/**
* 获取管道及打卡点信息
* @param tPipeTaskInspect 打卡巡检实体
* @return
*/
@GetMapping("/selectPipeAndPointInspectInfo")
public AjaxResult selectPipeAndPointInspectInfo(TPipeTaskInspect tPipeTaskInspect) {
return AjaxResult.success(tPipeTaskInspectService.selectPipeAndPointInspectInfo(tPipeTaskInspect));
}
/**
* 一天多检新增 20241223
* @param tPipeTaskInspect
* @return
*/
@PostMapping("/moreDailyInspect")
public AjaxResult moreDailyInspect(@RequestBody TPipeTaskInspect tPipeTaskInspect)
{
return toAjax(tPipeTaskInspectService.moreDailyInspect(tPipeTaskInspect));
}
/**
* 查询管线巡线任务打卡点执行列表
*
* @param tPipeTaskInspect 管线巡线任务执行
* @return 管线巡线任务执行集合
*/
@GetMapping("/selectTPipeTaskPointInspectList")
public TableDataInfo selectTPipeTaskPointInspectList(TPipeTaskInspect tPipeTaskInspect){
startPage();
return getDataTable(tPipeTaskInspectService.selectTPipeTaskPointInspectList(tPipeTaskInspect));
}
}
package com.zehong.web.controller.screenstatistic;
import com.zehong.common.core.domain.AjaxResult;
import com.zehong.system.service.TScreenStatisticService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.HashMap;
import java.util.Map;
/**
* 首页统计
*/
@RestController
@RequestMapping("/screen/statistic")
public class TScreenStatisticController {
@Autowired
private TScreenStatisticService screenStatisticService;
/**
* 考勤打卡统计
* @return
*/
@GetMapping("/clockStatistic")
public AjaxResult clockStatistic(){
return AjaxResult.success(screenStatisticService.clockStatistic());
}
/**
* 最新任务统计
* @param type 用户类型
* @param checkType 检查类型
* @return
*/
@GetMapping("/userCurrentTaskStatistic")
public AjaxResult userCurrentTaskStatistic(@RequestParam(value = "type") Integer type,@RequestParam(value = "checkType",required = false) Integer checkType){
Map<String,Object> param = new HashMap<>();
param.put("type",type);
param.put("checkType",checkType);
return AjaxResult.success(screenStatisticService.userCurrentTaskStatistic(param));
}
/**
* 最新巡检统计
* @param type 用户类型
* @return
*/
@GetMapping("/userCurrentInspectStatistic")
public AjaxResult userCurrentInspectStatistic(@RequestParam(value = "type") Integer type){
Map<String,Object> param = new HashMap<>();
param.put("type",type);
return AjaxResult.success(screenStatisticService.userCurrentInspectStatistic(param));
}
/**
* 设备生命周期统计
* @return
*/
@GetMapping("/devLifeStatistic")
public AjaxResult devLifeStatistic(){
return AjaxResult.success(screenStatisticService.devLifeStatistic());
}
/**
* 隐患统计
* @return
*/
@GetMapping("/dangerStatistic")
public AjaxResult dangerStatistic(){
return AjaxResult.success(screenStatisticService.dangerStatistic());
}
}
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.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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