|
|
|
@ -172,30 +172,34 @@ public class AssetCurrentController extends BaseController {
|
|
|
|
|
}
|
|
|
|
|
assetCurrent.setGlIp(b.toString());
|
|
|
|
|
assetCurrentService.updateById(assetCurrent);
|
|
|
|
|
assetSupplyChainService.deleteByAssetIds(assetCurrent.getId());
|
|
|
|
|
assetBasicNetworkService.deleteByAssetIds(assetCurrent.getId());
|
|
|
|
|
assetBusinessFormService.deleteByAssetIds(assetCurrent.getId());
|
|
|
|
|
unitOtherConcatService.deleteByAssetIds(assetCurrent.getId());
|
|
|
|
|
if (assetCurrent.getXjgywxt() != null) {
|
|
|
|
|
assetCurrent.getXjgywxt().setAssetId(assetCurrent.getId());
|
|
|
|
|
assetBusinessFormService.saveOrUpdate(assetCurrent.getXjgywxt());
|
|
|
|
|
assetBusinessFormService.save(assetCurrent.getXjgywxt());
|
|
|
|
|
}
|
|
|
|
|
if (!assetCurrent.getGylxxList().isEmpty()) {
|
|
|
|
|
for (AssetSupplyChain items : assetCurrent.getGylxxList()) {
|
|
|
|
|
items.setAssetId(assetCurrent.getId());
|
|
|
|
|
}
|
|
|
|
|
//新增供应链
|
|
|
|
|
assetSupplyChainService.saveOrUpdateBatch(assetCurrent.getGylxxList());
|
|
|
|
|
assetSupplyChainService.saveBatch(assetCurrent.getGylxxList());
|
|
|
|
|
}
|
|
|
|
|
if (!assetCurrent.getJcwlList().isEmpty()) {
|
|
|
|
|
for (AssetBasicNetwork items : assetCurrent.getJcwlList()) {
|
|
|
|
|
items.setAssetId(assetCurrent.getId());
|
|
|
|
|
}
|
|
|
|
|
//新增基础网络
|
|
|
|
|
assetBasicNetworkService.saveOrUpdateBatch(assetCurrent.getJcwlList());
|
|
|
|
|
assetBasicNetworkService.saveBatch(assetCurrent.getJcwlList());
|
|
|
|
|
}
|
|
|
|
|
if (!assetCurrent.getOtherConcat().isEmpty()) {
|
|
|
|
|
for (UnitOtherConcat items : assetCurrent.getOtherConcat()) {
|
|
|
|
|
items.setAssetId(assetCurrent.getId());
|
|
|
|
|
}
|
|
|
|
|
//新增其他联系人
|
|
|
|
|
unitOtherConcatService.saveOrUpdateBatch(assetCurrent.getOtherConcat());
|
|
|
|
|
unitOtherConcatService.saveBatch(assetCurrent.getOtherConcat());
|
|
|
|
|
}
|
|
|
|
|
return success();
|
|
|
|
|
}
|
|
|
|
|