|
|
|
@ -651,9 +651,28 @@ public class AssetCurrentController extends BaseController {
|
|
|
|
|
unitOtherConcatCpService.saveBatch(assetCurrentCpPo.getOtherConcat());
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
//根据修改的单位名称查询任务表中是否有此单位的任务,如果有修改资产中的任务id,如果没有删除
|
|
|
|
|
List<AssetTask> dwmcList = assetTaskService.findByDwmc(assetCurrent.getDwmc());
|
|
|
|
|
if (dwmcList.isEmpty()) {
|
|
|
|
|
delete(assetCurrent);
|
|
|
|
|
}else{
|
|
|
|
|
delete(assetCurrent);
|
|
|
|
|
for (AssetTask s:dwmcList){
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return success();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void delete(AssetCurrent assetCurrent) {
|
|
|
|
|
assetCurrentCpService.deletByAssetIdandTaskId(assetCurrent.getId(), null);
|
|
|
|
|
assetBasicNetworkCpService.deletByAssetIdandTaskId(assetCurrent.getId(), null);
|
|
|
|
|
assetSupplyChainCpService.deletByAssetIdandTaskId(assetCurrent.getId(), null);
|
|
|
|
|
unitOtherConcatCpService.deletByAssetIdandTaskId(assetCurrent.getId(), null);
|
|
|
|
|
assetBusinessFormCpService.deletByAssetIdandTaskId(assetCurrent.getId(), null);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 删除数据
|
|
|
|
|
*
|
|
|
|
|