# 回调接口
请求示例已经在 指北 中给出,下文将会详细列出当前实现的 webhook 接口及其示例。
//请求报文 DTO 定义示例(java)
public class Event<T> {
private String requestId;
private BusinessType businessType;
private T data;
//TODO constructor, getter, setter
}
# 当前支持的事件枚举
public enum BusinessType {
/**
* 0-1000 库存相关
*/
CREATE_MATERIAL_REQUIREMENT(1, "创建备料"),
UPDATE_MATERIAL_REQUIREMENT(2, "修改备料"),
DELETE_MATERIAL_REQUIREMENT(3, "删除备料"),
CREATE_PRODUCTION_IN(4, "创建生产入库"),
UPDATE_PRODUCTION_IN(5, "修改生产入库"),
DELETE_PRODUCTION_IN(6, "删除生产入库"),
CREATE_MATERIAL_RETURN(7, "创建还料入库"),
UPDATE_MATERIAL_RETURN(8, "修改还料入库"),
DELETE_MATERIAL_RETURN(9, "删除还料入库"),
CREATE_INVENTORY_BATCH(13, "创建出入库记录"),
CREATE_REQUISITION_IN(20, "创建入库申请"),
CREATE_REQUISITION_OUT(21, "创建出库申请"),
CREATE_REQUISITION_TRANSFER(22, "创建移库申请"),
CREATE_SALES_OUT(30, "创建出库申请"),
INVALID_SALES_OUT(31, "作废入库申请"),
CREATE_SALES_RETURN(32, "创建退货入库申请"),
INVALID_SALES_RETURN(33, "创建出库申请"),
/**
* 1000-1999 生产相关
*/
CREATE_JOB_BOOKING(1001, "创建生产报工"),
DELETE_JOB_BOOKING(1002, "删除生产报工"),
/**
* 2000-2999 采购相关
*/
CREATE_PURCHASE_REQUISITION(2010, "创建采购申请"),
UPDATE_PURCHASE_REQUISITION(2011, "修改采购申请"),
DELETE_PURCHASE_REQUISITION(2012, "删除采购申请"),
CREATE_RECEIPT_REQUISITION(2020,"创建收料申请"),
UPDATE_RECEIPT_REQUISITION(2021,"修改收料申请"),
DELETE_RECEIPT_ORDER(2023,"删除收料单"),
/**
* 3000-3999 销售相关
*/
CREATE_SALES_ORDER(3000, "创建销售订单"),
AUDIT_SALES_ORDER(3001, "审核销售订单"),
/**
* 4000-4999 销售相关
*/
CREATE_SALES_ORDER_INVOICE(4000, "创建销售发票"),
AUDIT_SALES_ORDER_INVOICE(4001, "审核销售发票"),
CREATE_PURCHASE_ORDER_INVOICE(4010, "创建采购发票"),
AUDIT_PURCHASE_ORDER_INVOICE(4011, "审核采购发票"),
ABANDON_SALES_ORDER_INVOICE(4050,"废弃销售发票"),
/**
* 5000-5999 收付款相关
*/
CREATE_PAYMENT(5000,"创建收付款记录"),
AUDIT_PAYMENT(5001,"审核收付款"),
DELETE_PAYMENT(5002,"删除收付款"),
ABANDON_PAYMENT(5003,"撤回收付款"),
/**
* 9000-9999 主数据相关
*/
CREATE_CUSTOMER(9000, "创建客户"),
UPDATE_CUSTOMER(9001, "更新客户"),
DELETE_CUSTOMER(9002, "删除客户"),
CREATE_CUSTOMER_CATEGORY(9003,"创建客户分类"),
CREATE_SUPPLIER(9010, "创建供应商"),
UPDATE_SUPPLIER(9011, "修改供应商"),
DELETE_SUPPLIER(9012, "删除供应商"),
CREATE_SUPPLIER_CATEGORY(9013,"创建供应商分类"),
CREATE_ITEM(9100, "创建物料"),
UPDATE_ITEM(9101, "修改物料"),
DELETE_ITEM(9102, "删除物料"),
CREATE_ITEM_UNIT(9103,"创建物料单位"),
UPDATE_ITEM_UNIT(9104,"修改物料单位"),
DELETE_ITEM_UNIT(9105,"删除物料单位"),
CREATE_WAREHOUSE(9200, "创建仓库"),
UPDATE_WAREHOUSE(9201, "修改仓库"),
DELETE_WAREHOUSE(9202, "删除仓库"),
;
}
更多类型正在开发当中,有需求请联系我司对接的业务同事,可以优先安排研发资源。