fix(用例管理): 修改关联需求子集没有处理disable问题
This commit is contained in:
parent
5a0a301fec
commit
8e10e32ab3
|
@ -365,14 +365,21 @@ public class FunctionalCaseDemandService {
|
||||||
if (CollectionUtils.isNotEmpty(demandIds)) {
|
if (CollectionUtils.isNotEmpty(demandIds)) {
|
||||||
PlatformDemandDTO data = platformDemandDTOPluginPager.getData();
|
PlatformDemandDTO data = platformDemandDTOPluginPager.getData();
|
||||||
List<PlatformDemandDTO.Demand> list = data.getList();
|
List<PlatformDemandDTO.Demand> list = data.getList();
|
||||||
for (PlatformDemandDTO.Demand demand : list) {
|
setDisabled(list, demandIds);
|
||||||
if (demandIds.contains(demand.getDemandId())) {
|
|
||||||
demand.setDisabled(true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
data.setList(list);
|
data.setList(list);
|
||||||
platformDemandDTOPluginPager.setData(data);
|
platformDemandDTOPluginPager.setData(data);
|
||||||
}
|
}
|
||||||
return platformDemandDTOPluginPager;
|
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