mirror of
https://gitee.com/fit2cloud-feizhiyun/MeterSphere.git
synced 2024-12-04 21:19:52 +08:00
fix(用例管理): 修改关联需求子集没有处理disable问题
This commit is contained in:
parent
5a0a301fec
commit
8e10e32ab3
@ -365,14 +365,21 @@ public class FunctionalCaseDemandService {
|
||||
if (CollectionUtils.isNotEmpty(demandIds)) {
|
||||
PlatformDemandDTO data = platformDemandDTOPluginPager.getData();
|
||||
List<PlatformDemandDTO.Demand> list = data.getList();
|
||||
for (PlatformDemandDTO.Demand demand : list) {
|
||||
if (demandIds.contains(demand.getDemandId())) {
|
||||
demand.setDisabled(true);
|
||||
}
|
||||
}
|
||||
setDisabled(list, demandIds);
|
||||
data.setList(list);
|
||||
platformDemandDTOPluginPager.setData(data);
|
||||
}
|
||||
return platformDemandDTOPluginPager;
|
||||
}
|
||||
|
||||
private static void setDisabled(List<PlatformDemandDTO.Demand> list, List<String> demandIds) {
|
||||
for (PlatformDemandDTO.Demand demand : list) {
|
||||
if (demandIds.contains(demand.getDemandId())) {
|
||||
demand.setDisabled(true);
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(demand.getChildren())) {
|
||||
setDisabled(demand.getChildren(), demandIds);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user