|
|
@ -193,10 +193,12 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
|
|
|
|
assetCurrentResponse.setStatus(5);
|
|
|
|
assetCurrentResponse.setStatus(5);
|
|
|
|
assetCurrentResponse.setBfyy(null);
|
|
|
|
assetCurrentResponse.setBfyy(null);
|
|
|
|
assetCurrentResponse.setBtgyy(null);
|
|
|
|
assetCurrentResponse.setBtgyy(null);
|
|
|
|
|
|
|
|
assetCurrentResponse.setUpdateTime(null);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
assetCurrentResponse.setStatus(0);
|
|
|
|
assetCurrentResponse.setStatus(0);
|
|
|
|
assetCurrentResponse.setBfyy(null);
|
|
|
|
assetCurrentResponse.setBfyy(null);
|
|
|
|
assetCurrentResponse.setBtgyy(null);
|
|
|
|
assetCurrentResponse.setBtgyy(null);
|
|
|
|
|
|
|
|
assetCurrentResponse.setUpdateTime(null);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
@ -233,10 +235,12 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
|
|
|
|
assetMiniProgramsCpPo.setStatus(5);
|
|
|
|
assetMiniProgramsCpPo.setStatus(5);
|
|
|
|
assetMiniProgramsCpPo.setBfyy(null);
|
|
|
|
assetMiniProgramsCpPo.setBfyy(null);
|
|
|
|
assetMiniProgramsCpPo.setBtgyy(null);
|
|
|
|
assetMiniProgramsCpPo.setBtgyy(null);
|
|
|
|
|
|
|
|
assetMiniProgramsCpPo.setUpdateTime(null);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
assetMiniProgramsCpPo.setStatus(0);
|
|
|
|
assetMiniProgramsCpPo.setStatus(0);
|
|
|
|
assetMiniProgramsCpPo.setBfyy(null);
|
|
|
|
assetMiniProgramsCpPo.setBfyy(null);
|
|
|
|
assetMiniProgramsCpPo.setBtgyy(null);
|
|
|
|
assetMiniProgramsCpPo.setBtgyy(null);
|
|
|
|
|
|
|
|
assetMiniProgramsCpPo.setUpdateTime(null);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return assetMiniProgramsCpPo; // 返回新对象
|
|
|
|
return assetMiniProgramsCpPo; // 返回新对象
|
|
|
@ -262,10 +266,12 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
|
|
|
|
assetOfficialAccountCpPo.setStatus(5);
|
|
|
|
assetOfficialAccountCpPo.setStatus(5);
|
|
|
|
assetOfficialAccountCpPo.setBfyy(null);
|
|
|
|
assetOfficialAccountCpPo.setBfyy(null);
|
|
|
|
assetOfficialAccountCpPo.setBtgyy(null);
|
|
|
|
assetOfficialAccountCpPo.setBtgyy(null);
|
|
|
|
|
|
|
|
assetOfficialAccountCpPo.setUpdateTime(null);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
assetOfficialAccountCpPo.setStatus(0);
|
|
|
|
assetOfficialAccountCpPo.setStatus(0);
|
|
|
|
assetOfficialAccountCpPo.setBfyy(null);
|
|
|
|
assetOfficialAccountCpPo.setBfyy(null);
|
|
|
|
assetOfficialAccountCpPo.setBtgyy(null);
|
|
|
|
assetOfficialAccountCpPo.setBtgyy(null);
|
|
|
|
|
|
|
|
assetOfficialAccountCpPo.setUpdateTime(null);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return assetOfficialAccountCpPo; // 返回新对象
|
|
|
|
return assetOfficialAccountCpPo; // 返回新对象
|
|
|
@ -292,10 +298,12 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
|
|
|
|
emailCpPo.setStatus(5);
|
|
|
|
emailCpPo.setStatus(5);
|
|
|
|
emailCpPo.setBfyy(null);
|
|
|
|
emailCpPo.setBfyy(null);
|
|
|
|
emailCpPo.setBtgyy(null);
|
|
|
|
emailCpPo.setBtgyy(null);
|
|
|
|
|
|
|
|
emailCpPo.setUpdateTime(null);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
emailCpPo.setStatus(0);
|
|
|
|
emailCpPo.setStatus(0);
|
|
|
|
emailCpPo.setBfyy(null);
|
|
|
|
emailCpPo.setBfyy(null);
|
|
|
|
emailCpPo.setBtgyy(null);
|
|
|
|
emailCpPo.setBtgyy(null);
|
|
|
|
|
|
|
|
emailCpPo.setUpdateTime(null);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return emailCpPo; // 返回新对象
|
|
|
|
return emailCpPo; // 返回新对象
|
|
|
|
}).collect(Collectors.toList()); // 收集到列表中
|
|
|
|
}).collect(Collectors.toList()); // 收集到列表中
|
|
|
@ -321,10 +329,12 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
|
|
|
|
appCpPo.setStatus(5);
|
|
|
|
appCpPo.setStatus(5);
|
|
|
|
appCpPo.setBfyy(null);
|
|
|
|
appCpPo.setBfyy(null);
|
|
|
|
appCpPo.setBtgyy(null);
|
|
|
|
appCpPo.setBtgyy(null);
|
|
|
|
|
|
|
|
appCpPo.setUpdateTime(null);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
appCpPo.setStatus(0);
|
|
|
|
appCpPo.setStatus(0);
|
|
|
|
appCpPo.setBfyy(null);
|
|
|
|
appCpPo.setBfyy(null);
|
|
|
|
appCpPo.setBtgyy(null);
|
|
|
|
appCpPo.setBtgyy(null);
|
|
|
|
|
|
|
|
appCpPo.setUpdateTime(null);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return appCpPo; // 返回新对象
|
|
|
|
return appCpPo; // 返回新对象
|
|
|
|
}).collect(Collectors.toList()); // 收集到列表中
|
|
|
|
}).collect(Collectors.toList()); // 收集到列表中
|
|
|
@ -545,8 +555,7 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public int sh(AssetCurrentShRequest req) throws ParseException {
|
|
|
|
public int sh(AssetCurrentShRequest req) throws ParseException {
|
|
|
|
//根据taskid获取当前任务的count数量
|
|
|
|
|
|
|
|
AssetTask assetTask = assetTaskDao.getByTaskId(req.getTaskId());
|
|
|
|
|
|
|
|
// 获取当前时间
|
|
|
|
// 获取当前时间
|
|
|
|
LocalDateTime localDateTime = LocalDateTime.now();
|
|
|
|
LocalDateTime localDateTime = LocalDateTime.now();
|
|
|
|
// 转换为 Date
|
|
|
|
// 转换为 Date
|
|
|
@ -561,11 +570,12 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
|
|
|
|
assetTaskDao.sh(req);
|
|
|
|
assetTaskDao.sh(req);
|
|
|
|
// //修改子表和新增历史表
|
|
|
|
// //修改子表和新增历史表
|
|
|
|
updateZiandHistory(req, date);
|
|
|
|
updateZiandHistory(req, date);
|
|
|
|
//同步主表
|
|
|
|
|
|
|
|
taskSaveOrDelete(req);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
//修改子表和新增历史表
|
|
|
|
//修改子表和新增历史表
|
|
|
|
updateZiandHistory(req, date);
|
|
|
|
updateZiandHistory(req, date);
|
|
|
|
|
|
|
|
//同步主表
|
|
|
|
|
|
|
|
taskSaveOrDelete(req);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else if (req.getType() == 1) {
|
|
|
|
} else if (req.getType() == 1) {
|
|
|
@ -578,12 +588,12 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
|
|
|
|
assetTaskDao.xcxsh(req);
|
|
|
|
assetTaskDao.xcxsh(req);
|
|
|
|
// //修改子表和新增历史表
|
|
|
|
// //修改子表和新增历史表
|
|
|
|
updateMinZiandHistory(req, date);
|
|
|
|
updateMinZiandHistory(req, date);
|
|
|
|
//同步主表
|
|
|
|
|
|
|
|
syb(req);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
//修改子表和新增历史表
|
|
|
|
//修改子表和新增历史表
|
|
|
|
updateMinZiandHistory(req, date);
|
|
|
|
updateMinZiandHistory(req, date);
|
|
|
|
|
|
|
|
//同步主表
|
|
|
|
|
|
|
|
syb(req);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
} else if (req.getType() == 2) {
|
|
|
|
} else if (req.getType() == 2) {
|
|
|
@ -596,12 +606,12 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
|
|
|
|
assetTaskDao.gzhsh(req);
|
|
|
|
assetTaskDao.gzhsh(req);
|
|
|
|
// //修改子表和历史表新增
|
|
|
|
// //修改子表和历史表新增
|
|
|
|
updateGzhZiandHistory(req, date);
|
|
|
|
updateGzhZiandHistory(req, date);
|
|
|
|
//同步主表
|
|
|
|
|
|
|
|
syb(req);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
//修改子表和历史表新增
|
|
|
|
//修改子表和历史表新增
|
|
|
|
updateGzhZiandHistory(req, date);
|
|
|
|
updateGzhZiandHistory(req, date);
|
|
|
|
|
|
|
|
//同步主表
|
|
|
|
|
|
|
|
syb(req);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
} else if (req.getType() == 3) {
|
|
|
|
} else if (req.getType() == 3) {
|
|
|
@ -631,12 +641,12 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
|
|
|
|
assetTaskDao.appsh(req);
|
|
|
|
assetTaskDao.appsh(req);
|
|
|
|
// //修改子表和历史表新增
|
|
|
|
// //修改子表和历史表新增
|
|
|
|
updateAppZiandHistory(req, date);
|
|
|
|
updateAppZiandHistory(req, date);
|
|
|
|
//同步主表
|
|
|
|
|
|
|
|
syb(req);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
//修改子表和历史表新增
|
|
|
|
//修改子表和历史表新增
|
|
|
|
updateAppZiandHistory(req, date);
|
|
|
|
updateAppZiandHistory(req, date);
|
|
|
|
|
|
|
|
//同步主表
|
|
|
|
|
|
|
|
syb(req);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -764,7 +774,6 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
|
|
|
|
|
|
|
|
|
|
|
|
// 设置更新时间
|
|
|
|
// 设置更新时间
|
|
|
|
req.getAssetCurrentCpPo().setUpdateTime(date);
|
|
|
|
req.getAssetCurrentCpPo().setUpdateTime(date);
|
|
|
|
AssetCurrentHistory assetCurrentHistory = new AssetCurrentHistory();
|
|
|
|
|
|
|
|
assetCurrentCpService.save(req.getAssetCurrentCpPo());
|
|
|
|
assetCurrentCpService.save(req.getAssetCurrentCpPo());
|
|
|
|
//新增新监管业务形态
|
|
|
|
//新增新监管业务形态
|
|
|
|
if (req.getAssetCurrentCpPo().getXjgywxt() != null) {
|
|
|
|
if (req.getAssetCurrentCpPo().getXjgywxt() != null) {
|
|
|
@ -772,7 +781,7 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
|
|
|
|
req.getAssetCurrentCpPo().getXjgywxt().setTaskId(req.getAssetCurrentCpPo().getTaskId());
|
|
|
|
req.getAssetCurrentCpPo().getXjgywxt().setTaskId(req.getAssetCurrentCpPo().getTaskId());
|
|
|
|
assetBusinessFormCpService.save(req.getAssetCurrentCpPo().getXjgywxt());
|
|
|
|
assetBusinessFormCpService.save(req.getAssetCurrentCpPo().getXjgywxt());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (!req.getAssetCurrentCpPo().getGylxxList().isEmpty()) {
|
|
|
|
if (CollectionUtil.isNotEmpty(req.getAssetCurrentCpPo().getGylxxList())) {
|
|
|
|
for (AssetSupplyChainCpPo items : req.getAssetCurrentCpPo().getGylxxList()) {
|
|
|
|
for (AssetSupplyChainCpPo items : req.getAssetCurrentCpPo().getGylxxList()) {
|
|
|
|
items.setAssetId(req.getAssetCurrentCpPo().getId());
|
|
|
|
items.setAssetId(req.getAssetCurrentCpPo().getId());
|
|
|
|
items.setTaskId(req.getAssetCurrentCpPo().getTaskId());
|
|
|
|
items.setTaskId(req.getAssetCurrentCpPo().getTaskId());
|
|
|
@ -781,7 +790,7 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
|
|
|
|
//新增供应链
|
|
|
|
//新增供应链
|
|
|
|
assetSupplyChainCpService.saveBatch(req.getAssetCurrentCpPo().getGylxxList());
|
|
|
|
assetSupplyChainCpService.saveBatch(req.getAssetCurrentCpPo().getGylxxList());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (!req.getAssetCurrentCpPo().getJcwlList().isEmpty()) {
|
|
|
|
if (CollectionUtil.isNotEmpty(req.getAssetCurrentCpPo().getJcwlList())) {
|
|
|
|
for (AssetBasicNetworkCpPo items : req.getAssetCurrentCpPo().getJcwlList()) {
|
|
|
|
for (AssetBasicNetworkCpPo items : req.getAssetCurrentCpPo().getJcwlList()) {
|
|
|
|
items.setAssetId(req.getAssetCurrentCpPo().getId());
|
|
|
|
items.setAssetId(req.getAssetCurrentCpPo().getId());
|
|
|
|
items.setTaskId(req.getAssetCurrentCpPo().getTaskId());
|
|
|
|
items.setTaskId(req.getAssetCurrentCpPo().getTaskId());
|
|
|
@ -790,7 +799,7 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
|
|
|
|
//新增基础网络
|
|
|
|
//新增基础网络
|
|
|
|
assetBasicNetworkCpService.saveBatch(req.getAssetCurrentCpPo().getJcwlList());
|
|
|
|
assetBasicNetworkCpService.saveBatch(req.getAssetCurrentCpPo().getJcwlList());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (!req.getAssetCurrentCpPo().getOtherConcat().isEmpty()) {
|
|
|
|
if (CollectionUtil.isNotEmpty(req.getAssetCurrentCpPo().getOtherConcat())) {
|
|
|
|
for (UnitOtherConcatCpPo items : req.getAssetCurrentCpPo().getOtherConcat()) {
|
|
|
|
for (UnitOtherConcatCpPo items : req.getAssetCurrentCpPo().getOtherConcat()) {
|
|
|
|
items.setAssetId(req.getAssetCurrentCpPo().getId());
|
|
|
|
items.setAssetId(req.getAssetCurrentCpPo().getId());
|
|
|
|
items.setTaskId(req.getAssetCurrentCpPo().getTaskId());
|
|
|
|
items.setTaskId(req.getAssetCurrentCpPo().getTaskId());
|
|
|
@ -895,7 +904,7 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
|
|
|
|
private void syb(AssetCurrentShRequest req) {
|
|
|
|
private void syb(AssetCurrentShRequest req) {
|
|
|
|
if (req.getType() == 1) {
|
|
|
|
if (req.getType() == 1) {
|
|
|
|
//小程序
|
|
|
|
//小程序
|
|
|
|
AssetMiniProgramsCpPo assetMiniProgramsCpPo = assetMiniProgramsCpService.findByTaskId(req.getAssetId());
|
|
|
|
AssetMiniProgramsCpPo assetMiniProgramsCpPo = assetMiniProgramsCpService.findByTaskId(req.getAssetId(),req.getTaskId());
|
|
|
|
//删除原有数据
|
|
|
|
//删除原有数据
|
|
|
|
if (assetMiniProgramsCpPo != null) {
|
|
|
|
if (assetMiniProgramsCpPo != null) {
|
|
|
|
assetMiniProgramsService.deleteIdList(Collections.singletonList(assetMiniProgramsCpPo.getAssetId()));
|
|
|
|
assetMiniProgramsService.deleteIdList(Collections.singletonList(assetMiniProgramsCpPo.getAssetId()));
|
|
|
@ -909,8 +918,7 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (req.getType() == 2) {
|
|
|
|
if (req.getType() == 2) {
|
|
|
|
//公众号资产
|
|
|
|
//公众号资产
|
|
|
|
AssetOfficialAccountCpPo assetOfficialAccountCpPo = assetOfficialAccountCpService.findByTaskId(req.getAssetId());
|
|
|
|
AssetOfficialAccountCpPo assetOfficialAccountCpPo = assetOfficialAccountCpService.findByTaskId(req.getAssetId(),req.getTaskId());
|
|
|
|
|
|
|
|
|
|
|
|
//删除原有数据
|
|
|
|
//删除原有数据
|
|
|
|
if (assetOfficialAccountCpPo != null) {
|
|
|
|
if (assetOfficialAccountCpPo != null) {
|
|
|
|
assetOfficialAccountService.deleteIdList(Collections.singletonList(assetOfficialAccountCpPo.getAssetId()));
|
|
|
|
assetOfficialAccountService.deleteIdList(Collections.singletonList(assetOfficialAccountCpPo.getAssetId()));
|
|
|
@ -926,7 +934,7 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
|
|
|
|
if (req.getType() == 3) {
|
|
|
|
if (req.getType() == 3) {
|
|
|
|
//电子邮件资产
|
|
|
|
//电子邮件资产
|
|
|
|
//根据assetId查询查询数据
|
|
|
|
//根据assetId查询查询数据
|
|
|
|
AssetEmailCpPo assetEmailCpPo = assetEmailCpService.findByTaskId(req.getAssetId());
|
|
|
|
AssetEmailCpPo assetEmailCpPo = assetEmailCpService.findByTaskId(req.getAssetId(),req.getTaskId());
|
|
|
|
//删除原有数据
|
|
|
|
//删除原有数据
|
|
|
|
if (assetEmailCpPo != null) {
|
|
|
|
if (assetEmailCpPo != null) {
|
|
|
|
assetEmailService.deleteIdList(Collections.singletonList(assetEmailCpPo.getAssetId()));
|
|
|
|
assetEmailService.deleteIdList(Collections.singletonList(assetEmailCpPo.getAssetId()));
|
|
|
@ -940,7 +948,7 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
|
|
|
|
if (req.getType() == 4) {
|
|
|
|
if (req.getType() == 4) {
|
|
|
|
//移动应用程序资产
|
|
|
|
//移动应用程序资产
|
|
|
|
//根据资产id查询
|
|
|
|
//根据资产id查询
|
|
|
|
AssetAppCpPo assetAppCpPo = assetAppCpService.findByTaskId(req.getAssetId());
|
|
|
|
AssetAppCpPo assetAppCpPo = assetAppCpService.findByTaskId(req.getAssetId(),req.getTaskId());
|
|
|
|
//删除原有数据
|
|
|
|
//删除原有数据
|
|
|
|
if (assetAppCpPo != null) {
|
|
|
|
if (assetAppCpPo != null) {
|
|
|
|
assetAppService.deleteIdList(Collections.singletonList(assetAppCpPo.getAssetId()));
|
|
|
|
assetAppService.deleteIdList(Collections.singletonList(assetAppCpPo.getAssetId()));
|
|
|
@ -1009,42 +1017,48 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
|
|
|
|
AssetCurrentCpPo currentCpPo = assetCurrentCpService.findByTaskId(req.getAssetId(), req.getTaskId());
|
|
|
|
AssetCurrentCpPo currentCpPo = assetCurrentCpService.findByTaskId(req.getAssetId(), req.getTaskId());
|
|
|
|
//删除主表原有数据
|
|
|
|
//删除主表原有数据
|
|
|
|
if (currentCpPo != null) {
|
|
|
|
if (currentCpPo != null) {
|
|
|
|
assetCurrentService.deleteIdList(currentCpPo.getId());
|
|
|
|
|
|
|
|
//将子表数据复制到主表中
|
|
|
|
//将子表数据复制到主表中
|
|
|
|
AssetCurrent current = new AssetCurrent();
|
|
|
|
AssetCurrent current = new AssetCurrent();
|
|
|
|
BeanUtils.copyProperties(currentCpPo, current); // 复制属性
|
|
|
|
BeanUtils.copyProperties(currentCpPo, current); // 复制属性
|
|
|
|
current.setId(null);
|
|
|
|
assetCurrentService.updateById(current);
|
|
|
|
assetCurrentService.save(current);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//AssetBusinessFormCpPo
|
|
|
|
//AssetBusinessFormCpPo
|
|
|
|
List<AssetBusinessFormCpPo> businessFormCpPo = assetBusinessFormCpService.findByTaskId(req.getAssetId(), req.getTaskId());
|
|
|
|
AssetBusinessFormCpPo businessFormCpPo = assetBusinessFormCpService.findByTaskId(req.getAssetId(), req.getTaskId());
|
|
|
|
List<Long> businessList = businessFormCpPo.stream().map(AssetBusinessFormCpPo::getAssetId).collect(Collectors.toList());
|
|
|
|
|
|
|
|
//删除原有数据
|
|
|
|
//删除原有数据
|
|
|
|
if (CollectionUtil.isNotEmpty(businessList)) {
|
|
|
|
if (businessFormCpPo!=null) {
|
|
|
|
assetBusinessFormService.deleteIdList(businessList);
|
|
|
|
assetBusinessFormService.deleteIdList(Collections.singletonList(businessFormCpPo.getAssetId()));
|
|
|
|
|
|
|
|
//将子表数据复制到主表中
|
|
|
|
|
|
|
|
AssetBusinessForm assetBusinessForm = new AssetBusinessForm();
|
|
|
|
|
|
|
|
BeanUtils.copyProperties(businessFormCpPo, assetBusinessForm); // 复制属性
|
|
|
|
|
|
|
|
assetBusinessForm.setId(null);
|
|
|
|
|
|
|
|
assetBusinessFormService.save(assetBusinessForm);
|
|
|
|
}else{
|
|
|
|
}else{
|
|
|
|
//将子表数据复制到主表中
|
|
|
|
//将子表数据复制到主表中
|
|
|
|
List<AssetBusinessForm> businessFormCpPoList = req.getAssetCurrentCpPo().getOtherConcat().stream().map(cpPo -> {
|
|
|
|
AssetBusinessForm assetBusinessForm = new AssetBusinessForm();
|
|
|
|
AssetBusinessForm assetBusinessForm = new AssetBusinessForm();
|
|
|
|
BeanUtils.copyProperties(businessFormCpPo, assetBusinessForm); // 复制属性
|
|
|
|
BeanUtils.copyProperties(cpPo, assetBusinessForm); // 复制属性
|
|
|
|
assetBusinessForm.setId(null);
|
|
|
|
assetBusinessForm.setId(null);
|
|
|
|
assetBusinessFormService.save(assetBusinessForm);
|
|
|
|
return assetBusinessForm; // 返回新对象
|
|
|
|
|
|
|
|
}).collect(Collectors.toList());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assetBusinessFormService.saveBatch(businessFormCpPoList);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//AssetBasicNetworkCpPo
|
|
|
|
//AssetBasicNetworkCpPo
|
|
|
|
List<AssetBasicNetworkCpPo> networkCpPo = assetBasicNetworkCpService.findByTaskId(req.getAssetId(), req.getTaskId());
|
|
|
|
List<AssetBasicNetworkCpPo> networkCpPo = assetBasicNetworkCpService.findByTaskId(req.getAssetId(), req.getTaskId());
|
|
|
|
List<Long> netWorkList = networkCpPo.stream().map(AssetBasicNetworkCpPo::getAssetId).collect(Collectors.toList());
|
|
|
|
List<Long> netWorkList = networkCpPo.stream().map(AssetBasicNetworkCpPo::getAssetId).collect(Collectors.toList());
|
|
|
|
//删除原有数据
|
|
|
|
//删除原有数据
|
|
|
|
if (CollectionUtil.isNotEmpty(netWorkList)) {
|
|
|
|
if (CollectionUtil.isNotEmpty(netWorkList)) {
|
|
|
|
assetBasicNetworkService.deleteIdList(netWorkList);
|
|
|
|
assetBasicNetworkService.deleteIdList(netWorkList);
|
|
|
|
|
|
|
|
List<AssetBasicNetwork> networksCpPoList = req.getAssetCurrentCpPo().getJcwlList().stream().map(cpPo -> {
|
|
|
|
|
|
|
|
AssetBasicNetwork assetBasicNetwork = new AssetBasicNetwork();
|
|
|
|
|
|
|
|
BeanUtils.copyProperties(cpPo, assetBasicNetwork); // 复制属性
|
|
|
|
|
|
|
|
assetBasicNetwork.setId(null);
|
|
|
|
|
|
|
|
return assetBasicNetwork; // 返回新对象
|
|
|
|
|
|
|
|
}).collect(Collectors.toList());
|
|
|
|
|
|
|
|
assetBasicNetworkService.saveBatch(networksCpPoList);
|
|
|
|
|
|
|
|
|
|
|
|
}else{
|
|
|
|
}else{
|
|
|
|
List<AssetBasicNetwork> networksCpPoList = req.getAssetCurrentCpPo().getOtherConcat().stream().map(cpPo -> {
|
|
|
|
List<AssetBasicNetwork> networksCpPoList = req.getAssetCurrentCpPo().getJcwlList().stream().map(cpPo -> {
|
|
|
|
AssetBasicNetwork assetBasicNetwork = new AssetBasicNetwork();
|
|
|
|
AssetBasicNetwork assetBasicNetwork = new AssetBasicNetwork();
|
|
|
|
BeanUtils.copyProperties(cpPo, assetBasicNetwork); // 复制属性
|
|
|
|
BeanUtils.copyProperties(cpPo, assetBasicNetwork); // 复制属性
|
|
|
|
assetBasicNetwork.setId(null);
|
|
|
|
assetBasicNetwork.setId(null);
|
|
|
@ -1053,15 +1067,22 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
|
|
|
|
assetBasicNetworkService.saveBatch(networksCpPoList);
|
|
|
|
assetBasicNetworkService.saveBatch(networksCpPoList);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//AssetSupplyChainCpPo
|
|
|
|
//AssetSupplyChainCpPo
|
|
|
|
List<AssetSupplyChainCpPo> supplyChainCpPo = assetSupplyChainCpService.findByTaskId(req.getAssetId(), req.getTaskId());
|
|
|
|
List<AssetSupplyChainCpPo> supplyChainCpPo = assetSupplyChainCpService.findByTaskId(req.getAssetId(), req.getTaskId());
|
|
|
|
List<Long> supplyList = supplyChainCpPo.stream().map(AssetSupplyChainCpPo::getAssetId).collect(Collectors.toList());
|
|
|
|
List<Long> supplyList = supplyChainCpPo.stream().map(AssetSupplyChainCpPo::getAssetId).collect(Collectors.toList());
|
|
|
|
//删除原有数据
|
|
|
|
//删除原有数据
|
|
|
|
if (CollectionUtil.isNotEmpty(supplyList)) {
|
|
|
|
if (CollectionUtil.isNotEmpty(supplyList)) {
|
|
|
|
assetSupplyChainService.deleteIdList(supplyList);
|
|
|
|
assetSupplyChainService.deleteIdList(supplyList);
|
|
|
|
|
|
|
|
List<AssetSupplyChain> supplyChainList = req.getAssetCurrentCpPo().getGylxxList().stream().map(cpPo -> {
|
|
|
|
}else{
|
|
|
|
AssetSupplyChain assetSupplyChain = new AssetSupplyChain();
|
|
|
|
List<AssetSupplyChain> supplyChainList = req.getAssetCurrentCpPo().getOtherConcat().stream().map(cpPo -> {
|
|
|
|
BeanUtils.copyProperties(cpPo, assetSupplyChain); // 复制属性
|
|
|
|
|
|
|
|
assetSupplyChain.setId(null);
|
|
|
|
|
|
|
|
return assetSupplyChain; // 返回新对象
|
|
|
|
|
|
|
|
}).collect(Collectors.toList());
|
|
|
|
|
|
|
|
assetSupplyChainService.saveBatch(supplyChainList);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
List<AssetSupplyChain> supplyChainList = req.getAssetCurrentCpPo().getGylxxList().stream().map(cpPo -> {
|
|
|
|
AssetSupplyChain assetSupplyChain = new AssetSupplyChain();
|
|
|
|
AssetSupplyChain assetSupplyChain = new AssetSupplyChain();
|
|
|
|
BeanUtils.copyProperties(cpPo, assetSupplyChain); // 复制属性
|
|
|
|
BeanUtils.copyProperties(cpPo, assetSupplyChain); // 复制属性
|
|
|
|
assetSupplyChain.setId(null);
|
|
|
|
assetSupplyChain.setId(null);
|
|
|
@ -1075,8 +1096,14 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
|
|
|
|
//删除原有数据
|
|
|
|
//删除原有数据
|
|
|
|
if (CollectionUtil.isNotEmpty(unitList)) {
|
|
|
|
if (CollectionUtil.isNotEmpty(unitList)) {
|
|
|
|
unitOtherConcatService.deleteIdList(unitList);
|
|
|
|
unitOtherConcatService.deleteIdList(unitList);
|
|
|
|
|
|
|
|
List<UnitOtherConcat> unitOtherConcatList = req.getAssetCurrentCpPo().getOtherConcat().stream().map(cpPo -> {
|
|
|
|
}else{
|
|
|
|
UnitOtherConcat unitOtherConcat = new UnitOtherConcat();
|
|
|
|
|
|
|
|
BeanUtils.copyProperties(cpPo, unitOtherConcat); // 复制属性
|
|
|
|
|
|
|
|
unitOtherConcat.setConcatId(null);
|
|
|
|
|
|
|
|
return unitOtherConcat; // 返回新对象
|
|
|
|
|
|
|
|
}).collect(Collectors.toList());
|
|
|
|
|
|
|
|
unitOtherConcatService.saveBatch(unitOtherConcatList);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
List<UnitOtherConcat> unitOtherConcatList = req.getAssetCurrentCpPo().getOtherConcat().stream().map(cpPo -> {
|
|
|
|
List<UnitOtherConcat> unitOtherConcatList = req.getAssetCurrentCpPo().getOtherConcat().stream().map(cpPo -> {
|
|
|
|
UnitOtherConcat unitOtherConcat = new UnitOtherConcat();
|
|
|
|
UnitOtherConcat unitOtherConcat = new UnitOtherConcat();
|
|
|
|
BeanUtils.copyProperties(cpPo, unitOtherConcat); // 复制属性
|
|
|
|
BeanUtils.copyProperties(cpPo, unitOtherConcat); // 复制属性
|
|
|
@ -1119,7 +1146,7 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public AssetTask findByDwmc(String dwmc) {
|
|
|
|
public AssetAppCpPo findByDwmc(String dwmc) {
|
|
|
|
return assetTaskDao.findByDwmc(dwmc);
|
|
|
|
return assetTaskDao.findByDwmc(dwmc);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|