|
|
@ -384,15 +384,11 @@ public class AssetTaskController extends BaseController {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
assetCurrent.setGlym(a.toString());
|
|
|
|
assetCurrent.setGlym(a.toString());
|
|
|
|
StringBuilder b = new StringBuilder();
|
|
|
|
StringBuilder b = new StringBuilder();
|
|
|
|
if (CollectionUtil.isNotEmpty(assetCurrent.getGlIpList())) {
|
|
|
|
if (assetCurrent.getGlIpList() != null) {
|
|
|
|
assetCurrent.getGlIpList().forEach(x -> {
|
|
|
|
assetCurrent.setGlIp(assetCurrent.getGlIpList().toString());
|
|
|
|
if (!Objects.equals(x.getKey(), "") && x.getKey() != null) {
|
|
|
|
} else {
|
|
|
|
b.append(x.getKey());
|
|
|
|
assetCurrent.setGlIp("");
|
|
|
|
b.append(",");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
assetCurrent.setGlIp(b.toString());
|
|
|
|
|
|
|
|
// assetCurrent.setCurrentId(null);
|
|
|
|
// assetCurrent.setCurrentId(null);
|
|
|
|
BeanUtils.copyProperties(assetCurrent, ac);
|
|
|
|
BeanUtils.copyProperties(assetCurrent, ac);
|
|
|
|
assetCurrentService.updateById(ac);
|
|
|
|
assetCurrentService.updateById(ac);
|
|
|
@ -540,113 +536,7 @@ public class AssetTaskController extends BaseController {
|
|
|
|
@PostMapping("/jyTj")
|
|
|
|
@PostMapping("/jyTj")
|
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
|
public AjaxResult tj(@RequestBody @Validated AssetCurrentJyPo assetCurrent) {
|
|
|
|
public AjaxResult tj(@RequestBody @Validated AssetCurrentJyPo assetCurrent) {
|
|
|
|
// //判断是否是驳回后提交
|
|
|
|
|
|
|
|
// QueryWrapper<AssetCurrentJyPo> queryWrapper = new QueryWrapper<>();
|
|
|
|
|
|
|
|
// queryWrapper.eq("current_id", assetCurrent.getCurrentId());
|
|
|
|
|
|
|
|
// AssetCurrentJyPo assetCurrentJyPo = assetCurrentJyService.getOne(queryWrapper);
|
|
|
|
|
|
|
|
// if (assetCurrentJyPo.getStatus() == 4) {
|
|
|
|
|
|
|
|
// // 获取当前时间
|
|
|
|
|
|
|
|
// LocalDateTime localDateTime = LocalDateTime.now();
|
|
|
|
|
|
|
|
// // 转换为 Date
|
|
|
|
|
|
|
|
// Date date = Date.from(localDateTime.atZone(ZoneId.systemDefault()).toInstant());
|
|
|
|
|
|
|
|
// //新增历史记录
|
|
|
|
|
|
|
|
// StringBuilder e = new StringBuilder();
|
|
|
|
|
|
|
|
// if (CollectionUtil.isNotEmpty(assetCurrent.getGlymList())) {
|
|
|
|
|
|
|
|
// assetCurrent.getGlymList().forEach(x -> {
|
|
|
|
|
|
|
|
// if (!Objects.equals(x.getKey(), "") && x.getKey() != null) {
|
|
|
|
|
|
|
|
// e.append(x.getKey());
|
|
|
|
|
|
|
|
// e.append(",");
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// assetCurrent.setGlym(e.toString());
|
|
|
|
|
|
|
|
// StringBuilder f = new StringBuilder();
|
|
|
|
|
|
|
|
// if (CollectionUtil.isNotEmpty(assetCurrent.getGlIpList())) {
|
|
|
|
|
|
|
|
// assetCurrent.getGlIpList().forEach(x -> {
|
|
|
|
|
|
|
|
// if (!Objects.equals(x.getKey(), "") && x.getKey() != null) {
|
|
|
|
|
|
|
|
// f.append(x.getKey());
|
|
|
|
|
|
|
|
// f.append(",");
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// assetCurrent.setGlym(e.toString());
|
|
|
|
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
|
|
|
|
// assetCurrent.setGlIp(f.toString());
|
|
|
|
|
|
|
|
// assetCurrent.setStatus(assetCurrent.getStatus());
|
|
|
|
|
|
|
|
// AssetCurrentHistory assetCurrentHistory = new AssetCurrentHistory();
|
|
|
|
|
|
|
|
// // 设置更新时间
|
|
|
|
|
|
|
|
// assetCurrent.setUpdateTime(date);
|
|
|
|
|
|
|
|
// BeanUtils.copyProperties(assetCurrent, assetCurrentHistory);
|
|
|
|
|
|
|
|
// assetCurrentHistory.setCurrentId(null);
|
|
|
|
|
|
|
|
// assetCurrentHistory.setStatus(4);
|
|
|
|
|
|
|
|
// assetCurrentHistoryService.save(assetCurrentHistory);
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// //新增新监管业务形态历史表
|
|
|
|
|
|
|
|
// if (assetCurrent.getXjgywxt() != null) {
|
|
|
|
|
|
|
|
// assetCurrent.getXjgywxt().setAssetId(assetCurrent.getId());
|
|
|
|
|
|
|
|
// assetCurrent.getXjgywxt().setTaskId(assetCurrent.getTaskId());
|
|
|
|
|
|
|
|
// AssetBusinessFormHistory assetBusinessFormHistory = new AssetBusinessFormHistory();
|
|
|
|
|
|
|
|
// assetBusinessFormHistory.setCopyId(assetCurrent.getCurrentId());
|
|
|
|
|
|
|
|
// BeanUtils.copyProperties(assetCurrent.getXjgywxt(), assetBusinessFormHistory);
|
|
|
|
|
|
|
|
// assetBusinessFormHistory.setBusinessId(null);
|
|
|
|
|
|
|
|
// assetBusinessFormHistoryService.save(assetBusinessFormHistory);
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// if (!assetCurrent.getGylxxList().isEmpty()) {
|
|
|
|
|
|
|
|
// for (AssetSupplyChainJyPo items : assetCurrent.getGylxxList()) {
|
|
|
|
|
|
|
|
// items.setAssetId(assetCurrent.getId());
|
|
|
|
|
|
|
|
// items.setTaskId(assetCurrent.getTaskId());
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// //新增供应链历史表
|
|
|
|
|
|
|
|
// List<AssetSupplyChainHistory> assetSupplyChainHistoryList = assetCurrent.getGylxxList().stream()
|
|
|
|
|
|
|
|
// .map(cpPo -> {
|
|
|
|
|
|
|
|
// AssetSupplyChainHistory assetSupplyChainHistory = new AssetSupplyChainHistory();
|
|
|
|
|
|
|
|
// assetSupplyChainHistory.setCopyId(assetCurrent.getCurrentId());
|
|
|
|
|
|
|
|
// BeanUtils.copyProperties(cpPo, assetSupplyChainHistory); // 复制属性
|
|
|
|
|
|
|
|
// assetSupplyChainHistory.setSupplyId(null);
|
|
|
|
|
|
|
|
// return assetSupplyChainHistory; // 返回新对象
|
|
|
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
// .collect(Collectors.toList()); // 收集到列表中
|
|
|
|
|
|
|
|
// assetSupplyChainHistoryService.saveBatch(assetSupplyChainHistoryList);
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// if (!assetCurrent.getJcwlList().isEmpty()) {
|
|
|
|
|
|
|
|
// for (AssetBasicNetworkJyPo items : assetCurrent.getJcwlList()) {
|
|
|
|
|
|
|
|
// items.setAssetId(assetCurrent.getId());
|
|
|
|
|
|
|
|
// items.setTaskId(assetCurrent.getTaskId());
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// //新增基础网络历史表
|
|
|
|
|
|
|
|
// List<AssetBasicNetworkHistory> assetSupplyChainHistoryList = assetCurrent.getJcwlList().stream()
|
|
|
|
|
|
|
|
// .map(cpPo -> {
|
|
|
|
|
|
|
|
// AssetBasicNetworkHistory assetBasicNetworkHistory = new AssetBasicNetworkHistory();
|
|
|
|
|
|
|
|
// assetBasicNetworkHistory.setCopyId(assetCurrent.getCurrentId());
|
|
|
|
|
|
|
|
// BeanUtils.copyProperties(cpPo, assetBasicNetworkHistory); // 复制属性
|
|
|
|
|
|
|
|
// assetBasicNetworkHistory.setNetworkId(null);
|
|
|
|
|
|
|
|
// return assetBasicNetworkHistory; // 返回新对象
|
|
|
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
// .collect(Collectors.toList()); // 收集到列表中
|
|
|
|
|
|
|
|
// assetBasicNetworkHistoryService.saveBatch(assetSupplyChainHistoryList);
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// if (!assetCurrent.getOtherConcat().isEmpty()) {
|
|
|
|
|
|
|
|
// for (UnitOtherConcatJyPo items : assetCurrent.getOtherConcat()) {
|
|
|
|
|
|
|
|
// items.setAssetId(assetCurrent.getId());
|
|
|
|
|
|
|
|
// items.setTaskId(assetCurrent.getTaskId());
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// //新增其他联系人
|
|
|
|
|
|
|
|
// List<UnitOtherConcatHistory> unitOtherConcatHistoryList = assetCurrent.getOtherConcat().stream()
|
|
|
|
|
|
|
|
// .map(cpPo -> {
|
|
|
|
|
|
|
|
// UnitOtherConcatHistory unitOtherConcatHistory = new UnitOtherConcatHistory();
|
|
|
|
|
|
|
|
// unitOtherConcatHistory.setCopyId(assetCurrent.getCurrentId());
|
|
|
|
|
|
|
|
// BeanUtils.copyProperties(cpPo, unitOtherConcatHistory); // 复制属性
|
|
|
|
|
|
|
|
// unitOtherConcatHistory.setConcatId(null);
|
|
|
|
|
|
|
|
// return unitOtherConcatHistory; // 返回新对象
|
|
|
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
// .collect(Collectors.toList()); // 收集到列表中
|
|
|
|
|
|
|
|
// unitOtherConcatHistoryService.saveBatch(unitOtherConcatHistoryList);
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
//根据资产id和任务id删除五张表数据
|
|
|
|
//根据资产id和任务id删除五张表数据
|
|
|
|
assetCurrentCpService.deletByAssetIdandTaskId(assetCurrent.getId(), assetCurrent.getTaskId());
|
|
|
|
assetCurrentCpService.deletByAssetIdandTaskId(assetCurrent.getId(), assetCurrent.getTaskId());
|
|
|
|
assetBusinessFormCpService.deletByAssetIdandTaskId(assetCurrent.getId(), assetCurrent.getTaskId());
|
|
|
|
assetBusinessFormCpService.deletByAssetIdandTaskId(assetCurrent.getId(), assetCurrent.getTaskId());
|
|
|
@ -677,14 +567,11 @@ public class AssetTaskController extends BaseController {
|
|
|
|
assetCurrent.setGlym(a.toString());
|
|
|
|
assetCurrent.setGlym(a.toString());
|
|
|
|
StringBuilder b = new StringBuilder();
|
|
|
|
StringBuilder b = new StringBuilder();
|
|
|
|
if (assetCurrent.getGlIpList() != null) {
|
|
|
|
if (assetCurrent.getGlIpList() != null) {
|
|
|
|
assetCurrent.getGlIpList().forEach(x -> {
|
|
|
|
assetCurrent.setGlIp(assetCurrent.getGlIpList().toString());
|
|
|
|
if (!Objects.equals(x.getKey(), "") && x.getKey() != null) {
|
|
|
|
} else {
|
|
|
|
b.append(x.getKey());
|
|
|
|
assetCurrent.setGlIp("");
|
|
|
|
b.append(",");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
assetCurrent.setGlIp(b.toString());
|
|
|
|
|
|
|
|
assetCurrent.setStatus(1);
|
|
|
|
assetCurrent.setStatus(1);
|
|
|
|
Date date = new Date();
|
|
|
|
Date date = new Date();
|
|
|
|
assetCurrent.setUpdateTime(date);
|
|
|
|
assetCurrent.setUpdateTime(date);
|
|
|
|