Parcourir la source

产品库允许修改币种字段

yzc il y a 1 an
Parent
commit
865e5a208f

+ 4 - 0
hx-item/src/main/java/com/fjhx/item/service/product/impl/ProductInfoServiceImpl.java

@@ -348,10 +348,14 @@ public class ProductInfoServiceImpl extends ServiceImpl<ProductInfoMapper, Produ
         if (ObjectUtil.isEmpty(productInfo)) {
             throw new ServiceException("无法查询到改产品的产品信息,产品id" + productInfoDto.getId());
         }
+        //限制只能改以下字段
         ProductInfoEhsdJson productInfoEhsdJson = JSONObject.parseObject(productInfo.getEhsdJson(), ProductInfoEhsdJson.class);
         productInfoEhsdJson.setPrice(newProductInfoEhsdJson.getPrice());//销售指导价
+        productInfoEhsdJson.setCurrency(newProductInfoEhsdJson.getCurrency());//指导价币种
         productInfoEhsdJson.setCostPrice(newProductInfoEhsdJson.getCostPrice());//成本价
+        productInfoEhsdJson.setCostCurrency(newProductInfoEhsdJson.getCostCurrency());//成本币种
         productInfoEhsdJson.setNetWeight(newProductInfoEhsdJson.getNetWeight());//净重
+
         productInfo.setRemark(productInfoDto.getRemark());//备注
         productInfo.setEhsdJson(JSONObject.toJSONString(productInfoEhsdJson,JSONWriter.Feature.WriteLongAsString));
         this.updateById(productInfo);