零售
# 会员
# 获取会员列表
# 一、接口描述
用于获取会员列表(同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) | 是 | poscoreMember |
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=poscoreMember&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": "poscoreMember",
"size": 1,
"stSearchDisplay": "Member",
"values": [
{
"code": "20200520",
"st_id": 16,
"st_code": "20200520",
"st_desc": "Mr. Chan Sing (20200520)",
"poscoreMember.lastModifyUid.simpleUser.desc": "Joseph Chui",
"iRev": 3,
"id": 16,
"lastModifyDate": "2020-08-11 11:17:23",
"displayName__lang": "Mr. Chan Sing"
}
]
}
# 读取会员
# 一、接口描述
用于读取【会员】数据
# 二、接口调用说明
1、请求说明
http://[server]/jsf/rfws/root/api/read/poscoreMember | URL |
---|---|
GET | http请求方式 |
UTF-8 | 编码类型 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | poscoreMember |
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/poscoreMember";
String param = "&menuCode=poscoreMember&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": {
"poscorememberaddress": [
{
"country": "",
"itemNo": " 1",
"beId": 1,
"shipAd2_zh-TW": "",
"shipAd1_en": "",
"province": "",
"mobileCountry": "",
"shipAd2_jp": "",
"tel": "",
"id": 18,
"shipAd1_zh-CN": "",
"shipAd4_hy": "",
"hId": 16,
"shipAd4_cth": "",
"zipcode": "",
"shipAd2_en": "",
"shipAd4_sxg": "",
"i18nField": "{\"shipAd1_en\": \"\", \"shipAd2_en\": \"\", \"shipAd3_en\": \"\", \"shipAd4_en\": \"\"}",
"shipAd3_jp": "",
"gpsLat": 0,
"shipAd1_hy": "",
"shipAd3_zh-TW": "",
"city": "",
"shipAd2_cth": "",
"iRev": 2,
"shipAd1_cth": "",
"shipAd3_sxg": "",
"shipAd4_zh-TW": "",
"ce01Module": "poscoreMember",
"shipAd3_cth": "",
"shipAd3_en": "",
"defaultVal": true,
"expired": false,
"shipAd3_zh-CN": "",
"shipAd4_zh-CN": "",
"shipAd1_sxg": "",
"shipAd4_jp": "",
"shipAd2_sxg": "",
"shipAd2_hy": "",
"man": "",
"mobile": "",
"telCountry": "",
"shipCode": "001",
"shipAd1": "",
"shipAd2": "",
"shipAd3": "",
"shipAd4": "",
"telArea": "",
"shipAd1_zh-TW": "",
"shipAd4_en": "",
"shipAd1_jp": "",
"shipAd2_zh-CN": "",
"shipAd3_hy": "",
"gpsLong": 0
}
],
"poscoreremmember": [
{
"shipRemarks_cth": "",
"pickRemarks_zh-CN": "",
"pickRemarks_sxg": "",
"remarks_en": "",
"pickRemarks_jp": "",
"iRev": 2,
"pickRemarks_hy": "",
"ce01Module": "poscoreMember",
"shipRemarks_sxg": "",
"pickRemarks": "",
"shipRemarks_en": "",
"pickRemarks_cth": "",
"id": 16,
"remarks_zh-TW": "",
"remarks_jp": "",
"hId": 16,
"pickRemarks_en": "",
"shipRemarks_zh-CN": "",
"shipRemarks_jp": "",
"pickRemarks_zh-TW": "",
"remarks_cth": "",
"remarks_hy": "",
"remarks_sxg": "",
"shipRemarks_hy": "",
"i18nField": "{\"remarks_en\": \"\", \"pickRemarks_en\": \"\", \"shipRemarks_en\": \"\"}",
"remarks_zh-CN": "",
"shipRemarks": "",
"shipRemarks_zh-TW": "",
"remarks": ""
}
],
"poscoremaincardt": [
{
"reason": "na",
"lastName_sxg": "",
"itemNo": " 1",
"idNo": "",
"expDate": 1621353600000,
"beId": 1,
"effDate": 1589904000000,
"mobileCountry": "",
"lastName_en": "Sing",
"tel": "",
"id": 13,
"cardNameId": 1,
"firstName_hy": "",
"memTypeId": 1,
"hId": 16,
"lastName_zh-TW": "",
"firstName_zh-TW": "",
"displayName_sxg": "",
"firstName": "Chan",
"i18nField": "{\"lastName_en\": \"Sing\", \"firstName_en\": \"Chan\", \"displayName_en\": \"Mr. Chan Sing\"}",
"firstName_zh-CN": "",
"lastName_cth": "",
"displayName_jp": "",
"invalid": false,
"displayName_cth": "",
"isAutoGraded": false,
"lastName_hy": "",
"lastName_zh-CN": "",
"lastName": "Sing",
"firstName_jp": "",
"code": "GE900001",
"firstName_sxg": "",
"displayName": "Mr. Chan Sing",
"iRev": 2,
"displayName_hy": "",
"titleCode": "mr",
"firstName_cth": "",
"displayName_zh-TW": "",
"ce01Module": "poscoreMember",
"displayName_en": "Mr. Chan Sing",
"issueDate": 1589904000000,
"firstName_en": "Chan",
"displayName_zh-CN": "",
"cardType": 1,
"mobile": "",
"invalidDate": -2209017600000,
"telCountry": "",
"lastName_jp": "",
"telArea": ""
}
],
"poscoremember": [
{
"useAccess": false,
"expiredDate": -2209017600000,
"sysJson": "",
"viewCode": "",
"idNo": "",
"shipAd1_en": "",
"mobileCountry": "",
"dayOfBirth": 1,
"shipAd2_jp": "",
"useAccessBl": false,
"tel": "",
"id": 16,
"lastModifyDate": 1597115843000,
"shipAd1_zh-CN": "",
"createUid": 23,
"yearOfBirth": 1962,
"cDate": 1589904000000,
"shipAd4_cth": "",
"udfATupdateAccess": false,
"printed": false,
"i18nField": "{\"shipAd1_en\": \"\", \"shipAd2_en\": \"\", \"shipAd3_en\": \"\", \"shipAd4_en\": \"\", \"lastName_en\": \"Sing\", \"firstName_en\": \"Chan\", \"displayName_en\": \"Mr. Chan Sing\", \"displayName_jp\": \"\", \"displayName_zh-CN\": \"\", \"pmpcoreMemJoinBy_en\": \"\", \"pmpcoreMemReferBy_en\": \"\"}",
"lastName_cth": "",
"displayName_jp": "",
"displayName_cth": "",
"shipAd3_zh-TW": "",
"status": "N",
"lastName_hy": "",
"lastName_zh-CN": "",
"lastName": "Sing",
"firstName_jp": "",
"gender": "male",
"shipAd2_cth": "",
"displayName": "Mr. Chan Sing",
"iRev": 3,
"shipAd3_sxg": "",
"shipAd4_zh-TW": "",
"displayName_hy": "",
"monthOfBirth": 1,
"firstName_cth": "",
"displayName_zh-TW": "",
"shipAd3_en": "",
"shipAd4_zh-CN": "",
"shipAd1_sxg": "",
"shipAd4_jp": "",
"shipAd2_hy": "",
"man": "",
"statusModifyDate": 1589943397000,
"email": "",
"createDate": 1589943397000,
"displayName_zh-CN": "",
"udf1": "",
"useAccessWl": false,
"telCountry": "",
"shipAd1": "",
"shipAd2": "",
"shipAd3": "",
"shipAd4": "",
"shipAd1_jp": "",
"useAccessAutoCalc": false,
"lastModifyUid": 5,
"lastName_sxg": "",
"beId": 1,
"shipAd2_zh-TW": "",
"receivePM": false,
"udfATREGION": 0,
"lastName_en": "Sing",
"shopId": 1,
"locked": false,
"firstName_hy": "",
"shipAd4_hy": "",
"lastApproveUid": 0,
"udfATJEIEN011": 0,
"lastName_zh-TW": "",
"firstName_zh-TW": "",
"expiredUid": 0,
"displayName_sxg": "",
"firstName": "Chan",
"shipAd2_en": "",
"shipAd4_sxg": "",
"firstName_zh-CN": "",
"shipAd3_jp": "",
"shipAd1_hy": "",
"attachmentNo": 0,
"code": "20200520",
"firstName_sxg": "",
"memberTypeId": 1,
"shipAd1_cth": "",
"titleCode": "mr",
"shipAd3_cth": "",
"expired": false,
"shipAd3_zh-CN": "",
"displayName_en": "Mr. Chan Sing",
"cordchat": "",
"printCount": 0,
"shipAd2_sxg": "",
"firstName_en": "Chan",
"mobile": "",
"lastName_jp": "",
"telArea": "",
"regionId": 8,
"shipAd1_zh-TW": "",
"shipAd4_en": "",
"shipAd2_zh-CN": "",
"shipAd3_hy": "",
"udfATattSetId": 0
}
]
},
"messages": [],
"status": true
}
# 保存会员
# 一、接口描述
用于新增【会员】
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/save/poscoreMember |
---|---|
http请求方式 | PUT |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | poscoreMember |
param | String(Query) | 否 | 额外的系统参数;JSON字符串 |
3、请求示例
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/poscoreMember";
String param = "&menuCode=poscoreMember";
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格式数据如下:
{
"poscoremaincardt": {
"values": [
{
"effDate": "20220401",
"expDate": "20230330",
"memTypeId": 50
}
]
},
"poscoremember": {
"values": [
{
"beId": 1,
"cDate": "20220401",
"regionId": 91,
"desc": "20220401"
}
]
}
}
4、返回示例
{
"recordId": 1784,
"messages": [],
"status": true
}
{
"recordId": 0,
"messages": [
{
"msgDetail": "必填项为空",
"msgCode": "core_101905"
}
],
"status": false
}
# 删除会员
# 一、接口描述
用于删除会员
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/delete/poscoreMember |
---|---|
http请求方式 | DELETE |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | poscoreMember |
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_monthOfBirth": "April",
"MAIN_A_mobile": "92890973",
"MAIN_A_code": "LH2201",
"MAIN_A_id": "194",
"aiM18ReservedCol_dataIndex": 1,
"MAIN_A_tel": "",
"MAIN_A_dayOfBirth": "5",
"MAIN_A_titleCode": "Miss",
"MAIN_A_receivePM": "No",
"MAIN_A_shipAd2": "荃灣永順街49號",
"MAIN_A_shipAd1": "香港新界",
"MAIN_A_lastName": "Lee",
"MAIN_A_shipAd4": "10樓",
"MAIN_A_shipAd3": "環宇海灣3座",
"MAIN_A_cDate": "2021 Dec 14",
"MAIN_A_idNo": "2362817823",
"MAIN_A_email": "lpy0821C@hotmail.com",
"MAIN_A_firstName": "Pui Ying"
}
]
}
# 店叫货单
# 获取店叫货单列表
# 一、接口描述
用于获取店叫货单列表(同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) | 是 | poscoreTransRequest |
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=poscoreTransRequest&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": "poscoreTransRequest",
"size": 1,
"stSearchDisplay": "Shop Stock Request",
"values": [
{
"tDate": "2022-03-31",
"code": "220270SSREQ",
"st_id": 39,
"st_code": "220270SSREQ",
"poscoreTransRequest.lastModifyUid.simpleUser.desc": "Joseph Chui",
"st_desc": "220270SSREQ",
"iRev": 3,
"id": 39,
"lastModifyDate": "2022-03-31 16:17:55"
}
]
}
# 读取店叫货单
# 一、接口描述
用于读取【店叫货单】数据
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/read/poscoreTransRequest |
---|---|
http请求方式 | GET |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | poscoreTransRequest |
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/poscoreTransRequest";
String param = "&menuCode=poscoreTransRequest&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": {
"poscoretransrequestt": [
{
"sourceId": 0,
"dDesc_hy": "",
"bDesc_sxg": "",
"poscoreDesc_jp": "",
"dualQty": 10,
"bDesc_jp": "",
"dDesc_sxg": "",
"costAmt": 0,
"dDesc_jp": "",
"iRev": 3,
"bDesc_hy": "",
"itemNo": " 1",
"dDesc_zh-CN": "",
"poscoreDesc_zh-CN": "",
"poscoreDesc_hy": "",
"ce01Module": "poscoreTransRequest",
"beId": 1,
"lot": "A",
"dDesc_cth": "",
"dDesc_zh-TW": "",
"bDesc": "P20220324 Brief Description",
"bDesc_zh-TW": "",
"newLotno": 0,
"unitId": 7034,
"id": 87,
"locId": 16,
"bDesc_cth": "",
"poscoreDesc_sxg": "",
"poscoreDesc": "",
"hId": 39,
"bDesc_en": "P20220324 Brief Description",
"poscoreDesc_en": "",
"poscoreDesc_zh-TW": "",
"dDesc_en": "<p>P20220324 Detailed Description<br></p>",
"completed": false,
"poscoreDesc_cth": "",
"dualUnitId": 6280,
"sourceLot": "",
"dDesc": "<p>P20220324 Detailed Description<br></p>",
"footerKey": " 1",
"i18nField": "{\"bDesc_en\": \"P20220324 Brief Description\", \"dDesc_en\": \"<p>P20220324 Detailed Description<br></p>\", \"poscoreDesc_en\": \"\"}",
"sourceType": "pro",
"proId": 6334,
"qty": 10,
"lotNoId": 0,
"bDesc_zh-CN": ""
}
],
"poscoretransrequest": [
{
"tDate": 1648656000000,
"attachmentNo": 0,
"lastModifyUid": 5,
"code": "220270SSREQ",
"cnDeptId": 204,
"useAccess": false,
"virDeptId": 4,
"expiredDate": -2209017600000,
"iRev": 3,
"sysJson": "{}",
"upOrigin": "PRO",
"viewCode": "poscoreTransRequest",
"ce01Module": "poscoreTransRequest",
"beId": 1,
"expired": false,
"printCount": 0,
"useAccessBl": false,
"id": 39,
"doctypeId": 1,
"shopId": 1,
"statusModifyDate": 1648714495000,
"locked": false,
"lastModifyDate": 1648714675000,
"createUid": 5,
"createDate": 1648714495000,
"rev": "3",
"lastApproveUid": 5,
"completed": false,
"expiredUid": 0,
"useAccessWl": false,
"descOrigin": "PRO",
"flowTypeId": 86,
"useAccessAutoCalc": false,
"staffId": 4,
"status": "Y"
}
],
"poscoreremtransrequest": [
{
"remarks_jp": "",
"hId": 39,
"remarks_en": "",
"iRev": 3,
"ce01Module": "poscoreTransRequest",
"remarks_cth": "",
"remarks_hy": "",
"remarks_sxg": "",
"i18nField": "{\"remarks_en\": \"\"}",
"remarks_zh-CN": "",
"id": 39,
"remarks_zh-TW": "",
"remarks": ""
}
]
},
"messages": [],
"status": true
}
# 保存店叫货单
# 一、接口描述
用于新增【店叫货单】
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/save/poscoreTransRequest |
---|---|
http请求方式 | PUT |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | poscoreTransRequest |
param | String(Query) | 否 | 额外的系统参数;JSON字符串 |
3、请求示例
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/poscoreTransRequest";
String param = "&menuCode=poscoreTransRequest";
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格式数据如下:
{
"poscoretransrequestt": {
"values": [
{
"sourceType": "pro",
"proId": 84,
"qty": 1,
"unitId": 120
}
]
},
"poscoretransrequest": {
"values": [
{
"beId": 1,
"tDate": "2022-04-15",
"virDeptId": 17,
"shopId": 1,
"flowTypeId": 54,
"staffId": 823
}
]
}
}
4、返回示例
{
"recordId": 41,
"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/poscoreTransRequest |
---|---|
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/poscoreTransRequest";
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数据示例
{
"shopCode": "KL01",
"poscoretransrequestt": [
{
"proCode": "0037",
"sourceType": "pro",
"unitCode": "PCS",
"qty": 1
}
],
"staffCode": "0001",
"flowTypeCode": "ALL",
"beCode": "JC-AA",
"virDeptCode": "1010"
}
4、返回示例
{
"tranId": 40,
"tranCode": "TR22040002",
"message": "",
"status": true
}
# 删除店叫货单
# 一、接口描述
用于删除店叫货单
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/delete/poscoreTransRequest |
---|---|
http请求方式 | DELETE |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | poscoreTransRequest |
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/poscoreTransRequest";
String param = "&menuCode=poscoreTransRequest&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
}
# 店收货单
# 获取店收货单列表
# 一、接口描述
用于获取店收货单列表(同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) | 是 | poscoreShopStkRec |
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=poscoreTransRequest&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": "poscoreShopStkRec",
"size": 1,
"stSearchDisplay": "Shop Stock Receipt",
"values": [
{
"tDate": "2022-03-31",
"code": "220270SSREC",
"st_id": 47,
"st_code": "220270SSREC",
"st_desc": "220270SSREC",
"iRev": 1,
"id": 47,
"poscoreShopStkRec.lastModifyUid.simpleUser.desc": "Joseph Chui",
"lastModifyDate": "2022-03-31 16:30:18"
}
]
}
# 读取店收货单
# 一、接口描述
用于读取【店收货单】数据
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/read/poscoreShopStkRec |
---|---|
http请求方式 | GET |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | poscoreShopStkRec |
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/poscoreShopStkRec";
String param = "&menuCode=poscoreShopStkRec&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": {
"poscoremainshopstkrec": [
{
"tDate": 1648656000000,
"attachmentNo": 0,
"lastModifyUid": 5,
"code": "220270SSREC",
"cnDeptId": 204,
"useAccess": false,
"virDeptId": 4,
"expiredDate": -2209017600000,
"iRev": 1,
"sysJson": "",
"upOrigin": "PRO",
"viewCode": "poscoreShopStkRec",
"ce01Module": "poscoreShopStkRec",
"beId": 1,
"expired": false,
"stkjlId": 0,
"printCount": 0,
"useAccessBl": false,
"id": 47,
"doctypeId": 1,
"shopId": 1,
"statusModifyDate": 1648715418000,
"locked": false,
"lastModifyDate": 1648715418000,
"createUid": 5,
"createDate": 1648715418000,
"rev": "1",
"lastApproveUid": 5,
"expiredUid": 0,
"useAccessWl": false,
"accdfsId": 0,
"descOrigin": "PRO",
"flowTypeId": 86,
"useAccessAutoCalc": false,
"staffId": 4,
"status": "Y"
}
],
"poscoreremshopstkrec": [
{
"remarks_jp": "",
"hId": 47,
"remarks_en": "",
"iRev": 1,
"ce01Module": "poscoreShopStkRec",
"remarks_cth": "",
"remarks_hy": "",
"remarks_sxg": "",
"i18nField": "{\"remarks_en\": \"\"}",
"remarks_zh-CN": "",
"id": 47,
"remarks_zh-TW": "",
"remarks": ""
}
],
"poscoreshopstkrect": [
{
"sourceId": 47,
"dDesc_hy": "",
"poscoreDesc_jp": "",
"dualQty": 0,
"bDesc_hy": "",
"itemNo": " 1",
"beId": 1,
"alocId": 16,
"bDesc": "P20220324 Brief Description",
"bDesc_zh-TW": "",
"newLotno": 0,
"id": 127,
"shopId": 0,
"poscoreDesc_sxg": "",
"hId": 47,
"dDesc": "<p>P20220324 Detailed Description<br></p>",
"footerKey": " 1",
"i18nField": "{\"bDesc_en\": \"P20220324 Brief Description\", \"dDesc_en\": \"<p>P20220324 Detailed Description<br></p>\", \"poscoreDesc_en\": \"\"}",
"sourceType": "poscoreShopTransNote",
"transQty": 10,
"qty": 10,
"lotNoId": 0,
"bDesc_sxg": "",
"bDesc_jp": "",
"dDesc_sxg": "",
"costAmt": 100,
"dDesc_jp": "",
"iRev": 1,
"dDesc_zh-CN": "",
"poscoreDesc_zh-CN": "",
"poscoreDesc_hy": "",
"ce01Module": "poscoreShopStkRec",
"lot": "A",
"dDesc_cth": "",
"dDesc_zh-TW": "",
"unitId": 7034,
"locId": 61,
"bDesc_cth": "",
"poscoreDesc": "",
"bDesc_en": "P20220324 Brief Description",
"poscoreDesc_en": "",
"poscoreDesc_zh-TW": "",
"dDesc_en": "<p>P20220324 Detailed Description<br></p>",
"poscoreDesc_cth": "",
"dualUnitId": 6280,
"confirm": false,
"sourceLot": "A",
"proId": 6334,
"bDesc_zh-CN": ""
}
],
"poscoreshopstkrectlot": [
{
"lotnoNumAttr17": 0,
"lotnoNumAttr16": 0,
"lotnoNumAttr15": 0,
"lotnoNumAttr14": 0,
"lotnoNumAttr19": 0,
"lotnoNumAttr18": 0,
"lotnoLookupAttr20": 0,
"lotnoNumAttr13": 0,
"lotnoNumAttr12": 0,
"lotnoNumAttr11": 0,
"lotnoNumAttr10": 0,
"lotnoLookupAttr16": 0,
"alocId": 16,
"lotnoLookupAttr17": 0,
"lotnoLookupAttr14": 0,
"lotnoLookupAttr15": 0,
"lotnoLookupAttr18": 0,
"lotnoLookupAttr19": 0,
"newLotno": 0,
"lotnoLot": "A",
"id": 146,
"lotnoNumAttr20": 0,
"lotnoLookupAttr12": 0,
"lotnoLookupAttr13": 0,
"lotnoLookupAttr10": 0,
"lotnoLookupAttr11": 0,
"iRev": 1,
"ce01Module": "poscoreShopStkRec",
"lotnoDateAttr3": -2209017600000,
"lotnoDateAttr4": -2209017600000,
"lotnoDateAttr1": 1645977600000,
"lotnoDateAttr2": -2209017600000,
"lotnoDateAttr7": -2209017600000,
"lotnoDateAttr8": -2209017600000,
"lotnoDateAttr5": -2209017600000,
"lotnoDateAttr6": -2209017600000,
"unitId": 7034,
"lotnoDateAttr9": -2209017600000,
"locId": 61,
"lotnoTextAttr1": "G01",
"lotnoTextAttr2": "",
"lotnoTextAttr3": "",
"lotnoTextAttr4": "",
"lotnoTextAttr5": "",
"lotnoTextAttr6": "",
"lotnoTextAttr7": "",
"lotnoTextAttr8": "",
"lotnoTextAttr9": "",
"dualQty": 0,
"itemNo": " 1",
"hId": 47,
"lotnoNumAttr1": 10,
"lotnoNumAttr2": 0,
"lotnoNumAttr3": 0,
"lotnoNumAttr4": 0,
"lotnoExpDate": 1738512000000,
"footerKey": " 1",
"qty": 10,
"lotnoNumAttr5": 0,
"lotnoNumAttr6": 0,
"lotnoNumAttr7": 0,
"lotnoNumAttr8": 0,
"lotnoNumAttr9": 0,
"lotNoId": 8845,
"lotnoTextAttr16": "",
"lotnoTextAttr15": "",
"lotnoTextAttr18": "",
"lotnoTextAttr17": "",
"lotnoTextAttr12": "",
"lotnoTextAttr11": "",
"lotnoDateAttr20": -2209017600000,
"lotnoTextAttr14": "",
"lotnoTextAttr13": "",
"lotnoTextAttr19": "",
"lotnoTextAttr10": "",
"dualUnitId": 6280,
"lotnoLookupAttr5": 0,
"lotnoLookupAttr6": 0,
"lotnoLookupAttr7": 0,
"lotnoDateAttr18": -2209017600000,
"lotnoLookupAttr8": 0,
"lotnoDateAttr19": -2209017600000,
"lotno": "L12",
"lotnoLookupAttr9": 0,
"proId": 6334,
"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
}
]
},
"messages": [],
"status": true
}
# 保存店收货单
# 一、接口描述
用于新增【店收货单】
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/save/poscoreShopStkRec |
---|---|
http请求方式 | PUT |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | poscoreShopStkRec |
param | String(Query) | 否 | 额外的系统参数;JSON字符串 |
3、请求示例
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/poscoreShopStkRec";
String param = "&menuCode=poscoreShopStkRec";
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格式数据如下:
{
"poscoremainshopstkrec": {
"values": [
{
"beId": 1,
"tDate": "2022-04-15",
"virDeptId": 17,
"shopId": 1,
"flowTypeId": 54,
"staffId": 823
}
]
},
"poscoreshopstkrect": {
"values": [
{
"alocId": 16,
"sourceType": "pro",
"proId": 84,
"qty": 1,
"unitId": 120,
"locId": 76
}
]
}
}
4、返回示例
{
"recordId": 49,
"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/poscoreShopStkRec |
---|---|
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/poscoreTransRequest";
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数据示例
{
"shopCode": "KL01",
"staffCode": "0001",
"flowTypeCode": "ALL",
"beCode": "JC-AA",
"virDeptCode": "1010",
"poscoreshopstkrect": [
{
"locCode": "01",
"proCode": "0037",
"sourceType": "pro",
"unitCode": "PCS",
"qty": 1,
"alocCode": "KLSW01"
}
]
}
4、返回示例
{
"tranId": 50,
"tranCode": "TR22040002",
"message": "",
"status": true
}
# 删除店收货单
# 一、接口描述
用于删除店收货单
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/delete/poscoreShopStkRec |
---|---|
http请求方式 | DELETE |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | poscoreShopStkRec |
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/poscoreTransRequest";
String param = "&menuCode=poscoreTransRequest&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
}
# 店叫退单
# 获取店叫退单列表
# 一、接口描述
用于获取店叫退单列表(同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) | 是 | poscoreReturnRequest |
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=poscoreReturnRequest&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": "poscoreReturnRequest",
"size": 1,
"stSearchDisplay": "Shop Return Request",
"values": [
{
"tDate": "2022-03-31",
"poscoreReturnRequest.lastModifyUid.simpleUser.desc": "Joseph Chui",
"code": "220270SRETR",
"st_id": 11,
"st_code": "220270SRETR",
"st_desc": "220270SRETR",
"iRev": 1,
"id": 11,
"lastModifyDate": "2022-03-31 16:36:19"
}
]
}
# 读取店叫退单
# 一、接口描述
用于读取【店叫退单】数据
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/read/poscoreReturnRequest |
---|---|
http请求方式 | GET |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | poscoreReturnRequest |
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/poscoreReturnRequest";
String param = "&menuCode=poscoreReturnRequest&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": {
"poscorereturnrequestt": [
{
"sourceId": 0,
"dDesc_hy": "",
"bDesc_sxg": "",
"poscoreDesc_jp": "",
"dualQty": 5,
"bDesc_jp": "",
"dDesc_sxg": "",
"costAmt": 0,
"dDesc_jp": "",
"iRev": 1,
"bDesc_hy": "",
"itemNo": " 1",
"dDesc_zh-CN": "",
"poscoreDesc_zh-CN": "",
"poscoreDesc_hy": "",
"ce01Module": "poscoreReturnRequest",
"beId": 1,
"lot": "A",
"dDesc_cth": "",
"dDesc_zh-TW": "",
"bDesc": "P20220324 Brief Description",
"bDesc_zh-TW": "",
"newLotno": 0,
"unitId": 7034,
"id": 13,
"locId": 16,
"bDesc_cth": "",
"poscoreDesc_sxg": "",
"poscoreDesc": "",
"hId": 11,
"bDesc_en": "P20220324 Brief Description",
"poscoreDesc_en": "",
"poscoreDesc_zh-TW": "",
"dDesc_en": "<p>P20220324 Detailed Description<br></p>",
"completed": false,
"poscoreDesc_cth": "",
"dualUnitId": 6280,
"sourceLot": "",
"dDesc": "<p>P20220324 Detailed Description<br></p>",
"footerKey": " 1",
"i18nField": "{\"bDesc_en\": \"P20220324 Brief Description\", \"dDesc_en\": \"<p>P20220324 Detailed Description<br></p>\", \"poscoreDesc_en\": \"\"}",
"sourceType": "pro",
"proId": 6334,
"qty": 5,
"lotNoId": 0,
"bDesc_zh-CN": ""
}
],
"poscorereturnrequest": [
{
"tDate": 1648656000000,
"attachmentNo": 0,
"lastModifyUid": 5,
"code": "220270SRETR",
"cnDeptId": 0,
"useAccess": false,
"virDeptId": 4,
"expiredDate": -2209017600000,
"iRev": 1,
"sysJson": "",
"upOrigin": "PRO",
"viewCode": "poscoreReturnRequest",
"ce01Module": "poscoreReturnRequest",
"beId": 1,
"expired": false,
"printCount": 0,
"useAccessBl": false,
"id": 11,
"doctypeId": 0,
"shopId": 1,
"statusModifyDate": 1648715779000,
"locked": false,
"lastModifyDate": 1648715779000,
"createUid": 5,
"createDate": 1648715779000,
"rev": "1",
"lastApproveUid": 5,
"completed": false,
"expiredUid": 0,
"useAccessWl": false,
"descOrigin": "PRO",
"flowTypeId": 86,
"useAccessAutoCalc": false,
"staffId": 4,
"status": "Y"
}
],
"poscoreremreturnrequest": [
{
"remarks_jp": "",
"hId": 11,
"remarks_en": "",
"iRev": 1,
"ce01Module": "poscoreReturnRequest",
"remarks_cth": "",
"remarks_hy": "",
"remarks_sxg": "",
"i18nField": "{\"remarks_en\": \"\"}",
"remarks_zh-CN": "",
"id": 11,
"remarks_zh-TW": "",
"remarks": ""
}
]
},
"messages": [],
"status": true
}
# 保存店叫退单
# 一、接口描述
用于新增【店叫退单】
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/save/poscoreReturnRequest |
---|---|
http请求方式 | PUT |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | poscoreReturnRequest |
param | String(Query) | 否 | 额外的系统参数;JSON字符串 |
3、请求示例
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/poscoreReturnRequest";
String param = "&menuCode=poscoreReturnRequest";
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格式数据如下:
{
"poscorereturnrequestt": {
"values": [
{
"sourceType": "pro",
"proId": 84,
"qty": 1,
"unitId": 120
}
]
},
"poscorereturnrequest": {
"values": [
{
"beId": 1,
"tDate": "2022-04-15",
"virDeptId": 17,
"shopId": 1,
"flowTypeId": 54,
"staffId": 823
}
]
}
}
4、返回示例
{
"recordId": 49,
"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/poscoreReturnRequest |
---|---|
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/poscoreReturnRequest";
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数据示例
{
"shopCode": "KL01",
"staffCode": "0001",
"poscorereturnrequestt": [
{
"proCode": "0037",
"sourceType": "pro",
"unitCode": "PCS",
"qty": 1
}
],
"flowTypeCode": "ALL",
"beCode": "JC-AA",
"virDeptCode": "1010"
}
4、返回示例
{
"tranId": 13,
"tranCode": "RR22040001",
"message": "",
"status": true
}
# 删除店叫退单
# 一、接口描述
用于删除店叫退单
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/delete/poscoreReturnRequest |
---|---|
http请求方式 | DELETE |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | poscoreReturnRequest |
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/poscoreReturnRequest";
String param = "&menuCode=poscoreReturnRequest&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
}
# 店退货单
# 获取店退货单列表
# 一、接口描述
用于获取店退货单列表(同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) | 是 | poscoreShopStkReturn |
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=poscoreShopStkReturn&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": "poscoreShopStkReturn",
"size": 1,
"stSearchDisplay": "Shop Stock Return",
"values": [
{
"tDate": "2022-03-31",
"code": "220270SSRET",
"st_id": 7,
"st_code": "220270SSRET",
"st_desc": "220270SSRET",
"poscoreShopStkReturn.lastModifyUid.simpleUser.desc": "Joseph Chui",
"iRev": 1,
"id": 7,
"lastModifyDate": "2022-03-31 16:37:18"
}
]
}
# 读取店退货单
# 一、接口描述
用于读取【店退货单】数据
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/read/poscoreShopStkReturn |
---|---|
http请求方式 | GET |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | poscoreShopStkReturn |
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/poscoreShopStkReturn";
String param = "&menuCode=poscoreShopStkReturn&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": {
"poscoremainshopstkreturn": [
{
"tDate": 1648656000000,
"attachmentNo": 0,
"lastModifyUid": 5,
"code": "220270SSRET",
"cnDeptId": 0,
"useAccess": false,
"virDeptId": 4,
"expiredDate": -2209017600000,
"iRev": 1,
"sysJson": "",
"upOrigin": "PRO",
"viewCode": "poscoreShopStkReturn",
"ce01Module": "poscoreShopStkReturn",
"beId": 1,
"expired": false,
"stkjlId": 0,
"printCount": 0,
"useAccessBl": false,
"id": 7,
"doctypeId": 0,
"shopId": 1,
"statusModifyDate": 1648715838000,
"locked": false,
"lastModifyDate": 1648715838000,
"createUid": 5,
"createDate": 1648715838000,
"rev": "1",
"lastApproveUid": 5,
"completed": false,
"expiredUid": 0,
"useAccessWl": false,
"accdfsId": 0,
"descOrigin": "PRO",
"flowTypeId": 86,
"useAccessAutoCalc": false,
"staffId": 4,
"status": "Y"
}
],
"poscoreremshopstkreturn": [
{
"remarks_jp": "",
"hId": 7,
"remarks_en": "",
"iRev": 1,
"ce01Module": "poscoreShopStkReturn",
"remarks_cth": "",
"remarks_hy": "",
"remarks_sxg": "",
"i18nField": "{\"remarks_en\": \"\"}",
"remarks_zh-CN": "",
"id": 7,
"remarks_zh-TW": "",
"remarks": ""
}
],
"poscoreshopstkreturnt": [
{
"sourceId": 0,
"dDesc_hy": "",
"bDesc_sxg": "",
"poscoreDesc_jp": "",
"dualQty": 1,
"bDesc_jp": "",
"dDesc_sxg": "",
"costAmt": 10,
"dDesc_jp": "",
"iRev": 1,
"bDesc_hy": "",
"itemNo": " 1",
"dDesc_zh-CN": "",
"poscoreDesc_zh-CN": "",
"poscoreDesc_hy": "",
"ce01Module": "poscoreShopStkReturn",
"beId": 1,
"lot": "A",
"dDesc_cth": "",
"alocId": 61,
"dDesc_zh-TW": "",
"bDesc": "P20220324 Brief Description",
"bDesc_zh-TW": "",
"newLotno": 0,
"unitId": 7034,
"id": 8,
"locId": 16,
"bDesc_cth": "",
"poscoreDesc_sxg": "",
"poscoreDesc": "",
"hId": 7,
"bDesc_en": "P20220324 Brief Description",
"poscoreDesc_en": "",
"poscoreDesc_zh-TW": "",
"dDesc_en": "<p>P20220324 Detailed Description<br></p>",
"completed": false,
"poscoreDesc_cth": "",
"dualUnitId": 6280,
"sourceLot": "",
"dDesc": "<p>P20220324 Detailed Description<br></p>",
"footerKey": " 1",
"i18nField": "{\"bDesc_en\": \"P20220324 Brief Description\", \"dDesc_en\": \"<p>P20220324 Detailed Description<br></p>\", \"poscoreDesc_en\": \"\"}",
"sourceType": "pro",
"proId": 6334,
"qty": 1,
"lotNoId": 0,
"bDesc_zh-CN": ""
}
],
"poscoreshopstkreturntlot": [
{
"lotnoNumAttr17": 0,
"lotnoNumAttr16": 0,
"lotnoNumAttr15": 0,
"lotnoNumAttr14": 0,
"lotnoNumAttr19": 0,
"lotnoNumAttr18": 0,
"lotnoLookupAttr20": 0,
"lotnoNumAttr13": 0,
"lotnoNumAttr12": 0,
"lotnoNumAttr11": 0,
"lotnoNumAttr10": 0,
"lotnoLookupAttr16": 0,
"alocId": 61,
"lotnoLookupAttr17": 0,
"lotnoLookupAttr14": 0,
"lotnoLookupAttr15": 0,
"lotnoLookupAttr18": 0,
"lotnoLookupAttr19": 0,
"newLotno": 0,
"lotnoLot": "A",
"id": 7,
"lotnoNumAttr20": 0,
"lotnoLookupAttr12": 0,
"lotnoLookupAttr13": 0,
"lotnoLookupAttr10": 0,
"lotnoLookupAttr11": 0,
"iRev": 1,
"ce01Module": "poscoreShopStkReturn",
"lotnoDateAttr3": -2209017600000,
"lotnoDateAttr4": -2209017600000,
"lotnoDateAttr1": 1645977600000,
"lotnoDateAttr2": -2209017600000,
"lotnoDateAttr7": -2209017600000,
"lotnoDateAttr8": -2209017600000,
"lotnoDateAttr5": -2209017600000,
"lotnoDateAttr6": -2209017600000,
"unitId": 7034,
"lotnoDateAttr9": -2209017600000,
"locId": 16,
"lotnoTextAttr1": "G01",
"lotnoTextAttr2": "",
"lotnoTextAttr3": "",
"lotnoTextAttr4": "",
"lotnoTextAttr5": "",
"lotnoTextAttr6": "",
"lotnoTextAttr7": "",
"lotnoTextAttr8": "",
"lotnoTextAttr9": "",
"dualQty": 1,
"itemNo": " 1",
"hId": 7,
"lotnoNumAttr1": 10,
"lotnoNumAttr2": 0,
"lotnoNumAttr3": 0,
"lotnoNumAttr4": 0,
"lotnoExpDate": 1738512000000,
"footerKey": " 1",
"qty": 1,
"lotnoNumAttr5": 0,
"lotnoNumAttr6": 0,
"lotnoNumAttr7": 0,
"lotnoNumAttr8": 0,
"lotnoNumAttr9": 0,
"lotNoId": 8845,
"lotnoTextAttr16": "",
"lotnoTextAttr15": "",
"lotnoTextAttr18": "",
"lotnoTextAttr17": "",
"lotnoTextAttr12": "",
"lotnoTextAttr11": "",
"lotnoDateAttr20": -2209017600000,
"lotnoTextAttr14": "",
"lotnoTextAttr13": "",
"lotnoTextAttr19": "",
"lotnoTextAttr10": "",
"dualUnitId": 6280,
"lotnoLookupAttr5": 0,
"lotnoLookupAttr6": 0,
"lotnoLookupAttr7": 0,
"lotnoDateAttr18": -2209017600000,
"lotnoLookupAttr8": 0,
"lotnoDateAttr19": -2209017600000,
"lotno": "L12",
"lotnoLookupAttr9": 0,
"proId": 6334,
"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
}
]
},
"messages": [],
"status": true
}
# 保存店退货单
# 一、接口描述
用于新增【店退货单】
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/save/poscoreShopStkReturn |
---|---|
http请求方式 | PUT |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | poscoreShopStkReturn |
param | String(Query) | 否 | 额外的系统参数;JSON字符串 |
3、请求示例
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/poscoreShopStkReturn";
String param = "&menuCode=poscoreShopStkReturn";
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格式数据如下:
{
"poscoremainshopstkreturn": {
"values": [
{
"beId": 1,
"tDate": "2022-04-15",
"virDeptId": 17,
"shopId": 1,
"flowTypeId": 54,
"staffId": 823
}
]
},
"poscoreshopstkreturnt": {
"values": [
{
"sourceType": "pro",
"proId": 84,
"qty": 1,
"unitId": 120,
"locId": 16
}
]
}
}
4、返回示例
{
"recordId": 11,
"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/poscoreShopStkReturn |
---|---|
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/poscoreShopStkReturn";
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数据示例
{
"shopCode": "KL01",
"poscoreshopstkreturnt": [
{
"proCode": "0037",
"sourceType": "pro",
"unitCode": "PCS",
"qty": 1
}
],
"staffCode": "0001",
"flowTypeCode": "ALL",
"beCode": "JC-AA",
"virDeptCode": "1010"
}
4、返回示例
{
"tranId": 50,
"tranCode": "TR22040002",
"message": "",
"status": true
}
# 删除店退货单
# 一、接口描述
用于删除店退货单
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/delete/poscoreShopStkReturn |
---|---|
http请求方式 | DELETE |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | poscoreShopStkReturn |
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/poscoreShopStkReturn";
String param = "&menuCode=poscoreShopStkReturn&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
}
# 货回仓单
# 获取货回仓单列表
# 一、接口描述
用于获取货回仓单列表(同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) | 是 | poscoreShopReturnNote |
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=poscoreShopReturnNote&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": "poscoreShopReturnNote",
"size": 1,
"stSearchDisplay": "Stock Return Receipt",
"values": [
{
"tDate": "2022-03-31",
"code": "220270SRETRE",
"st_id": 22,
"st_code": "220270SRETRE",
"st_desc": "220270SRETRE",
"poscoreShopReturnNote.lastModifyUid.simpleUser.desc": "Joseph Chui",
"iRev": 1,
"id": 22,
"lastModifyDate": "2022-03-31 16:38:35"
}
]
}
# 读取货回仓单
# 一、接口描述
用于读取【货回仓单】数据
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/read/poscoreShopReturnNote |
---|---|
http请求方式 | GET |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | poscoreShopReturnNote |
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/poscoreShopReturnNote";
String param = "&menuCode=poscoreShopReturnNote&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": {
"poscoreshopreturnnote": [
{
"tDate": 1648656000000,
"attachmentNo": 0,
"lastModifyUid": 5,
"code": "220270SRETRE",
"cnDeptId": 0,
"useAccess": false,
"virDeptId": 4,
"expiredDate": -2209017600000,
"iRev": 1,
"sysJson": "",
"upOrigin": "PRO",
"viewCode": "poscoreShopReturnNote",
"ce01Module": "poscoreShopReturnNote",
"beId": 1,
"alocId": 66,
"expired": false,
"stkjlId": 0,
"printCount": 0,
"useAccessBl": false,
"id": 22,
"doctypeId": 0,
"statusModifyDate": 1648715915000,
"locked": false,
"lastModifyDate": 1648715915000,
"createUid": 5,
"createDate": 1648715915000,
"rev": "1",
"lastApproveUid": 5,
"expiredUid": 0,
"useAccessWl": false,
"accdfsId": 0,
"descOrigin": "PRO",
"flowTypeId": 86,
"useAccessAutoCalc": false,
"staffId": 4,
"status": "Y"
}
],
"poscoreshopreturnnotet": [
{
"sourceId": 11,
"dDesc_hy": "",
"poscoreDesc_jp": "",
"dualQty": 5,
"bDesc_hy": "",
"itemNo": " 1",
"beId": 1,
"alocId": 66,
"bDesc": "P20220324 Brief Description",
"bDesc_zh-TW": "",
"newLotno": 0,
"id": 32,
"shopId": 1,
"poscoreDesc_sxg": "",
"hId": 22,
"dDesc": "<p>P20220324 Detailed Description<br></p>",
"footerKey": " 1",
"i18nField": "{\"bDesc_en\": \"P20220324 Brief Description\", \"dDesc_en\": \"<p>P20220324 Detailed Description<br></p>\", \"poscoreDesc_en\": \"\"}",
"sourceType": "poscoreReturnRequest",
"qty": 5,
"lotNoId": 0,
"bDesc_sxg": "",
"bDesc_jp": "",
"dDesc_sxg": "",
"costAmt": 50,
"dDesc_jp": "",
"iRev": 1,
"dDesc_zh-CN": "",
"poscoreDesc_zh-CN": "",
"poscoreDesc_hy": "",
"ce01Module": "poscoreShopReturnNote",
"lot": "A",
"dDesc_cth": "",
"dDesc_zh-TW": "",
"unitId": 7034,
"locId": 16,
"bDesc_cth": "",
"poscoreDesc": "",
"bDesc_en": "P20220324 Brief Description",
"poscoreDesc_en": "",
"poscoreDesc_zh-TW": "",
"dDesc_en": "<p>P20220324 Detailed Description<br></p>",
"poscoreDesc_cth": "",
"dualUnitId": 6280,
"confirm": true,
"sourceLot": "A",
"reqQty": 5,
"proId": 6334,
"bDesc_zh-CN": ""
},
{
"sourceId": 7,
"dDesc_hy": "",
"poscoreDesc_jp": "",
"dualQty": 1,
"bDesc_hy": "",
"itemNo": " 2",
"beId": 1,
"alocId": 66,
"bDesc": "P20220324 Brief Description",
"bDesc_zh-TW": "",
"newLotno": 0,
"id": 33,
"shopId": 1,
"poscoreDesc_sxg": "",
"hId": 22,
"dDesc": "<p>P20220324 Detailed Description<br></p>",
"footerKey": " 2",
"i18nField": "{\"bDesc_en\": \"P20220324 Brief Description\", \"dDesc_en\": \"<p>P20220324 Detailed Description<br></p>\", \"poscoreDesc_en\": \"\"}",
"sourceType": "poscoreShopStkReturn",
"qty": 1,
"lotNoId": 0,
"bDesc_sxg": "",
"bDesc_jp": "",
"dDesc_sxg": "",
"costAmt": 10,
"dDesc_jp": "",
"iRev": 1,
"dDesc_zh-CN": "",
"poscoreDesc_zh-CN": "",
"poscoreDesc_hy": "",
"ce01Module": "poscoreShopReturnNote",
"lot": "B",
"dDesc_cth": "",
"dDesc_zh-TW": "",
"unitId": 7034,
"locId": 61,
"bDesc_cth": "",
"poscoreDesc": "",
"bDesc_en": "P20220324 Brief Description",
"poscoreDesc_en": "",
"poscoreDesc_zh-TW": "",
"dDesc_en": "<p>P20220324 Detailed Description<br></p>",
"poscoreDesc_cth": "",
"dualUnitId": 6280,
"confirm": true,
"sourceLot": "A",
"reqQty": 1,
"proId": 6334,
"bDesc_zh-CN": ""
}
],
"poscoreshopreturnnotetlot": [
{
"lotnoNumAttr17": 0,
"lotnoNumAttr16": 0,
"lotnoNumAttr15": 0,
"lotnoNumAttr14": 0,
"lotnoNumAttr19": 0,
"lotnoNumAttr18": 0,
"lotnoLookupAttr20": 0,
"lotnoNumAttr13": 0,
"lotnoNumAttr12": 0,
"lotnoNumAttr11": 0,
"lotnoNumAttr10": 0,
"lotnoLookupAttr16": 0,
"alocId": 66,
"lotnoLookupAttr17": 0,
"lotnoLookupAttr14": 0,
"lotnoLookupAttr15": 0,
"lotnoLookupAttr18": 0,
"lotnoLookupAttr19": 0,
"newLotno": 0,
"lotnoLot": "A",
"id": 15,
"lotnoNumAttr20": 0,
"lotnoLookupAttr12": 0,
"lotnoLookupAttr13": 0,
"lotnoLookupAttr10": 0,
"lotnoLookupAttr11": 0,
"iRev": 1,
"ce01Module": "poscoreShopReturnNote",
"lotnoDateAttr3": -2209017600000,
"lotnoDateAttr4": -2209017600000,
"lotnoDateAttr1": 1645977600000,
"lotnoDateAttr2": -2209017600000,
"lotnoDateAttr7": -2209017600000,
"lotnoDateAttr8": -2209017600000,
"lotnoDateAttr5": -2209017600000,
"lotnoDateAttr6": -2209017600000,
"unitId": 7034,
"lotnoDateAttr9": -2209017600000,
"locId": 61,
"lotnoTextAttr1": "G01",
"lotnoTextAttr2": "",
"lotnoTextAttr3": "",
"lotnoTextAttr4": "",
"lotnoTextAttr5": "",
"lotnoTextAttr6": "",
"lotnoTextAttr7": "",
"lotnoTextAttr8": "",
"lotnoTextAttr9": "",
"dualQty": 0,
"itemNo": " 1",
"hId": 22,
"lotnoNumAttr1": 10,
"lotnoNumAttr2": 0,
"lotnoNumAttr3": 0,
"lotnoNumAttr4": 0,
"lotnoExpDate": 1738512000000,
"footerKey": " 2",
"qty": 1,
"lotnoNumAttr5": 0,
"lotnoNumAttr6": 0,
"lotnoNumAttr7": 0,
"lotnoNumAttr8": 0,
"lotnoNumAttr9": 0,
"lotNoId": 8845,
"lotnoTextAttr16": "",
"lotnoTextAttr15": "",
"lotnoTextAttr18": "",
"lotnoTextAttr17": "",
"lotnoTextAttr12": "",
"lotnoTextAttr11": "",
"lotnoDateAttr20": -2209017600000,
"lotnoTextAttr14": "",
"lotnoTextAttr13": "",
"lotnoTextAttr19": "",
"lotnoTextAttr10": "",
"dualUnitId": 6280,
"lotnoLookupAttr5": 0,
"lotnoLookupAttr6": 0,
"lotnoLookupAttr7": 0,
"lotnoDateAttr18": -2209017600000,
"lotnoLookupAttr8": 0,
"lotnoDateAttr19": -2209017600000,
"lotno": "L12",
"lotnoLookupAttr9": 0,
"proId": 6334,
"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
},
{
"lotnoNumAttr17": 0,
"lotnoNumAttr16": 0,
"lotnoNumAttr15": 0,
"lotnoNumAttr14": 0,
"lotnoNumAttr19": 0,
"lotnoNumAttr18": 0,
"lotnoLookupAttr20": 0,
"lotnoNumAttr13": 0,
"lotnoNumAttr12": 0,
"lotnoNumAttr11": 0,
"lotnoNumAttr10": 0,
"lotnoLookupAttr16": 0,
"alocId": 66,
"lotnoLookupAttr17": 0,
"lotnoLookupAttr14": 0,
"lotnoLookupAttr15": 0,
"lotnoLookupAttr18": 0,
"lotnoLookupAttr19": 0,
"newLotno": 0,
"lotnoLot": "A",
"id": 16,
"lotnoNumAttr20": 0,
"lotnoLookupAttr12": 0,
"lotnoLookupAttr13": 0,
"lotnoLookupAttr10": 0,
"lotnoLookupAttr11": 0,
"iRev": 1,
"ce01Module": "poscoreShopReturnNote",
"lotnoDateAttr3": -2209017600000,
"lotnoDateAttr4": -2209017600000,
"lotnoDateAttr1": 1645977600000,
"lotnoDateAttr2": -2209017600000,
"lotnoDateAttr7": -2209017600000,
"lotnoDateAttr8": -2209017600000,
"lotnoDateAttr5": -2209017600000,
"lotnoDateAttr6": -2209017600000,
"unitId": 7034,
"lotnoDateAttr9": -2209017600000,
"locId": 16,
"lotnoTextAttr1": "G01",
"lotnoTextAttr2": "",
"lotnoTextAttr3": "",
"lotnoTextAttr4": "",
"lotnoTextAttr5": "",
"lotnoTextAttr6": "",
"lotnoTextAttr7": "",
"lotnoTextAttr8": "",
"lotnoTextAttr9": "",
"dualQty": 5,
"itemNo": " 2",
"hId": 22,
"lotnoNumAttr1": 10,
"lotnoNumAttr2": 0,
"lotnoNumAttr3": 0,
"lotnoNumAttr4": 0,
"lotnoExpDate": 1738512000000,
"footerKey": " 1",
"qty": 5,
"lotnoNumAttr5": 0,
"lotnoNumAttr6": 0,
"lotnoNumAttr7": 0,
"lotnoNumAttr8": 0,
"lotnoNumAttr9": 0,
"lotNoId": 8845,
"lotnoTextAttr16": "",
"lotnoTextAttr15": "",
"lotnoTextAttr18": "",
"lotnoTextAttr17": "",
"lotnoTextAttr12": "",
"lotnoTextAttr11": "",
"lotnoDateAttr20": -2209017600000,
"lotnoTextAttr14": "",
"lotnoTextAttr13": "",
"lotnoTextAttr19": "",
"lotnoTextAttr10": "",
"dualUnitId": 6280,
"lotnoLookupAttr5": 0,
"lotnoLookupAttr6": 0,
"lotnoLookupAttr7": 0,
"lotnoDateAttr18": -2209017600000,
"lotnoLookupAttr8": 0,
"lotnoDateAttr19": -2209017600000,
"lotno": "L12",
"lotnoLookupAttr9": 0,
"proId": 6334,
"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
}
],
"poscoreremshopreturnnote": [
{
"remarks_jp": "",
"hId": 22,
"remarks_en": "",
"iRev": 1,
"ce01Module": "poscoreShopReturnNote",
"remarks_cth": "",
"remarks_hy": "",
"remarks_sxg": "",
"i18nField": "{\"remarks_en\": \"\"}",
"remarks_zh-CN": "",
"id": 22,
"remarks_zh-TW": "",
"remarks": ""
}
]
},
"messages": [],
"status": true
}
# 保存货回仓单
# 一、接口描述
用于新增【货回仓单】
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/save/poscoreShopReturnNote |
---|---|
http请求方式 | PUT |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | poscoreShopReturnNote |
param | String(Query) | 否 | 额外的系统参数;JSON字符串 |
3、请求示例
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/poscoreShopReturnNote";
String param = "&menuCode=poscoreShopReturnNote";
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格式数据如下:
{
"poscoreshopreturnnote": {
"values": [
{
"beId": 1,
"tDate": "2022-04-15",
"virDeptId": 17,
"shopId": 1,
"flowTypeId": 54,
"staffId": 823
}
]
},
"poscoreshopreturnnotet": {
"values": [
{
"alocId": 66,
"sourceType": "pro",
"proId": 84,
"qty": 1,
"unitId": 120,
"locId": 16
}
]
}
}
4、返回示例
{
"recordId": 25,
"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/poscoreShopReturnNote |
---|---|
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/poscoreShopReturnNote";
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数据示例
{
"shopCode": "KL01",
"poscoreshopstkreturnt": [
{
"locCode": "KLSW01",
"proCode": "0037",
"sourceType": "pro",
"unitCode": "PCS",
"qty": 1,
"alocCode": "01"
}
],
"staffCode": "0001",
"flowTypeCode": "ALL",
"beCode": "JC-AA",
"virDeptCode": "1010"
}
4、返回示例
{
"tranId": 10,
"tranCode": "SSR22040002",
"message": "",
"status": true
}
# 删除货回仓单
# 一、接口描述
用于删除货回仓单
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/delete/poscoreShopReturnNote |
---|---|
http请求方式 | DELETE |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | poscoreShopReturnNote |
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/poscoreShopReturnNote";
String param = "&menuCode=poscoreShopReturnNote&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
}
# 店转店单
# 获取店转店单列表
# 一、接口描述
用于获取店转店单列表(同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) | 是 | poscoreShopToShop |
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=poscoreShopToShop&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": "poscoreShopToShop",
"size": 1,
"stSearchDisplay": "Shop to Shop Transfer",
"values": [
{
"tDate": "2022-03-31",
"poscoreShopToShop.lastModifyUid.simpleUser.desc": "Joseph Chui",
"code": "220270SST",
"st_id": 18,
"st_code": "220270SST",
"st_desc": "220270SST",
"iRev": 2,
"id": 18,
"lastModifyDate": "2022-03-31 16:34:11"
}
]
}
# 读取店转店单
# 一、接口描述
用于读取【店转店单】数据
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/read/poscoreShopToShop |
---|---|
http请求方式 | GET |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | poscoreShopToShop |
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/poscoreShopToShop";
String param = "&menuCode=poscoreShopToShop&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": {
"poscoreshoptoshoptlot": [
{
"lotnoNumAttr17": 0,
"lotnoNumAttr16": 0,
"lotnoNumAttr15": 0,
"lotnoNumAttr14": 0,
"lotnoNumAttr19": 0,
"lotnoNumAttr18": 0,
"lotnoLookupAttr20": 0,
"lotnoNumAttr13": 0,
"lotnoNumAttr12": 0,
"lotnoNumAttr11": 0,
"lotnoNumAttr10": 0,
"lotnoLookupAttr16": 0,
"alocId": 61,
"lotnoLookupAttr17": 0,
"lotnoLookupAttr14": 0,
"lotnoLookupAttr15": 0,
"lotnoLookupAttr18": 0,
"lotnoLookupAttr19": 0,
"newLotno": 0,
"lotnoLot": "A",
"id": 8,
"lotnoNumAttr20": 0,
"lotnoLookupAttr12": 0,
"lotnoLookupAttr13": 0,
"lotnoLookupAttr10": 0,
"lotnoLookupAttr11": 0,
"iRev": 2,
"ce01Module": "poscoreShopToShop",
"lotnoDateAttr3": -2209017600000,
"lotnoDateAttr4": -2209017600000,
"lotnoDateAttr1": 1643817600000,
"lotnoDateAttr2": -2209017600000,
"lotnoDateAttr7": -2209017600000,
"lotnoDateAttr8": -2209017600000,
"lotnoDateAttr5": -2209017600000,
"lotnoDateAttr6": -2209017600000,
"unitId": 7034,
"lotnoDateAttr9": -2209017600000,
"locId": 16,
"lotnoTextAttr1": "H02",
"lotnoTextAttr2": "",
"lotnoTextAttr3": "",
"lotnoTextAttr4": "",
"lotnoTextAttr5": "",
"lotnoTextAttr6": "",
"lotnoTextAttr7": "",
"lotnoTextAttr8": "",
"lotnoTextAttr9": "",
"dualQty": 10,
"itemNo": " 1",
"hId": 18,
"lotnoNumAttr1": 12,
"lotnoNumAttr2": 0,
"lotnoNumAttr3": 0,
"lotnoNumAttr4": 0,
"lotnoExpDate": 1744041600000,
"footerKey": " 1",
"qty": 10,
"lotnoNumAttr5": 0,
"lotnoNumAttr6": 0,
"lotnoNumAttr7": 0,
"lotnoNumAttr8": 0,
"lotnoNumAttr9": 0,
"lotNoId": 8861,
"lotnoTextAttr16": "",
"lotnoTextAttr15": "",
"lotnoTextAttr18": "",
"lotnoTextAttr17": "",
"lotnoTextAttr12": "",
"lotnoTextAttr11": "",
"lotnoDateAttr20": -2209017600000,
"lotnoTextAttr14": "",
"lotnoTextAttr13": "",
"lotnoTextAttr19": "",
"lotnoTextAttr10": "",
"dualUnitId": 6280,
"lotnoLookupAttr5": 0,
"lotnoLookupAttr6": 0,
"lotnoLookupAttr7": 0,
"lotnoDateAttr18": -2209017600000,
"lotnoLookupAttr8": 0,
"lotnoDateAttr19": -2209017600000,
"lotno": "L13",
"lotnoLookupAttr9": 0,
"proId": 6334,
"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
}
],
"poscoreshoptoshopt": [
{
"sourceId": 0,
"dDesc_hy": "",
"bDesc_sxg": "",
"poscoreDesc_jp": "",
"dualQty": 10,
"bDesc_jp": "",
"dDesc_sxg": "",
"costAmt": 100,
"dDesc_jp": "",
"iRev": 2,
"bDesc_hy": "",
"itemNo": " 1",
"dDesc_zh-CN": "",
"poscoreDesc_zh-CN": "",
"poscoreDesc_hy": "",
"ce01Module": "poscoreShopToShop",
"beId": 1,
"lot": "A",
"dDesc_cth": "",
"alocId": 61,
"dDesc_zh-TW": "",
"bDesc": "P20220324 Brief Description",
"bDesc_zh-TW": "",
"newLotno": 0,
"unitId": 7034,
"id": 21,
"shopId": 2,
"locId": 16,
"bDesc_cth": "",
"poscoreDesc_sxg": "",
"poscoreDesc": "",
"hId": 18,
"bDesc_en": "P20220324 Brief Description",
"poscoreDesc_en": "",
"poscoreDesc_zh-TW": "",
"dDesc_en": "<p>P20220324 Detailed Description<br></p>",
"completed": false,
"poscoreDesc_cth": "",
"dualUnitId": 6280,
"sourceLot": "",
"dDesc": "<p>P20220324 Detailed Description<br></p>",
"footerKey": " 1",
"i18nField": "{\"bDesc_en\": \"P20220324 Brief Description\", \"dDesc_en\": \"<p>P20220324 Detailed Description<br></p>\", \"poscoreDesc_en\": \"\"}",
"sourceType": "pro",
"proId": 6334,
"qty": 10,
"lotNoId": 0,
"bDesc_zh-CN": ""
}
],
"poscoremainshoptoshop": [
{
"tDate": 1648656000000,
"attachmentNo": 0,
"lastModifyUid": 5,
"code": "220270SST",
"cnDeptId": 0,
"useAccess": false,
"virDeptId": 4,
"expiredDate": -2209017600000,
"iRev": 2,
"sysJson": "",
"upOrigin": "PRO",
"viewCode": "poscoreShopToShop",
"ce01Module": "poscoreShopToShop",
"beId": 1,
"alocId": 61,
"expired": false,
"stkjlId": 0,
"printCount": 0,
"useAccessBl": false,
"id": 18,
"doctypeId": 1,
"shopId": 1,
"statusModifyDate": 1648715349000,
"locked": false,
"lastModifyDate": 1648715651000,
"createUid": 5,
"createDate": 1648715349000,
"rev": "2",
"lastApproveUid": 5,
"shopToId": 0,
"completed": false,
"expiredUid": 0,
"useAccessWl": false,
"accdfsId": 0,
"descOrigin": "PRO",
"flowTypeId": 86,
"useAccessAutoCalc": false,
"staffId": 4,
"status": "Y"
}
],
"poscoreremshoptoshop": [
{
"remarks_jp": "",
"hId": 18,
"remarks_en": "",
"iRev": 2,
"ce01Module": "poscoreShopToShop",
"remarks_cth": "",
"remarks_hy": "",
"remarks_sxg": "",
"i18nField": "{\"remarks_en\": \"\"}",
"remarks_zh-CN": "",
"id": 18,
"remarks_zh-TW": "",
"remarks": ""
}
]
},
"messages": [],
"status": true
}
# 保存店转店单
# 一、接口描述
用于新增【店转店单】
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/save/poscoreShopToShop |
---|---|
http请求方式 | PUT |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | poscoreShopToShop |
param | String(Query) | 否 | 额外的系统参数;JSON字符串 |
3、请求示例
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/poscoreShopToShop";
String param = "&menuCode=poscoreShopToShop";
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格式数据如下:
{
"poscoreshoptoshopt": {
"values": [
{
"alocId": 16,
"sourceType": "pro",
"proId": 84,
"qty": 1,
"unitId": 120,
"shopId": 1,
"locId": 76
}
]
},
"poscoremainshoptoshop": {
"values": [
{
"beId": 1,
"tDate": "2022-04-15",
"alocId": 16,
"virDeptId": 17,
"shopId": 2,
"flowTypeId": 54,
"staffId": 823,
"locId": 76
}
]
}
}
4、返回示例
{
"recordId": 11,
"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/poscoreShopToShop |
---|---|
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/poscoreShopToShop";
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数据示例
{
"shopCode": "KL02",
"poscoreshoptoshopt": [
{
"shopCode": "KL01",
"locCode": "KLSW01",
"proCode": "P20220324",
"sourceType": "pro",
"unitCode": "PCS",
"qty": 1
}
],
"staffCode": "0001",
"flowTypeCode": "ALL",
"beCode": "JC-AA",
"virDeptCode": "1010",
"alocCode": "01"
}
4、返回示例
{
"tranId": 50,
"tranCode": "TR22040002",
"message": "",
"status": true
}
# 删除店转店单
# 一、接口描述
用于删除店转店单
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/delete/poscoreShopToShop |
---|---|
http请求方式 | DELETE |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | poscoreShopToShop |
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/poscoreShopToShop";
String param = "&menuCode=poscoreShopToShop&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
}
# 仓转店单
# 获取仓转店单列表
# 一、接口描述
用于获取仓转店单列表(同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) | 是 | poscoreShopTransNote |
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=poscoreShopTransNote&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": "poscoreShopTransNote",
"size": 1,
"stSearchDisplay": "HQ to Shop Transfer",
"values": [
{
"tDate": "2022-03-31",
"code": "220270HQST",
"st_id": 47,
"st_code": "220270HQST",
"st_desc": "220270HQST",
"poscoreShopTransNote.lastModifyUid.simpleUser.desc": "Joseph Chui",
"iRev": 1,
"id": 47,
"lastModifyDate": "2022-03-31 16:18:41"
}
]
}
# 读取仓转店单
# 一、接口描述
用于读取【仓转店单】数据
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/read/poscoreShopTransNote |
---|---|
http请求方式 | GET |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | poscoreShopTransNote |
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/poscoreShopTransNote";
String param = "&menuCode=poscoreShopTransNote&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": {
"poscoreshoptransnote": [
{
"tDate": 1648656000000,
"attachmentNo": 0,
"lastModifyUid": 5,
"code": "220270HQST",
"cnDeptId": 204,
"useAccess": false,
"virDeptId": 4,
"expiredDate": -2209017600000,
"iRev": 1,
"sysJson": "",
"upOrigin": "PRO",
"viewCode": "poscoreShopTransNote",
"ce01Module": "poscoreShopTransNote",
"beId": 1,
"alocId": 61,
"expired": false,
"stkjlId": 0,
"printCount": 0,
"useAccessBl": false,
"id": 47,
"doctypeId": 0,
"isSpecificShop": false,
"statusModifyDate": 1648714721000,
"locked": false,
"lastModifyDate": 1648714721000,
"createUid": 5,
"locId": 0,
"createDate": 1648714721000,
"reqCondFormula": "",
"rev": "1",
"lastApproveUid": 5,
"shopToId": 0,
"completed": false,
"expiredUid": 0,
"useAccessWl": false,
"accdfsId": 0,
"descOrigin": "PRO",
"flowTypeId": 86,
"useAccessAutoCalc": false,
"staffId": 4,
"status": "Y"
}
],
"poscoreremshoptransnote": [
{
"remarks_jp": "",
"hId": 47,
"remarks_en": "",
"iRev": 1,
"ce01Module": "poscoreShopTransNote",
"remarks_cth": "",
"remarks_hy": "",
"remarks_sxg": "",
"i18nField": "{\"remarks_en\": \"\"}",
"remarks_zh-CN": "",
"id": 47,
"remarks_zh-TW": "",
"remarks": ""
}
],
"poscoreshoptransnotetlot": [
{
"lotnoNumAttr17": 0,
"lotnoNumAttr16": 0,
"lotnoNumAttr15": 0,
"lotnoNumAttr14": 0,
"lotnoNumAttr19": 0,
"lotnoNumAttr18": 0,
"lotnoLookupAttr20": 0,
"lotnoNumAttr13": 0,
"lotnoNumAttr12": 0,
"lotnoNumAttr11": 0,
"lotnoNumAttr10": 0,
"lotnoLookupAttr16": 0,
"alocId": 61,
"lotnoLookupAttr17": 0,
"lotnoLookupAttr14": 0,
"lotnoLookupAttr15": 0,
"lotnoLookupAttr18": 0,
"lotnoLookupAttr19": 0,
"newLotno": 0,
"lotnoLot": "A",
"id": 79,
"lotnoNumAttr20": 0,
"lotnoLookupAttr12": 0,
"lotnoLookupAttr13": 0,
"lotnoLookupAttr10": 0,
"lotnoLookupAttr11": 0,
"iRev": 1,
"ce01Module": "poscoreShopTransNote",
"lotnoDateAttr3": -2209017600000,
"lotnoDateAttr4": -2209017600000,
"lotnoDateAttr1": 1645977600000,
"lotnoDateAttr2": -2209017600000,
"lotnoDateAttr7": -2209017600000,
"lotnoDateAttr8": -2209017600000,
"lotnoDateAttr5": -2209017600000,
"lotnoDateAttr6": -2209017600000,
"unitId": 7034,
"lotnoDateAttr9": -2209017600000,
"locId": 66,
"lotnoTextAttr1": "G01",
"lotnoTextAttr2": "",
"lotnoTextAttr3": "",
"lotnoTextAttr4": "",
"lotnoTextAttr5": "",
"lotnoTextAttr6": "",
"lotnoTextAttr7": "",
"lotnoTextAttr8": "",
"lotnoTextAttr9": "",
"dualQty": 10,
"itemNo": " 1",
"hId": 47,
"lotnoNumAttr1": 10,
"lotnoNumAttr2": 0,
"lotnoNumAttr3": 0,
"lotnoNumAttr4": 0,
"lotnoExpDate": 1738512000000,
"footerKey": " 1",
"qty": 10,
"lotnoNumAttr5": 0,
"lotnoNumAttr6": 0,
"lotnoNumAttr7": 0,
"lotnoNumAttr8": 0,
"lotnoNumAttr9": 0,
"lotNoId": 8845,
"lotnoTextAttr16": "",
"lotnoTextAttr15": "",
"lotnoTextAttr18": "",
"lotnoTextAttr17": "",
"lotnoTextAttr12": "",
"lotnoTextAttr11": "",
"lotnoDateAttr20": -2209017600000,
"lotnoTextAttr14": "",
"lotnoTextAttr13": "",
"lotnoTextAttr19": "",
"lotnoTextAttr10": "",
"dualUnitId": 6280,
"lotnoLookupAttr5": 0,
"lotnoLookupAttr6": 0,
"lotnoLookupAttr7": 0,
"lotnoDateAttr18": -2209017600000,
"lotnoLookupAttr8": 0,
"lotnoDateAttr19": -2209017600000,
"lotno": "L12",
"lotnoLookupAttr9": 0,
"proId": 6334,
"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
}
],
"poscoreshoptransnotet": [
{
"sourceId": 39,
"dDesc_hy": "",
"poscoreDesc_jp": "",
"dualQty": 10,
"bDesc_hy": "",
"itemNo": " 1",
"beId": 1,
"alocId": 61,
"bDesc": "P20220324 Brief Description",
"bDesc_zh-TW": "",
"newLotno": 0,
"id": 100,
"shopId": 1,
"poscoreDesc_sxg": "",
"hId": 47,
"completed": false,
"dDesc": "<p>P20220324 Detailed Description<br></p>",
"footerKey": " 1",
"i18nField": "{\"bDesc_en\": \"P20220324 Brief Description\", \"dDesc_en\": \"<p>P20220324 Detailed Description<br></p>\", \"poscoreDesc_en\": \"\"}",
"sourceType": "poscoreTransRequest",
"qty": 10,
"lotNoId": 0,
"bDesc_sxg": "",
"bDesc_jp": "",
"dDesc_sxg": "",
"costAmt": 100,
"dDesc_jp": "",
"iRev": 1,
"dDesc_zh-CN": "",
"poscoreDesc_zh-CN": "",
"poscoreDesc_hy": "",
"ce01Module": "poscoreShopTransNote",
"lot": "A",
"dDesc_cth": "",
"dDesc_zh-TW": "",
"unitId": 7034,
"locId": 66,
"bDesc_cth": "",
"poscoreDesc": "",
"bDesc_en": "P20220324 Brief Description",
"poscoreDesc_en": "",
"poscoreDesc_zh-TW": "",
"dDesc_en": "<p>P20220324 Detailed Description<br></p>",
"poscoreDesc_cth": "",
"dualUnitId": 6280,
"sourceLot": "A",
"reqQty": 10,
"proId": 6334,
"bDesc_zh-CN": ""
}
]
},
"messages": [],
"status": true
}
# 保存仓转店单
# 一、接口描述
用于新增【仓转店单】
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/save/poscoreShopTransNote |
---|---|
http请求方式 | PUT |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | poscoreShopTransNote |
param | String(Query) | 否 | 额外的系统参数;JSON字符串 |
3、请求示例
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/poscoreShopTransNote";
String param = "&menuCode=poscoreShopTransNote";
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格式数据如下:
{
"poscoreshoptransnote": {
"values": [
{
"beId": 1,
"tDate": "2022-04-15",
"alocId": 16,
"virDeptId": 17,
"shopId": 2,
"flowTypeId": 54,
"staffId": 823,
"locId": 76
}
]
},
"poscoreshoptransnotet": {
"values": [
{
"alocId": 16,
"sourceType": "pro",
"proId": 84,
"qty": 1,
"unitId": 120,
"shopId": 1,
"locId": 76
}
]
}
}
4、返回示例
{
"recordId": 49,
"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/poscoreShopTransNote |
---|---|
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/poscoreShopTransNote";
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数据示例
{
"shopCode": "KL02",
"staffCode": "0001",
"locCode": "KLSW01",
"flowTypeCode": "ALL",
"beCode": "JC-AA",
"poscoreshoptransnotet": [
{
"shopCode": "KL01",
"locCode": "01",
"proCode": "P20220324",
"sourceType": "pro",
"unitCode": "PCS",
"qty": 1
}
],
"virDeptCode": "1010"
}
4、返回示例
{
"tranId": 50,
"tranCode": "TR22040002",
"message": "",
"status": true
}
# 删除仓转店单
# 一、接口描述
用于删除仓转店单
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/delete/poscoreShopTransNote |
---|---|
http请求方式 | DELETE |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | poscoreShopTransNote |
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/poscoreShopTransNote";
String param = "&menuCode=poscoreShopTransNote&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": [
{
"REQ_A_shopId_code": "KL01",
"MAIN_outQty": "35.00",
"MAIN_returnedQty": "15.00",
"REQ_A_shopId": "1",
"aiM18ReservedCol_dataIndex": 1,
"REQT_A_proId_desc__lang": "維他命B",
"REQT_A_locId_code": "KLSW01",
"REQT_A_qty": "50.0000",
"REQ_A_tDate": "2020 Aug 26",
"MAIN_reqQty": "50.00",
"REQ_A_code": "211424SRREQ",
"REQT_A_locId": "16",
"REQ_A_id": "1",
"REQT_A_proId_code": "0101",
"REQT_A_proId": "72"
}
]
}
# 读取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": [
{
"REQ_A_shopId_code": "KL01",
"MAIN_outQty": "20.00",
"REQ_A_shopId": "1",
"aiM18ReservedCol_dataIndex": 1,
"REQT_A_locId_code": "KLSW01",
"REQT_A_qty": "100.0000",
"REQ_A_tDate": "2020 Jul 03",
"MAIN_reqQty": "100.00",
"REQ_A_code": "202352SSR",
"REQT_A_locId": "16",
"REQ_A_id": "6",
"REQT_A_proId_code": "0101",
"REQT_A_proId": "72",
"MAIN_sentQty": "80.00"
}
]
}
# 读取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_tranType": "poscoreShopStkReturn",
"GITS_A_id": "61",
"MAIN_orderId": "3",
"aiM18ReservedCol_dataIndex": 1,
"MAIN_diffQty": "2.0000",
"LOC_A_id": "16",
"MAIN_tDate": "2020 Jan 06",
"PRO_A_id": "71",
"HT1_A_beId": "0",
"DLOC_A_code": "",
"GITS_A_code": "GITS",
"MAIN_aQty": "3.0000",
"LOC_A_code": "KLSW01",
"MAIN_dQty": "5.0000",
"HT1_A_beId_code": "",
"MAIN_tranTypeMess": "Shop Stock Return",
"PRO_A_code": "0100",
"DLOC_A_id": "0",
"MAIN_code": "231122SSRET"
}
]
}
# 零售送货单
# 获取零售送货单列表
# 一、接口描述
用于获取零售送货单列表(同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) | 是 | poscoreDeliveryNote |
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=poscoreDeliveryNote&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": "poscoreDeliveryNote",
"size": 1,
"stSearchDisplay": "POS Delivery Note",
"values": [
{
"poscoreDeliveryNote.memId.poscoreMember.displayName__lang": "Default Member",
"poscoreDeliveryNote.lastModifyUid.simpleUser.desc": "admin",
"tDate": "2022-04-07",
"code": "POSDN22040001",
"st_id": 317,
"st_code": "POSDN22040001",
"poscoreDeliveryNote.memId.poscoreMember.code": "DEFMEMBER",
"st_desc": "POSDN22040001",
"poscoreDeliveryNote.curId.cur.sym": "HK$",
"iRev": 1,
"id": 317,
"lastModifyDate": "2022-04-13 17:31:52"
}
]
}
# 读取零售送货单
# 一、接口描述
用于读取【零售送货单】数据
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/read/poscoreDeliveryNote |
---|---|
http请求方式 | GET |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | poscoreDeliveryNote |
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/poscoreDeliveryNote";
String param = "&menuCode=poscoreDeliveryNote&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": {
"poscoredntlot": [
{
"lotnoNumAttr17": 0,
"lotnoNumAttr16": 0,
"lotnoNumAttr15": 0,
"lotnoNumAttr14": 0,
"lotnoNumAttr19": 0,
"lotnoNumAttr18": 0,
"lotnoLookupAttr20": 0,
"lotnoNumAttr13": 0,
"lotnoNumAttr12": 0,
"lotnoNumAttr11": 0,
"lotnoNumAttr10": 0,
"lotnoLookupAttr16": 0,
"lotnoLookupAttr17": 0,
"lotnoLookupAttr14": 0,
"lotnoLookupAttr15": 0,
"lotnoLookupAttr18": 0,
"lotnoLookupAttr19": 0,
"newLotno": 0,
"lotnoLot": "A",
"id": 346,
"lotnoNumAttr20": 0,
"lotnoLookupAttr12": 0,
"lotnoLookupAttr13": 0,
"lotnoLookupAttr10": 0,
"lotnoLookupAttr11": 0,
"iRev": 1,
"ce01Module": "poscoreDeliveryNote",
"lotnoDateAttr3": -2209017600000,
"lotnoDateAttr4": -2209017600000,
"lotnoDateAttr1": -2209017600000,
"lotnoDateAttr2": -2209017600000,
"lotnoDateAttr7": -2209017600000,
"lotnoDateAttr8": -2209017600000,
"lotnoDateAttr5": -2209017600000,
"lotnoDateAttr6": -2209017600000,
"unitId": 102,
"lotnoDateAttr9": -2209017600000,
"locId": 16,
"lotnoTextAttr1": "",
"lotnoTextAttr2": "",
"lotnoTextAttr3": "",
"lotnoTextAttr4": "",
"lotnoTextAttr5": "",
"lotnoTextAttr6": "",
"lotnoTextAttr7": "",
"lotnoTextAttr8": "",
"lotnoTextAttr9": "",
"dualQty": 0,
"itemNo": "",
"hId": 317,
"lotnoNumAttr1": 0,
"lotnoNumAttr2": 0,
"lotnoNumAttr3": 0,
"lotnoNumAttr4": 0,
"lotnoExpDate": 1640966400000,
"footerKey": " 2",
"qty": 1,
"lotnoNumAttr5": 0,
"lotnoNumAttr6": 0,
"lotnoNumAttr7": 0,
"lotnoNumAttr8": 0,
"lotnoNumAttr9": 0,
"lotNoId": 39,
"lotnoTextAttr16": "",
"lotnoTextAttr15": "",
"lotnoTextAttr18": "",
"lotnoTextAttr17": "",
"lotnoTextAttr12": "",
"lotnoTextAttr11": "",
"lotnoDateAttr20": -2209017600000,
"lotnoTextAttr14": "",
"lotnoTextAttr13": "",
"lotnoTextAttr19": "",
"lotnoTextAttr10": "",
"dualUnitId": 71,
"lotnoLookupAttr5": 0,
"lotnoLookupAttr6": 0,
"lotnoLookupAttr7": 0,
"lotnoDateAttr18": -2209017600000,
"lotnoLookupAttr8": 0,
"lotnoDateAttr19": -2209017600000,
"lotno": "JCAAOS200102",
"lotnoLookupAttr9": 0,
"proId": 71,
"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
}
],
"poscoredndepo": [
{
"curDomDepoAmt": 200,
"AI1": 0,
"AI2": 0,
"itemNo": " 1",
"AI3": 0,
"AI4": 0,
"AI5": 0,
"AI6": 0,
"AI7": 0,
"beId": 1,
"AI8": 0,
"AI9": 0,
"id": 223,
"depositRate": 1,
"AI30": 0,
"hId": 317,
"depositKey": "_0_",
"srcAIId": 2,
"refType": "",
"iRev": 1,
"AI19": 0,
"sTranId": 3851,
"depoAmt": 200,
"lot": "",
"AI17": 0,
"AI18": 0,
"curId": 1,
"AI15": 0,
"AI16": 0,
"AI13": 0,
"rate": 1,
"AI14": 0,
"AI11": 0,
"AI12": 0,
"sorId": 0,
"AI10": 0,
"domDepoAmt": 200,
"apply": true,
"AI28": 0,
"AI29": 0,
"AI26": 0,
"AI27": 0,
"AI24": 0,
"AI25": 0,
"AI22": 0,
"AI23": 0,
"AI20": 0,
"AI21": 0,
"sTranType": "pos",
"domAmtDiff": 0
}
],
"poscoremaindn": [
{
"cpDate": 1649323224000,
"lastModifyUid": 1,
"useAccess": false,
"virDeptId": 4,
"expiredDate": -2209017600000,
"AI1": 0,
"AI2": 0,
"sysJson": "{\"autoGenCode\":{\"snId\":684,\"code\":\"POSDN22040001\",\"sn\":\"1\"}}",
"AI3": 0,
"AI4": 0,
"viewCode": "poscoreDeliveryNote",
"AI5": 0,
"accDesc": "",
"accDesc_cth": "",
"AI6": 0,
"AI7": 0,
"eDiscRate": 0,
"beId": 1,
"AI8": 0,
"accDesc_jp": "",
"AI9": 0,
"useAccessBl": false,
"id": 317,
"AI30": 0,
"locked": false,
"lastModifyDate": 1649842312000,
"accDesc_sxg": "",
"createUid": 1,
"rev": "1",
"lastApproveUid": 1,
"ttlCharge": 0,
"expiredUid": 0,
"accjlId": 44064,
"accdfsId": 0,
"i18nField": "{\"accDesc_en\": \"\"}",
"accDesc_en": "",
"ttlAmt": 200,
"status": "Y",
"tDate": 1649260800000,
"attachmentNo": 0,
"code": "POSDN22040001",
"cnDeptId": 6,
"jlTypeId": 0,
"amt": 0,
"iRev": 1,
"accDesc_zh-TW": "",
"AI19": 0,
"depoAmt": 200,
"ce01Module": "poscoreDeliveryNote",
"AI17": 0,
"AI18": 0,
"AI15": 0,
"curId": 1,
"expired": false,
"AI16": 0,
"stkjlId": 0,
"AI13": 0,
"AI14": 0,
"rate": 1,
"domAmt": 0,
"AI11": 0,
"AI12": 0,
"printCount": 0,
"AI10": 0,
"statusModifyDate": 1649842312000,
"domDepoAmt": 200,
"accDesc_hy": "",
"locId": 16,
"createDate": 1649842312000,
"accDesc_zh-CN": "",
"ttlPaidAmt": 0,
"loadGpCoData": false,
"useAccessWl": false,
"isEShop": false,
"AI28": 0,
"accdfId": 255,
"AI29": 0,
"AI26": 0,
"AI27": 0,
"AI24": 0,
"AI25": 0,
"AI22": 0,
"ttlDisc": 0,
"AI23": 0,
"AI20": 0,
"AI21": 0,
"useAccessAutoCalc": false,
"staffId": 1029,
"memId": 2,
"domAmtDiff": 0
}
],
"poscorednt": [
{
"sourceId": 3851,
"refTranType": "",
"dDesc_hy": "",
"poscoreDesc_jp": "",
"dualQty": 0,
"AI1": 0,
"AI2": 0,
"bDesc_hy": "",
"itemNo": " 1",
"AI3": 0,
"AI4": 0,
"AI5": 0,
"AI6": 0,
"AI7": 0,
"beId": 1,
"AI8": 0,
"AI9": 0,
"bDesc": "Vitamin A (BD)",
"bDesc_zh-TW": "",
"newLotno": 0,
"id": 445,
"AI30": 0,
"shopId": 1,
"up": 200,
"poscoreDesc_sxg": "",
"hId": 317,
"dDesc": "",
"footerKey": " 2",
"i18nField": "{\"bDesc_en\": \"Vitamin A (BD)\", \"dDesc_en\": \"\", \"remarks_en\": \"\", \"discDesc_en\": \"\", \"posProDesc_en\": \"維他命A\", \"poscoreDesc_en\": \"\"}",
"sourceType": "pos",
"qty": 1,
"disc": 0,
"lotNoId": 0,
"bDesc_sxg": "",
"bDesc_jp": "",
"dDesc_sxg": "",
"costAmt": 58.56154166,
"amt": 200,
"dDesc_jp": "",
"iRev": 1,
"dDesc_zh-CN": "",
"AI19": 0,
"refTranId": 0,
"poscoreDesc_zh-CN": "",
"poscoreDesc_hy": "",
"ce01Module": "poscoreDeliveryNote",
"lot": "A",
"AI17": 0,
"dDesc_cth": "",
"AI18": 0,
"AI15": 0,
"AI16": 0,
"dDesc_zh-TW": "",
"AI13": 0,
"domAmt": 200,
"AI14": 0,
"AI11": 0,
"AI12": 0,
"unitId": 102,
"AI10": 0,
"locId": 16,
"bDesc_cth": "",
"poscoreDesc": "",
"bDesc_en": "Vitamin A (BD)",
"poscoreDesc_en": "",
"poscoreDesc_zh-TW": "",
"dDesc_en": "",
"poscoreDesc_cth": "",
"discAmt": 0,
"dualUnitId": 71,
"AI28": 0,
"AI29": 0,
"sourceLot": "A",
"AI26": 0,
"AI27": 0,
"AI24": 0,
"AI25": 0,
"AI22": 0,
"proId": 71,
"AI23": 0,
"AI20": 0,
"AI21": 0,
"bDesc_zh-CN": ""
}
],
"poscoreremdn": [
{
"shipTime": "00:00",
"remarks_en": "<div><font color=\"#434a54\"><span style=\"font-size: 13px;\">1. COZLHP00013 : do not user red rose, use pink one</span></font></div><div><font color=\"#434a54\"><span style=\"font-size: 13px;\">2. osjhudoi'jsodf </span></font></div><div><font color=\"#434a54\"><span style=\"font-size: 13px;\">3. 0u9psjiohud9f<span style=\"white-space:pre\">\t</span></span></font></div>",
"shipAd2_zh-TW": "",
"shipAd1_en": "Mong Kok",
"mobileCountry": "852",
"shipAd2_jp": "",
"shipGpsLat": 0,
"tel": "",
"id": 317,
"remarks_zh-TW": "",
"shipAd1_zh-CN": "",
"shipMan": "Mr. Wong",
"shipAd4_hy": "",
"hId": 317,
"shipAd4_cth": "",
"shipMan_zh-CN": "",
"shipDate": 1651248000000,
"shipZipcode": "",
"remarks_cth": "",
"remarks_hy": "",
"shipAd2_en": "",
"shipAd4_sxg": "",
"remarks_sxg": "",
"i18nField": "{\"pickMan_en\": \"\", \"remarks_en\": \"<div><font color=\\\"#434a54\\\"><span style=\\\"font-size: 13px;\\\">1. COZLHP00013 : do not user red rose, use pink one</span></font></div><div><font color=\\\"#434a54\\\"><span style=\\\"font-size: 13px;\\\">2. osjhudoi'jsodf </span></font></div><div><font color=\\\"#434a54\\\"><span style=\\\"font-size: 13px;\\\">3. 0u9psjiohud9f<span style=\\\"white-space:pre\\\">\\t</span></span></font></div>\", \"shipAd1_en\": \"Mong Kok\", \"shipAd2_en\": \"\", \"shipAd3_en\": \"\", \"shipAd4_en\": \"\", \"shipMan_en\": \"Mr. Wong\", \"pickRemarks_en\": \"\", \"shipRemarks_en\": \"<div><font color=\\\"#434a54\\\"><span style=\\\"font-size: 13px;\\\">1. COZLHP00013 : do not user red rose, use pink one</span></font></div><div><font color=\\\"#434a54\\\"><span style=\\\"font-size: 13px;\\\">2. osjhudoi'jsodf </span></font></div><div><font color=\\\"#434a54\\\"><span style=\\\"font-size: 13px;\\\">3. 0u9psjiohud9f<span style=\\\"white-space:pre\\\">\\t</span></span></font></div>\", \"extendReason_en\": \"\"}",
"shipAd3_jp": "",
"remarks_zh-CN": "",
"shipAd1_hy": "",
"shipAd3_zh-TW": "",
"shipMan_hy": "",
"shipAd2_cth": "",
"shipMan_en": "Mr. Wong",
"shipProvince": "",
"shipMan_sxg": "",
"iRev": 1,
"shipAd1_cth": "",
"shipAd3_sxg": "",
"shipAd4_zh-TW": "",
"shipCountry": "",
"ce01Module": "poscoreDeliveryNote",
"shipMan_zh-TW": "",
"shipAd3_cth": "",
"shipAd3_en": "",
"shipAd3_zh-CN": "",
"shipAd4_zh-CN": "",
"shipAd1_sxg": "",
"shipAd4_jp": "",
"shipAd2_sxg": "",
"shipAd2_hy": "",
"shipId": 0,
"remarks_jp": "",
"shipCity": "",
"mobile": "97452614",
"shipMan_jp": "",
"telCountry": "",
"shipAd1": "Mong Kok",
"shipAd2": "",
"shipGpsLong": 0,
"shipAd3": "",
"shipAd4": "",
"telArea": "",
"shipAd1_zh-TW": "",
"shipAd4_en": "",
"shipAd1_jp": "",
"shipAd2_zh-CN": "",
"shipAd3_hy": "",
"remarks": "<div><font color=\"#434a54\"><span style=\"font-size: 13px;\">1. COZLHP00013 : do not user red rose, use pink one</span></font></div><div><font color=\"#434a54\"><span style=\"font-size: 13px;\">2. osjhudoi'jsodf </span></font></div><div><font color=\"#434a54\"><span style=\"font-size: 13px;\">3. 0u9psjiohud9f<span style=\"white-space:pre\">\t</span></span></font></div>",
"shipMan_cth": ""
}
]
},
"messages": [],
"status": true
}
# 保存零售送货单
# 一、接口描述
用于新增【零售送货单】
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/save/poscoreDeliveryNote |
---|---|
http请求方式 | PUT |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | poscoreDeliveryNote |
param | String(Query) | 否 | 额外的系统参数;JSON字符串 |
3、请求示例
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/poscoreDeliveryNote";
String param = "&menuCode=poscoreDeliveryNote";
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格式数据如下:
{
"poscoremaindn": {
"values": [
{
"beId": 1,
"tDate": "2022-04-15",
"curId": 1,
"virDeptId": 17,
"rate": 1,
"amt": 20,
"shopId": 2,
"staffId": 823,
"locId": 16,
"memId": 3
}
]
},
"poscorednt": {
"values": [
{
"sourceType": "pro",
"proId": 6334,
"qty": 1,
"unitId": 7034,
"amt": 20,
"up": 20,
"locId": 16
}
]
}
}
4、返回示例
{
"recordId": 319,
"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/poscoreDeliveryNote |
---|---|
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/poscoreDeliveryNote";
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数据示例
{
"memCode": "LH0001",
"staffCode": "0001",
"locCode": "KLSW01",
"rate": 1,
"amt": 20,
"beCode": "JC-AA",
"poscorednt": [
{
"locCode": "KLSW01",
"proCode": "P20220324",
"sourceType": "pro",
"unitCode": "PCS",
"qty": 1,
"amt": 20,
"up": 20
}
],
"virDeptCode": "1010",
"curCode": "HKD"
}
4、返回示例
{
"tranId": 10,
"tranCode": "SSR22040002",
"message": "",
"status": true
}
# 删除零售送货单
# 一、接口描述
用于删除零售送货单
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/delete/poscoreDeliveryNote |
---|---|
http请求方式 | DELETE |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | poscoreDeliveryNote |
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/poscoreDeliveryNote";
String param = "&menuCode=poscoreDeliveryNote&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": [
{
"DN_A_depoAmt": "0.00",
"MEM_A_id": "3",
"aiM18ReservedCol_dataIndex": 1,
"DN_A_rate": "1.00000000",
"DN_A_ttlAmt": "2,500.00",
"DN_A_amt": "2,500.00",
"DN_A_ttlPaidAmt": "0.00",
"DN_A_beId_code": "JC-AA",
"STAFF_A_id": "1",
"DN_A_curId_desc__lang": "HK$",
"DN_A_code": "232036POSDN",
"DN_A_tDate": "2020 Jan 26",
"MEM_A_code": "LH0001",
"DN_A_id": "143",
"STAFF_A_code": "A-02",
"DN_A_beId": "1"
}
]
}
# 读取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(