From b39cfbe0deea3a8803f9528b60b8d093a0eda0b4 Mon Sep 17 00:00:00 2001 From: du <1725534722@qq.com> Date: Tue, 19 Nov 2024 18:16:21 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=8B=93=E5=B1=95=E5=AD=97?= =?UTF-8?q?=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tc/controller/AssetCurrentController.java | 6 ++++++ .../com/ruoyi/tc/entity/AssetCurrent.java | 21 ++++++++++++++++--- .../request/AssetCurrentPageRequest.java | 1 + .../ruoyi/tc/entity/request/UnitRequest.java | 4 ++++ .../service/impl/AssetCurrentServiceImpl.java | 3 +++ .../src/main/resources/mapper/UnitMapper.xml | 3 +++ 6 files changed, 35 insertions(+), 3 deletions(-) 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 a5dc704..6372b54 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 @@ -22,7 +22,9 @@ import javax.servlet.http.HttpServletResponse; import javax.validation.Valid; import java.io.Serializable; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; +import java.util.stream.Collectors; /** * 现有资产表(AssetCurrent)表控制层 @@ -95,6 +97,8 @@ public class AssetCurrentController extends BaseController { @PostMapping @Transactional(rollbackFor = Exception.class) public AjaxResult insert(@RequestBody AssetCurrent assetCurrent) { + assetCurrent.setGlym(String.join(",",assetCurrent.getGlymList())); + assetCurrent.setGlIp(String.join(",",assetCurrent.getGlIpList())); assetCurrentService.save(assetCurrent); //新增新监管业务形态 if (assetCurrent.getXjgywxt() != null) { @@ -134,6 +138,8 @@ public class AssetCurrentController extends BaseController { @ApiOperation(value = "修改数据") @PutMapping public AjaxResult update(@RequestBody @Valid AssetCurrent assetCurrent) { + assetCurrent.setGlym(String.join(",",assetCurrent.getGlymList())); + assetCurrent.setGlIp(String.join(",",assetCurrent.getGlIpList())); assetCurrentService.updateById(assetCurrent); if (assetCurrent.getXjgywxt() != null) { assetCurrent.getXjgywxt().setAssetId(assetCurrent.getId()); 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 8503759..c70c21f 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 @@ -106,6 +106,17 @@ public class AssetCurrent extends BaseClass implements Serializable { @Size(max= 500,message="关联域名长度不能超过500") @ApiModelProperty("关联域名(多个用,分隔)") private String glym; + + + @ApiModelProperty("关联域名list") + @TableField(exist = false) + private List glymList; + + + @ApiModelProperty("关联iplist)") + @TableField(exist = false) + private List glIpList; + /** * 关联ip(多个用,分隔) */ @@ -196,19 +207,19 @@ public class AssetCurrent extends BaseClass implements Serializable { */ @Excel(name = "机密性",dictType = "zc_c_i_a",comboReadDict = true,sort = 39) @ApiModelProperty("C-机密性(字典)") - private String cJmx; + private String cjmx; /** * I-完整性(字典) */ @Excel(name = "完整性",dictType = "zc_c_i_a",comboReadDict = true,sort = 40) @ApiModelProperty("I-完整性(字典)") - private String iWzx; + private String iwzx; /** * A-可用性(字典) */ @Excel(name = "可用性",dictType = "zc_c_i_a",comboReadDict = true,sort = 41) @ApiModelProperty("A-可用性(字典)") - private String aKyx; + private String akyx; /** * 存活率(字典) */ @@ -1017,6 +1028,10 @@ public class AssetCurrent extends BaseClass implements Serializable { @ApiModelProperty("业务系统拓扑图") private String ywxttpt; + @Size(max= 500,message="业务系统拓扑文件长度不能超过500") + @ApiModelProperty("业务系统拓扑文件") + private String ywxttpwj; + @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 962c1b4..ecfc792 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 @@ -15,6 +15,7 @@ import java.util.Date; @Data public class AssetCurrentPageRequest { + /** * 系统名称 */ diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/request/UnitRequest.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/request/UnitRequest.java index c49ff5d..5e37502 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/request/UnitRequest.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/request/UnitRequest.java @@ -11,6 +11,10 @@ import lombok.Data; @Data public class UnitRequest { + + @ApiModelProperty("1 查询已有资产的单位") + private String isSearch; + @ApiModelProperty("统一社会信用代码") private String userName; 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 38a3e4e..7284e71 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 @@ -10,6 +10,7 @@ import org.springframework.stereotype.Service; import javax.annotation.Resource; import java.io.Serializable; +import java.util.Arrays; import java.util.List; /** @@ -68,6 +69,8 @@ public class AssetCurrentServiceImpl extends ServiceImpl a.del_flag = '0' + + and a.nick_name IN (SELECT dwmc FROM asset_current); + and a.nick_name like concat('%',#{req.nickName},'%')