销售
# 价目表
# 获取价目表列表
# 一、接口描述
用于获取价目表列表(同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) | 是 | uplist |
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=uplist&beId=" + beId;
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": "uplist",
"size": 11,
"stSearchDisplay": "价目表",
"values": [
{
"tDate": "2022-03-11",
"mainup.lastModifyUid.simpleUser.desc__lang": "JLTEST",
"code": "JLTEST20220311",
"st_id": 84,
"st_code": "JLTEST20220311",
"mainup.upTypeId.pricetype.code": "",
"st_desc": "JLTEST20220311",
"mainup.upTypeId.pricetype.desc": "",
"iRev": 1,
"id": 84,
"lastModifyDate": "2022-03-11 15:09:23"
}
]
}
# 新增价目表(自动补全)
# 一、接口描述
1. 用于新增【价目表】
2. 此接口方法有如下特点:
a. 支持使用code 替代 id 栏位
b. 货币栏位未填时,自动使用本货币
c. 职员栏位未填时,自动使用个人选项中的默认职员
d. 单据日期未填时,根据贸易参数设定中的日期选项取值
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/erp/bsFlow/save/uplist |
---|---|
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/uplist";
String param = "";
HttpPost post = new HttpPost(url + "?" + param);
post.addHeader("authorization", access_token);
post.addHeader("client_id", ClientID);
StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON);
entity.setContentEncoding("UTF-8");
post.setEntity(entity);
res = client.execute(post);
if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
if (json != null) {
recordId = json.getLongValue("tranId");
}
System.out.println(json);
}
post.releaseConnection();
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (res != null) {
res.close();
}
if (client != null) {
client.close();
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
data数据示例:
{
"beCode":"CAT2019",
"upt":[{
"proCode":"00001",
"unitCode":"PCS",
"qty":0,
"up":5,
"disc":5
}]
}
4、返回示例
{
"tranId": 87,
"tranCode": "UPL220016",
"message": "",
"status": true
}
# 读取价目表
# 一、接口描述
用于读取价目表数据
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/read/uplist |
---|---|
http请求方式 | GET |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | uplist |
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/uplist";
String param = "&menuCode=uplist&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": {},
"messages": [
{
"msgDetail": "找不到相关记录,记录可能已被删除或你没有访问权限",
"msgCode": "core_141019"
}
],
"status": false
}
{
"data": {
"remup": [
{
"lTime": "",
"tradeTerm_ccn": "",
"tradeTerm_en": "",
"lTime_zh-TW": "",
"lTime_ccn": "",
"tradeTerm_zh-CN": "",
"lTime_haha1": "",
"remarks_en": "",
"payTerm_en": "",
"iRev": 1,
"packing_ccn": "",
"packing": "",
"ce01Module": "uplist",
"tradeTerm": "",
"payTerm_haha1": "",
"packing_zh-TW": "",
"payTerm_zh-TW": "",
"packing_haha1": "",
"remarks_haha1": "",
"id": 85,
"lTime_zh-CN": "",
"remarks_zh-TW": "",
"hId": 85,
"packing_ctw": "",
"payTerm": "",
"payTerm_ccn": "",
"remarks_ccn": "",
"tradeTerm_ctw": "",
"lTime_en": "",
"packing_zh-CN": "",
"lTime_ctw": "",
"tradeTerm_zh-TW": "",
"tradeTerm_haha1": "",
"i18nField": "{\"lTime_zh-CN\": \"\", \"packing_zh-CN\": \"\", \"payTerm_zh-CN\": \"\", \"remarks_zh-CN\": \"\", \"tradeTerm_zh-CN\": \"\"}",
"remarks_zh-CN": "",
"packing_en": "",
"payTerm_zh-CN": "",
"payTerm_ctw": "",
"remarks": "",
"remarks_ctw": ""
}
],
"upt": [
{
"sourceId": 0,
"udftest17": "",
"udftest16": "",
"unit2Id": 39151,
"udftest15": "",
"udftest14": "",
"udftest13": "",
"dualQty": 0,
"udftest12": "",
"udftest11": "",
"udftest10": "",
"qty2": 0,
"itemNo": " 1",
"qty1": 0,
"beId": 304,
"bDesc": "",
"bDesc_zh-TW": "",
"newLotno": 0,
"id": 7354,
"up": 5,
"udftest19": "",
"dDesc_haha1": "",
"udftest18": "",
"hId": 85,
"freeQtyPer": 0,
"dDesc": "",
"footerKey": "",
"i18nField": "{\"bDesc_zh-CN\": \"\", \"dDesc_zh-CN\": \"\"}",
"sourceType": "pro",
"qty": 0,
"disc": 5,
"lotNoId": 0,
"dDesc_ctw": "",
"unit1Id": 39151,
"costAmt": 0,
"amt": 0,
"iRev": 1,
"dDesc_zh-CN": "",
"bDesc_ctw": "",
"ce01Module": "uplist",
"lot": "A",
"bDesc_haha1": "",
"dDesc_zh-TW": "",
"domAmt": 0,
"bDesc_ccn": "",
"unitId": 39151,
"dDesc_ccn": "",
"locId": 0,
"bDesc_en": "",
"udftest20": "",
"udftest9": "",
"dDesc_en": "",
"dualUnitId": 1,
"udftest2": "",
"udftest1": "",
"sourceLot": "",
"udftest4": "",
"udftest3": "",
"udftest6": "",
"udftest5": "",
"udftest8": "",
"proId": 4197,
"udftest7": "",
"udfmxtest": "",
"bDesc_zh-CN": ""
}
],
"mainup": [
{
"tDate": 1646928000000,
"lastModifyUid": 17,
"code": "JLTEST20220311B",
"cnDeptId": 0,
"useAccess": false,
"virDeptId": 0,
"expiredDate": -2209017600000,
"iRev": 1,
"sysJson": "",
"viewCode": "uplist",
"ce01Module": "uplist",
"beId": 304,
"udfmxstr": "",
"curId": 1,
"udfmxdate": -2209017600000,
"expired": false,
"dDate": 253402185600000,
"rate": 1,
"printCount": 0,
"useAccessBl": false,
"udfcusaa": 0,
"id": 85,
"doctypeId": 0,
"statusModifyDate": 1646983091000,
"locked": false,
"lastModifyDate": 1646983091000,
"createUid": 17,
"createDate": 1646983091000,
"rev": "1",
"lastApproveUid": 17,
"upTypeId": 0,
"expiredUid": 0,
"useAccessWl": false,
"freeQtyPer": 0,
"udfmxnum": 0,
"useAccessAutoCalc": false,
"udfmxlookup": 0,
"staffId": 700,
"status": "Y"
}
]
},
"messages": [],
"status": true
}
# 保存价目表
# 一、接口描述
用于新增或者更新【价目表】
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/save/uplist |
---|---|
http请求方式 | PUT |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | uplist |
param | String(Query) | 否 | 额外的系统参数;JSON字符串 |
3、请求示例
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/uplist";
String param = "&menuCode=uplist";
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格式数据如下:
{
"mainup": {
"values": [
{
"beId": 304,
"code": "JLTEST20220311",
"tDate": "2022-3-11",
"curId": 1,
"rate": 1,
"staffId": 700
}
]
},
"upt": {
"values": [
{
"sourceType": "pro",
"proId": 4197,
"unitId": 39151,
"qty": 0,
"up": 5,
"disc": 5
}
]
}
}
4、返回示例
{
"recordId": 88,
"messages": [],
"status": true
}
{
"recordId": 0,
"messages": [
{
"msgDetail": "必填项为空",
"msgCode": "core_101905"
}
],
"status": false
}
# 删除价目表
# 一、接口描述
用于删除价目表
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/delete/uplist |
---|---|
http请求方式 | DELETE |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | uplist |
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/uplist";
String param = "&menuCode=uplist&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": [
{
"M_A_code": "UPL180008",
"M_A_id": "46",
"M_A_rate": "1.00000000",
"aiM18ReservedCol_dataIndex": 1,
"F_A_unitId_code": "克",
"M_A_dDate": "9999.12.31",
"M_A_curId_desc__lang": "HK$",
"M_A_tDate": "2018.01.01",
"PRO_A_code": "0250A",
"PRO_A_id": "1031",
"F_A_qty": "0.0000",
"F_A_up": "10.0000"
}
]
}
# 销售报价单
# 获取销售报价单列表
# 一、接口描述
用于获取销售报价单列表(同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) | 是 | oldqu |
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=oldqu&beId=" + beId;
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": "oldqu",
"size": 1,
"stSearchDisplay": "销售报价单",
"values": [
{
"tDate": "2022-03-11",
"mainqu.cusId.cus.code": "000",
"mainqu.flowTypeId.flowtype.code": "ALL",
"code": "JLTEST20220311B",
"st_code": "JLTEST20220311B",
"mainqu.flowTypeId.flowtype.desc": "All",
"mainqu.curId.cur.sym": "¥",
"st_desc": "JLTEST20220311B",
"iRev": 1,
"mainqu.cusId.cus.desc__lang": "000 Sc",
"st_id": 139,
"mainqu.lastModifyUid.simpleUser.desc__lang": "JLTEST",
"id": 139,
"lastModifyDate": "2022-03-17 12:00:50"
}
]
}
# 新增销售报价单(自动补全)
# 一、接口描述
1. 用于新增【销售报价单】
2. 此接口方法有如下特点:
a. 支持使用code 替代 id 栏位
b. 货币栏位未填时,自动使用本货币
c. 职员栏位未填时,自动使用[个人选项]中的默认职员
d. 单据日期未填时,根据[贸易参数设定]中的日期选项取值
e. 业务流程未填时,根据[业务流程设置(贸易)]中设定的默认值
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/erp/bsFlow/save/oldqu |
---|---|
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/oldqu";
String param = "";
HttpPost post = new HttpPost(url + "?" + param);
post.addHeader("authorization", access_token);
post.addHeader("client_id", ClientID);
StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON);
entity.setContentEncoding("UTF-8");
post.setEntity(entity);
res = client.execute(post);
if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
if (json != null) {
recordId = json.getLongValue("tranId");
}
System.out.println(json);
}
post.releaseConnection();
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (res != null) {
res.close();
}
if (client != null) {
client.close();
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
data数据示例:
{
"beCode":"CAT2019",
"cusCode":"000",
"qut":[{
"proCode":"00001",
"unitCode":"PCS",
"qty":1,
"up":5,
"disc":5
}]
}
4、返回示例
{
"tranId": 141,
"tranCode": "OLD220014",
"message": "",
"status": true
}
# 读取销售报价单
# 一、接口描述
用于读取销售报价单数据
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/read/oldqu |
---|---|
http请求方式 | GET |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | oldqu |
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/oldqu";
String param = "&menuCode=oldqu&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": {},
"messages": [
{
"msgDetail": "找不到相关记录,记录可能已被删除或你没有访问权限",
"msgCode": "core_141019"
}
],
"status": false
}
{
"data": {
"qut": [
{
"sourceId": 0,
"unit2Id": 39151,
"oemRate": 1,
"dualQty": 0,
"qty2": 0,
"itemNo": " 1",
"uc": 0,
"qty1": 1,
"beId": 304,
"bDesc": "Skirt SC /\\",
"bDesc_zh-TW": "",
"newLotno": 0,
"id": 225,
"up": 5,
"ctn": 0,
"dDesc_haha1": "",
"height": 0,
"hId": 141,
"perCtn": 0,
"margin": 0,
"matUc": 0,
"markup": 0,
"freeQtyPer": 0,
"volume": 0,
"dDesc": "<p>Skirt SC Desc<br></p>",
"footerKey": " 1",
"i18nField": "{\"bDesc_zh-CN\": \"Skirt SC /\\\\\", \"dDesc_zh-CN\": \"<p>Skirt SC Desc<br></p>\"}",
"sourceType": "pro",
"qty": 1,
"disc": 5,
"oemCurId": 1,
"packingDesc": "",
"refCode": "",
"lotNoId": 0,
"dDesc_ctw": "",
"innerQty": 0,
"unit1Id": 39151,
"costAmt": 0,
"amt": 4.75,
"nw": 0,
"iRev": 1,
"dDesc_zh-CN": "<p>Skirt SC Desc<br></p>",
"packingUnitId": 0,
"bDesc_ctw": "",
"ce01Module": "oldqu",
"lot": "A",
"bDesc_haha1": "",
"dDesc_zh-TW": "",
"domAmt": 4.75,
"bDesc_ccn": "",
"unitId": 39151,
"innerUnitId": 0,
"dDesc_ccn": "",
"profit": 0,
"locId": 0,
"cifUp": 0,
"bDesc_en": "",
"length": 0,
"gp": 0,
"imgCode": "",
"dDesc_en": "",
"dualUnitId": 1,
"gw": 0,
"sourceLot": "",
"pc": 0,
"oemSourceType": "",
"proId": 4197,
"width": 0,
"bDesc_zh-CN": "Skirt SC /\\"
}
],
"mainqu": [
{
"insurance": 0,
"lastModifyUid": 17,
"useAccess": false,
"virDeptId": 0,
"expiredDate": -2209017600000,
"ttlCfCifAmt": 0,
"position_zh-CN": "",
"sysJson": "{\"autoGenCode\":{\"snId\":982,\"code\":\"OLD220014\",\"sn\":\"14\"}}",
"viewCode": "oldqu",
"expDate": 253402185600000,
"beId": 304,
"cusId": 119,
"useAccessBl": false,
"id": 141,
"doctypeId": 0,
"locked": false,
"position_ctw": "",
"lastModifyDate": 1649154916000,
"createUid": 17,
"udfHtml": "",
"rev": "1",
"lastApproveUid": 17,
"ttlCharge": 0,
"expiredUid": 0,
"freeQtyPer": 0,
"descOrigin": "SOLAST",
"position_en": "",
"position_zh-TW": "",
"i18nField": "{\"position_zh-CN\": \"\"}",
"manId": 516,
"ttlAmt": 4.75,
"position": "",
"flowTypeId": 15918,
"status": "Y",
"weightUnit": "kg",
"tDate": 1649088000000,
"code": "OLD220014",
"cnDeptId": 0,
"amt": 4.75,
"iRev": 1,
"upOrigin": "SOLAST",
"ce01Module": "oldqu",
"curId": 1,
"expired": false,
"rate": 1,
"domAmt": 4.75,
"measUnit": "cbm",
"printCount": 0,
"statusModifyDate": 1649154916000,
"createDate": 1649154916000,
"freightM": 0,
"useAccessWl": false,
"position_ccn": "",
"ttlDisc": 0,
"position_haha1": "",
"freightW": 0,
"useAccessAutoCalc": false,
"staffId": 700,
"domAmtDiff": 0
}
],
"remqu": [
{
"tradeTerm_ccn": "",
"country": "CN",
"heading_en": "",
"tradeTerm_zh-CN": "",
"lTime_haha1": "",
"shipAd4_haha1": "",
"remarks_en": "",
"packing_ccn": "",
"recipient_ccn": "",
"tradeTerm": "",
"heading_ccn": "",
"shipAd2_zh-TW": "",
"shipAd1_en": "",
"payTerm_zh-TW": "",
"province": "广东",
"packing_haha1": "",
"tel": "",
"recipient_haha1": "",
"id": 140,
"fax": "",
"remarks_zh-TW": "",
"shipAd1_zh-CN": "送货地址 第一行 简体",
"hId": 141,
"payTerm": "",
"heading_zh-TW": "",
"payTerm_ccn": "",
"remarks_ccn": "",
"heading_ctw": "",
"lTime_en": "",
"lTime_ctw": "",
"tradeTerm_zh-TW": "",
"shipAd4_ccn": "",
"zipcode": "",
"shipAd2_en": "",
"shipAd1_haha1": "",
"i18nField": "{\"lTime_zh-CN\": \"\", \"heading_zh-CN\": \"\", \"packing_zh-CN\": \"\", \"payTerm_zh-CN\": \"\", \"remarks_zh-CN\": \"\", \"shipAd1_zh-CN\": \"送货地址 第一行 简体\", \"shipAd2_zh-CN\": \"\", \"shipAd3_zh-CN\": \"\", \"shipAd4_zh-CN\": \"\", \"recipient_zh-CN\": \"Jerry.li\", \"tradeTerm_zh-CN\": \"\"}",
"remarks_zh-CN": "",
"packing_en": "",
"shipAd4_ctw": "",
"gpsLat": 0,
"payTerm_zh-CN": "",
"shipAd3_zh-TW": "",
"payTerm_ctw": "",
"remarks_ctw": "",
"lTime": "",
"shipAd1_ccn": "",
"tradeTerm_en": "",
"lTime_zh-TW": "",
"shipCodeId": 284,
"lTime_ccn": "",
"city": "深圳",
"shipAd3_ctw": "",
"recipient_zh-CN": "Jerry.li",
"payTerm_en": "",
"iRev": 1,
"shipAd4_zh-TW": "",
"packing": "",
"heading_zh-CN": "",
"shipAd2_ccn": "",
"ce01Module": "oldqu",
"payTerm_haha1": "",
"shipAd3_en": "",
"recipient_en": "",
"packing_zh-TW": "",
"shipAd3_zh-CN": "",
"shipAd4_zh-CN": "",
"shipAd2_ctw": "",
"shipAd2_haha1": "",
"remarks_haha1": "",
"shipAd1_ctw": "",
"lTime_zh-CN": "",
"email": "jerry.li@mac.sz",
"shipAd3_ccn": "",
"recipient_zh-TW": "",
"packing_ctw": "",
"heading_haha1": "",
"heading": "",
"recipient_ctw": "",
"tradeTerm_ctw": "",
"packing_zh-CN": "",
"telCountry": "",
"tradeTerm_haha1": "",
"shipAd1": "送货地址 第一行 简体",
"shipAd2": "",
"shipAd3": "",
"shipAd4": "",
"telArea": "",
"shipAd1_zh-TW": "",
"shipAd4_en": "",
"recipient": "Jerry.li",
"shipAd2_zh-CN": "",
"shipAd3_haha1": "",
"remarks": "",
"gpsLong": 0
}
],
"quphoto": [
{
"hId": 141,
"footerKey": " 1",
"photoId": 948,
"iRev": 1,
"id": 132,
"itemNo": " 1",
"ce01Module": "oldqu",
"desc": ""
},
{
"hId": 141,
"footerKey": " 1",
"photoId": 949,
"iRev": 1,
"id": 133,
"itemNo": " 2",
"ce01Module": "oldqu",
"desc": ""
}
]
},
"messages": [],
"status": true
}
# 保存销售报价单
# 一、接口描述
用于新增【销售报价单】
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/entity/s/save/oldqu |
---|---|
http请求方式 | PUT |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | oldqu |
param | String(Query) | 否 | 额外的系统参数;JSON字符串 |
3、请求示例
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/oldqu";
String param = "&menuCode=oldqu";
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格式数据如下:
{
"qut": {
"values": [
{
"sourceType": "pro",
"proId": 4197,
"qty": 1,
"unitId": 39151,
"amt": 4,
"disc": 10,
"up": 5
}
]
},
"mainqu": {
"values": [
{
"beId": 304,
"tDate": "2022-03-30",
"curId": 1,
"cusId": 1,
"rate": 1,
"amt": 4,
"flowTypeId": 15918,
"staffId": 700
}
]
}
}
4、返回示例
{
"recordId": 142,
"messages": [],
"status": true
}
{
"recordId": 0,
"messages": [
{
"msgDetail": "必填项为空",
"msgCode": "core_101905"
}
],
"status": false
}
# 删除销售报价单
# 一、接口描述
用于删除销售报价单
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/entity/delete/oldqu |
---|---|
http请求方式 | DELETE |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | oldqu |
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/oldqu";
String param = "&menuCode=oldqu&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": [
{
"M_A_code": "ITQU16120001",
"M_A_id": "11",
"M_A_rate": "1.00000000",
"aiM18ReservedCol_dataIndex": 1,
"M_A_curId_desc__lang": "¥",
"M_A_tDate": "2016.12.06",
"CUS_A_id": "1",
"PRO_A_code": "PRO005",
"CUS_A_code": "C0001A",
"PRO_A_id": "10",
"F_A_up": "17.4000",
"F_A_qty": "10.0000"
}
]
}
# 销售订单
# 获取销售订单列表
# 一、接口描述
用于获取销售订单列表(同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) | 是 | oldso |
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=oldso&beId=" + beId;
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": "oldso",
"size": 1,
"stSearchDisplay": "销售订单",
"values": [
{
"mainso.flowTypeId.flowtype.desc": "All",
"tDate": "2022-04-02",
"code": "SO0220887",
"st_code": "SO0220887",
"mainso.flowTypeId.flowtype.code": "ALL",
"st_desc": "SO0220887",
"iRev": 4,
"mainso.cusId.cus.code": "000",
"st_id": 2003,
"mainso.cusId.cus.desc__lang": "000 Sc",
"mainso.lastModifyUid.simpleUser.desc__lang": "JLTEST",
"cuspono": "",
"id": 2003,
"mainso.curId.cur.sym": "HK$",
"lastModifyDate": "2022-04-02 16:29:04"
}
]
}
# 新增销售订单(自动补全)
# 一、接口描述
1. 用于新增【销售订单】
2. 此接口方法有如下特点:
a. 支持使用code 替代 id 栏位
b. 货币栏位未填时,自动使用本货币
c. 职员栏位未填时,自动使用个人选项中的默认职员
d. 单据日期未填时,根据贸易参数设定中的日期选项取值
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/erp/bsFlow/save/oldso |
---|---|
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/oldso";
String param = "";
HttpPost post = new HttpPost(url + "?" + param);
post.addHeader("authorization", access_token);
post.addHeader("client_id", ClientID);
StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON);
entity.setContentEncoding("UTF-8");
post.setEntity(entity);
res = client.execute(post);
if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
if (json != null) {
recordId = json.getLongValue("tranId");
}
System.out.println(json);
}
post.releaseConnection();
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (res != null) {
res.close();
}
if (client != null) {
client.close();
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
data数据示例:
{
"beCode":"CAT2019",
"cusCode":"000",
"sot":[{
"proCode":"00001",
"unitCode":"PCS",
"qty":1,
"up":5,
"disc":5
}]
}
4、返回示例
{
"tranId": 2004,
"tranCode": "SO0220888",
"message": "",
"status": true
}
# 读取销售订单
# 一、接口描述
用于读取销售订单数据
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/read/oldso |
---|---|
http请求方式 | GET |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | oldso |
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/oldso";
String param = "&menuCode=oldso&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": {},
"messages": [
{
"msgDetail": "找不到相关记录,记录可能已被删除或你没有访问权限",
"msgCode": "core_141019"
}
],
"status": false
}
{
"data": {
"remso": [
{
"tradeTerm_ccn": "",
"shipMark": "",
"remarks_en": "",
"tradeTerm": "",
"premarks": "",
"shipAd1_en": "",
"province": "广东",
"packing_haha1": "",
"tel": "",
"shipMark_en": "",
"recipient_haha1": "",
"id": 2000,
"fax": "",
"premarks_zh-CN": "",
"shipAd1_zh-CN": "送货地址 第一行 简体",
"payTerm": "",
"heading_zh-TW": "",
"payTerm_ccn": "",
"remarks_ccn": "",
"shipAd4_ccn": "",
"i18nField": "{\"heading_zh-CN\": \"\", \"packing_zh-CN\": \"\", \"payTerm_zh-CN\": \"\", \"remarks_zh-CN\": \"\", \"shipAd1_zh-CN\": \"送货地址 第一行 简体\", \"shipAd2_zh-CN\": \"\", \"shipAd3_zh-CN\": \"\", \"shipAd4_zh-CN\": \"\", \"premarks_zh-CN\": \"\", \"shipMark_zh-CN\": \"\", \"recipient_zh-CN\": \"Jerry.li\", \"tradeTerm_zh-CN\": \"\"}",
"shipAd4_ctw": "",
"shipAd3_zh-TW": "",
"payTerm_ctw": "",
"remarks_ctw": "",
"tradeTerm_en": "",
"city": "深圳",
"shipMark_ctw": "",
"payTerm_en": "",
"iRev": 1,
"shipAd4_zh-TW": "",
"shipAd2_ccn": "",
"ce01Module": "oldso",
"shipAd3_en": "",
"shipAd4_zh-CN": "",
"shipAd2_ctw": "",
"shipAd2_haha1": "",
"email": "jerry.li@mac.sz",
"packing_ctw": "",
"heading_haha1": "",
"heading": "",
"premarks_en": "",
"recipient_ctw": "",
"tradeTerm_ctw": "",
"telCountry": "",
"tradeTerm_haha1": "",
"shipAd1": "送货地址 第一行 简体",
"shipAd2": "",
"shipAd3": "",
"premarks_zh-TW": "",
"shipAd4": "",
"shipMark_haha1": "",
"shipAd3_haha1": "",
"smthId": 0,
"gpsLong": 0,
"country": "CN",
"heading_en": "",
"shipMark_zh-CN": "",
"tradeTerm_zh-CN": "",
"shipAd4_haha1": "",
"packing_ccn": "",
"dest": "",
"recipient_ccn": "",
"heading_ccn": "",
"shipAd2_zh-TW": "",
"payTerm_zh-TW": "",
"remarks_zh-TW": "",
"hId": 2004,
"heading_ctw": "",
"tradeTerm_zh-TW": "",
"shipMark_ccn": "",
"zipcode": "",
"premarks_haha1": "",
"shipAd2_en": "",
"shipAd1_haha1": "",
"remarks_zh-CN": "",
"packing_en": "",
"gpsLat": 0,
"payTerm_zh-CN": "",
"shipMark_zh-TW": "",
"shipAd1_ccn": "",
"shipCodeId": 284,
"shipAd3_ctw": "",
"recipient_zh-CN": "Jerry.li",
"packing": "",
"heading_zh-CN": "",
"premarks_ccn": "",
"payTerm_haha1": "",
"recipient_en": "",
"packing_zh-TW": "",
"shipAd3_zh-CN": "",
"remarks_haha1": "",
"shipAd1_ctw": "",
"shipAd3_ccn": "",
"recipient_zh-TW": "",
"packing_zh-CN": "",
"telArea": "",
"shipAd1_zh-TW": "",
"shipAd4_en": "",
"premarks_ctw": "",
"recipient": "Jerry.li",
"shipAd2_zh-CN": "",
"remarks": ""
}
],
"sophoto": [
{
"hId": 2004,
"footerKey": " 1",
"photoId": 948,
"iRev": 1,
"id": 775,
"itemNo": " 1",
"ce01Module": "oldso",
"desc": ""
},
{
"hId": 2004,
"footerKey": " 1",
"photoId": 949,
"iRev": 1,
"id": 776,
"itemNo": " 2",
"ce01Module": "oldso",
"desc": ""
}
],
"sot": [
{
"sourceId": 0,
"udfPJPwidth": 0,
"unit2Id": 39151,
"shipMark": "",
"udfPJPtestNum": 0,
"oemRate": 1,
"dualQty": 0,
"qty2": 0,
"itemNo": " 1",
"uc": 0,
"qty1": 1,
"beId": 304,
"dDate": 1649088000000,
"bDesc": "Skirt SC /\\",
"bDesc_zh-TW": "",
"newLotno": 0,
"cusDDate": 1649088000000,
"udfString": "SO0220888",
"id": 3508,
"up": 5,
"ctn": 0,
"qcRequired": false,
"udfPJPtestBool": false,
"dDesc_haha1": "",
"height": 0,
"hId": 2004,
"perCtn": 0,
"margin": 0,
"matUc": 0,
"markup": 0,
"udfPJPtestLookup": 0,
"completed": false,
"freeQtyPer": 0,
"volume": 0,
"dDesc": "<p>Skirt SC Desc<br></p>",
"footerKey": " 1",
"udfPJPstring1": "",
"i18nField": "{\"bDesc_zh-CN\": \"Skirt SC /\\\\\", \"dDesc_zh-CN\": \"<p>Skirt SC Desc<br></p>\"}",
"sourceType": "pro",
"qty": 1,
"disc": 5,
"oemCurId": 1,
"packingDesc": "",
"refCode": "",
"lotNoId": 0,
"dDesc_ctw": "",
"innerQty": 0,
"unit1Id": 39151,
"costAmt": 0,
"amt": 4.75,
"nw": 0,
"iRev": 1,
"udfTest": "",
"dDesc_zh-CN": "<p>Skirt SC Desc<br></p>",
"packingUnitId": 0,
"bDesc_ctw": "",
"ce01Module": "oldso",
"lot": "A",
"bDesc_haha1": "",
"dDesc_zh-TW": "",
"domAmt": 4.75,
"udfPJPtestStr": "",
"bDesc_ccn": "",
"unitId": 39151,
"innerUnitId": 0,
"udfPJPtestDate": -2209017600000,
"dDesc_ccn": "",
"profit": 0,
"locId": 0,
"bDesc_en": "",
"sourceCliId": 0,
"udfPJPlength": 0,
"length": 0,
"gp": 0,
"imgCode": "",
"dDesc_en": "",
"dualUnitId": 1,
"gw": 0,
"sourceLot": "",
"pc": 0,
"oemSourceType": "",
"proId": 4197,
"width": 0,
"bDesc_zh-CN": "Skirt SC /\\"
}
],
"mainso": [
{
"lastModifyUid": 17,
"useAccess": false,
"virDeptId": 0,
"expiredDate": -2209017600000,
"invShipedStatus": 2,
"position_zh-CN": "",
"sysJson": "{\"autoGenCode\":{\"snId\":438,\"code\":\"SO0220888\",\"sn\":\"888\"}}",
"viewCode": "oldso",
"beId": 304,
"dDate": 1649088000000,
"shipedStatus": 2,
"cusId": 119,
"cusDDate": -2209017600000,
"useAccessBl": false,
"shipedASOStatus": 0,
"id": 2004,
"doctypeId": 0,
"locked": false,
"position_ctw": "",
"lastModifyDate": 1649157004000,
"createUid": 17,
"udfDate": -2209017600000,
"rev": "1",
"lastApproveUid": 0,
"ttlCharge": 0,
"completed": false,
"udfAccId": 0,
"expiredUid": 0,
"freeQtyPer": 0,
"descOrigin": "PRO",
"position_en": "",
"position_zh-TW": "",
"i18nField": "{\"position_zh-CN\": \"\"}",
"manId": 516,
"deposit": 0,
"ttlAmt": 4.75,
"multiFlowSrcId": 0,
"position": "",
"flowTypeId": 15918,
"status": "N",
"weightUnit": "kg",
"multiFlowFlowId": 0,
"tDate": 1649088000000,
"udfstr": "",
"code": "SO0220888",
"cnDeptId": 0,
"multiFlowSrcModule": "",
"amt": 4.75,
"iRev": 1,
"upOrigin": "SOLAST",
"udfTESTTZ": "",
"ce01Module": "oldso",
"curId": 1,
"expired": false,
"rate": 1,
"domAmt": 4.75,
"measUnit": "cbm",
"printCount": 0,
"statusModifyDate": 1649157004000,
"createDate": 1649157004000,
"ttlPaidAmt": 0,
"udfTEST": "",
"depoRate": 0,
"loadGpCoData": false,
"cp": 0,
"useAccessWl": false,
"billingStatus": 0,
"position_ccn": "",
"ttlDisc": 0,
"multiFlowSrcBeId": 0,
"position_haha1": "",
"cuspono": "",
"udftest1109": "",
"useAccessAutoCalc": false,
"staffId": 700,
"domAmtDiff": 0
}
]
},
"messages": [],
"status": true
}
# 保存销售订单
# 一、接口描述
用于新增【销售订单】
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/entity/s/save/oldso |
---|---|
http请求方式 | PUT |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | oldso |
param | String(Query) | 否 | 额外的系统参数;JSON字符串 |
3、请求示例
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/oldso";
String param = "&menuCode=oldso";
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格式数据如下:
{
"sot": {
"values": [
{
"sourceType": "pro",
"proId": 4197,
"qty": 1,
"unitId": 39151,
"amt": 4,
"disc": 10,
"up": 5
}
]
},
"mainso": {
"values": [
{
"beId": 304,
"tDate": "2022-03-30",
"curId": 1,
"cusId": 1,
"rate": 1,
"amt": 4,
"flowTypeId": 15918,
"staffId": 700
}
]
}
}
4、返回示例
{
"recordId": 2005,
"messages": [],
"status": true
}
{
"recordId": 0,
"messages": [
{
"msgDetail": "必填项为空",
"msgCode": "core_101905"
}
],
"status": false
}
# 删除销售订单
# 一、接口描述
用于删除销售订单
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/entity/delete/oldso |
---|---|
http请求方式 | DELETE |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | oldso |
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/oldso";
String param = "&menuCode=oldso&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": [
{
"SO_A_curId": "1",
"SOT_A_qty": "10.0000",
"aiM18ReservedCol_dataIndex": 1,
"SO_A_curId_code": "R",
"CUS_A_id": "1",
"PRO_A_id": "8",
"SO_A_id": "35",
"SO_A_tDate": "2016.08.26",
"SO_A_rate": "1.00000000",
"SOT_A_amt": "105.00",
"PRO_A_code": "PRO004",
"CUS_A_code": "C0001A",
"SOT_A_up": "10.5000",
"SO_A_code": "ITSO16080002",
"SOT_A_unitId_code": "PCS"
}
]
}
# 客户收货单
# 获取客户收货单列表
# 一、接口描述
用于获取客户收货单列表(同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) | 是 | aso |
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=aso&beId=" + beId;
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": "aso",
"size": 1,
"stSearchDisplay": "客户收货单",
"values": [
{
"tDate": "2022-03-17",
"code": "ASO0220883",
"st_id": 55,
"st_code": "ASO0220883",
"st_desc": "ASO0220883",
"mainaso.flowTypeId.flowtype.desc": "All",
"iRev": 1,
"id": 55,
"mainaso.flowTypeId.flowtype.code": "ALL",
"mainaso.lastModifyUid.simpleUser.desc__lang": "JLTEST",
"lastModifyDate": "2022-03-17 21:01:48"
}
]
}
# 新增客户收货单(自动补全)
# 一、接口描述
1. 用于新增【客户收货单】
2. 此接口方法有如下特点:
a. 支持使用code 替代 id 栏位
b. 货币栏位未填时,自动使用本货币
c. 职员栏位未填时,自动使用个人选项中的默认职员
d. 单据日期未填时,根据贸易参数设定中的日期选项取值
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/erp/bsFlow/save/aso |
---|---|
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/aso";
String param = "";
HttpPost post = new HttpPost(url + "?" + param);
post.addHeader("authorization", access_token);
post.addHeader("client_id", ClientID);
StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON);
entity.setContentEncoding("UTF-8");
post.setEntity(entity);
res = client.execute(post);
if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
if (json != null) {
recordId = json.getLongValue("tranId");
}
System.out.println(json);
}
post.releaseConnection();
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (res != null) {
res.close();
}
if (client != null) {
client.close();
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
data数据示例:
{
"beCode": "CAT2019",
"asnRefCode": "000",
"asot": [
{
"sourceCode": "SO0220888",
"sourceLot": "A",
"proCode": "00001",
"sourceType": "oldso",
"unitCode": "PCS",
"qty": 1,
"disc": 5,
"up": 5
}
]
}
4、返回示例
{
"tranId": 57,
"tranCode": "ASO220005",
"message": "",
"status": true
}
# 读取客户收货单
# 一、接口描述
用于读取客户收货单数据
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/read/aso |
---|---|
http请求方式 | GET |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | aso |
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/aso";
String param = "&menuCode=aso&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": {},
"messages": [
{
"msgDetail": "找不到相关记录,记录可能已被删除或你没有访问权限",
"msgCode": "core_141019"
}
],
"status": false
}
{
"data": {
"remaso": [
{
"tradeTerm_ccn": "",
"shipMark": "",
"remarks_en": "",
"tradeTerm": "",
"premarks": "",
"shipAd1_en": "",
"province": "广东",
"packing_haha1": "",
"tel": "",
"shipMark_en": "",
"recipient_haha1": "",
"id": 39,
"fax": "",
"premarks_zh-CN": "",
"shipAd1_zh-CN": "送货地址 第一行 简体",
"payTerm": "",
"heading_zh-TW": "",
"payTerm_ccn": "",
"remarks_ccn": "",
"shipAd4_ccn": "",
"i18nField": "{\"heading_zh-CN\": \"\", \"packing_zh-CN\": \"\", \"payTerm_zh-CN\": \"\", \"remarks_zh-CN\": \"\", \"shipAd1_zh-CN\": \"送货地址 第一行 简体\", \"shipAd2_zh-CN\": \"\", \"shipAd3_zh-CN\": \"\", \"shipAd4_zh-CN\": \"\", \"premarks_zh-CN\": \"\", \"shipMark_zh-CN\": \"\", \"recipient_zh-CN\": \"Jerry.li\", \"tradeTerm_zh-CN\": \"\"}",
"shipAd4_ctw": "",
"shipAd3_zh-TW": "",
"payTerm_ctw": "",
"remarks_ctw": "",
"tradeTerm_en": "",
"city": "深圳",
"shipMark_ctw": "",
"payTerm_en": "",
"iRev": 1,
"shipAd4_zh-TW": "",
"shipAd2_ccn": "",
"ce01Module": "aso",
"shipAd3_en": "",
"shipAd4_zh-CN": "",
"shipAd2_ctw": "",
"shipAd2_haha1": "",
"email": "jerry.li@mac.sz",
"packing_ctw": "",
"heading_haha1": "",
"heading": "",
"premarks_en": "",
"recipient_ctw": "",
"tradeTerm_ctw": "",
"telCountry": "",
"tradeTerm_haha1": "",
"shipAd1": "送货地址 第一行 简体",
"shipAd2": "",
"shipAd3": "",
"premarks_zh-TW": "",
"shipAd4": "",
"shipMark_haha1": "",
"shipAd3_haha1": "",
"gpsLong": 0,
"country": "CN",
"heading_en": "",
"shipMark_zh-CN": "",
"tradeTerm_zh-CN": "",
"shipAd4_haha1": "",
"packing_ccn": "",
"recipient_ccn": "",
"heading_ccn": "",
"shipAd2_zh-TW": "",
"payTerm_zh-TW": "",
"remarks_zh-TW": "",
"hId": 57,
"heading_ctw": "",
"tradeTerm_zh-TW": "",
"shipMark_ccn": "",
"zipcode": "",
"premarks_haha1": "",
"shipAd2_en": "",
"shipAd1_haha1": "",
"remarks_zh-CN": "",
"packing_en": "",
"gpsLat": 0,
"payTerm_zh-CN": "",
"shipMark_zh-TW": "",
"shipAd1_ccn": "",
"shipCodeId": 284,
"shipAd3_ctw": "",
"recipient_zh-CN": "Jerry.li",
"packing": "",
"heading_zh-CN": "",
"premarks_ccn": "",
"payTerm_haha1": "",
"recipient_en": "",
"packing_zh-TW": "",
"shipAd3_zh-CN": "",
"remarks_haha1": "",
"shipAd1_ctw": "",
"shipAd3_ccn": "",
"recipient_zh-TW": "",
"packing_zh-CN": "",
"telArea": "",
"shipAd1_zh-TW": "",
"shipAd4_en": "",
"premarks_ctw": "",
"recipient": "Jerry.li",
"shipAd2_zh-CN": "",
"remarks": ""
}
],
"asot": [
{
"sourceId": 2004,
"unit2Id": 39151,
"shipMark": "",
"dualQty": 0,
"qty2": 0,
"itemNo": " 1",
"qty1": 1,
"beId": 304,
"bDesc": "Skirt SC /\\",
"bDesc_zh-TW": "",
"newLotno": 0,
"id": 97,
"up": 5,
"ctn": 0,
"qcRequired": false,
"dDesc_haha1": "",
"height": 0,
"hId": 57,
"perCtn": 0,
"soId": 2004,
"completed": false,
"freeQtyPer": 0,
"volume": 0,
"dDesc": "<p>Skirt SC Desc<br></p>",
"i18nField": "{\"bDesc_zh-CN\": \"Skirt SC /\\\\\", \"dDesc_zh-CN\": \"<p>Skirt SC Desc<br></p>\"}",
"sourceType": "oldso",
"qty": 1,
"disc": 5,
"packingDesc": "",
"refCode": "",
"lotNoId": 0,
"dDesc_ctw": "",
"innerQty": 0,
"unit1Id": 39151,
"nw": 0,
"amt": 4.75,
"iRev": 1,
"dDesc_zh-CN": "<p>Skirt SC Desc<br></p>",
"packingUnitId": 0,
"bDesc_ctw": "",
"ce01Module": "aso",
"lot": "A",
"bDesc_haha1": "",
"dDesc_zh-TW": "",
"domAmt": 4.75,
"bDesc_ccn": "",
"innerUnitId": 0,
"unitId": 39151,
"dDesc_ccn": "",
"soLot": "A",
"bDesc_en": "",
"length": 0,
"dDesc_en": "",
"dualUnitId": 1,
"gw": 0,
"sourceLot": "A",
"proId": 4197,
"width": 0,
"cuspono": "",
"bDesc_zh-CN": "Skirt SC /\\"
}
],
"mainaso": [
{
"lastModifyUid": 17,
"useAccess": false,
"virDeptId": 0,
"expiredDate": -2209017600000,
"invShipedStatus": 0,
"position_zh-CN": "",
"sysJson": "{\"autoGenCode\":{\"snId\":1041,\"code\":\"ASO220005\",\"sn\":\"5\"}}",
"viewCode": "aso",
"beId": 304,
"shipedStatus": 0,
"useAccessBl": false,
"id": 57,
"doctypeId": 0,
"locked": false,
"position_ctw": "",
"lastModifyDate": 1649158641000,
"createUid": 17,
"rev": "1",
"lastApproveUid": 17,
"ttlCharge": 0,
"completed": false,
"expiredUid": 0,
"freeQtyPer": 0,
"descOrigin": "SOLAST",
"position_en": "",
"position_zh-TW": "",
"i18nField": "{\"position_zh-CN\": \"\"}",
"manId": 516,
"ttlAmt": 4.75,
"multiFlowSrcId": 0,
"position": "",
"flowTypeId": 15918,
"status": "Y",
"weightUnit": "kg",
"multiFlowFlowId": 0,
"tDate": 1649088000000,
"code": "ASO220005",
"cnDeptId": 0,
"multiFlowSrcModule": "",
"amt": 4.75,
"iRev": 1,
"upOrigin": "SOLAST",
"ce01Module": "aso",
"curId": 1,
"expired": false,
"asnRefId": 119,
"rate": 1,
"domAmt": 4.75,
"measUnit": "cbm",
"printCount": 0,
"statusModifyDate": 1649158641000,
"createDate": 1649158641000,
"asnRefType": "cus",
"useAccessWl": false,
"position_ccn": "",
"ttlDisc": 0,
"multiFlowSrcBeId": 0,
"position_haha1": "",
"useAccessAutoCalc": false,
"staffId": 700,
"domAmtDiff": 0
}
]
},
"messages": [],
"status": true
}
# 保存客户收货单
# 一、接口描述
用于新增【客户收货单】
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/entity/s/save/aso |
---|---|
http请求方式 | PUT |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | aso |
param | String(Query) | 否 | 额外的系统参数;JSON字符串 |
3、请求示例
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/aso";
String param = "&menuCode=aso";
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格式数据如下:
{
"asot": {
"values": [
{
"sourceType": "pro",
"proId": 4197,
"qty": 1,
"unitId": 39151,
"amt": 4,
"disc": 10,
"up": 5,
"locId": 134
}
]
},
"mainaso": {
"values": [
{
"beId": 304,
"tDate": "2022-04-05",
"curId": 1,
"asnRefId": 1,
"rate": 1,
"amt": 4,
"flowTypeId": 15918,
"staffId": 700
}
]
}
}
4、返回示例
{
"recordId": 58,
"messages": [],
"status": true
}
{
"recordId": 0,
"messages": [
{
"msgDetail": "必填项为空",
"msgCode": "core_101905"
}
],
"status": false
}
# 删除客户收货单
# 一、接口描述
用于删除客户收货单
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/entity/delete/aso |
---|---|
http请求方式 | DELETE |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | aso |
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/aso";
String param = "&menuCode=aso&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": [
{
"ASO_A_id": "26",
"ASO_A_tDate": "2019.03.25",
"aiM18ReservedCol_dataIndex": 1,
"ASOT_A_unitId_code": "个",
"CUS_A_id": "8",
"ASOT_A_qty": "1.0000",
"ASO_A_curId_code": "H",
"PRO_A_id": "6",
"ASO_A_curId": "2",
"ASOT_A_amt": "200.00",
"ASO_A_code": "ASO190007",
"ASO_A_rate": "1.00000000",
"PRO_A_code": "COMPUTER_03",
"CUS_A_code": "JL001",
"ASOT_A_up": "200.0000"
}
]
}
# 送货单
# 获取送货单列表
# 一、接口描述
用于获取送货单列表(同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) | 是 | dn |
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=dn&beId=" + beId;
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": "dn",
"size": 1,
"stSearchDisplay": "送货单",
"values": [
{
"tDate": "2022-04-01",
"code": "DN0220017",
"st_code": "DN0220017",
"st_desc": "DN0220017",
"iRev": 1,
"maindn.lastModifyUid.simpleUser.desc__lang": "JLTEST",
"maindn.curId.cur.sym": "HK$",
"st_id": 1019,
"maindn.cusId.cus.code": "000",
"maindn.flowTypeId.flowtype.desc": "All",
"id": 1019,
"maindn.cusId.cus.desc__lang": "000 Sc",
"lastModifyDate": "2022-04-01 19:45:06",
"maindn.flowTypeId.flowtype.code": "ALL"
}
]
}
# 新增送货单(自动补全)
# 一、接口描述
1. 用于新增【送货单】
2. 此接口方法有如下特点:
a. 支持使用code 替代 id 栏位
b. 货币栏位未填时,自动使用本货币
c. 职员栏位未填时,自动使用个人选项中的默认职员
d. 单据日期未填时,根据贸易参数设定中的日期选项取值
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/erp/bsFlow/save/dn |
---|---|
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/dn";
String param = "";
HttpPost post = new HttpPost(url + "?" + param);
post.addHeader("authorization", access_token);
post.addHeader("client_id", ClientID);
StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON);
entity.setContentEncoding("UTF-8");
post.setEntity(entity);
res = client.execute(post);
if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
if (json != null) {
recordId = json.getLongValue("tranId");
}
System.out.println(json);
}
post.releaseConnection();
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (res != null) {
res.close();
}
if (client != null) {
client.close();
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
data数据示例:
{
"beCode": "CAT2019",
"cusCode": "000",
"dnt": [
{
"sourceCode": "ASO220005",
"sourceLot": "A",
"locCode": "CK12",
"proCode": "00001",
"sourceType": "aso",
"unitCode": "PCS",
"qty": 1,
"disc": 5,
"up": 5
}
]
}
4、返回示例
{
"tranId": 1021,
"tranCode": "DN0220021",
"message": "",
"status": true
}
# 读取送货单
# 一、接口描述
用于读取送货单数据
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/read/dn |
---|---|
http请求方式 | GET |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | dn |
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/dn";
String param = "&menuCode=dn&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": {},
"messages": [
{
"msgDetail": "找不到相关记录,记录可能已被删除或你没有访问权限",
"msgCode": "core_141019"
}
],
"status": false
}
{
"data": {},
"messages": [],
"status": true
}
# 保存送货单
# 一、接口描述
用于新增【送货单】
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/entity/s/save/dn |
---|---|
http请求方式 | PUT |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | dn |
param | String(Query) | 否 | 额外的系统参数;JSON字符串 |
3、请求示例
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/dn";
String param = "&menuCode=dn";
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格式数据如下:
{
"maindn": {
"values": [
{
"beId": 304,
"tDate": "2022-04-05",
"curId": 1,
"cusId": 1,
"rate": 1,
"amt": 4,
"flowTypeId": 15918,
"staffId": 700
}
]
},
"dnt": {
"values": [
{
"sourceType": "pro",
"proId": 4197,
"qty": 1,
"unitId": 39151,
"amt": 4,
"disc": 10,
"up": 5,
"locId": 134
}
]
}
}
4、返回示例
{
"recordId": 1022,
"messages": [],
"status": true
}
{
"recordId": 0,
"messages": [
{
"msgDetail": "必填项为空",
"msgCode": "core_101905"
}
],
"status": false
}
# 删除送货单
# 一、接口描述
用于删除送货单
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/entity/delete/dn |
---|---|
http请求方式 | DELETE |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | dn |
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/dn";
String param = "&menuCode=dn&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": [
{
"DNT_A_amt": "52.50",
"aiM18ReservedCol_dataIndex": 1,
"DN_A_rate": "1.00000000",
"DNT_A_up": "10.5000",
"CUS_A_id": "27074",
"DNT_A_unitId_code": "个",
"DN_A_code": "ITDN17030001",
"DN_A_curId": "1",
"PRO_A_id": "18",
"DN_A_tDate": "2017.03.24",
"DNT_A_qty": "5.0000",
"DN_A_id": "166",
"DN_A_curId_code": "R",
"PRO_A_code": "ITPRO001",
"CUS_A_code": "IT002"
}
]
}
# 销售退货
# 获取销售退货列表
# 一、接口描述
用于获取销售退货列表(同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) | 是 | sret |
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=sret&beId=" + beId;
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": "sret",
"size": 1,
"stSearchDisplay": "销售退货",
"values": [
{
"tDate": "2022-03-17",
"code": "SR0220883",
"st_code": "SR0220883",
"st_desc": "SR0220883",
"mainsret.cusId.cus.desc__lang": "000 Sc",
"iRev": 1,
"mainsret.flowTypeId.flowtype.desc": "All",
"mainsret.flowTypeId.flowtype.code": "ALL",
"st_id": 207,
"mainsret.lastModifyUid.simpleUser.desc__lang": "JLTEST",
"mainsret.cusId.cus.code": "000",
"id": 207,
"lastModifyDate": "2022-03-17 21:40:01",
"mainsret.curId.cur.sym": "¥"
}
]
}
# 新增销售退货(自动补全)
# 一、接口描述
1. 用于新增【销售退货】
2. 此接口方法有如下特点:
a. 支持使用code 替代 id 栏位
b. 货币栏位未填时,自动使用本货币
c. 职员栏位未填时,自动使用个人选项中的默认职员
d. 单据日期未填时,根据贸易参数设定中的日期选项取值
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/erp/bsFlow/save/sret |
---|---|
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/sret";
String param = "";
HttpPost post = new HttpPost(url + "?" + param);
post.addHeader("authorization", access_token);
post.addHeader("client_id", ClientID);
StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON);
entity.setContentEncoding("UTF-8");
post.setEntity(entity);
res = client.execute(post);
if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
if (json != null) {
recordId = json.getLongValue("tranId");
}
System.out.println(json);
}
post.releaseConnection();
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (res != null) {
res.close();
}
if (client != null) {
client.close();
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
data数据示例:
{
"beCode": "CAT2019",
"cusCode": "000",
"srett": [
{
"sourceCode": "DN0220021",
"sourceLot": "A",
"locCode": "CK12",
"proCode": "00001",
"sourceType": "dn",
"unitCode": "PCS",
"qty": 1,
"disc": 5,
"up": 5
}
]
}
4、返回示例
{
"tranId": 210,
"tranCode": "SRE220010",
"message": "",
"status": true
}
# 读取销售退货
# 一、接口描述
用于读取销售退货数据
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/read/sret |
---|---|
http请求方式 | GET |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | sret |
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/sret";
String param = "&menuCode=sret&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": {},
"messages": [
{
"msgDetail": "找不到相关记录,记录可能已被删除或你没有访问权限",
"msgCode": "core_141019"
}
],
"status": false
}
{
"data": {},
"messages": [],
"status": true
}
# 保存销售退货
# 一、接口描述
用于新增【销售退货】
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/entity/s/save/sret |
---|---|
http请求方式 | PUT |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | sret |
param | String(Query) | 否 | 额外的系统参数;JSON字符串 |
3、请求示例
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/sret";
String param = "&menuCode=sret";
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格式数据如下:
{
"mainsret": {
"values": [
{
"beId": 304,
"tDate": "2022-04-05",
"curId": 1,
"cusId": 1,
"rate": 1,
"amt": 4,
"flowTypeId": 15918,
"staffId": 700
}
]
},
"srett": {
"values": [
{
"sourceType": "pro",
"proId": 4197,
"qty": 1,
"unitId": 39151,
"amt": 4,
"disc": 10,
"up": 5,
"locId": 134
}
]
}
}
4、返回示例
{
"recordId": 146,
"messages": [],
"status": true
}
{
"recordId": 0,
"messages": [
{
"msgDetail": "必填项为空",
"msgCode": "core_101905"
}
],
"status": false
}
# 删除销售退货
# 一、接口描述
用于删除销售退货
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/entity/delete/sret |
---|---|
http请求方式 | DELETE |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | sret |
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/sret";
String param = "&menuCode=sret&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": [
{
"SRET_A_rate": "1.00000000",
"SRET_A_id": "45",
"aiM18ReservedCol_dataIndex": 1,
"SRET_A_curId": "2",
"SRETT_A_unitId_code": "套",
"CUS_A_id": "118",
"SRET_A_tDate": "2017.05.09",
"PRO_A_id": "3927",
"SRET_A_curId_code": "H",
"SRETT_A_qty": "1.0000",
"SRETT_A_amt": "15,000.00",
"SRET_A_code": "SRE170002",
"SRETT_A_up": "15,000.0000",
"PRO_A_code": "MXPC3",
"CUS_A_code": ".B268560"
}
]
}
# 销售发票
# 获取销售发票列表
# 一、接口描述
用于获取销售发票列表(同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) | 是 | siso |
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=siso&beId=" + beId;
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": "siso",
"size": 1,
"stSearchDisplay": "销售发票",
"values": [
{
"tDate": "2022-03-17",
"code": "DN0220883",
"st_code": "DN0220883",
"st_desc": "DN0220883",
"iRev": 1,
"maintar.cusId.cus.desc__lang": "000 Sc",
"maintar.cusId.cus.code": "000",
"maintar.curId.cur.sym": "¥",
"maintar.flowTypeId.flowtype.code": "ALL",
"st_id": 1267,
"maintar.flowTypeId.flowtype.desc": "All",
"id": 1267,
"lastModifyDate": "2022-03-17 21:33:01",
"maintar.lastModifyUid.simpleUser.desc__lang": "JLTEST"
}
]
}
# 新增销售发票(自动补全)
# 一、接口描述
1. 用于新增【销售发票】
2. 此接口方法有如下特点:
a. 支持使用code 替代 id 栏位
b. 货币栏位未填时,自动使用本货币
c. 职员栏位未填时,自动使用个人选项中的默认职员
d. 单据日期未填时,根据贸易参数设定中的日期选项取值
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/erp/bsFlow/save/siso |
---|---|
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/siso";
String param = "";
HttpPost post = new HttpPost(url + "?" + param);
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数据示例:
{
"art": [
{
"sourceCode": "DN0220021",
"sourceLot": "A",
"locCode": "CK12",
"proCode": "00001",
"sourceType": "dn",
"unitCode": "PCS",
"qty": 1,
"disc": 5,
"up": 5
}
],
"beCode": "CAT2019",
"cusCode": "000"
}
4、返回示例
{
"tranId": 1269,
"tranCode": "SISO220706",
"message": "",
"status": true
}
# 读取销售发票
# 一、接口描述
用于读取销售发票数据
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/read/oldqu |
---|---|
http请求方式 | GET |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | siso |
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/siso";
String param = "&menuCode=siso&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": {},
"messages": [
{
"msgDetail": "找不到相关记录,记录可能已被删除或你没有访问权限",
"msgCode": "core_141019"
}
],
"status": false
}
{
"data": {},
"messages": [],
"status": true
}
# 保存销售发票
# 一、接口描述
用于新增【销售发票】
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/entity/s/save/siso |
---|---|
http请求方式 | PUT |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | siso |
param | String(Query) | 否 | 额外的系统参数;JSON字符串 |
3、请求示例
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/siso";
String param = "&menuCode=siso";
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格式数据如下:
{
"art": {
"values": [
{
"sourceType": "pro",
"proId": 4197,
"qty": 1,
"unitId": 39151,
"amt": 4,
"disc": 10,
"up": 5,
"locId": 134
}
]
},
"maintar": {
"values": [
{
"beId": 304,
"tDate": "2022-04-05",
"curId": 1,
"cusId": 1,
"rate": 1,
"amt": 4,
"flowTypeId": 15918,
"staffId": 700
}
]
}
}
4、返回示例
{
"recordId": 208,
"messages": [],
"status": true
}
{
"recordId": 0,
"messages": [
{
"msgDetail": "必填项为空",
"msgCode": "core_101905"
}
],
"status": false
}
# 删除销售发票
# 一、接口描述
用于删除销售发票
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/entity/delete/siso |
---|---|
http请求方式 | DELETE |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | siso |
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/siso";
String param = "&menuCode=siso&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": [
{
"MAINTAR_A_rate": "1.00000000",
"aiM18ReservedCol_dataIndex": 1,
"MAINTAR_A_id": "1204",
"ART_A_amt": "0.00",
"ART_A_unitId_code": "PCS",
"ART_A_up": "0.0000",
"CUS_A_id": "120",
"MAINTAR_A_curId_code": "H",
"PRO_A_id": "5839",
"MAINTAR_A_code": "SISO200655",
"ART_A_qty": "100.0000",
"MAINTAR_A_curId": "2",
"MAINTAR_A_tDate": "2020.11.05",
"PRO_A_code": "EXACTLOTNO",
"CUS_A_code": "000001"
}
]
}