增加拓展字段

main
杜函宇 2 months ago
parent 1ad9a97ab9
commit b39cfbe0de

@ -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());

@ -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<String> glymList;
@ApiModelProperty("关联iplist")
@TableField(exist = false)
private List<String> 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;

@ -15,6 +15,7 @@ import java.util.Date;
@Data
public class AssetCurrentPageRequest {
/**
*
*/

@ -11,6 +11,10 @@ import lombok.Data;
@Data
public class UnitRequest {
@ApiModelProperty("1 查询已有资产的单位")
private String isSearch;
@ApiModelProperty("统一社会信用代码")
private String userName;

@ -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<AssetCurrentMapper, Ass
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());
byId.setGlymList(Arrays.asList(byId.getGlym().split(",")));
byId.setGlIpList(Arrays.asList(byId.getGlIp().split(",")));
return byId;
}

@ -87,6 +87,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select a.* from unit_info a
<where>
a.del_flag = '0'
<if test="req.isSearch == '1' ">
and a.nick_name IN (SELECT dwmc FROM asset_current);
</if>
<if test="req.nickName != null and req.nickName != '' ">
and a.nick_name like concat('%',#{req.nickName},'%')
</if>

Loading…
Cancel
Save