| | |
| | | plan.setCustomerName(formData.getString("textField_lbkozohg")); |
| | | |
| | | String materialCode = row.getString("textField_l9xo62q5"); |
| | | plan.setMaterialCode(materialCode); |
| | | // 根据物料编码查询物料信息表,关联物料ID |
| | | if (StringUtils.isNotEmpty(materialCode)) { |
| | | LambdaQueryWrapper<ProductMaterialSku> skuQueryWrapper = new LambdaQueryWrapper<>(); |
| | |
| | | ProductMaterialSku sku = productMaterialSkuService.getOne(skuQueryWrapper); |
| | | if (sku != null) { |
| | | plan.setProductMaterialSkuId(sku.getId()); |
| | | if (sku.getMaterialId() != null) { |
| | | // 设置产品名称 |
| | | ProductMaterial material = productMaterialService.getById(sku.getMaterialId()); |
| | | if (material != null) { |
| | | plan.setProductName(material.getMaterialName()); |
| | | } |
| | | } |
| | | // 设置规格型号 |
| | | plan.setProductSpec(sku.getSpecification()); |
| | | } |
| | | } |
| | | |
| | |
| | | ProductMaterialSku sku = productMaterialSkuService.getOne(skuQueryWrapper); |
| | | if (sku != null) { |
| | | entity.setProductMaterialSkuId(sku.getId()); |
| | | if (sku.getMaterialId() != null) { |
| | | ProductMaterial material = productMaterialService.getById(sku.getMaterialId()); |
| | | if (material != null) { |
| | | entity.setProductName(material.getMaterialName()); |
| | | } |
| | | } |
| | | entity.setProductSpec(sku.getSpecification()); |
| | | } |
| | | } |
| | | |