Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
9d4855b46f
|
|
@ -1,6 +1,9 @@
|
|||
package com.securitycontrol.common.core.utils.aes;
|
||||
|
||||
|
||||
import java.lang.reflect.Array;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
|
@ -39,6 +42,14 @@ public class ListHelper {
|
|||
return strs;
|
||||
}
|
||||
|
||||
|
||||
public static List<String> asList(String arr,String str){
|
||||
if(StringHelper.isNotEmpty(arr)){
|
||||
return Arrays.asList(arr.split(str));
|
||||
}
|
||||
return null;
|
||||
|
||||
}
|
||||
/**
|
||||
* 集合校验
|
||||
* @param keyExtractor
|
||||
|
|
|
|||
|
|
@ -0,0 +1,23 @@
|
|||
package com.securitycontrol.entity.background.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author:cwchen
|
||||
* @date:2024-04-01-19:09
|
||||
* @version:1.0
|
||||
* @description:标段工程成本
|
||||
*/
|
||||
@Data
|
||||
public class ProjectCostVo {
|
||||
|
||||
@ApiModelProperty("成本")
|
||||
private String amount;
|
||||
|
||||
@ApiModelProperty("支出项")
|
||||
private String expenditure;
|
||||
|
||||
@ApiModelProperty("支出日期")
|
||||
private String expenditureDate;
|
||||
}
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
package com.securitycontrol.entity.background.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author:cwchen
|
||||
* @date:2024-04-01-19:56
|
||||
* @version:1.0
|
||||
* @description:工程项目-vo
|
||||
*/
|
||||
@Data
|
||||
public class ProjectVo {
|
||||
|
||||
@ApiModelProperty("项目ID")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty("项目名称")
|
||||
private String proName;
|
||||
|
||||
@ApiModelProperty("项目编码")
|
||||
private String proNo;
|
||||
|
||||
@ApiModelProperty("建管单位ID")
|
||||
private String orgId;
|
||||
|
||||
@ApiModelProperty("电压等级")
|
||||
private String vlotage;
|
||||
|
||||
@ApiModelProperty("工程类型")
|
||||
private String proType;
|
||||
}
|
||||
|
|
@ -4,7 +4,7 @@ import io.swagger.annotations.ApiModelProperty;
|
|||
import lombok.Data;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author lsun
|
||||
*/
|
||||
@Data
|
||||
public class TowerRecordVo {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,38 @@
|
|||
package com.securitycontrol.entity.screen.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 出入管理
|
||||
* @author lsun
|
||||
*/
|
||||
@Data
|
||||
public class AccessMgeDto {
|
||||
|
||||
@ApiModelProperty(value = "工程标段")
|
||||
private String bidCode;
|
||||
|
||||
@ApiModelProperty(value = "出入类型 1进 2出")
|
||||
private String accessType;
|
||||
|
||||
@ApiModelProperty(value = "日期类型 1今日 2当月")
|
||||
private String timeType;
|
||||
|
||||
@ApiModelProperty(value = "工程名称")
|
||||
private String proName;
|
||||
|
||||
@ApiModelProperty(value = "车牌号")
|
||||
private String carNum;
|
||||
|
||||
@ApiModelProperty(value = "时间戳")
|
||||
private String date;
|
||||
@ApiModelProperty(value = "开始时间")
|
||||
private String startDate;
|
||||
@ApiModelProperty(value = "结束时间")
|
||||
private String endDate;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "姓名")
|
||||
private String userName;
|
||||
}
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
package com.securitycontrol.entity.screen.vo;
|
||||
|
||||
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 出入管理
|
||||
* @author lsun
|
||||
*/
|
||||
@Data
|
||||
public class AccessMgeVo {
|
||||
@ApiModelProperty(value = "id")
|
||||
private String warnId;
|
||||
|
||||
@Excel(name = "序号", width = 10.0, orderNum = "0")
|
||||
private String proId;
|
||||
|
||||
@ApiModelProperty(value = "当月出场")
|
||||
private String dycNum;
|
||||
@ApiModelProperty(value = "当月入场")
|
||||
private String dyrNum;
|
||||
@ApiModelProperty(value = "今日出场")
|
||||
private String jrcNum;
|
||||
@ApiModelProperty(value = "今日入场")
|
||||
private String jtrNum;
|
||||
|
||||
@ApiModelProperty(value = "告警内容")
|
||||
private String warnContent;
|
||||
@ApiModelProperty(value = "文件名称")
|
||||
private String fileName;
|
||||
@ApiModelProperty(value = "文件后缀")
|
||||
private String fileSuffix;
|
||||
@ApiModelProperty(value = "文件id/路径")
|
||||
private String fileId;
|
||||
@ApiModelProperty(value = "文件类型 0 文件 1图片")
|
||||
private String fileType;
|
||||
|
||||
@ApiModelProperty(value = "工程名称")
|
||||
@Excel(name = "工程名称", width = 10.0, orderNum = "1")
|
||||
private String proName;
|
||||
|
||||
@ApiModelProperty(value = "车牌号")
|
||||
@Excel(name = "车牌号", width = 10.0, orderNum = "2")
|
||||
private String carNum;
|
||||
|
||||
@ApiModelProperty(value = "司机姓名")
|
||||
@Excel(name = "司机姓名", width = 10.0, orderNum = "3")
|
||||
private String userName;
|
||||
|
||||
@ApiModelProperty(value = "司机电话")
|
||||
@Excel(name = "司机电话", width = 10.0, orderNum = "4")
|
||||
private String phone;
|
||||
|
||||
@ApiModelProperty(value = "状态")
|
||||
@Excel(name = "状态", width = 10.0, orderNum = "5")
|
||||
private String accessType;
|
||||
|
||||
@ApiModelProperty(value = "时间")
|
||||
@Excel(name = "时间", width = 10.0, orderNum = "6")
|
||||
private String accesssTime;
|
||||
}
|
||||
|
|
@ -0,0 +1,57 @@
|
|||
package com.securitycontrol.entity.screen.vo;
|
||||
|
||||
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 出入管理 -导出
|
||||
* @author lsun
|
||||
*/
|
||||
@Data
|
||||
public class AccessMgesVo {
|
||||
@ApiModelProperty(value = "id")
|
||||
private String warnId;
|
||||
|
||||
@Excel(name = "序号", width = 10.0, orderNum = "0")
|
||||
private String proId;
|
||||
|
||||
@ApiModelProperty(value = "当月出场")
|
||||
private String dycNum;
|
||||
@ApiModelProperty(value = "当月入场")
|
||||
private String dyrNum;
|
||||
@ApiModelProperty(value = "今日出场")
|
||||
private String jrcNum;
|
||||
@ApiModelProperty(value = "今日入场")
|
||||
private String jtrNum;
|
||||
|
||||
@ApiModelProperty(value = "告警内容")
|
||||
private String warnContent;
|
||||
@ApiModelProperty(value = "文件名称")
|
||||
private String fileName;
|
||||
@ApiModelProperty(value = "文件后缀")
|
||||
private String fileSuffix;
|
||||
@ApiModelProperty(value = "文件id/路径")
|
||||
private String fileId;
|
||||
@ApiModelProperty(value = "文件类型 0 文件 1图片")
|
||||
private String fileType;
|
||||
|
||||
@ApiModelProperty(value = "工程名称")
|
||||
@Excel(name = "工程名称", width = 10.0, orderNum = "1")
|
||||
private String proName;
|
||||
@ApiModelProperty(value = "车牌号")
|
||||
private String carNum;
|
||||
|
||||
@ApiModelProperty(value = "司机姓名")
|
||||
@Excel(name = "姓名", width = 10.0, orderNum = "2")
|
||||
private String userName;
|
||||
@ApiModelProperty(value = "司机电话")
|
||||
@Excel(name = "电话", width = 10.0, orderNum = "3")
|
||||
private String phone;
|
||||
@ApiModelProperty(value = "状态")
|
||||
@Excel(name = "状态", width = 10.0, orderNum = "4")
|
||||
private String accessType;
|
||||
@ApiModelProperty(value = "时间")
|
||||
@Excel(name = "时间", width = 10.0, orderNum = "5")
|
||||
private String accesssTime;
|
||||
}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
package com.securitycontrol.entity.screen.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author:cwchen
|
||||
* @date:2024-04-01-10:09
|
||||
* @version:1.0
|
||||
* @description:Dtree实体类
|
||||
*/
|
||||
@Data
|
||||
public class DtreeVo {
|
||||
|
||||
@ApiModelProperty("id")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty("名称")
|
||||
private String title;
|
||||
|
||||
@ApiModelProperty("父ID")
|
||||
private String parentId;
|
||||
|
||||
@ApiModelProperty("设备是否在线")
|
||||
private String onLine;
|
||||
|
||||
@ApiModelProperty("层级")
|
||||
private String level;
|
||||
|
||||
private boolean spread = true;
|
||||
}
|
||||
|
|
@ -47,6 +47,10 @@ public class SystemGlobal {
|
|||
*/
|
||||
public final static String PRO_IMAGE="工程图片";
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public final static String USER_IMAGE="人员图片";
|
||||
/**
|
||||
* 预案类型
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -17,5 +17,6 @@
|
|||
<module>securitycontrol-background</module>
|
||||
<module>securitycontrol-screen</module>
|
||||
<module>securitycontrol-files</module>
|
||||
<module>securitycontrol-Interface</module>
|
||||
</modules>
|
||||
</project>
|
||||
|
|
@ -0,0 +1,90 @@
|
|||
<?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>securitycontrol-model</artifactId>
|
||||
<groupId>com.securitycontrol</groupId>
|
||||
<version>3.6.1</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>securitycontrol-Interface</artifactId>
|
||||
<dependencies>
|
||||
|
||||
<!-- SpringCloud Alibaba Nacos -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
||||
<version>2.2.3.RELEASE</version>
|
||||
<!--不使用Ribbon 进行客户端负载均衡-->
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-netflix-ribbon</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-loadbalancer</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.securitycontrol</groupId>
|
||||
<artifactId>securitycontrol-commons-security</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.securitycontrol</groupId>
|
||||
<artifactId>securitycontrol-commons-swagger</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- SpringCloud Alibaba Nacos Config -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- SpringCloud Alibaba Sentinel -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- SpringBoot Actuator -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-actuator</artifactId>
|
||||
</dependency>
|
||||
<!-- Swagger UI -->
|
||||
<dependency>
|
||||
<groupId>io.springfox</groupId>
|
||||
<artifactId>springfox-swagger-ui</artifactId>
|
||||
<version>${swagger.fox.version}</version>
|
||||
</dependency>
|
||||
<!-- Mysql Connector -->
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
</dependency>
|
||||
<!-- VideoSecurityControl Common DataSource -->
|
||||
<dependency>
|
||||
<groupId>com.securitycontrol</groupId>
|
||||
<artifactId>securitycontrol-commons-datasource</artifactId>
|
||||
</dependency>
|
||||
<!-- VideoSecurityControl Common DataScope -->
|
||||
<dependency>
|
||||
<groupId>com.securitycontrol</groupId>
|
||||
<artifactId>securitycontrol-commons-datascope</artifactId>
|
||||
</dependency>
|
||||
<!-- logstash -->
|
||||
<dependency>
|
||||
<groupId>net.logstash.logback</groupId>
|
||||
<artifactId>logstash-logback-encoder</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.securitycontrol</groupId>
|
||||
<artifactId>securitycontrol-commons-entity</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
package com.securitycontrol.inter;
|
||||
|
||||
|
||||
import com.securitycontrol.common.security.annotation.EnableCustomConfig;
|
||||
import com.securitycontrol.common.security.annotation.EnableRyFeignClients;
|
||||
import com.securitycontrol.common.swagger.annotation.EnableCustomSwagger2;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration;
|
||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
|
||||
/**
|
||||
* 系统模块
|
||||
*
|
||||
* @author czc
|
||||
*/
|
||||
@EnableCustomConfig
|
||||
@EnableCustomSwagger2
|
||||
@EnableRyFeignClients
|
||||
@SpringBootApplication(exclude = MongoAutoConfiguration.class )
|
||||
@EnableScheduling
|
||||
public class VscInterApplication {
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(VscInterApplication.class, args);
|
||||
System.out.println("智慧工地数据接口服务!");
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,189 @@
|
|||
package com.securitycontrol.inter.controller;
|
||||
|
||||
import com.securitycontrol.common.core.web.domain.AjaxResult;
|
||||
import com.securitycontrol.inter.service.BdServiceImpl;
|
||||
import com.securitycontrol.inter.vo.*;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 告警管理
|
||||
* @author lsun
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/dataCenter/")
|
||||
@Slf4j
|
||||
public class BdController {
|
||||
|
||||
|
||||
@Autowired
|
||||
private BdServiceImpl service;
|
||||
/**
|
||||
* 项目信息获取
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("getProjectByName")
|
||||
public AjaxResult getProjectByName(@RequestBody InterfaceParamVo param){
|
||||
try{
|
||||
List<ProjectVo> list=service.getProjectByName(param);
|
||||
return AjaxResult.success(list);
|
||||
}catch (Exception e){
|
||||
log.error(e.toString(),e);
|
||||
}
|
||||
return AjaxResult.success(new ArrayList<>());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 单项信息获取
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("getPrjsinInfoByPrjNo")
|
||||
public AjaxResult getPepsinInfoByPrcNo(@RequestBody InterfaceParamVo param){
|
||||
try{
|
||||
List<SingleProVo> list=service.getPepsinInfoByPrcNo(param);
|
||||
return AjaxResult.success(list);
|
||||
}catch (Exception e){
|
||||
log.error(e.toString(),e);
|
||||
}
|
||||
return AjaxResult.success(new ArrayList<>());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 标段信息信息获取
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("getSGTenderListBySinList")
|
||||
public AjaxResult getSGTenderListBySinList(@RequestBody InterfaceParamVo param){
|
||||
try{
|
||||
List<BidProjectVo> list=service.getSGTenderListBySinList(param);
|
||||
return AjaxResult.success(list);
|
||||
}catch (Exception e){
|
||||
log.error(e.toString(),e);
|
||||
}
|
||||
return AjaxResult.success(new ArrayList<>());
|
||||
}
|
||||
|
||||
/**
|
||||
* 人员信息获取
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("getPeopleInfo")
|
||||
public AjaxResult getPeopleInfo(@RequestBody InterfaceParamVo param){
|
||||
try{
|
||||
List<UserInfoVo> list=service.getPeopleInfo(param);
|
||||
return AjaxResult.success(list);
|
||||
}catch (Exception e){
|
||||
log.error(e.toString(),e);
|
||||
}
|
||||
return AjaxResult.success(new ArrayList<>());
|
||||
}
|
||||
|
||||
/**
|
||||
* 边带设备绑定信息
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("gatewayDeviceBind")
|
||||
public AjaxResult gatewayDeviceBind(@RequestBody InterfaceParamVo param){
|
||||
try{
|
||||
return service.gatewayDeviceBind(param);
|
||||
}catch (Exception e){
|
||||
log.error(e.toString(),e);
|
||||
}
|
||||
return AjaxResult.success(0);
|
||||
}
|
||||
/**
|
||||
* 删除设备
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("deviceDel")
|
||||
public AjaxResult deviceDel(@RequestBody InterfaceParamVo param){
|
||||
try{
|
||||
return service.deviceDel(param);
|
||||
}catch (Exception e){
|
||||
log.error(e.toString(),e);
|
||||
}
|
||||
return AjaxResult.success(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增边带子设备
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("deviceAdd")
|
||||
public AjaxResult deviceAdd(@RequestBody DeviceInfoVo param){
|
||||
try{
|
||||
return service.deviceAdd(param);
|
||||
}catch (Exception e){
|
||||
log.error(e.toString(),e);
|
||||
}
|
||||
return AjaxResult.success(DevResultVo.error(param.getDeviceId(),"系统错误"));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 设备状态信息上报
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("deviceStatus")
|
||||
public AjaxResult deviceStatus(@RequestBody DeviceInfoVo param){
|
||||
try{
|
||||
return service.deviceStatus(param);
|
||||
}catch (Exception e){
|
||||
log.error(e.toString(),e);
|
||||
}
|
||||
return AjaxResult.success(0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 设备采集信息上班
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("devInfo")
|
||||
public AjaxResult devInfo(@RequestBody DeviceInfoVo param){
|
||||
try{
|
||||
return service.devInfo(param);
|
||||
}catch (Exception e){
|
||||
log.error(e.toString(),e);
|
||||
}
|
||||
return AjaxResult.success(0);
|
||||
}
|
||||
/**
|
||||
* 设备告警信息上班
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("devWarn")
|
||||
public AjaxResult devWarn(@RequestBody WarnInfoVo param){
|
||||
try{
|
||||
return service.devWarn(param);
|
||||
}catch (Exception e){
|
||||
log.error(e.toString(),e);
|
||||
}
|
||||
return AjaxResult.success(0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,91 @@
|
|||
package com.securitycontrol.inter.mapper;
|
||||
|
||||
import com.securitycontrol.inter.vo.*;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 边带处理接口层
|
||||
* @author 黑子
|
||||
*/
|
||||
@Repository
|
||||
public interface BdMapper {
|
||||
|
||||
/**
|
||||
* 查询工程 通过名称
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
List<ProjectVo> getProjectByName(InterfaceParamVo param);
|
||||
|
||||
/**
|
||||
* 查询标段工程名称
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
List<SingleProVo> getPepsinInfoByPrcNo(InterfaceParamVo param);
|
||||
|
||||
/**
|
||||
* 查询标段信息
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
List<BidProjectVo> getSGTenderListBySinList(InterfaceParamVo param);
|
||||
|
||||
/**
|
||||
* 查询全部人员信息
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
List<UserInfoVo> getPeopleInfo(InterfaceParamVo param);
|
||||
|
||||
/**
|
||||
* 边带绑定设备
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
int bindBdPro(InterfaceParamVo param);
|
||||
|
||||
/**
|
||||
* 查询设备是否成功
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
int getDeviceNumById(DeviceInfoVo param);
|
||||
|
||||
/**
|
||||
* 新增设备信息
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
int insertData(DeviceInfoVo param);
|
||||
|
||||
/**
|
||||
* 删除设备信息
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
int deviceDel(InterfaceParamVo param);
|
||||
|
||||
/**
|
||||
* 更新设备在线状态
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
int deviceStatus(DeviceInfoVo param);
|
||||
|
||||
/**
|
||||
* 查询标段工程编码
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
String getBidCodeByBd(WarnInfoVo param);
|
||||
|
||||
/**
|
||||
* 新增告警信息
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
int insertWarn(WarnInfoVo param);
|
||||
}
|
||||
|
|
@ -0,0 +1,168 @@
|
|||
package com.securitycontrol.inter.service;
|
||||
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.securitycontrol.common.core.constant.HttpStatus;
|
||||
import com.securitycontrol.common.core.constant.SecurityConstants;
|
||||
import com.securitycontrol.common.core.domain.Result;
|
||||
import com.securitycontrol.common.core.utils.aes.ListHelper;
|
||||
import com.securitycontrol.common.core.utils.aes.StringHelper;
|
||||
import com.securitycontrol.common.core.web.domain.AjaxResult;
|
||||
import com.securitycontrol.entity.system.SystemGlobal;
|
||||
import com.securitycontrol.entity.system.base.vo.ProVo;
|
||||
import com.securitycontrol.inter.mapper.BdMapper;
|
||||
import com.securitycontrol.inter.vo.*;
|
||||
import com.securitycontrol.system.api.RemoteFileService;
|
||||
import com.securitycontrol.system.api.RemoteSourceService;
|
||||
import com.securitycontrol.system.api.domain.SysFile;
|
||||
import com.securitycontrol.system.api.domain.TbSourceFile;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 边带业务处理层
|
||||
* @author 黑子
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class BdServiceImpl {
|
||||
|
||||
@Autowired
|
||||
private BdMapper mapper;
|
||||
|
||||
@Resource
|
||||
private RemoteSourceService remoteSourceService;
|
||||
@Resource
|
||||
private RemoteFileService remoteFileService;
|
||||
/**
|
||||
*
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
public List<ProjectVo> getProjectByName(InterfaceParamVo param) {
|
||||
return mapper.getProjectByName(param);
|
||||
}
|
||||
|
||||
public List<SingleProVo> getPepsinInfoByPrcNo(InterfaceParamVo param) {
|
||||
return mapper.getPepsinInfoByPrcNo(param);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询标段工程信息
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
public List<BidProjectVo> getSGTenderListBySinList(InterfaceParamVo param) {
|
||||
param.setSignList(ListHelper.asList(param.getSingleNoList(),","));
|
||||
return mapper.getSGTenderListBySinList(param);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询人员信息集合
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
public List<UserInfoVo> getPeopleInfo(InterfaceParamVo param) {
|
||||
List<UserInfoVo> list = mapper.getPeopleInfo(param);
|
||||
list.forEach(vo->{
|
||||
Result<List<TbSourceFile>> result = remoteSourceService.getSourceFile(vo.getUserId(), SystemGlobal.USER_IMAGE, SecurityConstants.INNER);
|
||||
if (result != null && result.getCode() == HttpStatus.SUCCESS && result.getData() != null && result.getData().size() > SystemGlobal.MIN_NUM) {
|
||||
List<TbSourceFile> list2 = result.getData();
|
||||
Result<SysFile> result2 = remoteFileService.getImgBase64(list2.get(0).getFileId(), SecurityConstants.INNER);
|
||||
if (result2 != null && result2.getCode() == HttpStatus.SUCCESS && result2.getData() != null) {
|
||||
String jsonString = JSON.toJSONString(result2.getData());
|
||||
JSONObject item = JSON.parseObject(jsonString);
|
||||
String base64 = item.getString("url");
|
||||
vo.setWorkerPhote(base64);
|
||||
}
|
||||
}
|
||||
});
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 边带项目关联 工程
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
public AjaxResult gatewayDeviceBind(InterfaceParamVo param) {
|
||||
int num=mapper.bindBdPro(param);
|
||||
if(num>SystemGlobal.MIN_NUM){
|
||||
return AjaxResult.success(1);
|
||||
}
|
||||
return AjaxResult.success(0);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
public AjaxResult deviceAdd(DeviceInfoVo param) {
|
||||
int num=mapper.getDeviceNumById(param);
|
||||
if(num>SystemGlobal.MIN_NUM){
|
||||
return AjaxResult.success(DevResultVo.error(param.getDeviceId(),"设备已存在"));
|
||||
}
|
||||
int num2=mapper.insertData(param);
|
||||
if(num2>SystemGlobal.MIN_NUM){
|
||||
return AjaxResult.success(DevResultVo.success(param.getDeviceId(),"新增成功"));
|
||||
}
|
||||
return AjaxResult.success(DevResultVo.error(param.getDeviceId(),"新增失败,参数不正确"));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除设备部信息
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
public AjaxResult deviceDel(InterfaceParamVo param) {
|
||||
int num=mapper.deviceDel(param);
|
||||
if(num>SystemGlobal.MIN_NUM){
|
||||
return AjaxResult.success(1);
|
||||
}
|
||||
return AjaxResult.success(0);
|
||||
}
|
||||
|
||||
public AjaxResult deviceStatus(DeviceInfoVo param) {
|
||||
int num=mapper.deviceStatus(param);
|
||||
if(num>SystemGlobal.MIN_NUM){
|
||||
return AjaxResult.success(1);
|
||||
}
|
||||
return AjaxResult.success(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* 告警信息入库
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
public AjaxResult devWarn(WarnInfoVo param) {
|
||||
String bidCode=mapper.getBidCodeByBd(param);
|
||||
param.setBidCode(bidCode);
|
||||
int num=mapper.insertWarn(param);
|
||||
if(num>SystemGlobal.MIN_NUM){
|
||||
return AjaxResult.success(1);
|
||||
}
|
||||
return AjaxResult.success(0);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 设备采集信息上报
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
public AjaxResult devInfo(DeviceInfoVo param) {
|
||||
try{
|
||||
|
||||
}catch (Exception e){
|
||||
log.error(e.toString(),e);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
package com.securitycontrol.inter.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author 黑子
|
||||
* 边带工程绑定
|
||||
*/
|
||||
@Data
|
||||
public class BdBindProVo {
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
private String projectId;
|
||||
/**
|
||||
* 担心编码
|
||||
*/
|
||||
private String single;
|
||||
/**
|
||||
* 标段编码
|
||||
*/
|
||||
private String bidNo;
|
||||
/**
|
||||
* 边带设备编码
|
||||
*/
|
||||
private String gatewayId;
|
||||
}
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
package com.securitycontrol.inter.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 标段工程编码
|
||||
* @author 黑子
|
||||
*/
|
||||
@Data
|
||||
public class BidProjectVo {
|
||||
|
||||
/**
|
||||
* 标段编码主机
|
||||
*/
|
||||
private String id;
|
||||
/**
|
||||
* 标段编码
|
||||
*/
|
||||
private String bidNo;
|
||||
/**
|
||||
* 标段名称
|
||||
*/
|
||||
private String bidName;
|
||||
/**
|
||||
* 标段工程描述
|
||||
*/
|
||||
private String bidDesc;
|
||||
/**
|
||||
* 项目编码
|
||||
*/
|
||||
private String projectCode;
|
||||
/**
|
||||
* 0:设计,1:监理,2:施工,3:监理加施工
|
||||
* 标段类型
|
||||
*/
|
||||
private String bidType;
|
||||
/**
|
||||
* 监理总工程师
|
||||
*/
|
||||
private String chiefSuperVice;
|
||||
/**
|
||||
* 施工项目经理
|
||||
*/
|
||||
private String buildManager;
|
||||
/**
|
||||
* 变电站类型包括:01 土建,02 电气,03 变电
|
||||
*/
|
||||
private String subsTypeCode;
|
||||
/**
|
||||
* 实际开工时间
|
||||
*/
|
||||
private String startDate;
|
||||
/**
|
||||
* 实际投产时间
|
||||
*/
|
||||
private String productDate;
|
||||
/**
|
||||
* 实际竣工时间
|
||||
*/
|
||||
private String completeDate;
|
||||
/**
|
||||
* 项目单体编码
|
||||
*/
|
||||
private String singleNo;
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
package com.securitycontrol.inter.vo;
|
||||
|
||||
import javafx.application.Application;
|
||||
import javafx.stage.Stage;
|
||||
import lombok.Data;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 返回值设备
|
||||
* @author 黑子
|
||||
*/
|
||||
@Data
|
||||
public class DevResultVo {
|
||||
|
||||
private String reason;
|
||||
|
||||
private String deviceId;
|
||||
|
||||
private String status;
|
||||
|
||||
public DevResultVo(){
|
||||
}
|
||||
|
||||
public DevResultVo(String reason, String deviceId, String status) {
|
||||
this.reason = reason;
|
||||
this.deviceId = deviceId;
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public static DevResultVo success(String deviceId,String reason){
|
||||
return new DevResultVo(reason,deviceId,"1");
|
||||
}
|
||||
public static DevResultVo error(String deviceId,String reason){
|
||||
return new DevResultVo(reason,deviceId,"0");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
package com.securitycontrol.inter.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 设备信息上报
|
||||
* @author 黑子
|
||||
*/
|
||||
@Data
|
||||
public class DeviceInfoVo {
|
||||
/**
|
||||
* 边代ID
|
||||
*/
|
||||
private String gatewayId;
|
||||
/**
|
||||
* 设备ID
|
||||
*/
|
||||
private String deviceId;
|
||||
/**
|
||||
* 设备名称
|
||||
*/
|
||||
private String deviceName;
|
||||
/**
|
||||
* 设备描述
|
||||
*/
|
||||
private String description;
|
||||
/**
|
||||
* 设备物模型ID(配置设备参数信息)
|
||||
*/
|
||||
private String deviceModelId;
|
||||
/**
|
||||
* 设备在线状态(0:离线,1:在线)
|
||||
*/
|
||||
private String state;
|
||||
|
||||
private String data;
|
||||
|
||||
private String dataTime;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
package com.securitycontrol.inter.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 边带数据传输进行管理
|
||||
* @author 黑子
|
||||
*/
|
||||
@Data
|
||||
public class InterfaceParamVo {
|
||||
|
||||
/**
|
||||
* 工程名称
|
||||
*/
|
||||
private String projectName;
|
||||
/**
|
||||
* 项目编码
|
||||
*/
|
||||
private String projectNo;
|
||||
/**
|
||||
* 单项工程编码
|
||||
*/
|
||||
private String singleNoList;
|
||||
/**
|
||||
* 单项工程集合
|
||||
*/
|
||||
private List<String> signList;
|
||||
|
||||
/**
|
||||
* 标段工程集合
|
||||
*/
|
||||
private String bidNo;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
package com.securitycontrol.inter.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 项目恓实体类
|
||||
* @author 黑子
|
||||
*/
|
||||
@Data
|
||||
public class ProjectVo {
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
private String id;
|
||||
/**
|
||||
* 项目u名出
|
||||
*/
|
||||
private String projectName;
|
||||
/**
|
||||
* 项目编码
|
||||
*/
|
||||
private String projectNo;
|
||||
/**
|
||||
* 组织机构地
|
||||
*/
|
||||
private String builderNo;
|
||||
/**
|
||||
* 组织机构名称
|
||||
*/
|
||||
private String builderName;
|
||||
/**
|
||||
* 电压等级
|
||||
*/
|
||||
private String volLevel;
|
||||
/**
|
||||
* 工程类型
|
||||
*/
|
||||
private String projectType;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,78 @@
|
|||
package com.securitycontrol.inter.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 单项工程实体类
|
||||
* @author 黑子
|
||||
*/
|
||||
@Data
|
||||
public class SingleProVo {
|
||||
|
||||
/**
|
||||
* 单项id
|
||||
*/
|
||||
private String id;
|
||||
/**
|
||||
* 项目单体名称
|
||||
*/
|
||||
private String singleName;
|
||||
/**
|
||||
* 项目单体编码
|
||||
*/
|
||||
private String singleNo;
|
||||
/**
|
||||
* WBS编码
|
||||
*/
|
||||
private String wbsCode;
|
||||
/**
|
||||
* 项目编码
|
||||
*/
|
||||
private String projectNo;
|
||||
/**
|
||||
* 单项工程描述
|
||||
*/
|
||||
private String singleDesc;
|
||||
/**
|
||||
* 电压等级
|
||||
*/
|
||||
private String volLevel;
|
||||
/**
|
||||
* 可研线路长度(10km等)
|
||||
*/
|
||||
private String lineLength;
|
||||
/**
|
||||
* 可研变电容量(万KV等
|
||||
*/
|
||||
private String subsCap;
|
||||
/**
|
||||
* 单项类型(1:变电;2:线路)
|
||||
*/
|
||||
private String singleTypeCode;
|
||||
/**
|
||||
* 变电站类型包括:1 土建,2 电气,3 变电
|
||||
*/
|
||||
private String subsTypeCode;
|
||||
/**
|
||||
* 估算类型(从全过程平台获取,可能为空)
|
||||
*/
|
||||
private String estimateTypeCode;
|
||||
/**
|
||||
* 唯一标识建设管理单位
|
||||
*/
|
||||
private String builderNo;
|
||||
/**
|
||||
* 实际开工时间(YYYY-MM-DD)
|
||||
*/
|
||||
private String startDate;
|
||||
/**
|
||||
* 实际投产时间(YYYY-MM-DD)
|
||||
*/
|
||||
private String productDate;
|
||||
/**
|
||||
* 实际竣工时间(YYYY-MM-DD)
|
||||
*/
|
||||
private String completeDate;
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,97 @@
|
|||
package com.securitycontrol.inter.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 人员信息接口
|
||||
* @author 黑子
|
||||
*/
|
||||
@Data
|
||||
public class UserInfoVo {
|
||||
|
||||
private String userId;
|
||||
|
||||
private String id;
|
||||
/**
|
||||
* 单位名称
|
||||
*/
|
||||
private String deptName;
|
||||
/**
|
||||
* 项目名称
|
||||
*/
|
||||
private String projectName;
|
||||
/**
|
||||
* 人员名称
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 人员类型
|
||||
*/
|
||||
private String personType;
|
||||
/**
|
||||
* 身份证号码
|
||||
*/
|
||||
private String idCard;
|
||||
/**
|
||||
* 性别
|
||||
*/
|
||||
private String genderName;
|
||||
/**
|
||||
* 民族
|
||||
*/
|
||||
private String nation;
|
||||
/**
|
||||
* 手机号码
|
||||
*/
|
||||
private String mobile;
|
||||
/**
|
||||
* 年龄
|
||||
*/
|
||||
private String age;
|
||||
/**
|
||||
* 人才层次
|
||||
*/
|
||||
private String talentLevel;
|
||||
/**
|
||||
* 政治面貌
|
||||
*/
|
||||
private String politicAppera;
|
||||
/**
|
||||
* 籍贯
|
||||
*/
|
||||
private String nativePlace;
|
||||
/**
|
||||
* 文化程度(学历编码(0:中专;1:高中; 2:大专;3:本科;4:研究生;5:博士及以上;6:其他))
|
||||
*/
|
||||
private String degree;
|
||||
/**
|
||||
* 参加工作年限
|
||||
*/
|
||||
private String inWork;
|
||||
/**
|
||||
* 项目部名称
|
||||
*/
|
||||
private String projectDepName;
|
||||
/**
|
||||
* 项目部类型
|
||||
*/
|
||||
private String projectDepType;
|
||||
/**
|
||||
* 作业班组名称
|
||||
*/
|
||||
private String workClassName;
|
||||
/**
|
||||
* 岗位工种
|
||||
*/
|
||||
private String jobType;
|
||||
/**
|
||||
* 标段编码
|
||||
*/
|
||||
private String bidNo;
|
||||
/**
|
||||
* 照片数据
|
||||
*/
|
||||
private String workerPhote;
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
package com.securitycontrol.inter.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 系统告警信息
|
||||
* @author 黑子
|
||||
*/
|
||||
@Data
|
||||
public class WarnInfoVo {
|
||||
/**
|
||||
* 边代ID
|
||||
*/
|
||||
private String gatewayId;
|
||||
/**
|
||||
* 设备ID
|
||||
*/
|
||||
private String deviceId;
|
||||
/**
|
||||
* 告警事件类型
|
||||
*/
|
||||
private String eventCode;
|
||||
/**
|
||||
* 告警描述
|
||||
*/
|
||||
private String eventDesc;
|
||||
/**
|
||||
* 告警时间
|
||||
*/
|
||||
private String eventTime;
|
||||
|
||||
/**
|
||||
* 标段编码
|
||||
*/
|
||||
private String bidCode;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
Spring Boot Version: ${spring-boot.version}
|
||||
Spring Application Name: ${spring.application.name}
|
||||
_ _
|
||||
(_) | |
|
||||
_ __ _ _ ___ _ _ _ ______ ___ _ _ ___ | |_ ___ _ __ ___
|
||||
| '__|| | | | / _ \ | | | || ||______|/ __|| | | |/ __|| __| / _ \| '_ ` _ \
|
||||
| | | |_| || (_) || |_| || | \__ \| |_| |\__ \| |_ | __/| | | | | |
|
||||
|_| \__,_| \___/ \__, ||_| |___/ \__, ||___/ \__| \___||_| |_| |_|
|
||||
__/ | __/ |
|
||||
|___/ |___/
|
||||
|
|
@ -0,0 +1,53 @@
|
|||
# Tomcat
|
||||
server:
|
||||
port: 18087
|
||||
management:
|
||||
server:
|
||||
port: -1
|
||||
# Spring
|
||||
spring:
|
||||
servlet:
|
||||
multipart:
|
||||
max-file-size: -1
|
||||
max-request-size: -1
|
||||
application:
|
||||
name: securityControl-interface
|
||||
profiles:
|
||||
# 环境配置
|
||||
active: dev
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
username: nacos
|
||||
password: Jjsp@nacos2023
|
||||
server-addr: 127.0.0.1:8848
|
||||
namespace: jjzhgd
|
||||
config:
|
||||
username: nacos
|
||||
password: Jjsp@nacos2023
|
||||
namespace: jjzhgd
|
||||
server-addr: 127.0.0.1:8848
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
# 共享配置
|
||||
shared-configs:
|
||||
- vsc-dev.yml
|
||||
#加密组件
|
||||
jasypt:
|
||||
encryptor:
|
||||
bean: codeSheepEncryptorBean3
|
||||
property:
|
||||
prefix: CodeSheep(
|
||||
suffix: )
|
||||
logging:
|
||||
config: classpath:logback.xml
|
||||
log:
|
||||
level:
|
||||
root: info
|
||||
my: debug
|
||||
file: logs/sys-back.log
|
||||
maxsize: 30MB
|
||||
file:
|
||||
temp_file_path: E:\\tempFile
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,84 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration scan="true" scanPeriod="60 seconds" debug="false">
|
||||
<!-- 日志存放路径 -->
|
||||
<property name="log.path" value="logs/securityControl-interface" />
|
||||
<!-- 日志输出格式 -->
|
||||
<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n" />
|
||||
|
||||
<!-- 控制台输出 -->
|
||||
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
|
||||
<pattern>%red(%d{yyyy-MM-dd HH:mm:ss,CTT}) %green([%thread]) %highlight(%-5level) %highlight([${appName},%X{X-B3-TraceId},%X{X-B3-SpanId},%X{X-Span-Export}]) %boldMagenta(%logger.%method:%L) - %cyan(%msg%n)</pattern>
|
||||
</encoder>
|
||||
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
|
||||
<level>debug</level>
|
||||
</filter>
|
||||
</appender>
|
||||
|
||||
<!-- 系统日志输出 -->
|
||||
<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${log.path}/info.log</file>
|
||||
<!-- 循环政策:基于时间创建日志文件 -->
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<!-- 日志文件名格式 -->
|
||||
<fileNamePattern>${log.path}/info.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||
<!-- 日志最大的历史 60天 -->
|
||||
<maxHistory>60</maxHistory>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<pattern>${log.pattern}</pattern>
|
||||
</encoder>
|
||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||
<!-- 过滤的级别 -->
|
||||
<level>INFO</level>
|
||||
<!-- 匹配时的操作:接收(记录) -->
|
||||
<onMatch>ACCEPT</onMatch>
|
||||
<!-- 不匹配时的操作:拒绝(不记录) -->
|
||||
<onMismatch>DENY</onMismatch>
|
||||
</filter>
|
||||
</appender>
|
||||
|
||||
<appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${log.path}/error.log</file>
|
||||
<!-- 循环政策:基于时间创建日志文件 -->
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<!-- 日志文件名格式 -->
|
||||
<fileNamePattern>${log.path}/error.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||
<!-- 日志最大的历史 60天 -->
|
||||
<maxHistory>60</maxHistory>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<pattern>${log.pattern}</pattern>
|
||||
</encoder>
|
||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||
<!-- 过滤的级别 -->
|
||||
<level>ERROR</level>
|
||||
<!-- 匹配时的操作:接收(记录) -->
|
||||
<onMatch>ACCEPT</onMatch>
|
||||
<!-- 不匹配时的操作:拒绝(不记录) -->
|
||||
<onMismatch>DENY</onMismatch>
|
||||
</filter>
|
||||
</appender>
|
||||
|
||||
<!-- logstash -->
|
||||
<appender name="LOGSTASH" class="net.logstash.logback.appender.LogstashTcpSocketAppender">
|
||||
<destination>127.0.0.1:9601</destination>
|
||||
<encoder charset="UTF-8" class="net.logstash.logback.encoder.LogstashEncoder"/>
|
||||
</appender>
|
||||
|
||||
<!-- 系统模块日志级别控制 -->
|
||||
<logger name="com.securityControl" level="info" />
|
||||
<!-- Spring日志级别控制 -->
|
||||
<logger name="org.springframework" level="warn" />
|
||||
|
||||
<root level="info">
|
||||
<appender-ref ref="console" />
|
||||
</root>
|
||||
|
||||
<!--系统操作日志-->
|
||||
<root level="info">
|
||||
<appender-ref ref="LOGSTASH"/>
|
||||
<appender-ref ref="file_info" />
|
||||
<appender-ref ref="file_error" />
|
||||
</root>
|
||||
</configuration>
|
||||
|
|
@ -0,0 +1,91 @@
|
|||
<?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.inter.mapper.BdMapper">
|
||||
<insert id="insertData">
|
||||
insert into tb_bd_device(device_id,devic_type,status,device_name,create_time,bd_id,remarks,del_flag)
|
||||
value (
|
||||
#{deviceId},#{deviceModelId},0,#{deviceName},now(),#{gatewayId},#{description},0
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertWarn">
|
||||
insert into tb_warn (warn_time,warn_content,warn_type,bd_device,db_id,bid_code)
|
||||
value (#{eventTime},#{eventDesc},#{eventCode},#{deviceId},#{gatewayId},#{bidCode})
|
||||
</insert>
|
||||
<update id="bindBdPro">
|
||||
update tb_pro_bd set bid_code=#{bidNo},bind_time=now() where bd_code=#{gatewayId} ;
|
||||
</update>
|
||||
<update id="deviceDel">
|
||||
update tb_bd_device set del_flag=1 where device_id=#{deviceId} and bd_id=#{gatewayId}
|
||||
</update>
|
||||
<update id="deviceStatus">
|
||||
update tb_bd_device set status=#{state} where device_id=#{deviceId} and bd_id=#{gatewayId}
|
||||
</update>
|
||||
<!--查询工程名称-->
|
||||
<select id="getProjectByName" resultType="com.securitycontrol.inter.vo.ProjectVo">
|
||||
select id,pro_name projectName,pro_no projectNo,tjp.org_id builderNo,
|
||||
sb.city_name builderName,vlotage volLevel,pro_type projectType
|
||||
from tb_jj_project tjp
|
||||
left join sys_build sb on sb.org_id=tjp.org_id
|
||||
<where>
|
||||
<if test="projectName!=null and projectName!=''">
|
||||
AND pro_name like('%',#{projectName},'%')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<!--查询单项工程信息-->
|
||||
<select id="getPepsinInfoByPrcNo" resultType="com.securitycontrol.inter.vo.SingleProVo">
|
||||
select
|
||||
id,single_name singleName,signle_no singleNo,wbs_code wbsCode,
|
||||
project_no projectNo,single_desc singleDesc,vol_level volLevel,
|
||||
line_length lineLength,subs_cap subsCap,pro_type singleTypeCode,
|
||||
subs_type subsTypeCode,estimate_type estimateTypeCode,tjp.org_id builderNo,
|
||||
start_date startDate,end_date productDate,complete_date completeDate,sb.city_name builderName
|
||||
from tb_sign_project tjp
|
||||
LEFT JOIN sys_build sb on sb.org_id=tjp.org_id
|
||||
<where>
|
||||
<if test="projectNo!=null and projectNo!=''">
|
||||
AND tjp.project_no =#{projectNo}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<select id="getSGTenderListBySinList" resultType="com.securitycontrol.inter.vo.BidProjectVo">
|
||||
select
|
||||
bid.pro_id id,bid.sign_code singleNo,bid.bid_code bidNo,
|
||||
bid.pro_code projectCode,bid.pro_name bidName,bid.pro_cost,
|
||||
bid.sg_unit,bid.jl_unit,bid.pro_type,
|
||||
bid.pro_scale,bid.manager,bid.status,
|
||||
bid.plan_start_time,bid.plan_end_time,
|
||||
bid.start_time startDate,bid.end_time completeDate,bid.tc_date productDate,
|
||||
bid.org,bid.bid_type bidType,
|
||||
bid.sg_manage buildManager,bid.jl_manage chiefSuperVice,bid.sub_type subsTypeCode
|
||||
from tb_project bid
|
||||
WHERE del_flag=0
|
||||
<if test="signList !=null and signList.size() >0 ">
|
||||
<foreach collection="signList" open=" and sign_code in(" close=")" item="item" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
<!--查询人员数据u录入-->
|
||||
<select id="getPeopleInfo" resultType="com.securitycontrol.inter.vo.UserInfoVo">
|
||||
select twt.team_name workClassName,twt.team_leader,ttp.id_number idCard,
|
||||
ttp.user_name name,ttp.user_type jobType,ttp.phone mobile
|
||||
,jp.pro_name projectName, twt.bid_code bidNo,ttp.user_id userId
|
||||
from tb_work_team twt
|
||||
left join tb_project bid on twt.bid_code=bid.bid_code
|
||||
left join t_team_people ttp on twt.team_id=ttp.team_id
|
||||
left join tb_jj_project jp on jp.pro_no=bid.pro_code
|
||||
where ttp.id_number is not null
|
||||
</select>
|
||||
<select id="getDeviceNumById" resultType="java.lang.Integer">
|
||||
select count(1)
|
||||
from tb_bd_device
|
||||
where del_flag=0 and device_id=#{deviceId}
|
||||
</select>
|
||||
<select id="getBidCodeByBd" resultType="java.lang.String">
|
||||
select
|
||||
bid_code
|
||||
from tb_pro_bd
|
||||
where bd_code=#{gatewayId}
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -5,6 +5,7 @@ import com.securitycontrol.common.security.annotation.EnableRyFeignClients;
|
|||
import com.securitycontrol.common.swagger.annotation.EnableCustomSwagger2;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration;
|
||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
|
||||
/**
|
||||
|
|
@ -15,7 +16,7 @@ import org.springframework.scheduling.annotation.EnableScheduling;
|
|||
@EnableCustomConfig
|
||||
@EnableCustomSwagger2
|
||||
@EnableRyFeignClients
|
||||
@SpringBootApplication
|
||||
@SpringBootApplication(exclude = MongoAutoConfiguration.class )
|
||||
@EnableScheduling
|
||||
public class VscBackgroundApplication {
|
||||
public static void main(String[] args) {
|
||||
|
|
|
|||
|
|
@ -95,9 +95,9 @@ public class HumanManageController extends BaseController {
|
|||
}
|
||||
|
||||
@ApiOperation(value = "绑定安全帽")
|
||||
@GetMapping("bindDev")
|
||||
@PostMapping("bindDev")
|
||||
@Log(title = "人员管理", menu = "人车管理->人员管理", grade = OperationType.ADD_BUSINESS, details = "绑定安全膜", type = "业务日志")
|
||||
public AjaxResult bindDev(ParamDto dto) {
|
||||
public AjaxResult bindDev(@RequestBody ParamDto dto) {
|
||||
return service.bindDev(dto);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,41 @@
|
|||
package com.securitycontrol.background.controller;
|
||||
|
||||
import com.securitycontrol.background.service.ISignProService;
|
||||
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 com.securitycontrol.entity.background.dto.ParamDto;
|
||||
import com.securitycontrol.entity.background.vo.ProjectVo;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author:cwchen
|
||||
* @date:2024-04-01-19:23
|
||||
* @version:1.0
|
||||
* @description:项目工程/单项工程-web层
|
||||
*/
|
||||
@RequestMapping(value = "/back/signPro/")
|
||||
@RestController
|
||||
public class SignProController extends BaseController {
|
||||
|
||||
@Resource(name = "ISignProService")
|
||||
private ISignProService service;
|
||||
|
||||
@ApiOperation(value = "获取项目列表")
|
||||
@GetMapping("getProLists")
|
||||
@Log(title = "工程管理", menu = "工程管理->项目管理", grade = OperationType.QUERY_BUSINESS, details = "查询项目列表", type = "业务日志")
|
||||
public TableDataInfo getProLists(ParamDto dto) {
|
||||
startPage();
|
||||
List<ProjectVo> list = new ArrayList<>();
|
||||
list = service.getProLists(dto);
|
||||
return getDataTable(list);
|
||||
}
|
||||
}
|
||||
|
|
@ -26,8 +26,6 @@ public class SourceFileController {
|
|||
public Result<List<TbSourceFile>> getSourceList(@RequestParam(value = "sourceId") String sourceId, @RequestParam("sourceType") String sourceType){
|
||||
List<TbSourceFile> list= service.getTbSourceList(sourceId,sourceType);
|
||||
return Result.ok(list);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -19,5 +19,9 @@ public interface EarlyWarningsRecordMapper {
|
|||
*/
|
||||
List<EarlyWarningsRecordVo> getEarlyWarningsRecordLists(EarlyWarningsRecordVo dto);
|
||||
|
||||
/**
|
||||
* 修改
|
||||
* @param vo
|
||||
*/
|
||||
void updEarly(EarlyWarningsRecordVo vo);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package com.securitycontrol.background.mapper;
|
|||
|
||||
import com.securitycontrol.entity.background.dto.ParamDto;
|
||||
import com.securitycontrol.entity.background.vo.HumanManageVo;
|
||||
import com.securitycontrol.entity.background.vo.ProjectCostVo;
|
||||
import com.securitycontrol.entity.background.vo.VehicleVo;
|
||||
import com.securitycontrol.entity.system.base.vo.ProVo;
|
||||
import com.securitycontrol.entity.system.vo.ResourceFileVo;
|
||||
|
|
@ -116,6 +117,7 @@ public interface IAppMapper {
|
|||
|
||||
/**
|
||||
* 获取工序或杆塔名称
|
||||
*
|
||||
* @param proType
|
||||
* @param bidCode
|
||||
* @param gxId
|
||||
|
|
@ -124,5 +126,15 @@ public interface IAppMapper {
|
|||
* @author cwchen
|
||||
* @date 2024/3/29 14:20
|
||||
*/
|
||||
String getGtOrGxName(@Param("proType") String proType, @Param("bidCode")String bidCode, @Param("gxId")String gxId);
|
||||
String getGtOrGxName(@Param("proType") String proType, @Param("bidCode") String bidCode, @Param("gxId") String gxId);
|
||||
|
||||
/**
|
||||
* 标段工程成本
|
||||
* @param dto
|
||||
* @return List<ProjectCostVo>
|
||||
* @description
|
||||
* @author cwchen
|
||||
* @date 2024/4/1 19:12
|
||||
*/
|
||||
List<ProjectCostVo> getProCost(ParamDto dto);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,28 @@
|
|||
package com.securitycontrol.background.mapper;
|
||||
|
||||
import com.securitycontrol.entity.background.dto.ParamDto;
|
||||
import com.securitycontrol.entity.background.vo.ProjectVo;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author:cwchen
|
||||
* @date:2024-04-01-19:26
|
||||
* @version:1.0
|
||||
* @description:项目工程/单项工程-数据库访问层
|
||||
*/
|
||||
@Repository(value = "ISignProMapper")
|
||||
public interface ISignProMapper {
|
||||
|
||||
|
||||
/**
|
||||
* 获取项目列表
|
||||
* @param dto
|
||||
* @return List<ProjectVo>
|
||||
* @description
|
||||
* @author cwchen
|
||||
* @date 2024/4/1 20:02
|
||||
*/
|
||||
List<ProjectVo> getProLists(ParamDto dto);
|
||||
}
|
||||
|
|
@ -19,5 +19,10 @@ public interface EarlyWarningsRecordService {
|
|||
*/
|
||||
List<EarlyWarningsRecordVo> getEarlyWarningRecordLists(EarlyWarningsRecordVo dto);
|
||||
|
||||
/**
|
||||
* 修改
|
||||
* @param vo
|
||||
* @return
|
||||
*/
|
||||
AjaxResult updEarly(EarlyWarningsRecordVo vo);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,24 @@
|
|||
package com.securitycontrol.background.service;
|
||||
|
||||
import com.securitycontrol.entity.background.dto.ParamDto;
|
||||
import com.securitycontrol.entity.background.vo.ProjectVo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author:cwchen
|
||||
* @date:2024-04-01-19:24
|
||||
* @version:1.0
|
||||
* @description:项目工程/单项工程-业务层
|
||||
*/
|
||||
public interface ISignProService {
|
||||
/**
|
||||
* 获取项目列表
|
||||
* @param dto
|
||||
* @return List<ProjectVo>
|
||||
* @description
|
||||
* @author cwchen
|
||||
* @date 2024/4/1 19:59
|
||||
*/
|
||||
List<ProjectVo> getProLists(ParamDto dto);
|
||||
}
|
||||
|
|
@ -14,6 +14,7 @@ import com.securitycontrol.common.core.utils.aes.DateTimeHelper;
|
|||
import com.securitycontrol.common.core.web.domain.AjaxResult;
|
||||
import com.securitycontrol.entity.background.dto.ParamDto;
|
||||
import com.securitycontrol.entity.background.vo.HumanManageVo;
|
||||
import com.securitycontrol.entity.background.vo.ProjectCostVo;
|
||||
import com.securitycontrol.entity.background.vo.VehicleVo;
|
||||
import com.securitycontrol.entity.system.base.vo.ProVo;
|
||||
import com.securitycontrol.entity.system.vo.ResourceFileVo;
|
||||
|
|
@ -203,6 +204,7 @@ public class AppServiceImpl implements IAppService {
|
|||
ProVo vo = new ProVo();
|
||||
JSONObject item = new JSONObject();
|
||||
List<Map<String, Object>> proGxPlanList = new ArrayList<>();
|
||||
List<ProjectCostVo> proCostList = new ArrayList<>();
|
||||
try {
|
||||
// 工程详情
|
||||
vo = mapper.getProBrief(dto);
|
||||
|
|
@ -220,40 +222,15 @@ public class AppServiceImpl implements IAppService {
|
|||
mapData.put("name",name);
|
||||
});
|
||||
}
|
||||
// 标段工程成本
|
||||
proCostList = mapper.getProCost(dto);
|
||||
} catch (Exception e) {
|
||||
log.error("工程管理", e);
|
||||
}
|
||||
dataMap.put("vo",vo);
|
||||
dataMap.put("item",item);
|
||||
dataMap.put("proGxPlan",proGxPlanList);
|
||||
dataMap.put("proCost",getProCostData());
|
||||
dataMap.put("proCost",proCostList);
|
||||
return AjaxResult.success(dataMap);
|
||||
}
|
||||
|
||||
public Map<String, Object> getProCostData(){
|
||||
Map<String, Object> dataMap = new HashMap<>(16);
|
||||
dataMap.put("planCost","1200.0");
|
||||
dataMap.put("expenditureCost","523.4");
|
||||
dataMap.put("residueCost","676.6");
|
||||
List<Map<String, Object>> proCostList = new ArrayList<>();
|
||||
for (int i = 0; i < Constant.CELL_3; i++) {
|
||||
Map<String, Object> map = new HashMap<>(3);
|
||||
if(i == 0){
|
||||
map.put("expenditureDate","2024-03-05");
|
||||
map.put("expenditure","设备购买");
|
||||
map.put("amount","200.1");
|
||||
}else if(i == 1){
|
||||
map.put("expenditureDate","2024-03-12");
|
||||
map.put("expenditure","工人工资");
|
||||
map.put("amount","23.3");
|
||||
}else if(i == 2){
|
||||
map.put("expenditureDate","2024-03-15");
|
||||
map.put("expenditure","设备安装");
|
||||
map.put("amount","300.0");
|
||||
}
|
||||
proCostList.add(map);
|
||||
}
|
||||
dataMap.put("proCostPlanList",proCostList);
|
||||
return dataMap;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,38 @@
|
|||
package com.securitycontrol.background.service.impl;
|
||||
|
||||
import com.securitycontrol.background.mapper.ISignProMapper;
|
||||
import com.securitycontrol.background.service.ISignProService;
|
||||
import com.securitycontrol.common.core.web.domain.AjaxResult;
|
||||
import com.securitycontrol.entity.background.dto.ParamDto;
|
||||
import com.securitycontrol.entity.background.vo.ProjectVo;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author:cwchen
|
||||
* @date:2024-04-01-19:25
|
||||
* @version:1.0
|
||||
* @description:项目工程/单项工程-业务逻辑层
|
||||
*/
|
||||
@Service(value = "ISignProService")
|
||||
@Slf4j
|
||||
public class SignProServiceImpl implements ISignProService {
|
||||
|
||||
@Resource(name = "ISignProMapper")
|
||||
private ISignProMapper mapper;
|
||||
|
||||
@Override
|
||||
public List<ProjectVo> getProLists(ParamDto dto) {
|
||||
List<ProjectVo> list = new ArrayList<>();
|
||||
try {
|
||||
list = mapper.getProLists(dto);
|
||||
} catch (Exception e) {
|
||||
log.error("工程列表");
|
||||
}
|
||||
return list;
|
||||
}
|
||||
}
|
||||
|
|
@ -117,4 +117,11 @@
|
|||
WHERE sd.dict_code = '400' AND sd2.dict_code = #{gxId} AND sd.del_flag = 0
|
||||
</if>
|
||||
</select>
|
||||
<!--标段工程成本-->
|
||||
<select id="getProCost" resultType="com.securitycontrol.entity.background.vo.ProjectCostVo">
|
||||
SELECT cost AS amount,
|
||||
remark AS expenditure,
|
||||
curry_day AS expenditureDate
|
||||
FROM tb_project_cost tpc WHERE tpc.bid_code = #{bidCode}
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
<mapper namespace="com.securitycontrol.background.mapper.IDeviceOfBdMapper">
|
||||
<!--新增/修改边带-->
|
||||
<insert id="addOrUpdateDeviceBd">
|
||||
<if test="type == 1">
|
||||
当月
|
||||
INSERT INTO tb_pro_bd
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null and id != ''">id,</if>
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@
|
|||
<select id="getDeviceListByType" resultType="com.securitycontrol.entity.background.vo.DeviceVo">
|
||||
select td.device_id deviceId,device_name deviceName
|
||||
from tb_device td
|
||||
left join tb_user_bind_cap ubc on td.device_id=td.device_id and ubc.bind_status=1
|
||||
left join tb_user_bind_cap ubc on ubc.device_id=td.device_id and ubc.bind_status=1
|
||||
WHERE ubc.id is null and td.device_type =#{code} and td.del_flag=0
|
||||
</select>
|
||||
|
||||
|
|
|
|||
|
|
@ -138,7 +138,7 @@
|
|||
<select id="getPersonnelAccessLists" resultType="com.securitycontrol.entity.background.vo.UserAccessVo">
|
||||
SELECT tua.user_name AS userName,
|
||||
tua.access_time AS accessTime,
|
||||
IF(access_type == '1','入场','出场') AS accessType
|
||||
IF(access_type = '1','入场','出场') AS accessType
|
||||
FROM tb_user_access tua
|
||||
WHERE user_id = #{id}
|
||||
<if test="startTime!=null and startTime!='' and endTime!=null and endTime!=''">
|
||||
|
|
|
|||
|
|
@ -0,0 +1,9 @@
|
|||
<?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.mapper.ISignProMapper">
|
||||
|
||||
<!--获取项目列表-->
|
||||
<select id="getProLists" resultType="com.securitycontrol.entity.background.vo.ProjectVo">
|
||||
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -121,7 +121,7 @@
|
|||
</select>
|
||||
|
||||
<select id="getProCostList" resultType="com.securitycontrol.entity.screen.vo.ProCostVo">
|
||||
SELECT pro.pro_name proName,tpc.cost ,tpc.remark,tpc.create_time createTime
|
||||
SELECT pro.pro_name proName,tpc.cost ,tpc.remark,tpc.create_time createTime,tpc.id
|
||||
FROM tb_project_cost tpc
|
||||
left join tb_project pro on pro.bid_code=tpc.bid_code
|
||||
where pro.bid_code=#{bidCode}
|
||||
|
|
|
|||
|
|
@ -3,15 +3,16 @@ package com.securitycontrol.files;
|
|||
import com.securitycontrol.common.security.annotation.EnableCustomConfig;
|
||||
import com.securitycontrol.common.security.annotation.EnableRyFeignClients;
|
||||
import com.securitycontrol.common.swagger.annotation.EnableCustomSwagger2;
|
||||
import com.securitycontrol.files.mongodb.config.MongoConfig;
|
||||
import org.mybatis.spring.annotation.MapperScan;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration;
|
||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
|
||||
/**
|
||||
* 文件服务
|
||||
*
|
||||
* @author czc
|
||||
*/
|
||||
@EnableCustomConfig
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
package com.securitycontrol.files;
|
||||
package com.securitycontrol.files.controller;
|
||||
|
||||
import com.securitycontrol.common.core.domain.Result;
|
||||
import com.securitycontrol.entity.file.FileExportVo;
|
||||
|
|
@ -5,6 +5,7 @@ import com.securitycontrol.common.security.annotation.EnableRyFeignClients;
|
|||
import com.securitycontrol.common.swagger.annotation.EnableCustomSwagger2;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration;
|
||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
|
||||
/**
|
||||
|
|
@ -15,7 +16,7 @@ import org.springframework.scheduling.annotation.EnableScheduling;
|
|||
@EnableCustomConfig
|
||||
@EnableCustomSwagger2
|
||||
@EnableRyFeignClients
|
||||
@SpringBootApplication
|
||||
@SpringBootApplication(exclude = MongoAutoConfiguration.class )
|
||||
@EnableScheduling
|
||||
public class VscScreenApplication {
|
||||
public static void main(String[] args) {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,196 @@
|
|||
package com.securitycontrol.screen.controller;
|
||||
|
||||
import cn.afterturn.easypoi.excel.ExcelExportUtil;
|
||||
import cn.afterturn.easypoi.excel.entity.ExportParams;
|
||||
import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
|
||||
import com.securitycontrol.common.core.utils.ExcelStyleUtil;
|
||||
import com.securitycontrol.common.core.utils.aes.StringHelper;
|
||||
import com.securitycontrol.common.core.web.controller.BaseController;
|
||||
import com.securitycontrol.common.core.web.domain.AjaxResult;
|
||||
import com.securitycontrol.common.core.web.page.TableDataInfo;
|
||||
import com.securitycontrol.common.log.annotation.Log;
|
||||
import com.securitycontrol.common.log.enums.OperationType;
|
||||
import com.securitycontrol.entity.background.vo.TowerRecordVo;
|
||||
import com.securitycontrol.entity.screen.dto.AccessMgeDto;
|
||||
import com.securitycontrol.entity.screen.vo.AccessMgeVo;
|
||||
import com.securitycontrol.entity.screen.vo.AccessMgesVo;
|
||||
import com.securitycontrol.screen.service.AccessMgeService;
|
||||
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.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
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("/largeScreen/accessMge/")
|
||||
@Slf4j
|
||||
public class AccessMgeController extends BaseController {
|
||||
|
||||
@Resource(name = "AccessMgeService")
|
||||
private AccessMgeService service;
|
||||
|
||||
/**
|
||||
* 今日、当月车辆出入场统计
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "今日、当月车辆出入场统计")
|
||||
@GetMapping("getVehicleStatistics")
|
||||
@Log(title = "出入管理", menu = "出入管理->今日、当月车辆出入场统计", grade = OperationType.QUERY_BUSINESS, details = "查询今日、当月车辆出入场统计列表", type = "业务日志")
|
||||
public AjaxResult getVehicleStatistics(AccessMgeDto dto) {
|
||||
return service.getVehicleStatistics(dto);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 今日、当月车辆出入场统计图片
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "今日、当月车辆出入场统计图片")
|
||||
@GetMapping("getVehicleStatisticsPhoto")
|
||||
@Log(title = "出入管理", menu = "出入管理->今日、当月车辆出入场统计图片", grade = OperationType.QUERY_BUSINESS, details = "查询今日、当月车辆出入场统计列表图片", type = "业务日志")
|
||||
public AjaxResult getVehicleStatisticsPhoto(AccessMgeDto dto) {
|
||||
return service.getVehicleStatisticsPhoto(dto);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "今日、当月车辆出入场统计列表")
|
||||
@GetMapping("getVehicleStatisticsList")
|
||||
@Log(title = "出入管理", menu = "出入管理->今日、当月车辆出入场统计列表", grade = OperationType.QUERY_BUSINESS, details = "查询今日、当月车辆出入场统计列表", type = "业务日志")
|
||||
public TableDataInfo getVehicleStatisticsList(AccessMgeDto dto) {
|
||||
try{
|
||||
startLayPage();
|
||||
if(StringHelper.isNotEmpty(dto.getDate())){
|
||||
String[] date = dto.getDate().split("~");
|
||||
dto.setStartDate(date[0]);
|
||||
dto.setEndDate(date[1]);
|
||||
}
|
||||
List<AccessMgeVo> list = service.getVehicleStatisticsList(dto);
|
||||
return getDataTableLayui(list);
|
||||
}catch (Exception e){
|
||||
log.error(e.toString(),e);
|
||||
return getDataTableBadLayui(new ArrayList<>(),"请求出错了");
|
||||
}
|
||||
}
|
||||
|
||||
@GetMapping("exportVehicleData")
|
||||
@Log(title = "今日、当月车辆出入场统计列表", menu = "出入管理->今日、当月车辆出入场统计列表", grade = OperationType.EXPORT_BUSINESS, details = "导出列表", type = "业务日志")
|
||||
public void exportVehicleData(HttpServletRequest request, HttpServletResponse response, AccessMgeDto dto) {
|
||||
try {
|
||||
List<AccessMgeVo> proExportVoList = new ArrayList<>();
|
||||
if(StringHelper.isNotEmpty(dto.getDate())){
|
||||
String[] date = dto.getDate().split("~");
|
||||
dto.setStartDate(date[0]);
|
||||
dto.setEndDate(date[1]);
|
||||
}
|
||||
List<AccessMgeVo> proLists = service.getVehicleStatisticsList(dto);
|
||||
for (int i = 0; i < proLists.size(); i++) {
|
||||
proLists.get(i).setProId((i + 1) + "");
|
||||
AccessMgeVo exportVo = new AccessMgeVo();
|
||||
BeanUtils.copyProperties(proLists.get(i), exportVo);
|
||||
proExportVoList.add(exportVo);
|
||||
}
|
||||
ExportParams exportParams = new ExportParams("今日、当月车辆出入场统计", "今日、当月车辆出入场统计", ExcelType.XSSF);
|
||||
exportParams.setStyle(ExcelStyleUtil.class);
|
||||
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, AccessMgeVo.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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 今日、当月人员出入场统计
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "今日、当月人员出入场统计")
|
||||
@GetMapping("getPerStatistics")
|
||||
@Log(title = "出入管理", menu = "出入管理->今日、当月人员出入场统计", grade = OperationType.QUERY_BUSINESS, details = "查询今日、当月人员出入场统计列表", type = "业务日志")
|
||||
public AjaxResult getPerStatistics(AccessMgeDto dto) {
|
||||
return service.getPerStatistics(dto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 今日、当月人员出入场统计图片
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "今日、当月人员出入场统计图片")
|
||||
@GetMapping("getPerStatisticsPhoto")
|
||||
@Log(title = "出入管理", menu = "出入管理->今日、当月人员出入场统计图片", grade = OperationType.QUERY_BUSINESS, details = "查询今日、当月人员出入场统计列表图片", type = "业务日志")
|
||||
public AjaxResult getPerStatisticsPhoto(AccessMgeDto dto) {
|
||||
return service.getPerStatisticsPhoto(dto);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "今日、当月人员出入场统计列表")
|
||||
@GetMapping("getPerStatisticsList")
|
||||
@Log(title = "出入管理", menu = "出入管理->今日、当月人员出入场统计列表", grade = OperationType.QUERY_BUSINESS, details = "查询今日、当月人员出入场统计列表", type = "业务日志")
|
||||
public TableDataInfo getPerStatisticsList(AccessMgeDto dto) {
|
||||
try{
|
||||
startLayPage();
|
||||
if(StringHelper.isNotEmpty(dto.getDate())){
|
||||
String[] date = dto.getDate().split("~");
|
||||
dto.setStartDate(date[0]);
|
||||
dto.setEndDate(date[1]);
|
||||
}
|
||||
List<AccessMgeVo> list = service.getPerStatisticsList(dto);
|
||||
return getDataTableLayui(list);
|
||||
}catch (Exception e){
|
||||
log.error(e.toString(),e);
|
||||
return getDataTableBadLayui(new ArrayList<>(),"请求出错了");
|
||||
}
|
||||
}
|
||||
|
||||
@GetMapping("exportPerData")
|
||||
@Log(title = "今日、当月人员出入场统计列表", menu = "出入管理->今日、当月人员出入场统计列表", grade = OperationType.EXPORT_BUSINESS, details = "导出列表", type = "业务日志")
|
||||
public void exportData(HttpServletRequest request, HttpServletResponse response, AccessMgeDto dto) {
|
||||
try {
|
||||
List<AccessMgesVo> proExportVoList = new ArrayList<>();
|
||||
if(StringHelper.isNotEmpty(dto.getDate())){
|
||||
String[] date = dto.getDate().split("~");
|
||||
dto.setStartDate(date[0]);
|
||||
dto.setEndDate(date[1]);
|
||||
}
|
||||
List<AccessMgeVo> proLists = service.getPerStatisticsList(dto);
|
||||
for (int i = 0; i < proLists.size(); i++) {
|
||||
proLists.get(i).setProId((i + 1) + "");
|
||||
AccessMgesVo exportVo = new AccessMgesVo();
|
||||
BeanUtils.copyProperties(proLists.get(i), exportVo);
|
||||
proExportVoList.add(exportVo);
|
||||
}
|
||||
ExportParams exportParams = new ExportParams("今日、当月人员出入场统计", "今日、当月人员出入场统计", ExcelType.XSSF);
|
||||
exportParams.setStyle(ExcelStyleUtil.class);
|
||||
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, AccessMgesVo.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);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -49,7 +49,7 @@ public class TowerAssInspectController extends BaseController {
|
|||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "实时检测")
|
||||
@GetMapping("getRealTimeDetection ")
|
||||
@GetMapping("getRealTimeDetection")
|
||||
@Log(title = "组塔检测", menu = "组塔检测->实时检测", grade = OperationType.QUERY_BUSINESS, details = "查询实时检测", type = "业务日志")
|
||||
public AjaxResult getRealTimeDetection(TowerAssInspectDto dto) {
|
||||
return service.getRealTimeDetection(dto);
|
||||
|
|
@ -61,7 +61,7 @@ public class TowerAssInspectController extends BaseController {
|
|||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "当日检测变化趋势")
|
||||
@GetMapping("getTrend ")
|
||||
@GetMapping("getTrend")
|
||||
@Log(title = "组塔检测", menu = "组塔检测->当日检测变化趋势", grade = OperationType.QUERY_BUSINESS, details = "查询当日检测变化趋势", type = "业务日志")
|
||||
public AjaxResult getTrend(TowerAssInspectDto dto) {
|
||||
return service.getTrend(dto);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,32 @@
|
|||
package com.securitycontrol.screen.controller;
|
||||
|
||||
import com.securitycontrol.common.core.web.domain.AjaxResult;
|
||||
import com.securitycontrol.entity.screen.dto.ScreenParamDto;
|
||||
import com.securitycontrol.screen.service.IVideoService;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
|
||||
/**
|
||||
* @author:cwchen
|
||||
* @date:2024-04-01-10:01
|
||||
* @version:1.0
|
||||
* @description:视频监控
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/largeScreen/video/")
|
||||
public class VideoController {
|
||||
|
||||
@Resource(name = "IVideoService")
|
||||
private IVideoService service;
|
||||
|
||||
@ApiOperation(value = "视频树")
|
||||
@GetMapping("getVideoTree")
|
||||
public AjaxResult getVideoTree(ScreenParamDto dto){
|
||||
return service.getVideoTree(dto);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,57 @@
|
|||
package com.securitycontrol.screen.mapper;
|
||||
|
||||
|
||||
import com.securitycontrol.entity.screen.dto.AccessMgeDto;
|
||||
import com.securitycontrol.entity.screen.vo.AccessMgeVo;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 出入管理
|
||||
* @author lsun
|
||||
*/
|
||||
@Repository("AccessMgeMapper")
|
||||
public interface AccessMgeMapper {
|
||||
/**
|
||||
* 今日、当月车辆出入场统计
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
List<AccessMgeVo> getVehicleStatistics(AccessMgeDto dto);
|
||||
|
||||
/**
|
||||
* 今日、当月车辆出入场统计图片
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
List<AccessMgeVo> getVehicleStatisticsPhoto(AccessMgeDto dto);
|
||||
|
||||
/**
|
||||
* 今日、当月车辆出入场统计列表
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
List<AccessMgeVo> getVehicleStatisticsList(AccessMgeDto dto);
|
||||
|
||||
/**
|
||||
* 今日、当月人员出入场统计
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
List<AccessMgeVo> getPerStatistics(AccessMgeDto dto);
|
||||
|
||||
/**
|
||||
* 今日、当月人员出入场统计图片
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
List<AccessMgeVo> getPerStatisticsPhoto(AccessMgeDto dto);
|
||||
|
||||
/**
|
||||
* 今日、当月人员出入场统计列表
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
List<AccessMgeVo> getPerStatisticsList(AccessMgeDto dto);
|
||||
}
|
||||
|
|
@ -10,9 +10,15 @@ import java.util.List;
|
|||
|
||||
/**
|
||||
* 告警管理
|
||||
* @author lsun
|
||||
*/
|
||||
@Repository(value = "AlarmMgeMapper")
|
||||
public interface AlarmMgeMapper {
|
||||
|
||||
/**
|
||||
* 告警管理-列表
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
List<AlarmMgeVo> getAlarmMgeList(AlarmMgeDto dto);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,26 @@
|
|||
package com.securitycontrol.screen.mapper;
|
||||
|
||||
import com.securitycontrol.entity.screen.dto.ScreenParamDto;
|
||||
import com.securitycontrol.entity.screen.vo.DtreeVo;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author:cwchen
|
||||
* @date:2024-04-01-10:03
|
||||
* @version:1.0
|
||||
* @description:视频监控-数据库访问层
|
||||
*/
|
||||
@Repository(value = "IVideoMapper")
|
||||
public interface IVideoMapper {
|
||||
/**
|
||||
* 视频列表获取
|
||||
* @param dto
|
||||
* @return List<DtreeVo>
|
||||
* @description
|
||||
* @author cwchen
|
||||
* @date 2024/4/1 10:13
|
||||
*/
|
||||
List<DtreeVo> getVideoTree(ScreenParamDto dto);
|
||||
}
|
||||
|
|
@ -12,13 +12,38 @@ import java.util.List;
|
|||
*/
|
||||
@Repository(value = "TowerAssInspectMapper")
|
||||
public interface TowerAssInspectMapper {
|
||||
/**
|
||||
* 设备列表
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
List<TowerAssInspectVo> getDeviceList(TowerAssInspectDto dto);
|
||||
|
||||
/**
|
||||
* 实时检测
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
List<TowerAssInspectVo> getRealTimeDetection(TowerAssInspectDto dto);
|
||||
|
||||
/**
|
||||
* 当日检测变化趋势
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
List<TowerAssInspectVo> getTrend(TowerAssInspectDto dto);
|
||||
|
||||
/**
|
||||
* 实时告警
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
List<TowerAssInspectVo> getRealTimeAlarmList(TowerAssInspectDto dto);
|
||||
|
||||
/**
|
||||
* 历史记录
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
List<TowerAssInspectVo> getHistoryList(TowerAssInspectDto dto);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,56 @@
|
|||
package com.securitycontrol.screen.service;
|
||||
|
||||
|
||||
import com.securitycontrol.common.core.web.domain.AjaxResult;
|
||||
import com.securitycontrol.entity.screen.dto.AccessMgeDto;
|
||||
import com.securitycontrol.entity.screen.vo.AccessMgeVo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 出入管理
|
||||
* @author lsun
|
||||
*/
|
||||
public interface AccessMgeService {
|
||||
/**
|
||||
* 今日、当月车辆出入场统计
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
AjaxResult getVehicleStatistics(AccessMgeDto dto);
|
||||
|
||||
/**
|
||||
* 今日、当月车辆出入场统计图片
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
AjaxResult getVehicleStatisticsPhoto(AccessMgeDto dto);
|
||||
|
||||
/**
|
||||
* 今日、当月车辆出入场统计图片列表
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
List<AccessMgeVo> getVehicleStatisticsList(AccessMgeDto dto);
|
||||
|
||||
/**
|
||||
* 今日、当月人员出入场统计
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
AjaxResult getPerStatistics(AccessMgeDto dto);
|
||||
|
||||
/**
|
||||
* 今日、当月人员出入场统计图片
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
AjaxResult getPerStatisticsPhoto(AccessMgeDto dto);
|
||||
|
||||
/**
|
||||
* 今日、当月人员出入场统计图片列表
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
List<AccessMgeVo> getPerStatisticsList(AccessMgeDto dto);
|
||||
}
|
||||
|
|
@ -9,7 +9,13 @@ import java.util.List;
|
|||
|
||||
/**
|
||||
* 告警管理
|
||||
* @author lsun
|
||||
*/
|
||||
public interface AlarmMgeService {
|
||||
/**
|
||||
* 告警管理 -列表
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
List<AlarmMgeVo> getAlarmMgeList(AlarmMgeDto dto);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,22 @@
|
|||
package com.securitycontrol.screen.service;
|
||||
|
||||
import com.securitycontrol.common.core.web.domain.AjaxResult;
|
||||
import com.securitycontrol.entity.screen.dto.ScreenParamDto;
|
||||
|
||||
/**
|
||||
* @author:cwchen
|
||||
* @date:2024-04-01-10:02
|
||||
* @version:1.0
|
||||
* @description:视频监控-业务层
|
||||
*/
|
||||
public interface IVideoService {
|
||||
/**
|
||||
* 视频列表获取
|
||||
* @param dto
|
||||
* @return AjaxResult
|
||||
* @description
|
||||
* @author cwchen
|
||||
* @date 2024/4/1 10:11
|
||||
*/
|
||||
AjaxResult getVideoTree(ScreenParamDto dto);
|
||||
}
|
||||
|
|
@ -13,13 +13,38 @@ import java.util.List;
|
|||
*/
|
||||
public interface TowerAssInspectService {
|
||||
|
||||
/**
|
||||
* 组塔检测-设备列表
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
AjaxResult getDeviceList(TowerAssInspectDto dto);
|
||||
|
||||
/**
|
||||
* 组塔检测-实时检测
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
AjaxResult getRealTimeDetection(TowerAssInspectDto dto);
|
||||
|
||||
/**
|
||||
* 组塔检测-当日检测变化趋势
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
AjaxResult getTrend(TowerAssInspectDto dto);
|
||||
|
||||
/**
|
||||
* 组塔检测-实时告警
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
List<TowerAssInspectVo> getRealTimeAlarmList(TowerAssInspectDto dto);
|
||||
|
||||
/**
|
||||
* 组塔检测-历史记录
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
List<TowerAssInspectVo> getHistoryList(TowerAssInspectDto dto);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,90 @@
|
|||
package com.securitycontrol.screen.service.impl;
|
||||
|
||||
import com.securitycontrol.common.core.web.domain.AjaxResult;
|
||||
import com.securitycontrol.entity.screen.dto.AccessMgeDto;
|
||||
import com.securitycontrol.entity.screen.vo.AccessMgeVo;
|
||||
import com.securitycontrol.screen.mapper.AccessMgeMapper;
|
||||
import com.securitycontrol.screen.service.AccessMgeService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 出入管理
|
||||
* @author lsun
|
||||
*/
|
||||
@Slf4j
|
||||
@Service(value = "AccessMgeService")
|
||||
public class AccessMgeServiceImpl implements AccessMgeService {
|
||||
@Resource(name = "AccessMgeMapper")
|
||||
private AccessMgeMapper mapper;
|
||||
|
||||
@Override
|
||||
public AjaxResult getVehicleStatistics(AccessMgeDto dto) {
|
||||
List<AccessMgeVo> list = new ArrayList<>();
|
||||
try {
|
||||
list = mapper.getVehicleStatistics(dto);
|
||||
} catch (Exception e) {
|
||||
log.error("今日、当月车辆出入场统计-查询失败", e);
|
||||
}
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult getVehicleStatisticsPhoto(AccessMgeDto dto) {
|
||||
List<AccessMgeVo> list = new ArrayList<>();
|
||||
try {
|
||||
list = mapper.getVehicleStatisticsPhoto(dto);
|
||||
} catch (Exception e) {
|
||||
log.error("今日、当月车辆出入场统计图片-查询失败", e);
|
||||
}
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AccessMgeVo> getVehicleStatisticsList(AccessMgeDto dto) {
|
||||
List<AccessMgeVo> list = new ArrayList<>();
|
||||
try {
|
||||
list = mapper.getVehicleStatisticsList(dto);
|
||||
} catch (Exception e) {
|
||||
log.error("获取今日、当月车辆出入场统计列表",e);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult getPerStatistics(AccessMgeDto dto) {
|
||||
List<AccessMgeVo> list = new ArrayList<>();
|
||||
try {
|
||||
list = mapper.getPerStatistics(dto);
|
||||
} catch (Exception e) {
|
||||
log.error("今日、当月人员出入场统计-查询失败", e);
|
||||
}
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult getPerStatisticsPhoto(AccessMgeDto dto) {
|
||||
List<AccessMgeVo> list = new ArrayList<>();
|
||||
try {
|
||||
list = mapper.getPerStatisticsPhoto(dto);
|
||||
} catch (Exception e) {
|
||||
log.error("今日、当月人员出入场统计图片-查询失败", e);
|
||||
}
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AccessMgeVo> getPerStatisticsList(AccessMgeDto dto) {
|
||||
List<AccessMgeVo> list = new ArrayList<>();
|
||||
try {
|
||||
list = mapper.getPerStatisticsList(dto);
|
||||
} catch (Exception e) {
|
||||
log.error("获取今日、当月人员出入场统计列表",e);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
}
|
||||
|
|
@ -20,6 +20,7 @@ import java.util.concurrent.Future;
|
|||
|
||||
/**
|
||||
* 告警管理
|
||||
* @author lsun
|
||||
*/
|
||||
@Slf4j
|
||||
@Service(value = "AlarmMgeService")
|
||||
|
|
|
|||
|
|
@ -0,0 +1,42 @@
|
|||
package com.securitycontrol.screen.service.impl;
|
||||
|
||||
import com.securitycontrol.common.core.web.domain.AjaxResult;
|
||||
import com.securitycontrol.entity.screen.dto.ScreenParamDto;
|
||||
import com.securitycontrol.entity.screen.vo.DtreeVo;
|
||||
import com.securitycontrol.screen.mapper.IVideoMapper;
|
||||
import com.securitycontrol.screen.service.IVideoService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @author:cwchen
|
||||
* @date:2024-04-01-10:03
|
||||
* @version:1.0
|
||||
* @description:视频监控业务逻辑层
|
||||
*/
|
||||
@Service(value = "IVideoService")
|
||||
@Slf4j
|
||||
public class VideoServiceImpl implements IVideoService {
|
||||
|
||||
@Resource(name = "IVideoMapper")
|
||||
private IVideoMapper mapper;
|
||||
|
||||
@Override
|
||||
public AjaxResult getVideoTree(ScreenParamDto dto) {
|
||||
List<DtreeVo> list = new ArrayList<>();
|
||||
try {
|
||||
list = mapper.getVideoTree(dto);
|
||||
List<DtreeVo> sortDataList = list.stream().sorted(Comparator.comparing(DtreeVo::getOnLine, Comparator.reverseOrder())).collect(Collectors.toList());
|
||||
return AjaxResult.success(sortDataList);
|
||||
} catch (Exception e) {
|
||||
log.error("视频列表",e);
|
||||
}
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,135 @@
|
|||
<?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.screen.mapper.AccessMgeMapper">
|
||||
|
||||
<select id="getVehicleStatistics" resultType="com.securitycontrol.entity.screen.vo.AccessMgeVo">
|
||||
SELECT
|
||||
LPAD(SUM(jtrNum), 3, '0') AS jtrNum,
|
||||
LPAD(SUM(jrcNum), 3, '0') AS jrcNum,
|
||||
LPAD(SUM(dyrNum), 4, '0') AS dyrNum,
|
||||
LPAD(SUM(dycNum), 4, '0') AS dycNum
|
||||
FROM (
|
||||
SELECT
|
||||
sum( case when tca.access_type = '1' then 1 else 0 end ) as jtrNum,
|
||||
sum( case when tca.access_type = '2' then 1 else 0 end ) as jrcNUm,
|
||||
0 as dyrNum,
|
||||
0 as dycNUm
|
||||
FROM tb_car tb
|
||||
LEFT JOIN tb_car_access tca on tb.id = tca.car_id
|
||||
WHERE to_days(tca.accesss_time) = to_days(NOW())
|
||||
UNION ALL
|
||||
SELECT
|
||||
0 as jtrNum,
|
||||
0 as jrcNUm,
|
||||
sum( case when tca.access_type = '1' then 1 else 0 end ) as dyrNum,
|
||||
sum( case when tca.access_type = '2' then 1 else 0 end ) as dycNUm
|
||||
FROM tb_car tb
|
||||
LEFT JOIN tb_car_access tca on tb.id = tca.car_id
|
||||
WHERE DATE_FORMAT(tca.accesss_time, '%Y%m') = DATE_FORMAT(NOW(), '%Y%m')
|
||||
) a
|
||||
</select>
|
||||
|
||||
<select id="getVehicleStatisticsPhoto" resultType="com.securitycontrol.entity.screen.vo.AccessMgeVo">
|
||||
SELECT tw.warn_content as warnContent, trf.file_name as fileName, trf.file_suffix as fileSuffix , trf.file_id as fileId, trf.file_type as fileType
|
||||
FROM tb_car tb
|
||||
LEFT JOIN tb_car_access tca on tb.id = tca.car_id
|
||||
LEFT JOIN tb_warn tw ON tw.source_id = tca.id
|
||||
LEFT JOIN tb_resource_file trf on trf.source_id = tw.warn_id
|
||||
WHERE trf.del_flag = '0' AND tca.access_type = #{accessType}
|
||||
<if test='timeType=="1"'>
|
||||
and to_days(tca.accesss_time) = to_days(NOW())
|
||||
</if>
|
||||
|
||||
<if test='timeType=="2"'>
|
||||
and DATE_FORMAT(tca.accesss_time, '%Y%m') = DATE_FORMAT(NOW(), '%Y%m')
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getVehicleStatisticsList" resultType="com.securitycontrol.entity.screen.vo.AccessMgeVo">
|
||||
SELECT tp.pro_name as proName, tc.car_num as carNum, tc.user_name as userName, tc.phone ,
|
||||
case when tca.access_type ='1' then '入场' else '出场' END accessType, tca.accesss_time as accesssTime
|
||||
FROM tb_project tp
|
||||
LEFT JOIN tb_car tc ON tp.bid_code = tc.bid_code
|
||||
LEFT JOIN tb_car_access tca on tca.car_id = tc.id
|
||||
WHERE tp.bid_code = #{bidCode}
|
||||
<if test="proName != null and proName != ''">
|
||||
and tp.pro_name LIKE concat('%',#{proName},'%')
|
||||
</if>
|
||||
|
||||
<if test="carNum != null and carNum != ''">
|
||||
and tc.car_num LIKE concat('%',#{carNum},'%')
|
||||
</if>
|
||||
|
||||
<if test="date != null and date != ''">
|
||||
AND tca.accesss_time BETWEEN CONCAT(#{startDate}) AND CONCAT(#{endDate})
|
||||
</if>
|
||||
|
||||
</select>
|
||||
|
||||
<select id="getPerStatistics" resultType="com.securitycontrol.entity.screen.vo.AccessMgeVo">
|
||||
SELECT
|
||||
LPAD(SUM(jtrNum), 3, '0') AS jtrNum,
|
||||
LPAD(SUM(jrcNum), 3, '0') AS jrcNum,
|
||||
LPAD(SUM(dyrNum), 4, '0') AS dyrNum,
|
||||
LPAD(SUM(dycNum), 4, '0') AS dycNum
|
||||
FROM (
|
||||
SELECT
|
||||
sum( case when tua.access_type = '1' then 1 else 0 end ) as jtrNum,
|
||||
sum( case when tua.access_type = '2' then 1 else 0 end ) as jrcNUm,
|
||||
0 as dyrNum,
|
||||
0 as dycNUm
|
||||
FROM tb_work_team twt
|
||||
LEFT JOIN t_team_people ttp on twt.team_id = ttp.team_id
|
||||
LEFT JOIN tb_user_access tua ON ttp.user_id = tua.user_id
|
||||
WHERE to_days(tua.access_time) = to_days(NOW())
|
||||
UNION ALL
|
||||
SELECT
|
||||
0 as jtrNum,
|
||||
0 as jrcNUm,
|
||||
sum( case when tua.access_type = '1' then 1 else 0 end ) as dyrNum,
|
||||
sum( case when tua.access_type = '2' then 1 else 0 end ) as dycNUm
|
||||
FROM tb_work_team twt
|
||||
LEFT JOIN t_team_people ttp on twt.team_id = ttp.team_id
|
||||
LEFT JOIN tb_user_access tua ON ttp.user_id = tua.user_id
|
||||
WHERE DATE_FORMAT(tua.access_time, '%Y%m') = DATE_FORMAT(NOW(), '%Y%m')
|
||||
)a
|
||||
</select>
|
||||
|
||||
<select id="getPerStatisticsPhoto" resultType="com.securitycontrol.entity.screen.vo.AccessMgeVo">
|
||||
SELECT tw.warn_content as warnContent, trf.file_name as fileName, trf.file_suffix as fileSuffix , trf.file_id as fileId, trf.file_type as fileType
|
||||
FROM tb_work_team twt
|
||||
LEFT JOIN t_team_people ttp on twt.team_id = ttp.team_id
|
||||
LEFT JOIN tb_user_access tua ON ttp.user_id = tua.user_id
|
||||
LEFT JOIN tb_warn tw ON tw.people_id = tua.id
|
||||
LEFT JOIN tb_resource_file trf on trf.source_id = tw.warn_id
|
||||
WHERE trf.del_flag = '0' AND tua.access_type = #{accessType}
|
||||
<if test='timeType=="1"'>
|
||||
and to_days(tua.access_time) = to_days(NOW())
|
||||
</if>
|
||||
|
||||
<if test='timeType=="2"'>
|
||||
and DATE_FORMAT(tua.access_time, '%Y%m') = DATE_FORMAT(NOW(), '%Y%m')
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getPerStatisticsList" resultType="com.securitycontrol.entity.screen.vo.AccessMgeVo">
|
||||
SELECT tp.pro_name as proName, tua.user_name as userName, tua.user_phone as phone ,
|
||||
case when tua.access_type ='1' then '入场' else '出场' END accessType, tua.access_time as accesssTime
|
||||
FROM tb_project tp
|
||||
LEFT JOIN tb_work_team twt ON twt.bid_code = tp.bid_code
|
||||
LEFT JOIN t_team_people ttp on twt.team_id = ttp.team_id
|
||||
LEFT JOIN tb_user_access tua ON ttp.user_id = tua.user_id
|
||||
WHERE tp.bid_code = #{bidCode}
|
||||
<if test="proName != null and proName != ''">
|
||||
and tp.pro_name LIKE concat('%',#{proName},'%')
|
||||
</if>
|
||||
|
||||
<if test="userName != null and userName != ''">
|
||||
and tua.user_name LIKE concat('%',#{userName},'%')
|
||||
</if>
|
||||
|
||||
<if test="date != null and date != ''">
|
||||
AND tca.accesss_time BETWEEN CONCAT(#{startDate}) AND CONCAT(#{endDate})
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
<?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.screen.mapper.IVideoMapper">
|
||||
|
||||
<!--视频列表获取-->
|
||||
<select id="getVideoTree" resultType="com.securitycontrol.entity.screen.vo.DtreeVo">
|
||||
(SELECT '0' AS id,'球机' AS title, '-1' AS parentId,'0' AS onLine,'1' AS level)
|
||||
UNION ALL
|
||||
(
|
||||
SELECT CONCAT('QJ',td.device_code) AS id,
|
||||
td.device_name AS title,
|
||||
'0' AS parentId,
|
||||
on_line AS onLine,
|
||||
'2' AS level
|
||||
FROM tb_device td
|
||||
INNER JOIN t_class_metting tcm on td.device_code = tcm.puid AND tcm.work_day = CURRENT_DATE
|
||||
WHERE td.del_flag = 0
|
||||
<if test="param!=null and param!=''">
|
||||
AND INSTR(td.device_name,#{param}) > 0
|
||||
</if>
|
||||
<if test="bidCode!=null and bidCode!=''">
|
||||
AND INSTR(tcm.bid_code,#{bidCode}) > 0
|
||||
</if>
|
||||
<if test="bidCode==null or bidCode==''">
|
||||
AND tcm.bid_code = '-1'
|
||||
</if>
|
||||
)
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -6,6 +6,7 @@ import com.securitycontrol.common.security.annotation.EnableRyFeignClients;
|
|||
import com.securitycontrol.common.swagger.annotation.EnableCustomSwagger2;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration;
|
||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
|
||||
/**
|
||||
|
|
@ -16,8 +17,8 @@ import org.springframework.scheduling.annotation.EnableScheduling;
|
|||
@EnableCustomConfig
|
||||
@EnableCustomSwagger2
|
||||
@EnableRyFeignClients
|
||||
@SpringBootApplication
|
||||
@EnableScheduling
|
||||
@SpringBootApplication(exclude = MongoAutoConfiguration.class )
|
||||
public class VscSystemApplication {
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(VscSystemApplication.class, args);
|
||||
|
|
|
|||
|
|
@ -135,7 +135,7 @@
|
|||
sd2.dict_name AS name
|
||||
FROM sys_dict sd
|
||||
LEFT JOIN sys_dict sd2 ON sd.dict_code = sd2.p_code AND sd2.del_flag = 0
|
||||
WHERE sd.dict_code = '999' AND sd.del_flag = 0
|
||||
WHERE sd.dict_code = '9990' AND sd.del_flag = 0
|
||||
ORDER BY sd2.dict_sort
|
||||
</select>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue