From 010908bd7749d4b89bca578245e02c6a40a76553 Mon Sep 17 00:00:00 2001 From: du <1725534722@qq.com> Date: Tue, 26 Nov 2024 15:11:38 +0800 Subject: [PATCH] bugfix --- .../tc/controller/AssetCurrentController.java | 67 +++++++++++++++++++ 1 file changed, 67 insertions(+) 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 58d25a5..a9dab4a 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 @@ -406,6 +406,73 @@ public class AssetCurrentController extends BaseController { a3.setType(3); a3.setAssetId(as.getId()); assetBasicNetworkService.save(a3); + + //============= + Long id = as.getId(); + List assetTasks = assetTaskService.taskList(as.getDwmc()); + if (assetTasks != null) { + for (AssetTask assetTask : assetTasks) { + //新增资产复制主表 + AssetCurrentCpPo assetCurrentCpPo = new AssetCurrentCpPo(); + BeanUtil.copyProperties(as, assetCurrentCpPo); + assetCurrentCpPo.setTaskId(assetTask.getId()); + assetCurrentCpService.save(assetCurrentCpPo); + + //新增系统建设单位 + AssetSupplyChainCpPo co1 = new AssetSupplyChainCpPo(); + BeanUtil.copyProperties(items, co1); + co1.setType(5); + co1.setAssetId(id); + co1.setTaskId(assetTask.getId()); + assetSupplyChainCpService.save(co1); + + //新增系统运营单位 + AssetSupplyChainCpPo co2 = new AssetSupplyChainCpPo(); + co2.setGyszcdz(items.getGyszcdz1()); + co2.setLxr(items.getLxr1()); + co2.setLxdh(items.getLxdh1()); + co2.setSfwtc(items.getSfwtc1()); + co2.setName(items.getName1()); + co2.setTyshxydm(items.getTyshxydm1()); + co2.setType(7); + co2.setAssetId(as.getId()); + co2.setTaskId(assetTask.getId()); + assetSupplyChainCpService.save(co2); + + //新增服务器信息 + AssetBasicNetworkCpPo co3 = new AssetBasicNetworkCpPo(); + BeanUtil.copyProperties(items, co3); + co3.setType(1); + co3.setAssetId(id); + co3.setTaskId(assetTask.getId()); + assetBasicNetworkCpService.save(co3); + + //新增网络设备 + AssetBasicNetworkCpPo co4 = new AssetBasicNetworkCpPo(); + co4.setSblx(items.getWlsblx()); + co4.setPp(items.getWlpp()); + co4.setSbIp(items.getWlsbIp()); + co4.setYjxh(items.getWlyjxh()); + co4.setYjxlh(items.getWlyjxlh()); + co4.setYjbbxx(items.getWlyjbbxx()); + co4.setYjyt(items.getWlyjyt()); + co4.setYjbsxx(items.getWlyjbsxx()); + co4.setType(2); + co4.setAssetId(id); + co4.setTaskId(assetTask.getId()); + assetBasicNetworkCpService.save(co4); + //新增安全设备 + AssetBasicNetworkCpPo co5 = new AssetBasicNetworkCpPo(); + co5.setSblx(items.getAqwlsblx()); + co5.setPp(items.getAqwlpp()); + co5.setSbIp(items.getAqwlsbIp()); + co5.setType(3); + co5.setAssetId(id); + co5.setTaskId(assetTask.getId()); + assetBasicNetworkCpService.save(co5); + + } + } } return AjaxResult.success(); }