Skip to content

Commit

Permalink
设备 继承来的属性 只能修改备注
Browse files Browse the repository at this point in the history
  • Loading branch information
lgt1126 committed Aug 29, 2021
1 parent 1d488a6 commit 357a0e9
Showing 1 changed file with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -147,15 +147,18 @@ public void createProductAttr(ProductAttr productAttr, String zbxId) {
}

private ProductAttribute buildProdAttribute(ProductAttribute prodAttribute, ProductAttr productAttr) {
if(null == prodAttribute.getTemplateId()){
prodAttribute.setName(productAttr.getAttrName());
prodAttribute.setKey(productAttr.getKey());
prodAttribute.setSource(productAttr.getSource());
prodAttribute.setUnits(productAttr.getUnits());
prodAttribute.setDepAttrId(productAttr.getDepAttrId());
prodAttribute.setValueType(productAttr.getValueType());
}
prodAttribute.setProductId(productAttr.getProductId());
prodAttribute.setName(productAttr.getAttrName());
prodAttribute.setKey(productAttr.getKey());
prodAttribute.setSource(productAttr.getSource());
prodAttribute.setUnits(productAttr.getUnits());
prodAttribute.setRemark(productAttr.getRemark());
prodAttribute.setValueType(productAttr.getValueType());
prodAttribute.setAttrId(productAttr.getAttrId());
prodAttribute.setDepAttrId(productAttr.getDepAttrId());

return prodAttribute;
}

Expand Down

0 comments on commit 357a0e9

Please sign in to comment.