数字工厂企业用户开通并使用数字工厂的订单管理后,第三方工业应用可以通过订单管理应用提供的服务来同步订单数据。
订单管理
应用可以通过服务接口,同步企业的采购订单,新建和更新接口使用参见一方订单服务,采购单同步接口
订单数据获取
应用获取订单可以通过查询订单接口,接口使用参见工业订单服务查询列表接口。
除了主动查询,还可以通过集成工作概述中的数据变更通知订阅说明了接口的使用方式,其中serviceType参数设置为6,表示订单数据通知。
当订单发生变更时,消息订阅端会收到两个字段:“动作”+“订单信息”,动作参数如下:
新增订单:1
关闭订单:2
更新订单:3 //钉钉版更新订单该值为4
新增订单通知格式
{
"serviceType":6,
"orderInfo":"{\"annexes\":{},\"bizSource\":0,\"companyName\":\"dfgdsg\",\"contractType\":1,\"dueTime\":1593964800000,\"orderId\":\"117481593591492727\",\"orderProductDTOs\":[{\"amount\":\"34\",\"materialType\":\"10\",\"materialTypeName\":\"腹胀\",\"measureUnit\":\"件\",\"price\":\"34\",\"processFlow\":\"322\",\"processFlowName\":\"服装加工\",\"productCode\":\"kkk\",\"productId\":714,\"productModel\":\"fsda\",\"productName\":\"jjj\",\"productStatus\":1,\"source\":\"OC\",\"version\":0,\"versionStatus\":1}],\"orderTime\":1593591493000,\"produceStatus\":0,\"recipientAddress\":\"fdgsgsdg\",\"recipientCity\":\"自贡\",\"recipientDistrict\":\"荣县\",\"recipientName\":\"dfsgs\",\"recipientPhone\":\"13312312456\",\"recipientProvince\":\"四川\",\"totalAmount\":\"434\",\"totalPrice\":\"34535\",\"workingType\":1}",
"action":1
}
关闭订单通知格式
{
"serviceType":6,
"orderInfo":"{\"annexes\":{},\"bizSource\":0,\"companyName\":\"dfgdsg\",\"contractType\":1,\"dueTime\":1593964800000,\"orderId\":\"117481593591492727\",\"orderProductDTOs\":[{\"amount\":\"34\",\"materialType\":\"10\",\"materialTypeName\":\"腹胀\",\"measureUnit\":\"件\",\"price\":\"34\",\"processFlow\":\"322\",\"processFlowName\":\"服装加工\",\"productCode\":\"kkk\",\"productId\":714,\"productModel\":\"fsda\",\"productName\":\"jjj\",\"productStatus\":1,\"source\":\"OC\",\"version\":0,\"versionStatus\":1}],\"orderTime\":1593591493000,\"produceStatus\":4,\"recipientAddress\":\"fdgsgsdg\",\"recipientCity\":\"自贡\",\"recipientDistrict\":\"荣县\",\"recipientName\":\"dfsgs\",\"recipientPhone\":\"13312312456\",\"recipientProvince\":\"四川\",\"totalAmount\":\"434\",\"totalPrice\":\"34535\",\"workingType\":1}",
"action":2
}
在文档使用中是否遇到以下问题
更多建议
匿名提交