|
|
|
@ -192,7 +192,7 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
|
|
|
|
|
List<AssetCurrentCpPo> list = assetTaskDao.findByDwmcAssetCurrent(part);
|
|
|
|
|
list.forEach(assetCurrentResponse -> {
|
|
|
|
|
assetCurrentResponse.setTaskId(id);
|
|
|
|
|
if (assetCurrentResponse.getXtzt()!=null && assetCurrentResponse.getXtzt().equals("5")) {
|
|
|
|
|
if (assetCurrentResponse.getXtzt() != null && assetCurrentResponse.getXtzt().equals("5")) {
|
|
|
|
|
assetCurrentResponse.setStatus(5);
|
|
|
|
|
assetCurrentResponse.setBfyy(null);
|
|
|
|
|
assetCurrentResponse.setBtgyy(null);
|
|
|
|
@ -203,21 +203,43 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
|
|
|
|
|
assetCurrentResponse.setBtgyy(null);
|
|
|
|
|
assetCurrentResponse.setUpdateTime(null);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//新增新监管业务形态
|
|
|
|
|
List<AssetBusinessFormCpPo> bussList = assetBusinessFormCpService.findByassetId(assetCurrentResponse.getId());
|
|
|
|
|
bussList.stream()
|
|
|
|
|
.forEach(assetBusinessFormCp -> {
|
|
|
|
|
assetBusinessFormCp.setBusinessId(null);
|
|
|
|
|
assetBusinessFormCp.setTaskId(id);
|
|
|
|
|
});
|
|
|
|
|
assetBusinessFormCpService.saveBatch(bussList);
|
|
|
|
|
//新增供应
|
|
|
|
|
List<AssetSupplyChainCpPo> supplyChainList = assetSupplyChainCpService.findByassetId(assetCurrentResponse.getId());
|
|
|
|
|
supplyChainList.stream()
|
|
|
|
|
.forEach(assetSupplyChainCpPo ->{
|
|
|
|
|
assetSupplyChainCpPo.setSupplyId(null);
|
|
|
|
|
assetSupplyChainCpPo.setTaskId(id);
|
|
|
|
|
} );
|
|
|
|
|
assetSupplyChainCpService.saveBatch(supplyChainList);
|
|
|
|
|
//新增基础网络
|
|
|
|
|
List<AssetBasicNetworkCpPo> BasicNetworkCpList = assetBasicNetworkCpService.findByassetId(assetCurrentResponse.getId());
|
|
|
|
|
BasicNetworkCpList.stream()
|
|
|
|
|
.forEach(assetBasicNetworkCpPo -> {
|
|
|
|
|
assetBasicNetworkCpPo.setNetworkId(null);
|
|
|
|
|
assetBasicNetworkCpPo.setTaskId(id);
|
|
|
|
|
});
|
|
|
|
|
assetBasicNetworkCpService.saveBatch(BasicNetworkCpList);
|
|
|
|
|
//新增其他联系人
|
|
|
|
|
List<UnitOtherConcatCpPo> unitOtherConcatList = unitOtherConcatCpService.findByassetId(assetCurrentResponse.getId());
|
|
|
|
|
unitOtherConcatList.stream()
|
|
|
|
|
.forEach(unitOtherConcatCpPo -> {
|
|
|
|
|
unitOtherConcatCpPo.setConcatId(null);
|
|
|
|
|
unitOtherConcatCpPo.setTaskId(id);
|
|
|
|
|
});
|
|
|
|
|
unitOtherConcatCpService.saveBatch(unitOtherConcatList);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
assetCurrentCpService.saveBatch(list);
|
|
|
|
|
//新增新监管业务形态
|
|
|
|
|
List<AssetBusinessFormCpPo> bussList = assetBusinessFormCpService.findByassetId(assetTask.getTaskId());
|
|
|
|
|
assetBusinessFormCpService.saveBatch(bussList);
|
|
|
|
|
//新增供应
|
|
|
|
|
List<AssetSupplyChainCpPo> supplyChainList = assetSupplyChainCpService.findByassetId(assetTask.getTaskId());
|
|
|
|
|
assetSupplyChainCpService.saveBatch(supplyChainList);
|
|
|
|
|
//新增基础网络
|
|
|
|
|
List<AssetBasicNetworkCpPo> BasicNetworkCpList = assetBasicNetworkCpService.findByassetId(assetTask.getTaskId());
|
|
|
|
|
assetBasicNetworkCpService.saveBatch(BasicNetworkCpList);
|
|
|
|
|
//新增其他联系人
|
|
|
|
|
List<UnitOtherConcatCpPo> unitOtherConcatList = unitOtherConcatCpService.findByassetId(assetTask.getTaskId());
|
|
|
|
|
unitOtherConcatCpService.saveBatch(unitOtherConcatList);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
} else if (assetPart.equals("1")) {
|
|
|
|
|
//遍历小程序资产单位
|
|
|
|
@ -234,7 +256,7 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
|
|
|
|
|
assetMiniProgramsCpPo.setAssetId(cpPo.getId());
|
|
|
|
|
BeanUtils.copyProperties(cpPo, assetMiniProgramsCpPo); // 复制属性
|
|
|
|
|
// 根据 xtzt 设置 status
|
|
|
|
|
if (cpPo.getState()!=null && cpPo.getState().equals("7")) {
|
|
|
|
|
if (cpPo.getState() != null && cpPo.getState().equals("7")) {
|
|
|
|
|
assetMiniProgramsCpPo.setStatus(5);
|
|
|
|
|
assetMiniProgramsCpPo.setBfyy(null);
|
|
|
|
|
assetMiniProgramsCpPo.setBtgyy(null);
|
|
|
|
@ -265,7 +287,7 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
|
|
|
|
|
assetOfficialAccountCpPo.setAssetId(cpPo.getId());
|
|
|
|
|
BeanUtils.copyProperties(cpPo, assetOfficialAccountCpPo); // 复制属性
|
|
|
|
|
// 根据 xtzt 设置 status
|
|
|
|
|
if (cpPo.getGzhzt()!=null && cpPo.getGzhzt().equals("7")) {
|
|
|
|
|
if (cpPo.getGzhzt() != null && cpPo.getGzhzt().equals("7")) {
|
|
|
|
|
assetOfficialAccountCpPo.setStatus(5);
|
|
|
|
|
assetOfficialAccountCpPo.setBfyy(null);
|
|
|
|
|
assetOfficialAccountCpPo.setBtgyy(null);
|
|
|
|
@ -297,7 +319,7 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
|
|
|
|
|
emailCpPo.setAssetId(cpPo.getId());
|
|
|
|
|
BeanUtils.copyProperties(cpPo, emailCpPo); // 复制属性
|
|
|
|
|
// 根据 xtzt 设置 status
|
|
|
|
|
if (cpPo.getYjxtzc()!=null && cpPo.getYjxtzc().equals("2")) {
|
|
|
|
|
if (cpPo.getYjxtzc() != null && cpPo.getYjxtzc().equals("2")) {
|
|
|
|
|
emailCpPo.setStatus(5);
|
|
|
|
|
emailCpPo.setBfyy(null);
|
|
|
|
|
emailCpPo.setBtgyy(null);
|
|
|
|
@ -328,7 +350,7 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
|
|
|
|
|
|
|
|
|
|
BeanUtils.copyProperties(cpPo, appCpPo); // 复制属性
|
|
|
|
|
// 根据 xtzt 设置 status
|
|
|
|
|
if (cpPo.getAppState()!=null && cpPo.getAppState().equals("7")) {
|
|
|
|
|
if (cpPo.getAppState() != null && cpPo.getAppState().equals("7")) {
|
|
|
|
|
appCpPo.setStatus(5);
|
|
|
|
|
appCpPo.setBfyy(null);
|
|
|
|
|
appCpPo.setBtgyy(null);
|
|
|
|
@ -389,17 +411,20 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
|
|
|
|
|
byId.setGlymList(a1);
|
|
|
|
|
}
|
|
|
|
|
List<Acomma> a2 = new ArrayList<>();
|
|
|
|
|
if(byId.getGlIp()!=null&& !byId.getGlIp().isEmpty()){
|
|
|
|
|
if (byId.getGlIp() != null && !byId.getGlIp().isEmpty()) {
|
|
|
|
|
for (Object o : JSONArray.parseArray(byId.getGlIp())) {
|
|
|
|
|
Acomma acomma = new Acomma();
|
|
|
|
|
JSONObject jsonObject = JSONObject.parseObject(o.toString());
|
|
|
|
|
acomma.setKey(jsonObject.get("key").toString());
|
|
|
|
|
acomma.setIpType(jsonObject.get("ipType").toString());
|
|
|
|
|
acomma.setPort(jsonObject.get("port").toString());
|
|
|
|
|
Object portValue = jsonObject.get("port");
|
|
|
|
|
if (portValue != null && !portValue.toString().isEmpty()) {
|
|
|
|
|
acomma.setPort(portValue.toString());
|
|
|
|
|
}
|
|
|
|
|
a2.add(acomma);
|
|
|
|
|
}
|
|
|
|
|
byId.setGlIpList(a2);
|
|
|
|
|
}else {
|
|
|
|
|
} else {
|
|
|
|
|
byId.setGlIpList(new ArrayList<>());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -765,7 +790,7 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
|
|
|
|
|
assetSupplyChainCpService.deletByAssetIdandTaskId(req.getAssetCurrentCpPo().getId(), req.getAssetCurrentCpPo().getTaskId());
|
|
|
|
|
unitOtherConcatCpService.deletByAssetIdandTaskId(req.getAssetCurrentCpPo().getId(), req.getAssetCurrentCpPo().getTaskId());
|
|
|
|
|
assetBasicNetworkCpService.deletByAssetIdandTaskId(req.getAssetCurrentCpPo().getId(), req.getAssetCurrentCpPo().getTaskId());
|
|
|
|
|
StringBuilder a = new StringBuilder();
|
|
|
|
|
StringBuilder a = new StringBuilder();
|
|
|
|
|
if (CollectionUtil.isNotEmpty(req.getAssetCurrentCpPo().getGlymList())) {
|
|
|
|
|
req.getAssetCurrentCpPo().getGlymList().forEach(x -> {
|
|
|
|
|
if (!Objects.equals(x.getKey(), "") && x.getKey() != null) {
|
|
|
|
@ -778,7 +803,7 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
|
|
|
|
|
StringBuilder b = new StringBuilder();
|
|
|
|
|
if (CollectionUtil.isNotEmpty(req.getAssetCurrentCpPo().getGlIpList())) {
|
|
|
|
|
req.getAssetCurrentCpPo().setGlIp(req.getAssetCurrentCpPo().getGlIpList().toString());
|
|
|
|
|
}else{
|
|
|
|
|
} else {
|
|
|
|
|
req.getAssetCurrentCpPo().setGlIp("");
|
|
|
|
|
}
|
|
|
|
|
req.getAssetCurrentCpPo().setStatus(req.getStatus());
|
|
|
|
@ -839,7 +864,7 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
|
|
|
|
|
StringBuilder d = new StringBuilder();
|
|
|
|
|
if (CollectionUtil.isNotEmpty(req.getAssetCurrentCpPo().getGlIpList())) {
|
|
|
|
|
req.getAssetCurrentCpPo().setGlIp(req.getAssetCurrentCpPo().getGlIpList().toString());
|
|
|
|
|
}else{
|
|
|
|
|
} else {
|
|
|
|
|
req.getAssetCurrentCpPo().setGlIp("");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -914,7 +939,7 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
|
|
|
|
|
private void syb(AssetCurrentShRequest req) {
|
|
|
|
|
if (req.getType() == 1) {
|
|
|
|
|
//小程序
|
|
|
|
|
AssetMiniProgramsCpPo assetMiniProgramsCpPo = assetMiniProgramsCpService.findByTaskId(req.getAssetId(),req.getTaskId());
|
|
|
|
|
AssetMiniProgramsCpPo assetMiniProgramsCpPo = assetMiniProgramsCpService.findByTaskId(req.getAssetId(), req.getTaskId());
|
|
|
|
|
//删除原有数据
|
|
|
|
|
if (assetMiniProgramsCpPo != null) {
|
|
|
|
|
assetMiniProgramsService.deleteIdList(Collections.singletonList(assetMiniProgramsCpPo.getAssetId()));
|
|
|
|
@ -928,7 +953,7 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
|
|
|
|
|
}
|
|
|
|
|
if (req.getType() == 2) {
|
|
|
|
|
//公众号资产
|
|
|
|
|
AssetOfficialAccountCpPo assetOfficialAccountCpPo = assetOfficialAccountCpService.findByTaskId(req.getAssetId(),req.getTaskId());
|
|
|
|
|
AssetOfficialAccountCpPo assetOfficialAccountCpPo = assetOfficialAccountCpService.findByTaskId(req.getAssetId(), req.getTaskId());
|
|
|
|
|
//删除原有数据
|
|
|
|
|
if (assetOfficialAccountCpPo != null) {
|
|
|
|
|
assetOfficialAccountService.deleteIdList(Collections.singletonList(assetOfficialAccountCpPo.getAssetId()));
|
|
|
|
@ -944,7 +969,7 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
|
|
|
|
|
if (req.getType() == 3) {
|
|
|
|
|
//电子邮件资产
|
|
|
|
|
//根据assetId查询查询数据
|
|
|
|
|
AssetEmailCpPo assetEmailCpPo = assetEmailCpService.findByTaskId(req.getAssetId(),req.getTaskId());
|
|
|
|
|
AssetEmailCpPo assetEmailCpPo = assetEmailCpService.findByTaskId(req.getAssetId(), req.getTaskId());
|
|
|
|
|
//删除原有数据
|
|
|
|
|
if (assetEmailCpPo != null) {
|
|
|
|
|
assetEmailService.deleteIdList(Collections.singletonList(assetEmailCpPo.getAssetId()));
|
|
|
|
@ -958,7 +983,7 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
|
|
|
|
|
if (req.getType() == 4) {
|
|
|
|
|
//移动应用程序资产
|
|
|
|
|
//根据资产id查询
|
|
|
|
|
AssetAppCpPo assetAppCpPo = assetAppCpService.findByTaskId(req.getAssetId(),req.getTaskId());
|
|
|
|
|
AssetAppCpPo assetAppCpPo = assetAppCpService.findByTaskId(req.getAssetId(), req.getTaskId());
|
|
|
|
|
//删除原有数据
|
|
|
|
|
if (assetAppCpPo != null) {
|
|
|
|
|
assetAppService.deleteIdList(Collections.singletonList(assetAppCpPo.getAssetId()));
|
|
|
|
@ -1038,14 +1063,14 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
|
|
|
|
|
//AssetBusinessFormCpPo
|
|
|
|
|
AssetBusinessFormCpPo businessFormCpPo = assetBusinessFormCpService.findByTaskId(req.getAssetId(), req.getTaskId());
|
|
|
|
|
//删除原有数据
|
|
|
|
|
if (businessFormCpPo!=null) {
|
|
|
|
|
if (businessFormCpPo != null) {
|
|
|
|
|
assetBusinessFormService.deleteIdList(Collections.singletonList(businessFormCpPo.getAssetId()));
|
|
|
|
|
//将子表数据复制到主表中
|
|
|
|
|
AssetBusinessForm assetBusinessForm = new AssetBusinessForm();
|
|
|
|
|
BeanUtils.copyProperties(businessFormCpPo, assetBusinessForm); // 复制属性
|
|
|
|
|
assetBusinessForm.setId(null);
|
|
|
|
|
assetBusinessFormService.save(assetBusinessForm);
|
|
|
|
|
}else{
|
|
|
|
|
} else {
|
|
|
|
|
//将子表数据复制到主表中
|
|
|
|
|
AssetBusinessForm assetBusinessForm = new AssetBusinessForm();
|
|
|
|
|
BeanUtils.copyProperties(businessFormCpPo, assetBusinessForm); // 复制属性
|
|
|
|
@ -1068,7 +1093,7 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
|
|
|
|
|
}).collect(Collectors.toList());
|
|
|
|
|
assetBasicNetworkService.saveBatch(networksCpPoList);
|
|
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
} else {
|
|
|
|
|
List<AssetBasicNetwork> networksCpPoList = req.getAssetCurrentCpPo().getJcwlList().stream().map(cpPo -> {
|
|
|
|
|
AssetBasicNetwork assetBasicNetwork = new AssetBasicNetwork();
|
|
|
|
|
BeanUtils.copyProperties(cpPo, assetBasicNetwork); // 复制属性
|
|
|
|
|