|
|
|
@ -512,9 +512,12 @@ public class AssetCurrentController extends BaseController {
|
|
|
|
|
//查询任务是否为进行中
|
|
|
|
|
AssetTask assetTask = assetTaskService.findByTaskId(currentCpPo.getTaskId());
|
|
|
|
|
if (assetTask.getTaskStatus().equals(1)){
|
|
|
|
|
if (currentCpPo.getXtzt().equals("5") ||assetCurrent.getXtzt()!=currentCpPo.getXtzt()){
|
|
|
|
|
if (currentCpPo.getStatus()==5 ){
|
|
|
|
|
//修改任务中资产状态
|
|
|
|
|
currentCpPo.setXtzt(assetCurrent.getXtzt());
|
|
|
|
|
currentCpPo.setStatus(0);
|
|
|
|
|
currentCpPo.setBtgyy(null);
|
|
|
|
|
assetTask.setTaskStatus(1);
|
|
|
|
|
assetTaskService.update(assetTask);
|
|
|
|
|
assetCurrentCpService.updateById(currentCpPo);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -671,21 +674,24 @@ public class AssetCurrentController extends BaseController {
|
|
|
|
|
} else {
|
|
|
|
|
//根据资产id查询旧资产
|
|
|
|
|
AssetCurrentCpPo assetCurrentCpPo = assetCurrentCpService.findDwmc(assetCurrent.getId());
|
|
|
|
|
assetCurrentCpPo.setDwmc(assetCurrent.getDwmc());
|
|
|
|
|
assetCurrentCpPo.setTaskId(assetTask.getId());
|
|
|
|
|
//修改
|
|
|
|
|
assetCurrentCpService.updateById(assetCurrentCpPo);
|
|
|
|
|
if (assetCurrentCpPo!=null){
|
|
|
|
|
assetCurrentCpPo.setDwmc(assetCurrent.getDwmc());
|
|
|
|
|
assetCurrentCpPo.setTaskId(assetTask.getId());
|
|
|
|
|
//修改
|
|
|
|
|
assetCurrentCpService.updateById(assetCurrentCpPo);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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);
|
|
|
|
|
assetCurrentCpService.deletByAssetId(assetCurrent.getId());
|
|
|
|
|
assetBasicNetworkCpService.deletByAssetId(assetCurrent.getId());
|
|
|
|
|
assetSupplyChainCpService.deletByAssetId(assetCurrent.getId());
|
|
|
|
|
unitOtherConcatCpService.deletByAssetId(assetCurrent.getId());
|
|
|
|
|
assetBusinessFormCpService.deletByAssetId(assetCurrent.getId());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|