|
@@ -1627,7 +1627,13 @@ public class ContractInfoServiceImpl extends BaseServiceImpl<ContractInfoMapper,
|
|
|
}
|
|
|
List<WbsTreeContract> wbsTreeContractList = new ArrayList<>();
|
|
|
if (!pKeyIds.isEmpty()) {
|
|
|
- wbsTreeContractList = wbsTreeContractMapper.selectList(Wrappers.<WbsTreeContract>lambdaQuery().in(WbsTreeContract::getPKeyId, pKeyIds).eq(WbsTreeContract::getPId, pKeyId));
|
|
|
+ LambdaQueryWrapper<WbsTreeContract> wrapper = Wrappers.<WbsTreeContract>lambdaQuery().in(WbsTreeContract::getPKeyId, pKeyIds);
|
|
|
+ if (pKeyId == null || pKeyId == 0) {
|
|
|
+ wrapper.and(wrapper1 -> wrapper1.isNull(WbsTreeContract::getPId).or().eq(WbsTreeContract::getPId, 0));
|
|
|
+ } else {
|
|
|
+ wrapper.eq(WbsTreeContract::getPId, pKeyId);
|
|
|
+ }
|
|
|
+ wbsTreeContractList = wbsTreeContractMapper.selectList(wrapper);
|
|
|
}
|
|
|
if (!wbsTreeContractList.isEmpty()) {
|
|
|
String pKeyIdStr = wbsTreeContractList.stream().map(item -> item.getPKeyId() + "").collect(Collectors.joining(","));
|