基础资料
# 客户
# 获取客户列表
# 一、接口描述
用于获取客户列表(同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) | 是 | cus |
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=cus&beId=1";
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": "cus",
"size": 1,
"stSearchDisplay": "Customer",
"values": [
{
"code": "5058",
"st_id": 142,
"st_code": "5058",
"desc__lang": "Wong Tin Yan",
"st_desc": "Wong Tin Yan (5058)",
"tel": "",
"iRev": 2,
"id": 142,
"cus.lastModifyUid.simpleUser.desc": "admin",
"lastModifyDate": "2021-01-27 16:02:03"
}
]
}
# 读取客户
# 一、接口描述
用于读取【客户】数据
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/read/cus |
---|---|
http请求方式 | GET |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | cus |
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/cus";
String param = "&menuCode=cus&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": {
"cus": [
{
"useAccess": false,
"ad1_en": "Block C, 18/F., 12 Sai Ning Street",
"ad1_cth": "",
"expiredDate": -2209017600000,
"ad2_jp": "",
"sysJson": "",
"viewCode": "cus",
"taxBank": "",
"ad3_cth": "",
"ad4_en": "",
"useAccessBl": false,
"udffile": 0,
"tel": "28197865",
"id": 2,
"fax": "",
"ad2_sxg": "",
"lastModifyDate": 1599463883000,
"createUid": 1,
"ad3_zh-CN": "",
"cDate": -2209017600000,
"udfATupdateAccess": false,
"i18nField": "{\"ad1_en\": \"Block C, 18/F., 12 Sai Ning Street\", \"ad2_en\": \"Kennedy Town, Hong Kong\", \"ad3_en\": \"\", \"ad4_en\": \"\", \"desc_en\": \"Tai Hong Trading Co. Ltd. (For Training Purpose)\", \"desc_jp\": \"Tai Hong Trading Co. Ltd. (For Training Purpose)\", \"ad1_zh-CN\": \"Block C, 18/F., 12 Sai Ning Street\", \"ad2_zh-CN\": \"Kennedy Town, Hong Kong\", \"ad3_zh-CN\": \"\", \"ad4_zh-CN\": \"\", \"desc_zh-CN\": \"Tai Hong Trading Co. Ltd. (For Training Purpose)\"}",
"groupCo": false,
"ad3_zh-TW": "",
"ad4_sxg": "",
"status": "Y",
"vatReg": false,
"udfsign": "",
"ad2_zh-CN": "Kennedy Town, Hong Kong",
"iRev": 4,
"udf001": "",
"webSite": "",
"udfATAT3": 0,
"groupCoId": 0,
"udfATAT4": 0,
"udfATAT1": 0,
"udfATAT2": 0,
"udfATAT5": 0,
"taxAddress": "",
"statusModifyDate": 1582605552000,
"desc_sxg": "",
"email": "bettylau@cuscontact.com",
"createDate": 1582605552000,
"ad3_hy": "",
"taxCusName": "",
"ad2_en": "Kennedy Town, Hong Kong",
"ad3_jp": "",
"priceTypeId": 0,
"udf1": "",
"ad2_zh-TW": "",
"useAccessWl": false,
"ad2": "Kennedy Town, Hong Kong",
"telCountry": "852",
"ad1": "Block C, 18/F., 12 Sai Ning Street",
"ad4": "",
"ad3": "",
"useAccessAutoCalc": false,
"desc_jp": "Tai Hong Trading Co. Ltd. (For Training Purpose)",
"lastModifyUid": 1,
"vatRate": 0,
"ad1_zh-TW": "",
"ad2_cth": "",
"eshopcusId": 0,
"ad3_sxg": "",
"beId": 3,
"udfnumber": 0,
"ad1_sxg": "",
"udfindustry": "",
"udfCustAbbr": "",
"locked": false,
"ad1_hy": "",
"shortCode": "",
"ad4_zh-TW": "",
"ad1_zh-CN": "Block C, 18/F., 12 Sai Ning Street",
"ad4_cth": "",
"lastApproveUid": 1,
"udfATJEIEN011": 0,
"ad1_jp": "",
"expiredUid": 0,
"whatsappNo": "",
"faxArea": "",
"desc_hy": "",
"faxCountry": "",
"desc_zh-TW": "",
"ad4_zh-CN": "",
"desc": "Tai Hong Trading Co. Ltd. (For Training Purpose)",
"ad4_hy": "",
"attachmentNo": 0,
"code": "C002",
"taxCodeNo": "",
"ad3_en": "",
"desc_cth": "",
"udf210728": "",
"expired": false,
"ecomMemberId": 0,
"printCount": 0,
"desc_en": "Tai Hong Trading Co. Ltd. (For Training Purpose)",
"desc_zh-CN": "Tai Hong Trading Co. Ltd. (For Training Purpose)",
"gstRegNo": "",
"blackListed": false,
"taxTel": "",
"ad4_jp": "",
"telArea": "",
"regionId": 1,
"udfATattSetId": 0,
"staffId": 0,
"ad2_hy": ""
}
],
"cusstatement": [
{
"ending": 0,
"hId": 2,
"iRev": 4,
"id": 6,
"itemNo": " 1",
"state": "",
"starting": 0
},
{
"ending": 30,
"hId": 2,
"iRev": 4,
"id": 7,
"itemNo": " 2",
"state": "",
"starting": 0
},
{
"ending": 60,
"hId": 2,
"iRev": 4,
"id": 8,
"itemNo": " 3",
"state": "",
"starting": 31
},
{
"ending": 90,
"hId": 2,
"iRev": 4,
"id": 9,
"itemNo": " 4",
"state": "",
"starting": 61
},
{
"ending": 90,
"hId": 2,
"iRev": 4,
"id": 10,
"itemNo": " 5",
"state": "",
"starting": 90
}
],
"cusacc": [
{
"hpSetting": "dayAfterInv",
"hId": 2,
"method": "monthly",
"ePostCl": 30000,
"installNo": 0,
"slmId": 0,
"monthlyOption": 1,
"monthlyEnd": 0,
"iRev": 4,
"calcDate": 1,
"cp": 14,
"stateLevel": "",
"aInvMonth": 0,
"curId": 1,
"dayOfMonth": 0,
"iPostCl": 30000,
"id": 2,
"ptOption": 2,
"maxcp": 7,
"periodNo": 5,
"interBeId": 0
}
],
"cusship": [
{
"country": "",
"itemNo": " 1",
"shipAd2_zh-TW": "",
"shipAd1_en": "12/F., Wing On Mansion",
"province": "",
"recipient_cth": "",
"shipAd2_jp": "",
"recipient_sxg": "",
"tel": "31079253",
"id": 3,
"fax": "",
"shipAd1_zh-CN": "12/F., Wing On Mansion",
"shipAd4_hy": "",
"hId": 2,
"shipAd4_cth": "",
"recipient_hy": "",
"zipcode": "",
"shipAd2_en": "188 Hennessy Road",
"shipAd4_sxg": "",
"i18nField": "{\"shipAd1_en\": \"12/F., Wing On Mansion\", \"shipAd2_en\": \"188 Hennessy Road\", \"shipAd3_en\": \"Wanchai, Hong Kong\", \"shipAd4_en\": \"\", \"recipient_en\": \"\", \"shipAd1_zh-CN\": \"12/F., Wing On Mansion\", \"shipAd2_zh-CN\": \"188 Hennessy Road\", \"shipAd3_zh-CN\": \"Wanchai, Hong Kong\", \"shipAd4_zh-CN\": \"\", \"recipient_zh-CN\": \"\"}",
"shipAd3_jp": "",
"gpsLat": 0,
"shipAd1_hy": "",
"shipAd3_zh-TW": "",
"city": "",
"shipAd2_cth": "",
"recipient_zh-CN": "",
"iRev": 4,
"shipAd1_cth": "",
"shipAd3_sxg": "",
"shipAd4_zh-TW": "",
"shipAd3_cth": "",
"shipAd3_en": "Wanchai, Hong Kong",
"recipient_en": "",
"default": true,
"expired": false,
"shipAd3_zh-CN": "Wanchai, Hong Kong",
"shipAd4_zh-CN": "",
"shipAd1_sxg": "",
"shipAd4_jp": "",
"shipAd2_sxg": "",
"shipAd2_hy": "",
"email": "",
"recipient_zh-TW": "",
"telCountry": "852",
"shipCode": "C002A",
"shipAd1": "12/F., Wing On Mansion",
"recipient_jp": "",
"shipAd2": "188 Hennessy Road",
"shipAd3": "Wanchai, Hong Kong",
"shipAd4": "",
"telArea": "",
"shipAd1_zh-TW": "",
"shipAd4_en": "",
"shipAd1_jp": "",
"recipient": "",
"shipAd2_zh-CN": "188 Hennessy Road",
"shipAd3_hy": "",
"udfdregion": 0,
"staffId": 0,
"gpsLong": 0
},
{
"country": "",
"itemNo": " 2",
"shipAd2_zh-TW": "",
"shipAd1_en": "G/F., No. 1, Good Luk Mansion",
"province": "",
"recipient_cth": "",
"shipAd2_jp": "",
"recipient_sxg": "",
"tel": "24753411",
"id": 4,
"fax": "24756466",
"shipAd1_zh-CN": "G/F., No. 1, Good Luk Mansion",
"shipAd4_hy": "",
"hId": 2,
"shipAd4_cth": "",
"recipient_hy": "",
"zipcode": "",
"shipAd2_en": "101-121 Kau Yuk Road, Yuen Long",
"shipAd4_sxg": "",
"i18nField": "{\"shipAd1_en\": \"G/F., No. 1, Good Luk Mansion\", \"shipAd2_en\": \"101-121 Kau Yuk Road, Yuen Long\", \"shipAd3_en\": \"N.T.\", \"shipAd4_en\": \"\", \"recipient_en\": \"\", \"shipAd1_zh-CN\": \"G/F., No. 1, Good Luk Mansion\", \"shipAd2_zh-CN\": \"101-121 Kau Yuk Road, Yuen Long\", \"shipAd3_zh-CN\": \"N.T.\", \"shipAd4_zh-CN\": \"\", \"recipient_zh-CN\": \"\"}",
"shipAd3_jp": "",
"gpsLat": 0,
"shipAd1_hy": "",
"shipAd3_zh-TW": "",
"city": "",
"shipAd2_cth": "",
"recipient_zh-CN": "",
"iRev": 4,
"shipAd1_cth": "",
"shipAd3_sxg": "",
"shipAd4_zh-TW": "",
"shipAd3_cth": "",
"shipAd3_en": "N.T.",
"recipient_en": "",
"default": false,
"expired": false,
"shipAd3_zh-CN": "N.T.",
"shipAd4_zh-CN": "",
"shipAd1_sxg": "",
"shipAd4_jp": "",
"shipAd2_sxg": "",
"shipAd2_hy": "",
"email": "",
"recipient_zh-TW": "",
"telCountry": "852",
"shipCode": "C002B",
"shipAd1": "G/F., No. 1, Good Luk Mansion",
"recipient_jp": "",
"shipAd2": "101-121 Kau Yuk Road, Yuen Long",
"shipAd3": "N.T.",
"shipAd4": "",
"telArea": "",
"shipAd1_zh-TW": "",
"shipAd4_en": "",
"shipAd1_jp": "",
"recipient": "",
"shipAd2_zh-CN": "101-121 Kau Yuk Road, Yuen Long",
"shipAd3_hy": "",
"udfdregion": 0,
"staffId": 0,
"gpsLong": 0
},
{
"country": "",
"itemNo": " 3",
"shipAd2_zh-TW": "",
"shipAd1_en": "12/F., Sun Pak Ho Building",
"province": "",
"recipient_cth": "",
"shipAd2_jp": "",
"recipient_sxg": "",
"tel": "24161989",
"id": 5,
"fax": "",
"shipAd1_zh-CN": "12/F., Sun Pak Ho Building",
"shipAd4_hy": "",
"hId": 2,
"shipAd4_cth": "",
"recipient_hy": "",
"zipcode": "",
"shipAd2_en": "176-180 Apliu Street",
"shipAd4_sxg": "",
"i18nField": "{\"shipAd1_en\": \"12/F., Sun Pak Ho Building\", \"shipAd2_en\": \"176-180 Apliu Street\", \"shipAd3_en\": \"Sham Shui Po, Kowloon\", \"shipAd4_en\": \"\", \"recipient_en\": \"\", \"shipAd1_zh-CN\": \"12/F., Sun Pak Ho Building\", \"shipAd2_zh-CN\": \"176-180 Apliu Street\", \"shipAd3_zh-CN\": \"Sham Shui Po, Kowloon\", \"shipAd4_zh-CN\": \"\", \"recipient_zh-CN\": \"\"}",
"shipAd3_jp": "",
"gpsLat": 0,
"shipAd1_hy": "",
"shipAd3_zh-TW": "",
"city": "",
"shipAd2_cth": "",
"recipient_zh-CN": "",
"iRev": 4,
"shipAd1_cth": "",
"shipAd3_sxg": "",
"shipAd4_zh-TW": "",
"shipAd3_cth": "",
"shipAd3_en": "Sham Shui Po, Kowloon",
"recipient_en": "",
"default": false,
"expired": false,
"shipAd3_zh-CN": "Sham Shui Po, Kowloon",
"shipAd4_zh-CN": "",
"shipAd1_sxg": "",
"shipAd4_jp": "",
"shipAd2_sxg": "",
"shipAd2_hy": "",
"email": "",
"recipient_zh-TW": "",
"telCountry": "852",
"shipCode": "C002C",
"shipAd1": "12/F., Sun Pak Ho Building",
"recipient_jp": "",
"shipAd2": "176-180 Apliu Street",
"shipAd3": "Sham Shui Po, Kowloon",
"shipAd4": "",
"telArea": "",
"shipAd1_zh-TW": "",
"shipAd4_en": "",
"shipAd1_jp": "",
"recipient": "",
"shipAd2_zh-CN": "176-180 Apliu Street",
"shipAd3_hy": "",
"udfdregion": 0,
"staffId": 0,
"gpsLong": 0
}
],
"remcus": [
{
"shipMark_hy": "",
"tradeTerm_en": "",
"shipMark": "",
"shipMark_zh-CN": "",
"tradeTerm_zh-CN": "",
"payTerm_en": "14 Days",
"iRev": 4,
"packing": "",
"tradeTerm": "",
"packing_zh-TW": "",
"payTerm_zh-TW": "",
"shipMark_cth": "",
"packing_jp": "",
"shipMark_en": "",
"shipMark_sxg": "",
"tradeTerm_hy": "",
"id": 2,
"payTerm_hy": "",
"hId": 2,
"bNature": "",
"payTerm": "14 Days",
"packing_zh-CN": "",
"payTerm_cth": "",
"tradeTerm_sxg": "",
"payTerm_jp": "",
"tradeTerm_zh-TW": "",
"packing_hy": "",
"tradeTerm_jp": "",
"packing_cth": "",
"i18nField": "{\"packing_en\": \"\", \"payTerm_en\": \"14 Days\", \"shipMark_en\": \"\", \"tradeTerm_en\": \"\", \"packing_zh-CN\": \"\", \"payTerm_zh-CN\": \"14 Days\", \"shipMark_zh-CN\": \"\", \"tradeTerm_zh-CN\": \"\"}",
"packing_en": "",
"tradeTerm_cth": "",
"shipMark_jp": "",
"smthId": 0,
"payTerm_zh-CN": "14 Days",
"shipMark_zh-TW": "",
"packing_sxg": "",
"payTerm_sxg": ""
}
],
"cust": [
{
"position_sxg": "",
"man_jp": "",
"code": "001",
"iRev": 4,
"position_zh-CN": "Manager",
"itemNo": " 1",
"position_cth": "",
"ce01Module": "cus",
"default": true,
"position_jp": "",
"expired": false,
"cordchat": "",
"tel": "28197865",
"id": 3,
"man": "Benny Lau",
"fax": "",
"man_hy": "",
"email": "bettylau@cuscontact.com",
"hId": 2,
"man_zh-CN": "Benny Lau",
"man_en": "Benny Lau",
"position_hy": "",
"whatsappNo": "",
"telCountry": "852",
"faxArea": "",
"position_en": "Manager",
"position_zh-TW": "",
"i18nField": "{\"man_en\": \"Benny Lau\", \"man_zh-CN\": \"Benny Lau\", \"position_en\": \"Manager\", \"position_zh-CN\": \"Manager\"}",
"telArea": "",
"man_sxg": "",
"faxCountry": "",
"man_cth": "",
"position": "Manager",
"man_zh-TW": ""
},
{
"position_sxg": "",
"man_jp": "",
"code": "002",
"iRev": 4,
"position_zh-CN": "Assistant",
"itemNo": " 2",
"position_cth": "",
"ce01Module": "cus",
"default": false,
"position_jp": "",
"expired": false,
"cordchat": "",
"tel": "28197868",
"id": 4,
"man": "Jade Wong",
"fax": "",
"man_hy": "",
"email": "jadewong@cuscontact.com",
"hId": 2,
"man_zh-CN": "Jade Wong",
"man_en": "Jade Wong",
"position_hy": "",
"whatsappNo": "",
"telCountry": "852",
"faxArea": "",
"position_en": "Assistant",
"position_zh-TW": "",
"i18nField": "{\"man_en\": \"Jade Wong\", \"man_zh-CN\": \"Jade Wong\", \"position_en\": \"Assistant\", \"position_zh-CN\": \"Assistant\"}",
"telArea": "",
"man_sxg": "",
"faxCountry": "",
"man_cth": "",
"position": "Assistant",
"man_zh-TW": ""
}
]
},
"messages": [],
"status": true
}
# 保存客户
# 一、接口描述
用于新增【客户】
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/save/cus |
---|---|
http请求方式 | PUT |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | cus |
param | String(Query) | 否 | 额外的系统参数;JSON字符串 |
3、请求示例
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/cus";
String param = "&menuCode=cus";
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格式数据如下:
{
"cus": {
"values": [
{
"beId": 80,
"cDate": "20220401",
"regionId": 79,
"desc": "20220401"
}
]
},
"cusacc": {
"values": [
{
"curId": 1
}
]
}
}
4、返回示例
{
"recordId": 1784,
"messages": [],
"status": true
}
{
"recordId": 0,
"messages": [
{
"msgDetail": "必填项为空",
"msgCode": "core_101905"
}
],
"status": false
}
# 删除客户
# 一、接口描述
用于删除客户
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/delete/cus |
---|---|
http请求方式 | DELETE |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | cus |
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/cus";
String param = "&menuCode=cus&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": 1,
"rows": [
{
"MAIN_A_code": "CUS",
"MAIN_A_id": "278",
"aiM18ReservedCol_dataIndex": 1,
"MAIN_A_email": "",
"MAIN_A_tel": "",
"MAIN_A_fax": "",
"MAIN_A_ad1": "",
"MAIN_A_webSite": "",
"MAIN_A_desc__lang": "",
"MAIN_A_ad2": "",
"MAIN_A_ad3": "",
"MAIN_A_ad4": ""
}
]
}
# 供应商
# 获取供应商列表
# 一、接口描述
用于获取供应商列表(同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) | 是 | ven |
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=ven&beId=1";
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": "ven",
"size": 1,
"stSearchDisplay": "Vendor",
"values": [
{
"code": "EMM",
"st_id": 93,
"st_code": "EMM",
"desc__lang": "Eternity Music Ministry",
"st_desc": "Eternity Music Ministry (EMM)",
"tel": "",
"iRev": 1,
"ven.lastModifyUid.simpleUser.desc": "admin",
"id": 93,
"lastModifyDate": "2020-09-29 13:28:53"
}
]
}
# 读取供应商
# 一、接口描述
用于读取【供应商】数据
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/read/ven |
---|---|
http请求方式 | GET |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | ven |
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/ven";
String param = "&menuCode=ven&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": {
"venacc": [
{
"hpSetting": "dayAfterInv",
"hId": 93,
"method": "cod",
"ePostCl": 0,
"installNo": 0,
"slmId": 0,
"monthlyOption": 1,
"monthlyEnd": 0,
"iRev": 1,
"maxPOAmt": 0,
"cp": 0,
"stateLevel": "",
"aInvMonth": 0,
"curId": 1,
"dayOfMonth": 1,
"iPostCl": 0,
"id": 93,
"maxcp": 0,
"periodNo": 5,
"interBeId": 0
}
],
"ven": [
{
"defVatPer": 0,
"lastModifyUid": 1,
"useAccess": false,
"ad1_en": "",
"ad1_cth": "",
"expiredDate": -2209017600000,
"ad1_zh-TW": "",
"ad2_jp": "",
"ad2_cth": "",
"sysJson": "",
"udfDefaultAP": 0,
"viewCode": "ven",
"ad3_sxg": "",
"beId": 80,
"ad1_sxg": "",
"ad3_cth": "",
"ad4_en": "",
"useAccessBl": false,
"tel": "",
"id": 93,
"locked": false,
"fax": "",
"ad1_hy": "",
"ad2_sxg": "",
"lastModifyDate": 1601357333000,
"createUid": 1,
"ad3_zh-CN": "",
"ad4_zh-TW": "",
"ad1_zh-CN": "",
"cDate": 1577808000000,
"ad4_cth": "",
"lastApproveUid": 1,
"udfATJEIEN011": 0,
"udfATupdateAccess": false,
"ad1_jp": "",
"expiredUid": 0,
"whatsappNo": "",
"faxArea": "",
"i18nField": "{\"ad1_en\": \"\", \"ad2_en\": \"\", \"ad3_en\": \"\", \"ad4_en\": \"\", \"desc_en\": \"Eternity Music Ministry\", \"desc_jp\": \"\", \"desc_zh-CN\": \"\"}",
"desc_hy": "",
"groupCo": false,
"faxCountry": "",
"desc_zh-TW": "",
"ad3_zh-TW": "",
"ad4_zh-CN": "",
"ad4_sxg": "",
"status": "Y",
"desc": "Eternity Music Ministry",
"ad4_hy": "",
"attachmentNo": 0,
"code": "EMM",
"vatReg": false,
"ad2_zh-CN": "",
"ad3_en": "",
"iRev": 1,
"desc_cth": "",
"webSite": "",
"udfATVENGP1": 0,
"expired": false,
"groupCoId": 0,
"printCount": 0,
"statusModifyDate": 1601357333000,
"desc_en": "Eternity Music Ministry",
"desc_sxg": "",
"email": "",
"createDate": 1601357333000,
"desc_zh-CN": "",
"ad3_hy": "",
"ad2_en": "",
"ad3_jp": "",
"udf1": "",
"ad2_zh-TW": "",
"useAccessWl": false,
"ad2": "",
"telCountry": "",
"blackListed": false,
"ad1": "",
"ad4": "",
"ad3": "",
"ad4_jp": "",
"telArea": "",
"regionId": 79,
"useAccessAutoCalc": false,
"udfATattSetId": 0,
"staffId": 0,
"ad2_hy": "",
"desc_jp": ""
}
],
"remven": [
{
"tradeTerm_en": "",
"shipMark_hy": "",
"shipMark": "",
"shipMark_zh-CN": "",
"tradeTerm_zh-CN": "",
"payTerm_en": "",
"iRev": 1,
"packing": "",
"tradeTerm": "",
"packing_zh-TW": "",
"payTerm_zh-TW": "",
"shipMark_cth": "",
"packing_jp": "",
"tradeTerm_hy": "",
"shipMark_en": "",
"shipMark_sxg": "",
"id": 93,
"payTerm_hy": "",
"hId": 93,
"bNature": "",
"payTerm": "",
"venScore": 0,
"packing_zh-CN": "",
"payTerm_cth": "",
"tradeTerm_sxg": "",
"payTerm_jp": "",
"tradeTerm_zh-TW": "",
"packing_hy": "",
"tradeTerm_jp": "",
"packing_cth": "",
"i18nField": "{\"packing_en\": \"\", \"payTerm_en\": \"\", \"shipMark_en\": \"\", \"tradeTerm_en\": \"\"}",
"packing_en": "",
"tradeTerm_cth": "",
"shipMark_jp": "",
"smthId": 0,
"payTerm_zh-CN": "",
"shipMark_zh-TW": "",
"packing_sxg": "",
"payTerm_sxg": ""
}
]
},
"messages": [],
"status": true
}
# 保存供应商
# 一、接口描述
用于新增【供应商】
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/save/ven |
---|---|
http请求方式 | PUT |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | ven |
param | String(Query) | 否 | 额外的系统参数;JSON字符串 |
3、请求示例
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/ven";
String param = "&menuCode=ven";
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格式数据如下:
{
"venacc": {
"values": [
{
"curId": 1
}
]
},
"ven": {
"values": [
{
"beId": 80,
"regionId": 79,
"desc": "20220401"
}
]
}
}
4、返回示例
{
"recordId": 1698,
"messages": [],
"status": true
}
{
"recordId": 0,
"messages": [
{
"msgDetail": "必填项为空",
"msgCode": "core_101905"
}
],
"status": false
}
# 删除供应商
# 一、接口描述
用于删除供应商
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/delete/ven |
---|---|
http请求方式 | DELETE |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | ven |
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/ven";
String param = "&menuCode=ven&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": 1,
"rows": [
{
"VEN_A_ad2": "",
"VEN_A_ad1": "",
"VEN_A_ad4": "",
"VEN_A_email": "",
"VEN_A_ad3": "",
"aiM18ReservedCol_dataIndex": 1,
"VEN_A_code": "PB",
"VEN_C_bNature": "",
"VEN_A_tel": "",
"VEN_A_webSite": "",
"VEN_A_fax": "",
"VEN_A_id": "96"
}
]
}
# 产品
# 获取产品列表
# 一、接口描述
用于获取产品列表(同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) | 是 | pro |
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=pro&beId=1";
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": "pro",
"size": 1,
"stSearchDisplay": "Product / Material",
"values": [
{
"code": "A",
"st_id": 5024,
"st_code": "A",
"desc__lang": "",
"st_desc": "A ()",
"pro.lastModifyUid.simpleUser.desc": "admin",
"iRev": 1,
"id": 5024,
"lastModifyDate": "2021-08-17 17:23:07"
}
]
}
# 读取产品
# 一、接口描述
用于读取【产品】数据
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/read/pro |
---|---|
http请求方式 | GET |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | pro |
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/pro";
String param = "&menuCode=pro&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": {
"produalunit": [
{
"hId": 5024,
"default": true,
"expired": false,
"ratioN": 1,
"unitId": 287,
"iRev": 1,
"id": 4965,
"itemNo": " 1",
"showRatioD": 1,
"basicUnit": true,
"ratioD": 1,
"showRatioN": 1
}
],
"proco": [
{
"inventoryItem": true,
"maxUcCurId": 1,
"suManHour": 0,
"dualRefRatio": 1,
"minBQty": 0,
"maxAvailDef": "avail_1",
"maxSubFee": 99999999.99999999,
"beId": 80,
"hourSalaryCurId": 0,
"maxUcUnitId": 287,
"sscoRemarks_zh-CN": "",
"autoAssign": false,
"expDay": 0,
"useLotno": false,
"batchQty": 0,
"catchWeightNeed": false,
"maxSubFeeCurId": 1,
"id": 5024,
"unitSalaryUnitId": 0,
"stkMth2": "avg",
"minUpUnitId": 287,
"sscoRemarks": "",
"mpqUnitId": 287,
"kcId": 0,
"hId": 5024,
"setMenu": false,
"mpq": 0,
"subUpCurId": 1,
"venId": 0,
"i18nField": "{\"sscoRemarks_zh-CN\": \"\"}",
"minUp": 0,
"jobLeadTime": 0,
"unitSalary": 0,
"maxUc": 99999999.99999999,
"soleLotno": false,
"skipJob": false,
"maxSubFeeUnitId": 287,
"stkMth": "avg",
"maxAvail": 999999999999.99,
"showInCo": "no",
"suMcHour": 0,
"iRev": 1,
"leadTime": 0,
"rol": 0,
"unitSalaryCurId": 0,
"poqUnitId": 287,
"subUpUnitId": 287,
"poq": 0,
"hourSalary": 0,
"packDeci": 0,
"dualUnitNeed": false,
"showInSsco": "no",
"attrib": "prod",
"sscoRemarks_hy": "",
"sscoRemarks_sxg": "",
"roundType": "notRound",
"locId": 0,
"sscoRemarks_jp": "",
"minUpCurId": 1,
"minBQtyUnitId": 287,
"batchQtyUnitId": 287,
"catchWeightUnit": "dualUnit",
"rolUnitId": 287,
"cateringQuickCode": "",
"sscoRemarks_zh-TW": "",
"sscoRemarks_cth": "",
"subUp": 0,
"maxAvailUnitId": 287,
"expDayUnit": "month",
"priceRefRatio": 1,
"sscoRemarks_en": ""
}
],
"price": [
{
"ctiUc15": 0,
"ctiUc16": 0,
"ucCurId": 1,
"ctiUc13": 0,
"ctiUc14": 0,
"ctiUc19": 0,
"endDate": 253402271999000,
"ctiUc17": 0,
"ctiUc18": 0,
"itemNo": " 1",
"ratioD": 1,
"ctiUc11": 0,
"saleUnit": true,
"ctiUc12": 0,
"uc": 5,
"ctiUc10": 0,
"effDate": -2209017600000,
"id": 5523,
"up": 7,
"showRatioD": 1,
"upCurId": 1,
"hId": 5024,
"stkUnit": true,
"pickUnit": true,
"ctiUc1": 5,
"ctiUc5": 0,
"ctiUc4": 0,
"ctiUc3": 0,
"ctiUc2": 0,
"ctiUc9": 0,
"ctiUc8": 0,
"ctiUc7": 0,
"ctiUc6": 0,
"ratioN": 1,
"udfbarcode": "",
"ctiUc30": 0,
"iRev": 1,
"expired": false,
"unitId": 287,
"ctiUc26": 0,
"ctiUc27": 0,
"ctiUc24": 0,
"ctiUc25": 0,
"ctiUc28": 0,
"retailUnit": true,
"ctiUc29": 0,
"basicUnit": true,
"ctiUc22": 0,
"showRatioN": 1,
"ctiUc23": 0,
"ctiUc20": 0,
"ctiUc21": 0,
"purUnit": true
}
],
"pro": [
{
"expiredDate": -2209017600000,
"tpAttr5Id": 0,
"udffktest31": 0,
"udffktest32": 0,
"udfATPROATTRB": 0,
"udffktest33": 0,
"udfATPROATTRA": 0,
"udffktest34": 0,
"udffktest30": 0,
"syncEnabled": false,
"udfAT1": 0,
"udffktest39": 0,
"udffktest35": 0,
"udfATSUB": 0,
"udffktest36": 0,
"udffktest37": 0,
"udffktest38": 0,
"udfATATT0002": 0,
"lastModifyDate": 1629192187000,
"createUid": 1,
"poscoreDesc_sxg": "",
"taxFree": false,
"udfATupdateAccess": false,
"udffktest20": 0,
"udfATOCOLOR": 0,
"udffktest21": 0,
"udffktest22": 0,
"udffktest23": 0,
"udffktest28": 0,
"udffktest29": 0,
"proName_cth": "",
"afterTaxRetUp": 0,
"udffktest24": 0,
"udfATRWIDTH": 0,
"udffktest25": 0,
"udffktest26": 0,
"udffktest27": 0,
"udffktest6": 0,
"udffktest7": 0,
"udffktest8": 0,
"udffktest9": 0,
"udfATMAIN": 0,
"tpAttr4Id": 0,
"udffktest53": 0,
"udffktest54": 0,
"udffktest55": 0,
"udffktest1": 0,
"udffktest56": 0,
"poscoreExcPromo": false,
"udffktest2": 0,
"cateringDesc_en": "",
"udffktest3": 0,
"udffktest50": 0,
"udffktest4": 0,
"udffktest51": 0,
"udffktest5": 0,
"udffktest52": 0,
"udffktest57": 0,
"udffktest58": 0,
"udffktest59": 0,
"poscoreExcMU": false,
"unitId": 287,
"udfATATTTP1": 0,
"proShortDesc_sxg": "",
"poscoreExcPreOrder": false,
"udffktest42": 0,
"proName_en": "",
"udffktest43": 0,
"imgCode": "",
"udffktest44": 0,
"poscoreExcAllCalc": false,
"udffktest45": 0,
"useAccessWl": false,
"udfATPLUMWINE": 0,
"udffktest40": 0,
"udffktest41": 0,
"udffktest46": 0,
"udffktest47": 0,
"udffktest48": 0,
"udffktest49": 0,
"tpAttr7Id": 0,
"proTpId": 0,
"lastModifyUid": 1,
"proDesc_zh-CN": "",
"purUnitId": 287,
"pickUnitId": 287,
"seriesId": 113,
"qcRequiredProd": false,
"beId": 80,
"qcRequired": false,
"posmultibcBarCodeList": "",
"udfATTESTINGL1": 0,
"udfATJEIEN011": 0,
"udffktest64": 0,
"udffktest60": 0,
"proDesc_zh-TW": "",
"expiredUid": 0,
"udffktest61": 0,
"udffktest62": 0,
"barCode": "",
"udffktest63": 0,
"dDesc": "",
"cateringDesc_cth": "",
"proName_sxg": "",
"eshopProType": "simple",
"desc": "",
"proTpiRev": 0,
"tpAttr6Id": 0,
"udfjessetest": "",
"udfPJPlookup1": 0,
"proName_hy": "",
"attachmentNo": 0,
"magentoProId": "",
"stkUnitId": 287,
"udfATTYPE": 0,
"dDesc_cth": "",
"expired": false,
"cateringDesc_hy": "",
"printCount": 0,
"udfATBASE93": 0,
"udfATQUALITY": 0,
"proShortDesc_cth": "",
"cateringDesc_jp": "",
"udfATBRAND": 0,
"poscoreDesc_en": "",
"proDesc_en": "",
"saleUnitId": 287,
"proShortDesc": "",
"retailUnitId": 287,
"procmPurCateId": 0,
"udfATSWEETNESS": 0,
"udfATCOLOR": 0,
"tpAttr9Id": 0,
"poscoreDesc_jp": "",
"useAccess": false,
"proDesc_jp": "",
"sysJson": "",
"magentoSku": "A",
"viewCode": "pro",
"udfchanpinguige": "",
"udfATTESTMY": 0,
"proName_jp": "",
"useAccessBl": false,
"id": 5024,
"cateringDesc_sxg": "",
"poscoreRetailType": "na",
"proDesc_sxg": "",
"i18nField": "{\"desc_jp\": \"\", \"dDesc_jp\": \"\", \"desc_zh-CN\": \"\", \"dDesc_zh-CN\": \"\", \"proDesc_zh-CN\": \"\", \"proName_zh-CN\": \"\", \"poscoreDesc_jp\": \"\", \"poscoreDesc_zh-CN\": \"\", \"cateringDesc_zh-CN\": \"\", \"proShortDesc_zh-CN\": \"\"}",
"udfATQRCODE": "",
"proShortDesc_en": "",
"status": "Y",
"udfaccount": 0,
"tpAttr8Id": 0,
"dDesc_sxg": "",
"dDesc_jp": "",
"iRev": 1,
"poscoreDesc_zh-CN": "",
"poscoreDesc_hy": "",
"udfATPLUMTYPE": 0,
"proDesc_hy": "",
"udfATJESSEPRO": 0,
"proName": "",
"statusModifyDate": 1629192187000,
"desc_sxg": "",
"proShortDesc_zh-CN": "",
"createDate": 1629192187000,
"udfATLEVEL": 0,
"poscoreDesc_zh-TW": "",
"cateringExcServCharge": false,
"poscoreDesc_cth": "",
"qcRequiredSales": false,
"useAccessAutoCalc": false,
"udfSPECUDF": "",
"desc_jp": "",
"udfATSIZE": 0,
"dDesc_hy": "",
"tpAttr3Id": 0,
"udfATPACKAGING": 0,
"udfATREGION": 0,
"udfATVEIN": 0,
"proShortDesc_jp": "",
"cateringDesc_zh-CN": "",
"locked": false,
"matcatId": 0,
"proDesc": "",
"tpAttr10Id": 0,
"lastApproveUid": 1,
"udfATSUGAR": 0,
"qcRequiredPurchase": false,
"preTaxRetUnitId": 0,
"preTaxRetUp": 0,
"udfATSECONDARY": 0,
"seedtime": 0,
"cateringDesc_zh-TW": "",
"udfPJPstring1": "",
"desc_hy": "",
"proShortDesc_zh-TW": "",
"qcRequiredConsign": false,
"desc_zh-TW": "",
"udfATPART": 0,
"udfATP1C1": 0,
"proShortDesc_hy": "",
"code": "A",
"tpAttr2Id": 0,
"udfATTEXTURE": 0,
"proName_zh-TW": "",
"proDesc_cth": "",
"udffktest10": 0,
"udffktest11": 0,
"udffktest12": 0,
"dDesc_zh-CN": "",
"desc_cth": "",
"udffktest17": 0,
"afterTaxRetUnitId": 0,
"udffktest18": 0,
"udffktest19": 0,
"dDesc_zh-TW": "",
"udffktest13": 0,
"udffktest14": 0,
"udffktest15": 0,
"udffktest16": 0,
"qcRequiredSubc": false,
"desc_en": "",
"proName_zh-CN": "",
"desc_zh-CN": "",
"poscoreDesc": "",
"cateringDesc": "",
"dDesc_en": "",
"poscoreExcDisc": false,
"tpAttr1Id": 0,
"udfATattSetId": 0,
"udfATSAKI": 0
}
]
},
"messages": [],
"status": true
}
# 保存产品
# 一、接口描述
用于新增【产品】
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/save/pro |
---|---|
http请求方式 | PUT |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | pro |
param | String(Query) | 否 | 额外的系统参数;JSON字符串 |
3、请求示例
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/pro";
String param = "&menuCode=pro";
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格式数据如下:
{
"price": {
"values": [
{
"ucCurId": 1,
"unitId": 287,
"showRatioD": 1,
"showRatioN": 1,
"upCurId": 1
}
]
},
"proco": {
"values": [
{
"ucCurId": 1,
"unitId": 287,
"showRatioD": 1,
"showRatioN": 1,
"upCurId": 1
}
]
},
"pro": {
"values": [
{
"beId": 80,
"seriesId": 113,
"desc": "20220401"
}
]
}
}
4、返回示例
{
"recordId": 6607,
"messages": [],
"status": true
}
{
"recordId": 0,
"messages": [
{
"msgDetail": "必填项为空",
"msgCode": "core_101905"
}
],
"status": false
}
# 删除产品
# 一、接口描述
用于删除产品
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/delete/pro |
---|---|
http请求方式 | DELETE |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | pro |
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/pro";
String param = "&menuCode=pro&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": 1,
"rows": [
{
"PRICE_A_up": "6.00000000",
"aiM18ReservedCol_dataIndex": 1,
"PROCO_A_stkMth": "Monthly Weighted Average",
"PRICE_A_ucCurId_desc__lang": "HK$",
"PRICE_A_uc": "4.00000000",
"PRO_A_code": "A1",
"PRICE_A_upCurId_desc__lang": "HK$",
"PRO_A_id": "5025",
"PRO_A_desc__lang": ""
}
]
}