aiM18开发者中心 aiM18开发者中心
文档主页
  • 平台

    • 平台总体概述
    • 前端开发须知
    • 后台开发须知
    • EBI开发须知
    • JSF组件属性表
    • BPM扩展接口
    • 一查到底扩展接口
    • 手机App设置
  • ERP

    • ERP 后端扩展
    • ERP 应用配置
    • ERP 前端扩展
  • 教程

    • 设置Eclipse开发环境
    • 创建App教程
  • 平台相关

    • API授权
    • 通用的数据对象
    • 核心的API
    • EBI相关接口
  • 企业资源规划
  • 人力资本管理
  • 业务流程处理
  • 日程管理
  • 文档管理
  • 教程

    • 通过API与aiM18进行交互
教程
GitHub (opens new window)
文档主页
  • 平台

    • 平台总体概述
    • 前端开发须知
    • 后台开发须知
    • EBI开发须知
    • JSF组件属性表
    • BPM扩展接口
    • 一查到底扩展接口
    • 手机App设置
  • ERP

    • ERP 后端扩展
    • ERP 应用配置
    • ERP 前端扩展
  • 教程

    • 设置Eclipse开发环境
    • 创建App教程
  • 平台相关

    • API授权
    • 通用的数据对象
    • 核心的API
    • EBI相关接口
  • 企业资源规划
  • 人力资本管理
  • 业务流程处理
  • 日程管理
  • 文档管理
  • 教程

    • 通过API与aiM18进行交互
教程
GitHub (opens new window)
  • 通用

    • 访问授权
    • 通用JSON对象
    • 核心服务
    • 商业智能
    • 错误码说明
  • 业务流程管理

    • 业务流程管理
  • 日程管理

    • 日程管理
  • 文档管理

    • 文档管理系统
  • 企业资源规划

    • API授权流程
    • 基础资料
    • 财务
    • 财务EBI
    • 委外代销
      • 委外代销订单
        • 获取委外代销订单列表
        • 一、接口描述
        • 二、接口调用说明
        • 读取委外代销订单
        • 一、接口描述
        • 二、接口调用说明
        • 保存委外代销订单
        • 一、接口描述
        • 二、接口调用说明
        • 新增委外代销订单(自动补全)
        • 一、接口描述
        • 二、接口调用说明
        • 删除委外代销订单
        • 一、接口描述
        • 二、接口调用说明
        • 读取EBI数据:委外代销订单列表
        • 一、接口描述
        • 二、接口调用说明
        • 读取EBI数据:委外代销订单报告
        • 一、接口描述
        • 二、接口调用说明
      • 委外代销送货单
        • 获取委外代销送货单列表
        • 一、接口描述
        • 二、接口调用说明
        • 读取委外代销送货单
        • 一、接口描述
        • 二、接口调用说明
        • 保存委外代销送货单
        • 一、接口描述
        • 二、接口调用说明
        • 新增委外代销送货单(自动补全)
        • 一、接口描述
        • 二、接口调用说明
        • 删除委外代销送货单
        • 一、接口描述
        • 二、接口调用说明
        • 读取EBI数据:委外代销送货单列表
        • 一、接口描述
        • 二、接口调用说明
        • 读取EBI数据:委外代销送货单报告
        • 一、接口描述
        • 二、接口调用说明
      • 委外代销退货单
        • 获取委外代销退货单列表
        • 一、接口描述
        • 二、接口调用说明
        • 读取委外代销退货单
        • 一、接口描述
        • 二、接口调用说明
        • 保存委外代销退货单
        • 一、接口描述
        • 二、接口调用说明
        • 新增委外代销退货单(自动补全)
        • 一、接口描述
        • 二、接口调用说明
        • 删除委外代销退货单
        • 一、接口描述
        • 二、接口调用说明
        • 读取EBI数据:委外代销退货单列表
        • 一、接口描述
        • 二、接口调用说明
        • 读取EBI数据:委外代销退货单报告
        • 一、接口描述
        • 二、接口调用说明
    • EBI
    • 仓库管理方案
    • 零售
    • 零售储值
    • 零售和第三方物流
    • 生产
    • 贸易和财务
    • 采购
    • 销售
    • 库存
    • 委外
  • 人力资本管理

    • API授权流程
    • 绩效管理
    • 考勤管理
    • 临时工
    • 人事管理
    • 请假管理
    • 医疗索偿
    • 薪资管理
    • 招聘管理
    • 培训&资助
  • Web Services中文
  • 企业资源规划
Multiable
2024-07-12
目录

委外代销

# 委外代销订单

# 获取委外代销订单列表

# 一、接口描述

​ 用于获取委外代销订单列表(同UI界面左侧的Search List数据)

# 二、接口调用说明

​ 1、请求说明

URL http://[server]/jsf/rfws/search/search
http请求方式 GET
编码类型 UTF-8

​ 2、URL参数

参数 类型 必填 说明
authorization String(Header) 是 OAuth获取的Access Token
client_id String(Header) 是 aiM18[授权应用列表]中的Client ID
stSearch String(Query) 是 consignCo
beId long(Query) 是 aiM18企业法人[部门]的ID
formatId long(Query) 否 aiM18[查询格式]的ID,用于获取[查询格式]步骤二中设定的栏位格式;若不使用此参数,则使用默认设置。
startRow int(Query) 否 返回结果的开始行
endRow int(Query) 否 返回结果的结束行
quickSearchStr String(Query) 否 用于设定关键字查找数据

​ 3、请求示例

	CloseableHttpClient client = HttpClientBuilder.create().build();
	CloseableHttpResponse res = null;
	try {

		String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/search/search";
		String param = "&stSearch=consignCo&beId=11";

		HttpGet get = new HttpGet(url + "?" + param);
		get.addHeader("authorization", access_token);
		get.addHeader("client_id", ClientID);
		res = client.execute(get);
		if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
			JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
		}
		get.releaseConnection();
	} catch (Exception e) {
		e.printStackTrace();
	} finally {
		try {
			if (res != null) {
				res.close();
			}
			if (client != null) {
				client.close();
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}

​ 4、返回示例

{
  	"stSearch": "consignCo",
    "size": 4,
    "stSearchDisplay": "Consignment Order",
    "values": [
        {
            "code": "ITCO220330A",
            "tDate": "2022-03-30",
            "consignMainco.cusId.cus.code": "IT002",
            "consignMainco.cusId.cus.desc__lang": "Joey Wall",
            "cuspono": "",
            "consignMainco.curId.cur.sym": "¥",
            "consignMainco.flowTypeId.flowtype.code": "MX-BS-CONS",
            "consignMainco.flowTypeId.flowtype.desc": "Consignment Flow",
            "iRev": 1,
            "lastModifyDate": "2022-03-30 11:32:15",
            "consignMainco.lastModifyUid.simpleUser.desc__lang": "Ivan Tan",
            "id": 33,
            "st_desc": "ITCO220330A",
            "st_id": 33,
            "st_code": "ITCO220330A"
        }
  	]
}

# 读取委外代销订单

# 一、接口描述

​ 用于读取【委外代销订单】数据

# 二、接口调用说明

​ 1、请求说明

URL http://[server]/jsf/rfws/root/api/read/consignCo
http请求方式 GET
编码类型 UTF-8

​ 2、URL参数

参数 类型 必填 说明
authorization String(Header) 是 OAuth获取的Access Token
client_id String(Header) 是 aiM18[授权应用列表]中的Client ID
menuCode String(Query) 是 consignCo
id long(Query) 是 委外代销订单的id
param String(Query) 否 额外的系统参数;JSON字符串

​ 3、请求示例

		CloseableHttpClient client = HttpClientBuilder.create().build();
		CloseableHttpResponse res = null;
		try {

			String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/read/consignCo";
			String param = "&menuCode=consignCo&id=" + id;

			HttpGet get = new HttpGet(url + "?" + param);
			get.addHeader("authorization", access_token);
			get.addHeader("client_id", ClientID);
			res = client.execute(get);
			if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
				JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));

				System.out.println(json);
			}

			get.releaseConnection();
		} catch (Exception e) {
			e.printStackTrace();
		} finally {
			try {
				if (res != null) {
					res.close();
				}
				if (client != null) {
					client.close();
				}
			} catch (Exception ex) {
				ex.printStackTrace();
			}
		}

​ 4、返回示例

{
    "data": {
        "consignmainco": [
            {
                "lastModifyUid": 11,
                "useAccess": false,
                "virDeptId": 0,
                "expiredDate": -2209017600000,
                "position_zh-CN": "SA",
                "sysJson": "",
                "viewCode": "consignCo",
                "beId": 11,
                "dDate": 1648569600000,
                "cusId": 27074,
                "useAccessBl": false,
                "id": 33,
                "doctypeId": 0,
                "locked": false,
                "position_ctw": "",
                "lastModifyDate": 1648611135000,
                "createUid": 11,
                "rev": "1",
                "lastApproveUid": 11,
                "ttlCharge": 0,
                "completed": false,
                "expiredUid": 0,
                "descOrigin": "SOLAST",
                "position_en": "SA",
                "position_zh-TW": "",
                "i18nField": "{\"position_en\": \"SA\", \"position_zh-CN\": \"SA\"}",
                "manId": 29,
                "deposit": 0,
                "ttlAmt": 495,
                "position": "SA",
                "flowTypeId": 1384,
                "status": "Y",
                "weightUnit": "kg",
                "tDate": 1648569600000,
                "code": "ITCO220330A",
                "cnDeptId": 30,
                "amt": 495,
                "iRev": 1,
                "upOrigin": "SOLAST",
                "ce01Module": "consignCo",
                "curId": 1,
                "expired": false,
                "rate": 1,
                "measUnit": "cbm",
                "printCount": 0,
                "statusModifyDate": 1648611135000,
                "createDate": 1648611135000,
                "depoRate": 0,
                "loadGpCoData": false,
                "useAccessWl": false,
                "position_ccn": "",
                "ttlDisc": 0,
                "position_haha1": "",
                "cuspono": "",
                "useAccessAutoCalc": false,
                "staffId": 642
            }
        ],
        "consigncot": [
            {
                "sourceId": 0,
                "shipMark": "",
                "dualQty": 5,
                "itemNo": "     1",
                "beId": 11,
                "dDate": 1648569600000,
                "bDesc": "Lot no. can be duplicated",
                "bDesc_zh-TW": "",
                "newLotno": 0,
                "cusDDate": -2209017600000,
                "id": 40,
                "up": 99,
                "ctn": 1,
                "qcRequired": false,
                "dDesc_haha1": "",
                "height": 30,
                "hId": 33,
                "perCtn": 20,
                "completed": false,
                "volume": 0.066,
                "dDesc": "",
                "footerKey": "     1",
                "i18nField": "{\"bDesc_zh-CN\": \"Lot no. can be duplicated\", \"dDesc_zh-CN\": \"\"}",
                "sourceType": "pro",
                "qty": 5,
                "disc": 0,
                "packingDesc": "",
                "refCode": "JW002",
                "lotNoId": 0,
                "dDesc_ctw": "",
                "innerQty": 0,
                "costAmt": 0,
                "amt": 495,
                "nw": 0.135,
                "iRev": 1,
                "dDesc_zh-CN": "",
                "packing": "",
                "packingUnitId": 8,
                "bDesc_ctw": "",
                "ce01Module": "consignCo",
                "lot": "A",
                "bDesc_haha1": "",
                "dDesc_zh-TW": "",
                "domAmt": 495,
                "bDesc_ccn": "",
                "unitId": 40,
                "innerUnitId": 0,
                "dDesc_ccn": "",
                "locId": 0,
                "bDesc_en": "",
                "sourceCliId": 0,
                "length": 58,
                "imgCode": "",
                "dDesc_en": "",
                "dualUnitId": 29,
                "gw": 0.135,
                "sourceLot": "",
                "proId": 26,
                "width": 38,
                "bDesc_zh-CN": "Lot no. can be duplicated"
            }
        ],
        "consignremco": [
            {
                "tradeTerm_ccn": "",
                "shipMark": "",
                "remarks_en": "",
                "tradeTerm": "",
                "premarks": "",
                "shipAd1_en": "10 Wang Street",
                "province": "",
                "packing_haha1": "",
                "tel": "",
                "shipMark_en": "",
                "recipient_haha1": "",
                "id": 32,
                "fax": "+33 05 61 82 99",
                "premarks_zh-CN": "",
                "shipAd1_zh-CN": "10 Wang Street",
                "payTerm": "",
                "heading_zh-TW": "",
                "payTerm_ccn": "",
                "remarks_ccn": "",
                "shipAd4_ccn": "",
                "i18nField": "{\"shipAd1_en\": \"10 Wang Street\", \"shipAd2_en\": \"NanSan\", \"shipAd3_en\": \"ShenZhen\", \"shipAd4_en\": \"China\", \"heading_zh-CN\": \"\", \"packing_zh-CN\": \"\", \"payTerm_zh-CN\": \"\", \"remarks_zh-CN\": \"\", \"shipAd1_zh-CN\": \"10 Wang Street\", \"shipAd2_zh-CN\": \"NanSan\", \"shipAd3_zh-CN\": \"ShenZhen\", \"shipAd4_zh-CN\": \"China\", \"premarks_zh-CN\": \"\", \"shipMark_zh-CN\": \"\", \"recipient_zh-CN\": \"\", \"tradeTerm_zh-CN\": \"\"}",
                "shipAd4_ctw": "",
                "shipAd3_zh-TW": "",
                "payTerm_ctw": "",
                "remarks_ctw": "",
                "tradeTerm_en": "",
                "city": "",
                "shipMark_ctw": "",
                "payTerm_en": "",
                "iRev": 1,
                "shipAd4_zh-TW": "",
                "shipAd2_ccn": "",
                "ce01Module": "consignCo",
                "shipAd3_en": "ShenZhen",
                "shipAd4_zh-CN": "China",
                "shipAd2_ctw": "",
                "shipAd2_haha1": "",
                "email": "1314@mac.com;",
                "packing_ctw": "",
                "heading_haha1": "",
                "heading": "",
                "premarks_en": "",
                "recipient_ctw": "",
                "tradeTerm_ctw": "",
                "telCountry": "",
                "tradeTerm_haha1": "",
                "shipAd1": "10 Wang Street",
                "shipAd2": "NanSan",
                "shipAd3": "ShenZhen",
                "premarks_zh-TW": "",
                "shipAd4": "China",
                "shipMark_haha1": "",
                "shipAd3_haha1": "",
                "smthId": 1,
                "gpsLong": 0,
                "country": "",
                "heading_en": "",
                "shipMark_zh-CN": "",
                "tradeTerm_zh-CN": "",
                "shipAd4_haha1": "",
                "packing_ccn": "",
                "dest": "",
                "recipient_ccn": "",
                "heading_ccn": "",
                "shipAd2_zh-TW": "",
                "payTerm_zh-TW": "",
                "remarks_zh-TW": "",
                "hId": 33,
                "heading_ctw": "",
                "tradeTerm_zh-TW": "",
                "shipMark_ccn": "",
                "zipcode": "",
                "premarks_haha1": "",
                "shipAd2_en": "NanSan",
                "shipAd1_haha1": "",
                "remarks_zh-CN": "",
                "packing_en": "",
                "gpsLat": 0,
                "payTerm_zh-CN": "",
                "shipMark_zh-TW": "",
                "shipAd1_ccn": "",
                "shipCodeId": 1,
                "shipAd3_ctw": "",
                "recipient_zh-CN": "",
                "packing": "",
                "heading_zh-CN": "",
                "premarks_ccn": "",
                "payTerm_haha1": "",
                "recipient_en": "",
                "packing_zh-TW": "",
                "shipAd3_zh-CN": "ShenZhen",
                "remarks_haha1": "",
                "shipAd1_ctw": "",
                "shipAd3_ccn": "",
                "recipient_zh-TW": "",
                "packing_zh-CN": "",
                "telArea": "",
                "shipAd1_zh-TW": "",
                "shipAd4_en": "China",
                "premarks_ctw": "",
                "recipient": "",
                "shipAd2_zh-CN": "NanSan",
                "remarks": ""
            }
        ]
    },
    "messages": [],
    "status": true
}

# 保存委外代销订单

# 一、接口描述

​ 用于新增【委外代销订单】

# 二、接口调用说明

​ 1、请求说明

URL http://[server]/jsf/rfws/root/api/save/consignCo
http请求方式 PUT
编码类型 UTF-8

​ 2、URL参数

参数 类型 必填 说明
authorization String(Header) 是 OAuth获取的Access Token
client_id String(Header) 是 aiM18[授权应用列表]中的Client ID
menuCode String(Query) 是 consignCo
param String(Query) 否 额外的系统参数;JSON字符串

​ 3、请求示例

	CloseableHttpClient client = HttpClientBuilder.create().build();
	CloseableHttpResponse res = null;
	try {

		String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/consignCo";
		String param = "&menuCode=consignCo";

		HttpPut put = new HttpPut(url + "?" + param);
		put.addHeader("authorization", access_token);
		put.addHeader("client_id", ClientID);

		StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON);
		entity.setContentEncoding("UTF-8");
		put.setEntity(entity);

		res = client.execute(put);
		if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
			JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));

			if (json != null) {
				recordId = json.getLongValue("recordId");
			}

			System.out.println(json);
		}

		put.releaseConnection();
	} catch (Exception e) {
		e.printStackTrace();
	} finally {
		try {
			if (res != null) {
				res.close();
			}
			if (client != null) {
				client.close();
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}

Entity的JSON格式数据如下:

{
    "consignmainco": {
        "values": [
            {
                "beId": 11,
                "code": "ITCO220324A",
                "tDate": "2022-03-24",
                "cusId": 27074,
                "curId": 1,
                "rate": 1,
                "flowTypeId": 1384,
                "staffId": 723
            }
        ]
    },
    "consigncot": {
        "values": [
            {
                "sourceType": "pro",
                "proId": 26,
                "unitId": 40,
                "qty": 5,
                "up": 99
            }
        ]
    }
}

​ 4、返回示例

{
	"recordId": 34,
	"messages": [],
	"status": true
}
{
    "recordId": 0,
    "messages": [
        {
            "msgDetail": "必填项为空",
            "msgCode": "core_101905"
        }
    ],
    "status": false
}

# 新增委外代销订单(自动补全)

# 一、接口描述

​ 1. 用于新增【委外代销订单】

​ 2. 此接口方法有如下特点:

​ a. 支持使用code 替代 id 栏位

​ b. 货币栏位未填时,自动使用本位币

​ c. 职员栏位未填时,自动使用个人选项中的默认职员

​ d. 单据日期未填时,根据贸易参数设定中的日期选项取值

​ e. 业务流程未填时,根据[业务流程设置(贸易)]中设定的默认值

# 二、接口调用说明

​ 1、请求说明

URL http://[server]/jsf/rfws/erp/bsFlow/save/consignCo
http请求方式 POST
编码类型 UTF-8

​ 2、URL参数

参数 类型 必填 说明
authorization String(Header) 是 OAuth获取的Access Token
client_id String(Header) 是 aiM18[授权应用列表]中的Client ID

​ 3、请求示例

	CloseableHttpClient client = HttpClientBuilder.create().build();
	CloseableHttpResponse res = null;
	try {

		String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/erp/bsFlow/save/consignCo";

		HttpPost post = new HttpPost(url);
		post.addHeader("authorization", access_token);
		post.addHeader("client_id", ClientID);

		StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON);
		entity.setContentEncoding("UTF-8");
		post.setEntity(entity);

		res = client.execute(post);
		if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
			JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));

			if (json != null) {
				recordId = json.getLongValue("tranId");
			}
			System.out.println(json);
		}

		post.releaseConnection();
	} catch (Exception e) {
		e.printStackTrace();
	} finally {
		try {
			if (res != null) {
				res.close();
			}
			if (client != null) {
				client.close();
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}

data数据示例

{
    "beCode": "IT",
    "cusCode": "IT002",
    "consigncot": [
        {
            "proCode": "ITPRO002",
            "unitCode": "PCS",
            "qty": 1,
            "up": 99,
            "amt": 99
        }
    ]
}

​ 4、返回示例

{
  "tranId": 35,
  "tranCode": "CO2203240004",
  "message": "",
  "status": true
}

# 删除委外代销订单

# 一、接口描述

​ 用于删除委外代销订单

# 二、接口调用说明

​ 1、请求说明

URL http://[server]/jsf/rfws/root/api/delete/consignCo
http请求方式 DELETE
编码类型 UTF-8

​ 2、URL参数

参数 类型 必填 说明
authorization String(Header) 是 OAuth获取的Access Token
client_id String(Header) 是 aiM18[授权应用列表]中的Client ID
menuCode String(Query) 是 consignCo
id long(Query) 是 委外代销订单的id
param String(Query) 否 额外的系统参数;JSON字符串

​ 3、请求示例

	CloseableHttpClient client = HttpClientBuilder.create().build();
	CloseableHttpResponse res = null;
	try {

		String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/delete/consignCo";
		String param = "&menuCode=consignCo&id=" + id;

		HttpDelete delete = new HttpDelete(url + "?" + param);
		delete.addHeader("authorization", access_token);
		delete.addHeader("client_id", ClientID);

		res = client.execute(delete);
		if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
			JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));

			System.out.println(json);
		}

		delete.releaseConnection();
	} catch (Exception e) {
		e.printStackTrace();
	} finally {
		try {
			if (res != null) {
				res.close();
			}
			if (client != null) {
				client.close();
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}

​ 4、返回示例

{
	"messages": [],
	"status": true
}
{
    "messages": [
        {
            "msgDetail": "单据已被删除",
            "msgCode": "core_101017"
        }
    ],
    "status": false
}

# 读取EBI数据:委外代销订单列表

# 一、接口描述

​ 用于执行EBI[委外代销订单列表],返回EBI数据

# 二、接口调用说明

​ 1、请求说明

URL http://[server]/jsf/rfws/ebiWidget/loadReport
http请求方式 GET
编码类型 UTF-8

​ 2、URL参数

参数 类型 必填 说明
authorization String(Header) 是 OAuth获取的Access Token
client_id String(Header) 是 aiM18[授权应用列表]中的Client ID
formatId long(Query) 是 通过EBI接口获取到formatId
beId long(Query) 否 企业法人的ID。若不传,则查询所有有权限的BE数据
offset int(Query) 否 返回结果的开始行
rows int(Query) 否 返回结果的结束行

​ 3、请求示例

	CloseableHttpClient client = HttpClientBuilder.create().build();
	CloseableHttpResponse res = null;
	try {

		String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/ebiWidget/loadReport";
		String param = "&formatId=" + formatId;

		HttpGet get = new HttpGet(url + "?" + param);
		get.addHeader("authorization", access_token);
		get.addHeader("client_id", ClientID);
		res = client.execute(get);
		if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
			JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));

			System.out.println(json);
		}

		get.releaseConnection();
	} catch (Exception e) {
		e.printStackTrace();
	} finally {
		try {
			if (res != null) {
				res.close();
			}
			if (client != null) {
				client.close();
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}				

​ 4、返回示例

{
    "size": 5,
    "rows": [
        {
            "CO_A_ttlAmt": "0.00",
            "CO_A_deposit": "0.00",
            "aiM18ReservedCol_dataIndex": 1,
            "CO_A_id": "8",
            "CUS_A_desc__lang": "智輝食品貿易有限公司",
            "CO_A_ttlDisc": "0.00",
            "CO_A_tDate": "2017.06.27",
            "CUS_A_id": "27220",
            "CO_A_ttlCharge": "0.00",
            "CO_A_amt": "0.00",
            "CO_A_code": "CO-20176027-0003",
            "CO_A_dDate": "2017.06.27",
            "CUS_A_code": "CN003"
        }
    ]
}

ebi1

# 读取EBI数据:委外代销订单报告

# 一、接口描述

​ 用于执行EBI[委外代销订单报告],返回EBI数据

# 二、接口调用说明

​ 1、请求说明

URL http://[server]/jsf/rfws/ebiWidget/loadReport
http请求方式 GET
编码类型 UTF-8

​ 2、URL参数

参数 类型 必填 说明
authorization String(Header) 是 OAuth获取的Access Token
client_id String(Header) 是 aiM18[授权应用列表]中的Client ID
formatId long(Query) 是 通过EBI接口获取到formatId
beId long(Query) 否 企业法人的ID。若不传,则查询所有有权限的BE数据
offset int(Query) 否 返回结果的开始行
rows int(Query) 否 返回结果的结束行

​ 3、请求示例

	CloseableHttpClient client = HttpClientBuilder.create().build();
	CloseableHttpResponse res = null;
	try {

		String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/ebiWidget/loadReport";
		String param = "&formatId=" + formatId;

		HttpGet get = new HttpGet(url + "?" + param);
		get.addHeader("authorization", access_token);
		get.addHeader("client_id", ClientID);
		res = client.execute(get);
		if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
			JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));

			System.out.println(json);
		}

		get.releaseConnection();
	} catch (Exception e) {
		e.printStackTrace();
	} finally {
		try {
			if (res != null) {
				res.close();
			}
			if (client != null) {
				client.close();
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}				

​ 4、返回示例

{
    "size": 5,
    "rows": [
        {
            "F_A_amt": "0.00",
            "M_A_code": "CO-20176027-0003",
            "aiM18ReservedCol_dataIndex": 1,
            "M_A_tDate": "2017.06.27",
            "CUS_A_id": "27220",
            "F_A_lot": "A",
            "PRO_A_id": "26",
            "F_A_qty": "1.0000",
            "M_A_id": "8",
            "F_A_disc": "0.00",
            "PRO_A_code": "ITPRO002",
            "CUS_A_code": "CN003",
            "F_A_up": "0.0000"
        }
    ]
}

ebi2

# 委外代销送货单

# 获取委外代销送货单列表

# 一、接口描述

​ 用于获取委外代销送货单列表(同UI界面左侧的Search List数据)

# 二、接口调用说明

​ 1、请求说明

URL http://[server]/jsf/rfws/search/search
http请求方式 GET
编码类型 UTF-8

​ 2、URL参数

参数 类型 必填 说明
authorization String(Header) 是 OAuth获取的Access Token
client_id String(Header) 是 aiM18[授权应用列表]中的Client ID
stSearch String(Query) 是 consignCdn
beId long(Query) 是 aiM18企业法人[部门]的ID
formatId long(Query) 否 aiM18[查询格式]的ID,用于获取[查询格式]步骤二中设定的栏位格式;若不使用此参数,则使用默认设置。
startRow int(Query) 否 返回结果的开始行
endRow int(Query) 否 返回结果的结束行
quickSearchStr String(Query) 否 用于设定关键字查找数据

​ 3、请求示例

	CloseableHttpClient client = HttpClientBuilder.create().build();
	CloseableHttpResponse res = null;
	try {

		String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/search/search";
		String param = "&stSearch=consignCdn&beId=11";

		HttpGet get = new HttpGet(url + "?" + param);
		get.addHeader("authorization", access_token);
		get.addHeader("client_id", ClientID);
		res = client.execute(get);
		if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
			JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
		}
		get.releaseConnection();
	} catch (Exception e) {
		e.printStackTrace();
	} finally {
		try {
			if (res != null) {
				res.close();
			}
			if (client != null) {
				client.close();
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}

​ 4、返回示例

{
  	"stSearch": "consignCdn",
    "size": 4,
    "stSearchDisplay": "Consignment Delivery",
    "values": [
        {
            "code": "ITCDN220331A",
            "tDate": "2022-03-31",
            "consignMaincdn.cusId.cus.code": "IT002",
            "consignMaincdn.cusId.cus.desc__lang": "Joey Wall",
            "consignMaincdn.curId.cur.sym": "¥",
            "consignMaincdn.flowTypeId.flowtype.code": "MX-BS-CONS",
            "consignMaincdn.flowTypeId.flowtype.desc": "Consignment Flow",
            "iRev": 1,
            "lastModifyDate": "2022-03-31 11:53:44",
            "consignMaincdn.lastModifyUid.simpleUser.desc__lang": "Ivan Tan",
            "id": 37,
            "st_desc": "ITCDN220331A",
            "st_id": 37,
            "st_code": "ITCDN220331A"
        }
  	]
}

# 读取委外代销送货单

# 一、接口描述

​ 用于读取【委外代销送货单】数据

# 二、接口调用说明

​ 1、请求说明

URL http://[server]/jsf/rfws/root/api/read/consignCdn
http请求方式 GET
编码类型 UTF-8

​ 2、URL参数

参数 类型 必填 说明
authorization String(Header) 是 OAuth获取的Access Token
client_id String(Header) 是 aiM18[授权应用列表]中的Client ID
menuCode String(Query) 是 consignCdn
id long(Query) 是 委外代销送货单的id
param String(Query) 否 额外的系统参数;JSON字符串

​ 3、请求示例

		CloseableHttpClient client = HttpClientBuilder.create().build();
		CloseableHttpResponse res = null;
		try {

			String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/read/consignCdn";
			String param = "&menuCode=consignCdn&id=" + id;

			HttpGet get = new HttpGet(url + "?" + param);
			get.addHeader("authorization", access_token);
			get.addHeader("client_id", ClientID);
			res = client.execute(get);
			if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
				JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));

				System.out.println(json);
			}

			get.releaseConnection();
		} catch (Exception e) {
			e.printStackTrace();
		} finally {
			try {
				if (res != null) {
					res.close();
				}
				if (client != null) {
					client.close();
				}
			} catch (Exception ex) {
				ex.printStackTrace();
			}
		}

​ 4、返回示例

{
    "data": {
        "consigncdnt": [
            {
                "lotnoNumAttr17": 0,
                "lotnoNumAttr16": 0,
                "lotnoNumAttr15": 0,
                "shipMark": "",
                "lotnoNumAttr14": 0,
                "lotnoNumAttr19": 0,
                "lotnoNumAttr18": 0,
                "lotnoLookupAttr20": 0,
                "asbCurId": 1,
                "lotnoNumAttr13": 0,
                "asbLotNoId": 0,
                "lotnoNumAttr12": 0,
                "lotnoNumAttr11": 0,
                "lotnoNumAttr10": 0,
                "lotnoLookupAttr16": 0,
                "alocId": 18,
                "lotnoLookupAttr17": 0,
                "lotnoLookupAttr14": 0,
                "lotnoLookupAttr15": 0,
                "asbSourceType": "",
                "lotnoLookupAttr18": 0,
                "bDesc_zh-TW": "",
                "lotnoLookupAttr19": 0,
                "newLotno": 0,
                "lotnoLot": "A",
                "id": 43,
                "ctn": 1,
                "asbLotno": "",
                "asbNewLotno": 0,
                "dDesc_haha1": "",
                "height": 30,
                "perCtn": 20,
                "asbId": 0,
                "lotnoNumAttr20": 0,
                "completed": false,
                "lotnoLookupAttr12": 0,
                "lotnoLookupAttr13": 0,
                "asbQty": 0,
                "lotnoLookupAttr10": 0,
                "lotnoLookupAttr11": 0,
                "i18nField": "{\"bDesc_zh-CN\": \"Lot no. can be duplicated\", \"dDesc_zh-CN\": \"\"}",
                "sourceType": "aso",
                "packingDesc": "",
                "innerQty": 0,
                "costAmt": 0,
                "iRev": 1,
                "bDesc_ctw": "",
                "ce01Module": "consignCdn",
                "lot": "A",
                "lotnoDateAttr3": -2209017600000,
                "lotnoDateAttr4": -2209017600000,
                "lotnoDateAttr1": -2209017600000,
                "lotnoDateAttr2": -2209017600000,
                "lotnoDateAttr7": -2209017600000,
                "lotnoDateAttr8": -2209017600000,
                "bDesc_ccn": "",
                "lotnoDateAttr5": -2209017600000,
                "lotnoDateAttr6": -2209017600000,
                "unitId": 40,
                "lotnoDateAttr9": -2209017600000,
                "locId": 15,
                "bDesc_en": "",
                "sourceCliId": 0,
                "lotnoTextAttr1": "",
                "lotnoTextAttr2": "",
                "lotnoTextAttr3": "",
                "lotnoTextAttr4": "",
                "asbRate": 1,
                "lotnoTextAttr5": "",
                "lotnoTextAttr6": "",
                "lotnoTextAttr7": "",
                "width": 38,
                "lotnoTextAttr8": "",
                "lotnoTextAttr9": "",
                "bDesc_zh-CN": "Lot no. can be duplicated",
                "sourceId": 56,
                "asbCode": "",
                "dualQty": 1,
                "coId": 33,
                "itemNo": "     1",
                "beId": 11,
                "bDesc": "Lot no. can be duplicated",
                "up": 99,
                "asbFlowTypeId": 0,
                "hId": 37,
                "lotnoNumAttr1": 0,
                "lotnoNumAttr2": 0,
                "lotnoNumAttr3": 0,
                "lotnoNumAttr4": 0,
                "volume": 0.066,
                "lotnoExpDate": 253402271999000,
                "dDesc": "",
                "footerKey": "     1",
                "qty": 1,
                "lotnoNumAttr5": 0,
                "lotnoNumAttr6": 0,
                "disc": 0,
                "lotnoNumAttr7": 0,
                "lotnoNumAttr8": 0,
                "lotnoNumAttr9": 0,
                "refCode": "JW002",
                "lotNoId": 639,
                "lotnoTextAttr16": "",
                "dDesc_ctw": "",
                "lotnoTextAttr15": "",
                "lotnoTextAttr18": "",
                "lotnoTextAttr17": "",
                "lotnoTextAttr12": "",
                "lotnoTextAttr11": "",
                "lotnoDateAttr20": -2209017600000,
                "lotnoTextAttr14": "",
                "lotnoTextAttr13": "",
                "amt": 99,
                "nw": 0.135,
                "dDesc_zh-CN": "",
                "packing": "",
                "lotnoTextAttr19": "",
                "packingUnitId": 8,
                "bDesc_haha1": "",
                "dDesc_zh-TW": "",
                "domAmt": 99,
                "innerUnitId": 0,
                "dDesc_ccn": "",
                "lotnoTextAttr10": "",
                "coLot": "A",
                "length": 58,
                "dDesc_en": "",
                "dualUnitId": 29,
                "gw": 0.135,
                "lotnoLookupAttr5": 0,
                "lotnoLookupAttr6": 0,
                "sourceLot": "A",
                "lotnoLookupAttr7": 0,
                "lotnoDateAttr18": -2209017600000,
                "lotnoLookupAttr8": 0,
                "lotnoDateAttr19": -2209017600000,
                "lotno": "ITGRN1701000-0001",
                "lotnoLookupAttr9": 0,
                "proId": 26,
                "lotnoDateAttr12": -2209017600000,
                "lotnoDateAttr13": -2209017600000,
                "lotnoDateAttr10": -2209017600000,
                "lotnoDateAttr11": -2209017600000,
                "lotnoTextAttr20": "",
                "lotnoLookupAttr1": 0,
                "lotnoDateAttr16": -2209017600000,
                "lotnoLookupAttr2": 0,
                "lotnoDateAttr17": -2209017600000,
                "lotnoLookupAttr3": 0,
                "lotnoDateAttr14": -2209017600000,
                "lotnoLookupAttr4": 0,
                "lotnoDateAttr15": -2209017600000
            }
        ],
        "consignmaincdn": [
            {
                "lastModifyUid": 11,
                "useAccess": false,
                "virDeptId": 0,
                "expiredDate": -2209017600000,
                "position_zh-CN": "SA",
                "sysJson": "",
                "viewCode": "consignCdn",
                "beId": 11,
                "alocId": 0,
                "cusId": 27074,
                "useAccessBl": false,
                "id": 37,
                "doctypeId": 0,
                "locked": false,
                "position_ctw": "",
                "lastModifyDate": 1648698824000,
                "createUid": 11,
                "rev": "1",
                "lastApproveUid": 11,
                "ttlCharge": 0,
                "completed": false,
                "expiredUid": 0,
                "descOrigin": "SOLAST",
                "position_en": "",
                "position_zh-TW": "",
                "i18nField": "{\"position_zh-CN\": \"SA\"}",
                "manId": 29,
                "ttlAmt": 99,
                "position": "SA",
                "flowTypeId": 1384,
                "status": "Y",
                "weightUnit": "kg",
                "tDate": 1648656000000,
                "code": "ITCDN220331A",
                "cnDeptId": 29,
                "amt": 99,
                "iRev": 1,
                "upOrigin": "SOLAST",
                "ce01Module": "consignCdn",
                "curId": 1,
                "expired": false,
                "rate": 1,
                "measUnit": "cbm",
                "printCount": 0,
                "statusModifyDate": 1648698824000,
                "locId": 0,
                "createDate": 1648698824000,
                "loadGpCoData": false,
                "useAccessWl": false,
                "position_ccn": "",
                "ttlDisc": 0,
                "position_haha1": "",
                "useAccessAutoCalc": false,
                "staffId": 723
            }
        ],
        "consignremcdn": [
            {
                "tradeTerm_ccn": "",
                "country": "",
                "shipMark": "",
                "heading_en": "",
                "shipMark_zh-CN": "",
                "tradeTerm_zh-CN": "",
                "shipAd4_haha1": "",
                "remarks_en": "",
                "packing_ccn": "",
                "recipient_ccn": "",
                "tradeTerm": "",
                "shipAd2_zh-TW": "",
                "heading_ccn": "",
                "shipAd1_en": "10 Wang Street",
                "payTerm_zh-TW": "",
                "province": "",
                "packing_haha1": "",
                "tel": "",
                "recipient_haha1": "",
                "shipMark_en": "",
                "id": 33,
                "fax": "+33 05 61 82 99",
                "remarks_zh-TW": "",
                "shipAd1_zh-CN": "10 Wang Street",
                "hId": 37,
                "payTerm": "",
                "heading_zh-TW": "",
                "payTerm_ccn": "",
                "remarks_ccn": "",
                "heading_ctw": "",
                "tradeTerm_zh-TW": "",
                "shipMark_ccn": "",
                "shipAd4_ccn": "",
                "zipcode": "",
                "shipAd2_en": "NanSan",
                "shipAd1_haha1": "",
                "i18nField": "{\"shipAd1_en\": \"10 Wang Street\", \"shipAd2_en\": \"NanSan\", \"shipAd3_en\": \"ShenZhen\", \"shipAd4_en\": \"China\", \"heading_zh-CN\": \"\", \"packing_zh-CN\": \"\", \"payTerm_zh-CN\": \"\", \"remarks_zh-CN\": \"\", \"shipAd1_zh-CN\": \"10 Wang Street\", \"shipAd2_zh-CN\": \"NanSan\", \"shipAd3_zh-CN\": \"ShenZhen\", \"shipAd4_zh-CN\": \"China\", \"shipMark_zh-CN\": \"\", \"recipient_zh-CN\": \"\", \"tradeTerm_zh-CN\": \"\"}",
                "remarks_zh-CN": "",
                "shipAd4_ctw": "",
                "packing_en": "",
                "gpsLat": 0,
                "shipAd3_zh-TW": "",
                "payTerm_zh-CN": "",
                "payTerm_ctw": "",
                "shipMark_zh-TW": "",
                "remarks_ctw": "",
                "shipAd1_ccn": "",
                "tradeTerm_en": "",
                "shipCodeId": 1,
                "city": "",
                "shipMark_ctw": "",
                "shipAd3_ctw": "",
                "recipient_zh-CN": "",
                "payTerm_en": "",
                "iRev": 1,
                "shipAd4_zh-TW": "",
                "packing": "",
                "shipAd2_ccn": "",
                "heading_zh-CN": "",
                "ce01Module": "consignCdn",
                "payTerm_haha1": "",
                "shipAd3_en": "ShenZhen",
                "recipient_en": "",
                "packing_zh-TW": "",
                "shipAd3_zh-CN": "ShenZhen",
                "shipAd4_zh-CN": "China",
                "shipAd2_ctw": "",
                "shipAd2_haha1": "",
                "shipAd1_ctw": "",
                "remarks_haha1": "",
                "email": "1314@mac.com;",
                "shipAd3_ccn": "",
                "recipient_zh-TW": "",
                "packing_ctw": "",
                "heading_haha1": "",
                "heading": "",
                "recipient_ctw": "",
                "tradeTerm_ctw": "",
                "packing_zh-CN": "",
                "telCountry": "",
                "tradeTerm_haha1": "",
                "shipAd1": "10 Wang Street",
                "shipAd2": "NanSan",
                "shipAd3": "ShenZhen",
                "shipAd4": "China",
                "telArea": "",
                "shipAd1_zh-TW": "",
                "shipAd4_en": "China",
                "recipient": "",
                "shipAd2_zh-CN": "NanSan",
                "shipAd3_haha1": "",
                "shipMark_haha1": "",
                "remarks": "",
                "gpsLong": 0
            }
        ]
    },
    "messages": [],
    "status": true
}

# 保存委外代销送货单

# 一、接口描述

​ 用于新增【委外代销送货单】

# 二、接口调用说明

​ 1、请求说明

URL http://[server]/jsf/rfws/root/api/save/consignCdn
http请求方式 PUT
编码类型 UTF-8

​ 2、URL参数

参数 类型 必填 说明
authorization String(Header) 是 OAuth获取的Access Token
client_id String(Header) 是 aiM18[授权应用列表]中的Client ID
menuCode String(Query) 是 consignCdn
param String(Query) 否 额外的系统参数;JSON字符串

​ 3、请求示例

	CloseableHttpClient client = HttpClientBuilder.create().build();
	CloseableHttpResponse res = null;
	try {

		String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/consignCdn";
		String param = "&menuCode=consignCdn";

		HttpPut put = new HttpPut(url + "?" + param);
		put.addHeader("authorization", access_token);
		put.addHeader("client_id", ClientID);

		StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON);
		entity.setContentEncoding("UTF-8");
		put.setEntity(entity);

		res = client.execute(put);
		if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
			JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));

			if (json != null) {
				recordId = json.getLongValue("recordId");
			}

			System.out.println(json);
		}

		put.releaseConnection();
	} catch (Exception e) {
		e.printStackTrace();
	} finally {
		try {
			if (res != null) {
				res.close();
			}
			if (client != null) {
				client.close();
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}				

Entity的JSON格式数据如下:

{
    "consignmaincdn": {
        "values": [
            {
                "beId": 11,
                "code": "ITCDN220325A",
                "tDate": "2022-03-25",
                "cusId": 27074,
                "curId": 1,
                "rate": 1,
                "flowTypeId": 1384,
                "staffId": 723
            }
        ]
    },
    "consigncdnt": {
        "values": [
            {
                "sourceType": "aso",
                "sourceId": 56,
                "sourceLot": "A",
                "proId": 26,
                "unitId": 40,
                "locId": 15,
                "alocId": 18,
                "qty": 1,
                "up": 10,
                "amt": 10
            }
        ]
    }
}

​ 4、返回示例

{
	"recordId": 38,
	"messages": [],
	"status": true
}
{
    "recordId": 0,
    "messages": [
        {
            "msgDetail": "必填项为空",
            "msgCode": "core_101905"
        }
    ],
    "status": false
}

# 新增委外代销送货单(自动补全)

# 一、接口描述

​ 1. 用于新增【委外代销送货单】

​ 2. 此接口方法有如下特点:

​ a. 支持使用code 替代 id 栏位

​ b. 货币栏位未填时,自动使用本位币

​ c. 职员栏位未填时,自动使用个人选项中的默认职员

​ d. 单据日期未填时,根据贸易参数设定中的日期选项取值

​ e. 业务流程未填时,根据[业务流程设置(贸易)]中设定的默认值

# 二、接口调用说明

​ 1、请求说明

URL http://[server]/jsf/rfws/erp/bsFlow/save/consignCdn
http请求方式 POST
编码类型 UTF-8

​ 2、URL参数

参数 类型 必填 说明
authorization String(Header) 是 OAuth获取的Access Token
client_id String(Header) 是 aiM18[授权应用列表]中的Client ID

​ 3、请求示例

	CloseableHttpClient client = HttpClientBuilder.create().build();
	CloseableHttpResponse res = null;
	try {

		String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/erp/bsFlow/save/consignCdn";

		HttpPost post = new HttpPost(url);
		post.addHeader("authorization", access_token);
		post.addHeader("client_id", ClientID);

		StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON);
		entity.setContentEncoding("UTF-8");
		post.setEntity(entity);

		res = client.execute(post);
		if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
			JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));

			if (json != null) {
				recordId = json.getLongValue("tranId");
			}
			System.out.println(json);
		}

		post.releaseConnection();
	} catch (Exception e) {
		e.printStackTrace();
	} finally {
		try {
			if (res != null) {
				res.close();
			}
			if (client != null) {
				client.close();
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}

data数据示例

{
    "beCode": "IT",
    "cusCode": "IT002",
    "consigncdnt": [
        {
            "proCode": "ITPRO002",
            "unitCode": "PCS",
            "qty": 1,
            "locCode": "ACLL",
            "alocCode": "CONSIGNIN",
            "up": 10,
            "amt": 10
        }
    ]
}

​ 4、返回示例

{
  "tranId": 39,
  "tranCode": "CDN0220003",
  "message": "",
  "status": true
}

# 删除委外代销送货单

# 一、接口描述

​ 用于删除委外代销送货单

# 二、接口调用说明

​ 1、请求说明

URL http://[server]/jsf/rfws/root/api/delete/consignCdn
http请求方式 DELETE
编码类型 UTF-8

​ 2、URL参数

参数 类型 必填 说明
authorization String(Header) 是 OAuth获取的Access Token
client_id String(Header) 是 aiM18[授权应用列表]中的Client ID
menuCode String(Query) 是 consignCdn
id long(Query) 是 委外代销送货单的id
param String(Query) 否 额外的系统参数;JSON字符串

​ 3、请求示例

	CloseableHttpClient client = HttpClientBuilder.create().build();
	CloseableHttpResponse res = null;
	try {

		String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/delete/consignCdn";
		String param = "&menuCode=consignCdn&id=" + id;

		HttpDelete delete = new HttpDelete(url + "?" + param);
		delete.addHeader("authorization", access_token);
		delete.addHeader("client_id", ClientID);

		res = client.execute(delete);
		if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
			JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));

			System.out.println(json);
		}

		delete.releaseConnection();
	} catch (Exception e) {
		e.printStackTrace();
	} finally {
		try {
			if (res != null) {
				res.close();
			}
			if (client != null) {
				client.close();
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}

​ 4、返回示例

{
	"messages": [],
	"status": true
}
{
    "messages": [
        {
            "msgDetail": "单据已被删除",
            "msgCode": "core_101017"
        }
    ],
    "status": false
}

# 读取EBI数据:委外代销送货单列表

# 一、接口描述

​ 用于执行EBI[委外代销送货单列表],返回EBI数据

# 二、接口调用说明

​ 1、请求说明

URL http://[server]/jsf/rfws/ebiWidget/loadReport
http请求方式 GET
编码类型 UTF-8

​ 2、URL参数

参数 类型 必填 说明
authorization String(Header) 是 OAuth获取的Access Token
client_id String(Header) 是 aiM18[授权应用列表]中的Client ID
formatId long(Query) 是 通过EBI接口获取到formatId
beId long(Query) 否 企业法人的ID。若不传,则查询所有有权限的BE数据
offset int(Query) 否 返回结果的开始行
rows int(Query) 否 返回结果的结束行

​ 3、请求示例

	CloseableHttpClient client = HttpClientBuilder.create().build();
	CloseableHttpResponse res = null;
	try {

		String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/ebiWidget/loadReport";
		String param = "&formatId=" + formatId;

		HttpGet get = new HttpGet(url + "?" + param);
		get.addHeader("authorization", access_token);
		get.addHeader("client_id", ClientID);
		res = client.execute(get);
		if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
			JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));

			System.out.println(json);
		}

		get.releaseConnection();
	} catch (Exception e) {
		e.printStackTrace();
	} finally {
		try {
			if (res != null) {
				res.close();
			}
			if (client != null) {
				client.close();
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}				

​ 4、返回示例

{
    "size": 15,
    "rows": [
        {
            "M_A_code": "MXCDN170321-01",
            "M_A_ttlDisc": "0.00",
            "M_A_amt": "123,500.00",
            "aiM18ReservedCol_dataIndex": 1,
            "CUS_A_desc__lang": "Consignment Customer",
            "M_A_tDate": "2017.03.21",
            "CUS_A_id": "27095",
            "LOC_A_id": "126",
            "ALOC_A_id": "127",
            "M_A_ttlAmt": "123,500.00",
            "LOC_A_code": "MLOC",
            "M_A_id": "9",
            "ALOC_A_code": "MCONS",
            "CUS_A_code": "CC",
            "M_A_ttlCharge": "0.00"
        }
    ]
}

ebi1

# 读取EBI数据:委外代销送货单报告

# 一、接口描述

​ 用于执行EBI[委外代销送货单报告],返回EBI数据

# 二、接口调用说明

​ 1、请求说明

URL http://[server]/jsf/rfws/ebiWidget/loadReport
http请求方式 GET
编码类型 UTF-8

​ 2、URL参数

参数 类型 必填 说明
authorization String(Header) 是 OAuth获取的Access Token
client_id String(Header) 是 aiM18[授权应用列表]中的Client ID
formatId long(Query) 是 通过EBI接口获取到formatId
beId long(Query) 否 企业法人的ID。若不传,则查询所有有权限的BE数据
offset int(Query) 否 返回结果的开始行
rows int(Query) 否 返回结果的结束行

​ 3、请求示例

	CloseableHttpClient client = HttpClientBuilder.create().build();
	CloseableHttpResponse res = null;
	try {

		String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/ebiWidget/loadReport";
		String param = "&formatId=" + formatId;

		HttpGet get = new HttpGet(url + "?" + param);
		get.addHeader("authorization", access_token);
		get.addHeader("client_id", ClientID);
		res = client.execute(get);
		if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
			JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));

			System.out.println(json);
		}

		get.releaseConnection();
	} catch (Exception e) {
		e.printStackTrace();
	} finally {
		try {
			if (res != null) {
				res.close();
			}
			if (client != null) {
				client.close();
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}				

​ 4、返回示例

{
    "size": 4,
    "rows": [
        {
            "M_A_code": "ITCDN20200528A",
            "aiM18ReservedCol_dataIndex": 1,
            "FOOTERLOC_A_id": "15",
            "CUS_A_desc__lang": "Joey Wall",
            "FOOTERALOC_A_code": "CONSIGNIN",
            "CUS_A_id": "27074",
            "FOOTERLOC_A_code": "ACLL",
            "PRO_A_id": "18",
            "F_A_qty": "0.2000",
            "LOTNO_A_lotno": "AN0120160919-ITPROB",
            "M_A_id": "31",
            "FOOTERALOC_A_id": "18",
            "F_A_unitId_code": "个",
            "PRO_A_code": "ITPRO001",
            "CUS_A_code": "IT002"
        }
    ]
}

ebi2

# 委外代销退货单

# 获取委外代销退货单列表

# 一、接口描述

​ 用于获取委外代销退货单列表(同UI界面左侧的Search List数据)

# 二、接口调用说明

​ 1、请求说明

URL http://[server]/jsf/rfws/search/search
http请求方式 GET
编码类型 UTF-8

​ 2、URL参数

参数 类型 必填 说明
authorization String(Header) 是 OAuth获取的Access Token
client_id String(Header) 是 aiM18[授权应用列表]中的Client ID
stSearch String(Query) 是 consignCsr
beId long(Query) 是 aiM18企业法人[部门]的ID
formatId long(Query) 否 aiM18[查询格式]的ID,用于获取[查询格式]步骤二中设定的栏位格式;若不使用此参数,则使用默认设置。
startRow int(Query) 否 返回结果的开始行
endRow int(Query) 否 返回结果的结束行
quickSearchStr String(Query) 否 用于设定关键字查找数据

​ 3、请求示例

	CloseableHttpClient client = HttpClientBuilder.create().build();
	CloseableHttpResponse res = null;
	try {

		String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/search/search";
		String param = "&stSearch=consignCsr&beId=11";

		HttpGet get = new HttpGet(url + "?" + param);
		get.addHeader("authorization", access_token);
		get.addHeader("client_id", ClientID);
		res = client.execute(get);
		if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
			JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
		}
		get.releaseConnection();
	} catch (Exception e) {
		e.printStackTrace();
	} finally {
		try {
			if (res != null) {
				res.close();
			}
			if (client != null) {
				client.close();
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}

​ 4、返回示例

{
  	"stSearch": "consignCsr",
    "size": 4,
    "stSearchDisplay": "Consignment Return",
    "values": [
        {
            "code": "ITCSR220228A",
            "tDate": "2022-02-28",
            "consignMaincsr.cusId.cus.code": "IT002",
            "consignMaincsr.cusId.cus.desc__lang": "Joey Wall",
            "consignMaincsr.curId.cur.sym": "¥",
            "consignMaincsr.flowTypeId.flowtype.code": "IT-BS-001",
            "consignMaincsr.flowTypeId.flowtype.desc": "SO -> PO -> GRN",
            "iRev": 1,
            "lastModifyDate": "2022-02-28 12:06:52",
            "consignMaincsr.lastModifyUid.simpleUser.desc__lang": "Ivan Tan",
            "id": 19,
            "st_desc": "ITCSR220228A",
            "st_id": 19,
            "st_code": "ITCSR220228A"
        }
  	]
}

# 读取委外代销退货单

# 一、接口描述

​ 用于读取【委外代销退货单】数据

# 二、接口调用说明

​ 1、请求说明

URL http://[server]/jsf/rfws/root/api/read/consignCsr
http请求方式 GET
编码类型 UTF-8

​ 2、URL参数

参数 类型 必填 说明
authorization String(Header) 是 OAuth获取的Access Token
client_id String(Header) 是 aiM18[授权应用列表]中的Client ID
menuCode String(Query) 是 consignCsr
id long(Query) 是 委外代销退货单的id
param String(Query) 否 额外的系统参数;JSON字符串

​ 3、请求示例

		CloseableHttpClient client = HttpClientBuilder.create().build();
		CloseableHttpResponse res = null;
		try {

			String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/read/consignCsr";
			String param = "&menuCode=consignCsr&id=" + id;

			HttpGet get = new HttpGet(url + "?" + param);
			get.addHeader("authorization", access_token);
			get.addHeader("client_id", ClientID);
			res = client.execute(get);
			if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
				JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));

				System.out.println(json);
			}

			get.releaseConnection();
		} catch (Exception e) {
			e.printStackTrace();
		} finally {
			try {
				if (res != null) {
					res.close();
				}
				if (client != null) {
					client.close();
				}
			} catch (Exception ex) {
				ex.printStackTrace();
			}
		}

​ 4、返回示例

{
    "data": {
        "consignremcsr": [
            {
                "country": "CN",
                "heading_en": "<p>heading</p>",
                "shipAd4_haha1": "",
                "remarks_en": "<p>remarks</p>",
                "recipient_ccn": "",
                "shipAd2_zh-TW": "",
                "heading_ccn": "",
                "shipAd1_en": "10 Wang Street",
                "province": "Zhe Jiang",
                "tel": "5862472",
                "recipient_haha1": "",
                "id": 19,
                "fax": "+33 05 61 82 99",
                "remarks_zh-TW": "",
                "shipAd1_zh-CN": "",
                "hId": 19,
                "heading_zh-TW": "",
                "remarks_ccn": "",
                "heading_ctw": "",
                "shipAd4_ccn": "",
                "zipcode": "21463",
                "shipAd2_en": "NanSan",
                "shipAd1_haha1": "",
                "i18nField": "{\"heading_en\": \"<p>heading</p>\", \"remarks_en\": \"<p>remarks</p>\", \"shipAd1_en\": \"10 Wang Street\", \"shipAd2_en\": \"NanSan\", \"shipAd3_en\": \"ShenZhen\", \"shipAd4_en\": \"China\", \"heading_zh-CN\": \"\", \"remarks_zh-CN\": \"\", \"shipAd1_zh-CN\": \"\", \"shipAd2_zh-CN\": \"\", \"shipAd3_zh-CN\": \"\", \"shipAd4_zh-CN\": \"\", \"recipient_zh-CN\": \"Kiki Hui\"}",
                "remarks_zh-CN": "",
                "shipAd4_ctw": "",
                "gpsLat": 22.48197,
                "shipAd3_zh-TW": "",
                "remarks_ctw": "",
                "shipAd1_ccn": "",
                "shipCodeId": 1,
                "city": "Jia Xing",
                "shipAd3_ctw": "",
                "recipient_zh-CN": "Kiki Hui",
                "iRev": 1,
                "shipAd4_zh-TW": "",
                "shipAd2_ccn": "",
                "heading_zh-CN": "",
                "ce01Module": "consignCsr",
                "shipAd3_en": "ShenZhen",
                "recipient_en": "",
                "shipAd3_zh-CN": "",
                "shipAd4_zh-CN": "",
                "shipAd2_ctw": "",
                "shipAd2_haha1": "",
                "shipAd1_ctw": "",
                "remarks_haha1": "",
                "email": "1314@mac.com;",
                "shipAd3_ccn": "",
                "recipient_zh-TW": "",
                "heading_haha1": "",
                "heading": "",
                "recipient_ctw": "",
                "telCountry": "86",
                "shipAd1": "",
                "shipAd2": "",
                "shipAd3": "",
                "shipAd4": "",
                "telArea": "035",
                "shipAd1_zh-TW": "",
                "shipAd4_en": "China",
                "recipient": "Kiki Hui",
                "shipAd2_zh-CN": "",
                "shipAd3_haha1": "",
                "remarks": "",
                "gpsLong": 113.95353
            }
        ],
        "consigncsrt": [
            {
                "lotnoNumAttr17": 0,
                "lotnoNumAttr16": 0,
                "lotnoNumAttr15": 0,
                "shipMark": "",
                "lotnoNumAttr14": 0,
                "lotnoNumAttr19": 0,
                "lotnoNumAttr18": 0,
                "lotnoLookupAttr20": 0,
                "lotnoNumAttr13": 0,
                "lotnoNumAttr12": 0,
                "lotnoNumAttr11": 0,
                "lotnoNumAttr10": 0,
                "lotnoLookupAttr16": 0,
                "alocId": 15,
                "lotnoLookupAttr17": 0,
                "lotnoLookupAttr14": 0,
                "lotnoLookupAttr15": 0,
                "lotnoLookupAttr18": 0,
                "bDesc_zh-TW": "Ivan Testing Product(繁体)",
                "lotnoLookupAttr19": 0,
                "newLotno": 0,
                "lotnoLot": "A",
                "id": 27,
                "dDesc_haha1": "",
                "lotnoNumAttr20": 0,
                "completed": false,
                "lotnoLookupAttr12": 0,
                "lotnoLookupAttr13": 0,
                "lotnoLookupAttr10": 0,
                "lotnoLookupAttr11": 0,
                "i18nField": "{\"bDesc_en\": \"Ivan Testing Product\", \"dDesc_en\": \"<p>Ivan Testing Product(繁体)<br></p>\", \"bDesc_zh-CN\": \"Ivan Testing Product(简体)\", \"bDesc_zh-TW\": \"Ivan Testing Product(繁体)\", \"dDesc_zh-CN\": \"<p>Ivan Testing Product(简体)<br></p>\", \"dDesc_zh-TW\": \"<p>Ivan Testing Product(繁体)<br></p>\"}",
                "sourceType": "consignCdn",
                "costAmt": 0,
                "iRev": 1,
                "bDesc_ctw": "",
                "ce01Module": "consignCsr",
                "lot": "A",
                "lotnoDateAttr3": -2209017600000,
                "lotnoDateAttr4": -2209017600000,
                "lotnoDateAttr1": -2209017600000,
                "lotnoDateAttr2": -2209017600000,
                "lotnoDateAttr7": -2209017600000,
                "lotnoDateAttr8": -2209017600000,
                "bDesc_ccn": "",
                "lotnoDateAttr5": -2209017600000,
                "lotnoDateAttr6": -2209017600000,
                "unitId": 24,
                "lotnoDateAttr9": -2209017600000,
                "locId": 18,
                "bDesc_en": "Ivan Testing Product",
                "sourceCliId": 27074,
                "lotnoTextAttr1": "",
                "lotnoTextAttr2": "",
                "lotnoTextAttr3": "",
                "lotnoTextAttr4": "",
                "lotnoTextAttr5": "",
                "lotnoTextAttr6": "",
                "lotnoTextAttr7": "",
                "lotnoTextAttr8": "",
                "lotnoTextAttr9": "",
                "bDesc_zh-CN": "Ivan Testing Product(简体)",
                "sourceId": 31,
                "dualQty": 0,
                "coId": 0,
                "itemNo": "     1",
                "beId": 11,
                "bDesc": "Ivan Testing Product(简体)",
                "up": 18.88,
                "hId": 19,
                "lotnoNumAttr1": 0,
                "lotnoNumAttr2": 0,
                "lotnoNumAttr3": 0,
                "reDeliveryId": 0,
                "lotnoNumAttr4": 0,
                "lotnoExpDate": 253402271999000,
                "dDesc": "<p>Ivan Testing Product(简体)<br></p>",
                "footerKey": "     1",
                "qty": 0.2,
                "lotnoNumAttr5": 0,
                "lotnoNumAttr6": 0,
                "disc": 0,
                "lotnoNumAttr7": 0,
                "lotnoNumAttr8": 0,
                "lotnoNumAttr9": 0,
                "refCode": "JW001",
                "lotNoId": 270,
                "lotnoTextAttr16": "",
                "dDesc_ctw": "",
                "lotnoTextAttr15": "",
                "lotnoTextAttr18": "",
                "lotnoTextAttr17": "",
                "lotnoTextAttr12": "",
                "lotnoTextAttr11": "",
                "lotnoDateAttr20": -2209017600000,
                "lotnoTextAttr14": "",
                "reDeliveryType": "",
                "lotnoTextAttr13": "",
                "amt": 3.78,
                "dDesc_zh-CN": "<p>Ivan Testing Product(简体)<br></p>",
                "lotnoTextAttr19": "",
                "bDesc_haha1": "",
                "reDeliveryLot": "",
                "dDesc_zh-TW": "<p>Ivan Testing Product(繁体)<br></p>",
                "domAmt": 3.78,
                "dDesc_ccn": "",
                "lotnoTextAttr10": "",
                "coLot": "",
                "reDelivery": false,
                "dDesc_en": "<p>Ivan Testing Product(繁体)<br></p>",
                "dualUnitId": 6,
                "lotnoLookupAttr5": 0,
                "lotnoLookupAttr6": 0,
                "sourceLot": "A",
                "lotnoLookupAttr7": 0,
                "lotnoDateAttr18": -2209017600000,
                "lotnoLookupAttr8": 0,
                "lotnoDateAttr19": -2209017600000,
                "lotno": "AN0120160919-ITPROB",
                "lotnoLookupAttr9": 0,
                "proId": 18,
                "lotnoDateAttr12": -2209017600000,
                "lotnoDateAttr13": -2209017600000,
                "lotnoDateAttr10": -2209017600000,
                "lotnoDateAttr11": -2209017600000,
                "lotnoTextAttr20": "",
                "lotnoLookupAttr1": 0,
                "lotnoDateAttr16": -2209017600000,
                "lotnoLookupAttr2": 0,
                "lotnoDateAttr17": -2209017600000,
                "lotnoLookupAttr3": 0,
                "lotnoDateAttr14": -2209017600000,
                "lotnoLookupAttr4": 0,
                "lotnoDateAttr15": -2209017600000
            }
        ],
        "consignmaincsr": [
            {
                "lastModifyUid": 11,
                "useAccess": false,
                "virDeptId": 0,
                "expiredDate": -2209017600000,
                "position_zh-CN": "SA",
                "sysJson": "",
                "viewCode": "consignCsr",
                "beId": 11,
                "alocId": 15,
                "cusId": 27074,
                "useAccessBl": false,
                "id": 19,
                "doctypeId": 0,
                "locked": false,
                "position_ctw": "",
                "lastModifyDate": 1646021212000,
                "createUid": 11,
                "rev": "1",
                "lastApproveUid": 11,
                "ttlCharge": 0,
                "completed": false,
                "expiredUid": 0,
                "descOrigin": "PRO",
                "position_en": "",
                "position_zh-TW": "",
                "i18nField": "{\"position_zh-CN\": \"SA\"}",
                "manId": 29,
                "ttlAmt": 3.78,
                "position": "SA",
                "flowTypeId": 1354,
                "status": "Y",
                "weightUnit": "kg",
                "tDate": 1645977600000,
                "code": "ITCSR220228A",
                "cnDeptId": 30,
                "amt": 3.78,
                "iRev": 1,
                "upOrigin": "PRO",
                "ce01Module": "consignCsr",
                "curId": 1,
                "expired": false,
                "rate": 1,
                "measUnit": "cbm",
                "printCount": 0,
                "statusModifyDate": 1646021212000,
                "locId": 18,
                "createDate": 1646021212000,
                "loadGpCoData": false,
                "useAccessWl": false,
                "position_ccn": "",
                "ttlDisc": 0,
                "position_haha1": "",
                "useAccessAutoCalc": false,
                "staffId": 642
            }
        ]
    },
    "messages": [],
    "status": true
}

# 保存委外代销退货单

# 一、接口描述

​ 用于新增【委外代销退货单】

# 二、接口调用说明

​ 1、请求说明

URL http://[server]/jsf/rfws/root/api/save/consignCsr
http请求方式 PUT
编码类型 UTF-8

​ 2、URL参数

参数 类型 必填 说明
authorization String(Header) 是 OAuth获取的Access Token
client_id String(Header) 是 aiM18[授权应用列表]中的Client ID
menuCode String(Query) 是 consignCsr
param String(Query) 否 额外的系统参数;JSON字符串

​ 3、请求示例

	CloseableHttpClient client = HttpClientBuilder.create().build();
	CloseableHttpResponse res = null;
	try {

		String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/consignCsr";
		String param = "&menuCode=consignCsr";

		HttpPut put = new HttpPut(url + "?" + param);
		put.addHeader("authorization", access_token);
		put.addHeader("client_id", ClientID);

		StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON);
		entity.setContentEncoding("UTF-8");
		put.setEntity(entity);

		res = client.execute(put);
		if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
			JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));

			if (json != null) {
				recordId = json.getLongValue("recordId");
			}

			System.out.println(json);
		}

		put.releaseConnection();
	} catch (Exception e) {
		e.printStackTrace();
	} finally {
		try {
			if (res != null) {
				res.close();
			}
			if (client != null) {
				client.close();
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}				

Entity的JSON格式数据如下:

 {
    "consignmaincsr": {
        "values": [
            {
                "beId": 11,
                "code": "ITCSR220325A",
                "tDate": "2022-03-25",
                "cusId": 27074,
                "curId": 1,
                "rate": 1,
                "flowTypeId": 1384,
                "staffId": 723
            }
        ]
    },
    "consigncsrt": {
        "values": [
            {
                "sourceType": "consignCdn",
                "sourceId": 31,
                "sourceLot": "A",
                "proId": 26,
                "locId": 18,
                "alocId": 15,
                "lotNoId": 270,
                "unitId": 40,
                "qty": 1
            }
        ]
    }
}

​ 4、返回示例

{
	"recordId": 21,
	"messages": [],
	"status": true
}
{
    "recordId": 0,
    "messages": [
        {
            "msgDetail": "必填项为空",
            "msgCode": "core_101905"
        }
    ],
    "status": false
}

# 新增委外代销退货单(自动补全)

# 一、接口描述

​ 1. 用于新增【委外代销退货单】

​ 2. 此接口方法有如下特点:

​ a. 支持使用code 替代 id 栏位

​ b. 货币栏位未填时,自动使用本位币

​ c. 职员栏位未填时,自动使用个人选项中的默认职员

​ d. 单据日期未填时,根据贸易参数设定中的日期选项取值

​ e. 业务流程未填时,根据[业务流程设置(贸易)]中设定的默认值

# 二、接口调用说明

​ 1、请求说明

URL http://[server]/jsf/rfws/erp/bsFlow/save/consignCsr
http请求方式 POST
编码类型 UTF-8

​ 2、URL参数

参数 类型 必填 说明
authorization String(Header) 是 OAuth获取的Access Token
client_id String(Header) 是 aiM18[授权应用列表]中的Client ID

​ 3、请求示例

	CloseableHttpClient client = HttpClientBuilder.create().build();
	CloseableHttpResponse res = null;
	try {

		String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/erp/bsFlow/save/consignCsr";

		HttpPost post = new HttpPost(url);
		post.addHeader("authorization", access_token);
		post.addHeader("client_id", ClientID);

		StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON);
		entity.setContentEncoding("UTF-8");
		post.setEntity(entity);

		res = client.execute(post);
		if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
			JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));

			if (json != null) {
				recordId = json.getLongValue("tranId");
			}
			System.out.println(json);
		}

		post.releaseConnection();
	} catch (Exception e) {
		e.printStackTrace();
	} finally {
		try {
			if (res != null) {
				res.close();
			}
			if (client != null) {
				client.close();
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}

data数据示例

{
    "beCode": "IT",
    "cusCode": "IT002",
    "consigncsrt": [
        {
            "sourceType": "consignCdn",
            "sourceCode": "ITCDN20200528A",
            "sourceLot": "A",
            "proCode": "ITPRO002",
            "unitCode": "PCS",
            "alocCode": "ACLL",
            "locCode": "CONSIGNIN",
            "lotno": "AN0120160919-ITPROB",
            "qty": 1
        }
    ]
}

​ 4、返回示例

{
  "tranId": 22,
  "tranCode": "CSR220001",
  "message": "",
  "status": true
}

# 删除委外代销退货单

# 一、接口描述

​ 用于删除委外代销退货单

# 二、接口调用说明

​ 1、请求说明

URL http://[server]/jsf/rfws/root/api/delete/consignCsr
http请求方式 DELETE
编码类型 UTF-8

​ 2、URL参数

参数 类型 必填 说明
authorization String(Header) 是 OAuth获取的Access Token
client_id String(Header) 是 aiM18[授权应用列表]中的Client ID
menuCode String(Query) 是 consignCsr
id long(Query) 是 委外代销退货单的id
param String(Query) 否 额外的系统参数;JSON字符串

​ 3、请求示例

	CloseableHttpClient client = HttpClientBuilder.create().build();
	CloseableHttpResponse res = null;
	try {

		String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/delete/consignCsr";
		String param = "&menuCode=consignCsr&id=" + id;

		HttpDelete delete = new HttpDelete(url + "?" + param);
		delete.addHeader("authorization", access_token);
		delete.addHeader("client_id", ClientID);

		res = client.execute(delete);
		if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
			JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));

			System.out.println(json);
		}

		delete.releaseConnection();
	} catch (Exception e) {
		e.printStackTrace();
	} finally {
		try {
			if (res != null) {
				res.close();
			}
			if (client != null) {
				client.close();
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}

​ 4、返回示例

{
	"messages": [],
	"status": true
}
{
    "messages": [
        {
            "msgDetail": "单据已被删除",
            "msgCode": "core_101017"
        }
    ],
    "status": false
}

# 读取EBI数据:委外代销退货单列表

# 一、接口描述

​ 用于执行EBI[委外代销退货单列表],返回EBI数据

# 二、接口调用说明

​ 1、请求说明

URL http://[server]/jsf/rfws/ebiWidget/loadReport
http请求方式 GET
编码类型 UTF-8

​ 2、URL参数

参数 类型 必填 说明
authorization String(Header) 是 OAuth获取的Access Token
client_id String(Header) 是 aiM18[授权应用列表]中的Client ID
formatId long(Query) 是 通过EBI接口获取到formatId
beId long(Query) 否 企业法人的ID。若不传,则查询所有有权限的BE数据
offset int(Query) 否 返回结果的开始行
rows int(Query) 否 返回结果的结束行

​ 3、请求示例

	CloseableHttpClient client = HttpClientBuilder.create().build();
	CloseableHttpResponse res = null;
	try {

		String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/ebiWidget/loadReport";
		String param = "&formatId=" + formatId;

		HttpGet get = new HttpGet(url + "?" + param);
		get.addHeader("authorization", access_token);
		get.addHeader("client_id", ClientID);
		res = client.execute(get);
		if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
			JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));

			System.out.println(json);
		}

		get.releaseConnection();
	} catch (Exception e) {
		e.printStackTrace();
	} finally {
		try {
			if (res != null) {
				res.close();
			}
			if (client != null) {
				client.close();
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}				

​ 4、返回示例

{
    "size": 7,
    "rows": [
        {
            "M_A_code": "CSR-20170321-0001",
            "M_A_amt": "61,750.00",
            "STAFF_A_desc__lang": "Polly Chan",
            "aiM18ReservedCol_dataIndex": 1,
            "M_A_tDate": "2017.03.21",
            "CUS_A_id": "27095",
            "LOC_A_id": "127",
            "ALOC_A_id": "126",
            "M_A_ttlAmt": "61,750.00",
            "LOC_A_code": "MCONS",
            "M_A_id": "8",
            "ALOC_A_code": "MLOC",
            "CUS_A_code": "CC"
        }
    ]
}

ebi1

# 读取EBI数据:委外代销退货单报告

# 一、接口描述

​ 用于执行EBI[委外代销退货单报告],返回EBI数据

# 二、接口调用说明

​ 1、请求说明

URL http://[server]/jsf/rfws/ebiWidget/loadReport
http请求方式 GET
编码类型 UTF-8

​ 2、URL参数

参数 类型 必填 说明
authorization String(Header) 是 OAuth获取的Access Token
client_id String(Header) 是 aiM18[授权应用列表]中的Client ID
formatId long(Query) 是 通过EBI接口获取到formatId
beId long(Query) 否 企业法人的ID。若不传,则查询所有有权限的BE数据
offset int(Query) 否 返回结果的开始行
rows int(Query) 否 返回结果的结束行

​ 3、请求示例

	CloseableHttpClient client = HttpClientBuilder.create().build();
	CloseableHttpResponse res = null;
	try {

		String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/ebiWidget/loadReport";
		String param = "&formatId=" + formatId;

		HttpGet get = new HttpGet(url + "?" + param);
		get.addHeader("authorization", access_token);
		get.addHeader("client_id", ClientID);
		res = client.execute(get);
		if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
			JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));

			System.out.println(json);
		}

		get.releaseConnection();
	} catch (Exception e) {
		e.printStackTrace();
	} finally {
		try {
			if (res != null) {
				res.close();
			}
			if (client != null) {
				client.close();
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}				

​ 4、返回示例

{
    "size": 10,
    "rows": [
        {
            "M_A_code": "CSR-20180726-0001",
            "aiM18ReservedCol_dataIndex": 1,
            "FOOTERLOC_A_id": "122",
            "FOOTERALOC_A_code": "ACLL",
            "M_A_tDate": "2018.07.26",
            "CUS_A_id": "1",
            "FOOTERLOC_A_code": "961",
            "PRO_A_id": "1",
            "F_A_qty": "1.0000",
            "M_A_id": "15",
            "F_A_unitId_code": "个",
            "FOOTERALOC_A_id": "15",
            "LOTCOST_A_lotno": "N/A",
            "PRO_A_code": "SM-BOM-PROA",
            "CUS_A_code": "C0001A"
        }
    ]
}

ebi2

Last Updated: 2025/04/09, 02:58:38
财务EBI
EBI

← 财务EBI EBI→

Theme by Vdoing | Copyright © 1990-2025 Multiable | MIT License
  • 跟随系统
  • 浅色模式
  • 深色模式
  • 阅读模式