|
@@ -14,6 +14,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
import lombok.RequiredArgsConstructor;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
+import org.dromara.customer.api.domain.dto.SupplierAuthorizeDTO;
|
|
|
import org.dromara.customer.domain.QualificationFile;
|
|
import org.dromara.customer.domain.QualificationFile;
|
|
|
import org.dromara.customer.domain.SupplierInfo;
|
|
import org.dromara.customer.domain.SupplierInfo;
|
|
|
import org.dromara.customer.domain.SupplyArea;
|
|
import org.dromara.customer.domain.SupplyArea;
|
|
@@ -140,6 +141,38 @@ public class SupplierAuthorizeServiceImpl extends ServiceImpl<SupplierAuthorize
|
|
|
return flag;
|
|
return flag;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public List<SupplierAuthorizeDTO> getSupplierAuthorizeList(Long brandId) {
|
|
|
|
|
+ LambdaQueryWrapper<SupplierAuthorize> lqw = new LambdaQueryWrapper<>();
|
|
|
|
|
+ lqw.eq(SupplierAuthorize::getBrandId, brandId);
|
|
|
|
|
+ List<SupplierAuthorizeVo> supplierAuthorizeVos = baseMapper.selectVoList(lqw);
|
|
|
|
|
+ setSupplierNames(supplierAuthorizeVos);
|
|
|
|
|
+ // 使用AddressAreaService查询地区信息
|
|
|
|
|
+ setSupplyAreaInfo(supplierAuthorizeVos);
|
|
|
|
|
+
|
|
|
|
|
+ //一级 二级 三级 品目
|
|
|
|
|
+ Map<Long,Long> categoryMap = supplierAuthorizeVos.stream()
|
|
|
|
|
+ .filter(item -> item.getId() != null && item.getCategoryId() != null)
|
|
|
|
|
+ .collect(Collectors.toMap(
|
|
|
|
|
+ SupplierAuthorizeVo::getId,
|
|
|
|
|
+ item ->item.getCategoryId()
|
|
|
|
|
+ ));
|
|
|
|
|
+
|
|
|
|
|
+ Map<Long, Map<String, String>> categorysMap = remoteCategoryService.getallCategoryNameById(categoryMap);
|
|
|
|
|
+
|
|
|
|
|
+ supplierAuthorizeVos.forEach(item -> {
|
|
|
|
|
+ Map<String, String> stringStringMap = categorysMap.get(item.getId());
|
|
|
|
|
+ item.setCategorysMap(stringStringMap);
|
|
|
|
|
+ });
|
|
|
|
|
+ return supplierAuthorizeVos.stream()
|
|
|
|
|
+ .map(vo -> {
|
|
|
|
|
+ SupplierAuthorizeDTO dto = new SupplierAuthorizeDTO();
|
|
|
|
|
+ BeanUtils.copyProperties(vo, dto);
|
|
|
|
|
+ return dto;
|
|
|
|
|
+ })
|
|
|
|
|
+ .collect(Collectors.toList());
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 修改供应能力查询
|
|
* 修改供应能力查询
|
|
|
*
|
|
*
|
|
@@ -587,13 +620,7 @@ public class SupplierAuthorizeServiceImpl extends ServiceImpl<SupplierAuthorize
|
|
|
item.setCategorysMap(stringStringMap);
|
|
item.setCategorysMap(stringStringMap);
|
|
|
});
|
|
});
|
|
|
// 直接创建新的分页对象,包含处理后的数据
|
|
// 直接创建新的分页对象,包含处理后的数据
|
|
|
- Page<SupplierAuthorizeVo> resultPage = new Page<>();
|
|
|
|
|
- resultPage.setCurrent(supplierAuthorizePage.getCurrent());
|
|
|
|
|
- resultPage.setSize(supplierAuthorizePage.getSize());
|
|
|
|
|
- resultPage.setTotal(supplierAuthorizePage.getTotal());
|
|
|
|
|
- resultPage.setRecords(supplierAuthorizeVos);
|
|
|
|
|
-
|
|
|
|
|
- return TableDataInfo.build(resultPage);
|
|
|
|
|
|
|
+ return TableDataInfo.build(supplierAuthorizePage);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|