库存
# 存货创始
# 获取存货创始列表
# 一、接口描述
用于获取存货创始列表(同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) | 是 | os |
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=os&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": "os",
"size": 36,
"stSearchDisplay": "Opening Stock",
"values": [
{
"mainos.locId.loc.code": "SZO",
"tDate": "2021-12-13",
"mainos.lastModifyUid.simpleUser.desc__lang": "Ivan Tan",
"code": "ITOS21121301",
"st_code": "ITOS21121301",
"st_desc": "ITOS21121301",
"mainos.locId.loc.locTypeId.loctype.desc": "合格",
"iRev": 4,
"st_id": 2128,
"mainos.locId.loc.locTypeId.loctype.code": "PHY",
"id": 2128,
"mainos.locId.loc.desc": "深圳仓",
"lastModifyDate": "2022-01-19 17:32:22"
}
]
}
# 读取存货创始
# 一、接口描述
用于读取【存货创始】数据
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/read/os |
---|---|
http请求方式 | GET |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | os |
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/os";
String param = "&menuCode=os&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": {
"ost": [
{
"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,
"bDesc_zh-TW": "",
"lotnoLookupAttr19": 0,
"newLotno": 0,
"lotnoLot": "A",
"id": 12584,
"dDesc_haha1": "",
"lotnoNumAttr20": 0,
"lotnoLookupAttr12": 0,
"lotnoLookupAttr13": 0,
"lotnoLookupAttr10": 0,
"lotnoLookupAttr11": 0,
"i18nField": "{\"dDesc_en\": \"<p>Ivan Testing Product(繁体)<br></p>\", \"bDesc_zh-CN\": \"Ivan Testing Product\", \"dDesc_zh-CN\": \"<p>Ivan Testing Product(简体)<br></p>\", \"dDesc_zh-TW\": \"<p>Ivan Testing Product(繁体)<br></p>\"}",
"sourceType": "pro",
"costAmt": 0,
"iRev": 1,
"bDesc_ctw": "",
"ce01Module": "os",
"lot": "B",
"lotnoDateAttr3": -2209017600000,
"lotnoDateAttr4": 1257004800000,
"lotnoDateAttr1": -2245737600000,
"lotnoDateAttr2": -2561356800000,
"lotnoDateAttr7": -2209017600000,
"lotnoDateAttr8": -2209017600000,
"bDesc_ccn": "",
"lotnoDateAttr5": -2209017600000,
"lotnoDateAttr6": -2209017600000,
"unitId": 24,
"lotnoDateAttr9": -2209017600000,
"locId": 7,
"bDesc_en": "",
"lotnoTextAttr1": "",
"lotnoTextAttr2": "",
"lotnoTextAttr3": "",
"lotnoTextAttr4": "test",
"lotnoTextAttr5": "",
"lotnoTextAttr6": "",
"lotnoTextAttr7": "",
"lotnoTextAttr8": "",
"lotnoTextAttr9": "",
"bDesc_zh-CN": "Ivan Testing Product",
"sourceId": 0,
"dualQty": 0.34,
"itemNo": " 1",
"beId": 11,
"bDesc": "Ivan Testing Product",
"up": 0,
"hId": 2129,
"lotnoNumAttr1": 1,
"lotnoNumAttr2": 0,
"lotnoNumAttr3": 3,
"lotnoNumAttr4": 4,
"lotnoExpDate": 1902240000000,
"dDesc": "<p>Ivan Testing Product(简体)<br></p>",
"footerKey": " 2",
"qty": 3,
"lotnoNumAttr5": 0,
"lotnoNumAttr6": 0,
"lotnoNumAttr7": 0,
"lotnoNumAttr8": 0,
"lotnoNumAttr9": 0,
"lotNoId": 5136,
"lotnoTextAttr16": "",
"dDesc_ctw": "",
"lotnoTextAttr15": "",
"lotnoTextAttr18": "",
"lotnoTextAttr17": "",
"lotnoTextAttr12": "",
"lotnoTextAttr11": "",
"lotnoDateAttr20": -2209017600000,
"udfAmt": 0,
"lotnoTextAttr14": "",
"lotnoTextAttr13": "",
"amt": 0,
"dDesc_zh-CN": "<p>Ivan Testing Product(简体)<br></p>",
"lotnoTextAttr19": "",
"bDesc_haha1": "",
"dDesc_zh-TW": "<p>Ivan Testing Product(繁体)<br></p>",
"domAmt": 0,
"dDesc_ccn": "",
"lotnoTextAttr10": "",
"dDesc_en": "<p>Ivan Testing Product(繁体)<br></p>",
"dualUnitId": 6,
"lotnoLookupAttr5": 0,
"lotnoLookupAttr6": 0,
"sourceLot": "",
"lotnoLookupAttr7": 0,
"lotnoDateAttr18": -2209017600000,
"lotnoLookupAttr8": 0,
"lotnoDateAttr19": -2209017600000,
"lotno": "ITST21121302",
"lotnoLookupAttr9": 0,
"proId": 18,
"lotnoDateAttr12": -2209017600000,
"lotnoDateAttr13": -2209017600000,
"lotnoDateAttr10": -2209017600000,
"lotnoDateAttr11": -2209017600000,
"lotnoTextAttr20": "",
"lotnoLookupAttr1": 35,
"lotnoDateAttr16": -2209017600000,
"lotnoLookupAttr2": 14,
"lotnoDateAttr17": -2209017600000,
"lotnoLookupAttr3": 3,
"lotnoDateAttr14": -2209017600000,
"lotnoLookupAttr4": 0,
"lotnoDateAttr15": -2209017600000
}
],
"mainos": [
{
"tDate": 1639324800000,
"lastModifyUid": 11,
"code": "ITOS21121302",
"cnDeptId": 29,
"useAccess": false,
"virDeptId": 0,
"expiredDate": -2209017600000,
"iRev": 1,
"sysJson": "",
"upOrigin": "GRN",
"viewCode": "os",
"ce01Module": "os",
"stlotId": 112,
"beId": 11,
"curId": 1,
"expired": false,
"rate": 1,
"printCount": 0,
"useAccessBl": false,
"id": 2129,
"doctypeId": 0,
"statusModifyDate": 1639370571000,
"locked": false,
"lastModifyDate": 1639370571000,
"createUid": 11,
"locId": 7,
"createDate": 1639370571000,
"rev": "2",
"lastApproveUid": 11,
"stId": 0,
"expiredUid": 0,
"useAccessWl": false,
"descOrigin": "GRN",
"iniDate": 1639324800000,
"flowTypeId": 1397,
"useAccessAutoCalc": false,
"staffId": 723,
"status": "Y"
}
],
"remos": [
{
"hId": 2129,
"i18nField": "{\"remarks_zh-CN\": \"\"}",
"remarks_zh-CN": "",
"remarks_ccn": "",
"remarks_en": "",
"remarks_haha1": "",
"iRev": 1,
"id": 2129,
"remarks_zh-TW": "",
"remarks": "",
"remarks_ctw": "",
"ce01Module": "stlot"
}
]
},
"messages": [],
"status": true
}
# 保存存货创始
# 一、接口描述
用于新增【存货创始】
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/save/os |
---|---|
http请求方式 | PUT |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | os |
param | String(Query) | 否 | 额外的系统参数;JSON字符串 |
3、请求示例
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/os";
String param = "&menuCode=os";
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格式数据如下:
{
"mainos": {
"values": [
{
"beId": 11,
"code": "ITOS220324A",
"tDate": "2022-03-04",
"locId": 108,
"curId": 1,
"rate": 1,
"flowTypeId": 1397,
"staffId": 723
}
]
},
"ost": {
"values": [
{
"sourceType": "pro",
"proId": 18,
"unitId": 24,
"locId": 108,
"qty": 10,
"up": 5
}
]
}
}
4、返回示例
{
"recordId": 2157,
"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/os |
---|---|
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/os";
HttpPost post = new HttpPost(url);
post.addHeader("authorization", access_token);
post.addHeader("client_id", ClientID);
StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON);
entity.setContentEncoding("UTF-8");
post.setEntity(entity);
res = client.execute(post);
if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
if (json != null) {
recordId = json.getLongValue("tranId");
}
System.out.println(json);
}
post.releaseConnection();
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (res != null) {
res.close();
}
if (client != null) {
client.close();
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
data数据示例
{
"beCode": "IT",
"ost": [
{
"proCode": "ITPRO001",
"unitCode": "个",
"locCode": "SZO",
"qty": 1,
"up": 10
}
]
}
4、返回示例
{
"tranId": 2158,
"tranCode": "OS0220269",
"message": "",
"status": true
}
# 删除存货创始
# 一、接口描述
用于删除存货创始
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/delete/os |
---|---|
http请求方式 | DELETE |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | os |
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/os";
String param = "&menuCode=os&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) | 是 | k |
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=k&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": "k",
"size": 11,
"stSearchDisplay": "Stock Adjustment",
"values": [
{
"tDate": "2022-01-01",
"maink.locId.loc.desc": "深圳仓",
"code": "ITK20220101A",
"st_code": "ITK20220101A",
"maink.locId.loc.code": "SZO",
"maink.locId.loc.locTypeId.loctype.desc": "合格",
"st_desc": "ITK20220101A",
"iRev": 1,
"maink.locId.loc.locTypeId.loctype.code": "PHY",
"maink.lastModifyUid.simpleUser.desc__lang": "Ivan Tan",
"st_id": 178,
"id": 178,
"lastModifyDate": "2022-01-07 12:49:33"
}
]
}
# 读取货存整理
# 一、接口描述
用于读取【货存整理】数据
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/read/k |
---|---|
http请求方式 | GET |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | k |
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/k";
String param = "&menuCode=k&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": {
"remk": [
{
"hId": 178,
"i18nField": "{\"remarks_zh-CN\": \"\"}",
"remarks_zh-CN": "",
"remarks_ccn": "",
"remarks_en": "",
"remarks_haha1": "",
"iRev": 1,
"id": 178,
"remarks_zh-TW": "",
"remarks": "",
"remarks_ctw": "",
"ce01Module": "st"
}
],
"kt": [
{
"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,
"bDesc_zh-TW": "",
"lotnoLookupAttr19": 0,
"newLotno": 0,
"lotnoLot": "A",
"id": 394,
"dDesc_haha1": "",
"sourceItemNo": "",
"lotnoNumAttr20": 0,
"lotnoLookupAttr12": 0,
"lotnoLookupAttr13": 0,
"lotnoLookupAttr10": 0,
"lotnoLookupAttr11": 0,
"i18nField": "{\"bDesc_zh-CN\": \"auto assign\", \"dDesc_zh-CN\": \"\"}",
"sourceType": "pro",
"costAmt": 0,
"iRev": 1,
"bDesc_ctw": "",
"ce01Module": "k",
"lot": "A",
"lotnoDateAttr3": -2209017600000,
"lotnoDateAttr4": -2209017600000,
"lotnoDateAttr1": -2209017600000,
"lotnoDateAttr2": -2209017600000,
"lotnoDateAttr7": -2209017600000,
"lotnoDateAttr8": -2209017600000,
"bDesc_ccn": "",
"lotnoDateAttr5": -2209017600000,
"lotnoDateAttr6": -2209017600000,
"unitId": 76,
"lotnoDateAttr9": -2209017600000,
"locId": 7,
"bDesc_en": "",
"lotnoTextAttr1": "",
"lotnoTextAttr2": "",
"lotnoTextAttr3": "",
"lotnoTextAttr4": "",
"lotnoTextAttr5": "",
"lotnoTextAttr6": "",
"lotnoTextAttr7": "",
"lotnoTextAttr8": "",
"lotnoTextAttr9": "",
"bDesc_zh-CN": "auto assign",
"sourceId": 0,
"dualQty": 87,
"itemNo": " 1",
"beId": 11,
"bDesc": "auto assign",
"up": 0,
"hId": 178,
"lotnoNumAttr1": 0,
"lotnoNumAttr2": 0,
"lotnoNumAttr3": 0,
"lotnoNumAttr4": 0,
"lotnoExpDate": 253402271999000,
"dDesc": "",
"footerKey": " 1",
"qty": -93,
"lotnoNumAttr5": 0,
"lotnoNumAttr6": 0,
"lotnoNumAttr7": 0,
"lotnoNumAttr8": 0,
"lotnoNumAttr9": 0,
"lotNoId": 2281,
"lotnoTextAttr16": "",
"dDesc_ctw": "",
"lotnoTextAttr15": "",
"lotnoTextAttr18": "",
"lotnoTextAttr17": "",
"lotnoTextAttr12": "",
"lotnoTextAttr11": "",
"lotnoDateAttr20": -2209017600000,
"lotnoTextAttr14": "",
"lotnoTextAttr13": "",
"amt": 0,
"dDesc_zh-CN": "",
"lotnoTextAttr19": "",
"bDesc_haha1": "",
"dDesc_zh-TW": "",
"domAmt": 0,
"dDesc_ccn": "",
"lotnoTextAttr10": "",
"dDesc_en": "",
"dualUnitId": 51,
"lotnoLookupAttr5": 0,
"lotnoLookupAttr6": 0,
"sourceLot": "",
"lotnoLookupAttr7": 0,
"lotnoDateAttr18": -2209017600000,
"lotnoLookupAttr8": 0,
"lotnoDateAttr19": -2209017600000,
"lotno": "ITOS18110001",
"lotnoLookupAttr9": 0,
"proId": 62,
"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
}
],
"maink": [
{
"tDate": 1640966400000,
"lastModifyUid": 11,
"code": "ITK20220101A",
"cnDeptId": 29,
"useAccess": false,
"virDeptId": 0,
"expiredDate": -2209017600000,
"iRev": 1,
"sysJson": "",
"upOrigin": "GRN",
"viewCode": "k",
"ce01Module": "k",
"stlotId": 0,
"beId": 11,
"curId": 1,
"expired": false,
"rate": 1,
"printCount": 0,
"useAccessBl": false,
"id": 178,
"doctypeId": 0,
"statusModifyDate": 1641530973000,
"locked": false,
"lastModifyDate": 1641530973000,
"createUid": 11,
"locId": 7,
"createDate": 1641530973000,
"moveToId": 0,
"rev": "2",
"lastApproveUid": 11,
"stId": 44,
"expiredUid": 0,
"useAccessWl": false,
"descOrigin": "GRN",
"moveFoId": 0,
"flowTypeId": 1397,
"useAccessAutoCalc": false,
"staffId": 723,
"status": "N"
}
]
},
"messages": [],
"status": true
}
# 保存货存整理
# 一、接口描述
用于新增【货存整理】
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/save/k |
---|---|
http请求方式 | PUT |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | k |
param | String(Query) | 否 | 额外的系统参数;JSON字符串 |
3、请求示例
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/k";
String param = "&menuCode=k";
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格式数据如下:
{
"maink": {
"values": [
{
"beId": 11,
"code": "ITK220324A",
"tDate": "2022-03-24",
"curId": 1,
"rate": 1,
"flowTypeId": 1397,
"staffId": 723
}
]
},
"kt": {
"values": [
{
"sourceType": "pro",
"proId": 18,
"unitId": 24,
"qty": -1,
"locId": 7,
"newLotno": 0
}
]
}
}
4、返回示例
{
"recordId": 184,
"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/k |
---|---|
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/k";
HttpPost post = new HttpPost(url);
post.addHeader("authorization", access_token);
post.addHeader("client_id", ClientID);
StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON);
entity.setContentEncoding("UTF-8");
post.setEntity(entity);
res = client.execute(post);
if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
if (json != null) {
recordId = json.getLongValue("tranId");
}
System.out.println(json);
}
post.releaseConnection();
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (res != null) {
res.close();
}
if (client != null) {
client.close();
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
data数据示例
{
"beCode": "IT",
"kt": [
{
"proCode": "ITPRO001",
"unitCode": "个",
"qty": -1,
"locCode": "SZO",
"newLotno": 0
}
]
}
4、返回示例
{
"tranId": 185,
"tranCode": "K00220053",
"message": "",
"status": true
}
# 删除货存整理
# 一、接口描述
用于删除货存整理
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/delete/k |
---|---|
http请求方式 | DELETE |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | k |
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/k";
String param = "&menuCode=k&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) | 是 | move |
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=move&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": "move",
"size": 7,
"stSearchDisplay": "Internal Transfer",
"values": [
{
"mainmove.locId.loc.locTypeId.loctype.code": "PHY",
"tDate": "2021-09-27",
"mainmove.lastModifyUid.simpleUser.desc__lang": "Ivan Tan",
"code": "MOV210052",
"st_code": "MOV210052",
"st_desc": "MOV210052",
"iRev": 4,
"mainmove.locId.loc.code": "SZO",
"st_id": 90,
"mainmove.locId.loc.desc": "深圳仓",
"id": 90,
"mainmove.locId.loc.locTypeId.loctype.desc": "合格",
"lastModifyDate": "2021-09-27 10:15:22"
}
]
}
# 读取内部转移
# 一、接口描述
用于读取【内部转移】数据
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/read/move |
---|---|
http请求方式 | GET |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | move |
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/move";
String param = "&menuCode=move&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": {
"mainmove": [
{
"tDate": 1632672000000,
"lastModifyUid": 11,
"code": "MOV210052",
"cnDeptId": 29,
"useAccess": false,
"virDeptId": 0,
"expiredDate": -2209017600000,
"iRev": 4,
"sysJson": "{\"autoGenCode\":{\"snId\":453,\"sn\":\"52\"}}",
"upOrigin": "",
"viewCode": "move",
"poscoreShopTranNoteId": 0,
"ce01Module": "move",
"beId": 11,
"kStatus": "transit",
"alocId": 122,
"expired": false,
"printCount": 0,
"useAccessBl": false,
"id": 90,
"doctypeId": 0,
"statusModifyDate": 1632708485000,
"locked": false,
"lastModifyDate": 1632708922000,
"createUid": 11,
"locId": 7,
"createDate": 1632708485000,
"rev": "4",
"lastApproveUid": 0,
"expiredUid": 0,
"useAccessWl": false,
"descOrigin": "PI",
"flowTypeId": 1397,
"kDate": 1632672000000,
"deliveryRequire": false,
"useAccessAutoCalc": false,
"staffId": 723,
"status": "N"
}
],
"movet": [
{
"sourceId": 0,
"dDesc_ctw": "",
"dualQty": 1,
"costAmt": 0,
"iRev": 4,
"itemNo": " 1",
"dDesc_zh-CN": "<p>Ivan Testing Product(繁体)<br></p>",
"bDesc_ctw": "",
"ce01Module": "move",
"beId": 11,
"lot": "A",
"alocId": 128,
"bDesc_haha1": "",
"dDesc_zh-TW": "",
"bDesc": "Ivan Testing Product",
"bDesc_ccn": "",
"bDesc_zh-TW": "",
"newLotno": 0,
"unitId": 38757,
"dDesc_ccn": "",
"id": 132,
"locId": 7,
"dDesc_haha1": "",
"hId": 90,
"bDesc_en": "",
"dDesc_en": "",
"dualUnitId": 6,
"sourceLot": "",
"dDesc": "<p>Ivan Testing Product(繁体)<br></p>",
"footerKey": " 1",
"i18nField": "{\"bDesc_zh-CN\": \"Ivan Testing Product\", \"dDesc_zh-CN\": \"<p>Ivan Testing Product(繁体)<br></p>\"}",
"sourceType": "pro",
"proId": 18,
"qty": 1,
"deliveryRequire": false,
"lotNoId": 0,
"bDesc_zh-CN": "Ivan Testing Product"
}
],
"remmove": [
{
"hId": 90,
"i18nField": "{}",
"remarks_zh-CN": "",
"remarks_ccn": "",
"remarks_en": "",
"remarks_haha1": "",
"iRev": 4,
"id": 78,
"remarks_zh-TW": "",
"remarks": "",
"remarks_ctw": "",
"ce01Module": "move"
}
],
"movetlot": [
{
"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": 128,
"lotnoLookupAttr17": 0,
"lotnoLookupAttr14": 0,
"lotnoLookupAttr15": 0,
"lotnoLookupAttr18": 0,
"lotnoLookupAttr19": 0,
"newLotno": 0,
"lotnoLot": "A",
"id": 19,
"lotnoNumAttr20": 0,
"lotnoLookupAttr12": 0,
"lotnoLookupAttr13": 0,
"lotnoLookupAttr10": 0,
"lotnoLookupAttr11": 0,
"iRev": 4,
"ce01Module": "move",
"lotnoDateAttr3": -2209017600000,
"lotnoDateAttr4": -2209017600000,
"lotnoDateAttr1": -2209017600000,
"lotnoDateAttr2": -2209017600000,
"lotnoDateAttr7": -2209017600000,
"lotnoDateAttr8": -2209017600000,
"lotnoDateAttr5": -2209017600000,
"lotnoDateAttr6": -2209017600000,
"unitId": 38757,
"lotnoDateAttr9": -2209017600000,
"locId": 7,
"lotnoTextAttr1": "",
"lotnoTextAttr2": "",
"lotnoTextAttr3": "",
"lotnoTextAttr4": "",
"lotnoTextAttr5": "",
"lotnoTextAttr6": "",
"lotnoTextAttr7": "",
"lotnoTextAttr8": "",
"lotnoTextAttr9": "",
"dualQty": 1,
"itemNo": " 1",
"hId": 90,
"lotnoNumAttr1": 0,
"lotnoNumAttr2": 0,
"lotnoNumAttr3": 0,
"lotnoNumAttr4": 0,
"lotnoExpDate": 253402271999000,
"footerKey": " 1",
"qty": 1,
"lotnoNumAttr5": 0,
"lotnoNumAttr6": 0,
"lotnoNumAttr7": 0,
"lotnoNumAttr8": 0,
"lotnoNumAttr9": 0,
"lotNoId": 642,
"lotnoTextAttr16": "",
"lotnoTextAttr15": "",
"lotnoTextAttr18": "",
"lotnoTextAttr17": "",
"lotnoTextAttr12": "",
"lotnoTextAttr11": "",
"lotnoDateAttr20": -2209017600000,
"lotnoTextAttr14": "",
"lotnoTextAttr13": "",
"lotnoTextAttr19": "",
"lotnoTextAttr10": "",
"dualUnitId": 6,
"lotnoLookupAttr5": 0,
"lotnoLookupAttr6": 0,
"lotnoLookupAttr7": 0,
"lotnoDateAttr18": -2209017600000,
"lotnoLookupAttr8": 0,
"lotnoDateAttr19": -2209017600000,
"lotno": "ITGRN17020001A",
"lotnoLookupAttr9": 0,
"proId": 18,
"lotnoDateAttr12": -2209017600000,
"lotnoDateAttr13": -2209017600000,
"lotnoDateAttr10": -2209017600000,
"lotnoDateAttr11": -2209017600000,
"lotnoTextAttr20": "",
"lotnoLookupAttr1": 0,
"lotnoDateAttr16": -2209017600000,
"lotnoLookupAttr2": 0,
"lotnoDateAttr17": -2209017600000,
"lotnoLookupAttr3": 0,
"lotnoDateAttr14": -2209017600000,
"lotnoLookupAttr4": 0,
"lotnoDateAttr15": -2209017600000
}
]
},
"messages": [],
"status": true
}
# 保存内部转移
# 一、接口描述
用于新增【内部转移】
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/save/move |
---|---|
http请求方式 | PUT |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | move |
param | String(Query) | 否 | 额外的系统参数;JSON字符串 |
3、请求示例
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/move";
String param = "&menuCode=move";
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格式数据如下:
{
"mainmove": {
"values": [
{
"beId": 11,
"code": "ITMOVE220324A",
"tDate": "2022-03-24",
"locId": 7,
"alocId": 122,
"flowTypeId": 1397,
"staffId": 723
}
]
},
"movet": {
"values": [
{
"sourceType": "pro",
"proId": 18,
"unitId": 24,
"qty": 1,
"locId": 7,
"alocId": 122
}
]
}
}
4、返回示例
{
"recordId": 91,
"messages": [],
"status": true
}
{
"recordId": 0,
"messages": [
{
"msgDetail": "必填项为空",
"msgCode": "core_101905"
}
],
"status": false
}
# 新增内部转移(自动补全)
# 一、接口描述
1. 用于新增【内部转移】
2. 此接口方法有如下特点:
a. 支持使用code 替代 id 栏位
b. 职员栏位未填时,自动使用个人选项中的默认职员
c. 单据日期未填时,根据贸易参数设定中的日期选项取值
d. 业务流程未填时,根据[业务流程设置(贸易)]中设定的默认值
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/erp/bsFlow/save/move |
---|---|
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/move";
HttpPost post = new HttpPost(url);
post.addHeader("authorization", access_token);
post.addHeader("client_id", ClientID);
StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON);
entity.setContentEncoding("UTF-8");
post.setEntity(entity);
res = client.execute(post);
if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
if (json != null) {
recordId = json.getLongValue("tranId");
}
System.out.println(json);
}
post.releaseConnection();
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (res != null) {
res.close();
}
if (client != null) {
client.close();
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
data数据示例
{
"beCode": "IT",
"movet": [
{
"proCode": "ITPRO001",
"unitCode": "个",
"qty": 1,
"locCode": "SZO",
"alocCode": "961"
}
]
}
4、返回示例
{
"tranId": 92,
"tranCode": "MOV220053",
"message": "",
"status": true
}
# 删除内部转移
# 一、接口描述
用于删除内部转移
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/delete/move |
---|---|
http请求方式 | DELETE |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | move |
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/move";
String param = "&menuCode=move&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) | 是 | defstkreg |
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=defstkreg&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": "defstkreg",
"size": 5,
"stSearchDisplay": "Defective Stock Register",
"values": [
{
"code": "ITDSR001",
"tDate": "2018-01-10",
"maindefstkreg.flowTypeId.flowtype.code": "EXSTK-QC",
"maindefstkreg.flowTypeId.flowtype.desc": "EXSTK -> QC",
"iRev": 7,
"lastModifyDate": "2018-01-12 12:52:53",
"maindefstkreg.lastModifyUid.simpleUser.desc__lang": "Ivan Tan",
"id": 2,
"st_desc": "ITDSR001",
"st_id": 2,
"st_code": "ITDSR001"
}
]
}
# 读取报废单
# 一、接口描述
用于读取【报废单】数据
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/read/defstkreg |
---|---|
http请求方式 | GET |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | defstkreg |
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/defstkreg";
String param = "&menuCode=defstkreg&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": {
"maindefstkreg": [
{
"tDate": 1515513600000,
"lastModifyUid": 11,
"code": "ITDSR001",
"cnDeptId": 29,
"useAccess": false,
"virDeptId": 0,
"expiredDate": -2209017600000,
"iRev": 7,
"sysJson": "",
"upOrigin": "",
"viewCode": "defstkreg",
"ce01Module": "defstkreg",
"beId": 11,
"alocId": 2,
"expired": false,
"printCount": 0,
"useAccessBl": false,
"id": 2,
"doctypeId": 0,
"statusModifyDate": 1515570951000,
"locked": false,
"lastModifyDate": 1515732773000,
"createUid": 11,
"locId": 15,
"createDate": 1515570951000,
"rev": "5",
"lastApproveUid": 0,
"expiredUid": 0,
"useAccessWl": false,
"descOrigin": "",
"flowTypeId": 15459,
"useAccessAutoCalc": false,
"staffId": 723,
"status": "Y"
}
],
"defstkregt": [
{
"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": 2,
"lotnoLookupAttr17": 0,
"lotnoLookupAttr14": 0,
"lotnoLookupAttr15": 0,
"lotnoLookupAttr18": 0,
"bDesc_zh-TW": "",
"lotnoLookupAttr19": 0,
"newLotno": 0,
"lotnoLot": "A",
"id": 2,
"dDesc_haha1": "",
"lotnoNumAttr20": 0,
"lotnoLookupAttr12": 0,
"lotnoLookupAttr13": 0,
"lotnoLookupAttr10": 0,
"lotnoLookupAttr11": 0,
"i18nField": "{\"bDesc_en\": \"Ivan Testing Product\", \"dDesc_en\": \"\"}",
"sourceType": "qc",
"costAmt": 0,
"iRev": 5,
"bDesc_ctw": "",
"ce01Module": "defstkreg",
"lot": "A",
"lotnoDateAttr3": 1475164800000,
"lotnoDateAttr4": -2209017600000,
"lotnoDateAttr1": 1474300800000,
"lotnoDateAttr2": 1475078400000,
"lotnoDateAttr7": -2209017600000,
"lotnoDateAttr8": -2209017600000,
"bDesc_ccn": "",
"lotnoDateAttr5": -2209017600000,
"lotnoDateAttr6": -2209017600000,
"unitId": 38757,
"lotnoDateAttr9": -2209017600000,
"locId": 7,
"bDesc_en": "Ivan Testing Product",
"lotnoTextAttr1": "INC",
"lotnoTextAttr2": "TT",
"lotnoTextAttr3": "BB",
"lotnoTextAttr4": "",
"lotnoTextAttr5": "",
"lotnoTextAttr6": "",
"lotnoTextAttr7": "",
"lotnoTextAttr8": "",
"lotnoTextAttr9": "",
"bDesc_zh-CN": "",
"sourceId": 3,
"dualQty": 0,
"itemNo": " 1",
"beId": 11,
"bDesc": "Ivan Testing Product",
"hId": 2,
"lotnoNumAttr1": 0,
"lotnoNumAttr2": 0,
"lotnoNumAttr3": 0,
"lotnoNumAttr4": 0,
"lotnoExpDate": 1546185600000,
"dDesc": "",
"footerKey": "",
"qty": 0.1,
"lotnoNumAttr5": 0,
"lotnoNumAttr6": 0,
"lotnoNumAttr7": 0,
"lotnoNumAttr8": 0,
"lotnoNumAttr9": 0,
"lotNoId": 282,
"lotnoTextAttr16": "",
"dDesc_ctw": "",
"lotnoTextAttr15": "",
"lotnoTextAttr18": "",
"lotnoTextAttr17": "",
"lotnoTextAttr12": "",
"lotnoTextAttr11": "",
"lotnoDateAttr20": -2209017600000,
"lotnoTextAttr14": "",
"lotnoTextAttr13": "",
"dDesc_zh-CN": "",
"lotnoTextAttr19": "",
"bDesc_haha1": "",
"dDesc_zh-TW": "",
"dDesc_ccn": "",
"lotnoTextAttr10": "",
"dDesc_en": "",
"dualUnitId": 6,
"lotnoLookupAttr5": 0,
"lotnoLookupAttr6": 0,
"sourceLot": "01",
"lotnoLookupAttr7": 0,
"lotnoDateAttr18": -2209017600000,
"lotnoLookupAttr8": 0,
"lotnoDateAttr19": -2209017600000,
"lotno": "OS0160040-01INC20160930",
"lotnoLookupAttr9": 0,
"proId": 18,
"lotnoDateAttr12": -2209017600000,
"lotnoDateAttr13": -2209017600000,
"lotnoDateAttr10": -2209017600000,
"lotnoDateAttr11": -2209017600000,
"lotnoTextAttr20": "",
"lotnoLookupAttr1": 0,
"lotnoDateAttr16": -2209017600000,
"lotnoLookupAttr2": 0,
"lotnoDateAttr17": -2209017600000,
"lotnoLookupAttr3": 0,
"lotnoDateAttr14": -2209017600000,
"lotnoLookupAttr4": 0,
"lotnoDateAttr15": -2209017600000
}
],
"remdefstkreg": [
{
"hId": 2,
"i18nField": "",
"remarks_zh-CN": "",
"remarks_ccn": "",
"remarks_en": "",
"remarks_haha1": "",
"iRev": 7,
"id": 6,
"remarks_zh-TW": "",
"remarks": "",
"remarks_ctw": "",
"ce01Module": "defstkreg"
}
]
},
"messages": [],
"status": true
}
# 保存报废单
# 一、接口描述
用于新增【报废单】
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/save/defstkreg |
---|---|
http请求方式 | PUT |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | defstkreg |
param | String(Query) | 否 | 额外的系统参数;JSON字符串 |
3、请求示例
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/defstkreg";
String param = "&menuCode=defstkreg";
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格式数据如下:
{
"maindefstkreg": {
"values": [
{
"beId": 11,
"code": "ITDSR220325A",
"tDate": "2022-03-25",
"flowTypeId": 1397,
"staffId": 723
}
]
},
"defstkregt": {
"values": [
{
"sourceType": "pro",
"proId": 18,
"locId": 7,
"alocId": 2,
"unitId": 24,
"qty": 1
}
]
}
}
4、返回示例
{
"recordId": 15,
"messages": [],
"status": true
}
{
"recordId": 0,
"messages": [
{
"msgDetail": "必填项为空",
"msgCode": "core_101905"
}
],
"status": false
}
# 新增报废单(自动补全)
# 一、接口描述
1. 用于新增【报废单】
2. 此接口方法有如下特点:
a. 支持使用code 替代 id 栏位
b. 职员栏位未填时,自动使用个人选项中的默认职员
c. 单据日期未填时,根据贸易参数设定中的日期选项取值
d. 业务流程未填时,根据[业务流程设置(贸易)]中设定的默认值
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/erp/bsFlow/save/defstkreg |
---|---|
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/defstkreg";
HttpPost post = new HttpPost(url);
post.addHeader("authorization", access_token);
post.addHeader("client_id", ClientID);
StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON);
entity.setContentEncoding("UTF-8");
post.setEntity(entity);
res = client.execute(post);
if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
if (json != null) {
recordId = json.getLongValue("tranId");
}
System.out.println(json);
}
post.releaseConnection();
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (res != null) {
res.close();
}
if (client != null) {
client.close();
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
data数据示例
{
"beCode": "IT",
"defstkregt": [
{
"proCode": "ITPRO001",
"unitCode": "个",
"qty": 1,
"locCode": "SZO",
"alocCode": "BAD"
}
]
}
4、返回示例
{
"tranId": 16,
"tranCode": "DEF220001",
"message": "",
"status": true
}
# 删除报废单
# 一、接口描述
用于删除报废单
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/delete/defstkreg |
---|---|
http请求方式 | DELETE |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | defstkreg |
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/defstkreg";
String param = "&menuCode=defstkreg&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": 8,
"rows": [
{
"FTABLE_A_locId_code": "SZO",
"MAIN_outQty": "0.00000000",
"MAIN_ruQty": "0.00000000",
"FTABLE_A_bDesc": "Ivan Testing Product",
"aiM18ReservedCol_dataIndex": 1,
"FTABLE_A_proId": "18",
"FTABLE_A_unitId_code": "0.3兩",
"FTABLE_A_qty": "0.10000000",
"MTABLE_A_tDate": "2018.01.10",
"MTABLE_A_code": "ITDSR001",
"MTABLE_A_id": "2",
"FTABLE_A_alocId_code": "BAD",
"MAIN_dstnQty": "0.10000000",
"FTABLE_A_alocId": "2",
"FTABLE_A_locId": "7",
"FTABLE_A_proId_code": "ITPRO001"
}
]
}
# 销毁单
# 获取销毁单列表
# 一、接口描述
用于获取销毁单列表(同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) | 是 | dstn |
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=dstn&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": "dstn",
"size": 3,
"stSearchDisplay": "Defective Stock Write Off",
"values": [
{
"code": "ITDSTN001",
"tDate": "2018-01-11",
"maindstn.flowTypeId.flowtype.code": "EXSTK-QC",
"maindstn.flowTypeId.flowtype.desc": "EXSTK -> QC",
"iRev": 3,
"lastModifyDate": "2020-11-10 12:30:36",
"maindstn.lastModifyUid.simpleUser.desc__lang": "Ivan Tan",
"id": 1,
"st_desc": "ITDSTN001",
"st_id": 1,
"st_code": "ITDSTN001"
}
]
}
# 读取销毁单
# 一、接口描述
用于读取【销毁单】数据
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/read/dstn |
---|---|
http请求方式 | GET |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | dstn |
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/dstn";
String param = "&menuCode=dstn&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": {
"maindstn": [
{
"tDate": 1515600000000,
"lastModifyUid": 11,
"code": "ITDSTN001",
"cnDeptId": 29,
"useAccess": false,
"virDeptId": 0,
"expiredDate": -2209017600000,
"iRev": 3,
"sysJson": "",
"upOrigin": "PRO",
"viewCode": "dstn",
"ce01Module": "dstn",
"beId": 11,
"expired": false,
"printCount": 0,
"useAccessBl": false,
"id": 1,
"doctypeId": 0,
"statusModifyDate": 1515662355000,
"locked": false,
"lastModifyDate": 1604982636000,
"createUid": 11,
"locId": 2,
"createDate": 1515662355000,
"rev": "3",
"lastApproveUid": 0,
"expiredUid": 0,
"useAccessWl": false,
"descOrigin": "PRO",
"flowTypeId": 15459,
"useAccessAutoCalc": false,
"staffId": 723,
"status": "Y"
}
],
"dstnt": [
{
"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,
"bDesc_zh-TW": "",
"lotnoLookupAttr19": 0,
"newLotno": 0,
"lotnoLot": "A",
"id": 1,
"dDesc_haha1": "",
"lotnoNumAttr20": 0,
"lotnoLookupAttr12": 0,
"lotnoLookupAttr13": 0,
"lotnoLookupAttr10": 0,
"lotnoLookupAttr11": 0,
"i18nField": "{\"bDesc_en\": \"Ivan Testing Product\", \"dDesc_en\": \"\"}",
"sourceType": "defstkreg",
"costAmt": 0,
"iRev": 3,
"bDesc_ctw": "",
"ce01Module": "dstn",
"lot": "A",
"lotnoDateAttr3": 1475164800000,
"lotnoDateAttr4": -2209017600000,
"lotnoDateAttr1": 1474300800000,
"lotnoDateAttr2": 1475078400000,
"lotnoDateAttr7": -2209017600000,
"lotnoDateAttr8": -2209017600000,
"bDesc_ccn": "",
"lotnoDateAttr5": -2209017600000,
"lotnoDateAttr6": -2209017600000,
"unitId": 38757,
"lotnoDateAttr9": -2209017600000,
"locId": 2,
"bDesc_en": "Ivan Testing Product",
"lotnoTextAttr1": "INC",
"lotnoTextAttr2": "TT",
"lotnoTextAttr3": "BB",
"lotnoTextAttr4": "",
"lotnoTextAttr5": "",
"lotnoTextAttr6": "",
"lotnoTextAttr7": "",
"lotnoTextAttr8": "",
"lotnoTextAttr9": "",
"bDesc_zh-CN": "",
"sourceId": 2,
"dualQty": 0,
"itemNo": " 1",
"beId": 11,
"bDesc": "Ivan Testing Product",
"hId": 1,
"lotnoNumAttr1": 0,
"lotnoNumAttr2": 0,
"lotnoNumAttr3": 0,
"lotnoNumAttr4": 0,
"lotnoExpDate": 1546185600000,
"dDesc": "",
"footerKey": "",
"qty": 0.1,
"lotnoNumAttr5": 0,
"lotnoNumAttr6": 0,
"lotnoNumAttr7": 0,
"lotnoNumAttr8": 0,
"lotnoNumAttr9": 0,
"lotNoId": 282,
"lotnoTextAttr16": "",
"dDesc_ctw": "",
"lotnoTextAttr15": "",
"lotnoTextAttr18": "",
"lotnoTextAttr17": "",
"lotnoTextAttr12": "",
"lotnoTextAttr11": "",
"lotnoDateAttr20": -2209017600000,
"lotnoTextAttr14": "",
"lotnoTextAttr13": "",
"dDesc_zh-CN": "",
"lotnoTextAttr19": "",
"bDesc_haha1": "",
"dDesc_zh-TW": "",
"dDesc_ccn": "",
"lotnoTextAttr10": "",
"dDesc_en": "",
"dualUnitId": 6,
"lotnoLookupAttr5": 0,
"lotnoLookupAttr6": 0,
"sourceLot": "A",
"lotnoLookupAttr7": 0,
"lotnoDateAttr18": -2209017600000,
"lotnoLookupAttr8": 0,
"lotnoDateAttr19": -2209017600000,
"lotno": "OS0160040-01INC20160930",
"lotnoLookupAttr9": 0,
"proId": 18,
"lotnoDateAttr12": -2209017600000,
"lotnoDateAttr13": -2209017600000,
"lotnoDateAttr10": -2209017600000,
"lotnoDateAttr11": -2209017600000,
"lotnoTextAttr20": "",
"lotnoLookupAttr1": 0,
"lotnoDateAttr16": -2209017600000,
"lotnoLookupAttr2": 0,
"lotnoDateAttr17": -2209017600000,
"lotnoLookupAttr3": 0,
"lotnoDateAttr14": -2209017600000,
"lotnoLookupAttr4": 0,
"lotnoDateAttr15": -2209017600000
}
],
"remdstn": [
{
"hId": 1,
"i18nField": "{\"remarks_en\": \"<p>test la</p>\"}",
"remarks_zh-CN": "",
"remarks_ccn": "",
"remarks_en": "<p>test la</p>",
"remarks_haha1": "",
"iRev": 3,
"id": 7,
"remarks_zh-TW": "",
"remarks": "<p>test la</p>",
"remarks_ctw": "",
"ce01Module": "dstn"
}
]
},
"messages": [],
"status": true
}
# 保存销毁单
# 一、接口描述
用于新增【销毁单】
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/save/dstn |
---|---|
http请求方式 | PUT |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | dstn |
param | String(Query) | 否 | 额外的系统参数;JSON字符串 |
3、请求示例
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/dstn";
String param = "&menuCode=dstn";
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格式数据如下:
{
"maindstn": {
"values": [
{
"beId": 11,
"code": "ITDSTN220325A",
"tDate": "2022-03-25",
"flowTypeId": 1397,
"staffId": 723
}
]
},
"dstnt": {
"values": [
{
"sourceType": "pro",
"proId": 18,
"locId": 2,
"unitId": 24,
"qty": 1
}
]
}
}
4、返回示例
{
"recordId": 10,
"messages": [],
"status": true
}
{
"recordId": 0,
"messages": [
{
"msgDetail": "必填项为空",
"msgCode": "core_101905"
}
],
"status": false
}
# 新增销毁单(自动补全)
# 一、接口描述
1. 用于新增【销毁单】
2. 此接口方法有如下特点:
a. 支持使用code 替代 id 栏位
b. 职员栏位未填时,自动使用个人选项中的默认职员
c. 单据日期未填时,根据贸易参数设定中的日期选项取值
d. 业务流程未填时,根据[业务流程设置(贸易)]中设定的默认值
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/erp/bsFlow/save/dstn |
---|---|
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/dstn";
HttpPost post = new HttpPost(url);
post.addHeader("authorization", access_token);
post.addHeader("client_id", ClientID);
StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON);
entity.setContentEncoding("UTF-8");
post.setEntity(entity);
res = client.execute(post);
if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
if (json != null) {
recordId = json.getLongValue("tranId");
}
System.out.println(json);
}
post.releaseConnection();
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (res != null) {
res.close();
}
if (client != null) {
client.close();
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
data数据示例
{
"beCode": "IT",
"dstnt": [
{
"proCode": "ITPRO001",
"unitCode": "个",
"locCode": "BAD",
"qty": 1
}
]
}
4、返回示例
{
"tranId": 11,
"tranCode": "DST220001",
"message": "",
"status": true
}
# 删除销毁单
# 一、接口描述
用于删除销毁单
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/delete/dstn |
---|---|
http请求方式 | DELETE |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | dstn |
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/dstn";
String param = "&menuCode=dstn&id=" + id;
HttpDelete delete = new HttpDelete(url + "?" + param);
delete.addHeader("authorization", access_token);
delete.addHeader("client_id", ClientID);
res = client.execute(delete);
if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
System.out.println(json);
}
delete.releaseConnection();
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (res != null) {
res.close();
}
if (client != null) {
client.close();
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
4、返回示例
{
"messages": [],
"status": true
}
{
"messages": [
{
"msgDetail": "单据已被删除",
"msgCode": "core_101017"
}
],
"status": false
}
# 读取EBI数据:销毁单报告
# 一、接口描述
用于执行EBI[销毁单报告],返回EBI数据
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/ebiWidget/loadReport |
---|---|
http请求方式 | GET |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
formatId | long(Query) | 是 | 通过EBI接口获取到formatId |
beId | long(Query) | 否 | 企业法人的ID。若不传,则查询所有有权限的BE数据 |
offset | int(Query) | 否 | 返回结果的开始行 |
rows | int(Query) | 否 | 返回结果的结束行 |
3、请求示例
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/ebiWidget/loadReport";
String param = "&formatId=" + formatId;
HttpGet get = new HttpGet(url + "?" + param);
get.addHeader("authorization", access_token);
get.addHeader("client_id", ClientID);
res = client.execute(get);
if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
System.out.println(json);
}
get.releaseConnection();
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (res != null) {
res.close();
}
if (client != null) {
client.close();
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
4、返回示例
{
"size": 5,
"rows": [
{
"FTABLE_A_locId_code": "BAD",
"aiM18ReservedCol_dataIndex": 1,
"FTABLE_A_proId": "18",
"FTABLE_A_unitId_code": "0.3兩",
"MAIN_sourceId": "2",
"MAIN_sourceCode": "ITDSR001",
"FTABLE_A_qty": "0.10000000",
"MTABLE_A_tDate": "2018.01.11",
"LOTNO_A_lotno": "OS0160040-01INC20160930",
"MAIN_sourceType": "defstkreg",
"MTABLE_A_code": "ITDSTN001",
"MTABLE_A_id": "1",
"MAIN_lotQty": "0.10000000",
"FTABLE_A_sourceType": "Defective Stock Register",
"FTABLE_A_locId": "2",
"FTABLE_A_proId_code": "ITPRO001"
}
]
}
# 库存回用单
# 获取库存回用单列表
# 一、接口描述
用于获取库存回用单列表(同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) | 是 | ru |
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=ru&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": "ru",
"size": 2,
"stSearchDisplay": "Defective Stock Recover",
"values": [
{
"code": "ITRU001",
"tDate": "2018-01-12",
"mainru.flowTypeId.flowtype.code": "QC-ALL",
"mainru.flowTypeId.flowtype.desc": "QC-ALL",
"iRev": 5,
"lastModifyDate": "2019-01-14 15:48:28",
"mainru.lastModifyUid.simpleUser.desc__lang": "Ivan Tan",
"id": 1,
"st_desc": "ITRU001",
"st_id": 1,
"st_code": "ITRU001"
}
]
}
# 读取库存回用单
# 一、接口描述
用于读取【库存回用单】数据
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/read/ru |
---|---|
http请求方式 | GET |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | ru |
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/ru";
String param = "&menuCode=ru&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": {
"rut": [
{
"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": 7,
"lotnoLookupAttr17": 0,
"lotnoLookupAttr14": 0,
"lotnoLookupAttr15": 0,
"lotnoLookupAttr18": 0,
"bDesc_zh-TW": "",
"lotnoLookupAttr19": 0,
"newLotno": 0,
"lotnoLot": "A",
"id": 17,
"dDesc_haha1": "",
"lotnoNumAttr20": 0,
"lotnoLookupAttr12": 0,
"lotnoLookupAttr13": 0,
"lotnoLookupAttr10": 0,
"lotnoLookupAttr11": 0,
"i18nField": "{\"bDesc_en\": \"Ivan Testing Product\", \"dDesc_en\": \"<p>Ivan Testing Product(繁体)<br></p>\"}",
"sourceType": "defstkreg",
"costAmt": 0,
"iRev": 1,
"bDesc_ctw": "",
"ce01Module": "ru",
"lot": "A",
"lotnoDateAttr3": 1475164800000,
"lotnoDateAttr4": -2209017600000,
"lotnoDateAttr1": 1474300800000,
"lotnoDateAttr2": 1475078400000,
"lotnoDateAttr7": -2209017600000,
"lotnoDateAttr8": -2209017600000,
"bDesc_ccn": "",
"lotnoDateAttr5": -2209017600000,
"lotnoDateAttr6": -2209017600000,
"unitId": 24,
"lotnoDateAttr9": -2209017600000,
"locId": 2,
"bDesc_en": "Ivan Testing Product",
"lotnoTextAttr1": "INC",
"lotnoTextAttr2": "TT",
"lotnoTextAttr3": "BB",
"lotnoTextAttr4": "",
"lotnoTextAttr5": "",
"lotnoTextAttr6": "",
"lotnoTextAttr7": "",
"lotnoTextAttr8": "",
"lotnoTextAttr9": "",
"bDesc_zh-CN": "",
"sourceId": 14,
"dualQty": 0.33,
"itemNo": " 1",
"beId": 11,
"bDesc": "Ivan Testing Product",
"hId": 14,
"lotnoNumAttr1": 0,
"lotnoNumAttr2": 0,
"lotnoNumAttr3": 0,
"lotnoNumAttr4": 0,
"lotnoExpDate": 1546185600000,
"dDesc": "<p>Ivan Testing Product(繁体)<br></p>",
"footerKey": " 1",
"qty": 1,
"lotnoNumAttr5": 0,
"lotnoNumAttr6": 0,
"lotnoNumAttr7": 0,
"lotnoNumAttr8": 0,
"lotnoNumAttr9": 0,
"lotNoId": 282,
"lotnoTextAttr16": "",
"dDesc_ctw": "",
"lotnoTextAttr15": "",
"lotnoTextAttr18": "",
"lotnoTextAttr17": "",
"lotnoTextAttr12": "",
"lotnoTextAttr11": "",
"lotnoDateAttr20": -2209017600000,
"lotnoTextAttr14": "",
"lotnoTextAttr13": "",
"dDesc_zh-CN": "",
"lotnoTextAttr19": "",
"bDesc_haha1": "",
"dDesc_zh-TW": "",
"dDesc_ccn": "",
"lotnoTextAttr10": "",
"dDesc_en": "<p>Ivan Testing Product(繁体)<br></p>",
"dualUnitId": 6,
"lotnoLookupAttr5": 0,
"lotnoLookupAttr6": 0,
"sourceLot": "A",
"lotnoLookupAttr7": 0,
"lotnoDateAttr18": -2209017600000,
"lotnoLookupAttr8": 0,
"lotnoDateAttr19": -2209017600000,
"lotno": "OS0160040-01INC20160930",
"lotnoLookupAttr9": 0,
"proId": 18,
"lotnoDateAttr12": -2209017600000,
"lotnoDateAttr13": -2209017600000,
"lotnoDateAttr10": -2209017600000,
"lotnoDateAttr11": -2209017600000,
"lotnoTextAttr20": "",
"lotnoLookupAttr1": 0,
"lotnoDateAttr16": -2209017600000,
"lotnoLookupAttr2": 0,
"lotnoDateAttr17": -2209017600000,
"lotnoLookupAttr3": 0,
"lotnoDateAttr14": -2209017600000,
"lotnoLookupAttr4": 0,
"lotnoDateAttr15": -2209017600000
}
],
"mainru": [
{
"tDate": 1603296000000,
"lastModifyUid": 11,
"code": "ITRU002",
"cnDeptId": 29,
"useAccess": false,
"virDeptId": 0,
"expiredDate": -2209017600000,
"iRev": 1,
"sysJson": "",
"upOrigin": "PRO",
"viewCode": "ru",
"ce01Module": "ru",
"beId": 11,
"alocId": 7,
"expired": false,
"printCount": 0,
"useAccessBl": false,
"id": 14,
"doctypeId": 0,
"statusModifyDate": 1603334218000,
"locked": false,
"lastModifyDate": 1603334218000,
"createUid": 11,
"locId": 2,
"createDate": 1603334218000,
"rev": "1",
"lastApproveUid": 11,
"expiredUid": 0,
"useAccessWl": false,
"descOrigin": "PRO",
"flowTypeId": 15458,
"useAccessAutoCalc": false,
"staffId": 723,
"status": "Y"
}
],
"remru": [
{
"hId": 14,
"i18nField": "{\"remarks_en\": \"\"}",
"remarks_zh-CN": "",
"remarks_ccn": "",
"remarks_en": "",
"remarks_haha1": "",
"iRev": 1,
"id": 2,
"remarks_zh-TW": "",
"remarks": "",
"remarks_ctw": "",
"ce01Module": "ru"
}
]
},
"messages": [],
"status": true
}
# 保存库存回用单
# 一、接口描述
用于新增【库存回用单】
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/save/ru |
---|---|
http请求方式 | PUT |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | ru |
param | String(Query) | 否 | 额外的系统参数;JSON字符串 |
3、请求示例
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/ru";
String param = "&menuCode=ru";
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格式数据如下:
{
"mainru": {
"values": [
{
"beId": 11,
"code": "ITRU220328A",
"tDate": "2022-03-28",
"flowTypeId": 15458,
"staffId": 723
}
]
},
"rut": {
"values": [
{
"sourceType": "defstkreg",
"sourceId": 14,
"sourceLot": "A",
"proId": 26,
"unitId": 40,
"qty": 1,
"locId": 2,
"alocId": 7
}
]
}
}
4、返回示例
{
"recordId": 15,
"messages": [],
"status": true
}
{
"recordId": 0,
"messages": [
{
"msgDetail": "必填项为空",
"msgCode": "core_101905"
}
],
"status": false
}
# 新增库存回用单(自动补全)
# 一、接口描述
1. 用于新增【库存回用单】
2. 此接口方法有如下特点:
a. 支持使用code 替代 id 栏位
b. 职员栏位未填时,自动使用个人选项中的默认职员
c. 单据日期未填时,根据贸易参数设定中的日期选项取值
d. 业务流程未填时,根据[业务流程设置(贸易)]中设定的默认值
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/erp/bsFlow/save/pi |
---|---|
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/ru";
HttpPost post = new HttpPost(url);
post.addHeader("authorization", access_token);
post.addHeader("client_id", ClientID);
StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON);
entity.setContentEncoding("UTF-8");
post.setEntity(entity);
res = client.execute(post);
if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
if (json != null) {
recordId = json.getLongValue("tranId");
}
System.out.println(json);
}
post.releaseConnection();
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (res != null) {
res.close();
}
if (client != null) {
client.close();
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
data数据示例
{
"beCode": "IT",
"rut": [
{
"sourceType": "defstkreg",
"sourceCode": "ITDSR005",
"sourceLot": "A",
"locCode": "BAD",
"alocCode": "SZO",
"proCode": "ITPRO001",
"unitCode": "个",
"qty": 1
}
]
}
4、返回示例
{
"tranId": 16,
"tranCode": "RU0220001",
"message": "",
"status": true
}
# 删除库存回用单
# 一、接口描述
用于删除库存回用单
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/delete/ru |
---|---|
http请求方式 | DELETE |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | ru |
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/ru";
String param = "&menuCode=ru&id=" + id;
HttpDelete delete = new HttpDelete(url + "?" + param);
delete.addHeader("authorization", access_token);
delete.addHeader("client_id", ClientID);
res = client.execute(delete);
if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
System.out.println(json);
}
delete.releaseConnection();
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (res != null) {
res.close();
}
if (client != null) {
client.close();
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
4、返回示例
{
"messages": [],
"status": true
}
{
"messages": [
{
"msgDetail": "单据已被删除",
"msgCode": "core_101017"
}
],
"status": false
}
# 读取EBI数据:库存回用单报告
# 一、接口描述
用于执行EBI[库存回用单报告],返回EBI数据
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/ebiWidget/loadReport |
---|---|
http请求方式 | GET |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
formatId | long(Query) | 是 | 通过EBI接口获取到formatId |
beId | long(Query) | 否 | 企业法人的ID。若不传,则查询所有有权限的BE数据 |
offset | int(Query) | 否 | 返回结果的开始行 |
rows | int(Query) | 否 | 返回结果的结束行 |
3、请求示例
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/ebiWidget/loadReport";
String param = "&formatId=" + formatId;
HttpGet get = new HttpGet(url + "?" + param);
get.addHeader("authorization", access_token);
get.addHeader("client_id", ClientID);
res = client.execute(get);
if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
System.out.println(json);
}
get.releaseConnection();
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (res != null) {
res.close();
}
if (client != null) {
client.close();
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
4、返回示例
{
"size": 5,
"rows": [
{
"FTABLE_A_locId_code": "BAD",
"aiM18ReservedCol_dataIndex": 1,
"FTABLE_A_unitId_code": "0.3兩",
"MAIN_sourceId": "3",
"MAIN_sourceCode": "ITDSR002",
"FTABLE_A_qty": "0.20000000",
"MTABLE_A_tDate": "2018.01.12",
"PRO_A_id": "18",
"MAIN_sourceType": "defstkreg",
"MTABLE_A_code": "ITRU001",
"MTABLE_A_id": "1",
"FTABLE_A_alocId_code": "ACLL",
"FTABLE_A_alocId": "15",
"FTABLE_A_sourceType": "Defective Stock Register",
"FTABLE_A_locId": "2",
"PRO_A_code": "ITPRO001"
}
]
}
# 盘点(没有批号)
# 获取盘点(没有批号)列表
# 一、接口描述
用于获取盘点(没有批号)列表(同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) | 是 | st |
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=st&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": "st",
"size": 3,
"stSearchDisplay": "Stock Take (w/o Lot No.)",
"values": [
{
"code": "ITST20220101A",
"tDate": "2022-01-01",
"mainst.locId.loc.code": "SZO",
"mainst.locId.loc.desc": "深圳仓",
"mainst.locId.loc.locTypeId.loctype.code": "PHY",
"mainst.locId.loc.locTypeId.loctype.desc": "合格",
"iRev": 1,
"lastModifyDate": "2022-01-07 12:27:30",
"mainst.lastModifyUid.simpleUser.desc__lang": "Ivan Tan",
"id": 44,
"st_desc": "ITST20220101A",
"st_id": 44,
"st_code": "ITST20220101A"
}
]
}
# 读取盘点(没有批号)
# 一、接口描述
用于读取【盘点(没有批号)】数据
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/read/st |
---|---|
http请求方式 | GET |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | st |
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/st";
String param = "&menuCode=st&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": {
"mainst": [
{
"tDate": 1640966400000,
"lastModifyUid": 11,
"code": "ITST20220101A",
"cnDeptId": 29,
"useAccess": false,
"virDeptId": 0,
"expiredDate": -2209017600000,
"iRev": 1,
"sysJson": "",
"upOrigin": "GRN",
"viewCode": "st",
"ce01Module": "st",
"beId": 11,
"curId": 1,
"expired": false,
"rate": 1,
"printCount": 0,
"useAccessBl": false,
"id": 44,
"doctypeId": 0,
"statusModifyDate": 1641529650000,
"locked": false,
"lastModifyDate": 1641529650000,
"createUid": 11,
"locId": 7,
"createDate": 1641529650000,
"rev": "1",
"lastApproveUid": 11,
"expiredUid": 0,
"useAccessWl": false,
"descOrigin": "GRN",
"flowTypeId": 1397,
"useAccessAutoCalc": false,
"staffId": 723,
"status": "Y"
}
],
"stt": [
{
"sourceId": 0,
"dDesc_ctw": "",
"qtyPhy": 193,
"dualQty": -93,
"costAmt": 0,
"iRev": 1,
"stkUnitQty": -93,
"itemNo": " 1",
"dDesc_zh-CN": "",
"bDesc_ctw": "",
"ce01Module": "st",
"beId": 11,
"lot": "A",
"stkUnitPhy": 193,
"bDesc_haha1": "",
"dDesc_zh-TW": "",
"bDesc": "auto assign",
"bDesc_ccn": "",
"bDesc_zh-TW": "",
"newLotno": 0,
"dualQtyCount": -93,
"unitId": 76,
"dDesc_ccn": "",
"id": 48,
"up": 0,
"genType": "K",
"qtyCountBasic": 100,
"locId": 7,
"dDesc_haha1": "",
"hId": 44,
"bDesc_en": "",
"unitCount": 76,
"dDesc_en": "",
"dualUnitId": 51,
"qtyCount": 100,
"sourceLot": "",
"dDesc": "",
"footerKey": " 1",
"i18nField": "{\"bDesc_zh-CN\": \"auto assign\", \"dDesc_zh-CN\": \"\"}",
"sourceType": "pro",
"proId": 62,
"qty": -93,
"dualPhy": 0,
"lotNoId": 0,
"bDesc_zh-CN": "auto assign"
}
],
"remst": [
{
"hId": 44,
"i18nField": "{\"remarks_zh-CN\": \"\"}",
"remarks_zh-CN": "",
"remarks_ccn": "",
"remarks_en": "",
"remarks_haha1": "",
"iRev": 1,
"id": 40,
"remarks_zh-TW": "",
"remarks": "",
"remarks_ctw": "",
"ce01Module": "st"
}
]
},
"messages": [],
"status": true
}
# 保存盘点(没有批号)
# 一、接口描述
用于新增【盘点(没有批号)】
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/save/st |
---|---|
http请求方式 | PUT |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | st |
param | String(Query) | 否 | 额外的系统参数;JSON字符串 |
3、请求示例
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/st";
String param = "&menuCode=st";
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格式数据如下:
{
"mainst": {
"values": [
{
"beId": 11,
"code": "ITST220324A",
"tDate": "2022-03-24",
"curId": 1,
"rate": 1,
"flowTypeId": 1397,
"staffId": 723
}
]
},
"stt": {
"values": [
{
"sourceType": "pro",
"locId": 7,
"proId": 26,
"unitId": 40,
"qty": 50,
"qtyPhy": 4900,
"qtyCountBasic": 4950,
"unitCount": 40,
"stkUnitQty": 50,
"stkUnitPhy": 4900,
"qtyCount": 4950
}
]
}
}
4、返回示例
{
"recordId": 48,
"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/st |
---|---|
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/st";
HttpPost post = new HttpPost(url);
post.addHeader("authorization", access_token);
post.addHeader("client_id", ClientID);
StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON);
entity.setContentEncoding("UTF-8");
post.setEntity(entity);
res = client.execute(post);
if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
if (json != null) {
recordId = json.getLongValue("tranId");
}
System.out.println(json);
}
post.releaseConnection();
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (res != null) {
res.close();
}
if (client != null) {
client.close();
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
data数据示例
{
"beCode": "IT",
"pot": [
{
"proCode": "ITPRO002",
"unitCode": "PCS",
"unitCount": 40,
"locCode": "SZO",
"qty": 50,
"qtyPhy": 4900,
"qtyCountBasic": 4950,
"stkUnitQty": 50,
"stkUnitPhy": 4900,
"qtyCount": 4950
}
]
}
4、返回示例
{
"tranId": 51,
"tranCode": "ST0220008",
"message": "",
"status": true
}
# 删除盘点(没有批号)
# 一、接口描述
用于删除盘点(没有批号)
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/delete/st |
---|---|
http请求方式 | DELETE |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | st |
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/st";
String param = "&menuCode=st&id=" + id;
HttpDelete delete = new HttpDelete(url + "?" + param);
delete.addHeader("authorization", access_token);
delete.addHeader("client_id", ClientID);
res = client.execute(delete);
if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
System.out.println(json);
}
delete.releaseConnection();
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (res != null) {
res.close();
}
if (client != null) {
client.close();
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
4、返回示例
{
"messages": [],
"status": true
}
{
"messages": [
{
"msgDetail": "单据已被删除",
"msgCode": "core_101017"
}
],
"status": false
}
# 读取EBI数据:盘点(没有批号)报告
# 一、接口描述
用于执行EBI[盘点(没有批号)报告],返回EBI数据
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/ebiWidget/loadReport |
---|---|
http请求方式 | GET |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
formatId | long(Query) | 是 | 通过EBI接口获取到formatId |
beId | long(Query) | 否 | 企业法人的ID。若不传,则查询所有有权限的BE数据 |
offset | int(Query) | 否 | 返回结果的开始行 |
rows | int(Query) | 否 | 返回结果的结束行 |
3、请求示例
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/ebiWidget/loadReport";
String param = "&formatId=" + formatId;
HttpGet get = new HttpGet(url + "?" + param);
get.addHeader("authorization", access_token);
get.addHeader("client_id", ClientID);
res = client.execute(get);
if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
System.out.println(json);
}
get.releaseConnection();
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (res != null) {
res.close();
}
if (client != null) {
client.close();
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
4、返回示例
{
"size": 5,
"rows": [
{
"MAIN_kCode": "ITK21121304",
"F_A_qtyCount": "2.00000000",
"M_A_code": "ITST21070001",
"aiM18ReservedCol_dataIndex": 1,
"F_A_qtyPhy": "9.00000000",
"MAIN_osCode": "",
"M_A_tDate": "2021.07.15",
"MAIN_sourceTypeMess": "Product / Material",
"PRO_A_id": "40",
"F_A_qty": "-7.00000000",
"MAIN_osId": "0",
"M_A_id": "41",
"F_A_unitId_code": "PCS",
"MAIN_kId": "174",
"PRO_A_code": "ITPRO003"
}
]
}
# 盘点
# 获取盘点列表
# 一、接口描述
用于获取盘点列表(同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) | 是 | stlot |
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=stlot&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": "stlot",
"size": 13,
"stSearchDisplay": "Stock Take",
"values": [
{
"code": "ITSTLOT008",
"tDate": "2022-01-01",
"mainstlot.locId.loc.code": "SZO",
"mainstlot.locId.loc.desc": "深圳仓",
"mainstlot.locId.loc.locTypeId.loctype.code": "PHY",
"mainstlot.locId.loc.locTypeId.loctype.desc": "合格",
"iRev": 1,
"lastModifyDate": "2022-01-07 12:22:44",
"mainstlot.lastModifyUid.simpleUser.desc__lang": "Ivan Tan",
"id": 114,
"st_desc": "ITSTLOT008",
"st_id": 114,
"st_code": "ITSTLOT008"
}
]
}
# 读取盘点
# 一、接口描述
用于读取【盘点】数据
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/read/stlot |
---|---|
http请求方式 | GET |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | stlot |
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/stlot";
String param = "&menuCode=stlot&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": {
"remstlot": [
{
"hId": 114,
"i18nField": "{\"remarks_zh-CN\": \"\"}",
"remarks_zh-CN": "",
"remarks_ccn": "",
"remarks_en": "",
"remarks_haha1": "",
"iRev": 1,
"id": 114,
"remarks_zh-TW": "",
"remarks": "",
"remarks_ctw": "",
"ce01Module": "stlot"
}
],
"mainstlot": [
{
"tDate": 1640966400000,
"lastModifyUid": 11,
"code": "ITSTLOT008",
"cnDeptId": 29,
"useAccess": false,
"virDeptId": 0,
"expiredDate": -2209017600000,
"iRev": 1,
"sysJson": "",
"upOrigin": "GRN",
"viewCode": "stlot",
"ce01Module": "stlot",
"beId": 11,
"curId": 1,
"expired": false,
"rate": 1,
"printCount": 0,
"useAccessBl": false,
"id": 114,
"doctypeId": 0,
"statusModifyDate": 1641529364000,
"locked": false,
"lastModifyDate": 1641529364000,
"createUid": 11,
"locId": 7,
"createDate": 1641529364000,
"rev": "1",
"lastApproveUid": 11,
"expiredUid": 0,
"useAccessWl": false,
"descOrigin": "GRN",
"flowTypeId": 1397,
"useAccessAutoCalc": false,
"staffId": 723,
"status": "Y"
}
],
"stlott": [
{
"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,
"bDesc_zh-TW": "",
"newLotno": 0,
"dualQtyCount": -20,
"lotnoLot": "A",
"id": 180,
"dDesc_haha1": "",
"lotnoNumAttr20": 0,
"lotnoLookupAttr12": 0,
"lotnoLookupAttr13": 0,
"lotnoLookupAttr10": 0,
"lotnoLookupAttr11": 0,
"qtyScan": 0,
"i18nField": "{\"bDesc_zh-CN\": \"auto assign\", \"dDesc_zh-CN\": \"\"}",
"sourceType": "pro",
"costAmt": 0,
"iRev": 1,
"stkUnitQty": -20,
"bDesc_ctw": "",
"ce01Module": "stlot",
"lot": "A",
"lotnoDateAttr3": -2209017600000,
"lotnoDateAttr4": -2209017600000,
"lotnoDateAttr1": -2209017600000,
"lotnoDateAttr2": -2209017600000,
"lotnoDateAttr7": -2209017600000,
"lotnoDateAttr8": -2209017600000,
"lotnoDateAttr5": -2209017600000,
"bDesc_ccn": "",
"lotnoDateAttr6": -2209017600000,
"unitId": 76,
"lotnoDateAttr9": -2209017600000,
"qtyCountBasic": 80,
"locId": 7,
"bDesc_en": "",
"lotnoTextAttr1": "",
"lotnoTextAttr2": "",
"lotnoTextAttr3": "",
"lotnoTextAttr4": "",
"lotnoTextAttr5": "",
"lotnoTextAttr6": "",
"lotnoTextAttr7": "",
"lotnoTextAttr8": "",
"lotnoTextAttr9": "",
"dualPhy": 0,
"bDesc_zh-CN": "auto assign",
"sourceId": 0,
"qtyPhy": 100,
"dualQty": -20,
"itemNo": " 1",
"beId": 11,
"stkUnitPhy": 100,
"bDesc": "auto assign",
"up": 0,
"genType": "K",
"hId": 114,
"lotnoNumAttr1": 0,
"lotnoNumAttr2": 0,
"lotnoNumAttr3": 0,
"unitCount": 76,
"lotnoNumAttr4": 0,
"lotnoExpDate": 253402271999000,
"dDesc": "",
"footerKey": " 1",
"qty": -20,
"lotnoNumAttr5": 0,
"lotnoNumAttr6": 0,
"lotnoNumAttr7": 0,
"lotnoNumAttr8": 0,
"lotnoNumAttr9": 0,
"lotNoId": 2281,
"lotnoTextAttr16": "",
"lotnoTextAttr15": "",
"dDesc_ctw": "",
"lotnoTextAttr18": "",
"lotnoTextAttr17": "",
"lotnoTextAttr12": "",
"lotnoTextAttr11": "",
"lotnoDateAttr20": -2209017600000,
"lotnoTextAttr14": "",
"lotnoTextAttr13": "",
"dDesc_zh-CN": "",
"lotnoTextAttr19": "",
"bDesc_haha1": "",
"dDesc_zh-TW": "",
"dDesc_ccn": "",
"lotnoTextAttr10": "",
"dDesc_en": "",
"dualUnitId": 51,
"qtyCount": 80,
"lotnoLookupAttr5": 0,
"lotnoLookupAttr6": 0,
"sourceLot": "",
"lotnoDateAttr18": -2209017600000,
"lotnoLookupAttr7": 0,
"lotnoDateAttr19": -2209017600000,
"lotnoLookupAttr8": 0,
"lotno": "ITOS18110001",
"lotnoLookupAttr9": 0,
"proId": 62,
"lotnoDateAttr12": -2209017600000,
"lotnoDateAttr13": -2209017600000,
"lotnoDateAttr10": -2209017600000,
"lotnoTextAttr20": "",
"lotnoDateAttr11": -2209017600000,
"lotnoDateAttr16": -2209017600000,
"lotnoLookupAttr1": 0,
"lotnoDateAttr17": -2209017600000,
"lotnoLookupAttr2": 0,
"lotnoDateAttr14": -2209017600000,
"lotnoLookupAttr3": 0,
"lotnoDateAttr15": -2209017600000,
"lotnoLookupAttr4": 0
}
]
},
"messages": [],
"status": true
}
# 保存盘点
# 一、接口描述
用于新增【盘点】
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/save/stlot |
---|---|
http请求方式 | PUT |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | stlot |
param | String(Query) | 否 | 额外的系统参数;JSON字符串 |
3、请求示例
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/stlot";
String param = "&menuCode=stlot";
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格式数据如下:
{
"mainstlot": {
"values": [
{
"beId": 11,
"code": "ITSTLOT220324A",
"tDate": "2022-03-24",
"curId": 1,
"rate": 1,
"flowTypeId": 1397,
"staffId": 723
}
]
},
"stlott": {
"values": [
{
"sourceType": "pro",
"locId": 7,
"proId": 26,
"lotNoId": 1087,
"unitId": 40,
"qty": -1,
"qtyPhy": 10,
"qtyCountBasic": 9,
"unitCount": 40,
"stkUnitQty": -1,
"stkUnitPhy": 10,
"qtyCount": 9
}
]
}
}
4、返回示例
{
"recordId": 116,
"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/stlot |
---|---|
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/stlot";
HttpPost post = new HttpPost(url);
post.addHeader("authorization", access_token);
post.addHeader("client_id", ClientID);
StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON);
entity.setContentEncoding("UTF-8");
post.setEntity(entity);
res = client.execute(post);
if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
if (json != null) {
recordId = json.getLongValue("tranId");
}
System.out.println(json);
}
post.releaseConnection();
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (res != null) {
res.close();
}
if (client != null) {
client.close();
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
data数据示例
{
"beCode": "IT",
"stlott": [
{
"proCode": "ITPRO002",
"unitCode": "PCS",
"unitCount": 40,
"locCode": "SZO",
"lotno": "ITAN17050002-0001",
"qty": -1,
"qtyPhy": 10,
"qtyCountBasic": 9,
"stkUnitQty": -1,
"stkUnitPhy": 10,
"qtyCount": 9
}
]
}
4、返回示例
{
"tranId": 117,
"tranCode": "STL220016",
"message": "",
"status": true
}
# 删除盘点
# 一、接口描述
用于删除盘点
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/delete/stlot |
---|---|
http请求方式 | DELETE |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | stlot |
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/stlot";
String param = "&menuCode=stlot&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": 23,
"rows": [
{
"F_A_qtyCount": "9.00000000",
"M_A_code": "STL220016",
"aiM18ReservedCol_dataIndex": 1,
"F_A_locId_code": "SZO",
"F_A_stkUnitPhy": "10.00000000",
"M_A_tDate": "2022.04.07",
"PRO_A_id": "26",
"LOTNO_A_lotno": "ITAN17050002-0001",
"M_A_id": "117",
"F_A_locId": "7",
"F_A_unitCount_code": "PCS",
"PRO_A_code": "ITPRO002",
"F_A_stkUnitQty": "-1.00000000"
}
]
}
# 组合单
# 获取组合单列表
# 一、接口描述
用于获取组合单列表(同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) | 是 | asb |
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=asb&beId=133";
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": "asb",
"size": 2,
"stSearchDisplay": "Product Assembly",
"values": [
{
"code": "ASB20200023",
"tDate": "2020-06-16",
"mainasb.locId.loc.code": "961",
"mainasb.locId.loc.desc": "961之倉",
"mainasb.locId.loc.locTypeId.loctype.code": "loctype-reg961",
"mainasb.locId.loc.locTypeId.loctype.desc": "961型",
"iRev": 24,
"lastModifyDate": "2020-06-18 12:15:32",
"mainasb.lastModifyUid.simpleUser.desc__lang": "Milk",
"id": 96,
"st_desc": "ASB20200023",
"st_id": 96,
"st_code": "ASB20200023"
}
]
}
# 读取组合单
# 一、接口描述
用于读取【组合单】数据
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/read/asb |
---|---|
http请求方式 | GET |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | asb |
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/asb";
String param = "&menuCode=asb&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": {
"asbbompt": [
{
"sourceId": 0,
"hId": 84,
"pproId": 7,
"iRev": 1,
"processDesc": "倒膜",
"itemNo": " 1",
"uc": 22,
"ce01Module": "asb",
"sourceLot": "",
"pc": 0,
"footerKey": " 1",
"hour": 0,
"pLot": "A",
"processId": 2,
"sourceType": "pro",
"ndFooterKey": " 1",
"id": 122,
"timeUnit": "hh",
"costUnitPer": "cu"
}
],
"asbbomt": [
{
"sourceId": 0,
"dDesc_ctw": "",
"dualQty": 0,
"pproId": 7,
"iRev": 1,
"itemNo": " 1",
"dDesc_zh-CN": "",
"qtyNeed": 1,
"uc": 0,
"bDesc_ctw": "",
"ce01Module": "asb",
"lot": "A",
"bDesc_haha1": "",
"dDesc_zh-TW": "",
"fdFooterKey": " 1",
"processId": 2,
"bDesc": "准确成本法测试",
"bDesc_ccn": "",
"bDesc_zh-TW": "",
"newLotno": 0,
"rdFooterKey": "",
"unitId": 39616,
"refdest": "",
"dDesc_ccn": "",
"id": 205,
"matcatId": 0,
"locId": 1,
"dDesc_haha1": "",
"hId": 84,
"bDesc_en": "",
"matUc": 0,
"dDesc_en": "",
"dualUnitId": 4403,
"sourceLot": "",
"footerKey": " 1",
"dDesc": "",
"i18nField": "",
"pLot": "A",
"sourceType": "pro",
"proId": 4547,
"ndFooterKey": " 1",
"remarks": "",
"lotNoId": 0,
"bDesc_zh-CN": "准确成本法测试"
}
],
"asbtlot": [
{
"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": 1,
"lotnoLot": "A",
"id": 105,
"lotnoNumAttr20": 0,
"lotnoLookupAttr12": 0,
"lotnoLookupAttr13": 0,
"lotnoLookupAttr10": 0,
"lotnoLookupAttr11": 0,
"iRev": 1,
"ce01Module": "asb",
"lotnoDateAttr3": -2209017600000,
"lotnoDateAttr4": -2209017600000,
"lotnoDateAttr1": -2209017600000,
"lotnoDateAttr2": -2209017600000,
"lotnoDateAttr7": -2209017600000,
"lotnoDateAttr8": -2209017600000,
"lotnoDateAttr5": -2209017600000,
"lotnoDateAttr6": -2209017600000,
"unitId": 39,
"lotnoDateAttr9": -2209017600000,
"locId": 1,
"lotnoTextAttr1": "",
"lotnoTextAttr2": "",
"lotnoTextAttr3": "",
"lotnoTextAttr4": "",
"lotnoTextAttr5": "",
"lotnoTextAttr6": "",
"lotnoTextAttr7": "",
"lotnoTextAttr8": "",
"lotnoTextAttr9": "",
"dualQty": 0,
"itemNo": "",
"hId": 84,
"lotnoNumAttr1": 0,
"lotnoNumAttr2": 0,
"lotnoNumAttr3": 0,
"lotnoNumAttr4": 0,
"lotnoExpDate": 253402271999000,
"footerKey": " 1",
"qty": 1,
"lotnoNumAttr5": 0,
"lotnoNumAttr6": 0,
"lotnoNumAttr7": 0,
"lotnoNumAttr8": 0,
"lotnoNumAttr9": 0,
"lotNoId": 3614,
"lotnoTextAttr16": "",
"lotnoTextAttr15": "",
"lotnoTextAttr18": "",
"lotnoTextAttr17": "",
"lotnoTextAttr12": "",
"lotnoTextAttr11": "",
"lotnoDateAttr20": -2209017600000,
"lotnoTextAttr14": "",
"lotnoTextAttr13": "",
"lotnoTextAttr19": "",
"lotnoTextAttr10": "",
"dualUnitId": 16,
"lotnoLookupAttr5": 0,
"lotnoLookupAttr6": 0,
"lotnoLookupAttr7": 0,
"lotnoDateAttr18": -2209017600000,
"lotnoLookupAttr8": 0,
"lotnoDateAttr19": -2209017600000,
"lotno": "ASB20190010001",
"lotnoLookupAttr9": 0,
"proId": 7,
"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
}
],
"asbt": [
{
"sourceId": 0,
"dDesc_ctw": "",
"dualQty": 0,
"costAmt": 0,
"iRev": 1,
"itemNo": " 1",
"dDesc_zh-CN": "",
"uc": 0,
"bDesc_ctw": "",
"ce01Module": "asb",
"beId": 133,
"lot": "A",
"bDesc_haha1": "",
"dDesc_zh-TW": "",
"bDesc": "Product Brief Description(Monthly)",
"bDesc_ccn": "",
"bDesc_zh-TW": "",
"newLotno": 0,
"unitId": 39,
"dDesc_ccn": "",
"id": 95,
"locId": 1,
"dDesc_haha1": "",
"hId": 84,
"bDesc_en": "Product Brief Description(Monthly)",
"matUc": 0,
"dDesc_en": "Product Detailed Description",
"dualUnitId": 16,
"sourceLot": "",
"pc": 0,
"dDesc": "Product Detailed Description",
"footerKey": " 1",
"i18nField": "{\"bDesc_en\": \"Product Brief Description(Monthly)\", \"dDesc_en\": \"Product Detailed Description\", \"bDesc_zh-CN\": \"Product Brief Description(Monthly)\"}",
"sourceType": "pro",
"proId": 7,
"qty": 1,
"cuspono": "",
"lotNoId": 0,
"bDesc_zh-CN": "Product Brief Description(Monthly)"
}
],
"asbbomtlot": [
{
"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": 276,
"lotnoNumAttr20": 0,
"lotnoLookupAttr12": 0,
"lotnoLookupAttr13": 0,
"lotnoLookupAttr10": 0,
"lotnoLookupAttr11": 0,
"iRev": 1,
"ce01Module": "asb",
"lotnoDateAttr3": -2209017600000,
"lotnoDateAttr4": -2209017600000,
"lotnoDateAttr1": -2209017600000,
"lotnoDateAttr2": -2209017600000,
"lotnoDateAttr7": -2209017600000,
"lotnoDateAttr8": -2209017600000,
"lotnoDateAttr5": -2209017600000,
"lotnoDateAttr6": -2209017600000,
"unitId": 39616,
"lotnoDateAttr9": -2209017600000,
"locId": 1,
"lotnoTextAttr1": "",
"lotnoTextAttr2": "",
"lotnoTextAttr3": "",
"lotnoTextAttr4": "",
"lotnoTextAttr5": "",
"lotnoTextAttr6": "",
"lotnoTextAttr7": "",
"lotnoTextAttr8": "",
"lotnoTextAttr9": "",
"dualQty": 0,
"itemNo": " 1",
"hId": 84,
"lotnoNumAttr1": 0,
"lotnoNumAttr2": 0,
"lotnoNumAttr3": 0,
"lotnoNumAttr4": 0,
"lotnoExpDate": 253402271999000,
"footerKey": " 1",
"qty": 1,
"lotnoNumAttr5": 0,
"lotnoNumAttr6": 0,
"lotnoNumAttr7": 0,
"lotnoNumAttr8": 0,
"lotnoNumAttr9": 0,
"lotNoId": 3612,
"lotnoTextAttr16": "",
"lotnoTextAttr15": "",
"lotnoTextAttr18": "",
"lotnoTextAttr17": "",
"lotnoTextAttr12": "",
"lotnoTextAttr11": "",
"lotnoDateAttr20": -2209017600000,
"lotnoTextAttr14": "",
"lotnoTextAttr13": "",
"lotnoTextAttr19": "",
"lotnoTextAttr10": "",
"dualUnitId": 4403,
"lotnoLookupAttr5": 0,
"lotnoLookupAttr6": 0,
"lotnoLookupAttr7": 0,
"lotnoDateAttr18": -2209017600000,
"lotnoLookupAttr8": 0,
"lotnoDateAttr19": -2209017600000,
"lotno": "OS0190073*0001",
"lotnoLookupAttr9": 0,
"proId": 4547,
"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
}
],
"remasb": [
{
"hId": 84,
"i18nField": "{\"remarks_en\": \"\"}",
"remarks_zh-CN": "",
"remarks_ccn": "",
"remarks_en": "",
"remarks_haha1": "",
"iRev": 1,
"id": 82,
"remarks_zh-TW": "",
"remarks": "",
"remarks_ctw": "",
"ce01Module": "asb"
}
],
"mainasb": [
{
"sourceId": 0,
"tDate": 1556553600000,
"lastModifyUid": 20,
"code": "ASB20190011",
"useAccess": false,
"virDeptId": 1,
"expiredDate": -2209017600000,
"iRev": 1,
"sysJson": "{\"autoGenCode\":{\"snId\":534,\"sn\":\"11\"}}",
"upOrigin": "PRO",
"viewCode": "asb",
"ce01Module": "asb",
"beId": 133,
"curId": 2,
"expired": false,
"rate": 0.88,
"printCount": 0,
"useAccessBl": false,
"id": 84,
"doctypeId": 0,
"statusModifyDate": 1556612193000,
"locked": false,
"lastModifyDate": 1556612193000,
"createUid": 20,
"locId": 1,
"createDate": 1556612193000,
"rev": "1",
"lastApproveUid": 0,
"expiredUid": 0,
"mLocId": 1,
"useAccessWl": false,
"descOrigin": "PRO",
"sourceType": "bom",
"sourceModule": "",
"flowTypeId": 6694,
"useAccessAutoCalc": false,
"staffId": 21,
"status": "Y"
}
]
},
"messages": [],
"status": true
}
# 保存组合单
# 一、接口描述
用于新增【组合单】
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/save/asb |
---|---|
http请求方式 | PUT |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | asb |
param | String(Query) | 否 | 额外的系统参数;JSON字符串 |
3、请求示例
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/asb";
String param = "&menuCode=asb";
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格式数据如下:
{
"mainasb": {
"values": [
{
"beId": 133,
"code": "ASB220328A",
"virDeptId": 1,
"curId": 1,
"rate": 1,
"flowTypeId": 6694,
"staffId": 723
}
]
},
"asbt": {
"values": [
{
"sourceType": "pro",
"proId": 7,
"unitId": 39,
"qty": 1,
"footerKey": " 1",
"locId": 1
}
]
},
"asbbompt": {
"values": [
{
"footerKey": " 1",
"pproId": 7,
"uc": 22,
"hour": 0,
"pLot": "A",
"processId": 2,
"sourceType": "pro",
"ndFooterKey": " 1",
"timeUnit": "hh",
"costUnitPer": "cu"
}
]
},
"asbbomt": {
"values": [
{
"pproId": 7,
"qtyNeed": 1,
"lot": "A",
"fdFooterKey": " 1",
"processId": 2,
"unitId": 39616,
"locId": 1,
"footerKey": " 1",
"pLot": "A",
"sourceType": "pro",
"proId": 4547,
"ndFooterKey": " 1"
}
]
},
"asbbomtlot": {
"values": [
{
"proId": 4547,
"newLotno": 0,
"lotNoId": 3612,
"locId": 1,
"footerKey": " 1",
"unitId": 39616,
"qty": 1
}
]
}
}
4、返回示例
{
"recordId": 85,
"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/asb |
---|---|
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/asb";
HttpPost post = new HttpPost(url);
post.addHeader("authorization", access_token);
post.addHeader("client_id", ClientID);
StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON);
entity.setContentEncoding("UTF-8");
post.setEntity(entity);
res = client.execute(post);
if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
if (json != null) {
recordId = json.getLongValue("tranId");
}
System.out.println(json);
}
post.releaseConnection();
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (res != null) {
res.close();
}
if (client != null) {
client.close();
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
data数据示例
{
"beCode": "MX",
"asbt": [
{
"sourceType": "pro",
"proCode": "PRO002",
"unitCode": "PCS",
"qty": 1,
"footerKey": " 1",
"locCode": "PHY"
}
],
"asbbompt": [
{
"footerKey": " 1",
"pproCode": "PRO002",
"uc": 22,
"hour": 0,
"pLot": "A",
"processCode": "001",
"sourceType": "pro",
"ndFooterKey": " 1",
"timeUnit": "hh",
"costUnitPer": "cu"
}
],
"asbbomt": [
{
"pproCode": "PRO002",
"qtyNeed": 1,
"lot": "A",
"fdFooterKey": " 1",
"processCode": "001",
"unitCode": "PCS",
"locCode": "PHY",
"footerKey": " 1",
"pLot": "A",
"sourceType": "pro",
"proCode": "MXLOTNO",
"ndFooterKey": " 1"
}
],
"asbbomtlot": [
{
"proCode": "MXLOTNO",
"newLotno": 0,
"lotNoCode": "OS0190073*0001",
"locCode": "PHY",
"footerKey": " 1",
"unitCode": "PCS",
"qty": 1
}
]
}
4、返回示例
{
"tranId": 86,
"tranCode": "ASB220006",
"message": "",
"status": true
}
# 删除组合单
# 一、接口描述
用于删除组合单
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/delete/asb |
---|---|
http请求方式 | DELETE |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | asb |
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/asb";
String param = "&menuCode=asb&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": 4,
"rows": [
{
"ASBBOMPT_A_pc": "50.00000000",
"ASB_A_id": "52",
"MAIN_matLotQty": "60.00000000",
"aiM18ReservedCol_dataIndex": 1,
"ASBBOMT_A_pproId": "4229",
"ASBT_A_locId_code": "ACLL",
"ASBT_A_locId": "15",
"ASBBOMPT_A_pproId_code": "PRO2018",
"ASBT_A_proId": "4229",
"ASBBOMPT_A_processId": "4",
"ASBBOMT_A_proId_code": "PRO201801",
"ASBT_A_proId_code": "PRO2018",
"ASBBOMT_A_qtyNeed": "100.00000000",
"ASBBOMPT_A_processId_code": "003",
"ASBBOMT_A_pproId_code": "PRO2018",
"ASBBOMPT_A_pproId": "4229",
"ASB_A_tDate": "2018.01.08",
"ASB_A_code": "ASB20180091",
"ASBBOMT_A_proId": "4227"
}
]
}
# 拆解单
# 获取拆解单列表
# 一、接口描述
用于获取拆解单列表(同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) | 是 | dsb |
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=dsb&beId=142";
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": "dsb",
"size": 3,
"stSearchDisplay": "Product Disassembly",
"values": [
{
"code": "DASB21090015",
"tDate": "2021-09-16",
"maindsb.locId.loc.code": "ACLL",
"maindsb.locId.loc.desc": "Asia Cool Logistics Ltd",
"maindsb.locId.loc.locTypeId.loctype.code": "PASS",
"maindsb.locId.loc.locTypeId.loctype.desc": "PASS",
"iRev": 5,
"lastModifyDate": "2021-10-25 17:02:53",
"maindsb.lastModifyUid.simpleUser.desc__lang": "Milk",
"id": 19,
"st_desc": "DASB21090015",
"st_id": 19,
"st_code": "DASB21090015"
}
]
}
# 读取拆解单
# 一、接口描述
用于读取【拆解单】数据
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/read/dsb |
---|---|
http请求方式 | GET |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | dsb |
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/dsb";
String param = "&menuCode=dsb&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": {
"maindsb": [
{
"sourceId": 202,
"tDate": 1631721600000,
"lastModifyUid": 20,
"code": "DASB21090015",
"useAccess": false,
"virDeptId": 7,
"expiredDate": -2209017600000,
"iRev": 5,
"sysJson": "{\"autoGenCode\":{\"snId\":726,\"sn\":\"10\"}}",
"upOrigin": "SOLAST",
"viewCode": "sret",
"ce01Module": "dsb",
"beId": 142,
"curId": 2,
"expired": false,
"rate": 1,
"printCount": 0,
"useAccessBl": false,
"id": 19,
"doctypeId": 0,
"statusModifyDate": 1631785100000,
"locked": false,
"lastModifyDate": 1635152573000,
"createUid": 20,
"locId": 15,
"createDate": 1631785100000,
"rev": "6",
"lastApproveUid": 20,
"expiredUid": 0,
"mLocId": 0,
"useAccessWl": false,
"descOrigin": "SOLAST",
"sourceType": "",
"sourceModule": "sret",
"flowTypeId": 7866