|
|
|
@ -222,22 +222,7 @@ public class AssetAppController extends BaseController {
|
|
|
|
|
@Log(title = "编辑app数据", businessType = BusinessType.UPDATE)
|
|
|
|
|
@PutMapping
|
|
|
|
|
public AjaxResult edit(@RequestBody AssetApp assetApp) {
|
|
|
|
|
//根据资产id查询资产子表,判断是否有此资产进行中的任务,如果资产状态是已关停与修改的数据不符,则修改任务中的资产状态
|
|
|
|
|
AssetAppCpPo assetAppCpPo = assetAppCpService.findDwmc(assetApp.getId());
|
|
|
|
|
if (assetAppCpPo != null) {
|
|
|
|
|
//查询任务是否为进行中
|
|
|
|
|
AssetTask assetTask = assetTaskService.findByTaskId(assetAppCpPo.getTaskId());
|
|
|
|
|
if (assetTask.getTaskStatus().equals(1)) {
|
|
|
|
|
if (assetAppCpPo.getStatus()==5 ) {
|
|
|
|
|
//修改任务中资产状态
|
|
|
|
|
assetAppCpPo.setStatus(0);
|
|
|
|
|
assetAppCpPo.setBtgyy(null);
|
|
|
|
|
assetTask.setTaskStatus(1);
|
|
|
|
|
assetTaskService.update(assetTask);
|
|
|
|
|
assetAppCpService.updateById(assetAppCpPo);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return success(assetAppService.edit(assetApp));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|