diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcZcdwpmController.java b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcZcdwpmController.java new file mode 100644 index 00000000..c4a517f0 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcZcdwpmController.java @@ -0,0 +1,109 @@ +package com.ruoyi.tcZz.controller; + +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.common.core.page.TableDataInfo; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.tcZz.domain.TcZcdwpm; +import com.ruoyi.tcZz.service.ITcZcdwpmService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; + +/** + * 众测单位排名(tc_zcdwpm)表控制层 + * @author du + * @since 2024/8/5 13:16 + */ +@RestController +@Api(tags = "众测单位排名") +@RequestMapping("/tcZz/networkSecurity/zcdwpm") +public class TcZcdwpmController extends BaseController { + + @Autowired + private ITcZcdwpmService tcZcdwpmService; + + /** + * 查询众测单位排名列表 + */ + @ApiOperation(value = "查询众测单位排名列表", response = TcZcdwpm.class) + @GetMapping("/list") + public TableDataInfo list(TcZcdwpm tc) { + startPage(); + List list = tcZcdwpmService.page(tc); + return getDataTable(list); + } + + /** + * 导出众测单位排名列表 + */ + @ApiOperation(value = " 导出众测单位排名列表") + @PostMapping("/export") + public void export(HttpServletResponse response, TcZcdwpm tc) { + List list = tcZcdwpmService.page(tc); + ExcelUtil util = new ExcelUtil<>(TcZcdwpm.class); + util.exportExcel(response, list, "众测单位排名详情数据"); + } + + /** + * 获取众测单位排名信息 + */ + @ApiOperation(value = " 获取众测单位排名信息") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) { + return success(tcZcdwpmService.getById(id)); + } + + /** + * 新增众测单位排名 + */ + @ApiOperation(value = "新增众测单位排名") + @PostMapping + public AjaxResult add(@RequestBody TcZcdwpm tc) { + return toAjax(tcZcdwpmService.insert(tc)); + } + + /** + * 修改众测单位排名 + */ + @ApiOperation(value = "修改众测单位排名") + @PutMapping + public AjaxResult edit(@RequestBody TcZcdwpm tc) { + return toAjax(tcZcdwpmService.update(tc)); + } + + /** + * 删除众测单位排名 + */ + @ApiOperation(value = "删除众测单位排名") + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) { + return toAjax(tcZcdwpmService.deleteByIds(ids)); + } + + + /** + * 导入 + */ + @ApiOperation("通用导入excel信息") + @PostMapping("/common/importExcel") + public AjaxResult importExcel(MultipartFile file) throws Exception { + ExcelUtil util = new ExcelUtil<>(TcZcdwpm.class); + List tcZbxqList = util.importExcel(file.getInputStream()); + tcZcdwpmService.importUser(tcZbxqList); + return AjaxResult.success(); + } + + + @ApiOperation("通用下载excel模板") + @PostMapping("/importTemplate") + public void importTemplate(HttpServletResponse response) { + ExcelUtil util = new ExcelUtil<>(TcZcdwpm.class); + util.importTemplateExcel(response, "众测单位排名详情"); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcZcldsController.java b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcZcldsController.java new file mode 100644 index 00000000..a7040be9 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcZcldsController.java @@ -0,0 +1,113 @@ +package com.ruoyi.tcZz.controller; + +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.common.core.page.TableDataInfo; +import com.ruoyi.common.exception.ServiceException; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.tcZz.domain.TcZclds; +import com.ruoyi.tcZz.service.ITcZcldsService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; + +/** + * 众测漏洞数(tc_zclds)表控制层 + * @author du + * @since 2024/8/5 13:16 + */ +@RestController +@Api(tags = "众测漏洞数") +@RequestMapping("/tcZz/networkSecurity/zclds") +public class TcZcldsController extends BaseController { + @Autowired + private ITcZcldsService tcZcldsService; + + /** + * 查询众测漏洞数列表 + */ + @ApiOperation(value = "查询众测漏洞数列表", response = TcZclds.class) + @GetMapping("/list") + public TableDataInfo list(TcZclds tc) { + startPage(); + List list = tcZcldsService.page(tc); + return getDataTable(list); + } + + /** + * 导出众测漏洞数列表 + */ + @ApiOperation(value = " 导出众测漏洞数列表") + @PostMapping("/export") + public void export(HttpServletResponse response, TcZclds tc) { + List list = tcZcldsService.page(tc); + ExcelUtil util = new ExcelUtil<>(TcZclds.class); + util.exportExcel(response, list, "众测漏洞数详情数据"); + } + + /** + * 获取众测漏洞数信息 + */ + @ApiOperation(value = " 获取众测漏洞数信息") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) { + return success(tcZcldsService.getById(id)); + } + + /** + * 新增众测漏洞数 + */ + @ApiOperation(value = "新增众测漏洞数") + @PostMapping + public AjaxResult add(@RequestBody TcZclds tc) { + TcZclds t = new TcZclds(); + if(tcZcldsService.page(t).size()>=4){ + throw new ServiceException("无法新增!"); + } + return toAjax(tcZcldsService.insert(tc)); + } + + /** + * 修改众测漏洞数 + */ + @ApiOperation(value = "修改众测漏洞数") + @PutMapping + public AjaxResult edit(@RequestBody TcZclds tc) { + return toAjax(tcZcldsService.update(tc)); + } + + /** + * 删除众测漏洞数 + */ + @ApiOperation(value = "删除众测漏洞数") + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) { + return toAjax(tcZcldsService.deleteByIds(ids)); + } + + + /** + * 导入 + */ + @ApiOperation("通用导入excel信息") + @PostMapping("/common/importExcel") + public AjaxResult importExcel(MultipartFile file) throws Exception { + ExcelUtil util = new ExcelUtil<>(TcZclds.class); + List tcZbxqList = util.importExcel(file.getInputStream()); + tcZcldsService.importUser(tcZbxqList); + return AjaxResult.success(); + } + + + @ApiOperation("通用下载excel模板") + @PostMapping("/importTemplate") + public void importTemplate(HttpServletResponse response) { + ExcelUtil util = new ExcelUtil<>(TcZclds.class); + util.importTemplateExcel(response, "众测漏洞数详情"); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcZczccgController.java b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcZczccgController.java new file mode 100644 index 00000000..15808429 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcZczccgController.java @@ -0,0 +1,118 @@ +package com.ruoyi.tcZz.controller; + +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.common.core.page.TableDataInfo; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.tcZz.domain.TcZczccg; +import com.ruoyi.tcZz.service.ITcZczccgService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; + +/** + * 众测资产成果(tc_zczccg)表控制层 + * @author du + * @since 2024/8/5 13:16 + */ +@RestController +@Api(tags = "众测资产成果") +@RequestMapping("/tcZz/networkSecurity/zczccg") +public class TcZczccgController extends BaseController { + @Autowired + private ITcZczccgService tcZczccgService; + + /** + * 查询众测资产成果列表 + */ + @ApiOperation(value = "查询众测资产成果列表", response = TcZczccg.class) + @GetMapping("/list") + public TableDataInfo list(TcZczccg tc) { + startPage(); + List list = tcZczccgService.page(tc); + return getDataTable(list); + } + + /** + * 大屏查询众测资产成果最新一条 + */ + @ApiOperation(value = "大屏查询众测资产成果最新一条", response = TcZczccg.class) + @GetMapping("/getOne") + public AjaxResult getOne() { + return success(tcZczccgService.getOne()); + } + + /** + * 导出众测资产成果列表 + */ + @ApiOperation(value = " 导出众测资产成果列表") + @PostMapping("/export") + public void export(HttpServletResponse response, TcZczccg tc) { + List list = tcZczccgService.page(tc); + ExcelUtil util = new ExcelUtil<>(TcZczccg.class); + util.exportExcel(response, list, "众测资产成果详情数据"); + } + + /** + * 获取众测资产成果信息 + */ + @ApiOperation(value = " 获取众测资产成果信息") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) { + return success(tcZczccgService.getById(id)); + } + + /** + * 新增众测资产成果 + */ + @ApiOperation(value = "新增众测资产成果") + @PostMapping + public AjaxResult add(@RequestBody TcZczccg tc) { + return toAjax(tcZczccgService.insert(tc)); + } + + /** + * 修改众测资产成果 + */ + @ApiOperation(value = "修改众测资产成果") + @PutMapping + public AjaxResult edit(@RequestBody TcZczccg tc) { + return toAjax(tcZczccgService.update(tc)); + } + + /** + * 删除众测资产成果 + */ + @ApiOperation(value = "删除众测资产成果") + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) { + return toAjax(tcZczccgService.deleteByIds(ids)); + } + + + /** + * 导入 + */ + @ApiOperation("通用导入excel信息") + @PostMapping("/common/importExcel") + public AjaxResult importExcel(MultipartFile file) throws Exception { + ExcelUtil util = new ExcelUtil<>(TcZczccg.class); + List tcZbxqList = util.importExcel(file.getInputStream()); + tcZczccgService.importUser(tcZbxqList); + return AjaxResult.success(); + } + + + @ApiOperation("通用下载excel模板") + @PostMapping("/importTemplate") + public void importTemplate(HttpServletResponse response) { + ExcelUtil util = new ExcelUtil<>(TcZczccg.class); + util.importTemplateExcel(response, "众测资产成果详情"); + } + +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/domain/TcZcdwpm.java b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/domain/TcZcdwpm.java new file mode 100644 index 00000000..4a306452 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/domain/TcZcdwpm.java @@ -0,0 +1,31 @@ +package com.ruoyi.tcZz.domain; + +import com.ruoyi.common.annotation.Excel; +import com.ruoyi.common.core.domain.BaseEntity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * 众测单位排名(tc_zcdwpm)表实体类 + * @author du + * @since 2024/8/5 13:19 + */ +@Data +@ApiModel("众测单位排名") +public class TcZcdwpm extends BaseEntity { + + /** $column.columnComment */ + @ApiModelProperty(value = "id") + private Long id; + + /** 单位名称 */ + @Excel(name = "单位名称") + @ApiModelProperty(value = "单位名称") + private String unitName; + + /** 积分 */ + @Excel(name = "积分") + @ApiModelProperty(value = "积分") + private Integer integral; +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/domain/TcZclds.java b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/domain/TcZclds.java new file mode 100644 index 00000000..c95c42cf --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/domain/TcZclds.java @@ -0,0 +1,33 @@ +package com.ruoyi.tcZz.domain; + +import com.ruoyi.common.annotation.Excel; +import com.ruoyi.common.core.domain.BaseEntity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * 众测漏洞数(tc_zclds)表实体类 + * @author du + * @since 2024/8/5 13:20 + */ +@Data +@ApiModel("众测漏洞数") +public class TcZclds extends BaseEntity { + + /** $column.columnComment */ + @ApiModelProperty(value = "id") + private Long id; + + + + /** 漏洞等级 */ + @Excel(name = "漏洞等级",readConverterExp = "1=低危,2=中危,3=高危,4=紧急",combo = "低危,中危,高危,紧急") + @ApiModelProperty(value = "漏洞数量") + private String ldLevel; + + /** 漏洞数量 */ + @Excel(name = "漏洞数量") + @ApiModelProperty(value = "漏洞数量") + private Integer ldNumber; +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/domain/TcZczccg.java b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/domain/TcZczccg.java new file mode 100644 index 00000000..481a43ce --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/domain/TcZczccg.java @@ -0,0 +1,31 @@ +package com.ruoyi.tcZz.domain; + +import com.ruoyi.common.annotation.Excel; +import com.ruoyi.common.core.domain.BaseEntity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * 众测资产成果统计(tc_zczccg)表实体类 + * @author du + * @since 2024/8/5 13:20 + */ +@Data +@ApiModel("众测资产成果统计") +public class TcZczccg extends BaseEntity { + + /** $column.columnComment */ + @ApiModelProperty(value = "id") + private Long id; + + /** 涉及单位数 */ + @Excel(name = "涉及单位数") + @ApiModelProperty(value = "涉及单位数") + private Integer unitNumber; + + /** 新增资产数 */ + @Excel(name = "新增资产数") + @ApiModelProperty(value = "新增资产数") + private Integer addNumber; +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/mapper/TcZcdwpmMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/mapper/TcZcdwpmMapper.java new file mode 100644 index 00000000..a2f21a6c --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/mapper/TcZcdwpmMapper.java @@ -0,0 +1,62 @@ +package com.ruoyi.tcZz.mapper; + +import com.ruoyi.tcZz.domain.TcZcdwpm; + +import java.util.List; + +/** + * 众测单位排名(tc_zcdwpm)表数据处理层 + * + * @author ruoyi + * @date 2023-10-12 + */ +public interface TcZcdwpmMapper +{ + /** + * 查询众测单位排名 + * + * @param id 众测单位排名主键 + * @return 众测单位排名 + */ + public TcZcdwpm getById(Long id); + + /** + * 查询众测单位排名列表 + * + * @param tcBmtb 众测单位排名 + * @return 众测单位排名集合 + */ + public List page(TcZcdwpm tcBmtb); + + /** + * 新增众测单位排名 + * + * @param tcBmtb 众测单位排名 + * @return 结果 + */ + public int insert(TcZcdwpm tcBmtb); + + /** + * 修改众测单位排名 + * + * @param tcBmtb 众测单位排名 + * @return 结果 + */ + public int update(TcZcdwpm tcBmtb); + + /** + * 删除众测单位排名 + * + * @param id 众测单位排名主键 + * @return 结果 + */ + public int deleteById(Long id); + + /** + * 批量删除众测单位排名 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteByIds(Long[] ids); +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/mapper/TcZcldsMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/mapper/TcZcldsMapper.java new file mode 100644 index 00000000..568b84ab --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/mapper/TcZcldsMapper.java @@ -0,0 +1,62 @@ +package com.ruoyi.tcZz.mapper; + +import com.ruoyi.tcZz.domain.TcZclds; + +import java.util.List; + +/** + * 众测漏洞数(tc_zclds)表数据处理层 + * + * @author ruoyi + * @date 2023-10-12 + */ +public interface TcZcldsMapper +{ + /** + * 查询众测漏洞数排名 + * + * @param id 众测漏洞数排名主键 + * @return 众测漏洞数排名 + */ + public TcZclds getById(Long id); + + /** + * 查询众测漏洞数排名列表 + * + * @param tcBmtb 众测漏洞数排名 + * @return 众测漏洞数排名集合 + */ + public List page(TcZclds tcBmtb); + + /** + * 新增众测漏洞数排名 + * + * @param tcBmtb 众测漏洞数排名 + * @return 结果 + */ + public int insert(TcZclds tcBmtb); + + /** + * 修改众测漏洞数排名 + * + * @param tcBmtb 众测漏洞数排名 + * @return 结果 + */ + public int update(TcZclds tcBmtb); + + /** + * 删除众测漏洞数排名 + * + * @param id 众测漏洞数排名主键 + * @return 结果 + */ + public int deleteById(Long id); + + /** + * 批量删除众测漏洞数排名 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteByIds(Long[] ids); +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/mapper/TcZczccgMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/mapper/TcZczccgMapper.java new file mode 100644 index 00000000..a57083dc --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/mapper/TcZczccgMapper.java @@ -0,0 +1,68 @@ +package com.ruoyi.tcZz.mapper; + +import com.ruoyi.tcZz.domain.TcZclds; +import com.ruoyi.tcZz.domain.TcZczccg; + +import java.util.List; + +/** + * 众测资产成果(tc_zczccg)表数据处理层 + * + * @author ruoyi + * @date 2023-10-12 + */ +public interface TcZczccgMapper +{ + /** + * 查询众测资产成果排名 + * + * @param id 众测资产成果排名主键 + * @return 众测资产成果排名 + */ + public TcZczccg getById(Long id); + + /** + * 查询众测资产成果排名列表 + * + * @param tcBmtb 众测资产成果排名 + * @return 众测资产成果排名集合 + */ + public List page(TcZczccg tcBmtb); + + /** + * 新增众测资产成果排名 + * + * @param tcBmtb 众测资产成果排名 + * @return 结果 + */ + public int insert(TcZczccg tcBmtb); + + /** + * 修改众测资产成果排名 + * + * @param tcBmtb 众测资产成果排名 + * @return 结果 + */ + public int update(TcZczccg tcBmtb); + + /** + * 删除众测资产成果排名 + * + * @param id 众测资产成果排名主键 + * @return 结果 + */ + public int deleteById(Long id); + + /** + * 批量删除众测资产成果排名 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteByIds(Long[] ids); + + /** + * 大屏查询众测资产成果最新一条 + */ + TcZczccg getOne(); +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/ITcZcdwpmService.java b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/ITcZcdwpmService.java new file mode 100644 index 00000000..6e17ba16 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/ITcZcdwpmService.java @@ -0,0 +1,64 @@ +package com.ruoyi.tcZz.service; + +import com.ruoyi.tcZz.domain.TcZcdwpm; + +import java.util.List; + +/** + * 众测单位排名(tc_zcdwpm)表业务层 + * + * @author ruoyi + * @date 2023-10-13 + */ +public interface ITcZcdwpmService +{ + /** + * 查询众测单位排名 + * + * @param id 众测单位排名主键 + * @return 众测单位排名 + */ + TcZcdwpm getById(Long id); + + /** + * 查询众测单位排名列表 + * + * @param tc 众测单位排名 + * @return 众测单位排名集合 + */ + List page(TcZcdwpm tc); + + /** + * 新增众测单位排名 + * + * @param tc 众测单位排名 + * @return 结果 + */ + int insert(TcZcdwpm tc); + + /** + * 修改众测单位排名 + * + * @param tc 众测单位排名 + * @return 结果 + */ + int update(TcZcdwpm tc); + + /** + * 批量删除众测单位排名 + * + * @param ids 需要删除的众测单位排名主键集合 + * @return 结果 + */ + int deleteByIds(Long[] ids); + + /** + * 删除众测单位排名信息 + * + * @param id 众测单位排名主键 + * @return 结果 + */ + int deleteById(Long id); + + String importUser(List tcZbxqList); +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/ITcZcldsService.java b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/ITcZcldsService.java new file mode 100644 index 00000000..ca49c4c7 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/ITcZcldsService.java @@ -0,0 +1,64 @@ +package com.ruoyi.tcZz.service; + +import com.ruoyi.tcZz.domain.TcZclds; + +import java.util.List; + +/** + * 众测漏洞数(tc_zclds)表业务层 + * + * @author ruoyi + * @date 2023-10-13 + */ +public interface ITcZcldsService +{ + /** + * 查询众测漏洞数 + * + * @param id 众测漏洞数主键 + * @return 众测漏洞数 + */ + TcZclds getById(Long id); + + /** + * 查询众测漏洞数列表 + * + * @param tc 众测漏洞数 + * @return 众测漏洞数集合 + */ + List page(TcZclds tc); + + /** + * 新增众测漏洞数 + * + * @param tc 众测漏洞数 + * @return 结果 + */ + int insert(TcZclds tc); + + /** + * 修改众测漏洞数 + * + * @param tc 众测漏洞数 + * @return 结果 + */ + int update(TcZclds tc); + + /** + * 批量删除众测漏洞数 + * + * @param ids 需要删除的众测漏洞数主键集合 + * @return 结果 + */ + int deleteByIds(Long[] ids); + + /** + * 删除众测漏洞数信息 + * + * @param id 众测漏洞数主键 + * @return 结果 + */ + int deleteById(Long id); + + String importUser(List tcZbxqList); +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/ITcZczccgService.java b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/ITcZczccgService.java new file mode 100644 index 00000000..a7e16122 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/ITcZczccgService.java @@ -0,0 +1,68 @@ +package com.ruoyi.tcZz.service; + +import com.ruoyi.tcZz.domain.TcZczccg; + +import java.util.List; + +/** + * 众测资产成果(tc_zczccg)表业务层 + * + * @author ruoyi + * @date 2023-10-13 + */ +public interface ITcZczccgService { + /** + * 查询众测资产成果 + * + * @param id 众测资产成果主键 + * @return 众测资产成果 + */ + TcZczccg getById(Long id); + + /** + * 查询众测资产成果列表 + * + * @param tc 众测资产成果 + * @return 众测资产成果集合 + */ + List page(TcZczccg tc); + + /** + * 新增众测资产成果 + * + * @param tc 众测资产成果 + * @return 结果 + */ + int insert(TcZczccg tc); + + /** + * 修改众测资产成果 + * + * @param tc 众测资产成果 + * @return 结果 + */ + int update(TcZczccg tc); + + /** + * 批量删除众测资产成果 + * + * @param ids 需要删除的众测资产成果主键集合 + * @return 结果 + */ + int deleteByIds(Long[] ids); + + /** + * 删除众测资产成果信息 + * + * @param id 众测资产成果主键 + * @return 结果 + */ + int deleteById(Long id); + + String importUser(List tcZbxqList); + + /** + * 大屏查询众测资产成果最新一条 + */ + TcZczccg getOne(); +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/impl/TcZcdwpmServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/impl/TcZcdwpmServiceImpl.java new file mode 100644 index 00000000..9df33968 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/impl/TcZcdwpmServiceImpl.java @@ -0,0 +1,102 @@ +package com.ruoyi.tcZz.service.impl; + +import com.ruoyi.tcZz.domain.TcZcdwpm; +import com.ruoyi.tcZz.mapper.TcZcdwpmMapper; +import com.ruoyi.tcZz.service.ITcZcdwpmService; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.List; + +/** + * 众测单位排名(tc_zcdwpm)表业务处理层 + * + * @author ruoyi + * @date 2023-10-13 + */ +@Service +public class TcZcdwpmServiceImpl implements ITcZcdwpmService +{ + + @Resource + private TcZcdwpmMapper tcZcdwpmMapper; + + /** + * 查询众测单位排名 + * + * @param id 众测单位排名主键 + * @return 众测单位排名 + */ + @Override + public TcZcdwpm getById(Long id) { + return tcZcdwpmMapper.getById(id); + } + + /** + * 查询众测单位排名列表 + * + * @param tc 众测单位排名 + * @return 众测单位排名集合 + */ + @Override + public List page(TcZcdwpm tc) { + return tcZcdwpmMapper.page(tc); + } + + /** + * 新增众测单位排名 + * + * @param tc 众测单位排名 + * @return 结果 + */ + @Override + public int insert(TcZcdwpm tc) { + return tcZcdwpmMapper.insert(tc); + } + + /** + * 修改众测单位排名 + * + * @param tc 众测单位排名 + * @return 结果 + */ + @Override + public int update(TcZcdwpm tc) { + return tcZcdwpmMapper.update(tc); + } + + + /** + * 批量删除众测单位排名 + * + * @param ids 需要删除的众测单位排名主键集合 + * @return 结果 + */ + @Override + public int deleteByIds(Long[] ids) { + return tcZcdwpmMapper.deleteByIds(ids); + } + + /** + * 删除众测单位排名信息 + * + * @param id 众测单位排名主键 + * @return 结果 + */ + @Override + public int deleteById(Long id) { + return tcZcdwpmMapper.deleteById(id); + } + + @Override + public String importUser(List tcZbxqList) { + StringBuilder successMsg = new StringBuilder(); + if (!tcZbxqList.isEmpty()) { + for (TcZcdwpm items : tcZbxqList) { + tcZcdwpmMapper.insert(items); + } + successMsg.append("导入成功"); + } + return successMsg.toString(); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/impl/TcZcldsServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/impl/TcZcldsServiceImpl.java new file mode 100644 index 00000000..2dd4b28b --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/impl/TcZcldsServiceImpl.java @@ -0,0 +1,103 @@ +package com.ruoyi.tcZz.service.impl; + +import com.ruoyi.tcZz.domain.TcZclds; +import com.ruoyi.tcZz.mapper.TcZcldsMapper; +import com.ruoyi.tcZz.service.ITcZcldsService; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.List; + +/** + * 众测漏洞数(tc_zclds)表业务处理层 + * + * @author ruoyi + * @date 2023-10-13 + */ +@Service +public class TcZcldsServiceImpl implements ITcZcldsService +{ + + @Resource + private TcZcldsMapper tcZcldsMapper; + + /** + * 查询众测漏洞数 + * + * @param id 众测漏洞数主键 + * @return 众测漏洞数 + */ + @Override + public TcZclds getById(Long id) { + return tcZcldsMapper.getById(id); + } + + /** + * 查询众测漏洞数列表 + * + * @param tc 众测漏洞数 + * @return 众测漏洞数集合 + */ + @Override + public List page(TcZclds tc) { + return tcZcldsMapper.page(tc); + } + + /** + * 新增众测漏洞数 + * + * @param tc 众测漏洞数 + * @return 结果 + */ + @Override + public int insert(TcZclds tc) { + return tcZcldsMapper.insert(tc); + } + + + /** + * 修改众测漏洞数 + * + * @param tc 众测漏洞数 + * @return 结果 + */ + @Override + public int update(TcZclds tc) { + return tcZcldsMapper.update(tc); + } + + /** + * 批量删除众测漏洞数 + * + * @param ids 需要删除的众测漏洞数主键集合 + * @return 结果 + */ + @Override + public int deleteByIds(Long[] ids) { + return tcZcldsMapper.deleteByIds(ids); + } + + + /** + * 删除众测漏洞数信息 + * + * @param id 众测漏洞数主键 + * @return 结果 + */ + @Override + public int deleteById(Long id) { + return tcZcldsMapper.deleteById(id); + } + + @Override + public String importUser(List tcZbxqList) { + StringBuilder successMsg = new StringBuilder(); + if (!tcZbxqList.isEmpty()) { + for (TcZclds items : tcZbxqList) { + tcZcldsMapper.insert(items); + } + successMsg.append("导入成功"); + } + return successMsg.toString(); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/impl/TcZczccgServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/impl/TcZczccgServiceImpl.java new file mode 100644 index 00000000..ce802547 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/impl/TcZczccgServiceImpl.java @@ -0,0 +1,108 @@ +package com.ruoyi.tcZz.service.impl; + +import com.ruoyi.tcZz.domain.TcZczccg; +import com.ruoyi.tcZz.mapper.TcZczccgMapper; +import com.ruoyi.tcZz.service.ITcZczccgService; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.List; + +/** + * 众测资产成果(tc_zczccg)表业务处理层 + * + * @author ruoyi + * @date 2023-10-13 + */ +@Service +public class TcZczccgServiceImpl implements ITcZczccgService +{ + @Resource + private TcZczccgMapper tcZczccgMapper; + + /** + * 查询众测资产成果 + * + * @param id 众测资产成果主键 + * @return 众测资产成果 + */ + @Override + public TcZczccg getById(Long id) { + return tcZczccgMapper.getById(id); + } + + /** + * 查询众测资产成果列表 + * + * @param tc 众测资产成果 + * @return 众测资产成果集合 + */ + @Override + public List page(TcZczccg tc) { + return tcZczccgMapper.page(tc); + } + + /** + * 新增众测资产成果 + * + * @param tc 众测资产成果 + * @return 结果 + */ + @Override + public int insert(TcZczccg tc) { + return tcZczccgMapper.insert(tc); + } + + /** + * 修改众测资产成果 + * + * @param tc 众测资产成果 + * @return 结果 + */ + @Override + public int update(TcZczccg tc) { + return tcZczccgMapper.update(tc); + } + + /** + * 批量删除众测资产成果 + * + * @param ids 需要删除的众测资产成果主键集合 + * @return 结果 + */ + @Override + public int deleteByIds(Long[] ids) { + return tcZczccgMapper.deleteByIds(ids); + } + + /** + * 删除众测资产成果信息 + * + * @param id 众测资产成果主键 + * @return 结果 + */ + @Override + public int deleteById(Long id) { + return tcZczccgMapper.deleteById(id); + } + + @Override + public String importUser(List tcZbxqList) { + StringBuilder successMsg = new StringBuilder(); + if (!tcZbxqList.isEmpty()) { + for (TcZczccg items : tcZbxqList) { + tcZczccgMapper.insert(items); + } + successMsg.append("导入成功"); + } + return successMsg.toString(); + } + + /** + * 大屏查询众测资产成果最新一条 + */ + @Override + public TcZczccg getOne() { + return tcZczccgMapper.getOne(); + } +} diff --git a/ruoyi-admin/src/main/resources/application-druid.yml b/ruoyi-admin/src/main/resources/application-druid.yml index ea3c6116..136546bb 100644 --- a/ruoyi-admin/src/main/resources/application-druid.yml +++ b/ruoyi-admin/src/main/resources/application-druid.yml @@ -6,13 +6,13 @@ spring: druid: # 主库数据源 远程服务服务器 master: - url: jdbc:mysql://20.1.0.158:3306/tc_zz?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 - username: root - password: root -#公司远程 -# url: jdbc:mysql://39.101.188.84:3307/tc_zz?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 +# url: jdbc:mysql://20.1.0.158:3306/tc_zz?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 # username: root -# password: Admin123@ +# password: root +#公司远程 + url: jdbc:mysql://39.101.188.84:3307/tc_zz?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 + username: root + password: Admin123@ ##公司本地 # url: jdbc:mysql://localhost:3307/tc_zz?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 # username: root diff --git a/ruoyi-admin/src/main/resources/mapper/tcZz/netManage/TcZcdwpmMapper.xml b/ruoyi-admin/src/main/resources/mapper/tcZz/netManage/TcZcdwpmMapper.xml new file mode 100644 index 00000000..eb5f80bd --- /dev/null +++ b/ruoyi-admin/src/main/resources/mapper/tcZz/netManage/TcZcdwpmMapper.xml @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + select id,unit_name,integral,create_by,create_time,update_by,update_time,remark from tc_zcdwpm + + + + + insert into tc_zcdwpm + + unit_name, + integral, + create_by, + create_time, + update_by, + update_time, + remark, + + + #{unitName}, + #{integral}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + #{remark}, + + + + update tc_zcdwpm + + unit_name = #{unitName}, + integral = #{integral}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + remark = #{remark}, + + where id = #{id} + + + delete from tc_zcdwpm where id = #{id} + + + delete from tc_zcdwpm where id in + + #{id} + + + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/mapper/tcZz/netManage/TcZcldsMapper.xml b/ruoyi-admin/src/main/resources/mapper/tcZz/netManage/TcZcldsMapper.xml new file mode 100644 index 00000000..ce4a563e --- /dev/null +++ b/ruoyi-admin/src/main/resources/mapper/tcZz/netManage/TcZcldsMapper.xml @@ -0,0 +1,75 @@ + + + + + + + + + + + + + + + + + select id,ld_number,ld_level,create_by,create_time,update_by,update_time,remark from tc_zclds + + + + insert into tc_zclds + + ld_level, + ld_number, + create_by, + create_time, + update_by, + update_time, + remark, + + + #{ldLevel}, + #{ldNumber}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + #{remark}, + + + + update tc_zclds + + ld_level = #{ldLevel}, + ld_number = #{ldNumber}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + remark = #{remark}, + + where id = #{id} + + + delete from tc_zclds where id = #{id} + + + delete from tc_zclds where id in + + #{id} + + + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/mapper/tcZz/netManage/TcZczczgMapper.xml b/ruoyi-admin/src/main/resources/mapper/tcZz/netManage/TcZczczgMapper.xml new file mode 100644 index 00000000..47bb506c --- /dev/null +++ b/ruoyi-admin/src/main/resources/mapper/tcZz/netManage/TcZczczgMapper.xml @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + select id,unit_number,add_number,create_by,create_time,update_by,update_time,remark from tc_zczccg + + + + insert into tc_zczccg + + unit_number, + add_number, + create_by, + create_time, + update_by, + update_time, + remark, + + + #{unitNumber}, + #{addNumber}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + #{remark}, + + + + update tc_zczccg + + unit_number = #{unitNumber}, + add_number = #{addNumber}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + remark = #{remark}, + + where id = #{id} + + + delete from tc_zczccg where id = #{id} + + + delete from tc_zczccg where id in + + #{id} + + + + + + \ No newline at end of file