|
|
@ -67,7 +67,8 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
|
|
|
|
private AssetSupplyChainService assetSupplyChainService;
|
|
|
|
private AssetSupplyChainService assetSupplyChainService;
|
|
|
|
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
@Resource
|
|
|
|
private UnitOtherConcatService unitOtherConcatService;
|
|
|
|
private UnitOtherConcatService unitOtherConcatService;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 通过ID查询单条数据
|
|
|
|
* 通过ID查询单条数据
|
|
|
|
*
|
|
|
|
*
|
|
|
@ -100,7 +101,8 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void insert(AssetTask assetTask) {
|
|
|
|
public void insert(AssetTask assetTask) {
|
|
|
|
//任务新增
|
|
|
|
//任务新增
|
|
|
|
int id = assetTaskDao.insert(assetTask);
|
|
|
|
assetTaskDao.insert(assetTask);
|
|
|
|
|
|
|
|
int id = assetTask.getId();
|
|
|
|
//新增流程节点
|
|
|
|
//新增流程节点
|
|
|
|
AssetLc assetLc = new AssetLc();
|
|
|
|
AssetLc assetLc = new AssetLc();
|
|
|
|
assetLc.setTaskId(id);
|
|
|
|
assetLc.setTaskId(id);
|
|
|
@ -122,10 +124,11 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
|
|
|
|
List<AssetBusinessFormCpPo> bussList = assetBusinessFormCpService.findByassetId(assetCurrentResponse.getId());
|
|
|
|
List<AssetBusinessFormCpPo> bussList = assetBusinessFormCpService.findByassetId(assetCurrentResponse.getId());
|
|
|
|
if (bussList != null) {
|
|
|
|
if (bussList != null) {
|
|
|
|
for (AssetBusinessFormCpPo assetBusinessFormCpResponse : bussList) {
|
|
|
|
for (AssetBusinessFormCpPo assetBusinessFormCpResponse : bussList) {
|
|
|
|
assetCurrentResponse.getXjgywxt().setBusinessId(assetBusinessFormCpResponse.getBusinessId());
|
|
|
|
if (assetCurrentResponse.getXjgywxt() != null) {
|
|
|
|
assetCurrentResponse.getXjgywxt().setAssetId(assetCurrentResponse.getId());
|
|
|
|
assetCurrentResponse.getXjgywxt().setAssetId(assetBusinessFormCpResponse.getId());
|
|
|
|
assetCurrentResponse.getXjgywxt().setTaskId(id);
|
|
|
|
assetCurrentResponse.getXjgywxt().setTaskId(id);
|
|
|
|
assetBusinessFormCpResponseList.add(assetCurrentResponse.getXjgywxt());
|
|
|
|
assetBusinessFormCpResponseList.add(assetCurrentResponse.getXjgywxt());
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
assetBusinessFormCpService.saveBatch(assetBusinessFormCpResponseList);
|
|
|
|
assetBusinessFormCpService.saveBatch(assetBusinessFormCpResponseList);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -134,7 +137,7 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
|
|
|
|
if (supplyChainList != null) {
|
|
|
|
if (supplyChainList != null) {
|
|
|
|
for (AssetSupplyChainCpPo items : supplyChainList) {
|
|
|
|
for (AssetSupplyChainCpPo items : supplyChainList) {
|
|
|
|
items.setAssetId(assetCurrentResponse.getId());
|
|
|
|
items.setAssetId(assetCurrentResponse.getId());
|
|
|
|
items.setSupplyId(items.getSupplyId());
|
|
|
|
// items.setSupplyId(items.getSupplyId());
|
|
|
|
items.setTaskId(id);
|
|
|
|
items.setTaskId(id);
|
|
|
|
//新增供应链
|
|
|
|
//新增供应链
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -145,7 +148,7 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
|
|
|
|
for (AssetBasicNetworkCpPo items : BasicNetworkCpList) {
|
|
|
|
for (AssetBasicNetworkCpPo items : BasicNetworkCpList) {
|
|
|
|
//根据资产id查询基础网络主表id
|
|
|
|
//根据资产id查询基础网络主表id
|
|
|
|
items.setAssetId(assetCurrentResponse.getId());
|
|
|
|
items.setAssetId(assetCurrentResponse.getId());
|
|
|
|
items.setNetworkId(items.getNetworkId());
|
|
|
|
// items.setNetworkId(items.getNetworkId());
|
|
|
|
items.setTaskId(id);
|
|
|
|
items.setTaskId(id);
|
|
|
|
//新增基础网络
|
|
|
|
//新增基础网络
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -156,7 +159,7 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
|
|
|
|
for (UnitOtherConcatCpPo items : unitOtherConcatList) {
|
|
|
|
for (UnitOtherConcatCpPo items : unitOtherConcatList) {
|
|
|
|
//根据资产id查询其他联系人主表id
|
|
|
|
//根据资产id查询其他联系人主表id
|
|
|
|
items.setAssetId(assetCurrentResponse.getId());
|
|
|
|
items.setAssetId(assetCurrentResponse.getId());
|
|
|
|
items.setConcatId(items.getConcatId());
|
|
|
|
// items.setConcatId(items.getConcatId());
|
|
|
|
items.setTaskId(id);
|
|
|
|
items.setTaskId(id);
|
|
|
|
//新增其他联系人
|
|
|
|
//新增其他联系人
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -326,6 +329,7 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
|
|
|
|
List<AssetSupplyChain> SupplyChainNewList = SupplyChainList.stream()
|
|
|
|
List<AssetSupplyChain> SupplyChainNewList = SupplyChainList.stream()
|
|
|
|
.map(cpPo -> {
|
|
|
|
.map(cpPo -> {
|
|
|
|
AssetSupplyChain supplyChain = new AssetSupplyChain();
|
|
|
|
AssetSupplyChain supplyChain = new AssetSupplyChain();
|
|
|
|
|
|
|
|
supplyChain.setId(null);
|
|
|
|
BeanUtils.copyProperties(cpPo, supplyChain); // 复制属性
|
|
|
|
BeanUtils.copyProperties(cpPo, supplyChain); // 复制属性
|
|
|
|
return supplyChain; // 返回新对象
|
|
|
|
return supplyChain; // 返回新对象
|
|
|
|
})
|
|
|
|
})
|
|
|
@ -345,7 +349,6 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
|
|
|
|
return unitOtherConcat; // 返回新对象
|
|
|
|
return unitOtherConcat; // 返回新对象
|
|
|
|
})
|
|
|
|
})
|
|
|
|
.collect(Collectors.toList());
|
|
|
|
.collect(Collectors.toList());
|
|
|
|
assetSupplyChainService.saveBatch(SupplyChainNewList);
|
|
|
|
|
|
|
|
unitOtherConcatService.saveBatch(UnitOtherConcatNewList);
|
|
|
|
unitOtherConcatService.saveBatch(UnitOtherConcatNewList);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|