请选择 进入手机版 | 继续访问电脑版

Duplicate entry '2548730061411840' for key 'PRIMARY'

[复制链接]
重心亦重行 发表于 2021-12-7 11:13:08
本帖最后由 重心亦重行 于 2021-12-7 14:42 编辑

收款保存接口,含有自定义项,API新增可以,但修改报错,返回,Duplicate entry '2548730061411840' for key 'PRIMARY',如果传值时把自定义项去掉,不会有问题,但是加上修改后的自定义项就报错了

{\"data\":[{\"id\":\"2548730061411840\",\"accentity_code\":\"0001\",\"vouchdate\":
\"2021-12-06\",\"customer_code\":\"00030001\",
\"enterprisebankaccount\":\"2548725003525888\",\"tradetype_code\":\"arap_receipt_o
ther\",\"currency\":\"2520420071232005\",
\"exchangeRateType_digit\":\"6\",\"exchangeRateType\":\"y4efqa1c\",\"exchRate\":7.
00000,\"oriSum\":700.0,\"natSum\":4900.0,
\"dept_code\":\"CS\",\"operator_code\":\"\",\"srcbillid\":\"afae4496-84fa-0584-b7a
c-a47a8fb1a410\",\"createDate\":\"0001-01-01\",\"_status\":\"Update\",
\"contractno\":\"PH123\",\"headfree!define1_name\":\"公司
\",\"ReceiveBill_b\":[{\"id\":\"2548730061411841\",\"quickType_code\":\"1\"
,\"oriSum\":700.0,\"natSum\":4900.0,\"dept_code\":\"CS\",\"operator_code\":\"\",\"
_status\":\"Update\",\"bodyfree!define2\":\"254872857816704059105\"}]}]}

1条回复

YonBuilder官方 管理员 190Y币
入参中有 "headfree!define1_name":"职员", ,但是没有 "headfree!define1",增加上该参数就正常了

正确入参:
{
"data":{
"ReceiveBill_b":[
{
"quickType_code":"1",
"id":"2548730061411841",
"oriSum":700,
"natSum":4900,
"_status":"Update"
}
],
"id":"2548730061411840",
"customer_code":"00030001",
"exchangeRateType_digit":"6",
"natSum":4900,
"_status":"Update",
"exchRate":7,
"vouchdate":"2021-12-06",
"createDate":"0001-01-01",
"oriSum":700,
"accentity_code":"0001",
"currency_priceDigit":"1",
"currency_moneyDigit":"1",
"currency":"2520420071232005",
"headfree!define1":2543591071682816,
"headfree!define1_name":"职员",
"exchangeRateType":"y4efqa1c"
}
您需要登录后才可以回帖 登录

本版积分规则