|
|
|
@ -50,19 +50,6 @@ public class IotCarbonCertificateServiceImpl extends BaseServiceImpl<IotCarbonCe |
|
|
|
|
|
|
|
@Override |
|
|
|
public QueryWrapper getWrapper(Map<String, Object> params) { |
|
|
|
String companyName = MapUtils.getString(params, "companyName"); |
|
|
|
List<Long> tenantCodes = |
|
|
|
tenantDetailService |
|
|
|
.list( |
|
|
|
QueryWrapper.create() |
|
|
|
.like( |
|
|
|
SysTenantDetailEntity::getName, |
|
|
|
companyName, |
|
|
|
StringUtils::isNotBlank)) |
|
|
|
.stream() |
|
|
|
.map(SysTenantDetailEntity::getId) |
|
|
|
.toList(); |
|
|
|
|
|
|
|
String productName = MapUtils.getString(params, "productName"); |
|
|
|
String certificationOrg = MapUtils.getString(params, "certificationOrg"); |
|
|
|
Integer shared = MapUtils.getInteger(params, "shared"); |
|
|
|
@ -78,12 +65,8 @@ public class IotCarbonCertificateServiceImpl extends BaseServiceImpl<IotCarbonCe |
|
|
|
StringUtils::isNotBlank) |
|
|
|
.in( |
|
|
|
IotCarbonCertificateEntity::getTenantCode, |
|
|
|
tenantCodes, |
|
|
|
CollectionUtils.isNotEmpty(tenantCodes)) |
|
|
|
.eq( |
|
|
|
IotCarbonCertificateEntity::getTenantCode, |
|
|
|
-1, |
|
|
|
Objects.nonNull(companyName) && CollectionUtils.isEmpty(tenantCodes)) |
|
|
|
List.of(UserContext.getTenantCode()), |
|
|
|
CollectionUtils.isNotEmpty( List.of(UserContext.getTenantCode()))) |
|
|
|
.eq(IotCarbonCertificateEntity::getShared, shared, Objects::nonNull); |
|
|
|
return queryWrapper; |
|
|
|
} |
|
|
|
|