|
|
|
@ -1,5 +1,6 @@
|
|
|
|
|
package com.ruoyi.tc.service.impl;
|
|
|
|
|
|
|
|
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
|
|
|
import cn.hutool.core.collection.CollectionUtil;
|
|
|
|
|
import com.alibaba.fastjson2.JSONArray;
|
|
|
|
|
import com.alibaba.fastjson2.JSONObject;
|
|
|
|
@ -585,6 +586,7 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
|
|
|
|
|
//同步主表
|
|
|
|
|
taskSaveOrDelete(req);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
} else if (req.getType() == 1) {
|
|
|
|
|
//小程序资产
|
|
|
|
@ -757,13 +759,13 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void updateZiandHistory(AssetCurrentShRequest req, Date date) {
|
|
|
|
|
//根据资产id和任务id删除五张表数据
|
|
|
|
|
// //根据资产id和任务id删除五张表数据
|
|
|
|
|
assetCurrentCpService.deletByAssetIdandTaskId(req.getAssetCurrentCpPo().getId(), req.getAssetCurrentCpPo().getTaskId());
|
|
|
|
|
assetBusinessFormCpService.deletByAssetIdandTaskId(req.getAssetCurrentCpPo().getId(), req.getAssetCurrentCpPo().getTaskId());
|
|
|
|
|
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) {
|
|
|
|
@ -775,7 +777,7 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
|
|
|
|
|
req.getAssetCurrentCpPo().setGlym(a.toString());
|
|
|
|
|
StringBuilder b = new StringBuilder();
|
|
|
|
|
if (CollectionUtil.isNotEmpty(req.getAssetCurrentCpPo().getGlIpList())) {
|
|
|
|
|
req.getAssetCurrentCpPo().setGlIp(b.toString());
|
|
|
|
|
req.getAssetCurrentCpPo().setGlIp(req.getAssetCurrentCpPo().getGlIpList().toString());
|
|
|
|
|
}else{
|
|
|
|
|
req.getAssetCurrentCpPo().setGlIp("");
|
|
|
|
|
}
|
|
|
|
@ -836,7 +838,7 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
|
|
|
|
|
req.getAssetCurrentCpPo().setGlym(a.toString());
|
|
|
|
|
StringBuilder d = new StringBuilder();
|
|
|
|
|
if (CollectionUtil.isNotEmpty(req.getAssetCurrentCpPo().getGlIpList())) {
|
|
|
|
|
req.getAssetCurrentCpPo().setGlIp(b.toString());
|
|
|
|
|
req.getAssetCurrentCpPo().setGlIp(req.getAssetCurrentCpPo().getGlIpList().toString());
|
|
|
|
|
}else{
|
|
|
|
|
req.getAssetCurrentCpPo().setGlIp("");
|
|
|
|
|
}
|
|
|
|
@ -1027,9 +1029,10 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
|
|
|
|
|
if (currentCpPo != null) {
|
|
|
|
|
|
|
|
|
|
//将子表数据复制到主表中
|
|
|
|
|
AssetCurrent current = new AssetCurrent();
|
|
|
|
|
BeanUtils.copyProperties(currentCpPo, current); // 复制属性
|
|
|
|
|
assetCurrentService.updateById(current);
|
|
|
|
|
|
|
|
|
|
///BeanUtils.copyProperties(currentCpPo, current); // 复制属性
|
|
|
|
|
AssetCurrent assetCurrent = BeanUtil.copyProperties(currentCpPo, AssetCurrent.class);
|
|
|
|
|
assetCurrentService.updateById(assetCurrent);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//AssetBusinessFormCpPo
|
|
|
|
|