From c8492a928ad2df3c3d0f9e2cb010254ed8ad52e0 Mon Sep 17 00:00:00 2001 From: haozq <1611483981@qq.com> Date: Mon, 1 Apr 2024 17:50:50 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=BE=B9=E5=B8=A6?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=8E=A8=E9=80=81=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/core/utils/aes/ListHelper.java | 11 + .../entity/system/SystemGlobal.java | 4 + securitycontrol-model/pom.xml | 1 + .../securitycontrol-Interface/pom.xml | 90 +++++++++ .../inter/VscInterApplication.java | 27 +++ .../inter/controller/BdController.java | 189 ++++++++++++++++++ .../inter/mapper/BdMapper.java | 91 +++++++++ .../inter/service/BdServiceImpl.java | 168 ++++++++++++++++ .../securitycontrol/inter/vo/BdBindProVo.java | 27 +++ .../inter/vo/BidProjectVo.java | 67 +++++++ .../securitycontrol/inter/vo/DevResultVo.java | 37 ++++ .../inter/vo/DeviceInfoVo.java | 42 ++++ .../inter/vo/InterfaceParamVo.java | 36 ++++ .../securitycontrol/inter/vo/ProjectVo.java | 40 ++++ .../securitycontrol/inter/vo/SingleProVo.java | 78 ++++++++ .../securitycontrol/inter/vo/UserInfoVo.java | 97 +++++++++ .../securitycontrol/inter/vo/WarnInfoVo.java | 37 ++++ .../src/main/resources/banner.txt | 10 + .../src/main/resources/bootstrap.yml | 53 +++++ .../src/main/resources/logback.xml | 84 ++++++++ .../src/main/resources/mapper/BdMapper.xml | 91 +++++++++ .../background/VscBackgroundApplication.java | 3 +- .../controller/SourceFileController.java | 2 - .../files/VscFileApplication.java | 3 +- .../FileUploadController.java | 2 +- .../screen/VscScreenApplication.java | 3 +- .../system/VscSystemApplication.java | 3 +- 27 files changed, 1289 insertions(+), 7 deletions(-) create mode 100644 securitycontrol-model/securitycontrol-Interface/pom.xml create mode 100644 securitycontrol-model/securitycontrol-Interface/src/main/java/com/securitycontrol/inter/VscInterApplication.java create mode 100644 securitycontrol-model/securitycontrol-Interface/src/main/java/com/securitycontrol/inter/controller/BdController.java create mode 100644 securitycontrol-model/securitycontrol-Interface/src/main/java/com/securitycontrol/inter/mapper/BdMapper.java create mode 100644 securitycontrol-model/securitycontrol-Interface/src/main/java/com/securitycontrol/inter/service/BdServiceImpl.java create mode 100644 securitycontrol-model/securitycontrol-Interface/src/main/java/com/securitycontrol/inter/vo/BdBindProVo.java create mode 100644 securitycontrol-model/securitycontrol-Interface/src/main/java/com/securitycontrol/inter/vo/BidProjectVo.java create mode 100644 securitycontrol-model/securitycontrol-Interface/src/main/java/com/securitycontrol/inter/vo/DevResultVo.java create mode 100644 securitycontrol-model/securitycontrol-Interface/src/main/java/com/securitycontrol/inter/vo/DeviceInfoVo.java create mode 100644 securitycontrol-model/securitycontrol-Interface/src/main/java/com/securitycontrol/inter/vo/InterfaceParamVo.java create mode 100644 securitycontrol-model/securitycontrol-Interface/src/main/java/com/securitycontrol/inter/vo/ProjectVo.java create mode 100644 securitycontrol-model/securitycontrol-Interface/src/main/java/com/securitycontrol/inter/vo/SingleProVo.java create mode 100644 securitycontrol-model/securitycontrol-Interface/src/main/java/com/securitycontrol/inter/vo/UserInfoVo.java create mode 100644 securitycontrol-model/securitycontrol-Interface/src/main/java/com/securitycontrol/inter/vo/WarnInfoVo.java create mode 100644 securitycontrol-model/securitycontrol-Interface/src/main/resources/banner.txt create mode 100644 securitycontrol-model/securitycontrol-Interface/src/main/resources/bootstrap.yml create mode 100644 securitycontrol-model/securitycontrol-Interface/src/main/resources/logback.xml create mode 100644 securitycontrol-model/securitycontrol-Interface/src/main/resources/mapper/BdMapper.xml rename securitycontrol-model/securitycontrol-files/src/main/java/com/securitycontrol/files/{ => controller}/FileUploadController.java (98%) diff --git a/securitycontrol-commons/securitycontrol-commons-core/src/main/java/com/securitycontrol/common/core/utils/aes/ListHelper.java b/securitycontrol-commons/securitycontrol-commons-core/src/main/java/com/securitycontrol/common/core/utils/aes/ListHelper.java index a18d00c..2b7b299 100644 --- a/securitycontrol-commons/securitycontrol-commons-core/src/main/java/com/securitycontrol/common/core/utils/aes/ListHelper.java +++ b/securitycontrol-commons/securitycontrol-commons-core/src/main/java/com/securitycontrol/common/core/utils/aes/ListHelper.java @@ -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 asList(String arr,String str){ + if(StringHelper.isNotEmpty(arr)){ + return Arrays.asList(arr.split(str)); + } + return null; + + } /** * 集合校验 * @param keyExtractor diff --git a/securitycontrol-commons/securitycontrol-commons-entity/src/main/java/com/securitycontrol/entity/system/SystemGlobal.java b/securitycontrol-commons/securitycontrol-commons-entity/src/main/java/com/securitycontrol/entity/system/SystemGlobal.java index 1fa4b51..fdab865 100644 --- a/securitycontrol-commons/securitycontrol-commons-entity/src/main/java/com/securitycontrol/entity/system/SystemGlobal.java +++ b/securitycontrol-commons/securitycontrol-commons-entity/src/main/java/com/securitycontrol/entity/system/SystemGlobal.java @@ -47,6 +47,10 @@ public class SystemGlobal { */ public final static String PRO_IMAGE="工程图片"; + /** + * + */ + public final static String USER_IMAGE="人员图片"; /** * 预案类型 */ diff --git a/securitycontrol-model/pom.xml b/securitycontrol-model/pom.xml index 75c2383..f045a9e 100644 --- a/securitycontrol-model/pom.xml +++ b/securitycontrol-model/pom.xml @@ -17,5 +17,6 @@ securitycontrol-background securitycontrol-screen securitycontrol-files + securitycontrol-Interface \ No newline at end of file diff --git a/securitycontrol-model/securitycontrol-Interface/pom.xml b/securitycontrol-model/securitycontrol-Interface/pom.xml new file mode 100644 index 0000000..db1a0c0 --- /dev/null +++ b/securitycontrol-model/securitycontrol-Interface/pom.xml @@ -0,0 +1,90 @@ + + + + securitycontrol-model + com.securitycontrol + 3.6.1 + + 4.0.0 + + securitycontrol-Interface + + + + + com.alibaba.cloud + spring-cloud-starter-alibaba-nacos-discovery + 2.2.3.RELEASE + + + + org.springframework.cloud + spring-cloud-starter-netflix-ribbon + + + + + org.springframework.cloud + spring-cloud-loadbalancer + + + com.securitycontrol + securitycontrol-commons-security + + + com.securitycontrol + securitycontrol-commons-swagger + + + + + com.alibaba.cloud + spring-cloud-starter-alibaba-nacos-config + + + + + com.alibaba.cloud + spring-cloud-starter-alibaba-sentinel + + + + + org.springframework.boot + spring-boot-starter-actuator + + + + io.springfox + springfox-swagger-ui + ${swagger.fox.version} + + + + mysql + mysql-connector-java + + + + com.securitycontrol + securitycontrol-commons-datasource + + + + com.securitycontrol + securitycontrol-commons-datascope + + + + net.logstash.logback + logstash-logback-encoder + + + com.securitycontrol + securitycontrol-commons-entity + + + + \ No newline at end of file diff --git a/securitycontrol-model/securitycontrol-Interface/src/main/java/com/securitycontrol/inter/VscInterApplication.java b/securitycontrol-model/securitycontrol-Interface/src/main/java/com/securitycontrol/inter/VscInterApplication.java new file mode 100644 index 0000000..2a38137 --- /dev/null +++ b/securitycontrol-model/securitycontrol-Interface/src/main/java/com/securitycontrol/inter/VscInterApplication.java @@ -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("智慧工地数据接口服务!"); + } +} diff --git a/securitycontrol-model/securitycontrol-Interface/src/main/java/com/securitycontrol/inter/controller/BdController.java b/securitycontrol-model/securitycontrol-Interface/src/main/java/com/securitycontrol/inter/controller/BdController.java new file mode 100644 index 0000000..72c7d66 --- /dev/null +++ b/securitycontrol-model/securitycontrol-Interface/src/main/java/com/securitycontrol/inter/controller/BdController.java @@ -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 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 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 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 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); + } + + + + + +} diff --git a/securitycontrol-model/securitycontrol-Interface/src/main/java/com/securitycontrol/inter/mapper/BdMapper.java b/securitycontrol-model/securitycontrol-Interface/src/main/java/com/securitycontrol/inter/mapper/BdMapper.java new file mode 100644 index 0000000..4bcce25 --- /dev/null +++ b/securitycontrol-model/securitycontrol-Interface/src/main/java/com/securitycontrol/inter/mapper/BdMapper.java @@ -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 getProjectByName(InterfaceParamVo param); + + /** + * 查询标段工程名称 + * @param param + * @return + */ + List getPepsinInfoByPrcNo(InterfaceParamVo param); + + /** + * 查询标段信息 + * @param param + * @return + */ + List getSGTenderListBySinList(InterfaceParamVo param); + + /** + * 查询全部人员信息 + * @param param + * @return + */ + List 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); +} diff --git a/securitycontrol-model/securitycontrol-Interface/src/main/java/com/securitycontrol/inter/service/BdServiceImpl.java b/securitycontrol-model/securitycontrol-Interface/src/main/java/com/securitycontrol/inter/service/BdServiceImpl.java new file mode 100644 index 0000000..6e01cc0 --- /dev/null +++ b/securitycontrol-model/securitycontrol-Interface/src/main/java/com/securitycontrol/inter/service/BdServiceImpl.java @@ -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 getProjectByName(InterfaceParamVo param) { + return mapper.getProjectByName(param); + } + + public List getPepsinInfoByPrcNo(InterfaceParamVo param) { + return mapper.getPepsinInfoByPrcNo(param); + } + + /** + * 查询标段工程信息 + * @param param + * @return + */ + public List getSGTenderListBySinList(InterfaceParamVo param) { + param.setSignList(ListHelper.asList(param.getSingleNoList(),",")); + return mapper.getSGTenderListBySinList(param); + } + + /** + * 查询人员信息集合 + * @param param + * @return + */ + public List getPeopleInfo(InterfaceParamVo param) { + List list = mapper.getPeopleInfo(param); + list.forEach(vo->{ + Result> 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 list2 = result.getData(); + Result 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; + } +} diff --git a/securitycontrol-model/securitycontrol-Interface/src/main/java/com/securitycontrol/inter/vo/BdBindProVo.java b/securitycontrol-model/securitycontrol-Interface/src/main/java/com/securitycontrol/inter/vo/BdBindProVo.java new file mode 100644 index 0000000..fd7e19e --- /dev/null +++ b/securitycontrol-model/securitycontrol-Interface/src/main/java/com/securitycontrol/inter/vo/BdBindProVo.java @@ -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; +} diff --git a/securitycontrol-model/securitycontrol-Interface/src/main/java/com/securitycontrol/inter/vo/BidProjectVo.java b/securitycontrol-model/securitycontrol-Interface/src/main/java/com/securitycontrol/inter/vo/BidProjectVo.java new file mode 100644 index 0000000..738f120 --- /dev/null +++ b/securitycontrol-model/securitycontrol-Interface/src/main/java/com/securitycontrol/inter/vo/BidProjectVo.java @@ -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; + + +} diff --git a/securitycontrol-model/securitycontrol-Interface/src/main/java/com/securitycontrol/inter/vo/DevResultVo.java b/securitycontrol-model/securitycontrol-Interface/src/main/java/com/securitycontrol/inter/vo/DevResultVo.java new file mode 100644 index 0000000..8cd9662 --- /dev/null +++ b/securitycontrol-model/securitycontrol-Interface/src/main/java/com/securitycontrol/inter/vo/DevResultVo.java @@ -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"); + } + +} diff --git a/securitycontrol-model/securitycontrol-Interface/src/main/java/com/securitycontrol/inter/vo/DeviceInfoVo.java b/securitycontrol-model/securitycontrol-Interface/src/main/java/com/securitycontrol/inter/vo/DeviceInfoVo.java new file mode 100644 index 0000000..ec2d4f3 --- /dev/null +++ b/securitycontrol-model/securitycontrol-Interface/src/main/java/com/securitycontrol/inter/vo/DeviceInfoVo.java @@ -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; + + + +} diff --git a/securitycontrol-model/securitycontrol-Interface/src/main/java/com/securitycontrol/inter/vo/InterfaceParamVo.java b/securitycontrol-model/securitycontrol-Interface/src/main/java/com/securitycontrol/inter/vo/InterfaceParamVo.java new file mode 100644 index 0000000..89f7cac --- /dev/null +++ b/securitycontrol-model/securitycontrol-Interface/src/main/java/com/securitycontrol/inter/vo/InterfaceParamVo.java @@ -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 signList; + + /** + * 标段工程集合 + */ + private String bidNo; + +} diff --git a/securitycontrol-model/securitycontrol-Interface/src/main/java/com/securitycontrol/inter/vo/ProjectVo.java b/securitycontrol-model/securitycontrol-Interface/src/main/java/com/securitycontrol/inter/vo/ProjectVo.java new file mode 100644 index 0000000..323d168 --- /dev/null +++ b/securitycontrol-model/securitycontrol-Interface/src/main/java/com/securitycontrol/inter/vo/ProjectVo.java @@ -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; + +} diff --git a/securitycontrol-model/securitycontrol-Interface/src/main/java/com/securitycontrol/inter/vo/SingleProVo.java b/securitycontrol-model/securitycontrol-Interface/src/main/java/com/securitycontrol/inter/vo/SingleProVo.java new file mode 100644 index 0000000..90ff839 --- /dev/null +++ b/securitycontrol-model/securitycontrol-Interface/src/main/java/com/securitycontrol/inter/vo/SingleProVo.java @@ -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; + + +} diff --git a/securitycontrol-model/securitycontrol-Interface/src/main/java/com/securitycontrol/inter/vo/UserInfoVo.java b/securitycontrol-model/securitycontrol-Interface/src/main/java/com/securitycontrol/inter/vo/UserInfoVo.java new file mode 100644 index 0000000..c1dfee9 --- /dev/null +++ b/securitycontrol-model/securitycontrol-Interface/src/main/java/com/securitycontrol/inter/vo/UserInfoVo.java @@ -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; + + +} diff --git a/securitycontrol-model/securitycontrol-Interface/src/main/java/com/securitycontrol/inter/vo/WarnInfoVo.java b/securitycontrol-model/securitycontrol-Interface/src/main/java/com/securitycontrol/inter/vo/WarnInfoVo.java new file mode 100644 index 0000000..107ca92 --- /dev/null +++ b/securitycontrol-model/securitycontrol-Interface/src/main/java/com/securitycontrol/inter/vo/WarnInfoVo.java @@ -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; + +} diff --git a/securitycontrol-model/securitycontrol-Interface/src/main/resources/banner.txt b/securitycontrol-model/securitycontrol-Interface/src/main/resources/banner.txt new file mode 100644 index 0000000..fbd45f5 --- /dev/null +++ b/securitycontrol-model/securitycontrol-Interface/src/main/resources/banner.txt @@ -0,0 +1,10 @@ +Spring Boot Version: ${spring-boot.version} +Spring Application Name: ${spring.application.name} + _ _ + (_) | | + _ __ _ _ ___ _ _ _ ______ ___ _ _ ___ | |_ ___ _ __ ___ +| '__|| | | | / _ \ | | | || ||______|/ __|| | | |/ __|| __| / _ \| '_ ` _ \ +| | | |_| || (_) || |_| || | \__ \| |_| |\__ \| |_ | __/| | | | | | +|_| \__,_| \___/ \__, ||_| |___/ \__, ||___/ \__| \___||_| |_| |_| + __/ | __/ | + |___/ |___/ \ No newline at end of file diff --git a/securitycontrol-model/securitycontrol-Interface/src/main/resources/bootstrap.yml b/securitycontrol-model/securitycontrol-Interface/src/main/resources/bootstrap.yml new file mode 100644 index 0000000..ed56487 --- /dev/null +++ b/securitycontrol-model/securitycontrol-Interface/src/main/resources/bootstrap.yml @@ -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 + + diff --git a/securitycontrol-model/securitycontrol-Interface/src/main/resources/logback.xml b/securitycontrol-model/securitycontrol-Interface/src/main/resources/logback.xml new file mode 100644 index 0000000..e0b6a82 --- /dev/null +++ b/securitycontrol-model/securitycontrol-Interface/src/main/resources/logback.xml @@ -0,0 +1,84 @@ + + + + + + + + + + + %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) + + + debug + + + + + + ${log.path}/info.log + + + + ${log.path}/info.%d{yyyy-MM-dd}.log + + 60 + + + ${log.pattern} + + + + INFO + + ACCEPT + + DENY + + + + + ${log.path}/error.log + + + + ${log.path}/error.%d{yyyy-MM-dd}.log + + 60 + + + ${log.pattern} + + + + ERROR + + ACCEPT + + DENY + + + + + + 127.0.0.1:9601 + + + + + + + + + + + + + + + + + + + diff --git a/securitycontrol-model/securitycontrol-Interface/src/main/resources/mapper/BdMapper.xml b/securitycontrol-model/securitycontrol-Interface/src/main/resources/mapper/BdMapper.xml new file mode 100644 index 0000000..ae6502b --- /dev/null +++ b/securitycontrol-model/securitycontrol-Interface/src/main/resources/mapper/BdMapper.xml @@ -0,0 +1,91 @@ + + + + + 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 into tb_warn (warn_time,warn_content,warn_type,bd_device,db_id,bid_code) + value (#{eventTime},#{eventDesc},#{eventCode},#{deviceId},#{gatewayId},#{bidCode}) + + + update tb_pro_bd set bid_code=#{bidNo},bind_time=now() where bd_code=#{gatewayId} ; + + + update tb_bd_device set del_flag=1 where device_id=#{deviceId} and bd_id=#{gatewayId} + + + update tb_bd_device set status=#{state} where device_id=#{deviceId} and bd_id=#{gatewayId} + + + + + + + + + + + \ No newline at end of file diff --git a/securitycontrol-model/securitycontrol-background/src/main/java/com/securitycontrol/background/VscBackgroundApplication.java b/securitycontrol-model/securitycontrol-background/src/main/java/com/securitycontrol/background/VscBackgroundApplication.java index 1ff062b..2247006 100644 --- a/securitycontrol-model/securitycontrol-background/src/main/java/com/securitycontrol/background/VscBackgroundApplication.java +++ b/securitycontrol-model/securitycontrol-background/src/main/java/com/securitycontrol/background/VscBackgroundApplication.java @@ -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) { diff --git a/securitycontrol-model/securitycontrol-background/src/main/java/com/securitycontrol/background/controller/SourceFileController.java b/securitycontrol-model/securitycontrol-background/src/main/java/com/securitycontrol/background/controller/SourceFileController.java index 69e0805..26816ce 100644 --- a/securitycontrol-model/securitycontrol-background/src/main/java/com/securitycontrol/background/controller/SourceFileController.java +++ b/securitycontrol-model/securitycontrol-background/src/main/java/com/securitycontrol/background/controller/SourceFileController.java @@ -26,8 +26,6 @@ public class SourceFileController { public Result> getSourceList(@RequestParam(value = "sourceId") String sourceId, @RequestParam("sourceType") String sourceType){ List list= service.getTbSourceList(sourceId,sourceType); return Result.ok(list); - - } diff --git a/securitycontrol-model/securitycontrol-files/src/main/java/com/securitycontrol/files/VscFileApplication.java b/securitycontrol-model/securitycontrol-files/src/main/java/com/securitycontrol/files/VscFileApplication.java index 06406d7..2fe54c6 100644 --- a/securitycontrol-model/securitycontrol-files/src/main/java/com/securitycontrol/files/VscFileApplication.java +++ b/securitycontrol-model/securitycontrol-files/src/main/java/com/securitycontrol/files/VscFileApplication.java @@ -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 diff --git a/securitycontrol-model/securitycontrol-files/src/main/java/com/securitycontrol/files/FileUploadController.java b/securitycontrol-model/securitycontrol-files/src/main/java/com/securitycontrol/files/controller/FileUploadController.java similarity index 98% rename from securitycontrol-model/securitycontrol-files/src/main/java/com/securitycontrol/files/FileUploadController.java rename to securitycontrol-model/securitycontrol-files/src/main/java/com/securitycontrol/files/controller/FileUploadController.java index 224a05b..9c85c9c 100644 --- a/securitycontrol-model/securitycontrol-files/src/main/java/com/securitycontrol/files/FileUploadController.java +++ b/securitycontrol-model/securitycontrol-files/src/main/java/com/securitycontrol/files/controller/FileUploadController.java @@ -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; diff --git a/securitycontrol-model/securitycontrol-screen/src/main/java/com/securitycontrol/screen/VscScreenApplication.java b/securitycontrol-model/securitycontrol-screen/src/main/java/com/securitycontrol/screen/VscScreenApplication.java index 9e79bcd..3758ceb 100644 --- a/securitycontrol-model/securitycontrol-screen/src/main/java/com/securitycontrol/screen/VscScreenApplication.java +++ b/securitycontrol-model/securitycontrol-screen/src/main/java/com/securitycontrol/screen/VscScreenApplication.java @@ -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) { diff --git a/securitycontrol-model/securitycontrol-system/src/main/java/com/securitycontrol/system/VscSystemApplication.java b/securitycontrol-model/securitycontrol-system/src/main/java/com/securitycontrol/system/VscSystemApplication.java index 2a636b6..d5627db 100644 --- a/securitycontrol-model/securitycontrol-system/src/main/java/com/securitycontrol/system/VscSystemApplication.java +++ b/securitycontrol-model/securitycontrol-system/src/main/java/com/securitycontrol/system/VscSystemApplication.java @@ -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); From 1feb8ab8bc186ab59d6fa084550e20a813415e2d Mon Sep 17 00:00:00 2001 From: cwchen <1048842385@qq.com> Date: Mon, 1 Apr 2024 19:02:08 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E8=A7=86=E9=A2=91=E7=9B=91=E6=8E=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../entity/screen/vo/DtreeVo.java | 31 ++++++++++++++ .../resources/mapper/HumanManageMapper.xml | 2 +- .../main/resources/mapper/TbAreaMapper.xml | 2 +- .../screen/controller/VideoController.java | 32 ++++++++++++++ .../screen/mapper/IVideoMapper.java | 26 ++++++++++++ .../screen/service/IVideoService.java | 22 ++++++++++ .../screen/service/impl/VideoServiceImpl.java | 42 +++++++++++++++++++ .../src/main/resources/mapper/VideoMapper.xml | 29 +++++++++++++ 8 files changed, 184 insertions(+), 2 deletions(-) create mode 100644 securitycontrol-commons/securitycontrol-commons-entity/src/main/java/com/securitycontrol/entity/screen/vo/DtreeVo.java create mode 100644 securitycontrol-model/securitycontrol-screen/src/main/java/com/securitycontrol/screen/controller/VideoController.java create mode 100644 securitycontrol-model/securitycontrol-screen/src/main/java/com/securitycontrol/screen/mapper/IVideoMapper.java create mode 100644 securitycontrol-model/securitycontrol-screen/src/main/java/com/securitycontrol/screen/service/IVideoService.java create mode 100644 securitycontrol-model/securitycontrol-screen/src/main/java/com/securitycontrol/screen/service/impl/VideoServiceImpl.java create mode 100644 securitycontrol-model/securitycontrol-screen/src/main/resources/mapper/VideoMapper.xml diff --git a/securitycontrol-commons/securitycontrol-commons-entity/src/main/java/com/securitycontrol/entity/screen/vo/DtreeVo.java b/securitycontrol-commons/securitycontrol-commons-entity/src/main/java/com/securitycontrol/entity/screen/vo/DtreeVo.java new file mode 100644 index 0000000..acc02ee --- /dev/null +++ b/securitycontrol-commons/securitycontrol-commons-entity/src/main/java/com/securitycontrol/entity/screen/vo/DtreeVo.java @@ -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; +} diff --git a/securitycontrol-model/securitycontrol-background/src/main/resources/mapper/HumanManageMapper.xml b/securitycontrol-model/securitycontrol-background/src/main/resources/mapper/HumanManageMapper.xml index 00ea681..1df08c1 100644 --- a/securitycontrol-model/securitycontrol-background/src/main/resources/mapper/HumanManageMapper.xml +++ b/securitycontrol-model/securitycontrol-background/src/main/resources/mapper/HumanManageMapper.xml @@ -138,7 +138,7 @@ + (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 + + AND INSTR(td.device_name,#{param}) > 0 + + + AND INSTR(tcm.bid_code,#{bidCode}) > 0 + + + AND tcm.bid_code = '-1' + + ) + + \ No newline at end of file From abd1b40a09f936f72f245e64549e8610660d9dde Mon Sep 17 00:00:00 2001 From: cwchen <1048842385@qq.com> Date: Mon, 1 Apr 2024 19:16:45 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E5=B7=A5=E7=A8=8B=E6=88=90=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../entity/background/vo/ProjectCostVo.java | 23 +++++++++++++ .../background/mapper/IAppMapper.java | 14 +++++++- .../service/impl/AppServiceImpl.java | 33 +++---------------- .../src/main/resources/mapper/AppMapper.xml | 7 ++++ 4 files changed, 48 insertions(+), 29 deletions(-) create mode 100644 securitycontrol-commons/securitycontrol-commons-entity/src/main/java/com/securitycontrol/entity/background/vo/ProjectCostVo.java diff --git a/securitycontrol-commons/securitycontrol-commons-entity/src/main/java/com/securitycontrol/entity/background/vo/ProjectCostVo.java b/securitycontrol-commons/securitycontrol-commons-entity/src/main/java/com/securitycontrol/entity/background/vo/ProjectCostVo.java new file mode 100644 index 0000000..47c6498 --- /dev/null +++ b/securitycontrol-commons/securitycontrol-commons-entity/src/main/java/com/securitycontrol/entity/background/vo/ProjectCostVo.java @@ -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; +} diff --git a/securitycontrol-model/securitycontrol-background/src/main/java/com/securitycontrol/background/mapper/IAppMapper.java b/securitycontrol-model/securitycontrol-background/src/main/java/com/securitycontrol/background/mapper/IAppMapper.java index 35a3357..6a56cd4 100644 --- a/securitycontrol-model/securitycontrol-background/src/main/java/com/securitycontrol/background/mapper/IAppMapper.java +++ b/securitycontrol-model/securitycontrol-background/src/main/java/com/securitycontrol/background/mapper/IAppMapper.java @@ -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 + * @description + * @author cwchen + * @date 2024/4/1 19:12 + */ + List getProCost(ParamDto dto); } diff --git a/securitycontrol-model/securitycontrol-background/src/main/java/com/securitycontrol/background/service/impl/AppServiceImpl.java b/securitycontrol-model/securitycontrol-background/src/main/java/com/securitycontrol/background/service/impl/AppServiceImpl.java index 72a31a6..842448d 100644 --- a/securitycontrol-model/securitycontrol-background/src/main/java/com/securitycontrol/background/service/impl/AppServiceImpl.java +++ b/securitycontrol-model/securitycontrol-background/src/main/java/com/securitycontrol/background/service/impl/AppServiceImpl.java @@ -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> proGxPlanList = new ArrayList<>(); + List 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 getProCostData(){ - Map dataMap = new HashMap<>(16); - dataMap.put("planCost","1200.0"); - dataMap.put("expenditureCost","523.4"); - dataMap.put("residueCost","676.6"); - List> proCostList = new ArrayList<>(); - for (int i = 0; i < Constant.CELL_3; i++) { - Map 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; - } } diff --git a/securitycontrol-model/securitycontrol-background/src/main/resources/mapper/AppMapper.xml b/securitycontrol-model/securitycontrol-background/src/main/resources/mapper/AppMapper.xml index 8c9efc5..64682b0 100644 --- a/securitycontrol-model/securitycontrol-background/src/main/resources/mapper/AppMapper.xml +++ b/securitycontrol-model/securitycontrol-background/src/main/resources/mapper/AppMapper.xml @@ -117,4 +117,11 @@ WHERE sd.dict_code = '400' AND sd2.dict_code = #{gxId} AND sd.del_flag = 0 + + \ No newline at end of file From e20624afe36e9f53cb29ea7c0243dbe738ab7cba Mon Sep 17 00:00:00 2001 From: sliang <1589399930@qq.com> Date: Mon, 1 Apr 2024 19:45:19 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=E5=A4=A7=E5=B1=8F-=E5=87=BA=E5=85=A5?= =?UTF-8?q?=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../entity/background/vo/TowerRecordVo.java | 2 +- .../entity/screen/dto/AccessMgeDto.java | 38 ++++ .../entity/screen/vo/AccessMgeVo.java | 62 ++++++ .../entity/screen/vo/AccessMgesVo.java | 57 +++++ .../controller/AccessMgeController.java | 196 ++++++++++++++++++ .../controller/TowerAssInspectController.java | 4 +- .../screen/mapper/AccessMgeMapper.java | 57 +++++ .../screen/mapper/AlarmMgeMapper.java | 6 + .../screen/mapper/TowerAssInspectMapper.java | 25 +++ .../screen/service/AccessMgeService.java | 56 +++++ .../screen/service/AlarmMgeService.java | 6 + .../service/TowerAssInspectService.java | 25 +++ .../service/impl/AccessMgeServiceImpl.java | 90 ++++++++ .../service/impl/AlarmMgeServiceImpl.java | 1 + .../main/resources/mapper/AccessMgeMapper.xml | 135 ++++++++++++ .../resources/mapper/base/SelectMapper.xml | 2 +- 16 files changed, 758 insertions(+), 4 deletions(-) create mode 100644 securitycontrol-commons/securitycontrol-commons-entity/src/main/java/com/securitycontrol/entity/screen/dto/AccessMgeDto.java create mode 100644 securitycontrol-commons/securitycontrol-commons-entity/src/main/java/com/securitycontrol/entity/screen/vo/AccessMgeVo.java create mode 100644 securitycontrol-commons/securitycontrol-commons-entity/src/main/java/com/securitycontrol/entity/screen/vo/AccessMgesVo.java create mode 100644 securitycontrol-model/securitycontrol-screen/src/main/java/com/securitycontrol/screen/controller/AccessMgeController.java create mode 100644 securitycontrol-model/securitycontrol-screen/src/main/java/com/securitycontrol/screen/mapper/AccessMgeMapper.java create mode 100644 securitycontrol-model/securitycontrol-screen/src/main/java/com/securitycontrol/screen/service/AccessMgeService.java create mode 100644 securitycontrol-model/securitycontrol-screen/src/main/java/com/securitycontrol/screen/service/impl/AccessMgeServiceImpl.java create mode 100644 securitycontrol-model/securitycontrol-screen/src/main/resources/mapper/AccessMgeMapper.xml diff --git a/securitycontrol-commons/securitycontrol-commons-entity/src/main/java/com/securitycontrol/entity/background/vo/TowerRecordVo.java b/securitycontrol-commons/securitycontrol-commons-entity/src/main/java/com/securitycontrol/entity/background/vo/TowerRecordVo.java index aa9f5e4..0b498b2 100644 --- a/securitycontrol-commons/securitycontrol-commons-entity/src/main/java/com/securitycontrol/entity/background/vo/TowerRecordVo.java +++ b/securitycontrol-commons/securitycontrol-commons-entity/src/main/java/com/securitycontrol/entity/background/vo/TowerRecordVo.java @@ -4,7 +4,7 @@ import io.swagger.annotations.ApiModelProperty; import lombok.Data; /** - * + * @author lsun */ @Data public class TowerRecordVo { diff --git a/securitycontrol-commons/securitycontrol-commons-entity/src/main/java/com/securitycontrol/entity/screen/dto/AccessMgeDto.java b/securitycontrol-commons/securitycontrol-commons-entity/src/main/java/com/securitycontrol/entity/screen/dto/AccessMgeDto.java new file mode 100644 index 0000000..c32e950 --- /dev/null +++ b/securitycontrol-commons/securitycontrol-commons-entity/src/main/java/com/securitycontrol/entity/screen/dto/AccessMgeDto.java @@ -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; +} diff --git a/securitycontrol-commons/securitycontrol-commons-entity/src/main/java/com/securitycontrol/entity/screen/vo/AccessMgeVo.java b/securitycontrol-commons/securitycontrol-commons-entity/src/main/java/com/securitycontrol/entity/screen/vo/AccessMgeVo.java new file mode 100644 index 0000000..d77176c --- /dev/null +++ b/securitycontrol-commons/securitycontrol-commons-entity/src/main/java/com/securitycontrol/entity/screen/vo/AccessMgeVo.java @@ -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; +} diff --git a/securitycontrol-commons/securitycontrol-commons-entity/src/main/java/com/securitycontrol/entity/screen/vo/AccessMgesVo.java b/securitycontrol-commons/securitycontrol-commons-entity/src/main/java/com/securitycontrol/entity/screen/vo/AccessMgesVo.java new file mode 100644 index 0000000..a17eb6c --- /dev/null +++ b/securitycontrol-commons/securitycontrol-commons-entity/src/main/java/com/securitycontrol/entity/screen/vo/AccessMgesVo.java @@ -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; +} diff --git a/securitycontrol-model/securitycontrol-screen/src/main/java/com/securitycontrol/screen/controller/AccessMgeController.java b/securitycontrol-model/securitycontrol-screen/src/main/java/com/securitycontrol/screen/controller/AccessMgeController.java new file mode 100644 index 0000000..72c6de2 --- /dev/null +++ b/securitycontrol-model/securitycontrol-screen/src/main/java/com/securitycontrol/screen/controller/AccessMgeController.java @@ -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 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 proExportVoList = new ArrayList<>(); + if(StringHelper.isNotEmpty(dto.getDate())){ + String[] date = dto.getDate().split("~"); + dto.setStartDate(date[0]); + dto.setEndDate(date[1]); + } + List 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 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 proExportVoList = new ArrayList<>(); + if(StringHelper.isNotEmpty(dto.getDate())){ + String[] date = dto.getDate().split("~"); + dto.setStartDate(date[0]); + dto.setEndDate(date[1]); + } + List 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); + } + } + +} diff --git a/securitycontrol-model/securitycontrol-screen/src/main/java/com/securitycontrol/screen/controller/TowerAssInspectController.java b/securitycontrol-model/securitycontrol-screen/src/main/java/com/securitycontrol/screen/controller/TowerAssInspectController.java index 7463680..b393dbe 100644 --- a/securitycontrol-model/securitycontrol-screen/src/main/java/com/securitycontrol/screen/controller/TowerAssInspectController.java +++ b/securitycontrol-model/securitycontrol-screen/src/main/java/com/securitycontrol/screen/controller/TowerAssInspectController.java @@ -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); diff --git a/securitycontrol-model/securitycontrol-screen/src/main/java/com/securitycontrol/screen/mapper/AccessMgeMapper.java b/securitycontrol-model/securitycontrol-screen/src/main/java/com/securitycontrol/screen/mapper/AccessMgeMapper.java new file mode 100644 index 0000000..a4ed999 --- /dev/null +++ b/securitycontrol-model/securitycontrol-screen/src/main/java/com/securitycontrol/screen/mapper/AccessMgeMapper.java @@ -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 getVehicleStatistics(AccessMgeDto dto); + + /** + * 今日、当月车辆出入场统计图片 + * @param dto + * @return + */ + List getVehicleStatisticsPhoto(AccessMgeDto dto); + + /** + * 今日、当月车辆出入场统计列表 + * @param dto + * @return + */ + List getVehicleStatisticsList(AccessMgeDto dto); + + /** + * 今日、当月人员出入场统计 + * @param dto + * @return + */ + List getPerStatistics(AccessMgeDto dto); + + /** + * 今日、当月人员出入场统计图片 + * @param dto + * @return + */ + List getPerStatisticsPhoto(AccessMgeDto dto); + + /** + * 今日、当月人员出入场统计列表 + * @param dto + * @return + */ + List getPerStatisticsList(AccessMgeDto dto); +} diff --git a/securitycontrol-model/securitycontrol-screen/src/main/java/com/securitycontrol/screen/mapper/AlarmMgeMapper.java b/securitycontrol-model/securitycontrol-screen/src/main/java/com/securitycontrol/screen/mapper/AlarmMgeMapper.java index 92cd489..e26136a 100644 --- a/securitycontrol-model/securitycontrol-screen/src/main/java/com/securitycontrol/screen/mapper/AlarmMgeMapper.java +++ b/securitycontrol-model/securitycontrol-screen/src/main/java/com/securitycontrol/screen/mapper/AlarmMgeMapper.java @@ -10,9 +10,15 @@ import java.util.List; /** * 告警管理 + * @author lsun */ @Repository(value = "AlarmMgeMapper") public interface AlarmMgeMapper { + /** + * 告警管理-列表 + * @param dto + * @return + */ List getAlarmMgeList(AlarmMgeDto dto); } diff --git a/securitycontrol-model/securitycontrol-screen/src/main/java/com/securitycontrol/screen/mapper/TowerAssInspectMapper.java b/securitycontrol-model/securitycontrol-screen/src/main/java/com/securitycontrol/screen/mapper/TowerAssInspectMapper.java index dfbcaaa..3a315e1 100644 --- a/securitycontrol-model/securitycontrol-screen/src/main/java/com/securitycontrol/screen/mapper/TowerAssInspectMapper.java +++ b/securitycontrol-model/securitycontrol-screen/src/main/java/com/securitycontrol/screen/mapper/TowerAssInspectMapper.java @@ -12,13 +12,38 @@ import java.util.List; */ @Repository(value = "TowerAssInspectMapper") public interface TowerAssInspectMapper { + /** + * 设备列表 + * @param dto + * @return + */ List getDeviceList(TowerAssInspectDto dto); + /** + * 实时检测 + * @param dto + * @return + */ List getRealTimeDetection(TowerAssInspectDto dto); + /** + * 当日检测变化趋势 + * @param dto + * @return + */ List getTrend(TowerAssInspectDto dto); + /** + * 实时告警 + * @param dto + * @return + */ List getRealTimeAlarmList(TowerAssInspectDto dto); + /** + * 历史记录 + * @param dto + * @return + */ List getHistoryList(TowerAssInspectDto dto); } diff --git a/securitycontrol-model/securitycontrol-screen/src/main/java/com/securitycontrol/screen/service/AccessMgeService.java b/securitycontrol-model/securitycontrol-screen/src/main/java/com/securitycontrol/screen/service/AccessMgeService.java new file mode 100644 index 0000000..df639bc --- /dev/null +++ b/securitycontrol-model/securitycontrol-screen/src/main/java/com/securitycontrol/screen/service/AccessMgeService.java @@ -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 getVehicleStatisticsList(AccessMgeDto dto); + + /** + * 今日、当月人员出入场统计 + * @param dto + * @return + */ + AjaxResult getPerStatistics(AccessMgeDto dto); + + /** + * 今日、当月人员出入场统计图片 + * @param dto + * @return + */ + AjaxResult getPerStatisticsPhoto(AccessMgeDto dto); + + /** + * 今日、当月人员出入场统计图片列表 + * @param dto + * @return + */ + List getPerStatisticsList(AccessMgeDto dto); +} diff --git a/securitycontrol-model/securitycontrol-screen/src/main/java/com/securitycontrol/screen/service/AlarmMgeService.java b/securitycontrol-model/securitycontrol-screen/src/main/java/com/securitycontrol/screen/service/AlarmMgeService.java index 2e5ff95..3c0d685 100644 --- a/securitycontrol-model/securitycontrol-screen/src/main/java/com/securitycontrol/screen/service/AlarmMgeService.java +++ b/securitycontrol-model/securitycontrol-screen/src/main/java/com/securitycontrol/screen/service/AlarmMgeService.java @@ -9,7 +9,13 @@ import java.util.List; /** * 告警管理 + * @author lsun */ public interface AlarmMgeService { + /** + * 告警管理 -列表 + * @param dto + * @return + */ List getAlarmMgeList(AlarmMgeDto dto); } diff --git a/securitycontrol-model/securitycontrol-screen/src/main/java/com/securitycontrol/screen/service/TowerAssInspectService.java b/securitycontrol-model/securitycontrol-screen/src/main/java/com/securitycontrol/screen/service/TowerAssInspectService.java index fea19c2..e5a4760 100644 --- a/securitycontrol-model/securitycontrol-screen/src/main/java/com/securitycontrol/screen/service/TowerAssInspectService.java +++ b/securitycontrol-model/securitycontrol-screen/src/main/java/com/securitycontrol/screen/service/TowerAssInspectService.java @@ -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 getRealTimeAlarmList(TowerAssInspectDto dto); + /** + * 组塔检测-历史记录 + * @param dto + * @return + */ List getHistoryList(TowerAssInspectDto dto); } diff --git a/securitycontrol-model/securitycontrol-screen/src/main/java/com/securitycontrol/screen/service/impl/AccessMgeServiceImpl.java b/securitycontrol-model/securitycontrol-screen/src/main/java/com/securitycontrol/screen/service/impl/AccessMgeServiceImpl.java new file mode 100644 index 0000000..6f47338 --- /dev/null +++ b/securitycontrol-model/securitycontrol-screen/src/main/java/com/securitycontrol/screen/service/impl/AccessMgeServiceImpl.java @@ -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 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 list = new ArrayList<>(); + try { + list = mapper.getVehicleStatisticsPhoto(dto); + } catch (Exception e) { + log.error("今日、当月车辆出入场统计图片-查询失败", e); + } + return AjaxResult.success(list); + } + + @Override + public List getVehicleStatisticsList(AccessMgeDto dto) { + List list = new ArrayList<>(); + try { + list = mapper.getVehicleStatisticsList(dto); + } catch (Exception e) { + log.error("获取今日、当月车辆出入场统计列表",e); + } + return list; + } + + @Override + public AjaxResult getPerStatistics(AccessMgeDto dto) { + List 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 list = new ArrayList<>(); + try { + list = mapper.getPerStatisticsPhoto(dto); + } catch (Exception e) { + log.error("今日、当月人员出入场统计图片-查询失败", e); + } + return AjaxResult.success(list); + } + + @Override + public List getPerStatisticsList(AccessMgeDto dto) { + List list = new ArrayList<>(); + try { + list = mapper.getPerStatisticsList(dto); + } catch (Exception e) { + log.error("获取今日、当月人员出入场统计列表",e); + } + return list; + } +} diff --git a/securitycontrol-model/securitycontrol-screen/src/main/java/com/securitycontrol/screen/service/impl/AlarmMgeServiceImpl.java b/securitycontrol-model/securitycontrol-screen/src/main/java/com/securitycontrol/screen/service/impl/AlarmMgeServiceImpl.java index 5edcda8..5445295 100644 --- a/securitycontrol-model/securitycontrol-screen/src/main/java/com/securitycontrol/screen/service/impl/AlarmMgeServiceImpl.java +++ b/securitycontrol-model/securitycontrol-screen/src/main/java/com/securitycontrol/screen/service/impl/AlarmMgeServiceImpl.java @@ -20,6 +20,7 @@ import java.util.concurrent.Future; /** * 告警管理 + * @author lsun */ @Slf4j @Service(value = "AlarmMgeService") diff --git a/securitycontrol-model/securitycontrol-screen/src/main/resources/mapper/AccessMgeMapper.xml b/securitycontrol-model/securitycontrol-screen/src/main/resources/mapper/AccessMgeMapper.xml new file mode 100644 index 0000000..5e1d6c0 --- /dev/null +++ b/securitycontrol-model/securitycontrol-screen/src/main/resources/mapper/AccessMgeMapper.xml @@ -0,0 +1,135 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/securitycontrol-model/securitycontrol-system/src/main/resources/mapper/base/SelectMapper.xml b/securitycontrol-model/securitycontrol-system/src/main/resources/mapper/base/SelectMapper.xml index c0988ee..0990765 100644 --- a/securitycontrol-model/securitycontrol-system/src/main/resources/mapper/base/SelectMapper.xml +++ b/securitycontrol-model/securitycontrol-system/src/main/resources/mapper/base/SelectMapper.xml @@ -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 From ac83369cdb8575b407f2437b2eabcd19af3ff30e Mon Sep 17 00:00:00 2001 From: sliang <1589399930@qq.com> Date: Mon, 1 Apr 2024 19:46:22 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=A7=84=E8=8C=83?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../background/mapper/EarlyWarningsRecordMapper.java | 4 ++++ .../background/service/EarlyWarningsRecordService.java | 5 +++++ .../src/main/resources/mapper/DeviceBdMapper.xml | 2 +- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/securitycontrol-model/securitycontrol-background/src/main/java/com/securitycontrol/background/mapper/EarlyWarningsRecordMapper.java b/securitycontrol-model/securitycontrol-background/src/main/java/com/securitycontrol/background/mapper/EarlyWarningsRecordMapper.java index 77a1638..22191df 100644 --- a/securitycontrol-model/securitycontrol-background/src/main/java/com/securitycontrol/background/mapper/EarlyWarningsRecordMapper.java +++ b/securitycontrol-model/securitycontrol-background/src/main/java/com/securitycontrol/background/mapper/EarlyWarningsRecordMapper.java @@ -19,5 +19,9 @@ public interface EarlyWarningsRecordMapper { */ List getEarlyWarningsRecordLists(EarlyWarningsRecordVo dto); + /** + * 修改 + * @param vo + */ void updEarly(EarlyWarningsRecordVo vo); } diff --git a/securitycontrol-model/securitycontrol-background/src/main/java/com/securitycontrol/background/service/EarlyWarningsRecordService.java b/securitycontrol-model/securitycontrol-background/src/main/java/com/securitycontrol/background/service/EarlyWarningsRecordService.java index 413d6bb..ff3a606 100644 --- a/securitycontrol-model/securitycontrol-background/src/main/java/com/securitycontrol/background/service/EarlyWarningsRecordService.java +++ b/securitycontrol-model/securitycontrol-background/src/main/java/com/securitycontrol/background/service/EarlyWarningsRecordService.java @@ -19,5 +19,10 @@ public interface EarlyWarningsRecordService { */ List getEarlyWarningRecordLists(EarlyWarningsRecordVo dto); + /** + * 修改 + * @param vo + * @return + */ AjaxResult updEarly(EarlyWarningsRecordVo vo); } diff --git a/securitycontrol-model/securitycontrol-background/src/main/resources/mapper/DeviceBdMapper.xml b/securitycontrol-model/securitycontrol-background/src/main/resources/mapper/DeviceBdMapper.xml index 1e3f67c..59c902b 100644 --- a/securitycontrol-model/securitycontrol-background/src/main/resources/mapper/DeviceBdMapper.xml +++ b/securitycontrol-model/securitycontrol-background/src/main/resources/mapper/DeviceBdMapper.xml @@ -3,7 +3,7 @@ - + 当月 INSERT INTO tb_pro_bd id, From 18e6cf813ea9b8806d7f2ea709d0795215df49fe Mon Sep 17 00:00:00 2001 From: cwchen <1048842385@qq.com> Date: Tue, 2 Apr 2024 09:10:59 +0800 Subject: [PATCH 6/6] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../entity/background/vo/ProjectVo.java | 32 +++++++++++++++ .../controller/HumanManageController.java | 4 +- .../controller/SignProController.java | 41 +++++++++++++++++++ .../background/mapper/ISignProMapper.java | 28 +++++++++++++ .../background/service/ISignProService.java | 24 +++++++++++ .../service/impl/SignProServiceImpl.java | 38 +++++++++++++++++ .../main/resources/mapper/DeviceMapper.xml | 2 +- .../main/resources/mapper/SignProMapper.xml | 9 ++++ 8 files changed, 175 insertions(+), 3 deletions(-) create mode 100644 securitycontrol-commons/securitycontrol-commons-entity/src/main/java/com/securitycontrol/entity/background/vo/ProjectVo.java create mode 100644 securitycontrol-model/securitycontrol-background/src/main/java/com/securitycontrol/background/controller/SignProController.java create mode 100644 securitycontrol-model/securitycontrol-background/src/main/java/com/securitycontrol/background/mapper/ISignProMapper.java create mode 100644 securitycontrol-model/securitycontrol-background/src/main/java/com/securitycontrol/background/service/ISignProService.java create mode 100644 securitycontrol-model/securitycontrol-background/src/main/java/com/securitycontrol/background/service/impl/SignProServiceImpl.java create mode 100644 securitycontrol-model/securitycontrol-background/src/main/resources/mapper/SignProMapper.xml diff --git a/securitycontrol-commons/securitycontrol-commons-entity/src/main/java/com/securitycontrol/entity/background/vo/ProjectVo.java b/securitycontrol-commons/securitycontrol-commons-entity/src/main/java/com/securitycontrol/entity/background/vo/ProjectVo.java new file mode 100644 index 0000000..3b46775 --- /dev/null +++ b/securitycontrol-commons/securitycontrol-commons-entity/src/main/java/com/securitycontrol/entity/background/vo/ProjectVo.java @@ -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; +} diff --git a/securitycontrol-model/securitycontrol-background/src/main/java/com/securitycontrol/background/controller/HumanManageController.java b/securitycontrol-model/securitycontrol-background/src/main/java/com/securitycontrol/background/controller/HumanManageController.java index 2df5ea9..9f51b70 100644 --- a/securitycontrol-model/securitycontrol-background/src/main/java/com/securitycontrol/background/controller/HumanManageController.java +++ b/securitycontrol-model/securitycontrol-background/src/main/java/com/securitycontrol/background/controller/HumanManageController.java @@ -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); } diff --git a/securitycontrol-model/securitycontrol-background/src/main/java/com/securitycontrol/background/controller/SignProController.java b/securitycontrol-model/securitycontrol-background/src/main/java/com/securitycontrol/background/controller/SignProController.java new file mode 100644 index 0000000..270772b --- /dev/null +++ b/securitycontrol-model/securitycontrol-background/src/main/java/com/securitycontrol/background/controller/SignProController.java @@ -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 list = new ArrayList<>(); + list = service.getProLists(dto); + return getDataTable(list); + } +} diff --git a/securitycontrol-model/securitycontrol-background/src/main/java/com/securitycontrol/background/mapper/ISignProMapper.java b/securitycontrol-model/securitycontrol-background/src/main/java/com/securitycontrol/background/mapper/ISignProMapper.java new file mode 100644 index 0000000..9d7bd6f --- /dev/null +++ b/securitycontrol-model/securitycontrol-background/src/main/java/com/securitycontrol/background/mapper/ISignProMapper.java @@ -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 + * @description + * @author cwchen + * @date 2024/4/1 20:02 + */ + List getProLists(ParamDto dto); +} diff --git a/securitycontrol-model/securitycontrol-background/src/main/java/com/securitycontrol/background/service/ISignProService.java b/securitycontrol-model/securitycontrol-background/src/main/java/com/securitycontrol/background/service/ISignProService.java new file mode 100644 index 0000000..07dc326 --- /dev/null +++ b/securitycontrol-model/securitycontrol-background/src/main/java/com/securitycontrol/background/service/ISignProService.java @@ -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 + * @description + * @author cwchen + * @date 2024/4/1 19:59 + */ + List getProLists(ParamDto dto); +} diff --git a/securitycontrol-model/securitycontrol-background/src/main/java/com/securitycontrol/background/service/impl/SignProServiceImpl.java b/securitycontrol-model/securitycontrol-background/src/main/java/com/securitycontrol/background/service/impl/SignProServiceImpl.java new file mode 100644 index 0000000..362ab66 --- /dev/null +++ b/securitycontrol-model/securitycontrol-background/src/main/java/com/securitycontrol/background/service/impl/SignProServiceImpl.java @@ -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 getProLists(ParamDto dto) { + List list = new ArrayList<>(); + try { + list = mapper.getProLists(dto); + } catch (Exception e) { + log.error("工程列表"); + } + return list; + } +} diff --git a/securitycontrol-model/securitycontrol-background/src/main/resources/mapper/DeviceMapper.xml b/securitycontrol-model/securitycontrol-background/src/main/resources/mapper/DeviceMapper.xml index f79b4dd..cc66064 100644 --- a/securitycontrol-model/securitycontrol-background/src/main/resources/mapper/DeviceMapper.xml +++ b/securitycontrol-model/securitycontrol-background/src/main/resources/mapper/DeviceMapper.xml @@ -88,7 +88,7 @@ diff --git a/securitycontrol-model/securitycontrol-background/src/main/resources/mapper/SignProMapper.xml b/securitycontrol-model/securitycontrol-background/src/main/resources/mapper/SignProMapper.xml new file mode 100644 index 0000000..76b1b65 --- /dev/null +++ b/securitycontrol-model/securitycontrol-background/src/main/resources/mapper/SignProMapper.xml @@ -0,0 +1,9 @@ + + + + + + + \ No newline at end of file