|
|
@@ -11,9 +11,7 @@ import org.dromara.customer.api.domain.dto.SupplierAreaDTO;
|
|
|
import org.dromara.customer.api.domain.dto.SupplierAuthorizeDTO;
|
|
|
import org.dromara.customer.domain.ContractSupply;
|
|
|
import org.dromara.customer.domain.SupplierContact;
|
|
|
-import org.dromara.customer.domain.SupplierInfo;
|
|
|
import org.dromara.customer.domain.SupplyArea;
|
|
|
-import org.dromara.customer.domain.vo.SupplyAreaVo;
|
|
|
import org.dromara.customer.service.*;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
@@ -61,12 +59,15 @@ public class RemoteSupplierInfoServiceImpl implements RemoteSupplierInfoService
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public List<Long> getSupplierIdsBySupplyArea(String areaname,String level) {
|
|
|
- return supplyAreaService.getSupplierIdsBySupplyArea(areaname,level);
|
|
|
+ public List<Long> getSupplierIdsBySupplyArea(String areaname, String level) {
|
|
|
+ return supplyAreaService.getSupplierIdsBySupplyArea(areaname, level);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public List<Long> getContractIdBySupplySupplierID(Set<Long> SupplierID) {
|
|
|
+ if (CollUtil.isEmpty(SupplierID)) {
|
|
|
+ return Collections.emptyList();
|
|
|
+ }
|
|
|
return contractSupplyService.list(
|
|
|
Wrappers.lambdaQuery(ContractSupply.class)
|
|
|
.in(ContractSupply::getSupplierId, SupplierID)
|
|
|
@@ -76,6 +77,9 @@ public class RemoteSupplierInfoServiceImpl implements RemoteSupplierInfoService
|
|
|
|
|
|
@Override
|
|
|
public Map<Long, Long> contractToSupplierMap(List<Long> contractSupplyIds) {
|
|
|
+ if (CollUtil.isEmpty(contractSupplyIds)) {
|
|
|
+ return Collections.emptyMap();
|
|
|
+ }
|
|
|
List<ContractSupply> list = contractSupplyService.list(
|
|
|
new LambdaQueryWrapper<ContractSupply>().in(ContractSupply::getId, contractSupplyIds)
|
|
|
);
|
|
|
@@ -86,6 +90,9 @@ public class RemoteSupplierInfoServiceImpl implements RemoteSupplierInfoService
|
|
|
|
|
|
@Override
|
|
|
public Map<Long, String> selectEnterpriseNameByIds(List<Long> ids) {
|
|
|
+ if (CollUtil.isEmpty(ids)) {
|
|
|
+ return Collections.emptyMap();
|
|
|
+ }
|
|
|
List<ContractSupply> list = contractSupplyService.list(
|
|
|
new LambdaQueryWrapper<ContractSupply>().in(ContractSupply::getId, ids)
|
|
|
);
|
|
|
@@ -115,6 +122,9 @@ public class RemoteSupplierInfoServiceImpl implements RemoteSupplierInfoService
|
|
|
|
|
|
@Override
|
|
|
public Map<Long, SupplierAreaDTO> selectSupplierInfoByContractIds(List<Long> contractSupplyIds) {
|
|
|
+ if (CollUtil.isEmpty(contractSupplyIds)) {
|
|
|
+ return Collections.emptyMap();
|
|
|
+ }
|
|
|
// 1 查询合同供货
|
|
|
List<ContractSupply> list = contractSupplyService.list(
|
|
|
new LambdaQueryWrapper<ContractSupply>()
|