老师,现在我们cloud在与客户第三方系统对接时造成关系的理解混乱,需要求总部老师协助:
以物料为例:
物料的主对象为“物料”表单,”基本“表单为从属对象,从业务上来看两者是1对1的关系,但是从对象序列化生成的JSON中却是以1对多的格式进行展示(见附录:JSON片断)。
1、解释一下为何存在这种现象?这种现象是否只是个例?会在什么场景下出现?
2、能否把此类型的对象关系修改为1对1?或是在主对象中以单属性对象存在,并非对象列表?
附录:JSON片断:(黄色背景的物料基本信息,与主对象以1对多的格式显示)
"Image":null,"OldNumber":" ","MaterialGroup_Id":0,"MaterialGroup":null,"PLMMaterialId":" ","MaterialSRC":"B","IsValidate":false,"F_BMH_Finance_Attr_Id":" ","F_BMH_Finance_Attr":null,"F_bmh_brands_Id":0,"F_bmh_brands":null,"F_bmh_taste_Id":0,"F_bmh_taste":null,"F_bmh_technology_Id":0,"F_bmh_technology":null,"F_bmh_Packing_Id":0,"F_bmh_Packing":null,"F_kid_Decimal":0.0,"F_BMH_HASPUSH":false,"F_kid_Decimal1":0.0,"MaterialBase":[{"Id":167485,"ErpClsID":"1","IsInventory":true,"IsSale":true,"IsAsset":false,"IsSubContract":false,"IsProduce":false,"IsPurchase":true,"IsRealTimeAccout":false,"BaseUnitId_Id":10101,"BaseUnitId":{"Id":10101,"msterID":10101,"MultiLanguageText":[{"PkId":10136,"LocaleId":2052,"Name":"Pcs"}],"Name":[{"Key":2052,"Value":"Pcs"}],"Number":"Pcs","IsBaseUnit":true,"UnitGroupId_Id":10086,"UnitGroupId":{"Id":10086,"msterID":10086,"Number":"Quantity","MultiLanguageText":[{"PkId":10145,"LocaleId":2052,"Name":"数量"}],"Name":[{"Key":2052,"Value":"数量"}]},"Precision":2,"RoundType":"1","UNITCONVERTRATE":[{"
2CFFF015@F8DC6F0(06-05-20-48-5 …(15.21KB)