帖子
帖子
用户
博客
课程
显示全部楼层
268
帖子
3
勋章
903
Y币

特征对象中的id代表的是什么?

[复制链接]
发表于 2023-11-9 15:32:34
本帖最后由 YonJiao 于 2023-11-9 15:41 编辑

新架构特征对象中的id代表的是特征主键id,与老架构的自定义项是有区别的,老架构的自定义项对象中的id代表的是主表或者子表主键id。
举例:【采购订单自定义项特征更新】接口,
  1. {
  2.     "datas": [
  3.         {
  4.             "id": "1820903698313248777",
  5.             "purchaseOrderDefineCharacter": {
  6.                 "cgddtest_jgj01": "{ \t"linkText": "跳转百度456", \t"linkAddress": "http://www**.**" }",
  7.                 "id": "1820903698313248781"      //其实新架构是做了兼容,传主表id或者特征id都能更新成功,推荐使用特征id
  8.             },
  9.             "purchaseOrders": [
  10.                 {
  11.                     "id": "1820903698313248778",
  12.                     "purchaseOrdersDefineCharacter": {
  13.                         "cgddtest_jgj01": "{ \t"linkText": "跳转百度456", \t"linkAddress": "http://www**.**" }",
  14.                         "id": "1820903698313248780"    //其实新架构是做了兼容,传子表id或者特征id都能更新成功,推荐使用特征id
  15.                     }
  16.                 }
  17.             ]
  18.         }
  19.     ]
  20. }
复制代码
综上所述,当调用接口进行更新特征字段值时,推荐使用特征id更新特征字段,所以建议当使用保存接口之后,将返回的特征id值保存下来,为后续更新做准备。或者更新前,先调用【详情接口】查询出特征id,再进行更新
举例:【采购订单详情查询】接口返回结果
  1. {
  2.         "code": "200",
  3.         "message": "操作成功",
  4.         "data": {
  5.                 "vendor_code": "0001000016",
  6.                 "oriTax": 14.78,
  7.                 "invoiceVendor": 1800324697548652548,
  8.                 "modifyStatus": 0,
  9.                 "purchaseOrderDefineCharacter__cgddtest_jgj01": "{"linkText":"跳转百度1","linkAddress":"http://www**.**"}",
  10.                 "natCurrency": "1602070183514997555",
  11.                 "totalQuantity": 100,
  12.                 "id": 1820903698313248777,    //表头主键id
  13.                 "bustype_code": "A20001",
  14.                 "paymentIsContract": "0",
  15.                 "purchaseOrder_allInvoiceStatus": 2,
  16.                 "isWfControlled": true,
  17.                 "natSum": 1000,
  18.                 "submitTime": "2023-09-20 11:38:20",
  19.                 "auditorId": "1602067512044290057",
  20.                 "auditTime": "2023-09-20 11:38:30",
  21.                 "natCurrency_priceDigit": 6,
  22.                 "exchRateType": "rybentc5",
  23.                 "bmake_st_purinrecord_red": true,
  24.                 "purchaseOrders": [
  25.                         {
  26.                                 "discountRate": 100,
  27.                                 "purUOM": 1608056268413992965,
  28.                                 "oriTax": 14.78,
  29.                                 "product_cCode": "0000000011",
  30.                                 "priceUOM_Precision": 2,
  31.                                 "product1": 1723201034954735616,
  32.                                 "isRelease": 0,
  33.                                 "priceUOM_Code": "001003",
  34.                                 "oriUnitPriceOriginal": 9.8522,
  35.                                 "isLogisticsRelated": false,
  36.                                 "isExpiryDateManage": false,
  37.                                 "taxitems_name": "1.5%增值税税率",
  38.                                 "unit_code": "001003",
  39.                                 "id": 1820903698313248778,     //表体主键id
  40.                                 "mainid": 1820903698313248777,
  41.                                 "expenseOriMoney": 0,
  42.                                 "purUOM_Name": "箱",
  43.                                 "product_oUnitId": 1608056268413992965,
  44.                                 "materialClassCode": "000019",
  45.                                 "realProductAttribute": 1,
  46.                                 "natSum": 1000,
  47.                                 "product_reservation": false,
  48.                                 "rowClose": false,
  49.                                 "invExchRate": 1,
  50.                                 "discountTaxType": "0",
  51.                                 "unitExchangeTypePrice": 0,
  52.                                 "isGiftProduct": false,
  53.                                 "paymentClose": false,
  54.                                 "plannedTotalRecPurQty": 0,
  55.                                 "amountPayable": 1000,
  56.                                 "inWHStatus": 2,
  57.                                 "productsku_cName": "蔗糖",
  58.                                 "purUOM_Code": "001003",
  59.                                 "isDoLogistics": 0,
  60.                                 "expenseOriSum": 0,
  61.                                 "invPriceExchRate": 1,
  62.                                 "isBatchManage": false,
  63.                                 "releaseType": 1,
  64.                                 "totalServiceMoney": 0,
  65.                                 "pubts": "2023-10-21 00:24:19",
  66.                                 "arrivalClose": false,
  67.                                 "rowno": 1,
  68.                                 "product": 1723201034954735616,
  69.                                 "materialClassId": 1723198818765766660,
  70.                                 "oriSum": 1000,
  71.                                 "inInvoiceOrg_name": "jgj集团",
  72.                                 "demandOrg_name": "jgj集团",
  73.                                 "priceQty": 100,
  74.                                 "priceSource": "1",
  75.                                 "isRowExpenses": false,
  76.                                 "paymentStauts": 1,
  77.                                 "natMoney": 985.22,
  78.                                 "taxitems_code": "VATR6",
  79.                                 "purUOM_Precision": 2,
  80.                                 "product_productOfflineRetail_purchaseUnit": 1608056268413992965,
  81.                                 "arrivedStatus": 2,
  82.                                 "inOrg": "1723183399803813894",
  83.                                 "materialClassName": "原材料",
  84.                                 "natTax": 14.78,
  85.                                 "subQty": 100,
  86.                                 "proDescFlag": "0",
  87.                                 "smallTaxpayer": 0,
  88.                                 "totalServiceNoTaxMoney": 0,
  89.                                 "inInvoiceOrg": "1723183399803813894",
  90.                                 "product_cName": "蔗糖",
  91.                                 "closeqty": 0,
  92.                                 "purchaseOrdersDefineCharacter__cgddtest_jgj01": "{"linkText":"跳转百度1","linkAddress":"http://www**.**"}",
  93.                                 "oriUnitPrice": 9.8522,
  94.                                 "ticketCollectionClose": false,
  95.                                 "approveqty": 0,
  96.                                 "unit_name": "箱",
  97.                                 "taxRate": 1.5,
  98.                                 "unit": 1608056268413992965,
  99.                                 "productsku": 1723201034954735635,
  100.                                 "hasPaymentSchedules": false,
  101.                                 "plannedTotalRecUnitQty": 0,
  102.                                 "productsku_cCode": "0000000011",
  103.                                 "qty": 100,
  104.                                 "unit_Precision": 2,
  105.                                 "oriTaxUnitPrice": 10,
  106.                                 "productPuType": "0",
  107.                                 "oriMoney": 985.22,
  108.                                 "purchaseOrdersDefineCharacter": {
  109.                                         "ytenant": "rybentc5",
  110.                                         "id": "1820903698313248780",     //表体特征对象主键id
  111.                                         "pubts": "2023-08-25 17:08:47",
  112.                                         "cgddtest_jgj01": "{"linkText":"跳转百度1","linkAddress":"http://www**.**"}"
  113.                                 },
  114.                                 "natUnitPrice": 9.8522,
  115.                                 "isLineFeedback": false,
  116.                                 "demandOrg": "1723183399803813894",
  117.                                 "weighFinish": false,
  118.                                 "purchaseOrdersDefineCharacter__id": "1820903698313248780",
  119.                                 "realProductAttributeType": 1,
  120.                                 "purchaseOrdersCharacteristics": {
  121.                                         "ytenant": "rybentc5",
  122.                                         "id": "1820903698313248779",
  123.                                         "pubts": "2023-08-25 16:46:25"
  124.                                 },
  125.                                 "storageqty": 0,
  126.                                 "priceUOM": 1608056268413992965,
  127.                                 "releaseStatus": 0,
  128.                                 "warehousingClose": false,
  129.                                 "totalServiceQty": 0,
  130.                                 "expenseNatSum": 0,
  131.                                 "isArrivalplan": false,
  132.                                 "unitExchangeType": 0,
  133.                                 "inOrg_name": "jgj集团",
  134.                                 "lineno": 10,
  135.                                 "priceUOM_Name": "箱",
  136.                                 "expenseNatMoney": 0,
  137.                                 "invoiceStatus": 2,
  138.                                 "taxitems": "10003",
  139.                                 "natTaxUnitPrice": 10,
  140.                                 "payStatus": "未付款",
  141.                                 "priceMark": 0,
  142.                                 "bodyParallel": {
  143.                                         "id": 1820903698313248778,
  144.                                         "erpApplyOrderType": "1",
  145.                                         "signatory": "0",
  146.                                         "isMaterialClass": false,
  147.                                         "rowCollaborationStatus": "1"
  148.                                 }
  149.                         }
  150.                 ],
  151.                 "inventoryowner": 0,
  152.                 "status": 1,
  153.                 "verifystate": 2,
  154.                 "currency_moneyDigit": 2,
  155.                 "currency_code": "CNY",
  156.                 "vouchdate": "2023-09-20 00:00:00",
  157.                 "natCurrency_name": "人民币",
  158.                 "invoiceVendor_name": "jgj测试供应商001",
  159.                 "allPaymentStauts": 1,
  160.                 "vendor": 1800324697548652548,
  161.                 "exchRateDate": "2023-09-20 00:00:00",
  162.                 "currency": "1602070183514997555",
  163.                 "currency_priceRount": 4,
  164.                 "pubts": "2023-09-20 11:38:30",
  165.                 "org_name": "jgj集团",
  166.                 "generalPurchaseOrderType": "1",
  167.                 "isFlowCoreBill": true,
  168.                 "createDate": "2023-09-20 00:00:00",
  169.                 "auditDate": "2023-09-20 00:00:00",
  170.                 "creator": "倪帅臣",
  171.                 "oriSum": 1000,
  172.                 "exchRateType_name": "基准汇率",
  173.                 "auditor": "倪帅臣",
  174.                 "taxSettingType": 0,
  175.                 "purchaseOrder_allInWHStatus": 2,
  176.                 "createTime": "2023-09-20 11:38:10",
  177.                 "canWithDraw": 1,
  178.                 "purchaseOrderDefineCharacter": {
  179.                         "ytenant": "rybentc5",
  180.                         "id": "1820903698313248781",    //表头特征对象主键id
  181.                         "pubts": "2023-09-20 11:38:11",
  182.                         "cgddtest_jgj01": "{"linkText":"跳转百度1","linkAddress":"http://www**.**"}"
  183.                 },
  184.                 "purchaseOrderDefineCharacter__id": "1820903698313248781",
  185.                 "natMoney": 985.22,
  186.                 "isMaxLimitPrice": false,
  187.                 "isFeedback": false,
  188.                 "currency_priceDigit": 6,
  189.                 "phasedInvoice": false,
  190.                 "masterOrgKeyField": "org",
  191.                 "bEffectStock": true,
  192.                 "bustype_name": "普通采购",
  193.                 "natTax": 14.78,
  194.                 "submitter_username": "倪帅臣",
  195.                 "directShipment": "1",
  196.                 "isAllowAdjustPrice": "0",
  197.                 "maturityDate": "2023-08-25 00:00:00",
  198.                 "storagenum": 0,
  199.                 "vendor_name": "jgj测试供应商001",
  200.                 "socialStatus": "false",
  201.                 "barCode": "st_purchaseorder|1820903698313248777",
  202.                 "isContract": false,
  203.                 "natCurrency_moneyDigit": 2,
  204.                 "isMaterialClass": false,
  205.                 "closeIsCollaboration": false,
  206.                 "exchRateType_Digit": 6,
  207.                 "moneysum": 1000,
  208.                 "oriMoney": 985.22,
  209.                 "purchaseOrder_allArrivedStatus": 2,
  210.                 "paymentProcess": 0,
  211.                 "natCurrency_code": "CNY",
  212.                 "submitter": "0f059088-9c92-4769-a3e7-8f1a341cc3df",
  213.                 "code": "000023",
  214.                 "creatorId": 1602067512044290057,
  215.                 "bizFlow": "a1c5e1a8-6fbe-11ed-8d77-fa163e279374",
  216.                 "exchRate": 1,
  217.                 "isExeDetailedReconciliation": false,
  218.                 "bizstatus": 1,
  219.                 "bizFlow_version": "V1.0",
  220.                 "accountDate": "2023-08-25 00:00:00",
  221.                 "currency_name": "人民币",
  222.                 "org": "1723183399803813894",
  223.                 "bmake_st_purinrecord": true,
  224.                 "transTypeKeyField": "bustype",
  225.                 "bustype": "1602070183514996799",
  226.                 "retailInvestors": false,
  227.                 "currency_moneyRount": 4,
  228.                 "isVMI": false,
  229.                 "approvenum": 0,
  230.                 "bizFlow_name": "普通订货(无到货)",
  231.                 "headParallel": {
  232.                         "isERPApproval": false,
  233.                         "approvalStatus": 0,
  234.                         "orderSource": "4",
  235.                         "id": 1820903698313248777,
  236.                         "isConQuantity": false,
  237.                         "orderCollaborationStatus": 1,
  238.                         "sendErpMsg": false,
  239.                         "isConPrice": false,
  240.                         "businessType": 1
  241.                 }
  242.         }
  243. }
复制代码


您需要登录后才可以回帖 登录

本版积分规则