|
@@ -104,7 +104,19 @@ public class ProductInfoServiceImpl extends ServiceImpl<ProductInfoMapper, Produ
|
|
|
//归属公司id过滤
|
|
|
wrapper.eq(ProductInfo::getCompanyId, dto.getCompanyId());
|
|
|
|
|
|
- //不显示原材料数据
|
|
|
+ //过滤产品是否配置原材料
|
|
|
+ Long isRawMaterial = dto.getIsRawMaterial();
|
|
|
+ if (ObjectUtil.isNotEmpty(isRawMaterial)) {
|
|
|
+ if (isRawMaterial.equals(1)) {
|
|
|
+ //过滤有配置原材料的产品
|
|
|
+ wrapper.isNotNull("pi.rawMaterialId");
|
|
|
+ } else {
|
|
|
+ //过滤没配置原材料的产品
|
|
|
+ wrapper.isNull("pi.rawMaterialId");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ //选择物料时不显示原材料分类的数据
|
|
|
Integer isNeRawMaterial = dto.getIsNeRawMaterial();
|
|
|
if (Objects.equals(isNeRawMaterial, 1)) {
|
|
|
List<Long> pcIds = productClassifyService.listObject(ProductClassify::getId, q -> q
|