@since v8.1

POST seeyon/rest/capForm/saveOrUpdateUnflow/DEE

请求参数 (json)

{
    "data": "{
        \"calc\": true,                        //数据写入后是否刷新计算公式进行计算
        \"displayName\": false,                //是否根据显示名组装数据,为TRUE时候是通过显示名,如“实际报销费用”来解析字段,为false时是按“field0001"来解析
        \"formId\": 0,                           //表单ID,可不传
        \"relation\": true,                    //数据写入后是否刷新关联
        \"sn\": true,                          //是否刷新流水号
        \"code\": \"表单code\",
        \"interFaceRole\": \"**********\",         //接口权限,暂时不用传
        \"userName\": \"张三\",                    //接口调用的用户名
        \"trigger\": true,                     //是否触发,true为触发
        \"condition\": {                         //主键判断,根据条件判断数据是否存在,存在为修改,否则新建数据。
            \"formmain_0001\": [
                \"field0001\",
                \"field0002\"
            ],
            \"formson_0002\": [
                \"field0003\",
                \"field0004\"
            ],
            \"formson_0003\": [
                \"field0009\"
            ]
        },
        \"datas\": [
            {
                \"mainData\": {
                    \"formmain_0001\": {
                        \"field0001\": 1,
                        \"field0002\": 5
                    }
                },
                \"subData\": {
                    \"formson_0002\": [
                        {
                            \"field0005\": 5,
                            \"field0006\": 6
                        },
                        {
                            \"field0003\": 3,
                            \"field0004\": 4
                        }
                    ],
                    \"formson_0003\": [
                        {
                            \"field0007\": 3,
                            \"field0008\": 4
                        },
                        {
                            \"field0009\": 5
                        }
                    ]
                }
            }
        ]
    }"
}

响应

{

	"message": "成功23条,失败3条",
	"sucess_count": 23,
	"error_info": [{
			"error-count": 2,
			"message": "违反唯一标识",
			"datas": [{
					"formmain_0001": {
						"field0001": "21",
						"field0005": "21",
						"field0021": "21",
						"field0025": "25"
					}
				},
				{
					"formmain_0001": {
						"field0001": "22",
						"field0005": "23",
						"field0021": "24",
						"field0025": "25"
					},
					"formson_0002": [{
						"field0031": "221",
						"field0032": "222",
						"field0043": "223",
						"field0045": "224"
					}, {
						"field0031": "222",
						"field0032": "223",
						"field0043": "224",
						"field0045": "225"
					}]
				}
			]
		},
		{
			"error-count": 1,
			"message": "数据写入失败",
			"datas": [{
				"formmain_0001": {
					"field0001": "21",
					"field0005": "21",
					"field0021": "21",
					"field0025": "25"
				}
			}]
		}
	]
}
创建人:xiey
修改人:zhangzuh

快速跳转