|
@@ -175,8 +175,8 @@ public class SkuSpecServiceImpl extends ServiceImpl<SkuSpecMapper, SkuSpec> impl
|
|
|
|
|
|
@Override
|
|
|
public List<SkuSpecQuotationVo> getSkuSpecQuotationList(SkuSpecQuotationDto dto) {
|
|
|
- Long deptId = SecurityUtils.getDeptId();
|
|
|
- Department department = departmentService.getById(deptId);
|
|
|
+ Assert.notNull(dto.getDepartmentId(), "事业部id不能为空");
|
|
|
+ Department department = departmentService.getById(dto.getDepartmentId());
|
|
|
Assert.notNull(department, "未知事业部");
|
|
|
String priceBillingStandardIdStr = department.getPriceBillingStandardId();
|
|
|
Assert.notBlank(priceBillingStandardIdStr, "事业部未绑定加工计费标准");
|
|
@@ -211,7 +211,7 @@ public class SkuSpecServiceImpl extends ServiceImpl<SkuSpecMapper, SkuSpec> impl
|
|
|
List<Long> skuSpecIds = skuSpecList.stream().map(BaseIdPo::getId).collect(Collectors.toList());
|
|
|
Map<Long, List<SkuSpecLink>> linkMap = skuSpecLinkService.mapKGroup(SkuSpecLink::getSkuSpecId,
|
|
|
q -> q.in(SkuSpecLink::getSkuSpecId, skuSpecIds)
|
|
|
- .eq(SkuSpecLink::getDepartmentId, deptId)
|
|
|
+ .eq(SkuSpecLink::getDepartmentId, department.getId())
|
|
|
.eq(SkuSpecLink::getType, 1));
|
|
|
Set<Long> bomSpecIds = skuSpecList.stream().map(SkuSpec::getBomSpecId).collect(Collectors.toSet());
|
|
|
bomSpecIds.addAll(linkMap.values().stream().flatMap(item -> item.stream().map(SkuSpecLink::getBomSpecId)).collect(Collectors.toList()));
|