维修单纠正预防查询判断是否存在维修单

master
zpl 3 years ago
parent 9da5cd6c4e
commit db091ffb17

@ -248,7 +248,7 @@ public class ResourceRepairTaskController {
try {
return R.ok(resourceRepairTaskService.findResourceRepairTaskByHandleAndSite(site,handle));
}catch (Exception e){
return R.failed(""+e.getMessage());
return R.failed("查询失败:"+e.getMessage());
}
}

@ -326,6 +326,9 @@ public class ResourceRepairTaskServiceImpl extends ServiceImpl<ResourceRepairTas
@Override
public ResourceRepairTask findResourceRepairTaskByHandleAndSite(String site, String handle) {
ResourceRepairTask repairTask = resourceRepairTaskMapper.findResourceRepairTaskByHandleAndSite(site, handle);
if (repairTask == null){
throw BusinessException.build("未找到维修单数据!");
}
// 耗用备品
ResourceInspectTaskSpare taskSpare = new ResourceInspectTaskSpare();
taskSpare.setResourceInspectTaskBo(handle);

Loading…
Cancel
Save