From 13a7763cf378c9149159dd707a664116c31e97d1 Mon Sep 17 00:00:00 2001 From: du <1725534722@qq.com> Date: Mon, 18 Nov 2024 17:01:14 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E5=8D=95=E4=BD=8D=E5=92=8C=E8=B5=84?= =?UTF-8?q?=E4=BA=A7=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BaseClass.java} | 51 +- .../tc/controller/AssetCurrentController.java | 218 ++++ .../controller/UnitOtherConcatController.java | 12 +- .../ruoyi/tc/entity/AssetBasicNetwork.java | 86 ++ .../ruoyi/tc/entity/AssetBusinessForm.java | 400 +++++++ .../com/ruoyi/tc/entity/AssetCurrent.java | 1005 +++++++++++++++++ .../java/com/ruoyi/tc/entity/AssetExport.java | 129 +++ .../com/ruoyi/tc/entity/AssetSupplyChain.java | 75 ++ .../com/ruoyi/tc/entity/UnitOtherConcat.java | 42 + .../request/AssetCurrentPageRequest.java | 57 + .../tc/mapper/AssetBasicNetWorkMapper.java | 19 + .../tc/mapper/AssetBusinessFormMapper.java | 14 + .../ruoyi/tc/mapper/AssetCurrentMapper.java | 30 + .../tc/mapper/AssetSupplyChainMapper.java | 19 + .../tc/mapper/UnitOtherConcatMapper.java | 6 +- .../tc/service/AssetBasicNetworkService.java | 20 + .../tc/service/AssetBusinessFormService.java | 15 + .../ruoyi/tc/service/AssetCurrentService.java | 36 + .../tc/service/AssetSupplyChainService.java | 17 + .../tc/service/UnitOtherConcatService.java | 3 +- .../impl/AssetBasicNetworkServiceImpl.java | 26 + .../impl/AssetBusinessFormServiceImpl.java | 19 + .../service/impl/AssetCurrentServiceImpl.java | 45 + .../impl/AssetSupplyChainServiceImpl.java | 25 + .../impl/UnitOtherConcatServiceImpl.java | 2 +- .../controller/system/SysUserController.java | 18 +- .../src/main/resources/application.yml | 4 +- .../mapper/AssetBasicNetworkMapper.xml | 24 + .../mapper/AssetBusinessFormMapper.xml | 6 + .../resources/mapper/AssetCurrentMapper.xml | 30 + .../mapper/AssetSupplyChainMapper.xml | 13 + .../com/ruoyi/common/annotation/Excel.java | 2 +- .../ruoyi/common/core/domain/entity/Unit.java | 3 + .../framework/config/SecurityConfig.java | 2 +- .../ruoyi/system/mapper/SysUserMapper.java | 3 + .../com/ruoyi/system/mapper/UnitMapper.java | 5 + .../com/ruoyi/system/service/UnitService.java | 6 +- .../service/impl/SysUserServiceImpl.java | 11 + .../system/service/impl/UnitServiceImpl.java | 8 + .../resources/mapper/system/SysUserMapper.xml | 12 +- .../resources/mapper/system/UnitMapper.xml | 6 + 41 files changed, 2464 insertions(+), 60 deletions(-) rename ruoyi-admin/src/main/java/com/ruoyi/tc/{domain/UnitOtherConcat.java => baseClass/BaseClass.java} (55%) create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetCurrentController.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/tc/entity/AssetBasicNetwork.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/tc/entity/AssetBusinessForm.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/tc/entity/AssetCurrent.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/tc/entity/AssetExport.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/tc/entity/AssetSupplyChain.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/tc/entity/UnitOtherConcat.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/tc/entity/request/AssetCurrentPageRequest.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetBasicNetWorkMapper.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetBusinessFormMapper.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetCurrentMapper.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetSupplyChainMapper.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/tc/service/AssetBasicNetworkService.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/tc/service/AssetBusinessFormService.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/tc/service/AssetCurrentService.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/tc/service/AssetSupplyChainService.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetBasicNetworkServiceImpl.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetBusinessFormServiceImpl.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetCurrentServiceImpl.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetSupplyChainServiceImpl.java create mode 100644 ruoyi-admin/src/main/resources/mapper/AssetBasicNetworkMapper.xml create mode 100644 ruoyi-admin/src/main/resources/mapper/AssetBusinessFormMapper.xml create mode 100644 ruoyi-admin/src/main/resources/mapper/AssetCurrentMapper.xml create mode 100644 ruoyi-admin/src/main/resources/mapper/AssetSupplyChainMapper.xml diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/domain/UnitOtherConcat.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/baseClass/BaseClass.java similarity index 55% rename from ruoyi-admin/src/main/java/com/ruoyi/tc/domain/UnitOtherConcat.java rename to ruoyi-admin/src/main/java/com/ruoyi/tc/baseClass/BaseClass.java index def8cc2..e326b21 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/domain/UnitOtherConcat.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/baseClass/BaseClass.java @@ -1,46 +1,21 @@ -package com.ruoyi.tc.domain; +package com.ruoyi.tc.baseClass; -import com.baomidou.mybatisplus.annotation.*; +import com.baomidou.mybatisplus.annotation.FieldFill; +import com.baomidou.mybatisplus.annotation.TableField; import com.fasterxml.jackson.annotation.JsonFormat; -import com.ruoyi.common.annotation.Excel; -import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import org.springframework.format.annotation.DateTimeFormat; -import javax.validation.constraints.NotNull; -import java.io.Serializable; import java.util.Date; /** - * 单位其他联系人(unit_other_contact)实体类 + * 公共实体类 * @author du - * @since 2024/11/13 14:44 + * @since 2024/11/15 16:01 */ @Data -@ApiModel("单位其他联系人") -@TableName(value = "unit_other_contact") -public class UnitOtherConcat implements Serializable { - - @TableId(type = IdType.AUTO,value = "id") - private Long id; - - @ApiModelProperty("单位id") - @NotNull - private Long unitId; - - @ApiModelProperty("其他联系人姓名") - private String qtlxrxm; - - @ApiModelProperty("其他联系人联系方式") - private String qtlxrlxfs; - - @ApiModelProperty("其他联系人邮箱") - private String qtlxryx; - - @ApiModelProperty("其他联系人职务职称") - private String qtlxrzwzc; - +public class BaseClass { /** * 创建者 */ @@ -74,4 +49,18 @@ public class UnitOtherConcat implements Serializable { private Date updateTime; private String remark; + + /** + * 创建ID + */ + @ApiModelProperty("创建ID") + @TableField(fill = FieldFill.INSERT) + private Long createId; + + /** + * 更新者ID + */ + @ApiModelProperty("更新者ID") + @TableField(fill = FieldFill.UPDATE) + private Long updateId; } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetCurrentController.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetCurrentController.java new file mode 100644 index 0000000..48c48cf --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetCurrentController.java @@ -0,0 +1,218 @@ +package com.ruoyi.tc.controller; + + +import cn.hutool.core.bean.BeanUtil; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.tc.entity.*; +import com.ruoyi.tc.entity.request.AssetCurrentPageRequest; +import com.ruoyi.tc.service.AssetBasicNetworkService; +import com.ruoyi.tc.service.AssetCurrentService; +import com.ruoyi.tc.service.AssetSupplyChainService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; +import javax.validation.Valid; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; + +/** + * 现有资产表(AssetCurrent)表控制层 + * + * @author makejava + * @since 2024-11-15 10:03:56 + */ +@Api(tags = "现有资产表") +@RestController +@RequestMapping("/tc/assetCurrent") +public class AssetCurrentController extends BaseController { + /** + * 服务对象 + */ + @Resource + private AssetCurrentService assetCurrentService; + @Resource + private AssetSupplyChainService assetSupplyChainService; + + @Resource + private AssetBasicNetworkService assetBasicNetworkService; + + + /** + * 分页查询所有数据 + * + * @param page 分页对象 + * @param as 查询实体 + * @return 所有数据 + */ + @ApiOperation(value = "分页查询所有数据", response = AssetCurrent.class) + @GetMapping + public AjaxResult selectAll(Page page, AssetCurrentPageRequest as) { + return success(assetCurrentService.page(page, as)); + } + + /** + * 通过主键查询单条数据 + * + * @param id 主键 + * @return 单条数据 + */ + @ApiOperation(value = "通过主键查询单条数据", response = AssetCurrent.class) + @GetMapping("{id}") + public AjaxResult selectOne(@PathVariable Serializable id) { + return success(assetCurrentService.getById(id)); + } + + /** + * 新增数据 + * + * @param assetCurrent 实体对象 + * @return 新增结果 + */ + @ApiOperation(value = "新增数据") + @PostMapping + public AjaxResult insert(@RequestBody @Valid AssetCurrent assetCurrent) { + return success(assetCurrentService.save(assetCurrent)); + } + + /** + * 修改数据 + * + * @param assetCurrent 实体对象 + * @return 修改结果 + */ + @ApiOperation(value = "修改数据") + @PutMapping + public AjaxResult update(@RequestBody @Valid AssetCurrent assetCurrent) { + return success(assetCurrentService.updateById(assetCurrent)); + } + + /** + * 删除数据 + * + * @param idList 主键结合 + * @return 删除结果 + */ + @ApiOperation(value = "删除数据") + @DeleteMapping + public AjaxResult delete(@RequestParam("idList") List idList) { + return success(assetCurrentService.removeByIds(idList)); + } + + /** + * 下载资产导入模板 + */ + @ApiOperation(value = "下载资产导入模板") + @PostMapping("/importTemplate") + public void importTemplate(HttpServletResponse response) { + ExcelUtil util = new ExcelUtil<>(AssetExport.class); + util.importTemplateExcel(response, "资产导入模板"); + } + + + /** + * 导出现有资产 + */ + @ApiOperation(value = "导出现有资产") + @PostMapping("/export") + public void exportProject(HttpServletResponse response, AssetCurrentPageRequest as) { + List list = assetCurrentService.page(as); + List proList = new ArrayList<>(); + for (AssetCurrent x : list) { + //对应的资产 + AssetExport assetExport = new AssetExport(); + BeanUtil.copyProperties(x,assetExport); + //查找对应的系统建设单位 + AssetSupplyChain jsdw = assetSupplyChainService.getJsdw(x.getId()); + BeanUtil.copyProperties(jsdw,assetExport); + + List byList = assetBasicNetworkService.getByAssetId(x.getId()); + for (AssetBasicNetwork items : byList) { + if(items.getType() == 1){ + //查找对应的服务器信息 + BeanUtil.copyProperties(items,assetExport); + } + if(items.getType() == 2){ + //查找对应网络设备 + assetExport.setWlpp(items.getPp()); + assetExport.setWlyjxh(items.getYjxh()); + assetExport.setWlyjbsxx(items.getYjbsxx()); + assetExport.setWlsblx(items.getSblx()); + assetExport.setWlyjbbxx(items.getYjbbxx()); + assetExport.setWlyjxlh(items.getYjxlh()); + assetExport.setWlsbIp(items.getSbIp()); + assetExport.setWlyjyt(items.getYjyt()); + } + if(items.getType() == 3){ + //查找对应安全设备 + assetExport.setAqwlpp(items.getPp()); + assetExport.setAqwlsblx(items.getSblx()); + assetExport.setAqwlsbIp(items.getSbIp()); + } + } + proList.add(assetExport); + } + ExcelUtil util = new ExcelUtil<>(AssetExport.class); + util.exportExcel(response, proList, "现有资产记录"); + } + + /** + * 导入现有资产 + */ + @ApiOperation(value = "导入现有资产") + @PostMapping(value = "/import", consumes = "multipart/form-data") + public AjaxResult export(@RequestPart("file") MultipartFile file) throws Exception { + //读取所有的字段 + ExcelUtil util = new ExcelUtil<>(AssetExport.class); + List proList = util.importExcel(file.getInputStream()); + for (AssetExport items : proList) { + AssetCurrent as = new AssetCurrent(); + //copy新增到新的现有资产表里面 + BeanUtil.copyProperties(items,as); + assetCurrentService.save(as); + //新增系统建设单位 + AssetSupplyChain s1 = new AssetSupplyChain(); + BeanUtil.copyProperties(items,s1); + s1.setType(5); + s1.setAssetId(as.getId()); + assetSupplyChainService.save(s1); + //新增服务器信息 + AssetBasicNetwork a1 = new AssetBasicNetwork(); + BeanUtil.copyProperties(items,a1); + a1.setType(1); + a1.setAssetId(as.getId()); + assetBasicNetworkService.save(a1); + //新增网络设备 + AssetBasicNetwork a2 = new AssetBasicNetwork(); + a2.setSblx(items.getWlsblx()); + a2.setPp(items.getWlpp()); + a2.setSbIp(items.getWlsbIp()); + a2.setYjxh(items.getWlyjxh()); + a2.setYjxlh(items.getWlyjxlh()); + a2.setYjbbxx(items.getWlyjbbxx()); + a2.setYjyt(items.getWlyjyt()); + a2.setYjbsxx(items.getWlyjbsxx()); + a2.setType(2); + a2.setAssetId(as.getId()); + assetBasicNetworkService.save(a2); + //新增安全设备 + AssetBasicNetwork a3 = new AssetBasicNetwork(); + a3.setSblx(items.getAqwlsblx()); + a3.setPp(items.getAqwlpp()); + a3.setSbIp(items.getAqwlsbIp()); + a3.setType(3); + a3.setAssetId(as.getId()); + assetBasicNetworkService.save(a3); + } + return AjaxResult.success(); + } + +} + diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/UnitOtherConcatController.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/UnitOtherConcatController.java index d58ab0f..c25c3f2 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/UnitOtherConcatController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/UnitOtherConcatController.java @@ -1,25 +1,17 @@ package com.ruoyi.tc.controller; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.ruoyi.common.annotation.Log; import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.domain.AjaxResult; -import com.ruoyi.common.enums.BusinessType; -import com.ruoyi.common.exception.ServiceException; -import com.ruoyi.common.utils.poi.ExcelUtil; -import com.ruoyi.tc.domain.UnitOtherConcat; +import com.ruoyi.tc.entity.UnitOtherConcat; import com.ruoyi.tc.service.UnitOtherConcatService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; -import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; -import javax.servlet.http.HttpServletResponse; import javax.validation.Valid; import java.io.Serializable; import java.util.Arrays; -import java.util.List; /** * 单位其他联系人(unit_other_contact)控制层 @@ -27,7 +19,7 @@ import java.util.List; * @since 2024/11/13 14:50 */ @RestController -@RequestMapping("/unit/otherConcat") +@RequestMapping("/tc/unit/otherConcat") @Api(tags = "单位其他联系人控制层") public class UnitOtherConcatController extends BaseController { /** diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/AssetBasicNetwork.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/AssetBasicNetwork.java new file mode 100644 index 0000000..ea73bea --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/AssetBasicNetwork.java @@ -0,0 +1,86 @@ +package com.ruoyi.tc.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.ruoyi.tc.baseClass.BaseClass; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; + +/** + * 资产基础网络表(asset_basic_network)实体类 + * @author du + * @since 2024/11/13 14:44 +*/ +@Data +@ApiModel("资产基础网络") +@TableName(value = "asset_basic_network") +public class AssetBasicNetwork extends BaseClass implements Serializable { + + @TableId(type = IdType.AUTO,value = "id") + private Integer id; + + /** + * 资源id + */ + @ApiModelProperty("资源id") + private Long assetId; + /** + * 1.服务器信息2网络设备3安全设备 + */ + @ApiModelProperty("1.服务器信息2网络设备3安全设备") + private Integer type; + /** + * 设备类型 + */ + @ApiModelProperty("设备类型") + private String sblx; + /** + * 品牌 + */ + @ApiModelProperty("品牌") + private String pp; + /** + * 设备IP + */ + @ApiModelProperty("设备IP") + private String sbIp; + /** + * 操作系统 + */ + @ApiModelProperty("操作系统") + private Integer czxt; + /** + * 操作系统版本 + */ + @ApiModelProperty("操作系统版本") + private String czxtbb; + /** + * 硬件型号 + */ + @ApiModelProperty("硬件型号") + private String yjxh; + /** + * 硬件序列号 + */ + @ApiModelProperty("硬件序列号") + private String yjxlh; + /** + * 硬件版本信息 + */ + @ApiModelProperty("硬件版本信息") + private String yjbbxx; + /** + * 硬件用途 + */ + @ApiModelProperty("硬件用途") + private String yjyt; + /** + * 硬件部署位置 + */ + @ApiModelProperty("硬件部署位置") + private String yjbsxx; +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/AssetBusinessForm.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/AssetBusinessForm.java new file mode 100644 index 0000000..629da4d --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/AssetBusinessForm.java @@ -0,0 +1,400 @@ +package com.ruoyi.tc.entity; + + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.ruoyi.tc.baseClass.BaseClass; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.Size; +import java.io.Serializable; + +/** + * 资产新监管业务形态(asset_business_form)实体类 + * @author du + * @since 2024/11/13 14:44 + */ +@Data +@ApiModel("资产新监管业务形态") +@TableName(value = "asset_business_form") +public class AssetBusinessForm extends BaseClass implements Serializable { + + @TableId(type = IdType.AUTO,value = "id") + private Integer id; + /** + * 资源id + */ + @ApiModelProperty("资源id") + private Long assetId; + /** + * 云平台-云平台服务商 + */ + @Size(max= 50,message="云平台-云平台服务商长度不能超过50") + @ApiModelProperty("云平台-云平台服务商") + private String yptFws; + /** + * 云平台-是否租户级安全 + */ + @ApiModelProperty("云平台-是否租户级安全") + private Integer yptSfzh; + /** + * 云平台-云平台类型 + */ + @Size(max= 50,message="云平台-云平台类型长度不能超过50") + @ApiModelProperty("云平台-云平台类型") + private String yptLx; + /** + * 云平台-硬件资源大小 + */ + @Size(max= 50,message="云平台-硬件资源大小长度不能超过50") + @ApiModelProperty("云平台-硬件资源大小") + private String yptYjzydx; + /** + * 云平台-平台架构 + */ + @Size(max= 50,message="云平台-平台架构长度不能超过50") + @ApiModelProperty("云平台-平台架构") + private String yptPtjg; + /** + * 云平台-互联网IP段 + */ + @Size(max= 50,message="云平台-互联网IP段长度不能超过50") + @ApiModelProperty("云平台-互联网IP段") + private String yptIp; + /** + * 云平台-机房联系人 + */ + @Size(max= 50,message="云平台-机房联系人长度不能超过50") + @ApiModelProperty("云平台-机房联系人") + private String yptJflxr; + /** + * 云平台-机房联系人电话 + */ + @Size(max= 50,message="云平台-机房联系人电话长度不能超过50") + @ApiModelProperty("云平台-机房联系人电话") + private String yptJflxrdh; + /** + * 云平台-服务器设备类型 + */ + @Size(max= 50,message="云平台-服务器设备类型长度不能超过50") + @ApiModelProperty("云平台-服务器设备类型") + private String yptFwqsblx; + /** + * 大数据平台-平台服务商 + */ + @Size(max= 50,message="大数据平台-平台服务商长度不能超过50") + @ApiModelProperty("大数据平台-平台服务商") + private String dsjPtfws; + /** + * 大数据平台-敏感数据类型 + */ + @Size(max= 50,message="大数据平台-敏感数据类型长度不能超过50") + @ApiModelProperty("大数据平台-敏感数据类型") + private String dsjMgsjlx; + /** + * 大数据平台-硬件资源 + */ + @Size(max= 50,message="大数据平台-硬件资源长度不能超过50") + @ApiModelProperty("大数据平台-硬件资源") + private String dsjYjzy; + /** + * 大数据平台-系统数据量 + */ + @Size(max= 50,message="大数据平台-系统数据量长度不能超过50") + @ApiModelProperty("大数据平台-系统数据量") + private String dsjXtsjl; + /** + * 大数据平台-机房联系人 + */ + @Size(max= 50,message="大数据平台-机房联系人长度不能超过50") + @ApiModelProperty("大数据平台-机房联系人") + private String dsjJflxr; + /** + * 大数据平台-机房联系人电话 + */ + @Size(max= 50,message="大数据平台-机房联系人电话长度不能超过50") + @ApiModelProperty("大数据平台-机房联系人电话") + private String dsjJflxrdh; + /** + * 大数据平台-是否数据审计 + */ + @ApiModelProperty("大数据平台-是否数据审计") + private Integer dsjSfsjsj; + /** + * 一般物联网设备-系统集成商名称 + */ + @Size(max= 50,message="一般物联网设备-系统集成商名称长度不能超过50") + @ApiModelProperty("一般物联网设备-系统集成商名称") + private String wlwsbXtjcs; + /** + * 一般物联网设备-用户数量 + */ + @Size(max= 50,message="一般物联网设备-用户数量长度不能超过50") + @ApiModelProperty("一般物联网设备-用户数量") + private String wlwsbYhsl; + /** + * 一般物联网设备-服务对象 + */ + @ApiModelProperty("一般物联网设备-服务对象") + private Integer wlwsbFwdx; + /** + * 一般物联网设备-终端数量 + */ + @Size(max= 50,message="一般物联网设备-终端数量长度不能超过50") + @ApiModelProperty("一般物联网设备-终端数量") + private String wlwsbZdsl; + /** + * 一般物联网设备-网络互联情况 + */ + @ApiModelProperty("一般物联网设备-网络互联情况") + private Integer wlwsbWlhlqk; + /** + * 一般物联网设备-联系人 + */ + @Size(max= 50,message="一般物联网设备-联系人长度不能超过50") + @ApiModelProperty("一般物联网设备-联系人") + private String wlwsbLxr; + /** + * 一般物联网设备-服务范围 + */ + @ApiModelProperty("一般物联网设备-服务范围") + private Integer wlwsbFwfw; + /** + * 一般物联网设备-联系人电话 + */ + @Size(max= 50,message="一般物联网设备-联系人电话长度不能超过50") + @ApiModelProperty("一般物联网设备-联系人电话") + private String wlwsbLxrdh; + /** + * 一般物联网设备-服务内容 + */ + @Size(max= 500,message="一般物联网设备-服务内容长度不能超过500") + @ApiModelProperty("一般物联网设备-服务内容") + private String wlwsbFwnr; + /** + * 摄像头-摄像头品牌 + */ + @Size(max= 50,message="摄像头-摄像头品牌长度不能超过50") + @ApiModelProperty("摄像头-摄像头品牌") + private String sxtPp; + /** + * 摄像头-位置 + */ + @Size(max= 255,message="摄像头-位置长度不能超过255") + @ApiModelProperty("摄像头-位置") + private String sxtWz; + /** + * 摄像头-摄像头IP + */ + @Size(max= 50,message="摄像头-摄像头IP长度不能超过50") + @ApiModelProperty("摄像头-摄像头IP") + private String sxtIp; + /** + * 摄像头-区域 + */ + @Size(max= 50,message="摄像头-区域长度不能超过50") + @ApiModelProperty("摄像头-区域") + private String sxtQy; + /** + * 摄像头-摄像头数量 + */ + @Size(max= 50,message="摄像头-摄像头数量长度不能超过50") + @ApiModelProperty("摄像头-摄像头数量") + private String sxtSl; + /** + * 摄像头-端口 + */ + @Size(max= 50,message="摄像头-端口长度不能超过50") + @ApiModelProperty("摄像头-端口") + private String sxtDk; + /** + * 摄像头-设备型号 + */ + @Size(max= 50,message="摄像头-设备型号长度不能超过50") + @ApiModelProperty("摄像头-设备型号") + private String sxtSbxh; + /** + * 摄像头-固定版本 + */ + @Size(max= 50,message="摄像头-固定版本长度不能超过50") + @ApiModelProperty("摄像头-固定版本") + private String sxtGdbb; + /** + * 移动APP-移动APP系统 + */ + @Size(max= 50,message="移动APP-移动APP系统长度不能超过50") + @ApiModelProperty("移动APP-移动APP系统") + private String appXt; + /** + * 移动APP-服务端域名 + */ + @Size(max= 50,message="移动APP-服务端域名长度不能超过50") + @ApiModelProperty("移动APP-服务端域名") + private String appYm; + /** + * 移动APP-移动APP渠道 + */ + @Size(max= 50,message="移动APP-移动APP渠道长度不能超过50") + @ApiModelProperty("移动APP-移动APP渠道") + private String appQd; + /** + * 移动APP-服务端IP + */ + @Size(max= 50,message="移动APP-服务端IP长度不能超过50") + @ApiModelProperty("移动APP-服务端IP") + private String appIp; + /** + * 移动APP-联系人 + */ + @Size(max= 50,message="移动APP-联系人长度不能超过50") + @ApiModelProperty("移动APP-联系人") + private String appLxr; + /** + * 移动APP-联系人电话 + */ + @Size(max= 50,message="移动APP-联系人电话长度不能超过50") + @ApiModelProperty("移动APP-联系人电话") + private String appLxrdh; + /** + * 移动APP-APP是否有身份认证 + */ + @ApiModelProperty("移动APP-APP是否有身份认证") + private Integer appSfysfrz; + /** + * 工业控制-系统集成商名称 + */ + @Size(max= 255,message="工业控制-系统集成商名称长度不能超过255") + @ApiModelProperty("工业控制-系统集成商名称") + private String gykzJcs; + /** + * 工业控制-运行时间 + */ + @Size(max= 255,message="工业控制-运行时间长度不能超过255") + @ApiModelProperty("工业控制-运行时间") + private String gykzYxsj; + /** + * 工业控制-服务对象 + */ + @ApiModelProperty("工业控制-服务对象") + private Integer gykzFwdx; + /** + * 工业控制-集成商国内外情况 + */ + @Size(max= 255,message="工业控制-集成商国内外情况长度不能超过255") + @ApiModelProperty("工业控制-集成商国内外情况") + private String gykzJcsqk; + /** + * 工业控制-网络互联情况 + */ + @ApiModelProperty("工业控制-网络互联情况") + private Integer gykzWlhxqk; + /** + * 工业控制-联系人 + */ + @Size(max= 255,message="工业控制-联系人长度不能超过255") + @ApiModelProperty("工业控制-联系人") + private String gykzLxr; + /** + * 工业控制-服务范围 + */ + @ApiModelProperty("工业控制-服务范围") + private Integer gykzFwfw; + /** + * 工业控制-联系人电话 + */ + @Size(max= 50,message="工业控制-联系人电话长度不能超过50") + @ApiModelProperty("工业控制-联系人电话") + private String gykzLxrdh; + /** + * 工业控制-设备名称 + */ + @Size(max= 50,message="工业控制-设备名称长度不能超过50") + @ApiModelProperty("工业控制-设备名称") + private String gykzSbmc; + /** + * 工业控制-设备品牌 + */ + @Size(max= 50,message="工业控制-设备品牌长度不能超过50") + @ApiModelProperty("工业控制-设备品牌") + private String gykzSbpp; + /** + * 工业控制-设备类别 + */ + @Size(max= 50,message="工业控制-设备类别长度不能超过50") + @ApiModelProperty("工业控制-设备类别") + private String gykzSblb; + /** + * 工业控制-运营商 + */ + @Size(max= 50,message="工业控制-运营商长度不能超过50") + @ApiModelProperty("工业控制-运营商") + private String gykzYys; + /** + * 工业控制-互联网IP + */ + @Size(max= 50,message="工业控制-互联网IP长度不能超过50") + @ApiModelProperty("工业控制-互联网IP") + private String gykzHlwIp; + /** + * 工业控制-网络层级 + */ + @Size(max= 50,message="工业控制-网络层级长度不能超过50") + @ApiModelProperty("工业控制-网络层级") + private String gykzWlcj; + /** + * 工业控制-控制台IP + */ + @Size(max= 50,message="工业控制-控制台IP长度不能超过50") + @ApiModelProperty("工业控制-控制台IP") + private String gykzKztIp; + /** + * 工业控制-描述 + */ + @Size(max= 500,message="工业控制-描述长度不能超过500") + @ApiModelProperty("工业控制-描述") + private String gykzMs; + /** + * CDN信息-CDN供应商 + */ + @Size(max= 255,message="CDN信息-CDN供应商长度不能超过255") + @ApiModelProperty("CDN信息-CDN供应商") + private String cdnGys; + /** + * CDN信息-CDN是否使用 + */ + @ApiModelProperty("CDN信息-CDN是否使用") + private Integer cdnSfsy; + /** + * CDN信息-CDN类型 + */ + @Size(max= 50,message="CDN信息-CDN类型长度不能超过50") + @ApiModelProperty("CDN信息-CDN类型") + private String cdnLx; + /** + * CDN信息-CDN域名 + */ + @Size(max= 50,message="CDN信息-CDN域名长度不能超过50") + @ApiModelProperty("CDN信息-CDN域名") + private String cdnYm; + /** + * CDN信息-联系人 + */ + @Size(max= 50,message="CDN信息-联系人长度不能超过50") + @ApiModelProperty("CDN信息-联系人") + private String cdnLxr; + /** + * CDN信息-联系人电话 + */ + @Size(max= 50,message="CDN信息-联系人电话长度不能超过50") + @ApiModelProperty("CDN信息-联系人电话") + private String cdnLxrdh; + /** + * CDN信息-CDN加速信息 + */ + @Size(max= 500,message="CDN信息-CDN加速信息长度不能超过500") + @ApiModelProperty("CDN信息-CDN加速信息") + private String cdnJsxx; +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/AssetCurrent.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/AssetCurrent.java new file mode 100644 index 0000000..d4f3e42 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/AssetCurrent.java @@ -0,0 +1,1005 @@ +package com.ruoyi.tc.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.ruoyi.common.annotation.Excel; +import com.ruoyi.tc.baseClass.BaseClass; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import javax.validation.constraints.Size; +import java.io.Serializable; + +/** +* 现有资产表(asset_current)实体类 +* @author du +* @since 2024/11/13 14:44 +*/ +@Data +@ApiModel("现有资产表") +@TableName(value = "asset_current") +public class AssetCurrent extends BaseClass implements Serializable { + + private static final long serialVersionUID = 1L; + + @TableId(value = "id",type = IdType.AUTO) + private Long id; + + /** + * 系统名称 + */ + @NotBlank + @Size(max= 100,message="系统名称长度不能超过100") + @Excel(name = "*系统名称",sort = 2,width = 40,required = true) + @ApiModelProperty("系统名称") + private String xtmc; + /** + * 单位名称 + */ + @NotBlank + @Size(max= 50,message="单位名称长度不能超过50") + @ApiModelProperty("单位名称") + @Excel(name = "*单位名称",sort = 1,width = 40) + private String dwmc; + /** + * 系统域名 + */ + @Size(max= 50,message="系统域名长度不能超过50") + @ApiModelProperty("系统域名") + @Excel(name = "域名",sort = 3) + private String xtym; + + @Excel(name ="访问网址-协议类型",sort = 12,width = 26) + @ApiModelProperty("访问网址-协议类型") + @TableField(exist = false) + private String fwwzXylx; + /** + * 访问网址 + */ + @Excel(name ="访问网址",sort = 13) + @Size(max= 50,message="访问网址长度不能超过50") + @ApiModelProperty("访问网址") + private String fwwz; + /** + * IPport-IP地址 + */ + @NotBlank + @Size(max= 50,message="IPport-IP地址长度不能超过50") + @ApiModelProperty("IPport-IP地址") + @Excel(name = "*ipv4",sort = 4) + private String ipAddress; + /** + * IPport-端口 + */ + @NotBlank + @Excel(name = "*端口",sort = 5) + @Size(max= 50,message="IPport-端口不能超过50") + @ApiModelProperty("IPport-端口") + private String ipPort; + /** + * 域名到期时间 + */ + @ApiModelProperty("域名到期时间") + private String ymdqsj; + /** + * 域名提醒人-姓名 + */ + @Size(max= 50,message="域名提醒人-姓名长度不能超过50") + @ApiModelProperty("域名提醒人-姓名") + private String ymtxrXm; + /** + * 域名提醒人-联系方式 + */ + @Size(max= 50,message="域名提醒人-联系方式不能超过50") + @ApiModelProperty("域名提醒人-联系方式") + private String ymtxrLxfs; + /** + * 关联域名(多个用,分隔) + */ + @Excel(name = "关联域名(多个关联域名用逗号隔开)",sort = 6,width =42) + @Size(max= 500,message="关联域名长度不能超过500") + @ApiModelProperty("关联域名(多个用,分隔)") + private String glym; + /** + * 关联ip(多个用,分隔) + */ + @Excel(name ="关联资产(多个资产用逗号隔开,例如\n{\"ipv4\":[\"1.1.1.1:8080\",\"2.2.2.2:8080\"],\"ipv6\":\n[\"fe80::ec3e:9cff:fe25:687b\",\"de71::ec3e:9cff:fe25:687b\"]})",sort = 7,width = 60) + @Size(max= 500,message="关联ip长度不能超过500") + @ApiModelProperty("关联ip(多个用,分隔)") + private String glIp; + /** + * 系统类型(字典) + */ + @Excel(name = "*系统类型",dictType="zc_xtlx",comboReadDict = true,sort =8) + @NotNull + @ApiModelProperty("系统类型(字典)") + private Integer xtlx; + /** + * 系统重要性(字典) + */ + @Excel(name = "系统重要性",dictType = "zc_xtzyx",comboReadDict = true,sort = 9) + @ApiModelProperty("系统重要性(字典)") + private Integer xtzyx; + /** + * 是否关基系统(字典) + */ + @NotNull + @Excel(name = "*是否关基系统",dictType = "is_no",comboReadDict = true,sort = 10) + @ApiModelProperty("是否关基系统(字典)") + private Integer gjxt; + /** + * 系统标签 + */ + @Excel(name = "系统标签(多个标签逗号隔开)",sort = 11,width = 32) + @Size(max= 255,message="系统标签长度不能超过255") + @ApiModelProperty("系统标签") + private String xtbq; + /** + * 机房信息 + */ + @NotBlank + @Excel(name = "*机房信息",sort = 58) + @Size(max= 500,message="机房信息长度不能超过500") + @ApiModelProperty("机房信息") + private String jfxx; + /** + * 使用时间 + */ + @NotBlank + @Size(max= 50,message="使用时间长度不能超过50") + @ApiModelProperty("使用时间") + @Excel(name = "使用时间",sort = 116) + private String sysj; + /** + * 是否是互联网系统(字典) + */ + @NotNull + @Excel(name = "*是否是互联网系统",dictType = "is_no",comboReadDict = true,sort = 117 ) + @ApiModelProperty("是否是互联网系统(字典)") + private Integer hlwxt; + /** + * 系统编号 + */ + @Size(max= 50,message="系统编号长度不能超过50") + @ApiModelProperty("系统编号") + @Excel(name = "系统编号",sort = 35) + private String xtbh; + /** + * 系统状态(字典) + */ + @Excel(name = "*系统状态",dictType = "zc_xtzt",comboReadDict = true,sort = 36) + @NotNull + @ApiModelProperty("系统状态(字典)") + private Integer xtzt; + /** + * 在线状态(字典) + */ + @Excel(name = "在线状态",dictType = "zc_zxzt",comboReadDict = true,sort = 37) + @ApiModelProperty("在线状态(字典)") + private Integer zxzt; + + @Excel(name = "使用人",sort = 38) + @TableField(exist = false) + @ApiModelProperty("使用人") + private String syr; + /** + * C-机密性(字典) + */ + @Excel(name = "机密性",dictType = "zc_c_i_a",comboReadDict = true,sort = 39) + @ApiModelProperty("C-机密性(字典)") + private Integer cJmx; + /** + * I-完整性(字典) + */ + @Excel(name = "完整性",dictType = "zc_c_i_a",comboReadDict = true,sort = 40) + @ApiModelProperty("I-完整性(字典)") + private Integer iWzx; + /** + * A-可用性(字典) + */ + @Excel(name = "可用性",dictType = "zc_c_i_a",comboReadDict = true,sort = 41) + @ApiModelProperty("A-可用性(字典)") + private Integer aKyx; + /** + * 存活率(字典) + */ + @ApiModelProperty("存活率(字典)") + private Integer chl; + /** + * 地理位置 + */ + @Size(max= 255,message="地理位置长度不能超过255") + @ApiModelProperty("地理位置") + private String dlwz; + /** + * 经度 + */ + @Size(max= 50,message="经度长度不能超过50") + @ApiModelProperty("经度") + private String jd; + /** + * 纬度 + */ + @Size(max= 50,message="纬度长度不能超过50") + @ApiModelProperty("纬度") + private String wd; + /** + * 系统特征(,分隔) + */ + @Excel(width = 60,name = "系统特征(多选,多个特征用逗号隔开。选项为:党政机关门户网站、重点新闻网站,大型网络平台,系统业务覆盖单个地市级行政区30%以上人口的工作、生活,系统业务覆盖10万人以上用水、用电、用气、用油、取暖或交通出行,存储超过5万人以上个人敏感信息,存储超过100万条以上地理、人口、资源等国家基础数据)",sort = 52) + @ApiModelProperty("系统特征(,分隔)") + private String xttz; + /** + * 用户规模 + */ + @Excel(name = "*用户规模",dictType ="zc_yhgm",comboReadDict = true,sort = 53) + @NotNull + @ApiModelProperty("用户规模") + private Integer yhgm; + /** + * 互联网接入运营商 + */ + @NotBlank + @Excel(name = "*互联网接入运营商",sort = 54) + @Size(max= 50,message="互联网接入运营商长度不能超过50") + @ApiModelProperty("互联网接入运营商") + private String hlwjryys; + + @Excel(name = "*物理接入地址",sort = 55) + @ApiModelProperty("*物理接入地址") + @TableField(exist = false) + private String wljrdz; + + /** + * 资产物理接入地址 + */ + @Excel(name = "*资产物理接入地址",sort = 118,width = 28) + @NotBlank + @Size(max= 50,message="资产物理接入地址长度不能超过50") + @ApiModelProperty("资产物理接入地址") + private String zcwljrdz; + /** + * 是否部署云平台(字典) + */ + @NotNull + @Excel(name = "*是否部署云平台",sort = 56,dictType = "is_no",comboReadDict = true) + @ApiModelProperty("是否部署云平台(字典)") + private Integer bsypt; + /** + * 云服务商名称 + */ + @Excel(name = "云服务商名称(“是否部署云平台”选择“是”必须填写,选择\n“否”则无需填写)",sort = 57,width = 45) + @Size(max= 100,message="云服务商名称长度不能超过100") + @ApiModelProperty("云服务商名称") + private String yfwsmc; + /** + * 网站访问协议/开通协议 + */ + @Excel(name = "*网站访问协议",sort = 64) + @Size(max= 255,message="网站访问协议/开通协议长度不能超过255") + @ApiModelProperty("网站访问协议/开通协议") + private String wzfwxy; + /** + * 系统部署方式 + */ + @Excel(name = "*系统部署方式",dictType = "zc_xtbsfs",comboReadDict = true,sort = 59) + @NotNull + @ApiModelProperty("系统部署方式") + private Integer xtbsfs; + /** + * 托管单位 + */ + @Excel(name = "托管单位(系统部署方式选择“托管第三方”此项必填)",sort = 60,width = 45) + @Size(max= 100,message="托管单位长度不能超过100") + @ApiModelProperty("托管单位") + private String tgdw; + /** + * 云服务商 + */ + @Excel(name = "云服务商(系统部署方式选择“云上”此项必填)",sort = 61) + @Size(max= 100,message="云服务商长度不能超过100") + @ApiModelProperty("云服务商") + private String yfws; + /** + * 是否对公众开放(字典) + */ + @Excel(name = "*是否对公众开放",dictType = "is_no",comboReadDict = true,sort = 62,width = 22) + @NotNull + @ApiModelProperty("是否对公众开放(字典)") + private Integer dgzkf; + /** + * 互联网开放用途(字典) + */ + @NotNull + @Excel(name = "*互联网开放用途",dictType = "zc_hlwkfyt",comboReadDict = true,sort = 63,width = 22) + @ApiModelProperty("互联网开放用途(字典)") + private Integer hlwkfyt; + /** + * 系统防护情况-防篡改(多选字典) + */ + @ApiModelProperty("系统防护情况-防篡改(多选字典)") + private String xtfhqkFcg; + /** + * 系统防护情况-防泄露(多选字典) + */ + @ApiModelProperty("系统防护情况-防泄露(多选字典)") + private String xtfhqkFxl; + /** + * 系统防护情况-防中断(多选字典) + */ + @ApiModelProperty("系统防护情况-防中断(多选字典)") + private String xtfhqkFzd; + /** + * 系统防护情况-防勒索(多选字典) + */ + @ApiModelProperty("系统防护情况-防勒索(多选字典)") + private String xtfhqkFls; + /** + * 相关业务-覆盖范围 + */ + @ApiModelProperty("相关业务-覆盖范围") + private Integer xgywFgfw; + /** + * 相关业务-网络性质 + */ + @ApiModelProperty("相关业务-网络性质") + private Integer xgywWlxz; + /** + * 相关业务-业务类型 + */ + @ApiModelProperty("相关业务-业务类型") + private Integer xgywYwlx; + /** + * 相关业务-互联情况 + */ + @ApiModelProperty("相关业务-互联情况") + private Integer xgywHlqk; + /** + * 相关业务-服务对象 + */ + @ApiModelProperty("相关业务-服务对象") + private Integer xgywFwdx; + /** + * 相关业务-服务范围 + */ + @ApiModelProperty("相关业务-服务范围") + private Integer xgywFwfw; + /** + * 相关业务-业务描述 + */ + @NotNull + @Size(max= 500,message="相关业务-业务描述长度不能超过255") + @ApiModelProperty("相关业务-业务描述") + private String xgywYwms; + + @Excel(name = "责任人",sort = 14) + @ApiModelProperty("责任人") + @TableField(exist = false) + private String zrr; + /** + * 分管负责人姓名 + */ + @Excel(name = "*分管负责人",sort = 15) + @NotBlank + @Size(max= 50,message="分管负责人姓名长度不能超过50") + @ApiModelProperty("分管负责人姓名") + private String fgfzrxm; + /** + * 分管负责人联系方式 + */ + @Excel(name = "*分管负责人电话",sort = 16,width = 24) + @NotBlank + @Size(max= 50,message="分管负责人联系方式长度不能超过50") + @ApiModelProperty("分管负责人联系方式") + private String fgfzrlxfs; + /** + * 分管负责人邮箱 + */ + @Excel(name = "*分管负责人邮箱",sort = 17,width = 24) + @Size(max= 50,message="分管负责人邮箱长度不能超过50") + @ApiModelProperty("分管负责人邮箱") + private String fgfzryx; + /** + * 部门负责人姓名 + */ + @Excel(name = "*部门负责人",sort = 18) + @NotBlank + @Size(max= 50,message="部门负责人姓名长度不能超过50") + @ApiModelProperty("部门负责人姓名") + private String bmfzrxm; + /** + * 部门负责人联系方式 + */ + @Excel(name = "*部门负责人电话",sort = 19,width = 24) + @NotBlank + @Size(max= 50,message="部门负责人联系方式长度不能超过50") + @ApiModelProperty("部门负责人联系方式") + private String bmfzrlxfs; + /** + * 部门负责人邮箱 + */ + @Excel(name = "*部门负责人邮箱",sort = 20,width = 24) + @Size(max= 50,message="部门负责人邮箱长度不能超过50") + @ApiModelProperty("部门负责人邮箱") + private String bmfzryx; + /** + * 第一联系人姓名 + */ + @Excel(name = "*第一联系人",sort = 21) + @NotBlank + @Size(max= 50,message="第一联系人姓名长度不能超过50") + @ApiModelProperty("第一联系人姓名") + private String dylxrxm; + /** + * 第一联系人联系方式 + */ + @NotBlank + @Excel(name = "*第一联系人电话",sort = 22,width = 24) + @Size(max= 50,message="第一联系人联系方式长度不能超过50") + @ApiModelProperty("第一联系人联系方式") + private String dylxrlxfs; + /** + * 第一联系人邮箱 + */ + @Excel(name = "*第一联系人邮箱",sort = 23,width = 24) + @Size(max= 50,message="第一联系人邮箱长度不能超过50") + @ApiModelProperty("第一联系人邮箱") + private String dylxryx; + /** + * ICP备案信息-是否备案 + */ + @Excel(name = "*ICP备案状态",dictType = "is_no",comboReadDict = true,sort = 24) + @NotNull + @ApiModelProperty("ICP备案信息-是否备案") + private Integer ipcSfba; + /** + * ICP备案信息-备案有效性 + */ + @ApiModelProperty("ICP备案信息-备案有效性") + private Integer ipcBayxx; + /** + * ICP备案信息-备案网站名称 + */ + @Size(max= 50,message="ICP备案信息-备案网站名称长度不能超过50") + @ApiModelProperty("ICP备案信息-备案网站名称") + private String ipcBawzmc; + /** + * ICP备案信息-备案网站首页 + */ + @Size(max= 50,message="ICP备案信息-备案网站名称长度不能超过50") + @ApiModelProperty("ICP备案信息-备案网站首页") + private String ipcBawzsy; + /** + * ICP备案信息-ICP备案编号 + */ + @Excel(name = "ICP备案编号(ICP备案状态选择为是则必填)",sort = 25,width = 46) + @NotBlank + @Size(max= 50,message="ICP备案信息-ICP备案编号长度不能超过50") + @ApiModelProperty("ICP备案信息-ICP备案编号") + private String ipcIpcbabh; + /** + * ICP备案信息-备案域名 + */ + @Excel(name = "*备案域名",sort = 26) + @NotBlank + @Size(max= 50,message="ICP备案信息-备案域名长度不能超过50") + @ApiModelProperty("ICP备案信息-备案域名") + private String ipcBaym; + /** + * ICP备案信息-备案单位名称 + */ + @Size(max= 50,message="ICP备案信息-备案单位名称长度不能超过50") + @ApiModelProperty("ICP备案信息-备案单位名称") + private String ipcBadwmc; + /** + * ICP备案信息-备案单位性质 + */ + @ApiModelProperty("ICP备案信息-备案单位性质") + private Integer ipcBadwxz; + /** + * ICP备案信息-备案联系人 + */ + @Size(max= 50,message="ICP备案信息-备案联系人长度不能超过50") + @ApiModelProperty("ICP备案信息-备案联系人") + private String ipcBalxr; + /** + * ICP备案信息-备案联系人电话 + */ + @Size(max= 50,message="ICP备案信息-备案联系人电话长度不能超过50") + @ApiModelProperty("ICP备案信息-备案联系人电话") + private String ipcBalxrdh; + /** + * 审核时间 + */ + @Size(max= 50,message="审核时间长度不能超过50") + @ApiModelProperty("审核时间") + private String shsj; + /** + * 公安机关备案信息-是否备案 + */ + @NotNull + @Excel(name = "*公安机关备案状态",dictType = "is_no",comboReadDict = true,sort = 27,width = 24) + @ApiModelProperty("公安机关备案信息-是否备案") + private Integer gajgSfba; + /** + * 公安机关备案信息-备案机关 + */ + @Size(max= 50,message="公安机关备案信息-备案机关长度不能超过50") + @ApiModelProperty("公安机关备案信息-备案机关") + private String gajgBajg; + /** + * 公安机关备案信息-公安机关备案号 + */ + @Excel(name = "*公安机关备案号",sort = 28,width = 22) + @Size(max= 50,message="公安机关备案信息-公安机关备案号长度不能超过50") + @ApiModelProperty("公安机关备案信息-公安机关备案号") + @NotBlank + private String gajgBah; + /** + * 公安机关备案信息-备案日期 + */ + @Size(max= 50,message="公安机关备案信息-备案日期长度不能超过50") + @ApiModelProperty("公安机关备案信息-备案日期") + private String gajgBarq; + /** + * 系统架构-开发商 + */ + @NotBlank + @Excel(name = "*开发商",sort = 29) + @Size(max= 50,message="系统架构-开发商长度不能超过50") + @ApiModelProperty("系统架构-开发商") + private String xtjgKfs; + /** + * 系统架构-系统版本 + */ + @Excel(name = "*系统版本",sort = 30) + @NotBlank + @Size(max= 50,message="系统架构-系统版本长度不能超过50") + @ApiModelProperty("系统架构-系统版本") + private String xtjgXtbb; + /** + * 系统架构-技术架构 + */ + @Excel(name = "*技术架构",sort = 31) + @NotBlank + @Size(max= 50,message="系统架构-技术架构长度不能超过50") + @ApiModelProperty("系统架构-技术架构") + private String xtjgJsjg; + /** + * 系统架构-服务组件 + */ + @Excel(name = "*服务组件",sort = 32) + @NotBlank + @Size(max= 50,message="系统架构-服务组件长度不能超过50") + @ApiModelProperty("系统架构-服务组件") + private String xtjgFwzj; + /** + * 系统架构-web容器名称 + */ + @Excel(name = "*Web容器版本",sort = 33) + @NotBlank + @Size(max= 50,message="系统架构-web容器名称长度不能超过50") + @ApiModelProperty("系统架构-web容器名称") + private String xtjgWebMc; + /** + * 系统架构-web容器版本 + */ + @Excel(name = "*Web容器名称",sort = 34) + @NotBlank + @Size(max= 50,message="系统架构-web容器版本长度不能超过50") + @ApiModelProperty("系统架构-web容器版本") + private String xtjgWebBb; + /** + * 系统架构-是否国产化系统 + */ + @Excel(name = "*是否国产化系统",dictType = "is_no",comboReadDict = true,sort = 35,width = 22) + @NotNull + @ApiModelProperty("系统架构-是否国产化系统") + private Integer xtjgGcxt; + /** + * 系统架构-是否有国产设备 + */ + @Excel(name = "*是否有国产设备",dictType = "is_no",comboReadDict = true,sort = 35,width = 22) + @NotNull + @ApiModelProperty("系统架构-是否有国产设备") + private Integer xtjgGcsb; + /** + * 系统架构-系统设备国产化率 + */ + @Size(max= 50,message="系统架构-系统设备国产化率长度不能超过50") + @ApiModelProperty("系统架构-系统设备国产化率") + private String xtjgGchl; + /** + * 等保信息-是否等保系统 + */ + @Excel(name = "*是否是等保系统",dictType = "is_no",comboReadDict = true,sort = 42) + @NotNull + @ApiModelProperty("等保信息-是否等保系统") + private Integer dbxxSfdbxt; + /** + * 等保信息-等保测评备案号 + */ + @NotBlank + @Excel(name = "*等保测评备案号",sort = 43,width = 22) + @Size(max= 50,message="等保信息-等保测评备案号长度不能超过50") + @ApiModelProperty("等保信息-等保测评备案号") + private String dbxxDbcpbah; + /** + * 等保信息-等保等级 + */ + @NotNull + @Excel(name = "*等保等级",dictType = "dbxx_dbdj",comboReadDict = true,sort = 44) + @ApiModelProperty("等保信息-等保等级") + private Integer dbxxDbdj; + /** + * 等保信息-主管部门 + */ + @Size(max= 50,message="等保信息-主管部门长度不能超过50") + @ApiModelProperty("等保信息-主管部门") + private String dbxxZgbm; + /** + * 等保信息-专家评审 + */ + @ApiModelProperty("等保信息-专家评审") + private Integer dbxxZjps; + /** + * 等保信息-主管部门评审 + */ + @ApiModelProperty("等保信息-主管部门评审") + private Integer dbxxZgbmps; + /** + * 等保信息-定级时间 + */ + @NotBlank + @Excel(name = "定级时间(是否是等保系统是则必填,样式如2024-11-02)",sort = 119,width = 40) + @Size(max= 50,message="等保信息-定级时间长度不能超过50") + @ApiModelProperty("等保信息-定级时间") + private String dbxxDjsj; + /** + * 等保信息-是否有第三方测评 + */ + @ApiModelProperty("等保信息-是否有第三方测评") + @NotNull + @Excel(name = "是否有第三方测评(是否是等保系统选择是则必填)",width = 45,dictType = "is_no",comboReadDict = true,sort = 45) + private Integer dbxxSfydsfcp; + + @ApiModelProperty("地理位置-省") + @Excel(name = "地理位置-省",sort = 46) + @TableField(exist = false) + private String sheng; + + @ApiModelProperty("地理位置-市") + @Excel(name = "地理位置-市",sort = 47) + @TableField(exist = false) + private String shi; + + @ApiModelProperty("地理位置-区(县)") + @Excel(name = "地理位置-区(县)",sort = 48) + @TableField(exist = false) + private String qu; + /** + * 等保信息-测评得分 + */ + @NotBlank + @Excel(name = "*测评得分",sort = 49) + @Size(max= 50,message="等保信息-测评得分长度不能超过50") + @ApiModelProperty("等保信息-测评得分") + private String dbxxCpdf; + /** + * 第三方测评-测评机构名称 + */ + @Size(max= 255,message="第三方测评-测评机构名称长度不能超过255") + @ApiModelProperty("第三方测评-测评机构名称") + private String sfCpjgmc; + /** + * 第三方测评-测评机构联系人 + */ + @Size(max= 50,message="第三方测评-测评机构联系人长度不能超过50") + @ApiModelProperty("第三方测评-测评机构联系人") + private String sfCpjglxr; + /** + * 第三方测评-测评机构地址 + */ + @Size(max= 255,message="第三方测评-测评机构地址长度不能超过255") + @ApiModelProperty("第三方测评-测评机构地址") + private String sfCpjgdz; + /** + * 第三方测评-测评机构联系人电话 + */ + @Size(max= 50,message="第三方测评-测评机构联系人电话长度不能超过50") + @ApiModelProperty("第三方测评-测评机构联系人电话") + private String sfCpjglxrdh; + /** + * 第三方测评-测评时联系人 + */ + @Size(max= 50,message="第三方测评-测评时联系人长度不能超过50") + @ApiModelProperty("第三方测评-测评时联系人") + private String sfCpslxr; + /** + * 第三方测评-测评师姓名 + */ + @Size(max= 50,message="第三方测评-测评师姓名长度不能超过50") + @ApiModelProperty("第三方测评-测评师姓名") + private String sfCpsxm; + /** + * 第三方测评-测评时联系人电话 + */ + @Size(max= 50,message="第三方测评-测评时联系人电话长度不能超过50") + @ApiModelProperty("第三方测评-测评时联系人电话") + private String sfCpslxrdh; + /** + * 第三方测评-测评师电话 + */ + @Size(max= 50,message="第三方测评-测评师电话长度不能超过50") + @ApiModelProperty("第三方测评-测评师电话") + private String sfCpsdh; + /** + * 第三方测评-推荐等保办 + */ + @Size(max= 255,message="第三方测评-推荐等保办长度不能超过255") + @ApiModelProperty("第三方测评-推荐等保办") + private String sfTjdbb; + /** + * 第三方测评-测评师证书等级 + */ + @ApiModelProperty("第三方测评-测评师证书等级") + private Integer sfCpszsdj; + /** + * 第三方测评-测评等级 + */ + @ApiModelProperty("第三方测评-测评等级") + private Integer sfCpdj; + /** + * 第三方测评-推荐日期 + */ + @Size(max= 50,message="第三方测评-推荐日期长度不能超过50") + @ApiModelProperty("第三方测评-推荐日期") + private String sfTjrq; + /** + * 第三方测评-报告日期 + */ + @Size(max= 50,message="第三方测评-报告日期长度不能超过50") + @ApiModelProperty("第三方测评-报告日期") + private String sfBgrq; + /** + * 第三方测评-测评结论 + */ + @Size(max= 255,message="第三方测评-测评结论长度不能超过255") + @ApiModelProperty("第三方测评-测评结论") + private String sfCpjl; + /** + * 密评信息-是否密评系统 + */ + @Excel(name = "是否密评系统",dictType = "is_no",comboReadDict = true,sort = 50,width = 22) + @Size(max= 50,message="密评信息-是否密评系统长度不能超过50") + @ApiModelProperty("密评信息-是否密评系统") + private String mpSfmpxt; + /** + * 密评信息-密评得分 + */ + @Excel(name = "密评得分",sort = 51) + @Size(max= 50,message="密评信息-密评得分长度不能超过50") + @ApiModelProperty("密评信息-密评得分") + private String mpMpdf; + + /** + * 供应链信息(id集合逗号分隔) + */ + @Size(max= 255,message="供应链信息长度不能超过255") + @ApiModelProperty("供应链信息(id集合逗号分隔)") + private String gylxx; + /** + * 基础网络(id集合逗号分隔) + */ + @Size(max= 255,message="基础网络长度不能超过255") + @ApiModelProperty("基础网络(id集合逗号分隔)") + private String jcwl; + /** + * 新监管业务形态id + */ + @ApiModelProperty("新监管业务形态id") + private Long xjgywxt; + /** + * Whois信息-有效性 + */ + @ApiModelProperty("Whois信息-有效性") + private Integer whoisYxx; + /** + * Whois信息-注册名 + */ + @Size(max= 50,message="Whois信息-注册名长度不能超过50") + @ApiModelProperty("Whois信息-注册名") + private String whoisZcm; + /** + * Whois信息-服务商 + */ + @Size(max= 50,message="Whois信息-服务商长度不能超过50") + @ApiModelProperty("Whois信息-服务商") + private String whoisFws; + /** + * Whois信息-注册邮箱 + */ + @Size(max= 50,message="Whois信息-注册邮箱长度不能超过50") + @ApiModelProperty("Whois信息-注册邮箱") + private String whoisZcyx; + /** + * Whois信息-注册国家 + */ + @Size(max= 50,message="Whois信息-注册国家长度不能超过50") + @ApiModelProperty("Whois信息-注册国家") + private String whoisZcgj; + /** + * Whois信息-注册省 + */ + @Size(max= 50,message="Whois信息-注册省长度不能超过50") + @ApiModelProperty("Whois信息-注册省") + private String whoisZcs; + /** + * Whois信息-注册地址 + */ + @Size(max= 255,message="Whois信息-注册地址长度不能超过255") + @ApiModelProperty("Whois信息-注册地址") + private String whoisZcdz; + /** + * Whois信息-注册机构 + */ + @Size(max= 50,message="Whois信息-注册机构长度不能超过50") + @ApiModelProperty("Whois信息-注册机构") + private String whoisZcjg; + /** + * Whois信息-注册时间 + */ + @Size(max= 50,message="Whois信息-注册时间长度不能超过50") + @ApiModelProperty("Whois信息-注册时间") + private String whoisZcsj; + /** + * Whois信息-最后更新时间 + */ + @Size(max= 50,message="Whois信息-最后更新时间长度不能超过50") + @ApiModelProperty("Whois信息-最后更新时间") + private String whoisZhgxsj; + /** + * Whois信息-到期时间 + */ + @Size(max= 50,message="Whois信息-到期时间长度不能超过50") + @ApiModelProperty("Whois信息-到期时间") + private String whoisDqsj; + /** + * 数据资产-数据库名称 + */ + @Excel(name = "*数据库名称",sort = 98) + @Size(max= 50,message="编码长度不能超过255") + @ApiModelProperty("数据资产-数据库名称") + private String sjzcSjkmc; + /** + * 数据资产-数据库类型 + */ + @NotBlank + @Excel(name = "*数据库类型",sort = 99) + @Size(max= 50,message="数据资产-数据库类型长度不能超过50") + @ApiModelProperty("数据资产-数据库类型") + private String sjzcSjklx; + /** + * 数据资产-端口 + */ + @Excel(name = "*数据库端口",sort = 100) + @NotBlank + @Size(max= 50,message="数据资产-端口长度不能超过50") + @ApiModelProperty("数据资产-端口") + private String sjzcDk; + /** + * 数据资产-数据库版本 + */ + @Excel(name = "*数据库版本",sort = 101) + @NotBlank + @Size(max= 50,message="数据资产-数据库版本长度不能超过255") + @ApiModelProperty("数据资产-数据库版本") + private String sjzcSjkbb; + /** + * 数据资产-数据库所在IP + */ + @Excel(name = "*数据库所在IP",sort = 102) + @Size(max= 50,message="数据资产-数据库所在IP长度不能超过50") + @ApiModelProperty("数据资产-数据库所在IP") + private String sjzcSjkIp; + /** + * 数据资产-共享属性 + */ + @NotNull + @Excel(name = "*共享属性",dictType = "sjzc_gxsx",comboReadDict = true,sort = 103) + @ApiModelProperty("数据资产-共享属性") + private Integer sjzcGxsx; + /** + * 数据资产-开放属性 + */ + @Excel(name = "*开放属性",dictType = "sjzc_kfsx",comboReadDict = true,sort = 104) + @NotNull + @ApiModelProperty("数据资产-开放属性") + private Integer sjzcKfsx; + /** + * 数据资产-数据领域 + */ + @NotNull + @Excel(name = "*数据领域",dictType = "sjzc_sjly",comboReadDict = true,sort = 105) + @ApiModelProperty("数据资产-数据领域") + private Integer sjzcSjly; + /** + * 数据资产-更新周期 + */ + @NotNull + @Excel(name = "*更新周期",dictType = "sjzc_gxzq",comboReadDict = true,sort = 106) + @ApiModelProperty("数据资产-更新周期") + private Integer sjzcGxzq; + /** + * 数据资产-数据类型 + */ + @NotBlank + @Excel(name = "*数据类型",sort = 107) + @Size(max= 255,message="数据资产-数据类型长度不能超过255") + @ApiModelProperty("数据资产-数据类型") + private String sjzcSjlx; + /** + * 数据资产-数据量 + */ + @NotBlank + @Excel(name = "*数据量",sort = 108) + @Size(max= 255,message="数据资产-数据量长度不能超过255") + @ApiModelProperty("数据资产-数据量") + private String sjzcSjl; + + @Excel(name = "*数据量单位",sort = 109) + @ApiModelProperty("数据资产-数据量单位") + @TableField(exist = false) + private String sjzcSjldw; + /** + * 数据资产-是否为涉密数据 + */ + @NotNull + @Excel(name = "*是否为涉密数据",dictType = "is_no",comboReadDict = true,sort = 110) + @ApiModelProperty("数据资产-是否为涉密数据") + private Integer sjzcSmsj; + /** + * 数据资产-数据是否出境 + */ + @NotNull + @Excel(name = "*数据是否出境",dictType = "is_no",comboReadDict = true,sort = 111) + @ApiModelProperty("数据资产-数据是否出境") + private Integer sjzcCj; + /** + * 数据资产-数据分级分类 + */ + @NotNull + @Excel(name = "*数据分级分类",dictType = "sjzc_sjfjfl",comboReadDict = true,sort = 112) + @ApiModelProperty("数据资产-数据分级分类") + private Integer sjzcSjfjfl; + /** + * 数据资产-数据重要程度 + */ + @NotNull + @Excel(name = "数据重要程度",dictType = "zc_xtzyx",comboReadDict = true,sort = 113) + @ApiModelProperty("数据资产-数据重要程度") + private Integer sjzcSjzycd; + /** + * 数据资产-数据描述 + */ + @Size(max= 500,message="数据资产-数据描述长度不能超过500") + @ApiModelProperty("数据资产-数据描述") + @Excel(name = "数据描述",sort = 114) + private String sjzcSjms; + + @ApiModelProperty("*业务描述") + @Excel(name = "*业务描述",sort = 115) + @TableField(exist = false) + private String ywms; + /** + * 业务系统拓扑图 + */ + @Size(max= 500,message="业务系统拓扑图长度不能超过500") + @ApiModelProperty("业务系统拓扑图") + private String ywxttpt; +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/AssetExport.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/AssetExport.java new file mode 100644 index 0000000..d307f30 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/AssetExport.java @@ -0,0 +1,129 @@ +package com.ruoyi.tc.entity; + +import com.ruoyi.common.annotation.Excel; +import io.swagger.annotations.ApiModel; +import lombok.Data; + +/** + * 导入导出模板读取字段 + * @author du + * @since 2024/11/18 8:55 + */ +@Data +@ApiModel("导入导出模板读取字段") +public class AssetExport extends AssetCurrent{ + /** + * 名称 + */ + @Excel(name = "*系统建设单位名称",width=26,sort = 65) + private String name; + /** + * 统一信用代码 + */ + @Excel(name = "*系统建设单位统一信用代码",width=26,sort = 66) + private String tyshxydm; + /** + * 联系人 + */ + @Excel(name = "*系统建设单位联系人",width=26,sort = 67) + private String lxr; + /** + * 联系电话 + */ + @Excel(name = "*系统建设单位联系电话",width=26,sort = 68) + private String lxdh; + /** + * 供应商注册地址 + */ + @Excel(name = "*系统建设单位供应商注册地址",width=26,sort = 69) + private String gyszcdz; + /** + * 注册地是否为太仓 + */ + @Excel(name = "*系统建设单位注册地址是否为太仓",width=26,sort = 70,dictType = "is_no",comboReadDict = true) + private Integer sfwtc; + + /** + * 设备类型 + */ + @Excel(name = "*服务器信息-设备类型",width=26,sort = 77) + private String sblx; + /** + * 品牌 + */ + @Excel(name = "*服务器信息-品牌",width=26,sort = 78) + private String pp; + /** + * 设备IP + */ + @Excel(name = "*服务器信息-设备IP",width=26,sort = 79) + private String sbIp; + /** + * 操作系统 + */ + @Excel(name = "*服务器信息-操作系统",width=26,sort = 80,dictType = "fwq_czxt",comboReadDict = true) + private Integer czxt; + /** + * 操作系统版本 + */ + @Excel(name = "*服务器信息-操作系统版本",width=26,sort = 81) + private String czxtbb; + /** + * 硬件型号 + */ + @Excel(name = "*服务器信息-硬件型号",width=26,sort = 82) + private String yjxh; + /** + * 硬件序列号 + */ + @Excel(name = "服务器信息-硬件序列号",width=26,sort = 83) + private String yjxlh; + /** + * 硬件版本信息 + */ + @Excel(name = "服务器信息-硬件版本信息",width=26,sort = 84) + private String yjbbxx; + /** + * 硬件用途 + */ + @Excel(name = "*服务器信息-硬件用途",width=26,sort = 85) + private String yjyt; + /** + * 硬件部署位置 + */ + @Excel(name = "*服务器信息-硬件部署位置",width=26,sort = 85) + private String yjbsxx; + + @Excel(name = "*网络设备-设备类型",width=26,sort = 86) + private String wlsblx; + + @Excel(name = "*网络设备-品牌",width=26,sort = 87) + private String wlpp; + + @Excel(name = "*网络设备-设备IP",width=26,sort = 88) + private String wlsbIp; + + @Excel(name = "*网络设备-硬件型号",width=26,sort = 89) + private String wlyjxh; + + @Excel(name = "网络设备-硬件序列号",width=26,sort = 90) + private String wlyjxlh; + + @Excel(name = "网络设备-硬件版本信息",width=26,sort = 91) + private String wlyjbbxx; + + @Excel(name = "*网络设备-硬件用途",width=26,sort = 92) + private String wlyjyt; + + @Excel(name = "*网络设备-硬件部署位置",width=26,sort = 93) + private String wlyjbsxx; + + @Excel(name = "*安全设备-设备类型",width=26,sort = 94) + private String aqwlsblx; + + @Excel(name = "*安全设备-品牌",width=26,sort = 95) + private String aqwlpp; + + @Excel(name = "*安全设备-设备IP",width=26,sort = 96) + private String aqwlsbIp; +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/AssetSupplyChain.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/AssetSupplyChain.java new file mode 100644 index 0000000..163db5c --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/AssetSupplyChain.java @@ -0,0 +1,75 @@ +package com.ruoyi.tc.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.ruoyi.tc.baseClass.BaseClass; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.hibernate.validator.constraints.Length; + +import javax.validation.constraints.NotNull; +import javax.validation.constraints.Size; +import java.io.Serializable; +import java.util.Date; + +/** + * 资产供应链信息(asset_supply_chain)实体类 + * @author du + * @since 2024/11/13 14:44 + */ +@Data +@ApiModel("资产供应链信息") +@TableName(value = "asset_supply_chain") +public class AssetSupplyChain extends BaseClass implements Serializable { + + @TableId(value = "id",type = IdType.AUTO) + private Integer id; + /** + * 资产id + */ + @ApiModelProperty("资产id") + private Long assetId; + /** + * 1.测评单位2.硬件供应商单位3.机房运维单位4.系统设计单位5.系统建设单位6.安全服务单位 + */ + @ApiModelProperty("1.测评单位2.硬件供应商单位3.机房运维单位4.系统设计单位5.系统建设单位6.安全服务单位") + private Integer type; + /** + * 名称 + */ + @Size(max= 50,message="名称长度不能超过50") + @ApiModelProperty("名称") + private String name; + /** + * 统一信用代码 + */ + @Size(max= 50,message="统一信用代码长度不能超过50") + @ApiModelProperty("统一信用代码") + private String tyshxydm; + /** + * 联系人 + */ + @Size(max= 50,message="联系人长度不能超过50") + @ApiModelProperty("联系人") + private String lxr; + /** + * 联系电话 + */ + @Size(max= 50,message="联系电话长度不能超过50") + @ApiModelProperty("联系电话") + private String lxdh; + /** + * 供应商注册地址 + */ + @Size(max= 500,message="供应商注册地址长度不能超过500") + @ApiModelProperty("供应商注册地址") + private String gyszcdz; + /** + * 注册地是否为太仓 + */ + @ApiModelProperty("注册地是否为太仓") + private Integer sfwtc; + +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/UnitOtherConcat.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/UnitOtherConcat.java new file mode 100644 index 0000000..7570843 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/UnitOtherConcat.java @@ -0,0 +1,42 @@ +package com.ruoyi.tc.entity; + +import com.baomidou.mybatisplus.annotation.*; +import com.ruoyi.tc.baseClass.BaseClass; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotNull; +import java.io.Serializable; + +/** + * 单位其他联系人(unit_other_contact)实体类 + * @author du + * @since 2024/11/13 14:44 + */ +@Data +@ApiModel("单位其他联系人") +@TableName(value = "unit_other_contact") +public class UnitOtherConcat extends BaseClass implements Serializable { + + @TableId(type = IdType.AUTO,value = "id") + private Long id; + + @ApiModelProperty("单位id") + @NotNull + private Long unitId; + + @ApiModelProperty("其他联系人姓名") + private String qtlxrxm; + + @ApiModelProperty("其他联系人联系方式") + private String qtlxrlxfs; + + @ApiModelProperty("其他联系人邮箱") + private String qtlxryx; + + @ApiModelProperty("其他联系人职务职称") + private String qtlxrzwzc; + + +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/request/AssetCurrentPageRequest.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/request/AssetCurrentPageRequest.java new file mode 100644 index 0000000..9c3628c --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/request/AssetCurrentPageRequest.java @@ -0,0 +1,57 @@ +package com.ruoyi.tc.entity.request; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.util.Date; + +/** + * 现有资产分页查询请求类 + * @author du + * @since 2024/11/15 15:37 + */ +@Data +public class AssetCurrentPageRequest { + + /** + * 系统名称 + */ + @ApiModelProperty("系统名称") + private String xtmc; + + /** + * 系统类型(字典) + */ + @ApiModelProperty("系统类型(字典)") + private Integer xtlx; + + /** + * 单位名称 + */ + @ApiModelProperty("单位名称") + private String dwmc; + + /** + * 系统状态(字典) + */ + @ApiModelProperty("系统状态(字典)") + private Integer xtzt; + + /** + * 开始时间 + */ + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @ApiModelProperty("开始时间") + private Date startTime; + + /** + * 结束时间 + */ + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @ApiModelProperty("结束时间") + private Date endTime; +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetBasicNetWorkMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetBasicNetWorkMapper.java new file mode 100644 index 0000000..bee7e16 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetBasicNetWorkMapper.java @@ -0,0 +1,19 @@ +package com.ruoyi.tc.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.ruoyi.tc.entity.AssetBasicNetwork; + +import java.util.List; + +/** + * 资产基础网络表(asset_basic_network)表数据库访问层 + * @author makejava + * @since 2024-11-15 10:03:56 + */ +public interface AssetBasicNetWorkMapper extends BaseMapper { + /** + * 根据资产id查询对应的基础网络 + */ + List getByAssetId(Long id); +} + diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetBusinessFormMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetBusinessFormMapper.java new file mode 100644 index 0000000..6136895 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetBusinessFormMapper.java @@ -0,0 +1,14 @@ +package com.ruoyi.tc.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.ruoyi.tc.entity.AssetBusinessForm; + +/** + * 资产新监管业务形态(asset_business_form)表数据库访问层 + * + * @author makejava + * @since 2024-11-15 10:03:56 + */ +public interface AssetBusinessFormMapper extends BaseMapper { +} + diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetCurrentMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetCurrentMapper.java new file mode 100644 index 0000000..1f71965 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetCurrentMapper.java @@ -0,0 +1,30 @@ +package com.ruoyi.tc.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.ruoyi.tc.entity.AssetCurrent; +import com.ruoyi.tc.entity.request.AssetCurrentPageRequest; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 现有资产表(AssetCurrent)表数据库访问层 + * + * @author makejava + * @since 2024-11-15 10:03:56 + */ +public interface AssetCurrentMapper extends BaseMapper { + + /** + * 分页查询所有数据 + * + * @param page 分页对象 + * @param as 查询实体 + * @return 所有数据 + */ + Page page(Page page,@Param("req") AssetCurrentPageRequest as); + + List page(@Param("req") AssetCurrentPageRequest as); +} + diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetSupplyChainMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetSupplyChainMapper.java new file mode 100644 index 0000000..534b61f --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetSupplyChainMapper.java @@ -0,0 +1,19 @@ +package com.ruoyi.tc.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.ruoyi.tc.entity.AssetSupplyChain; + +/** + * 资产供应链信息(asset_supply_chain)表数据库访问层 + * + * @author makejava + * @since 2024-11-15 10:03:56 + */ +public interface AssetSupplyChainMapper extends BaseMapper { + + /** + * 根据现有资产id查找最新一条的系统建设单位 + */ + AssetSupplyChain getJsdw(Long id); +} + diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/UnitOtherConcatMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/UnitOtherConcatMapper.java index f0d7407..102376a 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/UnitOtherConcatMapper.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/UnitOtherConcatMapper.java @@ -1,11 +1,7 @@ package com.ruoyi.tc.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.ruoyi.common.core.domain.entity.SysDept; -import com.ruoyi.tc.domain.UnitOtherConcat; -import org.apache.ibatis.annotations.Param; - -import java.util.List; +import com.ruoyi.tc.entity.UnitOtherConcat; /** * 单位其他联系人(unit_other_contact)数据层 diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/AssetBasicNetworkService.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/AssetBasicNetworkService.java new file mode 100644 index 0000000..24f2ba3 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/AssetBasicNetworkService.java @@ -0,0 +1,20 @@ +package com.ruoyi.tc.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.ruoyi.tc.entity.AssetBasicNetwork; + +import java.util.List; + +/** + * 资产基础网络表(asset_basic_network)表服务接口 + * + * @author makejava + * @since 2024-11-15 16:05:26 + */ +public interface AssetBasicNetworkService extends IService { + + /** + * 根据资产id查询对应的基础网络 + */ + List getByAssetId(Long id); +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/AssetBusinessFormService.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/AssetBusinessFormService.java new file mode 100644 index 0000000..572cf2c --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/AssetBusinessFormService.java @@ -0,0 +1,15 @@ +package com.ruoyi.tc.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.ruoyi.tc.entity.AssetBusinessForm; + +/** + * 资产新监管业务形态(asset_business_form)表服务接口 + * + * @author makejava + * @since 2024-11-15 16:06:53 + */ +public interface AssetBusinessFormService extends IService { + +} + diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/AssetCurrentService.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/AssetCurrentService.java new file mode 100644 index 0000000..a1d65c4 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/AssetCurrentService.java @@ -0,0 +1,36 @@ +package com.ruoyi.tc.service; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.IService; +import com.ruoyi.tc.entity.AssetCurrent; +import com.ruoyi.tc.entity.request.AssetCurrentPageRequest; + +import java.util.List; + +/** + * 现有资产表(AssetCurrent)表服务接口 + * + * @author makejava + * @since 2024-11-15 10:04:03 + */ +public interface AssetCurrentService extends IService { + + /** + * 分页查询所有数据 + * + * @param page 分页对象 + * @param as 查询实体 + * @return 所有数据 + */ + Page page(Page page, AssetCurrentPageRequest as ); + + /** + * 查询所有数据 + * + * @param as 查询实体 + * @return 所有数据 + */ + List page( AssetCurrentPageRequest as ); + +} + diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/AssetSupplyChainService.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/AssetSupplyChainService.java new file mode 100644 index 0000000..178bc5a --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/AssetSupplyChainService.java @@ -0,0 +1,17 @@ +package com.ruoyi.tc.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.ruoyi.tc.entity.AssetSupplyChain; + +/** + * 资产供应链信息(asset_supply_chain)表服务接口 + * @author makejava + * @since 2024-11-15 16:07:30 + */ +public interface AssetSupplyChainService extends IService { + + /** + * 根据现有资产id查找最新一条的系统建设单位 + */ + AssetSupplyChain getJsdw(Long id); +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/UnitOtherConcatService.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/UnitOtherConcatService.java index b4d43f6..6af1304 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/UnitOtherConcatService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/UnitOtherConcatService.java @@ -1,8 +1,7 @@ package com.ruoyi.tc.service; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.IService; -import com.ruoyi.tc.domain.UnitOtherConcat; +import com.ruoyi.tc.entity.UnitOtherConcat; /** * 单位其他联系人(unit_other_contact)业务层 diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetBasicNetworkServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetBasicNetworkServiceImpl.java new file mode 100644 index 0000000..6bccdeb --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetBasicNetworkServiceImpl.java @@ -0,0 +1,26 @@ +package com.ruoyi.tc.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.ruoyi.tc.entity.AssetBasicNetwork; +import com.ruoyi.tc.mapper.AssetBasicNetWorkMapper; +import com.ruoyi.tc.service.AssetBasicNetworkService; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 资产基础网络表(AssetBasicNetwork)表服务实现类 + * + * @author makejava + * @since 2024-11-15 16:05:26 + */ +@Service("assetBasicNetworkService") +public class AssetBasicNetworkServiceImpl extends ServiceImpl implements AssetBasicNetworkService { + /** + * 根据资产id查询对应的基础网络 + */ + @Override + public List getByAssetId(Long id) { + return baseMapper.getByAssetId(id); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetBusinessFormServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetBusinessFormServiceImpl.java new file mode 100644 index 0000000..ad22690 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetBusinessFormServiceImpl.java @@ -0,0 +1,19 @@ +package com.ruoyi.tc.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.ruoyi.tc.entity.AssetBusinessForm; +import com.ruoyi.tc.mapper.AssetBusinessFormMapper; +import com.ruoyi.tc.service.AssetBusinessFormService; +import org.springframework.stereotype.Service; + +/** + * 资产新监管业务形态(AssetBusinessForm)表服务实现类 + * + * @author makejava + * @since 2024-11-15 16:06:53 + */ +@Service("assetBusinessFormService") +public class AssetBusinessFormServiceImpl extends ServiceImpl implements AssetBusinessFormService { + +} + diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetCurrentServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetCurrentServiceImpl.java new file mode 100644 index 0000000..8e3f6bf --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetCurrentServiceImpl.java @@ -0,0 +1,45 @@ +package com.ruoyi.tc.service.impl; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.ruoyi.tc.entity.AssetCurrent; +import com.ruoyi.tc.entity.request.AssetCurrentPageRequest; +import com.ruoyi.tc.mapper.AssetCurrentMapper; +import com.ruoyi.tc.service.AssetCurrentService; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 现有资产表(AssetCurrent)表服务实现类 + * + * @author makejava + * @since 2024-11-15 10:04:03 + */ +@Service("assetCurrentService") +public class AssetCurrentServiceImpl extends ServiceImpl implements AssetCurrentService { + + /** + * 分页查询所有数据 + * + * @param page 分页对象 + * @param as 查询实体 + * @return 所有数据 + */ + @Override + public Page page(Page page, AssetCurrentPageRequest as) { + return baseMapper.page(page,as); + } + + /** + * 查询所有数据 + * + * @param as 查询实体 + * @return 所有数据 + */ + @Override + public List page(AssetCurrentPageRequest as) { + return baseMapper.page(as); + } +} + diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetSupplyChainServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetSupplyChainServiceImpl.java new file mode 100644 index 0000000..f7f746b --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetSupplyChainServiceImpl.java @@ -0,0 +1,25 @@ +package com.ruoyi.tc.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.ruoyi.tc.entity.AssetSupplyChain; +import com.ruoyi.tc.mapper.AssetSupplyChainMapper; +import com.ruoyi.tc.service.AssetSupplyChainService; +import org.springframework.stereotype.Service; + +/** + * 资产供应链信息表(AssetSupplyChain)表服务实现类 + * + * @author makejava + * @since 2024-11-15 16:07:30 + */ +@Service("assetSupplyChainService") +public class AssetSupplyChainServiceImpl extends ServiceImpl implements AssetSupplyChainService { + + /** + * 根据现有资产id查找最新一条的系统建设单位 + */ + @Override + public AssetSupplyChain getJsdw(Long id) { + return baseMapper.getJsdw(id); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/UnitOtherConcatServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/UnitOtherConcatServiceImpl.java index d00609d..788dff5 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/UnitOtherConcatServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/UnitOtherConcatServiceImpl.java @@ -1,7 +1,7 @@ package com.ruoyi.tc.service.impl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.ruoyi.tc.domain.UnitOtherConcat; +import com.ruoyi.tc.entity.UnitOtherConcat; import com.ruoyi.tc.mapper.UnitOtherConcatMapper; import com.ruoyi.tc.service.UnitOtherConcatService; import org.springframework.stereotype.Service; diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java index ab7b5bd..cb9894c 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java @@ -1,6 +1,5 @@ package com.ruoyi.web.controller.system; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.ruoyi.common.annotation.Log; import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.domain.AjaxResult; @@ -15,6 +14,8 @@ import com.ruoyi.common.utils.SecurityUtils; import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.system.service.*; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; import org.apache.commons.lang3.ArrayUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.access.prepost.PreAuthorize; @@ -33,6 +34,7 @@ import java.util.stream.Collectors; * @author ruoyi */ @RestController +@Api(tags = "用户信息") @RequestMapping("/system/user") public class SysUserController extends BaseController { @Autowired @@ -53,6 +55,7 @@ public class SysUserController extends BaseController { /** * 获取用户列表 */ + @ApiOperation(value = "获取用户列表") @PreAuthorize("@ss.hasPermi('system:user:list')") @GetMapping("/list") public TableDataInfo list(SysUser user) { @@ -60,7 +63,7 @@ public class SysUserController extends BaseController { List list = userService.selectUserList(user); return getDataTable(list); } - + @ApiOperation(value = "用户单位导出") @Log(title = "用户单位管理", businessType = BusinessType.EXPORT) @PreAuthorize("@ss.hasPermi('system:user:export')") @PostMapping("/export") @@ -72,7 +75,7 @@ public class SysUserController extends BaseController { ExcelUtil util = new ExcelUtil<>(Unit.class); util.exportExcel(response, list, "单位数据"); } - + @ApiOperation(value = "用户单位导入") @Log(title = "用户单位管理", businessType = BusinessType.IMPORT) @PreAuthorize("@ss.hasPermi('system:user:import')") @PostMapping("/importData") @@ -109,6 +112,7 @@ public class SysUserController extends BaseController { /** * 根据用户编号获取详细信息 */ + @ApiOperation(value = "根据用户编号获取详细信息") @PreAuthorize("@ss.hasPermi('system:user:query')") @GetMapping(value = {"/", "/{userId}"}) public AjaxResult getInfo(@PathVariable(value = "userId", required = false) Long userId) { @@ -131,6 +135,7 @@ public class SysUserController extends BaseController { /** * 新增用户 */ + @ApiOperation(value = "新增用户") @PreAuthorize("@ss.hasPermi('system:user:add')") @Log(title = "用户管理", businessType = BusinessType.INSERT) @PostMapping @@ -161,6 +166,7 @@ public class SysUserController extends BaseController { /** * 修改用户 */ + @ApiOperation(value = "修改用户") @PreAuthorize("@ss.hasPermi('system:user:edit')") @Log(title = "用户管理", businessType = BusinessType.UPDATE) @PutMapping @@ -191,6 +197,7 @@ public class SysUserController extends BaseController { /** * 删除用户 */ + @ApiOperation(value = "删除用户") @PreAuthorize("@ss.hasPermi('system:user:remove')") @Log(title = "用户管理", businessType = BusinessType.DELETE) @DeleteMapping("/{userIds}") @@ -204,6 +211,7 @@ public class SysUserController extends BaseController { /** * 重置密码 */ + @ApiOperation(value = "重置密码") @PreAuthorize("@ss.hasPermi('system:user:resetPwd')") @Log(title = "用户管理", businessType = BusinessType.UPDATE) @PutMapping("/resetPwd") @@ -218,6 +226,7 @@ public class SysUserController extends BaseController { /** * 状态修改 */ + @ApiOperation(value = "状态修改") @PreAuthorize("@ss.hasPermi('system:user:edit')") @Log(title = "用户管理", businessType = BusinessType.UPDATE) @PutMapping("/changeStatus") @@ -231,6 +240,7 @@ public class SysUserController extends BaseController { /** * 根据用户编号获取授权角色 */ + @ApiOperation(value = "根据用户编号获取授权角色") @PreAuthorize("@ss.hasPermi('system:user:query')") @GetMapping("/authRole/{userId}") public AjaxResult authRole(@PathVariable("userId") Long userId) { @@ -245,6 +255,7 @@ public class SysUserController extends BaseController { /** * 用户授权角色 */ + @ApiOperation(value = "用户授权角色") @PreAuthorize("@ss.hasPermi('system:user:edit')") @Log(title = "用户管理", businessType = BusinessType.GRANT) @PutMapping("/authRole") @@ -258,6 +269,7 @@ public class SysUserController extends BaseController { /** * 获取部门树列表 */ + @ApiOperation(value = "获取部门树列表") @PreAuthorize("@ss.hasPermi('system:user:list')") @GetMapping("/deptTree") public AjaxResult deptTree(SysDept dept) { diff --git a/ruoyi-admin/src/main/resources/application.yml b/ruoyi-admin/src/main/resources/application.yml index bf132e2..6aee222 100644 --- a/ruoyi-admin/src/main/resources/application.yml +++ b/ruoyi-admin/src/main/resources/application.yml @@ -101,9 +101,9 @@ token: # mybatis-plus配置 mybatis-plus: # 搜索指定包别名 - typeAliasesPackage: com.ruoyi.**.domain + typeAliasesPackage: com.ruoyi.**.domain,com.ruoyi.**.entity, # 配置mapper的扫描,找到所有的mapper.xml映射文件 - mapperLocations: classpath*:mapper/**/*Mapper.xml + mapperLocations: classpath*:mapper/**/*Mapper.xml,classpath*:mapper/**/*.xml # 加载全局的配置文件 configLocation: classpath:mybatis/mybatis-config.xml diff --git a/ruoyi-admin/src/main/resources/mapper/AssetBasicNetworkMapper.xml b/ruoyi-admin/src/main/resources/mapper/AssetBasicNetworkMapper.xml new file mode 100644 index 0000000..073be82 --- /dev/null +++ b/ruoyi-admin/src/main/resources/mapper/AssetBasicNetworkMapper.xml @@ -0,0 +1,24 @@ + + + + + + + diff --git a/ruoyi-admin/src/main/resources/mapper/AssetBusinessFormMapper.xml b/ruoyi-admin/src/main/resources/mapper/AssetBusinessFormMapper.xml new file mode 100644 index 0000000..9b59fc5 --- /dev/null +++ b/ruoyi-admin/src/main/resources/mapper/AssetBusinessFormMapper.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/ruoyi-admin/src/main/resources/mapper/AssetCurrentMapper.xml b/ruoyi-admin/src/main/resources/mapper/AssetCurrentMapper.xml new file mode 100644 index 0000000..e95fea4 --- /dev/null +++ b/ruoyi-admin/src/main/resources/mapper/AssetCurrentMapper.xml @@ -0,0 +1,30 @@ + + + + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/mapper/AssetSupplyChainMapper.xml b/ruoyi-admin/src/main/resources/mapper/AssetSupplyChainMapper.xml new file mode 100644 index 0000000..3abbf0a --- /dev/null +++ b/ruoyi-admin/src/main/resources/mapper/AssetSupplyChainMapper.xml @@ -0,0 +1,13 @@ + + + + + + + diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/annotation/Excel.java b/ruoyi-common/src/main/java/com/ruoyi/common/annotation/Excel.java index d06cf97..0f4ec89 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/annotation/Excel.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/annotation/Excel.java @@ -20,7 +20,7 @@ public @interface Excel { /** - * 导出时在excel中排序 + * 导出时是否必填 */ public boolean required() default false; diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/Unit.java b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/Unit.java index 4de9017..46e1221 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/Unit.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/Unit.java @@ -202,4 +202,7 @@ public class Unit implements Serializable { @ApiModelProperty("备注") @Excel(name = "备注") private String remark; + + @ApiModelProperty("删除标志(0代表存在 2代表删除)") + private String delFlag; } diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java index 62ff071..4b138e6 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java @@ -115,7 +115,7 @@ public class SecurityConfig // 静态资源,可匿名访问 .antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll() .antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll() - .antMatchers("/system/user/**").permitAll() + .antMatchers("/tc/**").permitAll() // 除上面外的所有请求全部需要鉴权认证 .anyRequest().authenticated(); }) diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserMapper.java index 2d263f8..5e79e9b 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserMapper.java @@ -109,6 +109,9 @@ public interface SysUserMapper */ public SysUser checkUserNameUnique(String userName); + + List selectUserByIds(Long[] userIds); + // /** // * 校验手机号码是否唯一 // * diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/UnitMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/UnitMapper.java index ba418e7..3e849c9 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/UnitMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/UnitMapper.java @@ -21,4 +21,9 @@ public interface UnitMapper extends BaseMapper { * @return 用户信息集合信息 */ List selectUnitList(@Param("req") UnitRequest a); + + /** + * 根据信用代码批量逻辑删除 + */ + void deleteInCode(List code); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/UnitService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/UnitService.java index fb67077..556b15b 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/UnitService.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/UnitService.java @@ -1,7 +1,6 @@ package com.ruoyi.system.service; import com.baomidou.mybatisplus.extension.service.IService; -import com.ruoyi.common.core.domain.entity.SysUser; import com.ruoyi.common.core.domain.entity.Unit; import com.ruoyi.common.core.domain.request.UnitRequest; @@ -21,4 +20,9 @@ public interface UnitService extends IService { * @return 用户信息集合信息 */ List selectUnitList(UnitRequest unit); + + /** + * 根据信用代码批量逻辑删除 + */ + void deleteInCode(List code); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java index a0ce61d..87fc09b 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java @@ -3,7 +3,10 @@ package com.ruoyi.system.service.impl; import java.util.ArrayList; import java.util.List; import java.util.stream.Collectors; +import javax.annotation.Resource; import javax.validation.Validator; + +import com.ruoyi.system.service.UnitService; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; @@ -65,6 +68,8 @@ public class SysUserServiceImpl implements ISysUserService @Autowired protected Validator validator; + @Resource + private UnitService unitService; /** * 根据条件分页查询用户列表 * @@ -471,6 +476,12 @@ public class SysUserServiceImpl implements ISysUserService userRoleMapper.deleteUserRole(userIds); // 删除用户与岗位关联 userPostMapper.deleteUserPost(userIds); + List sysUsers = userMapper.selectUserByIds(userIds); + List nl = new ArrayList<>(); + sysUsers.forEach(x->{ + nl.add(x.getUserName()); + }); + unitService.deleteInCode(nl); return userMapper.deleteUserByIds(userIds); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/UnitServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/UnitServiceImpl.java index 1483781..f316d20 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/UnitServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/UnitServiceImpl.java @@ -28,4 +28,12 @@ public class UnitServiceImpl extends ServiceImpl implements Un public List selectUnitList(UnitRequest unit) { return baseMapper.selectUnitList(unit); } + + /** + * 根据信用代码批量逻辑删除 + */ + @Override + public void deleteInCode(List code) { + baseMapper.deleteInCode(code); + } } diff --git a/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml index 0414553..afd7288 100644 --- a/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml @@ -133,8 +133,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - - + + + @@ -208,5 +209,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{userId} - + \ No newline at end of file diff --git a/ruoyi-system/src/main/resources/mapper/system/UnitMapper.xml b/ruoyi-system/src/main/resources/mapper/system/UnitMapper.xml index ca5ba26..4b25037 100644 --- a/ruoyi-system/src/main/resources/mapper/system/UnitMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/UnitMapper.xml @@ -48,6 +48,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + update unit_info set del_flag = '2' where user_name in + + #{code} + + select * from unit_info + del_flag = '0' and nick_name like concat('%',#{req.nickName},'%') @@ -69,4 +77,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + \ No newline at end of file From a277ceb76452250e57330326527e369413e5d276 Mon Sep 17 00:00:00 2001 From: du <1725534722@qq.com> Date: Mon, 18 Nov 2024 21:18:59 +0800 Subject: [PATCH 3/4] 1 --- .../tc/controller/AssetCurrentController.java | 112 +++++++++++++++--- .../ruoyi/tc/controller/UnitController.java | 39 ++++-- .../controller/UnitOtherConcatController.java | 96 --------------- .../ruoyi/tc/entity/AssetBasicNetwork.java | 3 + .../ruoyi/tc/entity/AssetBusinessForm.java | 3 + .../com/ruoyi/tc/entity/AssetCurrent.java | 51 +++++--- .../com/ruoyi/tc/entity/AssetSupplyChain.java | 2 + .../main/java/com/ruoyi/tc}/entity/Unit.java | 23 +++- .../com/ruoyi/tc/entity/UnitOtherConcat.java | 11 +- .../request/AssetCurrentPageRequest.java | 6 + .../ruoyi/tc/entity}/request/UnitRequest.java | 9 +- .../tc/mapper/AssetBasicNetWorkMapper.java | 7 ++ .../tc/mapper/AssetBusinessFormMapper.java | 6 + .../ruoyi/tc/mapper/AssetCurrentMapper.java | 6 + .../tc/mapper/AssetSupplyChainMapper.java | 8 ++ .../java/com/ruoyi/tc}/mapper/UnitMapper.java | 16 ++- .../tc/mapper/UnitOtherConcatMapper.java | 11 ++ .../tc/service/AssetBasicNetworkService.java | 6 + .../tc/service/AssetBusinessFormService.java | 6 + .../ruoyi/tc/service/AssetCurrentService.java | 13 ++ .../tc/service/AssetSupplyChainService.java | 8 ++ .../tc/service/UnitOtherConcatService.java | 13 ++ .../com/ruoyi/tc}/service/UnitService.java | 19 +-- .../impl/AssetBasicNetworkServiceImpl.java | 9 ++ .../impl/AssetBusinessFormServiceImpl.java | 9 ++ .../service/impl/AssetCurrentServiceImpl.java | 41 ++++++- .../impl/AssetSupplyChainServiceImpl.java | 11 ++ .../impl/UnitOtherConcatServiceImpl.java | 17 +++ .../tc}/service/impl/UnitServiceImpl.java | 23 ++-- .../mapper/AssetBasicNetworkMapper.xml | 6 + .../mapper/AssetBusinessFormMapper.xml | 6 + .../resources/mapper/AssetCurrentMapper.xml | 9 ++ .../mapper/AssetSupplyChainMapper.xml | 6 + .../src/main/resources/mapper}/UnitMapper.xml | 62 ++++++---- .../main/resources/mapper/UnitOtherConcat.xml | 12 ++ .../common/core/domain/entity/SysUser.java | 7 -- .../resources/mapper/system/SysUserMapper.xml | 12 +- 37 files changed, 505 insertions(+), 199 deletions(-) delete mode 100644 ruoyi-admin/src/main/java/com/ruoyi/tc/controller/UnitOtherConcatController.java rename {ruoyi-common/src/main/java/com/ruoyi/common/core/domain => ruoyi-admin/src/main/java/com/ruoyi/tc}/entity/Unit.java (92%) rename {ruoyi-common/src/main/java/com/ruoyi/common/core/domain => ruoyi-admin/src/main/java/com/ruoyi/tc/entity}/request/UnitRequest.java (72%) rename {ruoyi-system/src/main/java/com/ruoyi/system => ruoyi-admin/src/main/java/com/ruoyi/tc}/mapper/UnitMapper.java (77%) rename {ruoyi-system/src/main/java/com/ruoyi/system => ruoyi-admin/src/main/java/com/ruoyi/tc}/service/UnitService.java (73%) rename {ruoyi-system/src/main/java/com/ruoyi/system => ruoyi-admin/src/main/java/com/ruoyi/tc}/service/impl/UnitServiceImpl.java (84%) rename {ruoyi-system/src/main/resources/mapper/system => ruoyi-admin/src/main/resources/mapper}/UnitMapper.xml (68%) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetCurrentController.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetCurrentController.java index 48c48cf..a497979 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetCurrentController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetCurrentController.java @@ -5,14 +5,15 @@ import cn.hutool.core.bean.BeanUtil; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.common.exception.ServiceException; +import com.ruoyi.common.utils.SecurityUtils; import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.tc.entity.*; import com.ruoyi.tc.entity.request.AssetCurrentPageRequest; -import com.ruoyi.tc.service.AssetBasicNetworkService; -import com.ruoyi.tc.service.AssetCurrentService; -import com.ruoyi.tc.service.AssetSupplyChainService; +import com.ruoyi.tc.service.*; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; +import org.springframework.transaction.annotation.Transactional; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; @@ -44,17 +45,33 @@ public class AssetCurrentController extends BaseController { @Resource private AssetBasicNetworkService assetBasicNetworkService; + @Resource + private AssetBusinessFormService assetBusinessFormService; + + @Resource + private UnitOtherConcatService unitOtherConcatService; /** * 分页查询所有数据 * - * @param page 分页对象 * @param as 查询实体 * @return 所有数据 */ @ApiOperation(value = "分页查询所有数据", response = AssetCurrent.class) @GetMapping - public AjaxResult selectAll(Page page, AssetCurrentPageRequest as) { + public AjaxResult selectAll(AssetCurrentPageRequest as) { + Page page = new Page<>(); + page.setSize(as.getSize()); + page.setCurrent(as.getCurrent()); + String nickName = null; + try { + if (!SecurityUtils.getLoginUser().getUser().isAdmin() || !SecurityUtils.hasRole("common")) { + nickName = SecurityUtils.getLoginUser().getUser().getNickName(); + as.setDwmc(nickName); + } + } catch (Exception e) { + throw new ServiceException("获取用户信息异常"); + } return success(assetCurrentService.page(page, as)); } @@ -67,7 +84,7 @@ public class AssetCurrentController extends BaseController { @ApiOperation(value = "通过主键查询单条数据", response = AssetCurrent.class) @GetMapping("{id}") public AjaxResult selectOne(@PathVariable Serializable id) { - return success(assetCurrentService.getById(id)); + return success(assetCurrentService.selectOne(id)); } /** @@ -78,8 +95,36 @@ public class AssetCurrentController extends BaseController { */ @ApiOperation(value = "新增数据") @PostMapping + @Transactional(rollbackFor = Exception.class) public AjaxResult insert(@RequestBody @Valid AssetCurrent assetCurrent) { - return success(assetCurrentService.save(assetCurrent)); + assetCurrentService.save(assetCurrent); + //新增新监管业务形态 + if (assetCurrent.getXjgywxt() != null) { + assetCurrent.getXjgywxt().setAssetId(assetCurrent.getId()); + assetBusinessFormService.save(assetCurrent.getXjgywxt()); + } + if (!assetCurrent.getGylxxList().isEmpty()) { + for (AssetSupplyChain items : assetCurrent.getGylxxList()) { + items.setAssetId(assetCurrent.getId()); + } + //新增供应链 + assetSupplyChainService.saveBatch(assetCurrent.getGylxxList()); + } + if (!assetCurrent.getJcwlList().isEmpty()) { + for (AssetBasicNetwork items : assetCurrent.getJcwlList()) { + items.setAssetId(assetCurrent.getId()); + } + //新增基础网络 + assetBasicNetworkService.saveBatch(assetCurrent.getJcwlList()); + } + if (!assetCurrent.getOtherConcat().isEmpty()) { + for (UnitOtherConcat items : assetCurrent.getOtherConcat()) { + items.setAssetId(assetCurrent.getId()); + } + //新增其他联系人 + unitOtherConcatService.saveBatch(assetCurrent.getOtherConcat()); + } + return success(); } /** @@ -91,7 +136,33 @@ public class AssetCurrentController extends BaseController { @ApiOperation(value = "修改数据") @PutMapping public AjaxResult update(@RequestBody @Valid AssetCurrent assetCurrent) { - return success(assetCurrentService.updateById(assetCurrent)); + assetCurrentService.updateById(assetCurrent); + if (assetCurrent.getXjgywxt() != null) { + assetCurrent.getXjgywxt().setAssetId(assetCurrent.getId()); + assetBusinessFormService.saveOrUpdate(assetCurrent.getXjgywxt()); + } + if (!assetCurrent.getGylxxList().isEmpty()) { + for (AssetSupplyChain items : assetCurrent.getGylxxList()) { + items.setAssetId(assetCurrent.getId()); + } + //新增供应链 + assetSupplyChainService.saveOrUpdateBatch(assetCurrent.getGylxxList()); + } + if (!assetCurrent.getJcwlList().isEmpty()) { + for (AssetBasicNetwork items : assetCurrent.getJcwlList()) { + items.setAssetId(assetCurrent.getId()); + } + //新增基础网络 + assetBasicNetworkService.saveOrUpdateBatch(assetCurrent.getJcwlList()); + } + if (!assetCurrent.getOtherConcat().isEmpty()) { + for (UnitOtherConcat items : assetCurrent.getOtherConcat()) { + items.setAssetId(assetCurrent.getId()); + } + //新增其他联系人 + unitOtherConcatService.saveOrUpdateBatch(assetCurrent.getOtherConcat()); + } + return success(); } /** @@ -103,7 +174,12 @@ public class AssetCurrentController extends BaseController { @ApiOperation(value = "删除数据") @DeleteMapping public AjaxResult delete(@RequestParam("idList") List idList) { - return success(assetCurrentService.removeByIds(idList)); + assetSupplyChainService.deleteByAssetIds(idList); + assetBasicNetworkService.deleteByAssetIds(idList); + assetBusinessFormService.deleteByAssetIds(idList); + unitOtherConcatService.deleteByAssetIds(idList); + assetCurrentService.deleteByUnitIds(idList); + return success(); } /** @@ -128,18 +204,18 @@ public class AssetCurrentController extends BaseController { for (AssetCurrent x : list) { //对应的资产 AssetExport assetExport = new AssetExport(); - BeanUtil.copyProperties(x,assetExport); + BeanUtil.copyProperties(x, assetExport); //查找对应的系统建设单位 AssetSupplyChain jsdw = assetSupplyChainService.getJsdw(x.getId()); - BeanUtil.copyProperties(jsdw,assetExport); + BeanUtil.copyProperties(jsdw, assetExport); List byList = assetBasicNetworkService.getByAssetId(x.getId()); for (AssetBasicNetwork items : byList) { - if(items.getType() == 1){ + if (items.getType() == 1) { //查找对应的服务器信息 - BeanUtil.copyProperties(items,assetExport); + BeanUtil.copyProperties(items, assetExport); } - if(items.getType() == 2){ + if (items.getType() == 2) { //查找对应网络设备 assetExport.setWlpp(items.getPp()); assetExport.setWlyjxh(items.getYjxh()); @@ -150,7 +226,7 @@ public class AssetCurrentController extends BaseController { assetExport.setWlsbIp(items.getSbIp()); assetExport.setWlyjyt(items.getYjyt()); } - if(items.getType() == 3){ + if (items.getType() == 3) { //查找对应安全设备 assetExport.setAqwlpp(items.getPp()); assetExport.setAqwlsblx(items.getSblx()); @@ -175,17 +251,17 @@ public class AssetCurrentController extends BaseController { for (AssetExport items : proList) { AssetCurrent as = new AssetCurrent(); //copy新增到新的现有资产表里面 - BeanUtil.copyProperties(items,as); + BeanUtil.copyProperties(items, as); assetCurrentService.save(as); //新增系统建设单位 AssetSupplyChain s1 = new AssetSupplyChain(); - BeanUtil.copyProperties(items,s1); + BeanUtil.copyProperties(items, s1); s1.setType(5); s1.setAssetId(as.getId()); assetSupplyChainService.save(s1); //新增服务器信息 AssetBasicNetwork a1 = new AssetBasicNetwork(); - BeanUtil.copyProperties(items,a1); + BeanUtil.copyProperties(items, a1); a1.setType(1); a1.setAssetId(as.getId()); assetBasicNetworkService.save(a1); diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/UnitController.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/UnitController.java index eb0f0cf..8cd59f0 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/UnitController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/UnitController.java @@ -3,12 +3,13 @@ package com.ruoyi.tc.controller; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.ruoyi.common.annotation.Log; import com.ruoyi.common.core.domain.AjaxResult; -import com.ruoyi.common.core.domain.entity.Unit; -import com.ruoyi.common.core.domain.request.UnitRequest; +import com.ruoyi.tc.entity.Unit; +import com.ruoyi.tc.entity.request.UnitRequest; import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.exception.ServiceException; import com.ruoyi.common.utils.poi.ExcelUtil; -import com.ruoyi.system.service.UnitService; +import com.ruoyi.tc.service.UnitOtherConcatService; +import com.ruoyi.tc.service.UnitService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.security.access.prepost.PreAuthorize; @@ -23,6 +24,7 @@ import java.util.List; /** * 单位(unit)表控制层 + * * @author du * @since 2024/11/18 17:11 */ @@ -35,14 +37,21 @@ public class UnitController { @Resource private UnitService unitService; + @Resource + private UnitOtherConcatService unitOtherConcatService; + /** * 获取单位列表 */ - @ApiOperation(value = "获取单位列表",response = Unit.class) + @ApiOperation(value = "获取单位列表", response = Unit.class) @GetMapping("/list") - public AjaxResult list(Page page, UnitRequest unit) { - return AjaxResult.success(unitService.page(page,unit)); + public AjaxResult list(UnitRequest unit) { + Page page = new Page<>(); + page.setSize(unit.getSize()); + page.setCurrent(unit.getCurrent()); + return AjaxResult.success(unitService.page(page, unit)); } + /** * 单位导出 */ @@ -54,6 +63,7 @@ public class UnitController { ExcelUtil util = new ExcelUtil<>(Unit.class); util.exportExcel(response, list, "单位数据"); } + /** * 单位导入 */ @@ -90,15 +100,17 @@ public class UnitController { * 新增单位 */ @ApiOperation(value = "新增单位") - @Log(title = "用户管理", businessType = BusinessType.INSERT) + @Log(title = "新增单位", businessType = BusinessType.INSERT) @PostMapping @Transactional(rollbackFor = Exception.class) public AjaxResult add(@Valid @RequestBody Unit unit) { - if (!unitService.lambdaQuery().eq(Unit::getUserName, unit.getUserName()).eq(Unit::getDelFlag,"0").list().isEmpty()) { + if (!unitService.lambdaQuery().eq(Unit::getUserName, unit.getUserName()).eq(Unit::getDelFlag, "0").list().isEmpty()) { throw new ServiceException(unit.getUserName() + "'已存在单位!"); } //新增单位到单位信息表 unitService.save(unit); + //新增其他联系人 + unitOtherConcatService.saveBatch(unit.getOtherConcat()); //查询用户表是否存在该用户 unitService.validUser(unit); return AjaxResult.success(); @@ -113,10 +125,16 @@ public class UnitController { @Transactional(rollbackFor = Exception.class) public AjaxResult edit(@Valid @RequestBody Unit x) { Unit byId = unitService.getById(x.getId()); - if (!byId.getUserName().equals(x.getUserName())||!byId.getNickName().equals(x.getNickName())) { + if (!byId.getUserName().equals(x.getUserName()) || !byId.getNickName().equals(x.getNickName())) { throw new ServiceException("不允许修改单位名称和统一信用代码!"); } unitService.updateById(x); + if(!x.getOtherConcat().isEmpty()){ + x.getOtherConcat().forEach(y->{ + y.setUnitId(x.getId()); + }); + } + unitOtherConcatService.saveOrUpdateBatch(x.getOtherConcat()); return AjaxResult.success(); } @@ -126,11 +144,12 @@ public class UnitController { @ApiOperation(value = "删除单位") @Log(title = "删除单位", businessType = BusinessType.DELETE) @DeleteMapping("/{ids}") - public AjaxResult remove(@PathVariable Long[] ids) { + public AjaxResult remove(@PathVariable List ids) { List userNames = unitService.selectByIds(ids); //逻辑删除单位和用户 unitService.deleteUsers(userNames); unitService.deleteUnits(ids); + unitOtherConcatService.deleteByUnitIds(ids); return AjaxResult.success(); } } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/UnitOtherConcatController.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/UnitOtherConcatController.java deleted file mode 100644 index c25c3f2..0000000 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/UnitOtherConcatController.java +++ /dev/null @@ -1,96 +0,0 @@ -package com.ruoyi.tc.controller; - -import com.ruoyi.common.core.controller.BaseController; -import com.ruoyi.common.core.domain.AjaxResult; -import com.ruoyi.tc.entity.UnitOtherConcat; -import com.ruoyi.tc.service.UnitOtherConcatService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import org.springframework.web.bind.annotation.*; - -import javax.annotation.Resource; -import javax.validation.Valid; -import java.io.Serializable; -import java.util.Arrays; - -/** - * 单位其他联系人(unit_other_contact)控制层 - * @author du - * @since 2024/11/13 14:50 - */ -@RestController -@RequestMapping("/tc/unit/otherConcat") -@Api(tags = "单位其他联系人控制层") -public class UnitOtherConcatController extends BaseController { - /** - * 服务对象 - */ - @Resource - private UnitOtherConcatService unitOtherConcatService; - - /** - * 根据unit_id查询该单位所有数据 - * - * @param unitId 查询unit_id - * @return 所有数据 - */ -// @PreAuthorize("@ss.hasAnyRoles('admin')") - @ApiOperation(value = "根据unit_id查询该单位所有数据", response = UnitOtherConcat.class) - @GetMapping("/selectAll/{unitId}") - public AjaxResult selectAll(@PathVariable Long unitId) { - return success(unitOtherConcatService.lambdaQuery().eq(UnitOtherConcat::getUnitId,unitId).list()); - } - - - /** - * 通过主键查询单条数据 - * - * @param id 主键 - * @return 单条数据 - */ - @ApiOperation(value = "通过主键查询单条数据", response = UnitOtherConcat.class) - @GetMapping("/{id}") - public AjaxResult selectOne(@PathVariable Serializable id) { - return success(unitOtherConcatService.getById(id)); - } - - /** - * 新增数据 - * - * @param u 实体对象 - * @return 新增结果 - */ -// @PreAuthorize("@ss.hasAnyRoles('admin')") - @ApiOperation(value = "新增数据") - @PostMapping - public AjaxResult insert(@Valid @RequestBody UnitOtherConcat u) { - return success(unitOtherConcatService.save(u)); - } - - - /** - * 修改数据 - * - * @param u 实体对象 - * @return 修改结果 - */ -// @PreAuthorize("@ss.hasAnyRoles('admin')") - @ApiOperation(value = "修改数据") - @PostMapping("/edit") - public AjaxResult update(@RequestBody UnitOtherConcat u) { - return success(unitOtherConcatService.updateById(u)); - } - - /** - * 删除数据 - * - * @param ids 主键结合 - * @return 删除结果 - */ -// @PreAuthorize("@ss.hasAnyRoles('admin')") - @ApiOperation(value = "删除数据") - @PostMapping("/ids") - public AjaxResult delete(Long[] ids) { - return success(unitOtherConcatService.removeBatchByIds(Arrays.asList(ids))); - } -} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/AssetBasicNetwork.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/AssetBasicNetwork.java index ea73bea..a4da125 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/AssetBasicNetwork.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/AssetBasicNetwork.java @@ -83,4 +83,7 @@ public class AssetBasicNetwork extends BaseClass implements Serializable { */ @ApiModelProperty("硬件部署位置") private String yjbsxx; + + @ApiModelProperty("删除标志(0代表存在 2代表删除)") + private String delFlag; } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/AssetBusinessForm.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/AssetBusinessForm.java index 629da4d..9b9fa51 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/AssetBusinessForm.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/AssetBusinessForm.java @@ -397,4 +397,7 @@ public class AssetBusinessForm extends BaseClass implements Serializable { @Size(max= 500,message="CDN信息-CDN加速信息长度不能超过500") @ApiModelProperty("CDN信息-CDN加速信息") private String cdnJsxx; + + @ApiModelProperty("删除标志(0代表存在 2代表删除)") + private String delFlag; } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/AssetCurrent.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/AssetCurrent.java index d4f3e42..2f61909 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/AssetCurrent.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/AssetCurrent.java @@ -14,6 +14,7 @@ import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotNull; import javax.validation.constraints.Size; import java.io.Serializable; +import java.util.List; /** * 现有资产表(asset_current)实体类 @@ -450,6 +451,11 @@ public class AssetCurrent extends BaseClass implements Serializable { @Size(max= 50,message="第一联系人邮箱长度不能超过50") @ApiModelProperty("第一联系人邮箱") private String dylxryx; + + @ApiModelProperty("其他联系人") + @TableField(exist = false) + private List otherConcat; + /** * ICP备案信息-是否备案 */ @@ -787,23 +793,37 @@ public class AssetCurrent extends BaseClass implements Serializable { @ApiModelProperty("密评信息-密评得分") private String mpMpdf; +// /** +// * 供应链信息(id集合逗号分隔) +// */ +// @Size(max= 255,message="供应链信息长度不能超过255") +// @ApiModelProperty("供应链信息(id集合逗号分隔)") +// private String gylxx; +// /** +// * 基础网络(id集合逗号分隔) +// */ +// @Size(max= 255,message="基础网络长度不能超过255") +// @ApiModelProperty("基础网络(id集合逗号分隔)") +// private String jcwl; + /** + * 供应链信息列表 + */ + @ApiModelProperty("供应链信息列表") + @TableField(exist = false) + private List gylxxList; /** - * 供应链信息(id集合逗号分隔) - */ - @Size(max= 255,message="供应链信息长度不能超过255") - @ApiModelProperty("供应链信息(id集合逗号分隔)") - private String gylxx; - /** - * 基础网络(id集合逗号分隔) - */ - @Size(max= 255,message="基础网络长度不能超过255") - @ApiModelProperty("基础网络(id集合逗号分隔)") - private String jcwl; + * 基础网络列表 + */ + @ApiModelProperty("基础网络列表") + @TableField(exist = false) + private List jcwlList; + /** - * 新监管业务形态id + * 新监管业务形态 */ - @ApiModelProperty("新监管业务形态id") - private Long xjgywxt; + @ApiModelProperty("新监管业务形态") + @TableField(exist = false) + private AssetBusinessForm xjgywxt; /** * Whois信息-有效性 */ @@ -1002,4 +1022,7 @@ public class AssetCurrent extends BaseClass implements Serializable { @Size(max= 500,message="业务系统拓扑图长度不能超过500") @ApiModelProperty("业务系统拓扑图") private String ywxttpt; + + @ApiModelProperty("删除标志(0代表存在 2代表删除)") + private String delFlag; } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/AssetSupplyChain.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/AssetSupplyChain.java index 163db5c..095a945 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/AssetSupplyChain.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/AssetSupplyChain.java @@ -72,4 +72,6 @@ public class AssetSupplyChain extends BaseClass implements Serializable { @ApiModelProperty("注册地是否为太仓") private Integer sfwtc; + @ApiModelProperty("删除标志(0代表存在 2代表删除)") + private String delFlag; } diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/Unit.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/Unit.java similarity index 92% rename from ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/Unit.java rename to ruoyi-admin/src/main/java/com/ruoyi/tc/entity/Unit.java index 46e1221..5d5056c 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/Unit.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/Unit.java @@ -1,5 +1,6 @@ -package com.ruoyi.common.core.domain.entity; +package com.ruoyi.tc.entity; +import com.alibaba.fastjson2.annotation.JSONField; import com.baomidou.mybatisplus.annotation.*; import com.fasterxml.jackson.annotation.JsonFormat; import com.ruoyi.common.annotation.Excel; @@ -11,6 +12,7 @@ import org.springframework.format.annotation.DateTimeFormat; import javax.validation.Valid; import java.io.Serializable; import java.util.Date; +import java.util.List; /** * 单位信息 @@ -148,6 +150,11 @@ public class Unit implements Serializable { @Excel(name="第一联系人职务职称") private String dylxrzwzc; + @ApiModelProperty("第一联系人职务职称") + @TableField(exist = false) + private List otherConcat; + + @ApiModelProperty("检查信息") private String jcxx; @@ -174,6 +181,20 @@ public class Unit implements Serializable { @TableField(fill = FieldFill.INSERT) private String createBy; + /** + * 创建id + */ + @JSONField(serialize = false) + @TableField(fill = FieldFill.INSERT) + private Long createId; + + /** + * 更新id + */ + @JSONField(serialize = false) + @TableField(fill = FieldFill.INSERT_UPDATE) + private Long updateId; + /** * 创建时间 */ diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/UnitOtherConcat.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/UnitOtherConcat.java index 7570843..730f97e 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/UnitOtherConcat.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/UnitOtherConcat.java @@ -19,13 +19,15 @@ import java.io.Serializable; @TableName(value = "unit_other_contact") public class UnitOtherConcat extends BaseClass implements Serializable { - @TableId(type = IdType.AUTO,value = "id") - private Long id; + @TableId(type = IdType.AUTO,value = "concat_id") + private Long concatId; @ApiModelProperty("单位id") - @NotNull private Long unitId; + @ApiModelProperty("资产id") + private Long assetId; + @ApiModelProperty("其他联系人姓名") private String qtlxrxm; @@ -38,5 +40,6 @@ public class UnitOtherConcat extends BaseClass implements Serializable { @ApiModelProperty("其他联系人职务职称") private String qtlxrzwzc; - + @ApiModelProperty("删除标志(0代表存在 2代表删除)") + private String delFlag; } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/request/AssetCurrentPageRequest.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/request/AssetCurrentPageRequest.java index 9c3628c..cb98f92 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/request/AssetCurrentPageRequest.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/request/AssetCurrentPageRequest.java @@ -54,4 +54,10 @@ public class AssetCurrentPageRequest { @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") @ApiModelProperty("结束时间") private Date endTime; + + @ApiModelProperty("页码") + private Long current=1L; + + @ApiModelProperty("页数") + private Long size=10L; } diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/request/UnitRequest.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/request/UnitRequest.java similarity index 72% rename from ruoyi-common/src/main/java/com/ruoyi/common/core/domain/request/UnitRequest.java rename to ruoyi-admin/src/main/java/com/ruoyi/tc/entity/request/UnitRequest.java index 1eea4c4..4c8a9f6 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/request/UnitRequest.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/request/UnitRequest.java @@ -1,6 +1,5 @@ -package com.ruoyi.common.core.domain.request; +package com.ruoyi.tc.entity.request; -import com.ruoyi.common.annotation.Excel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -20,4 +19,10 @@ public class UnitRequest { @ApiModelProperty("单位类型,传字典数字") private Integer dwlx; + + @ApiModelProperty("页码") + private Long current=1L; + + @ApiModelProperty("页数") + private Long size=10L; } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetBasicNetWorkMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetBasicNetWorkMapper.java index bee7e16..45290f6 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetBasicNetWorkMapper.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetBasicNetWorkMapper.java @@ -3,6 +3,7 @@ package com.ruoyi.tc.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.ruoyi.tc.entity.AssetBasicNetwork; +import java.io.Serializable; import java.util.List; /** @@ -15,5 +16,11 @@ public interface AssetBasicNetWorkMapper extends BaseMapper { * 根据资产id查询对应的基础网络 */ List getByAssetId(Long id); + + /** + * 逻辑删除 + */ + void deleteByAssetIds(List idList); + } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetBusinessFormMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetBusinessFormMapper.java index 6136895..a482d28 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetBusinessFormMapper.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetBusinessFormMapper.java @@ -3,6 +3,8 @@ package com.ruoyi.tc.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.ruoyi.tc.entity.AssetBusinessForm; +import java.util.List; + /** * 资产新监管业务形态(asset_business_form)表数据库访问层 * @@ -10,5 +12,9 @@ import com.ruoyi.tc.entity.AssetBusinessForm; * @since 2024-11-15 10:03:56 */ public interface AssetBusinessFormMapper extends BaseMapper { + /** + * 逻辑删除 + */ + void deleteByAssetIds(List idList); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetCurrentMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetCurrentMapper.java index 1f71965..b47dcc5 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetCurrentMapper.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetCurrentMapper.java @@ -26,5 +26,11 @@ public interface AssetCurrentMapper extends BaseMapper { Page page(Page page,@Param("req") AssetCurrentPageRequest as); List page(@Param("req") AssetCurrentPageRequest as); + + + /** + * 逻辑删除 + */ + void deleteByUnitIds(List idList); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetSupplyChainMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetSupplyChainMapper.java index 534b61f..088f4cc 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetSupplyChainMapper.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetSupplyChainMapper.java @@ -3,6 +3,9 @@ package com.ruoyi.tc.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.ruoyi.tc.entity.AssetSupplyChain; +import java.io.Serializable; +import java.util.List; + /** * 资产供应链信息(asset_supply_chain)表数据库访问层 * @@ -15,5 +18,10 @@ public interface AssetSupplyChainMapper extends BaseMapper { * 根据现有资产id查找最新一条的系统建设单位 */ AssetSupplyChain getJsdw(Long id); + + /** + * 逻辑删除 + */ + void deleteByAssetIds(List idList); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/UnitMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/UnitMapper.java similarity index 77% rename from ruoyi-system/src/main/java/com/ruoyi/system/mapper/UnitMapper.java rename to ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/UnitMapper.java index c827ecc..64bd1c7 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/UnitMapper.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/UnitMapper.java @@ -1,9 +1,10 @@ -package com.ruoyi.system.mapper; +package com.ruoyi.tc.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.ruoyi.common.core.domain.entity.Unit; -import com.ruoyi.common.core.domain.request.UnitRequest; + +import com.ruoyi.tc.entity.Unit; +import com.ruoyi.tc.entity.request.UnitRequest; import org.apache.ibatis.annotations.Param; import java.util.List; @@ -33,15 +34,20 @@ public interface UnitMapper extends BaseMapper { /** * 根据id列表查询单位 */ - List selectByIds(Long[] ids); + List selectByIds(List ids); /** * 逻辑删除单位 */ - void deleteUnits(Long[] ids); + void deleteUnits(List ids); /** * 逻辑删除用户 */ void deleteUsers(List userNames); + + /** + * 根据id获取详细信息 + */ + Unit getById(Long id); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/UnitOtherConcatMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/UnitOtherConcatMapper.java index 102376a..fb495e5 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/UnitOtherConcatMapper.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/UnitOtherConcatMapper.java @@ -3,10 +3,21 @@ package com.ruoyi.tc.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.ruoyi.tc.entity.UnitOtherConcat; +import java.util.List; + /** * 单位其他联系人(unit_other_contact)数据层 * @author ruoyi */ public interface UnitOtherConcatMapper extends BaseMapper { + /** + * 根据unitId逻辑删除 + */ + void deleteByUnitIds(List idList); + + /** + * 根据assetId逻辑删除 + */ + void deleteByAssetIds(List idList); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/AssetBasicNetworkService.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/AssetBasicNetworkService.java index 24f2ba3..2cb8706 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/AssetBasicNetworkService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/AssetBasicNetworkService.java @@ -3,6 +3,7 @@ package com.ruoyi.tc.service; import com.baomidou.mybatisplus.extension.service.IService; import com.ruoyi.tc.entity.AssetBasicNetwork; +import java.io.Serializable; import java.util.List; /** @@ -17,4 +18,9 @@ public interface AssetBasicNetworkService extends IService { * 根据资产id查询对应的基础网络 */ List getByAssetId(Long id); + + /** + * 逻辑删除 + */ + void deleteByAssetIds(List idList); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/AssetBusinessFormService.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/AssetBusinessFormService.java index 572cf2c..81a2548 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/AssetBusinessFormService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/AssetBusinessFormService.java @@ -3,6 +3,8 @@ package com.ruoyi.tc.service; import com.baomidou.mybatisplus.extension.service.IService; import com.ruoyi.tc.entity.AssetBusinessForm; +import java.util.List; + /** * 资产新监管业务形态(asset_business_form)表服务接口 * @@ -11,5 +13,9 @@ import com.ruoyi.tc.entity.AssetBusinessForm; */ public interface AssetBusinessFormService extends IService { + /** + * 逻辑删除 + */ + void deleteByAssetIds(List idList); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/AssetCurrentService.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/AssetCurrentService.java index a1d65c4..2289e57 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/AssetCurrentService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/AssetCurrentService.java @@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.service.IService; import com.ruoyi.tc.entity.AssetCurrent; import com.ruoyi.tc.entity.request.AssetCurrentPageRequest; +import java.io.Serializable; import java.util.List; /** @@ -32,5 +33,17 @@ public interface AssetCurrentService extends IService { */ List page( AssetCurrentPageRequest as ); + /** + * 通过主键查询单条数据 + * + * @param id 主键 + * @return 单条数据 + */ + AssetCurrent selectOne(Serializable id); + + /** + * 逻辑删除 + */ + void deleteByUnitIds(List idList); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/AssetSupplyChainService.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/AssetSupplyChainService.java index 178bc5a..04d346c 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/AssetSupplyChainService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/AssetSupplyChainService.java @@ -3,6 +3,9 @@ package com.ruoyi.tc.service; import com.baomidou.mybatisplus.extension.service.IService; import com.ruoyi.tc.entity.AssetSupplyChain; +import java.io.Serializable; +import java.util.List; + /** * 资产供应链信息(asset_supply_chain)表服务接口 * @author makejava @@ -14,4 +17,9 @@ public interface AssetSupplyChainService extends IService { * 根据现有资产id查找最新一条的系统建设单位 */ AssetSupplyChain getJsdw(Long id); + + /** + * 逻辑删除 + */ + void deleteByAssetIds(List idList); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/UnitOtherConcatService.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/UnitOtherConcatService.java index 6af1304..398790c 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/UnitOtherConcatService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/UnitOtherConcatService.java @@ -3,10 +3,23 @@ package com.ruoyi.tc.service; import com.baomidou.mybatisplus.extension.service.IService; import com.ruoyi.tc.entity.UnitOtherConcat; +import java.util.List; + /** * 单位其他联系人(unit_other_contact)业务层 * @author du * @since 2024/11/13 14:55 */ public interface UnitOtherConcatService extends IService { + + + /** + * 根据assetId逻辑删除 + */ + void deleteByAssetIds(List idList); + + /** + * 根据unitId逻辑删除 + */ + void deleteByUnitIds(List ids); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/UnitService.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/UnitService.java similarity index 73% rename from ruoyi-system/src/main/java/com/ruoyi/system/service/UnitService.java rename to ruoyi-admin/src/main/java/com/ruoyi/tc/service/UnitService.java index a5cda20..931b773 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/UnitService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/UnitService.java @@ -1,9 +1,11 @@ -package com.ruoyi.system.service; +package com.ruoyi.tc.service; + + import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.IService; -import com.ruoyi.common.core.domain.entity.Unit; -import com.ruoyi.common.core.domain.request.UnitRequest; +import com.ruoyi.tc.entity.Unit; +import com.ruoyi.tc.entity.request.UnitRequest; import java.util.List; @@ -20,7 +22,7 @@ public interface UnitService extends IService { * @param unit 用户信息 * @return 用户信息集合信息 */ - Page page(Page page,UnitRequest unit); + Page page(Page page, UnitRequest unit); /** * 根据条件查询所有单位列表 @@ -30,7 +32,10 @@ public interface UnitService extends IService { */ List selectUnitList(UnitRequest unit); - + /** + * 根据id获取详细信息 + */ + Unit getById(Long id); /** * 检查用户表是否存在该用户 @@ -40,7 +45,7 @@ public interface UnitService extends IService { /** * 根据id列表查询单位 */ - List selectByIds(Long[] ids); + List selectByIds(List ids); /** * 逻辑删除用户 @@ -49,5 +54,5 @@ public interface UnitService extends IService { /** * 逻辑删除单位 */ - void deleteUnits(Long[] ids); + void deleteUnits(List ids); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetBasicNetworkServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetBasicNetworkServiceImpl.java index 6bccdeb..7a98cd9 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetBasicNetworkServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetBasicNetworkServiceImpl.java @@ -6,6 +6,7 @@ import com.ruoyi.tc.mapper.AssetBasicNetWorkMapper; import com.ruoyi.tc.service.AssetBasicNetworkService; import org.springframework.stereotype.Service; +import java.io.Serializable; import java.util.List; /** @@ -23,4 +24,12 @@ public class AssetBasicNetworkServiceImpl extends ServiceImpl getByAssetId(Long id) { return baseMapper.getByAssetId(id); } + + /** + * 逻辑删除 + */ + @Override + public void deleteByAssetIds(List idList) { + baseMapper.deleteByAssetIds(idList); + } } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetBusinessFormServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetBusinessFormServiceImpl.java index ad22690..347569a 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetBusinessFormServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetBusinessFormServiceImpl.java @@ -6,6 +6,8 @@ import com.ruoyi.tc.mapper.AssetBusinessFormMapper; import com.ruoyi.tc.service.AssetBusinessFormService; import org.springframework.stereotype.Service; +import java.util.List; + /** * 资产新监管业务形态(AssetBusinessForm)表服务实现类 * @@ -15,5 +17,12 @@ import org.springframework.stereotype.Service; @Service("assetBusinessFormService") public class AssetBusinessFormServiceImpl extends ServiceImpl implements AssetBusinessFormService { + /** + * 逻辑删除 + */ + @Override + public void deleteByAssetIds(List idList) { + baseMapper.deleteByAssetIds(idList); + } } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetCurrentServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetCurrentServiceImpl.java index 8e3f6bf..77bd3bd 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetCurrentServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetCurrentServiceImpl.java @@ -2,12 +2,14 @@ package com.ruoyi.tc.service.impl; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.ruoyi.tc.entity.AssetCurrent; +import com.ruoyi.tc.entity.*; import com.ruoyi.tc.entity.request.AssetCurrentPageRequest; import com.ruoyi.tc.mapper.AssetCurrentMapper; -import com.ruoyi.tc.service.AssetCurrentService; +import com.ruoyi.tc.service.*; import org.springframework.stereotype.Service; +import javax.annotation.Resource; +import java.io.Serializable; import java.util.List; /** @@ -19,6 +21,17 @@ import java.util.List; @Service("assetCurrentService") public class AssetCurrentServiceImpl extends ServiceImpl implements AssetCurrentService { + @Resource + private AssetSupplyChainService assetSupplyChainService; + + @Resource + private AssetBasicNetworkService assetBasicNetworkService; + + @Resource + private AssetBusinessFormService assetBusinessFormService; + + @Resource + private UnitOtherConcatService unitOtherConcatService; /** * 分页查询所有数据 * @@ -41,5 +54,29 @@ public class AssetCurrentServiceImpl extends ServiceImpl page(AssetCurrentPageRequest as) { return baseMapper.page(as); } + + /** + * 通过主键查询单条数据 + * + * @param id 主键 + * @return 单条数据 + */ + @Override + public AssetCurrent selectOne(Serializable id) { + AssetCurrent byId = getById(id); + byId.setGylxxList(assetSupplyChainService.lambdaQuery().eq(AssetSupplyChain::getAssetId,id).eq(AssetSupplyChain::getDelFlag,"0").list()); + byId.setJcwlList(assetBasicNetworkService.lambdaQuery().eq(AssetBasicNetwork::getAssetId,id).eq(AssetBasicNetwork::getDelFlag,"0").list()); + byId.setXjgywxt(assetBusinessFormService.lambdaQuery().eq(AssetBusinessForm::getAssetId,id).eq(AssetBusinessForm::getDelFlag,"0").one()); + byId.setOtherConcat(unitOtherConcatService.lambdaQuery().eq(UnitOtherConcat::getAssetId,id).eq(UnitOtherConcat::getDelFlag,"0").list()); + return byId; + } + + /** + * 逻辑删除 + */ + @Override + public void deleteByUnitIds(List idList) { + baseMapper.deleteByUnitIds(idList); + } } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetSupplyChainServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetSupplyChainServiceImpl.java index f7f746b..0b84dac 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetSupplyChainServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetSupplyChainServiceImpl.java @@ -6,6 +6,9 @@ import com.ruoyi.tc.mapper.AssetSupplyChainMapper; import com.ruoyi.tc.service.AssetSupplyChainService; import org.springframework.stereotype.Service; +import java.io.Serializable; +import java.util.List; + /** * 资产供应链信息表(AssetSupplyChain)表服务实现类 * @@ -22,4 +25,12 @@ public class AssetSupplyChainServiceImpl extends ServiceImpl idList) { + baseMapper.deleteByAssetIds(idList); + } } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/UnitOtherConcatServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/UnitOtherConcatServiceImpl.java index 788dff5..0484e5f 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/UnitOtherConcatServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/UnitOtherConcatServiceImpl.java @@ -6,6 +6,8 @@ import com.ruoyi.tc.mapper.UnitOtherConcatMapper; import com.ruoyi.tc.service.UnitOtherConcatService; import org.springframework.stereotype.Service; +import java.util.List; + /** * 单位其他联系人(unit_other_contact)业务处理层 * @author du @@ -13,4 +15,19 @@ import org.springframework.stereotype.Service; */ @Service public class UnitOtherConcatServiceImpl extends ServiceImpl implements UnitOtherConcatService { + + /** + * 根据assetId逻辑删除 + */ + @Override + public void deleteByAssetIds(List idList) { + baseMapper.deleteByAssetIds(idList); + } + /** + * 根据unitId逻辑删除 + */ + @Override + public void deleteByUnitIds(List ids) { + baseMapper.deleteByUnitIds(ids); + } } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/UnitServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/UnitServiceImpl.java similarity index 84% rename from ruoyi-system/src/main/java/com/ruoyi/system/service/impl/UnitServiceImpl.java rename to ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/UnitServiceImpl.java index 9a664ff..78c7b6e 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/UnitServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/UnitServiceImpl.java @@ -1,16 +1,17 @@ -package com.ruoyi.system.service.impl; +package com.ruoyi.tc.service.impl; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.ruoyi.common.core.domain.entity.SysUser; -import com.ruoyi.common.core.domain.entity.Unit; -import com.ruoyi.common.core.domain.request.UnitRequest; + import com.ruoyi.common.exception.ServiceException; import com.ruoyi.common.utils.SecurityUtils; import com.ruoyi.common.utils.StringUtils; -import com.ruoyi.system.mapper.UnitMapper; import com.ruoyi.system.service.ISysUserService; -import com.ruoyi.system.service.UnitService; +import com.ruoyi.tc.entity.Unit; +import com.ruoyi.tc.entity.request.UnitRequest; +import com.ruoyi.tc.mapper.UnitMapper; +import com.ruoyi.tc.service.UnitService; import org.springframework.stereotype.Service; import javax.annotation.Resource; @@ -48,6 +49,14 @@ public class UnitServiceImpl extends ServiceImpl implements Un return baseMapper.selectUnitList(unit); } + /** + * 根据id获取详细信息 + */ + @Override + public Unit getById(Long id) { + return baseMapper.getById(id); + } + /** * 检查用户表是否存在该用户 @@ -72,7 +81,7 @@ public class UnitServiceImpl extends ServiceImpl implements Un * 根据id列表查询单位 */ @Override - public List selectByIds(Long[] ids) { + public List selectByIds(List ids) { return baseMapper.selectByIds(ids); } /** @@ -87,7 +96,7 @@ public class UnitServiceImpl extends ServiceImpl implements Un * 逻辑删除单位 */ @Override - public void deleteUnits(Long[] ids) { + public void deleteUnits(List ids) { baseMapper.deleteUnits(ids); } diff --git a/ruoyi-admin/src/main/resources/mapper/AssetBasicNetworkMapper.xml b/ruoyi-admin/src/main/resources/mapper/AssetBasicNetworkMapper.xml index 073be82..49dc501 100644 --- a/ruoyi-admin/src/main/resources/mapper/AssetBasicNetworkMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/AssetBasicNetworkMapper.xml @@ -1,6 +1,12 @@ + + update asset_basic_network set del_flag = '2' where asset_id in + + #{id} + + select * from asset_current + del_flag = '0' and xtmc like concat('%',#{req.xtmc},'%') @@ -27,4 +29,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + + update asset_current set del_flag = '2' where id in + + #{id} + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/mapper/AssetSupplyChainMapper.xml b/ruoyi-admin/src/main/resources/mapper/AssetSupplyChainMapper.xml index 3abbf0a..4bef4ba 100644 --- a/ruoyi-admin/src/main/resources/mapper/AssetSupplyChainMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/AssetSupplyChainMapper.xml @@ -1,6 +1,12 @@ + + update asset_supply_chain set del_flag = '2' where asset_id in + + #{id} + + - select * from unit_info + select a.* from unit_info a - del_flag = '0' + a.del_flag = '0' - and nick_name like concat('%',#{req.nickName},'%') + and a.nick_name like concat('%',#{req.nickName},'%') - and dwlx = #{req.dwlx} + and a.dwlx = #{req.dwlx} - and user_name like concat('%',#{req.userName},'%') + and a.user_name like concat('%',#{req.userName},'%') + + + + + update unit_info set del_flag = '2' where id in #{ids} - - + + + update sys_user set del_flag = '2' where user_name in + + #{userNames} + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/mapper/UnitOtherConcat.xml b/ruoyi-admin/src/main/resources/mapper/UnitOtherConcat.xml index fbbbbb8..842e451 100644 --- a/ruoyi-admin/src/main/resources/mapper/UnitOtherConcat.xml +++ b/ruoyi-admin/src/main/resources/mapper/UnitOtherConcat.xml @@ -4,4 +4,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> + + update asset_supply_chain set del_flag = '2' where unit_id in + + #{id} + + + + update asset_supply_chain set del_flag = '2' where asset_id in + + #{id} + + \ No newline at end of file diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysUser.java b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysUser.java index 46dc687..64f7ae0 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysUser.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysUser.java @@ -38,15 +38,8 @@ public class SysUser extends BaseEntity private String nickName; - public Unit getUnitInfo() { - return unitInfo; - } - public void setUnitInfo(Unit unitInfo) { - this.unitInfo = unitInfo; - } - private Unit unitInfo; // /** 用户邮箱 */ // @Excel(name = "用户邮箱") diff --git a/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml index afd7288..9ced28b 100644 --- a/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml @@ -24,14 +24,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - + + + + - select * from unit_info where user_name = #{user_name} @@ -67,7 +67,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"