Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
ad4d37ffe6
|
|
@ -131,6 +131,36 @@
|
|||
<version>2.3.30</version>
|
||||
<!-- <scope>provided</scope>-->
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.afterturn</groupId>
|
||||
<artifactId>easypoi-base</artifactId>
|
||||
<version>4.2.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.afterturn</groupId>
|
||||
<artifactId>easypoi-base</artifactId>
|
||||
<version>4.2.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.securitycontrol</groupId>
|
||||
<artifactId>securitycontrol-system</artifactId>
|
||||
<version>3.6.1</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.github.docker-java</groupId>
|
||||
<artifactId>docker-java</artifactId>
|
||||
<version>3.2.12</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>com.google.guava</groupId>
|
||||
<artifactId>guava</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,75 @@
|
|||
package com.securitycontrol.background.constructionQuality.controller;
|
||||
|
||||
import cn.afterturn.easypoi.excel.ExcelExportUtil;
|
||||
import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
|
||||
|
||||
import com.securitycontrol.background.constructionQuality.service.EarlyWarningsRecordService;
|
||||
import com.securitycontrol.background.constructionQuality.vo.EarlyWarningsRecordVo;
|
||||
import com.securitycontrol.common.core.web.controller.BaseController;
|
||||
import com.securitycontrol.common.core.web.page.TableDataInfo;
|
||||
import com.securitycontrol.common.log.annotation.Log;
|
||||
import com.securitycontrol.common.log.enums.OperationType;
|
||||
import cn.afterturn.easypoi.excel.entity.ExportParams;
|
||||
|
||||
import com.securitycontrol.system.export.util.ExcelStyleUtil;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.ServletOutputStream;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.net.URLEncoder;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 施工质量 - 预警记录
|
||||
* @author lsun
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/constructionQuality/earlyWarningRecord/")
|
||||
@Slf4j
|
||||
public class EarlyWarningsRecordController extends BaseController {
|
||||
|
||||
@Resource(name = "EarlyWarningsRecordService")
|
||||
private EarlyWarningsRecordService service;
|
||||
|
||||
@ApiOperation(value = "获取信息列表")
|
||||
@GetMapping("getEarlyWarningRecordLists")
|
||||
@Log(title = "施工质量", menu = "施工质量->预警记录", grade = OperationType.QUERY_BUSINESS, details = "查询列表", type = "业务日志")
|
||||
public TableDataInfo getEarlyWarningRecordLists(EarlyWarningsRecordVo dto) {
|
||||
startPage();
|
||||
List<EarlyWarningsRecordVo> list = service.getEarlyWarningRecordLists(dto);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@GetMapping("exportProData")
|
||||
@Log(title = "施工质量", menu = "施工质量->预警记录", grade = OperationType.EXPORT_BUSINESS, details = "导出列表", type = "业务日志")
|
||||
public void exportData(HttpServletRequest request, HttpServletResponse response, EarlyWarningsRecordVo dto) {
|
||||
try {
|
||||
List<EarlyWarningsRecordVo> proExportVoList = new ArrayList<>();
|
||||
List<EarlyWarningsRecordVo> proLists = service.getEarlyWarningRecordLists(dto);
|
||||
for (int i = 0; i < proLists.size(); i++) {
|
||||
proLists.get(i).setProId((i + 1) + "");
|
||||
EarlyWarningsRecordVo exportVo = new EarlyWarningsRecordVo();
|
||||
BeanUtils.copyProperties(proLists.get(i), exportVo);
|
||||
proExportVoList.add(exportVo);
|
||||
}
|
||||
ExportParams exportParams = new ExportParams("预警记录", "预警记录", ExcelType.XSSF);
|
||||
exportParams.setStyle(ExcelStyleUtil.class);
|
||||
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, EarlyWarningsRecordVo.class, proExportVoList);
|
||||
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
|
||||
response.setHeader("content-disposition", "attachment;fileName=" + URLEncoder.encode("预警记录" + ".xlsx", "UTF-8"));
|
||||
ServletOutputStream outputStream = response.getOutputStream();
|
||||
workbook.write(outputStream);
|
||||
outputStream.close();
|
||||
workbook.close();
|
||||
} catch (Exception e) {
|
||||
log.error("导出预警记录", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,74 @@
|
|||
package com.securitycontrol.background.constructionQuality.controller;
|
||||
|
||||
import cn.afterturn.easypoi.excel.ExcelExportUtil;
|
||||
import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
|
||||
import com.securitycontrol.background.constructionQuality.service.QualityRecordService;
|
||||
import com.securitycontrol.background.constructionQuality.vo.QualityRecordVo;
|
||||
import com.securitycontrol.common.core.web.controller.BaseController;
|
||||
import com.securitycontrol.common.core.web.page.TableDataInfo;
|
||||
import com.securitycontrol.common.log.annotation.Log;
|
||||
import com.securitycontrol.common.log.enums.OperationType;
|
||||
import cn.afterturn.easypoi.excel.entity.ExportParams;
|
||||
|
||||
import com.securitycontrol.system.export.util.ExcelStyleUtil;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.ServletOutputStream;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.net.URLEncoder;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 施工质量 - 质量检测记录
|
||||
* @author lsun
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/constructionQuality/qualityRecord/")
|
||||
@Slf4j
|
||||
public class QualityRecordController extends BaseController {
|
||||
|
||||
@Resource(name = "QualityRecordService")
|
||||
private QualityRecordService service;
|
||||
|
||||
@ApiOperation(value = "获取信息列表")
|
||||
@GetMapping("getQualityRecordLists")
|
||||
@Log(title = "施工质量", menu = "施工质量->质量检测记录", grade = OperationType.QUERY_BUSINESS, details = "查询列表", type = "业务日志")
|
||||
public TableDataInfo getQualityRecordLists(QualityRecordVo dto) {
|
||||
startPage();
|
||||
List<QualityRecordVo> list = service.getQualityRecordLists(dto);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@GetMapping("exportProData")
|
||||
@Log(title = "施工质量", menu = "施工质量->质量检测记录", grade = OperationType.EXPORT_BUSINESS, details = "导出列表", type = "业务日志")
|
||||
public void exportData(HttpServletRequest request, HttpServletResponse response, QualityRecordVo dto) {
|
||||
try {
|
||||
List<QualityRecordVo> proExportVoList = new ArrayList<>();
|
||||
List<QualityRecordVo> proLists = service.getQualityRecordLists(dto);
|
||||
for (int i = 0; i < proLists.size(); i++) {
|
||||
proLists.get(i).setProId((i + 1) + "");
|
||||
QualityRecordVo exportVo = new QualityRecordVo();
|
||||
BeanUtils.copyProperties(proLists.get(i), exportVo);
|
||||
proExportVoList.add(exportVo);
|
||||
}
|
||||
ExportParams exportParams = new ExportParams("质量检测记录", "质量检测记录", ExcelType.XSSF);
|
||||
exportParams.setStyle(ExcelStyleUtil.class);
|
||||
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, QualityRecordVo.class, proExportVoList);
|
||||
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
|
||||
response.setHeader("content-disposition", "attachment;fileName=" + URLEncoder.encode("质量检测记录" + ".xlsx", "UTF-8"));
|
||||
ServletOutputStream outputStream = response.getOutputStream();
|
||||
workbook.write(outputStream);
|
||||
outputStream.close();
|
||||
workbook.close();
|
||||
} catch (Exception e) {
|
||||
log.error("导出质量检测记录", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
package com.securitycontrol.background.constructionQuality.mapper;
|
||||
|
||||
import com.securitycontrol.background.constructionQuality.vo.EarlyWarningsRecordVo;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 施工质量 - 预警记录
|
||||
* @author lsun
|
||||
*/
|
||||
@Repository(value = "EarlyWarningsRecordMapper")
|
||||
public interface EarlyWarningsRecordMapper {
|
||||
|
||||
/**
|
||||
* 获取信息列表
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
List<EarlyWarningsRecordVo> getEarlyWarningsRecordLists(EarlyWarningsRecordVo dto);
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
package com.securitycontrol.background.constructionQuality.mapper;
|
||||
|
||||
import com.securitycontrol.background.constructionQuality.vo.QualityRecordVo;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 施工质量 - 质量检测记录
|
||||
* @author lsun
|
||||
*/
|
||||
@Repository(value = "QualityRecordMapper")
|
||||
public interface QualityRecordMapper {
|
||||
|
||||
/**
|
||||
* 获取信息列表
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
List<QualityRecordVo> getQualityRecordLists(QualityRecordVo dto);
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
package com.securitycontrol.background.constructionQuality.service;
|
||||
|
||||
|
||||
import com.securitycontrol.background.constructionQuality.vo.EarlyWarningsRecordVo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 施工质量 - 预警记录
|
||||
* @author lsun
|
||||
*/
|
||||
public interface EarlyWarningsRecordService {
|
||||
|
||||
/**
|
||||
* 获取信息列表
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
List<EarlyWarningsRecordVo> getEarlyWarningRecordLists(EarlyWarningsRecordVo dto);
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
package com.securitycontrol.background.constructionQuality.service;
|
||||
|
||||
import com.securitycontrol.background.constructionQuality.vo.QualityRecordVo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 施工质量 - 质量检测记录
|
||||
* @author lsun
|
||||
*/
|
||||
public interface QualityRecordService {
|
||||
|
||||
/**
|
||||
* 获取信息列表
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
List<QualityRecordVo> getQualityRecordLists(QualityRecordVo dto);
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
package com.securitycontrol.background.constructionQuality.service.impl;
|
||||
|
||||
import com.securitycontrol.background.constructionQuality.mapper.EarlyWarningsRecordMapper;
|
||||
import com.securitycontrol.background.constructionQuality.service.EarlyWarningsRecordService;
|
||||
import com.securitycontrol.background.constructionQuality.vo.EarlyWarningsRecordVo;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import javax.annotation.Resource;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 施工质量 - 预警记录
|
||||
* @author lsun
|
||||
*/
|
||||
@Service(value = "EarlyWarningsRecordService")
|
||||
@Slf4j
|
||||
public class EarlyWarningsRecordServiceImpl implements EarlyWarningsRecordService {
|
||||
|
||||
@Resource(name = "EarlyWarningsRecordMapper")
|
||||
private EarlyWarningsRecordMapper mapper;
|
||||
|
||||
@Override
|
||||
public List<EarlyWarningsRecordVo> getEarlyWarningRecordLists(EarlyWarningsRecordVo dto) {
|
||||
List<EarlyWarningsRecordVo> list = new ArrayList<>();
|
||||
list = mapper.getEarlyWarningsRecordLists(dto);
|
||||
return list;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
package com.securitycontrol.background.constructionQuality.service.impl;
|
||||
|
||||
|
||||
import com.securitycontrol.background.constructionQuality.mapper.QualityRecordMapper;
|
||||
import com.securitycontrol.background.constructionQuality.service.QualityRecordService;
|
||||
import com.securitycontrol.background.constructionQuality.vo.QualityRecordVo;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 施工质量 - 质量检测记录
|
||||
* @author lsun
|
||||
*/
|
||||
@Service(value = "QualityRecordService")
|
||||
@Slf4j
|
||||
public class QualityRecordServiceImpl implements QualityRecordService {
|
||||
|
||||
@Resource(name = "QualityRecordMapper")
|
||||
private QualityRecordMapper mapper;
|
||||
|
||||
@Override
|
||||
public List<QualityRecordVo> getQualityRecordLists(QualityRecordVo dto) {
|
||||
List<QualityRecordVo> list = new ArrayList<>();
|
||||
list = mapper.getQualityRecordLists(dto);
|
||||
return list;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
package com.securitycontrol.background.constructionQuality.vo;
|
||||
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author lsun
|
||||
*/
|
||||
@Data
|
||||
public class EarlyWarningsRecordVo {
|
||||
|
||||
@Excel(name = "序号", width = 10.0, orderNum = "0")
|
||||
private String proId;
|
||||
|
||||
@ApiModelProperty(value = "告警内容")
|
||||
@Excel(name = "告警内容", width = 10.0, orderNum = "1")
|
||||
private String warnContent;
|
||||
|
||||
@ApiModelProperty(value = "告警时间")
|
||||
@Excel(name = "告警时间", width = 10.0, orderNum = "2")
|
||||
private String warnTime;
|
||||
|
||||
@ApiModelProperty(value = "告警类型")
|
||||
private String warnType;
|
||||
|
||||
@ApiModelProperty(value = "监测时间")
|
||||
private String createTime;
|
||||
|
||||
private String keyWord;
|
||||
}
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
package com.securitycontrol.background.constructionQuality.vo;
|
||||
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author lsun
|
||||
*/
|
||||
@Data
|
||||
public class QualityRecordVo {
|
||||
|
||||
@ApiModelProperty(value = "工程ID")
|
||||
@Excel(name = "序号", width = 10.0, orderNum = "0")
|
||||
private String proId;
|
||||
|
||||
@ApiModelProperty(value = "设备名称")
|
||||
@Excel(name = "设备名称", width = 10.0, orderNum = "1")
|
||||
private String deviceName;
|
||||
|
||||
@ApiModelProperty(value = "区域名称")
|
||||
@Excel(name = "区域名称", width = 10.0, orderNum = "2")
|
||||
private String areaName;
|
||||
|
||||
@ApiModelProperty(value = "监测点名称")
|
||||
@Excel(name = "监测点名称", width = 10.0, orderNum = "3")
|
||||
private String modeName;
|
||||
|
||||
@ApiModelProperty(value = "检测值")
|
||||
@Excel(name = "检测值", width = 10.0, orderNum = "4")
|
||||
private String val;
|
||||
|
||||
@ApiModelProperty(value = "累计变化")
|
||||
@Excel(name = "累计变化", width = 10.0, orderNum = "5")
|
||||
private String changeVal;
|
||||
|
||||
@ApiModelProperty(value = "状态")
|
||||
@Excel(name = "状态", width = 10.0, orderNum = "6")
|
||||
private String isWarn;
|
||||
|
||||
@ApiModelProperty(value = "监测时间")
|
||||
@Excel(name = "监测时间", width = 10.0, orderNum = "7")
|
||||
private String createTime;
|
||||
|
||||
private String keyWord;
|
||||
}
|
||||
|
|
@ -0,0 +1,76 @@
|
|||
package com.securitycontrol.background.towerDetection.controller;
|
||||
|
||||
import cn.afterturn.easypoi.excel.ExcelExportUtil;
|
||||
import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
|
||||
import com.securitycontrol.background.towerDetection.service.EarlyWarningRecordService;
|
||||
|
||||
|
||||
import com.securitycontrol.background.towerDetection.vo.EarlyWarningRecordVo;
|
||||
import com.securitycontrol.common.core.web.controller.BaseController;
|
||||
import com.securitycontrol.common.core.web.page.TableDataInfo;
|
||||
import com.securitycontrol.common.log.annotation.Log;
|
||||
import com.securitycontrol.common.log.enums.OperationType;
|
||||
import cn.afterturn.easypoi.excel.entity.ExportParams;
|
||||
|
||||
import com.securitycontrol.system.export.util.ExcelStyleUtil;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.ServletOutputStream;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.net.URLEncoder;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 组塔检测 - 预警记录
|
||||
* @author lsun
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/towerDetection/earlyWarningRecord/")
|
||||
@Slf4j
|
||||
public class EarlyWarningRecordController extends BaseController {
|
||||
|
||||
@Resource(name = "EarlyWarningRecordService")
|
||||
private EarlyWarningRecordService service;
|
||||
|
||||
@ApiOperation(value = "获取信息列表")
|
||||
@GetMapping("getEarlyWarningRecordLists")
|
||||
@Log(title = "组塔检测", menu = "组塔检测->预警记录", grade = OperationType.QUERY_BUSINESS, details = "查询列表", type = "业务日志")
|
||||
public TableDataInfo getEarlyWarningRecordLists(EarlyWarningRecordVo dto) {
|
||||
startPage();
|
||||
List<EarlyWarningRecordVo> list = service.getEarlyWarningRecordLists(dto);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@GetMapping("exportProData")
|
||||
@Log(title = "组塔检测", menu = "组塔检测->预警记录", grade = OperationType.EXPORT_BUSINESS, details = "导出列表", type = "业务日志")
|
||||
public void exportData(HttpServletRequest request, HttpServletResponse response, EarlyWarningRecordVo dto) {
|
||||
try {
|
||||
List<EarlyWarningRecordVo> proExportVoList = new ArrayList<>();
|
||||
List<EarlyWarningRecordVo> proLists = service.getEarlyWarningRecordLists(dto);
|
||||
for (int i = 0; i < proLists.size(); i++) {
|
||||
proLists.get(i).setProId((i + 1) + "");
|
||||
EarlyWarningRecordVo exportVo = new EarlyWarningRecordVo();
|
||||
BeanUtils.copyProperties(proLists.get(i), exportVo);
|
||||
proExportVoList.add(exportVo);
|
||||
}
|
||||
ExportParams exportParams = new ExportParams("预警记录", "预警记录", ExcelType.XSSF);
|
||||
exportParams.setStyle(ExcelStyleUtil.class);
|
||||
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, EarlyWarningRecordVo.class, proExportVoList);
|
||||
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
|
||||
response.setHeader("content-disposition", "attachment;fileName=" + URLEncoder.encode("预警记录" + ".xlsx", "UTF-8"));
|
||||
ServletOutputStream outputStream = response.getOutputStream();
|
||||
workbook.write(outputStream);
|
||||
outputStream.close();
|
||||
workbook.close();
|
||||
} catch (Exception e) {
|
||||
log.error("导出预警记录", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,74 @@
|
|||
package com.securitycontrol.background.towerDetection.controller;
|
||||
|
||||
import cn.afterturn.easypoi.excel.ExcelExportUtil;
|
||||
import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
|
||||
import com.securitycontrol.background.towerDetection.service.TowerRecordService;
|
||||
import com.securitycontrol.background.towerDetection.vo.TowerRecordVo;
|
||||
import com.securitycontrol.common.core.web.controller.BaseController;
|
||||
import com.securitycontrol.common.core.web.page.TableDataInfo;
|
||||
import com.securitycontrol.common.log.annotation.Log;
|
||||
import com.securitycontrol.common.log.enums.OperationType;
|
||||
import cn.afterturn.easypoi.excel.entity.ExportParams;
|
||||
|
||||
import com.securitycontrol.system.export.util.ExcelStyleUtil;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.ServletOutputStream;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.net.URLEncoder;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 组塔检测 - 检测记录
|
||||
* @author lsun
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/towerDetection/towerRecord/")
|
||||
@Slf4j
|
||||
public class TowerRecordController extends BaseController {
|
||||
|
||||
@Resource(name = "TowerRecordService")
|
||||
private TowerRecordService service;
|
||||
|
||||
@ApiOperation(value = "获取信息列表")
|
||||
@GetMapping("getTowerRecordLists")
|
||||
@Log(title = "组塔检测", menu = "组塔检测->检测记录", grade = OperationType.QUERY_BUSINESS, details = "查询列表", type = "业务日志")
|
||||
public TableDataInfo getTowerRecordLists(TowerRecordVo dto) {
|
||||
startPage();
|
||||
List<TowerRecordVo> list = service.getTowerRecordLists(dto);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@GetMapping("exportProData")
|
||||
@Log(title = "组塔检测", menu = "组塔检测->检测记录", grade = OperationType.EXPORT_BUSINESS, details = "导出列表", type = "业务日志")
|
||||
public void exportData(HttpServletRequest request, HttpServletResponse response, TowerRecordVo dto) {
|
||||
try {
|
||||
List<TowerRecordVo> proExportVoList = new ArrayList<>();
|
||||
List<TowerRecordVo> proLists = service.getTowerRecordLists(dto);
|
||||
for (int i = 0; i < proLists.size(); i++) {
|
||||
proLists.get(i).setProId((i + 1) + "");
|
||||
TowerRecordVo exportVo = new TowerRecordVo();
|
||||
BeanUtils.copyProperties(proLists.get(i), exportVo);
|
||||
proExportVoList.add(exportVo);
|
||||
}
|
||||
ExportParams exportParams = new ExportParams("检测记录", "检测记录", ExcelType.XSSF);
|
||||
exportParams.setStyle(ExcelStyleUtil.class);
|
||||
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, TowerRecordVo.class, proExportVoList);
|
||||
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
|
||||
response.setHeader("content-disposition", "attachment;fileName=" + URLEncoder.encode("检测记录" + ".xlsx", "UTF-8"));
|
||||
ServletOutputStream outputStream = response.getOutputStream();
|
||||
workbook.write(outputStream);
|
||||
outputStream.close();
|
||||
workbook.close();
|
||||
} catch (Exception e) {
|
||||
log.error("导出检测记录", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
package com.securitycontrol.background.towerDetection.mapper;
|
||||
|
||||
import com.securitycontrol.background.towerDetection.vo.EarlyWarningRecordVo;
|
||||
import com.securitycontrol.background.towerDetection.vo.TowerRecordVo;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 组塔检测 - 预警记录
|
||||
* @author lsun
|
||||
*/
|
||||
@Repository(value = "EarlyWarningRecordMapper")
|
||||
public interface EarlyWarningRecordMapper {
|
||||
|
||||
/**
|
||||
* 获取信息列表
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
List<EarlyWarningRecordVo> getEarlyWarningRecordLists(EarlyWarningRecordVo dto);
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
package com.securitycontrol.background.towerDetection.mapper;
|
||||
|
||||
import com.securitycontrol.background.towerDetection.vo.TowerRecordVo;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 组塔检测 - 检测记录
|
||||
* @author lsun
|
||||
*/
|
||||
@Repository(value = "TowerRecordMapper")
|
||||
public interface TowerRecordMapper {
|
||||
|
||||
/**
|
||||
* 获取信息列表
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
List<TowerRecordVo> getTowerRecordLists(TowerRecordVo dto);
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
package com.securitycontrol.background.towerDetection.service;
|
||||
|
||||
import com.securitycontrol.background.towerDetection.vo.EarlyWarningRecordVo;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 组塔检测 - 预警记录
|
||||
* @author lsun
|
||||
*/
|
||||
public interface EarlyWarningRecordService {
|
||||
|
||||
/**
|
||||
* 获取信息列表
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
List<EarlyWarningRecordVo> getEarlyWarningRecordLists(EarlyWarningRecordVo dto);
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
package com.securitycontrol.background.towerDetection.service;
|
||||
|
||||
import com.securitycontrol.background.towerDetection.vo.TowerRecordVo;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 组塔检测 - 检测记录
|
||||
* @author lsun
|
||||
*/
|
||||
public interface TowerRecordService {
|
||||
|
||||
/**
|
||||
* 获取信息列表
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
List<TowerRecordVo> getTowerRecordLists(TowerRecordVo dto);
|
||||
}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
package com.securitycontrol.background.towerDetection.service.impl;
|
||||
|
||||
|
||||
import com.securitycontrol.background.towerDetection.mapper.EarlyWarningRecordMapper;
|
||||
import com.securitycontrol.background.towerDetection.service.EarlyWarningRecordService;
|
||||
import com.securitycontrol.background.towerDetection.vo.EarlyWarningRecordVo;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 组塔检测 - 预警记录
|
||||
* @author lsun
|
||||
*/
|
||||
@Service(value = "EarlyWarningRecordService")
|
||||
@Slf4j
|
||||
public class EarlyWarningRecordServiceImpl implements EarlyWarningRecordService {
|
||||
|
||||
@Resource(name = "EarlyWarningRecordMapper")
|
||||
private EarlyWarningRecordMapper mapper;
|
||||
|
||||
@Override
|
||||
public List<EarlyWarningRecordVo> getEarlyWarningRecordLists(EarlyWarningRecordVo dto) {
|
||||
List<EarlyWarningRecordVo> list = new ArrayList<>();
|
||||
list = mapper.getEarlyWarningRecordLists(dto);
|
||||
return list;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
package com.securitycontrol.background.towerDetection.service.impl;
|
||||
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.securitycontrol.background.towerDetection.mapper.TowerRecordMapper;
|
||||
import com.securitycontrol.background.towerDetection.service.TowerRecordService;
|
||||
import com.securitycontrol.background.towerDetection.vo.TowerRecordVo;
|
||||
import com.securitycontrol.common.core.constant.Constant;
|
||||
import com.securitycontrol.common.core.utils.ImportExcelUtils;
|
||||
import com.securitycontrol.common.core.utils.StringUtils;
|
||||
import com.securitycontrol.common.core.utils.aes.DateTimeHelper;
|
||||
import com.securitycontrol.common.core.web.domain.AjaxResult;
|
||||
import com.securitycontrol.common.security.utils.ValidatorsUtils;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.transaction.interceptor.TransactionAspectSupport;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 组塔检测 - 检测记录
|
||||
* @author lsun
|
||||
*/
|
||||
@Service(value = "TowerRecordService")
|
||||
@Slf4j
|
||||
public class TowerRecordServiceImpl implements TowerRecordService {
|
||||
|
||||
@Resource(name = "TowerRecordMapper")
|
||||
private TowerRecordMapper mapper;
|
||||
|
||||
@Override
|
||||
public List<TowerRecordVo> getTowerRecordLists(TowerRecordVo dto) {
|
||||
List<TowerRecordVo> list = new ArrayList<>();
|
||||
list = mapper.getTowerRecordLists(dto);
|
||||
return list;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
package com.securitycontrol.background.towerDetection.vo;
|
||||
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Data
|
||||
public class EarlyWarningRecordVo {
|
||||
|
||||
@Excel(name = "序号", width = 10.0, orderNum = "0")
|
||||
private String proId;
|
||||
|
||||
@ApiModelProperty(value = "告警内容")
|
||||
@Excel(name = "告警内容", width = 10.0, orderNum = "1")
|
||||
private String warnContent;
|
||||
|
||||
@ApiModelProperty(value = "告警时间")
|
||||
@Excel(name = "告警时间", width = 10.0, orderNum = "2")
|
||||
private String warnTime;
|
||||
|
||||
@ApiModelProperty(value = "告警类型")
|
||||
private String warnType;
|
||||
|
||||
@ApiModelProperty(value = "监测时间")
|
||||
private String createTime;
|
||||
|
||||
private String keyWord;
|
||||
}
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
package com.securitycontrol.background.towerDetection.vo;
|
||||
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Data
|
||||
public class TowerRecordVo {
|
||||
|
||||
@ApiModelProperty(value = "工程ID")
|
||||
@Excel(name = "序号", width = 10.0, orderNum = "0")
|
||||
private String proId;
|
||||
|
||||
@ApiModelProperty(value = "设备名称")
|
||||
@Excel(name = "设备名称", width = 10.0, orderNum = "1")
|
||||
private String deviceName;
|
||||
|
||||
@ApiModelProperty(value = "区域名称")
|
||||
@Excel(name = "区域名称", width = 10.0, orderNum = "2")
|
||||
private String areaName;
|
||||
|
||||
@ApiModelProperty(value = "监测点名称")
|
||||
@Excel(name = "监测点名称", width = 10.0, orderNum = "3")
|
||||
private String modeName;
|
||||
|
||||
@ApiModelProperty(value = "检测值")
|
||||
@Excel(name = "检测值", width = 10.0, orderNum = "4")
|
||||
private String val;
|
||||
|
||||
@ApiModelProperty(value = "累计变化")
|
||||
@Excel(name = "累计变化", width = 10.0, orderNum = "5")
|
||||
private String changeVal;
|
||||
|
||||
@ApiModelProperty(value = "状态")
|
||||
@Excel(name = "状态", width = 10.0, orderNum = "6")
|
||||
private String isWarn;
|
||||
|
||||
@ApiModelProperty(value = "监测时间")
|
||||
@Excel(name = "监测时间", width = 10.0, orderNum = "7")
|
||||
private String createTime;
|
||||
|
||||
private String keyWord;
|
||||
}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.securitycontrol.background.constructionQuality.mapper.EarlyWarningsRecordMapper">
|
||||
<!--获取信息列表-->
|
||||
<select id="getEarlyWarningsRecordLists" resultType="com.securitycontrol.background.constructionQuality.vo.EarlyWarningsRecordVo">
|
||||
SELECT tw.warn_content as warnContent, tw.warn_time as warnTime
|
||||
FROM tb_warn tw
|
||||
LEFT JOIN tb_device_detail tdd ON tw.device_id = tdd.device_id
|
||||
LEFT JOIN tb_bd_device tbd ON tdd.device_id = tbd.device_id
|
||||
LEFT JOIN sys_dict sd ON sd.dict_id = tbd.devic_type
|
||||
WHERE sd.dict_code ='6664'
|
||||
<if test="keyWord !=null and keyWord!=''">
|
||||
AND (
|
||||
INSTR(tp.pro_name,#{keyWord}) > 0 OR
|
||||
INSTR(tp.jl_unit,#{keyWord}) > 0 OR
|
||||
INSTR(tp.sg_unit,#{keyWord}) > 0 OR
|
||||
INSTR(tp.manager,#{keyWord}) > 0
|
||||
)
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.securitycontrol.background.constructionQuality.mapper.QualityRecordMapper">
|
||||
<!--获取信息列表-->
|
||||
<select id="getQualityRecordLists" resultType="com.securitycontrol.background.constructionQuality.vo.QualityRecordVo">
|
||||
SELECT tbd.device_name as deviceName, ta.area_name as areaName, tdd.mode_name as modeName,a.val,
|
||||
a.change_val as changeVal,a.is_warn as isWarn,a.create_time as createTime
|
||||
FROM tb_his_device_value a
|
||||
LEFT JOIN tb_device_detail tdd ON a.attribute_id = tdd.id
|
||||
LEFT JOIN tb_bd_device tbd ON tdd.device_id = tbd.device_id
|
||||
LEFT JOIN tb_area ta ON tbd.area_id = ta.area_id
|
||||
LEFT JOIN sys_dict sd ON sd.dict_id = tbd.devic_type
|
||||
WHERE sd.dict_code ='6662'
|
||||
<if test="keyWord !=null and keyWord!=''">
|
||||
AND (
|
||||
INSTR(tp.pro_name,#{keyWord}) > 0 OR
|
||||
INSTR(tp.jl_unit,#{keyWord}) > 0 OR
|
||||
INSTR(tp.sg_unit,#{keyWord}) > 0 OR
|
||||
INSTR(tp.manager,#{keyWord}) > 0
|
||||
)
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.securitycontrol.background.towerDetection.mapper.EarlyWarningRecordMapper">
|
||||
<!--获取信息列表-->
|
||||
<select id="getEarlyWarningRecordLists" resultType="com.securitycontrol.background.towerDetection.vo.EarlyWarningRecordVo">
|
||||
SELECT tw.warn_content as warnContent, tw.warn_time as warnTime
|
||||
FROM tb_warn tw
|
||||
LEFT JOIN tb_device_detail tdd ON tw.device_id = tdd.device_id
|
||||
LEFT JOIN tb_bd_device tbd ON tdd.device_id = tbd.device_id
|
||||
LEFT JOIN sys_dict sd ON sd.dict_id = tbd.devic_type
|
||||
WHERE sd.dict_code ='6663'
|
||||
<if test="keyWord !=null and keyWord!=''">
|
||||
AND (
|
||||
INSTR(tp.pro_name,#{keyWord}) > 0 OR
|
||||
INSTR(tp.jl_unit,#{keyWord}) > 0 OR
|
||||
INSTR(tp.sg_unit,#{keyWord}) > 0 OR
|
||||
INSTR(tp.manager,#{keyWord}) > 0
|
||||
)
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.securitycontrol.background.towerDetection.mapper.TowerRecordMapper">
|
||||
<!--获取信息列表-->
|
||||
<select id="getTowerRecordLists" resultType="com.securitycontrol.background.towerDetection.vo.TowerRecordVo">
|
||||
SELECT tbd.device_name as deviceName, ta.area_name as areaName, tdd.mode_name as modeName,a.val,
|
||||
a.change_val as changeVal,a.is_warn as isWarn,a.create_time as createTime
|
||||
FROM tb_his_device_value a
|
||||
LEFT JOIN tb_device_detail tdd ON a.attribute_id = tdd.id
|
||||
LEFT JOIN tb_bd_device tbd ON tdd.device_id = tbd.device_id
|
||||
LEFT JOIN tb_area ta ON tbd.area_id = ta.area_id
|
||||
LEFT JOIN sys_dict sd ON sd.dict_id = tbd.devic_type
|
||||
WHERE sd.dict_code ='6661'
|
||||
<if test="keyWord !=null and keyWord!=''">
|
||||
AND (
|
||||
INSTR(tp.pro_name,#{keyWord}) > 0 OR
|
||||
INSTR(tp.jl_unit,#{keyWord}) > 0 OR
|
||||
INSTR(tp.sg_unit,#{keyWord}) > 0 OR
|
||||
INSTR(tp.manager,#{keyWord}) > 0
|
||||
)
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue