Compare commits
No commits in common. "1260d288a232a63464f937ea93a7cd86ad8d1c5f" and "c1d3eed3421b86249f68917d1901c49ba37b8f5d" have entirely different histories.
1260d288a2
...
c1d3eed342
@ -119,9 +119,4 @@ public class InspectionPlanController {
|
|||||||
BeanUtils.toBean(list, InspectionPlanRespVO.class));
|
BeanUtils.toBean(list, InspectionPlanRespVO.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/hasChild")
|
|
||||||
@Operation(summary = "是否有子节点")
|
|
||||||
public CommonResult<Boolean> hasInspectionPlan(@RequestParam("id") Long id) {
|
|
||||||
return success(inspectionPlanService.hasChildInspectionPlan(id));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -77,9 +77,4 @@ public interface InspectionPlanService {
|
|||||||
* @return java.util.List<com.inspur.module.system.dal.dataobject.inspection.InspectionPlanDO>
|
* @return java.util.List<com.inspur.module.system.dal.dataobject.inspection.InspectionPlanDO>
|
||||||
*/
|
*/
|
||||||
List<InspectionPlanDO> getInspectionPlanHaveFeedbackList(InspectionPlanListReqVO reqVO);
|
List<InspectionPlanDO> getInspectionPlanHaveFeedbackList(InspectionPlanListReqVO reqVO);
|
||||||
|
|
||||||
/**
|
|
||||||
* 是否有子节点
|
|
||||||
*/
|
|
||||||
Boolean hasChildInspectionPlan(Long id);
|
|
||||||
}
|
}
|
||||||
|
@ -127,15 +127,4 @@ public class InspectionPlanServiceImpl implements InspectionPlanService {
|
|||||||
}
|
}
|
||||||
return inspectionPlanDOS;
|
return inspectionPlanDOS;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
/**
|
|
||||||
* 是否有子节点
|
|
||||||
*/
|
|
||||||
public Boolean hasChildInspectionPlan(Long id){
|
|
||||||
QueryWrapper<InspectionPlanDO> queryWrapper = new QueryWrapper<>();
|
|
||||||
queryWrapper.apply("find_in_set("+id+",ancestors)")
|
|
||||||
.eq("deleted",0);
|
|
||||||
return inspectionPlanMapper.selectCount(queryWrapper) > 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -77,11 +77,3 @@ export function getInspectionPlanListHaveFeedback(params) {
|
|||||||
params,
|
params,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
//是否有子节点
|
|
||||||
export function hasInspectionPlanChild(id) {
|
|
||||||
return request({
|
|
||||||
url: "/imt/inspection-plan/hasChild?id=" + id,
|
|
||||||
method: "get",
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
@ -109,7 +109,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<div class="item-title">
|
<div class="item-title">
|
||||||
<div class="title"><span style="margin-left:3%">设备报警</span>
|
<div class="title"><span style="margin-left:3%">设备运行情况</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="underline"></div>
|
<div class="underline"></div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -257,19 +257,9 @@ export default {
|
|||||||
'是否确认删除点检方案编号为"' + inspectionPlanId + '"的数据项?'
|
'是否确认删除点检方案编号为"' + inspectionPlanId + '"的数据项?'
|
||||||
);
|
);
|
||||||
try {
|
try {
|
||||||
const hasChildRes = await InspectionPlanApi.hasInspectionPlanChild(
|
await InspectionPlanApi.deleteInspectionPlan(inspectionPlanId);
|
||||||
inspectionPlanId
|
await this.getList();
|
||||||
);
|
this.$modal.msgSuccess("删除成功");
|
||||||
if (hasChildRes.data) {
|
|
||||||
this.$message({
|
|
||||||
message: "该节点存在子节点,请先删除子节点!",
|
|
||||||
type: "warning",
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
await InspectionPlanApi.deleteInspectionPlan(inspectionPlanId);
|
|
||||||
await this.getList();
|
|
||||||
this.$modal.msgSuccess("删除成功");
|
|
||||||
}
|
|
||||||
} catch {}
|
} catch {}
|
||||||
},
|
},
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
|
Loading…
Reference in New Issue
Block a user