|
|
@ -2,6 +2,8 @@ package com.ruoyi.tc.controller;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
|
|
|
|
|
|
import com.alibaba.fastjson2.JSONArray;
|
|
|
|
|
|
|
|
import com.alibaba.fastjson2.JSONObject;
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
|
import com.ruoyi.common.core.controller.BaseController;
|
|
|
|
import com.ruoyi.common.core.controller.BaseController;
|
|
|
@ -27,9 +29,10 @@ import javax.annotation.Resource;
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
import javax.validation.Valid;
|
|
|
|
import javax.validation.Valid;
|
|
|
|
import java.io.Serializable;
|
|
|
|
import java.io.Serializable;
|
|
|
|
import java.time.LocalDateTime;
|
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.time.ZoneId;
|
|
|
|
import java.util.Arrays;
|
|
|
|
import java.util.*;
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
import java.util.Objects;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 现有资产表(AssetCurrent)表控制层
|
|
|
|
* 现有资产表(AssetCurrent)表控制层
|
|
|
@ -164,16 +167,12 @@ public class AssetCurrentController extends BaseController {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
assetCurrent.setGlym(a.toString());
|
|
|
|
assetCurrent.setGlym(a.toString());
|
|
|
|
StringBuilder b = new StringBuilder();
|
|
|
|
|
|
|
|
if (assetCurrent.getGlIpList() != null) {
|
|
|
|
if (assetCurrent.getGlIpList() != null) {
|
|
|
|
assetCurrent.getGlIpList().forEach(x -> {
|
|
|
|
assetCurrent.setGlIp(assetCurrent.getGlIpList().toString());
|
|
|
|
if (!Objects.equals(x.getKey(), "") && x.getKey() != null) {
|
|
|
|
} else {
|
|
|
|
b.append(x.getKey());
|
|
|
|
assetCurrent.setGlIp("");
|
|
|
|
b.append(",");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
assetCurrent.setGlIp(b.toString());
|
|
|
|
// assetCurrent.setGlIp(b.toString());
|
|
|
|
assetCurrentService.save(assetCurrent);
|
|
|
|
assetCurrentService.save(assetCurrent);
|
|
|
|
//新增新监管业务形态
|
|
|
|
//新增新监管业务形态
|
|
|
|
if (assetCurrent.getXjgywxt() != null) {
|
|
|
|
if (assetCurrent.getXjgywxt() != null) {
|
|
|
@ -389,16 +388,20 @@ public class AssetCurrentController extends BaseController {
|
|
|
|
byId.setGlymList(new ArrayList<>());
|
|
|
|
byId.setGlymList(new ArrayList<>());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
List<Acomma> a2 = new ArrayList<>();
|
|
|
|
List<Acomma> a2 = new ArrayList<>();
|
|
|
|
if (byId.getGlIp() != null) {
|
|
|
|
if(byId.getGlIp()!=null&& !byId.getGlIp().isEmpty()){
|
|
|
|
Arrays.asList(byId.getGlIp().split(",")).forEach(x -> {
|
|
|
|
for (Object o : JSONArray.parseArray(byId.getGlIp())) {
|
|
|
|
Acomma acomma = new Acomma();
|
|
|
|
Acomma acomma = new Acomma();
|
|
|
|
acomma.setKey(x);
|
|
|
|
JSONObject jsonObject = JSONObject.parseObject(o.toString());
|
|
|
|
|
|
|
|
acomma.setKey(jsonObject.get("key").toString());
|
|
|
|
|
|
|
|
acomma.setIpType(jsonObject.get("ipType").toString());
|
|
|
|
|
|
|
|
acomma.setPort(jsonObject.get("port").toString());
|
|
|
|
a2.add(acomma);
|
|
|
|
a2.add(acomma);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
byId.setGlIpList(a2);
|
|
|
|
byId.setGlIpList(a2);
|
|
|
|
} else {
|
|
|
|
}else {
|
|
|
|
byId.setGlIpList(new ArrayList<>());
|
|
|
|
byId.setGlIpList(new ArrayList<>());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return success(byId);
|
|
|
|
return success(byId);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -535,16 +538,18 @@ public class AssetCurrentController extends BaseController {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
assetCurrent.setGlym(a.toString());
|
|
|
|
assetCurrent.setGlym(a.toString());
|
|
|
|
StringBuilder b = new StringBuilder();
|
|
|
|
|
|
|
|
if (assetCurrent.getGlIpList() != null) {
|
|
|
|
if (assetCurrent.getGlIpList() != null) {
|
|
|
|
assetCurrent.getGlIpList().forEach(x -> {
|
|
|
|
// assetCurrent.getGlIpList().forEach(x -> {
|
|
|
|
if (!Objects.equals(x.getKey(), "") && x.getKey() != null) {
|
|
|
|
// if (!Objects.equals(x.getKey(), "") && x.getKey() != null) {
|
|
|
|
b.append(x.getKey());
|
|
|
|
// b.append(x.getKey());
|
|
|
|
b.append(",");
|
|
|
|
// b.append(",");
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
});
|
|
|
|
// });
|
|
|
|
|
|
|
|
assetCurrent.setGlIp(assetCurrent.getGlIpList().toString());
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
assetCurrent.setGlIp("");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
assetCurrent.setGlIp(b.toString());
|
|
|
|
|
|
|
|
if (!assetCurrent.getXtzt().equals("7")) {
|
|
|
|
if (!assetCurrent.getXtzt().equals("7")) {
|
|
|
|
assetCurrent.setBtgyy(null);
|
|
|
|
assetCurrent.setBtgyy(null);
|
|
|
|
}
|
|
|
|
}
|
|
|
|