From 0fe8a027fc2e5bbcf24871b895fca12f5e2231c2 Mon Sep 17 00:00:00 2001
From: gongchunyi <deslre0381@gmail.com>
Date: 星期三, 08 四月 2026 14:05:08 +0800
Subject: [PATCH] fix: 生成计划导入修改为手动新增,长宽高导入不成功
---
src/main/java/com/ruoyi/production/service/impl/ProductMaterialServiceImpl.java | 19 ++++++++++++++-----
1 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/src/main/java/com/ruoyi/production/service/impl/ProductMaterialServiceImpl.java b/src/main/java/com/ruoyi/production/service/impl/ProductMaterialServiceImpl.java
index d8ad015..f54b264 100644
--- a/src/main/java/com/ruoyi/production/service/impl/ProductMaterialServiceImpl.java
+++ b/src/main/java/com/ruoyi/production/service/impl/ProductMaterialServiceImpl.java
@@ -11,6 +11,7 @@
import com.ruoyi.framework.util.AliDingUtils;
import com.ruoyi.production.dto.ProductMaterialDto;
import com.ruoyi.production.dto.ProductMaterialGroupDto;
+import com.ruoyi.production.dto.ProductMaterialSkuDto;
import com.ruoyi.production.enums.MaterialConfigTypeEnum;
import com.ruoyi.production.mapper.ProductMaterialMapper;
import com.ruoyi.production.pojo.ProductMaterial;
@@ -270,8 +271,7 @@
@Override
public List<ProductMaterialGroupDto> ProductMaterialList(Integer type) {
List<ProductMaterialConfig> configList = productMaterialConfigService.list(new LambdaQueryWrapper<ProductMaterialConfig>()
- .eq(ProductMaterialConfig::getConfigType, MaterialConfigTypeEnum.MATERIAL_TYPE.name())
- );
+ .eq(ProductMaterialConfig::getConfigType, MaterialConfigTypeEnum.MATERIAL_TYPE.name()));
if (CollectionUtils.isEmpty(configList)) {
return new ArrayList<>();
}
@@ -283,7 +283,9 @@
ProductMaterial::getId,
ProductMaterial::getMaterialTypeId,
ProductMaterial::getInventoryCategoryId,
- ProductMaterial::getProductName
+ ProductMaterial::getProductName,
+ ProductMaterial::getUnit,
+ ProductMaterial::getRemark
)
);
materialMap = materialList.stream()
@@ -358,6 +360,8 @@
dto.setProductName(m.getProductName());
dto.setMaterialTypeId(m.getMaterialTypeId());
dto.setInventoryCategoryId(m.getInventoryCategoryId());
+ dto.setUnit(m.getUnit());
+ dto.setRemark(m.getRemark());
return dto;
}
@@ -410,8 +414,13 @@
}
@Override
- public String selectProductModelIdByName(Long productId) {
- return baseMapper.selectProductModelIdByName(productId);
+ public ProductMaterialSkuDto selectProductByModelId(Long productModelId) {
+ return baseMapper.selectProductByModelId(productModelId);
+ }
+
+ @Override
+ public ProductMaterialSkuDto selectProductByProductMainId(Long productOrderId) {
+ return baseMapper.selectProductByProductMainId(productOrderId);
}
private void validateProductMaterial(ProductMaterial productMaterial, boolean requireId) {
--
Gitblit v1.9.3