# Master Job
# Fetch Master Job List
# 一、Description
Usage: Fetch Master Job List.
# 二、API Detail
1、Request URL
URL | http://[server]/jsf/rfws/search/search |
---|---|
HTTP Method | GET |
Encode | UTF-8 |
2、URL Parameters
Parameter | Type | Required | Remarks |
---|---|---|---|
authorization | String(Header) | Yes | Access Token obtained via Oauth2 |
client_id | String(Header) | Yes | Client ID from [OAuth Applications], generated by the M18 |
stSearch | String(Query) | Yes | prodMjob |
beId | long(Query) | Yes | Business Entity ID |
formatId | long(Query) | No | Lookup Query ID, If not specified, the default format is used. |
startRow | int(Query) | No | Resultset offset : start index |
endRow | int(Query) | No | Resultset offset : end index |
quickSearchStr | String(Query) | No | Quick search keyword |
3、Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/search/search";
String param = "&stSearch=prodMjob&beId=" + beId;
HttpGet get = new HttpGet(url + "?" + param);
get.addHeader("authorization", access_token);
get.addHeader("client_id", ClientID);
res = client.execute(get);
if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
}
get.releaseConnection();
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (res != null) {
res.close();
}
if (client != null) {
client.close();
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
4、Response Sample
{
"stSearch": "prodMjob",
"size": 178,
"stSearchDisplay": "Master Job",
"values": [
{
"tDate": "2022-03-31",
"code": "MJ220005",
"st_id": 425,
"st_code": "MJ220005",
"prodMainMjob.lastModifyUid.simpleUser.desc__lang": "Milk",
"st_desc": "MJ220005",
"iRev": 3,
"id": 425,
"lastModifyDate": "2022-03-31 15:08:16"
}
]
}
# Create Master Job (Auto Completion)
# 一、Description
1. Usage: Create 【Master Job】
2. This API has the following characteristics:
a. Support using code instead of id field
b. If field staff
has no value specified, the default staff in the User Options will be used automatically
c. If field document date
has no value specified, the value is obtained according to the date option in the [Preference Setup (Trade)]
# 二、API Detail
1、Request URL
URL | http://[server]/jsf/rfws/erp/bsFlow/save/prodMjob |
---|---|
HTTP Method | POST |
Encode | UTF-8 |
2、URL Parameters
Parameter | Type | Required | Remarks |
---|---|---|---|
authorization | String(Header) | Yes | Access Token obtained via Oauth2 |
client_id | String(Header) | Yes | Client ID from [OAuth Applications], generated by the M18 |
3、Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/erp/bsFlow/save/prodMjob";
String param = "";
HttpPost post = new HttpPost(url + "?" + param);
post.addHeader("authorization", access_token);
post.addHeader("client_id", ClientID);
StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON);
entity.setContentEncoding("UTF-8");
post.setEntity(entity);
res = client.execute(post);
if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
if (json != null) {
recordId = json.getLongValue("tranId");
}
System.out.println(json);
}
post.releaseConnection();
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (res != null) {
res.close();
}
if (client != null) {
client.close();
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
Sample data:(Note: The entered proId must have a valid BOM)
{
"beId": 142,
"tDate": "2022-03-23",
"code": "MJOBTEST2",
"virDeptId": 7,
"prodmjobt": [
{
"sourceId": 0,
"lot": "A",
"oriQty": 100,
"sourceLot": "",
"cDate": "2022-03-31",
"sourceType": "pro",
"sDate": "2022-03-23",
"proId": 4634,
"qty": 100,
"unitId": 39720,
"proLot": "A",
"oriUnitId": 39720
}
]
}
4、Response Sample
{
"tranId": 438,
"tranCode": "MJOBTEST2",
"message": "",
"status": true
}
# Load Master Job
# 一、Description
Usage: Load Master Job data
# 二、API Detail
1、Request URL
URL | http://[server]/jsf/rfws/root/api/read/prodMjob |
---|---|
HTTP Method | GET |
Encode | UTF-8 |
2、URL Parameters
Parameter | Type | Required | Remarks |
---|---|---|---|
authorization | String(Header) | Yes | Access Token obtained via Oauth2 |
client_id | String(Header) | Yes | Client ID from [OAuth Applications], generated by the M18 |
menuCode | String(Query) | Yes | prodMjob |
id | long(Query) | Yes | Master Job ID |
param | String(Query) | No | Extra Pamameters: in JSON format |
3、Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/read/prodMjob";
String param = "&menuCode=prodMjob&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、Response Sample
{
"data": {},
"messages": [
{
"msgDetail": "找不到相关记录,记录可能已被Delete 或你没有访问权限",
"msgCode": "core_141019"
}
],
"status": false
}
{
"data": {
"prodmjobmatt": [
{
"udfPJPwidth": 0,
"udfPJPtestNum": 0,
"oriMatLot": "A",
"dualQty": 101,
"preQty": 0.1,
"bomQtyUnitId": 39233,
"itemNo": " 1",
"isSemi": false,
"bomTreeLevel": "",
"oriQty": 101,
"bomReqQty": 101,
"oriMatId": 4236,
"bDesc": "木材 sc 1",
"bDesc_zh-TW": "木材 tc 1",
"refdest": "",
"id": 3550,
"udfPJPtestBool": false,
"matcatId": 0,
"dDesc_haha1": "",
"hId": 425,
"level": " 2",
"bomPreQty": 0.1,
"udfPJPtestLookup": 0,
"completed": false,
"footerKey": " 1",
"dDesc": "<p>1</p>",
"udfPJPstring1": "111",
"i18nField": "{\"bDesc_en\": \"木材 1\", \"dDesc_en\": \"<p>1</p>\", \"dDesc_ctw\": \"<p>1</p>\", \"bDesc_zh-CN\": \"木材 sc 1\", \"bDesc_zh-TW\": \"木材 tc 1\", \"dDesc_zh-CN\": \"<p>1</p>\", \"dDesc_zh-TW\": \"<p>1</p>\"}",
"qty": 101,
"tDate": 1648483200000,
"dDesc_ctw": "<p>1</p>",
"pproId": 4634,
"iRev": 3,
"dDesc_zh-CN": "<p>1</p>",
"wastageQty": 0,
"bDesc_ctw": "",
"ce01Module": "prodMjob",
"bomWastageQty": 0,
"lot": "A",
"bDesc_haha1": "",
"treeLevel": " 1- 2- 1",
"dDesc_zh-TW": "<p>1</p>",
"processId": 12,
"plot": "A",
"udfPJPtestStr": "22",
"bDesc_ccn": "",
"unitId": 39233,
"udfPJPtestDate": -2209017600000,
"dDesc_ccn": "",
"stdQty": 100,
"bomId": 75,
"bDesc_en": "木材 1",
"udfPJPlength": 0,
"dDesc_en": "<p>1</p>",
"oriUnitId": 39233,
"dualUnitId": 4174,
"proId": 4236,
"bomLot": "A",
"bomStdQty": 100,
"remarks": "",
"bDesc_zh-CN": "木材 sc 1"
},
{
"udfPJPwidth": 0,
"udfPJPtestNum": 0,
"oriMatLot": "A",
"dualQty": 106,
"preQty": 6,
"bomQtyUnitId": 38887,
"itemNo": " 2",
"isSemi": false,
"bomTreeLevel": "",
"oriQty": 106,
"bomReqQty": 106,
"oriMatId": 3972,
"bDesc": "圓形鑽石+0 (SI1) sc",
"bDesc_zh-TW": "圓形鑽石+0 (SI1) tc",
"refdest": "",
"id": 3551,
"udfPJPtestBool": false,
"matcatId": 0,
"dDesc_haha1": "",
"hId": 425,
"level": " 2",
"bomPreQty": 6,
"udfPJPtestLookup": 0,
"completed": false,
"footerKey": " 1",
"dDesc": "",
"udfPJPstring1": "",
"i18nField": "{\"bDesc_en\": \"圓形鑽石+0 (SI1)\", \"bDesc_zh-CN\": \"圓形鑽石+0 (SI1) sc\", \"bDesc_zh-TW\": \"圓形鑽石+0 (SI1) tc\"}",
"qty": 106,
"tDate": 1648483200000,
"dDesc_ctw": "",
"pproId": 4634,
"iRev": 3,
"dDesc_zh-CN": "",
"wastageQty": 0,
"bDesc_ctw": "",
"ce01Module": "prodMjob",
"bomWastageQty": 0,
"lot": "A",
"bDesc_haha1": "",
"treeLevel": " 1- 1- 1",
"dDesc_zh-TW": "",
"processId": 11,
"plot": "A",
"udfPJPtestStr": "",
"bDesc_ccn": "",
"unitId": 38887,
"udfPJPtestDate": -2209017600000,
"dDesc_ccn": "",
"stdQty": 100,
"bomId": 75,
"bDesc_en": "圓形鑽石+0 (SI1)",
"udfPJPlength": 0,
"dDesc_en": "",
"oriUnitId": 38887,
"dualUnitId": 3937,
"proId": 3972,
"bomLot": "A",
"bomStdQty": 100,
"remarks": "",
"bDesc_zh-CN": "圓形鑽石+0 (SI1) sc"
}
],
"prodremmjob": [
{
"hId": 425,
"i18nField": "{\"remarks_zh-CN\": \"\"}",
"remarks_zh-CN": "",
"remarks_ccn": "",
"remarks_en": "",
"remarks_haha1": "",
"iRev": 3,
"id": 425,
"remarks_zh-TW": "",
"remarks": "",
"remarks_ctw": "",
"ce01Module": "prodMjob"
}
],
"prodmjobprot": [
{
"sourceId": 0,
"udfPJPwidth": 0,
"udfPJPtestNum": 1000,
"dualQty": 100,
"itemNo": " 1",
"beId": 142,
"oriQty": 100,
"bDesc": "多工艺产品 sc 1",
"bDesc_zh-TW": "多工艺产品 tc 1",
"id": 501,
"qcRequired": true,
"udfPJPtestBool": true,
"subcon": false,
"dDesc_haha1": "",
"hId": 425,
"cDate": 1648656000000,
"perCtn": 0,
"udfPJPtestLookup": 0,
"sideMark": "",
"published": true,
"completed": false,
"volume": 0,
"jobId": 0,
"seedtime": 0,
"footerKey": " 1",
"dDesc": "<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>",
"udfPJPstring1": "Big",
"i18nField": "{\"bDesc_en\": \"多工艺产品 1\", \"dDesc_en\": \"<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>\", \"bDesc_zh-CN\": \"多工艺产品 sc 1\", \"bDesc_zh-TW\": \"多工艺产品 tc 1\", \"dDesc_zh-CN\": \"<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>\", \"dDesc_zh-TW\": \"<p> </p>\"}",
"sourceType": "pro",
"sDate": 1648483200000,
"subcQty": 0,
"qty": 100,
"jobLeadTime": 2,
"dDesc_ctw": "",
"nw": 0,
"iRev": 3,
"dDesc_zh-CN": "<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>",
"confirmed": true,
"bDesc_ctw": "",
"ce01Module": "prodMjob",
"lot": "A",
"prodQty": 100,
"bDesc_haha1": "",
"dDesc_zh-TW": "<p> </p>",
"udfPJPtestStr": "UK",
"bDesc_ccn": "",
"unitId": 39720,
"udfPJPtestDate": 1521129600000,
"dDesc_ccn": "",
"mainMark": "",
"psfId": 3,
"bomId": 75,
"bDesc_en": "多工艺产品 1",
"udfPJPlength": 0,
"dDesc_en": "<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>",
"oriUnitId": 39720,
"dualUnitId": 4489,
"gw": 0,
"sourceLot": "",
"prodDetail": "<p>使用前请先摇一摇</p>",
"proId": 4634,
"cuspono": "",
"remarks": "",
"bDesc_zh-CN": "多工艺产品 sc 1"
}
],
"prodmjobtree": [
{
"hId": 425,
"bomId": 75,
"level": 1,
"iRev": 3,
"itemNo": " 1",
"type": "pro",
"ce01Module": "prodMjob",
"sourceFooterKey": " 1",
"rqty": 1,
"masterProId": 4634,
"pQty": 100,
"treeLevel": " 1",
"footerKey": " 1",
"reqQty": 100,
"processId": 0,
"amWastage": 0,
"bomReqQty": 0,
"matId": 4634,
"masterBomId": 75,
"proId": 4634,
"unitId": 39720,
"id": 8049,
"matBomId": 75
},
{
"hId": 425,
"bomId": 75,
"level": 2,
"iRev": 3,
"itemNo": " 2",
"type": "process",
"ce01Module": "prodMjob",
"sourceFooterKey": " 1",
"rqty": 1,
"masterProId": 4634,
"pQty": 100,
"treeLevel": " 1- 1",
"footerKey": " 1",
"reqQty": 0,
"processId": 11,
"amWastage": 0,
"bomReqQty": 0,
"matId": 0,
"masterBomId": 75,
"proId": 4634,
"unitId": 39720,
"id": 8050,
"matBomId": 75
},
{
"hId": 425,
"bomId": 75,
"level": 3,
"iRev": 3,
"itemNo": " 3",
"type": "material",
"ce01Module": "prodMjob",
"sourceFooterKey": " 1",
"rqty": 1,
"masterProId": 4634,
"pQty": 100,
"treeLevel": " 1- 1- 1",
"footerKey": " 1",
"reqQty": 106,
"processId": 11,
"amWastage": 0,
"bomReqQty": 106,
"matId": 3972,
"masterBomId": 75,
"proId": 4634,
"unitId": 39720,
"id": 8051,
"matBomId": 75
},
{
"hId": 425,
"bomId": 75,
"level": 3,
"iRev": 3,
"itemNo": " 4",
"type": "material",
"ce01Module": "prodMjob",
"sourceFooterKey": " 1",
"rqty": 1,
"masterProId": 4634,
"pQty": 100,
"treeLevel": " 1- 1- 2",
"footerKey": " 1",
"reqQty": 100,
"processId": 11,
"amWastage": 0,
"bomReqQty": 100,
"matId": 3971,
"masterBomId": 75,
"proId": 4634,
"unitId": 39720,
"id": 8052,
"matBomId": 75
},
{
"hId": 425,
"bomId": 75,
"level": 2,
"iRev": 3,
"itemNo": " 5",
"type": "process",
"ce01Module": "prodMjob",
"sourceFooterKey": " 1",
"rqty": 1,
"masterProId": 4634,
"pQty": 100,
"treeLevel": " 1- 2",
"footerKey": " 1",
"reqQty": 0,
"processId": 12,
"amWastage": 0,
"bomReqQty": 0,
"matId": 0,
"masterBomId": 75,
"proId": 4634,
"unitId": 39720,
"id": 8053,
"matBomId": 75
},
{
"hId": 425,
"bomId": 75,
"level": 3,
"iRev": 3,
"itemNo": " 6",
"type": "material",
"ce01Module": "prodMjob",
"sourceFooterKey": " 1",
"rqty": 1,
"masterProId": 4634,
"pQty": 100,
"treeLevel": " 1- 2- 1",
"footerKey": " 1",
"reqQty": 101,
"processId": 12,
"amWastage": 0,
"bomReqQty": 101,
"matId": 4236,
"masterBomId": 75,
"proId": 4634,
"unitId": 39720,
"id": 8054,
"matBomId": 75
}
],
"prodmjobphoto": [
{
"hId": 425,
"footerKey": " 1",
"photoId": 612,
"iRev": 3,
"id": 125,
"itemNo": " 1",
"ce01Module": "prodMjob",
"desc": "2"
}
],
"prodmjobt": [
{
"sourceId": 0,
"udfPJPwidth": 0,
"udfPJPtestNum": 1000,
"dualQty": 100,
"prqFooterKey": "",
"itemNo": " 1",
"prqSourceId": 0,
"beId": 142,
"oriQty": 100,
"bDesc": "多工艺产品 sc 1",
"bDesc_zh-TW": "多工艺产品 tc 1",
"newLotno": 0,
"id": 574,
"udfPJPtestBool": true,
"subcon": false,
"dDesc_haha1": "",
"hId": 425,
"cDate": 1648656000000,
"udfPJPtestLookup": 0,
"prqResultId": 0,
"completed": false,
"dDesc": "<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>",
"footerKey": " 1",
"udfPJPstring1": "Big",
"i18nField": "{\"bDesc_en\": \"多工艺产品 1\", \"dDesc_en\": \"<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>\", \"bDesc_zh-CN\": \"多工艺产品 sc 1\", \"bDesc_zh-TW\": \"多工艺产品 tc 1\", \"dDesc_zh-CN\": \"<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>\", \"dDesc_zh-TW\": \"<p> </p>\"}",
"sourceType": "pro",
"sourceDDate": -2209017600000,
"sDate": 1648483200000,
"qty": 100,
"lotNoId": 0,
"dDesc_ctw": "",
"costAmt": 0,
"pproId": 4634,
"iRev": 3,
"dDesc_zh-CN": "<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>",
"bDesc_ctw": "",
"ce01Module": "prodMjob",
"lot": "A",
"sourceDate": -2209017600000,
"bDesc_haha1": "",
"dDesc_zh-TW": "<p> </p>",
"udfPJPtestStr": "UK",
"bDesc_ccn": "",
"unitId": 39720,
"udfPJPtestDate": 1521129600000,
"dDesc_ccn": "",
"locId": 0,
"psfId": 3,
"bomId": 75,
"bDesc_en": "多工艺产品 1",
"udfPJPlength": 0,
"dDesc_en": "<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>",
"dualUnitId": 4489,
"oriUnitId": 39720,
"prqSourceType": "pro",
"sourceLot": "",
"prqSourceLot": "",
"proId": 4634,
"cuspono": "",
"ndFooterKey": " 1",
"proLot": "A",
"bDesc_zh-CN": "多工艺产品 sc 1"
}
],
"prodmjobpt": [
{
"sHour": 1,
"cuId": 2,
"dualQty": 100,
"itemNo": " 1",
"wcgDesc": "出水",
"bomTreeLevel": "",
"oriQty": 100,
"id": 2063,
"doctypeId": 0,
"subcon": false,
"pcNeed": true,
"processRemarks_zh-TW": "",
"hId": 425,
"cDate": 1648656000000,
"autoGenPw": false,
"processItemNoDesc": " 2",
"level": " 1",
"dispNeed": true,
"processDesc": "鑲石後電金",
"completed": false,
"wcgId": 15,
"capUse": 201,
"jobId": 1650,
"cDateTime": "",
"footerKey": " 1",
"i18nField": "{\"processRemarks_zh-CN\": \"<p>aaaaaaaa</p>\"}",
"processItemNo": " 1",
"sDate": 1648483200000,
"compId": 0,
"qty": 100,
"pHour": 200,
"pbomId": 0,
"tDate": 1648656000000,
"pproId": 0,
"endAccord": "latest",
"processRemarks_zh-CN": "<p>aaaaaaaa</p>",
"iRev": 3,
"ce01Module": "prodMjob",
"lot": "A",
"treeLevel": " 1- 1",
"plot": "",
"processId": 11,
"startAccord": "latest",
"unitId": 39720,
"minCap": 0,
"processRemarks_ccn": "",
"autoGenDisp": false,
"sDateTime": "",
"pjobId": 0,
"bomId": 75,
"processRemarks_ctw": "",
"processRemarks_haha1": "",
"pjobType": "prodJob",
"processRemarks_en": "",
"sFrequency": "job",
"oriUnitId": 39720,
"dualUnitId": 4489,
"proId": 4634,
"ndFooterKey": " 1",
"processRemarks": "<p>aaaaaaaa</p>"
},
{
"sHour": 0,
"cuId": 2,
"dualQty": 100,
"itemNo": " 2",
"wcgDesc": "披锋",
"bomTreeLevel": "",
"oriQty": 100,
"id": 2064,
"doctypeId": 0,
"subcon": true,
"pcNeed": false,
"processRemarks_zh-TW": "",
"hId": 425,
"cDate": 1648656000000,
"autoGenPw": false,
"processItemNoDesc": " 1",
"level": " 1",
"dispNeed": false,
"processDesc": "鑲石",
"completed": false,
"wcgId": 16,
"capUse": 0,
"jobId": 1651,
"cDateTime": "",
"footerKey": " 1",
"i18nField": "{\"processRemarks_zh-CN\": \"<p>bbbbb</p>\"}",
"processItemNo": " 2",
"sDate": 1648483200000,
"compId": 0,
"qty": 100,
"pHour": 0,
"pbomId": 0,
"tDate": 1648656000000,
"pproId": 0,
"endAccord": "latest",
"processRemarks_zh-CN": "<p>bbbbb</p>",
"iRev": 3,
"ce01Module": "prodMjob",
"lot": "A",
"treeLevel": " 1- 2",
"plot": "",
"processId": 12,
"startAccord": "latest",
"unitId": 39720,
"minCap": 0,
"processRemarks_ccn": "",
"autoGenDisp": false,
"sDateTime": "",
"pjobId": 0,
"bomId": 75,
"processRemarks_ctw": "",
"processRemarks_haha1": "",
"pjobType": "prodJob",
"processRemarks_en": "",
"sFrequency": "job",
"oriUnitId": 39720,
"dualUnitId": 4489,
"proId": 4634,
"ndFooterKey": " 2",
"processRemarks": "<p>bbbbb</p>"
}
],
"prodmainmjob": [
{
"tDate": 1648656000000,
"lastModifyUid": 20,
"code": "MJ220005",
"cnDeptId": 218,
"considerSeedTime": true,
"useAccess": false,
"virDeptId": 1,
"expiredDate": -2209017600000,
"iRev": 3,
"sysJson": "{\"autoGenCode\":{\"snId\":1034,\"code\":\"MJ220005\",\"sn\":\"5\"}}",
"viewCode": "prodMjob",
"ce01Module": "prodMjob",
"recalcSch": false,
"beId": 142,
"expired": false,
"printCount": 0,
"useAccessBl": false,
"id": 425,
"doctypeId": 0,
"statusModifyDate": 1648710495000,
"locked": false,
"lastModifyDate": 1648710496000,
"createUid": 20,
"createDate": 1648710488000,
"rev": "1",
"lastApproveUid": 20,
"expiredUid": 0,
"useAccessWl": false,
"considerJobLeadTime": false,
"useAccessAutoCalc": false,
"staffId": 21,
"status": "Y"
}
]
},
"messages": [],
"status": true
}
# Create Master Job
# 一、Description
Usage: Create or Update 【Master Job】
# 二、API Detail
1、Request URL
URL | http://[server]/jsf/rfws/root/api/save/prodMjob |
---|---|
HTTP Method | PUT |
Encode | UTF-8 |
2、URL Parameters
Parameter | Type | Required | Remarks |
---|---|---|---|
authorization | String(Header) | Yes | Access Token obtained via Oauth2 |
client_id | String(Header) | Yes | Client ID from [OAuth Applications], generated by the M18 |
menuCode | String(Query) | Yes | prodMjob |
param | String(Query) | No | Extra Pamameters: in JSON format |
3、Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/prodMjob";
String param = "&menuCode=prodMjob";
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 data as JSON format:
{
"prodmjobmatt": {
"values": [
{
"tDate": "2022-03-23",
"level": " 2",
"pproId": 4634,
"preQty": 6,
"oriUnitId": 38887,
"lot": "A",
"oriQty": 106,
"treeLevel": " 1- 1- 1",
"footerKey": " 1",
"proId": 3972,
"qty": 106,
"unitId": 38887,
"proLot": "A",
"stdQty": 100
}
]
},
"prodmjobprot": {
"values": [
{
"sourceId": 0,
"cDate": "2022-03-31",
"oriUnitId": 39720,
"lot": "A",
"oriQty": 100,
"sourceLot": "",
"footerKey": " 1",
"sourceType": "pro",
"sDate": "2022-03-23",
"proId": 4634,
"qty": 100,
"unitId": 39720,
"proLot": "A"
}
]
},
"prodmjobt": {
"values": [
{
"sourceId": 0,
"cDate": "2022-03-31",
"oriUnitId": 39720,
"lot": "A",
"oriQty": 100,
"sourceLot": "",
"footerKey": " 1",
"sourceType": "pro",
"sDate": "2022-03-23",
"proId": 4634,
"qty": 100,
"unitId": 39720,
"ndFooterKey": " 1",
"proLot": "A"
}
]
},
"prodmjobpt": {
"values": [
{
"tDate": "2022-03-23",
"cDate": "2022-03-31",
"cuId": 2,
"level": " 1",
"dispNeed": true,
"wcgId": 15,
"oriUnitId": 39720,
"lot": "A",
"oriQty": 100,
"treeLevel": " 1- 1",
"footerKey": " 1",
"processId": 11,
"sDate": "2022-03-23",
"proId": 4634,
"qty": 100,
"unitId": 39720,
"proLot": "A",
"pcNeed": true
}
]
},
"prodmainmjob": {
"values": [
{
"beId": 142,
"tDate": "2022-03-23",
"code": "MJOBTEST",
"virDeptId": 7,
"staffId": 785
}
]
}
}
4、Response Sample
{
"recordId": 439,
"messages": [],
"status": true
}
{
"recordId": 0,
"messages": [
{
"msgDetail": "Required field is empty",
"msgCode": "core_101905"
}
],
"status": false
}
# Delete Master Job
# 一、Description
Usage: Delete Master Job
# 二、API Detail
1、Request URL
URL | http://[server]/jsf/rfws/root/api/delete/prodMjob |
---|---|
HTTP Method | DELETE |
Encode | UTF-8 |
2、URL Parameters
Parameter | Type | Required | Remarks |
---|---|---|---|
authorization | String(Header) | Yes | Access Token obtained via Oauth2 |
client_id | String(Header) | Yes | Client ID from [OAuth Applications], generated by the M18 |
menuCode | String(Query) | Yes | prodMjob |
id | long(Query) | Yes | Master Job ID |
param | String(Query) | No | Extra Pamameters: in JSON format |
3、Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/delete/prodMjob";
String param = "&menuCode=prodMjob&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、Response Sample
{
"messages": [],
"status": true
}
{
"messages": [
{
"msgDetail": "Record has been deleted",
"msgCode": "core_101017"
}
],
"status": false
}
# Load EBI data:Master Job List
# 一、Description
Usage: Run EBI[Master Job List],return EBI data
# 二、API Detail
1、Request URL
URL | http://[server]/jsf/rfws/ebiWidget/loadReport |
---|---|
HTTP Method | GET |
Encode | UTF-8 |
2、URL Parameters
Parameter | Type | Required | Remarks |
---|---|---|---|
authorization | String(Header) | Yes | Access Token obtained via Oauth2 |
client_id | String(Header) | Yes | Client ID from [OAuth Applications], generated by the M18 |
formatId | long(Query) | Yes | Format ID fetched from another API |
beId | long(Query) | No | Business Entity ID,If not specified, query all authorized Business Entity data. |
offset | int(Query) | No | Resultset offset : start index |
rows | int(Query) | No | Resultset offset : end index |
3、Request Sample
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、Response Sample
{
"size": 1,
"rows": [
{
"MAIN_compQty": "0.0000",
"MAIN_outQty": "5.0000",
"M18ReservedCol_dataIndex": 1,
"MAIN_pdnPwRate": "0.00",
"MAIN_pdnOutPwQty": "0.0000",
"MAIN_planQty": "5.0000",
"MJOB_A_code": "MJOB20170015",
"PRO_A_id": "3967",
"MAIN_pdnQty": "0.0000",
"MAIN_outPdnQty": "5.0000",
"MJOB_A_id": "29",
"MAIN_pdnRate": "0.00",
"MAIN_pwRate": "0.00",
"PRO_A_code": "MX-JZ-F"
}
]
}
# Load EBI data:Master Job Data Source Report
# 一、Description
Usage: Run EBI[Master Job Data Source Report],return EBI data
# 二、API Detail
1、Request URL
URL | http://[server]/jsf/rfws/ebiWidget/loadReport |
---|---|
HTTP Method | GET |
Encode | UTF-8 |
2、URL Parameters
Parameter | Type | Required | Remarks |
---|---|---|---|
authorization | String(Header) | Yes | Access Token obtained via Oauth2 |
client_id | String(Header) | Yes | Client ID from [OAuth Applications], generated by the M18 |
formatId | long(Query) | Yes | Format ID fetched from another API |
beId | long(Query) | No | Business Entity ID,If not specified, query all authorized Business Entity data. |
offset | int(Query) | No | Resultset offset : start index |
rows | int(Query) | No | Resultset offset : end index |
3、Request Sample
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、Response Sample
{
"size": 1,
"rows": [
{
"MAIN_sourceType": "oldso",
"MAIN_outQty": "8.0000",
"MAIN_sourceQty": "11.0000",
"M18ReservedCol_dataIndex": 1,
"MAIN_basicDualQty": "0.00",
"MAIN_sourceId": "764",
"MAIN_sourceCode": "SO0170237"
}
]
}
# Work Process Dispatch
# Fetch Work Process Dispatch List
# 一、Description
Usage: Fetch Work Process Dispatch List.
# 二、API Detail
1、Request URL
URL | http://[server]/jsf/rfws/search/search |
---|---|
HTTP Method | GET |
Encode | UTF-8 |
2、URL Parameters
Parameter | Type | Required | Remarks |
---|---|---|---|
authorization | String(Header) | Yes | Access Token obtained via Oauth2 |
client_id | String(Header) | Yes | Client ID from [OAuth Applications], generated by the M18 |
stSearch | String(Query) | Yes | prodDisp |
beId | long(Query) | Yes | Business Entity ID |
formatId | long(Query) | No | Lookup Query ID, If not specified, the default format is used. |
startRow | int(Query) | No | Resultset offset : start index |
endRow | int(Query) | No | Resultset offset : end index |
quickSearchStr | String(Query) | No | Quick search keyword |
3、Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/search/search";
String param = "&stSearch=prodDisp&beId=" + beId;
HttpGet get = new HttpGet(url + "?" + param);
get.addHeader("authorization", access_token);
get.addHeader("client_id", ClientID);
res = client.execute(get);
if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
}
get.releaseConnection();
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (res != null) {
res.close();
}
if (client != null) {
client.close();
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
4、Response Sample
{
"stSearch": "prodDisp",
"size": 1,
"stSearchDisplay": "Work Process Dispatch",
"values": [
{
"tDate": "2021-12-06",
"code": "DISP20210004",
"st_id": 136,
"st_code": "DISP20210004",
"st_desc": "DISP20210004",
"iRev": 2,
"prodMainDisp.lastModifyUid.simpleUser.desc__lang": "Milk",
"id": 136,
"lastModifyDate": "2021-12-06 18:06:35"
}
]
}
# Create Work Process Dispatch (Auto Completion)
# 一、Description
1. Usage: Create 【Work Process Dispatch】
2. This API has the following characteristics:
a. Support using code instead of id field
b. If field staff
has no value specified, the default staff in the User Options will be used automatically
c. If field document date
has no value specified, the value is obtained according to the date option in the [Preference Setup (Trade)]
# 二、API Detail
1、Request URL
URL | http://[server]/jsf/rfws/erp/bsFlow/save/prodDisp |
---|---|
HTTP Method | POST |
Encode | UTF-8 |
2、URL Parameters
Parameter | Type | Required | Remarks |
---|---|---|---|
authorization | String(Header) | Yes | Access Token obtained via Oauth2 |
client_id | String(Header) | Yes | Client ID from [OAuth Applications], generated by the M18 |
3、Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/erp/bsFlow/save/prodDisp";
String param = "";
HttpPost post = new HttpPost(url + "?" + param);
post.addHeader("authorization", access_token);
post.addHeader("client_id", ClientID);
StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON);
entity.setContentEncoding("UTF-8");
post.setEntity(entity);
res = client.execute(post);
if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
if (json != null) {
recordId = json.getLongValue("tranId");
}
System.out.println(json);
}
post.releaseConnection();
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (res != null) {
res.close();
}
if (client != null) {
client.close();
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
Sample data:
{
"beId": 142,
"tDate": "2022-03-23",
"code": "DISPTEST",
"virDeptId": 7,
"proddispt": [
{
"lot": "A",
"jobId": 1650,
"oriQty": 100,
"proId": 4634,
"oriUnitId": 39720
}
]
}
4、Response Sample
{
"tranId": 137,
"tranCode": "DISPTEST",
"message": "",
"status": true
}
# Load Work Process Dispatch
# 一、Description
Usage: Load Work Process Dispatch Data
# 二、API Detail
1、Request URL
URL | http://[server]/jsf/rfws/root/api/read/prodDisp |
---|---|
HTTP Method | GET |
Encode | UTF-8 |
2、URL Parameters
Parameter | Type | Required | Remarks |
---|---|---|---|
authorization | String(Header) | Yes | Access Token obtained via Oauth2 |
client_id | String(Header) | Yes | Client ID from [OAuth Applications], generated by the M18 |
menuCode | String(Query) | Yes | prodDisp |
id | long(Query) | Yes | Work Process Dispatch ID |
param | String(Query) | No | Extra Pamameters: in JSON format |
3、Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/read/prodDisp";
String param = "&menuCode=prodDisp&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、Response Sample
{
"data": {},
"messages": [
{
"msgDetail": "找不到相关记录,记录可能已被Delete 或你没有访问权限",
"msgCode": "core_141019"
}
],
"status": false
}
{
"data": {
"proddispstt": [
{
"sourceId": 425,
"dDesc_ctw": "",
"dualQty": 0,
"iRev": 1,
"itemNo": " 1",
"dDesc_zh-CN": "<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>",
"bDesc_ctw": "",
"ce01Module": "prodDisp",
"beId": 142,
"sourceDate": 1647964800000,
"oriQty": 100,
"bDesc_haha1": "",
"dDesc_zh-TW": "<p> </p>",
"bDesc": "多工艺产品 sc 1",
"bDesc_ccn": "",
"bDesc_zh-TW": "多工艺产品 tc 1",
"unitId": 39720,
"dDesc_ccn": "",
"id": 279,
"dDesc_haha1": "",
"hId": 137,
"cDate": 1648656000000,
"bDesc_en": "多工艺产品 1",
"dDesc_en": "<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>",
"sourceProId": 4634,
"oriUnitId": 39720,
"dualUnitId": 0,
"jobId": 1650,
"sourceLot": "A",
"sourceMjobLot": "A",
"footerKey": " 1",
"dDesc": "<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>",
"i18nField": "{\"bDesc_en\": \"多工艺产品 1\", \"dDesc_en\": \"<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>\", \"bDesc_zh-CN\": \"多工艺产品 sc 1\", \"bDesc_zh-TW\": \"多工艺产品 tc 1\", \"dDesc_zh-CN\": \"<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>\", \"dDesc_zh-TW\": \"<p> </p>\"}",
"sourceType": "prodMjob",
"sourceDDate": -2209017600000,
"proId": 4634,
"qty": 100,
"bDesc_zh-CN": "多工艺产品 sc 1"
}
],
"prodremdisp": [
{
"hId": 137,
"i18nField": "{\"remarks_zh-CN\": \"\"}",
"remarks_zh-CN": "",
"remarks_ccn": "",
"remarks_en": "",
"remarks_haha1": "",
"iRev": 1,
"id": 138,
"remarks_zh-TW": "",
"remarks": "",
"remarks_ctw": "",
"ce01Module": "prodDisp"
}
],
"proddispt": [
{
"dDesc_ctw": "",
"dualQty": 0,
"endAccord": "latest",
"iRev": 1,
"itemNo": " 1",
"dDesc_zh-CN": "<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>",
"wcgDesc": "出水",
"bDesc_ctw": "",
"ce01Module": "prodDisp",
"beId": 142,
"ttlCapAss": 0,
"oriQty": 100,
"bDesc_haha1": "",
"dDesc_zh-TW": "<p> </p>",
"processId": 11,
"startAccord": "latest",
"bDesc": "多工艺产品 sc 1",
"bDesc_ccn": "",
"bDesc_zh-TW": "多工艺产品 tc 1",
"unitId": 39720,
"dDesc_ccn": "",
"id": 209,
"dDesc_haha1": "",
"pjobId": 0,
"hId": 137,
"mjobId": 425,
"cDate": 1648656000000,
"bDesc_en": "多工艺产品 1",
"processDesc": "鑲石後電金",
"dDesc_en": "<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>",
"wcgId": 15,
"oriUnitId": 39720,
"dualUnitId": 4489,
"jobId": 1650,
"footerKey": " 1",
"dDesc": "<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>",
"i18nField": "{\"bDesc_en\": \"多工艺产品 1\", \"dDesc_en\": \"<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>\", \"bDesc_zh-CN\": \"多工艺产品 sc 1\", \"bDesc_zh-TW\": \"多工艺产品 tc 1\", \"dDesc_zh-CN\": \"<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>\", \"dDesc_zh-TW\": \"<p> </p>\"}",
"sDate": 1647964800000,
"proId": 4634,
"qty": 100,
"bDesc_zh-CN": "多工艺产品 sc 1"
}
],
"prodmaindisp": [
{
"tDate": 1647964800000,
"lastModifyUid": 20,
"code": "DISPTEST",
"cnDeptId": 0,
"useAccess": false,
"virDeptId": 7,
"expiredDate": -2209017600000,
"iRev": 1,
"sysJson": "",
"viewCode": "prodDisp",
"ce01Module": "prodDisp",
"beId": 142,
"expired": false,
"printCount": 0,
"useAccessBl": false,
"id": 137,
"doctypeId": 0,
"statusModifyDate": 1648868324000,
"locked": false,
"lastModifyDate": 1648868324000,
"createUid": 20,
"createDate": 1648868324000,
"rev": "1",
"lastApproveUid": 20,
"expiredUid": 0,
"useAccessWl": false,
"useAccessAutoCalc": false,
"staffId": 21,
"status": "Y"
}
]
},
"messages": [],
"status": true
}
# Create Work Process Dispatch
# 一、Description
Usage: Create or Update 【Work Process Dispatch】
# 二、API Detail
1、Request URL
URL | http://[server]/jsf/rfws/root/api/save/prodDisp |
---|---|
HTTP Method | PUT |
Encode | UTF-8 |
2、URL Parameters
Parameter | Type | Required | Remarks |
---|---|---|---|
authorization | String(Header) | Yes | Access Token obtained via Oauth2 |
client_id | String(Header) | Yes | Client ID from [OAuth Applications], generated by the M18 |
menuCode | String(Query) | Yes | prodDisp |
param | String(Query) | No | Extra Pamameters: in JSON format |
3、Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/prodDisp";
String param = "&menuCode=prodDisp";
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 data as JSON format:
{
"proddispstt": {
"values": [
{
"sourceId": 425,
"cDate": "2022-03-31",
"oriUnitId": 39720,
"sourceDate": "2022-03-23",
"lot": "A",
"jobId": 1650,
"oriQty": 100,
"sourceLot": "A",
"sourceMjobLot": "A",
"footerKey": " 1",
"sourceType": "prodMjob",
"proId": 4634,
"qty": 100,
"unitId": 39720,
"proLot": "A"
}
]
},
"proddispt": {
"values": [
{
"mjobId": 425,
"cDate": "2022-03-31",
"wcgId": 15,
"oriUnitId": 39720,
"lot": "A",
"jobId": 1650,
"oriQty": 100,
"footerKey": " 1",
"processId": 11,
"sDate": "2022-03-23",
"proId": 4634,
"qty": 100,
"unitId": 39720
}
]
},
"prodmaindisp": {
"values": [
{
"beId": 142,
"tDate": "2022-03-23",
"code": "DISPTEST2",
"virDeptId": 7,
"staffId": 785
}
]
}
}
4、Response Sample
{
"recordId": 138,
"messages": [],
"status": true
}
{
"recordId": 0,
"messages": [
{
"msgDetail": "Required field is empty",
"msgCode": "core_101905"
}
],
"status": false
}
# Delete Work Process Dispatch
# 一、Description
Usage: Delete Work Process Dispatch
# 二、API Detail
1、Request URL
URL | http://[server]/jsf/rfws/root/api/delete/prodDisp |
---|---|
HTTP Method | DELETE |
Encode | UTF-8 |
2、URL Parameters
Parameter | Type | Required | Remarks |
---|---|---|---|
authorization | String(Header) | Yes | Access Token obtained via Oauth2 |
client_id | String(Header) | Yes | Client ID from [OAuth Applications], generated by the M18 |
menuCode | String(Query) | Yes | prodDisp |
id | long(Query) | Yes | Work Process Dispatch ID |
param | String(Query) | No | Extra Pamameters: in JSON format |
3、Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/delete/prodDisp";
String param = "&menuCode=prodDisp&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、Response Sample
{
"messages": [],
"status": true
}
{
"messages": [
{
"msgDetail": "Record has been deleted",
"msgCode": "core_101017"
}
],
"status": false
}
# Load EBI data:Work Process Dispatch Report
# 一、Description
Usage: Run EBI[Work Process Dispatch Report],return EBI data
# 二、API Detail
1、Request URL
URL | http://[server]/jsf/rfws/ebiWidget/loadReport |
---|---|
HTTP Method | GET |
Encode | UTF-8 |
2、URL Parameters
Parameter | Type | Required | Remarks |
---|---|---|---|
authorization | String(Header) | Yes | Access Token obtained via Oauth2 |
client_id | String(Header) | Yes | Client ID from [OAuth Applications], generated by the M18 |
formatId | long(Query) | Yes | Format ID fetched from another API |
beId | long(Query) | No | Business Entity ID,If not specified, query all authorized Business Entity data. |
offset | int(Query) | No | Resultset offset : start index |
rows | int(Query) | No | Resultset offset : end index |
3、Request Sample
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、Response Sample
{
"size": 1,
"rows": [
{
"MAIN_outQty": "0.0000",
"DISP_A_id": "23",
"M18ReservedCol_dataIndex": 1,
"MAIN_qty": "5.0000",
"MAIN_pcQty": "5.0000",
"DISP_A_code": "DISP20170032"
}
]
}
# Work Process Complete
# Fetch Work Process Complete List
# 一、Description
Usage: Fetch Work Process Complete List.
# 二、API Detail
1、Request URL
URL | http://[server]/jsf/rfws/search/search |
---|---|
HTTP Method | GET |
Encode | UTF-8 |
2、URL Parameters
Parameter | Type | Required | Remarks |
---|---|---|---|
authorization | String(Header) | Yes | Access Token obtained via Oauth2 |
client_id | String(Header) | Yes | Client ID from [OAuth Applications], generated by the M18 |
stSearch | String(Query) | Yes | prodPc |
beId | long(Query) | Yes | Business Entity ID |
formatId | long(Query) | No | Lookup Query ID, If not specified, the default format is used. |
startRow | int(Query) | No | Resultset offset : start index |
endRow | int(Query) | No | Resultset offset : end index |
quickSearchStr | String(Query) | No | Quick search keyword |
3、Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/search/search";
String param = "&stSearch=prodPc&beId=" + beId;
HttpGet get = new HttpGet(url + "?" + param);
get.addHeader("authorization", access_token);
get.addHeader("client_id", ClientID);
res = client.execute(get);
if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
}
get.releaseConnection();
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (res != null) {
res.close();
}
if (client != null) {
client.close();
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
4、Response Sample
{
"stSearch": "prodPc",
"size": 1,
"stSearchDisplay": "Work Process Complete",
"values": [
{
"tDate": "2021-09-27",
"code": "PC20210002",
"st_id": 102,
"st_code": "PC20210002",
"prodMainPc.lastModifyUid.simpleUser.desc__lang": "Milk",
"st_desc": "PC20210002",
"iRev": 3,
"id": 102,
"lastModifyDate": "2021-09-26 14:19:52"
}
]
}
# Create Work Process Complete (Auto Completion)
# 一、Description
1. Usage: Create 【Work Process Complete】
2. This API has the following characteristics:
a. Support using code instead of id field
b. If field staff
has no value specified, the default staff in the User Options will be used automatically
c. If field document date
has no value specified, the value is obtained according to the date option in the [Preference Setup (Trade)]
# 二、API Detail
1、Request URL
URL | http://[server]/jsf/rfws/erp/bsFlow/save/prodPc |
---|---|
HTTP Method | POST |
Encode | UTF-8 |
2、URL Parameters
Parameter | Type | Required | Remarks |
---|---|---|---|
authorization | String(Header) | Yes | Access Token obtained via Oauth2 |
client_id | String(Header) | Yes | Client ID from [OAuth Applications], generated by the M18 |
3、Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/erp/bsFlow/save/prodPc";
String param = "";
HttpPost post = new HttpPost(url + "?" + param);
post.addHeader("authorization", access_token);
post.addHeader("client_id", ClientID);
StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON);
entity.setContentEncoding("UTF-8");
post.setEntity(entity);
res = client.execute(post);
if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
if (json != null) {
recordId = json.getLongValue("tranId");
}
System.out.println(json);
}
post.releaseConnection();
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (res != null) {
res.close();
}
if (client != null) {
client.close();
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
Sample data:
{
"beId": 142,
"tDate": "2022-03-23",
"code": "PCTEST",
"virDeptId": 7,
"prodpct": [
{
"sourceId": 139,
"lot": "A",
"jobId": 1650,
"oriQty": 100,
"sourceType": "prodDisp",
"proId": 4634,
"oriUnitId": 39720,
"passQty": 100
}
]
}
4、Response Sample
{
"tranId": 104,
"tranCode": "PCTEST",
"message": "",
"status": true
}
# Load Work Process Complete
# 一、Description
Usage: Load Work Process Complete Data
# 二、API Detail
1、Request URL
URL | http://[server]/jsf/rfws/root/api/read/prodPc |
---|---|
HTTP Method | GET |
Encode | UTF-8 |
2、URL Parameters
Parameter | Type | Required | Remarks |
---|---|---|---|
authorization | String(Header) | Yes | Access Token obtained via Oauth2 |
client_id | String(Header) | Yes | Client ID from [OAuth Applications], generated by the M18 |
menuCode | String(Query) | Yes | prodPc |
id | long(Query) | Yes | Work Process Complete ID |
param | String(Query) | No | Extra Pamameters: in JSON format |
3、Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/read/prodPc";
String param = "&menuCode=prodPc&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、Response Sample
{
"data": {},
"messages": [
{
"msgDetail": "找不到相关记录,记录可能已被Delete 或你没有访问权限",
"msgCode": "core_141019"
}
],
"status": false
}
{
"data": {
"prodrempc": [
{
"hId": 104,
"i18nField": "{\"remarks_zh-CN\": \"\"}",
"remarks_zh-CN": "",
"remarks_ccn": "",
"remarks_en": "",
"remarks_haha1": "",
"iRev": 1,
"id": 104,
"remarks_zh-TW": "",
"remarks": "",
"remarks_ctw": "",
"ce01Module": "prodPc"
}
],
"prodmainpc": [
{
"tDate": 1647964800000,
"lastModifyUid": 20,
"code": "PCTEST",
"cnDeptId": 0,
"useAccess": false,
"virDeptId": 7,
"expiredDate": -2209017600000,
"iRev": 1,
"sysJson": "",
"viewCode": "prodPc",
"ce01Module": "prodPc",
"beId": 142,
"expired": false,
"printCount": 0,
"useAccessBl": false,
"id": 104,
"doctypeId": 0,
"statusModifyDate": 1648870289000,
"locked": false,
"lastModifyDate": 1648870289000,
"createUid": 20,
"createDate": 1648870289000,
"rev": "1",
"lastApproveUid": 20,
"expiredUid": 0,
"useAccessWl": false,
"useAccessAutoCalc": false,
"staffId": 785,
"status": "Y"
}
],
"prodpct": [
{
"sourceId": 139,
"failQty": 0,
"dualQty": 0,
"itemNo": " 1",
"laborStaffId": 0,
"wcgDesc": "出水",
"beId": 142,
"oriQty": 100,
"bDesc": "多工艺产品 sc 1",
"bDesc_zh-TW": "多工艺产品 tc 1",
"directLaborUnit": "staff",
"id": 224,
"dDesc_haha1": "",
"hId": 104,
"autoGenPw": false,
"processDesc": "鑲石後電金",
"wcgId": 15,
"calcByLaborCountedQty": false,
"passQty": 100,
"jobId": 1650,
"footerKey": " 1",
"dDesc": "<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>",
"laborCountedQty": 100,
"i18nField": "{\"bDesc_en\": \"多工艺产品 1\", \"dDesc_en\": \"<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>\", \"bDesc_zh-CN\": \"多工艺产品 sc 1\", \"bDesc_zh-TW\": \"多工艺产品 tc 1\", \"dDesc_zh-CN\": \"<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>\", \"dDesc_zh-TW\": \"<p> </p>\"}",
"sourceType": "prodDisp",
"qty": 100,
"scrapMachineQty": 0,
"dDesc_ctw": "",
"iRev": 1,
"dDesc_zh-CN": "<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>",
"bDesc_ctw": "",
"ce01Module": "prodPc",
"bDesc_haha1": "",
"dDesc_zh-TW": "<p> </p>",
"processId": 11,
"bDesc_ccn": "",
"scrapMQty": 0,
"unitId": 39720,
"dDesc_ccn": "",
"pjobId": 0,
"mjobId": 425,
"bDesc_en": "多工艺产品 1",
"scrapQty": 0,
"dDesc_en": "<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>",
"oriUnitId": 39720,
"dualUnitId": 4489,
"noLaborCost": false,
"sourceLot": "",
"laborGroupId": 0,
"proId": 4634,
"dispId": 139,
"bDesc_zh-CN": "多工艺产品 sc 1"
}
],
"prodpcstt": [
{
"sourceId": 425,
"dDesc_ctw": "",
"dualQty": 0,
"iRev": 1,
"itemNo": " 1",
"dDesc_zh-CN": "<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>",
"bDesc_ctw": "",
"ce01Module": "prodPc",
"beId": 142,
"oriQty": 100,
"bDesc_haha1": "",
"dDesc_zh-TW": "<p> </p>",
"bDesc": "多工艺产品 sc 1",
"bDesc_ccn": "",
"bDesc_zh-TW": "多工艺产品 tc 1",
"unitId": 39720,
"dDesc_ccn": "",
"id": 299,
"dDesc_haha1": "",
"hId": 104,
"bDesc_en": "多工艺产品 1",
"dDesc_en": "<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>",
"sourceProId": 4634,
"oriUnitId": 39720,
"dualUnitId": 0,
"jobId": 1650,
"sourceLot": "A",
"sourceMjobLot": "A",
"footerKey": " 1",
"dDesc": "<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>",
"i18nField": "{\"bDesc_en\": \"多工艺产品 1\", \"dDesc_en\": \"<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>\", \"bDesc_zh-CN\": \"多工艺产品 sc 1\", \"bDesc_zh-TW\": \"多工艺产品 tc 1\", \"dDesc_zh-CN\": \"<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>\", \"dDesc_zh-TW\": \"<p> </p>\"}",
"sourceType": "prodMjob",
"proId": 4634,
"qty": 100,
"dispId": 139,
"bDesc_zh-CN": "多工艺产品 sc 1"
}
]
},
"messages": [],
"status": true
}
# Create Work Process Complete
# 一、Description
Usage: Create or Update 【Work Process Complete】
# 二、API Detail
1、Request URL
URL | http://[server]/jsf/rfws/root/api/save/prodPc |
---|---|
HTTP Method | PUT |
Encode | UTF-8 |
2、URL Parameters
Parameter | Type | Required | Remarks |
---|---|---|---|
authorization | String(Header) | Yes | Access Token obtained via Oauth2 |
client_id | String(Header) | Yes | Client ID from [OAuth Applications], generated by the M18 |
menuCode | String(Query) | Yes | prodPc |
param | String(Query) | No | Extra Pamameters: in JSON format |
3、Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/prodPc";
String param = "&menuCode=prodPc";
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 data as JSON format:
{
"prodmainpc": {
"values": [
{
"beId": 142,
"tDate": "2022-03-23",
"code": "PCTEST2",
"virDeptId": 7,
"staffId": 785
}
]
},
"prodpct": {
"values": [
{
"sourceId": 139,
"mjobId": 425,
"wcgId": 15,
"oriUnitId": 39720,
"passQty": 100,
"lot": "A",
"jobId": 1650,
"oriQty": 100,
"sourceLot": "",
"footerKey": " 1",
"sourceType": "prodDisp",
"processId": 11,
"proId": 4634,
"qty": 100,
"unitId": 39720,
"dispId": 139
}
]
},
"prodpcstt": {
"values": [
{
"sourceId": 425,
"sourceProId": 4634,
"oriUnitId": 39720,
"lot": "A",
"jobId": 1650,
"oriQty": 100,
"sourceLot": "A",
"sourceMjobLot": "A",
"footerKey": " 1",
"sourceType": "prodMjob",
"proId": 4634,
"qty": 100,
"unitId": 39720,
"dispId": 139
}
]
}
}
4、Response Sample
{
"recordId": 138,
"messages": [],
"status": true
}
{
"recordId": 0,
"messages": [
{
"msgDetail": "Required field is empty",
"msgCode": "core_101905"
}
],
"status": false
}
# Delete Work Process Complete
# 一、Description
Usage: Delete Work Process Complete
# 二、API Detail
1、Request URL
URL | http://[server]/jsf/rfws/root/api/delete/prodPc |
---|---|
HTTP Method | DELETE |
Encode | UTF-8 |
2、URL Parameters
Parameter | Type | Required | Remarks |
---|---|---|---|
authorization | String(Header) | Yes | Access Token obtained via Oauth2 |
client_id | String(Header) | Yes | Client ID from [OAuth Applications], generated by the M18 |
menuCode | String(Query) | Yes | prodPc |
id | long(Query) | Yes | Work Process Complete ID |
param | String(Query) | No | Extra Pamameters: in JSON format |
3、Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/delete/prodPc";
String param = "&menuCode=prodPc&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、Response Sample
{
"messages": [],
"status": true
}
{
"messages": [
{
"msgDetail": "Record has been deleted",
"msgCode": "core_101017"
}
],
"status": false
}
# Load EBI data:Work Process Complete Report
# 一、Description
Usage: Run EBI[Work Process Complete Report],return EBI data
# 二、API Detail
1、Request URL
URL | http://[server]/jsf/rfws/ebiWidget/loadReport |
---|---|
HTTP Method | GET |
Encode | UTF-8 |
2、URL Parameters
Parameter | Type | Required | Remarks |
---|---|---|---|
authorization | String(Header) | Yes | Access Token obtained via Oauth2 |
client_id | String(Header) | Yes | Client ID from [OAuth Applications], generated by the M18 |
formatId | long(Query) | Yes | Format ID fetched from another API |
beId | long(Query) | No | Business Entity ID,If not specified, query all authorized Business Entity data. |
offset | int(Query) | No | Resultset offset : start index |
rows | int(Query) | No | Resultset offset : end index |
3、Request Sample
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、Response Sample
{
"size": 1,
"rows": [
{
"MAIN_outProdQty": "5.0000",
"MAINPC_A_id": "1",
"MJOBPRO_A_id": "3964",
"M18ReservedCol_dataIndex": 1,
"MAIN_stType": "prodDisp",
"MAIN_stCode": "DISP20170003",
"MAIN_sourceId": "764",
"MAIN_sourceCode": "SO0170237",
"PRO_A_id": "3967",
"MAINPC_A_code": "PC20170001",
"MAIN_sourceCDate": "2017.08.03",
"MJOBPRO_A_code": "MX-JZ",
"MAIN_sourceType": "oldso",
"MAIN_stId": "3",
"MAIN_pwQty": "0.0000",
"MAIN_outPcQty": "5.0000",
"MAINSO_A_code": "",
"PRO_A_code": "MX-JZ-F",
"MAIN_sourceDDate": "2017.08.01",
"MAINSO_A_id": "0"
}
]
}
# Shop Floor Material Picking
# Fetch Shop Floor Material Picking List
# 一、Description
Usage: Fetch Shop Floor Material Picking List.
# 二、API Detail
1、Request URL
URL | http://[server]/jsf/rfws/search/search |
---|---|
HTTP Method | GET |
Encode | UTF-8 |
2、URL Parameters
Parameter | Type | Required | Remarks |
---|---|---|---|
authorization | String(Header) | Yes | Access Token obtained via Oauth2 |
client_id | String(Header) | Yes | Client ID from [OAuth Applications], generated by the M18 |
stSearch | String(Query) | Yes | prodPick |
beId | long(Query) | Yes | Business Entity ID |
formatId | long(Query) | No | Lookup Query ID, If not specified, the default format is used. |
startRow | int(Query) | No | Resultset offset : start index |
endRow | int(Query) | No | Resultset offset : end index |
quickSearchStr | String(Query) | No | Quick search keyword |
3、Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/search/search";
String param = "&stSearch=prodPick&beId=" + beId;
HttpGet get = new HttpGet(url + "?" + param);
get.addHeader("authorization", access_token);
get.addHeader("client_id", ClientID);
res = client.execute(get);
if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
}
get.releaseConnection();
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (res != null) {
res.close();
}
if (client != null) {
client.close();
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
4、Response Sample
{
"stSearch": "prodPick",
"size": 1,
"stSearchDisplay": "Shop Floor Material Picking",
"values": [
{
"tDate": "2022-03-01",
"code": "PICK20220003",
"st_id": 125,
"st_code": "PICK20220003",
"prodMainPick.lastModifyUid.simpleUser.desc__lang": "Milk",
"st_desc": "PICK20220003",
"iRev": 2,
"id": 125,
"lastModifyDate": "2022-03-17 12:17:48"
}
]
}
# Create Shop Floor Material Picking (Auto Completion)
# 一、Description
1. Usage: Create 【Shop Floor Material Picking】
2. This API has the following characteristics:
a. Support using code instead of id field
b. If field staff
has no value specified, the default staff in the User Options will be used automatically
c. If field document date
has no value specified, the value is obtained according to the date option in the [Preference Setup (Trade)]
# 二、API Detail
1、Request URL
URL | http://[server]/jsf/rfws/erp/bsFlow/save/prodPick |
---|---|
HTTP Method | POST |
Encode | UTF-8 |
2、URL Parameters
Parameter | Type | Required | Remarks |
---|---|---|---|
authorization | String(Header) | Yes | Access Token obtained via Oauth2 |
client_id | String(Header) | Yes | Client ID from [OAuth Applications], generated by the M18 |
3、Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/erp/bsFlow/save/prodPick";
String param = "";
HttpPost post = new HttpPost(url + "?" + param);
post.addHeader("authorization", access_token);
post.addHeader("client_id", ClientID);
StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON);
entity.setContentEncoding("UTF-8");
post.setEntity(entity);
res = client.execute(post);
if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
if (json != null) {
recordId = json.getLongValue("tranId");
}
System.out.println(json);
}
post.releaseConnection();
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (res != null) {
res.close();
}
if (client != null) {
client.close();
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
Sample data:
{
"beId": 142,
"tDate": "2022-03-23",
"code": "PCTEST",
"virDeptId": 7,
"prodpickmatt": [
{
"sourceId": 1650,
"lot": "A",
"jobId": 1650,
"oriQty": 100,
"sourceLot": "A",
"sourceType": "prodJob",
"proId": 3972,
"oriUnitId": 38887,
"locId": 15
}
]
}
4、Response Sample
{
"tranId": 126,
"tranCode": "PICKTEST",
"message": "",
"status": true
}
# Load Shop Floor Material Picking
# 一、Description
Usage: Load Shop Floor Material Picking Data
# 二、API Detail
1、Request URL
URL | http://[server]/jsf/rfws/root/api/read/prodPick |
---|---|
HTTP Method | GET |
Encode | UTF-8 |
2、URL Parameters
Parameter | Type | Required | Remarks |
---|---|---|---|
authorization | String(Header) | Yes | Access Token obtained via Oauth2 |
client_id | String(Header) | Yes | Client ID from [OAuth Applications], generated by the M18 |
menuCode | String(Query) | Yes | prodPick |
id | long(Query) | Yes | Shop Floor Material Picking ID |
param | String(Query) | No | Extra Pamameters: in JSON format |
3、Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/read/prodPick";
String param = "&menuCode=prodPick&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、Response Sample
{
"data": {},
"messages": [
{
"msgDetail": "找不到相关记录,记录可能已被Delete 或你没有访问权限",
"msgCode": "core_141019"
}
],
"status": false
}
{
"data": {
"prodpickmatt": [
{
"lotnoNumAttr17": 0,
"lotnoNumAttr16": 0,
"lotnoNumAttr15": 0,
"lotnoNumAttr14": 0,
"lotnoNumAttr19": 0,
"pbDesc": "多工艺产品 sc 1",
"lotnoNumAttr18": 0,
"lotnoLookupAttr20": 0,
"lotnoNumAttr13": 0,
"lotnoNumAttr12": 0,
"lotnoNumAttr11": 0,
"lotnoNumAttr10": 0,
"isSemi": false,
"lotnoLookupAttr16": 0,
"oriQty": 100,
"lotnoLookupAttr17": 0,
"lotnoLookupAttr14": 0,
"lotnoLookupAttr15": 0,
"lotnoLookupAttr18": 0,
"bDesc_zh-TW": "圓形鑽石+0 (SI1) tc",
"lotnoLookupAttr19": 0,
"newLotno": 0,
"refdest": "",
"lotnoLot": "A",
"id": 455,
"pbDesc_zh-TW": "",
"dDesc_haha1": "",
"lotnoNumAttr20": 0,
"pdDesc_ccn": "",
"lotnoLookupAttr12": 0,
"wcgId": 15,
"lotnoLookupAttr13": 0,
"lotnoLookupAttr10": 0,
"lotnoLookupAttr11": 0,
"wcId": 0,
"i18nField": "{\"bDesc_en\": \"圓形鑽石+0 (SI1)\", \"bDesc_zh-CN\": \"圓形鑽石+0 (SI1) sc\", \"bDesc_zh-TW\": \"圓形鑽石+0 (SI1) tc\", \"dDesc_zh-CN\": \"\", \"pbDesc_zh-CN\": \"多工艺产品 sc 1\", \"pdDesc_zh-CN\": \"<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>\"}",
"pbDesc_zh-CN": "多工艺产品 sc 1",
"sourceType": "prodJob",
"jobModule": "prodJob",
"costAmt": 0,
"pproId": 4634,
"iRev": 1,
"bDesc_ctw": "",
"ce01Module": "prodPick",
"lot": "A",
"lotnoDateAttr3": -2209017600000,
"lotnoDateAttr4": -2209017600000,
"lotnoDateAttr1": -2209017600000,
"lotnoDateAttr2": -2209017600000,
"lotnoDateAttr7": -2209017600000,
"processId": 11,
"lotnoDateAttr8": -2209017600000,
"bDesc_ccn": "",
"lotnoDateAttr5": -2209017600000,
"lotnoDateAttr6": -2209017600000,
"unitId": 38887,
"lotnoDateAttr9": -2209017600000,
"matLot": "A",
"pbDesc_ctw": "",
"psfId": 3,
"locId": 15,
"pjobId": 0,
"mjobId": 425,
"bDesc_en": "圓形鑽石+0 (SI1)",
"pdDesc": "<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>",
"pdDesc_haha1": "",
"pdDesc_en": "",
"lotnoTextAttr1": "",
"lotnoTextAttr2": "",
"lotnoTextAttr3": "",
"lotnoTextAttr4": "",
"lotnoTextAttr5": "",
"lotnoTextAttr6": "",
"lotnoTextAttr7": "",
"lotnoTextAttr8": "",
"ndFooterKey": "",
"lotnoTextAttr9": "",
"bDesc_zh-CN": "圓形鑽石+0 (SI1) sc",
"sourceId": 1650,
"dualQty": 0,
"itemNo": " 1",
"wcgDesc": "出水",
"beId": 142,
"pdDesc_zh-CN": "<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>",
"bDesc": "圓形鑽石+0 (SI1) sc",
"matcatId": 0,
"hId": 126,
"pbDesc_ccn": "",
"lotnoNumAttr1": 1001,
"lotnoNumAttr2": 0,
"lotnoNumAttr3": 0,
"lotnoNumAttr4": 0,
"processDesc": "鑲石後電金",
"pdDesc_zh-TW": "",
"jobId": 1650,
"lotnoExpDate": 253402271999000,
"footerKey": " 1",
"dDesc": "",
"qty": 100,
"lotnoNumAttr5": 0,
"lotnoNumAttr6": 0,
"lotnoNumAttr7": 0,
"lotnoNumAttr8": 0,
"lotnoNumAttr9": 0,
"lotNoId": 5388,
"lotnoTextAttr16": "",
"dDesc_ctw": "",
"lotnoTextAttr15": "",
"lotnoTextAttr18": "",
"lotnoTextAttr17": "",
"lotnoTextAttr12": "",
"lotnoTextAttr11": "",
"lotnoDateAttr20": -2209017600000,
"lotnoTextAttr14": "",
"lotnoTextAttr13": "",
"dDesc_zh-CN": "",
"lotnoTextAttr19": "",
"bDesc_haha1": "",
"dDesc_zh-TW": "",
"pdDesc_ctw": "",
"plot": "A",
"dDesc_ccn": "",
"pbDesc_haha1": "",
"lotnoTextAttr10": "",
"pbDesc_en": "",
"dDesc_en": "",
"oriUnitId": 38887,
"dualUnitId": 3937,
"lotnoLookupAttr5": 0,
"lotnoLookupAttr6": 0,
"sourceLot": "A",
"lotnoLookupAttr7": 0,
"lotnoDateAttr18": -2209017600000,
"lotnoLookupAttr8": 0,
"lotnoDateAttr19": -2209017600000,
"lotno": "mx20220112a",
"lotnoLookupAttr9": 0,
"proId": 3972,
"lotnoDateAttr12": -2209017600000,
"lotnoDateAttr13": -2209017600000,
"lotnoDateAttr10": -2209017600000,
"lotnoDateAttr11": -2209017600000,
"lotnoTextAttr20": "",
"lotnoLookupAttr1": 0,
"lotnoDateAttr16": -2209017600000,
"lotnoLookupAttr2": 0,
"lotnoDateAttr17": -2209017600000,
"remarks": "",
"lotnoLookupAttr3": 0,
"lotnoDateAttr14": -2209017600000,
"lotnoLookupAttr4": 0,
"lotnoDateAttr15": -2209017600000
}
],
"prodrempick": [
{
"hId": 126,
"i18nField": "{\"remarks_zh-CN\": \"\"}",
"remarks_zh-CN": "",
"remarks_ccn": "",
"remarks_en": "",
"remarks_haha1": "",
"iRev": 1,
"id": 126,
"remarks_zh-TW": "",
"remarks": "",
"remarks_ctw": "",
"ce01Module": "prodPick"
}
],
"prodmainpick": [
{
"tDate": 1647964800000,
"lastModifyUid": 20,
"code": "PICKTEST",
"cnDeptId": 0,
"useAccess": false,
"virDeptId": 7,
"expiredDate": -2209017600000,
"iRev": 1,
"sysJson": "",
"viewCode": "prodPick",
"ce01Module": "prodPick",
"beId": 142,
"expired": false,
"printCount": 0,
"useAccessBl": false,
"id": 126,
"doctypeId": 0,
"statusModifyDate": 1648872249000,
"locked": false,
"lastModifyDate": 1648872249000,
"createUid": 20,
"locId": 0,
"createDate": 1648872249000,
"rev": "1",
"lastApproveUid": 20,
"expiredUid": 0,
"useAccessWl": false,
"useAccessAutoCalc": false,
"staffId": 785,
"status": "Y"
}
]
},
"messages": [],
"status": true
}
# Create Shop Floor Material Picking
# 一、Description
Usage: Create or Update 【Shop Floor Material Picking】
# 二、API Detail
1、Request URL
URL | http://[server]/jsf/rfws/root/api/save/prodPick |
---|---|
HTTP Method | PUT |
Encode | UTF-8 |
2、URL Parameters
Parameter | Type | Required | Remarks |
---|---|---|---|
authorization | String(Header) | Yes | Access Token obtained via Oauth2 |
client_id | String(Header) | Yes | Client ID from [OAuth Applications], generated by the M18 |
menuCode | String(Query) | Yes | prodPick |
param | String(Query) | No | Extra Pamameters: in JSON format |
3、Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/prodPick";
String param = "&menuCode=prodPick";
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 data as JSON format:
{
"prodpickmatt": {
"values": [
{
"sourceId": 1650,
"mjobId": 425,
"pproId": 4634,
"wcgId": 15,
"oriUnitId": 38887,
"lot": "A",
"jobId": 1650,
"oriQty": 100,
"sourceLot": "A",
"footerKey": " 1",
"sourceType": "prodJob",
"processId": 11,
"plot": "A",
"proId": 3972,
"qty": 100,
"unitId": 38887,
"matLot": "A",
"locId": 15
}
]
},
"prodmainpick": {
"values": [
{
"beId": 142,
"tDate": "2022-03-23",
"code": "PICKTEST2",
"virDeptId": 7,
"staffId": 785
}
]
}
}
4、Response Sample
{
"recordId": 127,
"messages": [],
"status": true
}
{
"recordId": 0,
"messages": [
{
"msgDetail": "Required field is empty",
"msgCode": "core_101905"
}
],
"status": false
}
# Delete Shop Floor Material Picking
# 一、Description
Usage: Delete Shop Floor Material Picking
# 二、API Detail
1、Request URL
URL | http://[server]/jsf/rfws/root/api/delete/prodPick |
---|---|
HTTP Method | DELETE |
Encode | UTF-8 |
2、URL Parameters
Parameter | Type | Required | Remarks |
---|---|---|---|
authorization | String(Header) | Yes | Access Token obtained via Oauth2 |
client_id | String(Header) | Yes | Client ID from [OAuth Applications], generated by the M18 |
menuCode | String(Query) | Yes | prodPick |
id | long(Query) | Yes | Shop Floor Material Picking ID |
param | String(Query) | No | Extra Pamameters: in JSON format |
3、Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/delete/prodPick";
String param = "&menuCode=prodPick&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、Response Sample
{
"messages": [],
"status": true
}
{
"messages": [
{
"msgDetail": "Record has been deleted",
"msgCode": "core_101017"
}
],
"status": false
}
# Load EBI data:Shop Floor Material Picking Report
# 一、Description
Usage: Run EBI[Shop Floor Material Picking Report],return EBI data
# 二、API Detail
1、Request URL
URL | http://[server]/jsf/rfws/ebiWidget/loadReport |
---|---|
HTTP Method | GET |
Encode | UTF-8 |
2、URL Parameters
Parameter | Type | Required | Remarks |
---|---|---|---|
authorization | String(Header) | Yes | Access Token obtained via Oauth2 |
client_id | String(Header) | Yes | Client ID from [OAuth Applications], generated by the M18 |
formatId | long(Query) | Yes | Format ID fetched from another API |
beId | long(Query) | No | Business Entity ID,If not specified, query all authorized Business Entity data. |
offset | int(Query) | No | Resultset offset : start index |
rows | int(Query) | No | Resultset offset : end index |
3、Request Sample
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、Response Sample
{
"size": 1,
"rows": [
{
"MJPROT_A_bomId": "10",
"MATT_A_proId": "3968",
"M18ReservedCol_dataIndex": 1,
"MJPROT_A_bomId_code": "MX-JZ-F",
"PICK_A_code": "PICK20170011",
"PICK_A_id": "16",
"MATT_A_proId_code": "MX-JZ-18AW"
}
]
}
# Shop Floor Material Return
# Fetch Shop Floor Material Return List
# 一、Description
Usage: Fetch Shop Floor Material Return List.
# 二、API Detail
1、Request URL
URL | http://[server]/jsf/rfws/search/search |
---|---|
HTTP Method | GET |
Encode | UTF-8 |
2、URL Parameters
Parameter | Type | Required | Remarks |
---|---|---|---|
authorization | String(Header) | Yes | Access Token obtained via Oauth2 |
client_id | String(Header) | Yes | Client ID from [OAuth Applications], generated by the M18 |
stSearch | String(Query) | Yes | prodPr |
beId | long(Query) | Yes | Business Entity ID |
formatId | long(Query) | No | Lookup Query ID, If not specified, the default format is used. |
startRow | int(Query) | No | Resultset offset : start index |
endRow | int(Query) | No | Resultset offset : end index |
quickSearchStr | String(Query) | No | Quick search keyword |
3、Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/search/search";
String param = "&stSearch=prodPr&beId=" + beId;
HttpGet get = new HttpGet(url + "?" + param);
get.addHeader("authorization", access_token);
get.addHeader("client_id", ClientID);
res = client.execute(get);
if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
}
get.releaseConnection();
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (res != null) {
res.close();
}
if (client != null) {
client.close();
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
4、Response Sample
{
"stSearch": "prodPr",
"size": 12,
"stSearchDisplay": "Shop Floor Material Return",
"values": [
{
"tDate": "2021-08-18",
"prodMainPr.lastModifyUid.simpleUser.desc__lang": "Milk",
"code": "PR20210002",
"st_id": 17,
"st_code": "PR20210002",
"st_desc": "PR20210002",
"iRev": 1,
"id": 17,
"lastModifyDate": "2021-08-18 14:26:09"
}
]
}
# Create Shop Floor Material Return (Auto Completion)
# 一、Description
1. Usage: Create 【Shop Floor Material Return】
2. This API has the following characteristics:
a. Support using code instead of id field
b. If field staff
has no value specified, the default staff in the User Options will be used automatically
c. If field document date
has no value specified, the value is obtained according to the date option in the [Preference Setup (Trade)]
# 二、API Detail
1、Request URL
URL | http://[server]/jsf/rfws/erp/bsFlow/save/prodPr |
---|---|
HTTP Method | POST |
Encode | UTF-8 |
2、URL Parameters
Parameter | Type | Required | Remarks |
---|---|---|---|
authorization | String(Header) | Yes | Access Token obtained via Oauth2 |
client_id | String(Header) | Yes | Client ID from [OAuth Applications], generated by the M18 |
3、Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/erp/bsFlow/save/prodPr";
String param = "";
HttpPost post = new HttpPost(url + "?" + param);
post.addHeader("authorization", access_token);
post.addHeader("client_id", ClientID);
StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON);
entity.setContentEncoding("UTF-8");
post.setEntity(entity);
res = client.execute(post);
if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
if (json != null) {
recordId = json.getLongValue("tranId");
}
System.out.println(json);
}
post.releaseConnection();
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (res != null) {
res.close();
}
if (client != null) {
client.close();
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
Sample data:
{
"beId": 142,
"tDate": "2022-03-23",
"code": "PRTEST",
"virDeptId": 7,
"prodprt": [
{
"sourceId": 128,
"lot": "A",
"oriQty": 100,
"sourceLot": "A",
"sourceType": "prodPick",
"proId": 3972,
"pickId": 128,
"pickLot": "A",
"oriUnitId": 38887,
"locId": 15,
"lotNoId": 5388
}
]
}
4、Response Sample
{
"tranId": 18,
"tranCode": "PRTEST",
"message": "",
"status": true
}
# Load Shop Floor Material Return
# 一、Description
Usage: Load Shop Floor Material Return Data
# 二、API Detail
1、Request URL
URL | http://[server]/jsf/rfws/root/api/read/prodPr |
---|---|
HTTP Method | GET |
Encode | UTF-8 |
2、URL Parameters
Parameter | Type | Required | Remarks |
---|---|---|---|
authorization | String(Header) | Yes | Access Token obtained via Oauth2 |
client_id | String(Header) | Yes | Client ID from [OAuth Applications], generated by the M18 |
menuCode | String(Query) | Yes | prodPr |
id | long(Query) | Yes | Shop Floor Material Return ID |
param | String(Query) | No | Extra Pamameters: in JSON format |
3、Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/read/prodPr";
String param = "&menuCode=prodPr&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、Response Sample
{
"data": {},
"messages": [
{
"msgDetail": "找不到相关记录,记录可能已被Delete 或你没有访问权限",
"msgCode": "core_141019"
}
],
"status": false
}
{
"data": {
"prodrempr": [
{
"hId": 18,
"i18nField": "{\"remarks_zh-CN\": \"\"}",
"remarks_zh-CN": "",
"remarks_ccn": "",
"remarks_en": "",
"remarks_haha1": "",
"iRev": 1,
"id": 18,
"remarks_zh-TW": "",
"remarks": "",
"remarks_ctw": "",
"ce01Module": "prodPr"
}
],
"prodprt": [
{
"lotnoNumAttr17": 0,
"lotnoNumAttr16": 0,
"lotnoNumAttr15": 0,
"lotnoNumAttr14": 0,
"lotnoNumAttr19": 0,
"pbDesc": "多工艺产品 sc 1",
"lotnoNumAttr18": 0,
"pickId": 128,
"lotnoLookupAttr20": 0,
"lotnoNumAttr13": 0,
"lotnoNumAttr12": 0,
"lotnoNumAttr11": 0,
"lotnoNumAttr10": 0,
"isSemi": false,
"lotnoLookupAttr16": 0,
"oriQty": 100,
"lotnoLookupAttr17": 0,
"lotnoLookupAttr14": 0,
"lotnoLookupAttr15": 0,
"lotnoLookupAttr18": 0,
"bDesc_zh-TW": "圓形鑽石+0 (SI1) tc",
"lotnoLookupAttr19": 0,
"newLotno": 0,
"lotnoLot": "A",
"id": 24,
"pbDesc_zh-TW": "",
"dDesc_haha1": "",
"lotnoNumAttr20": 0,
"pdDesc_ccn": "",
"lotnoLookupAttr12": 0,
"wcgId": 15,
"lotnoLookupAttr13": 0,
"lotnoLookupAttr10": 0,
"lotnoLookupAttr11": 0,
"wcId": 0,
"i18nField": "{\"bDesc_en\": \"圓形鑽石+0 (SI1)\", \"bDesc_zh-CN\": \"圓形鑽石+0 (SI1) sc\", \"bDesc_zh-TW\": \"圓形鑽石+0 (SI1) tc\", \"dDesc_zh-CN\": \"\", \"pbDesc_zh-CN\": \"多工艺产品 sc 1\", \"pdDesc_zh-CN\": \"<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>\"}",
"pbDesc_zh-CN": "多工艺产品 sc 1",
"sourceType": "prodPick",
"jobModule": "prodJob",
"costAmt": 0,
"pproId": 4634,
"iRev": 1,
"bDesc_ctw": "",
"ce01Module": "prodPr",
"lot": "A",
"lotnoDateAttr3": -2209017600000,
"lotnoDateAttr4": -2209017600000,
"lotnoDateAttr1": -2209017600000,
"lotnoDateAttr2": -2209017600000,
"lotnoDateAttr7": -2209017600000,
"lotnoDateAttr8": -2209017600000,
"bDesc_ccn": "",
"lotnoDateAttr5": -2209017600000,
"lotnoDateAttr6": -2209017600000,
"unitId": 38887,
"lotnoDateAttr9": -2209017600000,
"matLot": "A",
"pbDesc_ctw": "",
"locId": 15,
"psfId": 3,
"mjobId": 425,
"bDesc_en": "圓形鑽石+0 (SI1)",
"pdDesc": "<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>",
"pdDesc_haha1": "",
"pdDesc_en": "",
"lotnoTextAttr1": "",
"lotnoTextAttr2": "",
"lotnoTextAttr3": "",
"lotnoTextAttr4": "",
"lotnoTextAttr5": "",
"lotnoTextAttr6": "",
"lotnoTextAttr7": "",
"lotnoTextAttr8": "",
"lotnoTextAttr9": "",
"bDesc_zh-CN": "圓形鑽石+0 (SI1) sc",
"sourceId": 128,
"dualQty": 0,
"itemNo": " 1",
"beId": 142,
"pdDesc_zh-CN": "<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>",
"bDesc": "圓形鑽石+0 (SI1) sc",
"hId": 18,
"pbDesc_ccn": "",
"lotnoNumAttr1": 1001,
"lotnoNumAttr2": 0,
"lotnoNumAttr3": 0,
"lotnoNumAttr4": 0,
"pdDesc_zh-TW": "",
"jobId": 1650,
"lotnoExpDate": 253402271999000,
"footerKey": " 1",
"dDesc": "",
"qty": 100,
"lotnoNumAttr5": 0,
"lotnoNumAttr6": 0,
"lotnoNumAttr7": 0,
"lotnoNumAttr8": 0,
"lotnoNumAttr9": 0,
"lotNoId": 5388,
"lotnoTextAttr16": "",
"dDesc_ctw": "",
"lotnoTextAttr15": "",
"lotnoTextAttr18": "",
"lotnoTextAttr17": "",
"lotnoTextAttr12": "",
"lotnoTextAttr11": "",
"lotnoDateAttr20": -2209017600000,
"lotnoTextAttr14": "",
"lotnoTextAttr13": "",
"dDesc_zh-CN": "",
"lotnoTextAttr19": "",
"bDesc_haha1": "",
"dDesc_zh-TW": "",
"pdDesc_ctw": "",
"plot": "A",
"dDesc_ccn": "",
"pbDesc_haha1": "",
"lotnoTextAttr10": "",
"pbDesc_en": "",
"dDesc_en": "",
"oriUnitId": 38887,
"dualUnitId": 3937,
"lotnoLookupAttr5": 0,
"lotnoLookupAttr6": 0,
"sourceLot": "A",
"lotnoLookupAttr7": 0,
"lotnoDateAttr18": -2209017600000,
"lotnoLookupAttr8": 0,
"lotnoDateAttr19": -2209017600000,
"lotno": "mx20220112a",
"lotnoLookupAttr9": 0,
"proId": 3972,
"lotnoDateAttr12": -2209017600000,
"lotnoDateAttr13": -2209017600000,
"lotnoDateAttr10": -2209017600000,
"pickLot": "A",
"lotnoDateAttr11": -2209017600000,
"lotnoTextAttr20": "",
"lotnoLookupAttr1": 0,
"lotnoDateAttr16": -2209017600000,
"lotnoLookupAttr2": 0,
"lotnoDateAttr17": -2209017600000,
"lotnoLookupAttr3": 0,
"lotnoDateAttr14": -2209017600000,
"lotnoLookupAttr4": 0,
"lotnoDateAttr15": -2209017600000
}
],
"prodmainpr": [
{
"tDate": 1647964800000,
"lastModifyUid": 20,
"code": "PRTEST",
"cnDeptId": 0,
"useAccess": false,
"virDeptId": 7,
"expiredDate": -2209017600000,
"iRev": 1,
"sysJson": "",
"viewCode": "prodPr",
"ce01Module": "prodPr",
"beId": 142,
"expired": false,
"printCount": 0,
"useAccessBl": false,
"id": 18,
"doctypeId": 0,
"statusModifyDate": 1648873463000,
"locked": false,
"lastModifyDate": 1648873463000,
"createUid": 20,
"locId": 0,
"createDate": 1648873463000,
"rev": "1",
"lastApproveUid": 20,
"expiredUid": 0,
"useAccessWl": false,
"useAccessAutoCalc": false,
"staffId": 785,
"status": "Y"
}
]
},
"messages": [],
"status": true
}
# Create Shop Floor Material Return
# 一、Description
Usage: Create or Update 【Shop Floor Material Return】
# 二、API Detail
1、Request URL
URL | http://[server]/jsf/rfws/root/api/save/prodPr |
---|---|
HTTP Method | PUT |
Encode | UTF-8 |
2、URL Parameters
Parameter | Type | Required | Remarks |
---|---|---|---|
authorization | String(Header) | Yes | Access Token obtained via Oauth2 |
client_id | String(Header) | Yes | Client ID from [OAuth Applications], generated by the M18 |
menuCode | String(Query) | Yes | prodPr |
param | String(Query) | No | Extra Pamameters: in JSON format |
3、Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/prodPr";
String param = "&menuCode=prodPr";
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 data as JSON format:
{
"prodprt": {
"values": [
{
"sourceId": 128,
"mjobId": 425,
"pproId": 4634,
"pickId": 128,
"wcgId": 15,
"oriUnitId": 38887,
"lot": "A",
"jobId": 1650,
"oriQty": 100,
"sourceLot": "A",
"footerKey": " 1",
"sourceType": "prodPick",
"processId": 11,
"plot": "A",
"proId": 3972,
"qty": 100,
"unitId": 38887,
"pickLot": "A",
"matLot": "A",
"locId": 15,
"psfId": 3,
"lotNoId": 5388
}
]
},
"prodmainpr": {
"values": [
{
"beId": 142,
"tDate": "2022-03-23",
"code": "PICKTEST2",
"virDeptId": 7,
"staffId": 785
}
]
}
}
4、Response Sample
{
"recordId": 19,
"messages": [],
"status": true
}
{
"recordId": 0,
"messages": [
{
"msgDetail": "Required field is empty",
"msgCode": "core_101905"
}
],
"status": false
}
# Delete Shop Floor Material Return
# 一、Description
Usage: Delete Shop Floor Material Return
# 二、API Detail
1、Request URL
URL | http://[server]/jsf/rfws/root/api/delete/prodPr |
---|---|
HTTP Method | DELETE |
Encode | UTF-8 |
2、URL Parameters
Parameter | Type | Required | Remarks |
---|---|---|---|
authorization | String(Header) | Yes | Access Token obtained via Oauth2 |
client_id | String(Header) | Yes | Client ID from [OAuth Applications], generated by the M18 |
menuCode | String(Query) | Yes | prodPr |
id | long(Query) | Yes | Shop Floor Material Return ID |
param | String(Query) | No | Extra Pamameters: in JSON format |
3、Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/delete/prodPr";
String param = "&menuCode=prodPr&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、Response Sample
{
"messages": [],
"status": true
}
{
"messages": [
{
"msgDetail": "Record has been deleted",
"msgCode": "core_101017"
}
],
"status": false
}
# Load EBI data:Shop Floor Material Return Report
# 一、Description
Usage: Run EBI[Shop Floor Material Return Report],return EBI data
# 二、API Detail
1、Request URL
URL | http://[server]/jsf/rfws/ebiWidget/loadReport |
---|---|
HTTP Method | GET |
Encode | UTF-8 |
2、URL Parameters
Parameter | Type | Required | Remarks |
---|---|---|---|
authorization | String(Header) | Yes | Access Token obtained via Oauth2 |
client_id | String(Header) | Yes | Client ID from [OAuth Applications], generated by the M18 |
formatId | long(Query) | Yes | Format ID fetched from another API |
beId | long(Query) | No | Business Entity ID,If not specified, query all authorized Business Entity data. |
offset | int(Query) | No | Resultset offset : start index |
rows | int(Query) | No | Resultset offset : end index |
3、Request Sample
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、Response Sample
{
"size": 1,
"rows": [
{
"M18ReservedCol_dataIndex": 1,
"PR_A_code": "PR20170007",
"PR_A_id": "7"
}
]
}
# Shop Floor Delivery Notice
# Fetch Shop Floor Delivery Notice List
# 一、Description
Usage: Fetch Shop Floor Delivery Notice List.
# 二、API Detail
1、Request URL
URL | http://[server]/jsf/rfws/search/search |
---|---|
HTTP Method | GET |
Encode | UTF-8 |
2、URL Parameters
Parameter | Type | Required | Remarks |
---|---|---|---|
authorization | String(Header) | Yes | Access Token obtained via Oauth2 |
client_id | String(Header) | Yes | Client ID from [OAuth Applications], generated by the M18 |
stSearch | String(Query) | Yes | prodPdn |
beId | long(Query) | Yes | Business Entity ID |
formatId | long(Query) | No | Lookup Query ID, If not specified, the default format is used. |
startRow | int(Query) | No | Resultset offset : start index |
endRow | int(Query) | No | Resultset offset : end index |
quickSearchStr | String(Query) | No | Quick search keyword |
3、Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/search/search";
String param = "&stSearch=prodPdn&beId=" + beId;
HttpGet get = new HttpGet(url + "?" + param);
get.addHeader("authorization", access_token);
get.addHeader("client_id", ClientID);
res = client.execute(get);
if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
}
get.releaseConnection();
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (res != null) {
res.close();
}
if (client != null) {
client.close();
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
4、Response Sample
{
"stSearch": "prodPdn",
"size": 1,
"stSearchDisplay": "Shop Floor Delivery Notice",
"values": [
{
"tDate": "2021-09-26",
"code": "PDN20210005",
"st_id": 30,
"st_code": "PDN20210005",
"st_desc": "PDN20210005",
"iRev": 5,
"id": 30,
"prodMainPdn.lastModifyUid.simpleUser.desc__lang": "Milk",
"lastModifyDate": "2021-09-26 14:23:15"
}
]
}
# Create Shop Floor Delivery Notice (Auto Completion)
# 一、Description
1. Usage: Create 【Shop Floor Delivery Notice】
2. This API has the following characteristics:
a. Support using code instead of id field
b. If field staff
has no value specified, the default staff in the User Options will be used automatically
c. If field document date
has no value specified, the value is obtained according to the date option in the [Preference Setup (Trade)]
# 二、API Detail
1、Request URL
URL | http://[server]/jsf/rfws/erp/bsFlow/save/prodPdn |
---|---|
HTTP Method | POST |
Encode | UTF-8 |
2、URL Parameters
Parameter | Type | Required | Remarks |
---|---|---|---|
authorization | String(Header) | Yes | Access Token obtained via Oauth2 |
client_id | String(Header) | Yes | Client ID from [OAuth Applications], generated by the M18 |
3、Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/erp/bsFlow/save/prodPdn";
String param = "";
HttpPost post = new HttpPost(url + "?" + param);
post.addHeader("authorization", access_token);
post.addHeader("client_id", ClientID);
StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON);
entity.setContentEncoding("UTF-8");
post.setEntity(entity);
res = client.execute(post);
if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
if (json != null) {
recordId = json.getLongValue("tranId");
}
System.out.println(json);
}
post.releaseConnection();
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (res != null) {
res.close();
}
if (client != null) {
client.close();
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
Sample data:
{
"beId": 142,
"tDate": "2022-03-23",
"code": "PDNTEST",
"virDeptId": 7,
"prodpdnt": [
{
"sourceId": 425,
"lot": "A",
"oriQty": 100,
"sourceLot": "A",
"sourceType": "prodMjob",
"proId": 4634,
"mlot": "A",
"mproId": 4634,
"oriUnitId": 39720
}
]
}
4、Response Sample
{
"tranId": 32,
"tranCode": "PDNTEST",
"message": "",
"status": true
}
# Load Shop Floor Delivery Notice
# 一、Description
Usage: Load Shop Floor Delivery Notice Data
# 二、API Detail
1、Request URL
URL | http://[server]/jsf/rfws/root/api/read/prodPdn |
---|---|
HTTP Method | GET |
Encode | UTF-8 |
2、URL Parameters
Parameter | Type | Required | Remarks |
---|---|---|---|
authorization | String(Header) | Yes | Access Token obtained via Oauth2 |
client_id | String(Header) | Yes | Client ID from [OAuth Applications], generated by the M18 |
menuCode | String(Query) | Yes | prodPdn |
id | long(Query) | Yes | Shop Floor Delivery Notice ID |
param | String(Query) | No | Extra Pamameters: in JSON format |
3、Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/read/prodPdn";
String param = "&menuCode=prodPdn&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、Response Sample
{
"data": {},
"messages": [
{
"msgDetail": "找不到相关记录,记录可能已被Delete 或你没有访问权限",
"msgCode": "core_141019"
}
],
"status": false
}
{
"data": {
"prodpdnstt": [
{
"sourceId": 425,
"dDesc_ctw": "",
"dualQty": 0,
"iRev": 1,
"itemNo": " 1",
"dDesc_zh-CN": "<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>",
"bDesc_ctw": "",
"ce01Module": "prodPdn",
"beId": 142,
"lot": "",
"oriQty": 100,
"bDesc_haha1": "",
"dDesc_zh-TW": "<p> </p>",
"bDesc": "多工艺产品 sc 1",
"bDesc_ccn": "",
"bDesc_zh-TW": "多工艺产品 tc 1",
"unitId": 39720,
"dDesc_ccn": "",
"id": 75,
"dDesc_haha1": "",
"hId": 32,
"bDesc_en": "多工艺产品 1",
"stId": 425,
"dDesc_en": "<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>",
"sourceProId": 4634,
"oriUnitId": 39720,
"dualUnitId": 0,
"sourceLot": "A",
"sourceMjobLot": "A",
"footerKey": " 1",
"dDesc": "<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>",
"i18nField": "{\"bDesc_en\": \"多工艺产品 1\", \"dDesc_en\": \"<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>\", \"bDesc_zh-CN\": \"多工艺产品 sc 1\", \"bDesc_zh-TW\": \"多工艺产品 tc 1\", \"dDesc_zh-CN\": \"<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>\", \"dDesc_zh-TW\": \"<p> </p>\"}",
"sourceType": "prodMjob",
"mlot": "A",
"proId": 4634,
"qty": 100,
"stLot": "A",
"mproId": 4634,
"stType": "prodMjob",
"bDesc_zh-CN": "多工艺产品 sc 1"
}
],
"prodrempdn": [
{
"hId": 32,
"i18nField": "{\"remarks_zh-CN\": \"\"}",
"remarks_zh-CN": "",
"remarks_ccn": "",
"remarks_en": "",
"remarks_haha1": "",
"iRev": 1,
"id": 32,
"remarks_zh-TW": "",
"remarks": "",
"remarks_ctw": "",
"ce01Module": "prodPdn"
}
],
"prodmainpdn": [
{
"tDate": 1647964800000,
"lastModifyUid": 20,
"code": "PDNTEST",
"cnDeptId": 0,
"useAccess": false,
"virDeptId": 7,
"expiredDate": -2209017600000,
"iRev": 1,
"sysJson": "",
"viewCode": "prodPdn",
"ce01Module": "prodPdn",
"beId": 142,
"expired": false,
"printCount": 0,
"useAccessBl": false,
"id": 32,
"doctypeId": 0,
"statusModifyDate": 1648889785000,
"locked": false,
"lastModifyDate": 1648889785000,
"createUid": 20,
"createDate": 1648889785000,
"rev": "1",
"lastApproveUid": 20,
"expiredUid": 0,
"useAccessWl": false,
"useAccessAutoCalc": false,
"staffId": 785,
"status": "Y"
}
],
"prodpdnt": [
{
"sourceId": 425,
"dDesc_ctw": "",
"dualQty": 0,
"iRev": 1,
"itemNo": " 1",
"dDesc_zh-CN": "<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>",
"bDesc_ctw": "",
"ce01Module": "prodPdn",
"beId": 142,
"lot": "A",
"oriQty": 100,
"bDesc_haha1": "",
"dDesc_zh-TW": "<p> </p>",
"bDesc": "多工艺产品 sc 1",
"bDesc_ccn": "",
"bDesc_zh-TW": "多工艺产品 tc 1",
"unitId": 39720,
"dDesc_ccn": "",
"id": 42,
"qcRequired": true,
"psfId": 3,
"dDesc_haha1": "",
"hId": 32,
"bDesc_en": "多工艺产品 1",
"dDesc_en": "<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>",
"oriUnitId": 39720,
"dualUnitId": 4489,
"jobId": 0,
"sourceLot": "A",
"footerKey": " 1",
"dDesc": "<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>",
"i18nField": "{\"bDesc_en\": \"多工艺产品 1\", \"dDesc_en\": \"<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>\", \"bDesc_zh-CN\": \"多工艺产品 sc 1\", \"bDesc_zh-TW\": \"多工艺产品 tc 1\", \"dDesc_zh-CN\": \"<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>\", \"dDesc_zh-TW\": \"<p> </p>\"}",
"sourceType": "prodMjob",
"mlot": "A",
"proId": 4634,
"qty": 100,
"mproId": 4634,
"bDesc_zh-CN": "多工艺产品 sc 1"
}
]
},
"messages": [],
"status": true
}
# Create Shop Floor Delivery Notice
# 一、Description
Usage: Create or Update 【Shop Floor Delivery Notice】
# 二、API Detail
1、Request URL
URL | http://[server]/jsf/rfws/root/api/save/prodPdn |
---|---|
HTTP Method | PUT |
Encode | UTF-8 |
2、URL Parameters
Parameter | Type | Required | Remarks |
---|---|---|---|
authorization | String(Header) | Yes | Access Token obtained via Oauth2 |
client_id | String(Header) | Yes | Client ID from [OAuth Applications], generated by the M18 |
menuCode | String(Query) | Yes | prodPdn |
param | String(Query) | No | Extra Pamameters: in JSON format |
3、Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/prodPdn";
String param = "&menuCode=prodPdn";
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 data as JSON format:
{
"prodpdnstt": {
"values": [
{
"sourceId": 425,
"stId": 425,
"sourceProId": 4634,
"oriUnitId": 39720,
"lot": "A",
"oriQty": 100,
"sourceLot": "A",
"sourceMjobLot": "A",
"footerKey": " 1",
"sourceType": "prodMjob",
"mlot": "A",
"proId": 4634,
"qty": 100,
"unitId": 39720,
"stLot": "A",
"mproId": 4634,
"stType": "prodMjob"
}
]
},
"prodmainpdn": {
"values": [
{
"beId": 142,
"tDate": "2022-03-23",
"code": "PDNTEST2",
"virDeptId": 7,
"staffId": 785
}
]
},
"prodpdnt": {
"values": [
{
"sourceId": 425,
"oriUnitId": 39720,
"lot": "A",
"oriQty": 100,
"sourceLot": "A",
"footerKey": " 1",
"sourceType": "prodMjob",
"mlot": "A",
"proId": 4634,
"qty": 100,
"unitId": 39720,
"mproId": 4634,
"psfId": 3
}
]
}
}
4、Response Sample
{
"recordId": 33,
"messages": [],
"status": true
}
{
"recordId": 0,
"messages": [
{
"msgDetail": "Required field is empty",
"msgCode": "core_101905"
}
],
"status": false
}
# Delete Shop Floor Delivery Notice
# 一、Description
Usage: Delete Shop Floor Delivery Notice
# 二、API Detail
1、Request URL
URL | http://[server]/jsf/rfws/root/api/delete/prodPdn |
---|---|
HTTP Method | DELETE |
Encode | UTF-8 |
2、URL Parameters
Parameter | Type | Required | Remarks |
---|---|---|---|
authorization | String(Header) | Yes | Access Token obtained via Oauth2 |
client_id | String(Header) | Yes | Client ID from [OAuth Applications], generated by the M18 |
menuCode | String(Query) | Yes | prodPdn |
id | long(Query) | Yes | Shop Floor Delivery Notice ID |
param | String(Query) | No | Extra Pamameters: in JSON format |
3、Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/delete/prodPdn";
String param = "&menuCode=prodPdn&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、Response Sample
{
"messages": [],
"status": true
}
{
"messages": [
{
"msgDetail": "Record has been deleted",
"msgCode": "core_101017"
}
],
"status": false
}
# Product Warehousing
# Fetch Product Warehousing List
# 一、Description
Usage: Fetch Product Warehousing List.
# 二、API Detail
1、Request URL
URL | http://[server]/jsf/rfws/search/search |
---|---|
HTTP Method | GET |
Encode | UTF-8 |
2、URL Parameters
Parameter | Type | Required | Remarks |
---|---|---|---|
authorization | String(Header) | Yes | Access Token obtained via Oauth2 |
client_id | String(Header) | Yes | Client ID from [OAuth Applications], generated by the M18 |
stSearch | String(Query) | Yes | prodPw |
beId | long(Query) | Yes | Business Entity ID |
formatId | long(Query) | No | Lookup Query ID, If not specified, the default format is used. |
startRow | int(Query) | No | Resultset offset : start index |
endRow | int(Query) | No | Resultset offset : end index |
quickSearchStr | String(Query) | No | Quick search keyword |
3、Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/search/search";
String param = "&stSearch=prodPw&beId=" + beId;
HttpGet get = new HttpGet(url + "?" + param);
get.addHeader("authorization", access_token);
get.addHeader("client_id", ClientID);
res = client.execute(get);
if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
}
get.releaseConnection();
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (res != null) {
res.close();
}
if (client != null) {
client.close();
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
4、Response Sample
{
"stSearch": "prodPw",
"size": 1,
"stSearchDisplay": "Product Warehousing",
"values": [
{
"tDate": "2022-03-03",
"code": "PW20220002",
"st_id": 113,
"st_code": "PW20220002",
"prodMainPw.lastModifyUid.simpleUser.desc__lang": "Milk",
"st_desc": "PW20220002",
"iRev": 5,
"id": 113,
"lastModifyDate": "2022-03-03 16:43:46"
}
]
}
# Create Product Warehousing (Auto Completion)
# 一、Description
1. Usage: Create 【Product Warehousing】
2. This API has the following characteristics:
a. Support using code instead of id field
b. If field staff
has no value specified, the default staff in the User Options will be used automatically
c. If field document date
has no value specified, the value is obtained according to the date option in the [Preference Setup (Trade)]
# 二、API Detail
1、Request URL
URL | http://[server]/jsf/rfws/erp/bsFlow/save/prodPw |
---|---|
HTTP Method | POST |
Encode | UTF-8 |
2、URL Parameters
Parameter | Type | Required | Remarks |
---|---|---|---|
authorization | String(Header) | Yes | Access Token obtained via Oauth2 |
client_id | String(Header) | Yes | Client ID from [OAuth Applications], generated by the M18 |
3、Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/erp/bsFlow/save/prodPw";
String param = "";
HttpPost post = new HttpPost(url + "?" + param);
post.addHeader("authorization", access_token);
post.addHeader("client_id", ClientID);
StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON);
entity.setContentEncoding("UTF-8");
post.setEntity(entity);
res = client.execute(post);
if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
if (json != null) {
recordId = json.getLongValue("tranId");
}
System.out.println(json);
}
post.releaseConnection();
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (res != null) {
res.close();
}
if (client != null) {
client.close();
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
Sample data:
{
"beId": 142,
"tDate": "2022-03-23",
"code": "PWTEST",
"virDeptId": 7,
"prodpwt": [
{
"sourceId": 425,
"lot": "A",
"oriQty": 100,
"sourceLot": "A",
"sourceType": "prodMjob",
"proId": 4634,
"mlot": "A",
"mproId": 4634,
"oriUnitId": 39720
}
],
"locId": 15
}
4、Response Sample
{
"tranId": 115,
"tranCode": "PWTEST",
"message": "",
"status": true
}
# Load Product Warehousing
# 一、Description
Usage: Load Product Warehousing Data
# 二、API Detail
1、Request URL
URL | http://[server]/jsf/rfws/root/api/read/prodPw |
---|---|
HTTP Method | GET |
Encode | UTF-8 |
2、URL Parameters
Parameter | Type | Required | Remarks |
---|---|---|---|
authorization | String(Header) | Yes | Access Token obtained via Oauth2 |
client_id | String(Header) | Yes | Client ID from [OAuth Applications], generated by the M18 |
menuCode | String(Query) | Yes | prodPw |
id | long(Query) | Yes | Product Warehousing ID |
param | String(Query) | No | Extra Pamameters: in JSON format |
3、Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/read/prodPw";
String param = "&menuCode=prodPw&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、Response Sample
{
"data": {},
"messages": [
{
"msgDetail": "找不到相关记录,记录可能已被Delete 或你没有访问权限",
"msgCode": "core_141019"
}
],
"status": false
}
{
"data": {
"prodmainpw": [
{
"tDate": 1647964800000,
"lastModifyUid": 20,
"code": "PWTEST",
"cnDeptId": 0,
"useAccess": false,
"virDeptId": 7,
"expiredDate": -2209017600000,
"iRev": 1,
"sysJson": "",
"viewCode": "prodPw",
"ce01Module": "prodPw",
"beId": 142,
"expired": false,
"printCount": 0,
"autoGen": false,
"useAccessBl": false,
"id": 115,
"doctypeId": 0,
"statusModifyDate": 1648890621000,
"locked": false,
"lastModifyDate": 1648890621000,
"createUid": 20,
"locId": 15,
"createDate": 1648890621000,
"rev": "1",
"lastApproveUid": 20,
"expiredUid": 0,
"useAccessWl": false,
"useAccessAutoCalc": false,
"staffId": 785,
"status": "Y"
}
],
"prodpwstt": [
{
"sourceId": 425,
"dDesc_ctw": "",
"dualQty": 0,
"iRev": 1,
"itemNo": " 1",
"dDesc_zh-CN": "<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>",
"bDesc_ctw": "",
"ce01Module": "prodPw",
"beId": 142,
"isSemi": false,
"lot": "A",
"oriQty": 100,
"bDesc_haha1": "",
"dDesc_zh-TW": "",
"bDesc": "多工艺产品 sc 1",
"bDesc_ccn": "",
"bDesc_zh-TW": "",
"unitId": 39720,
"dDesc_ccn": "",
"id": 162,
"dDesc_haha1": "",
"hId": 115,
"mjobId": 425,
"bDesc_en": "",
"pdnLot": "",
"stId": 425,
"dDesc_en": "",
"pdnId": 0,
"sourceProId": 4634,
"oriUnitId": 39720,
"dualUnitId": 0,
"sourceLot": "A",
"sourceMjobLot": "A",
"footerKey": " 1",
"dDesc": "<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>",
"i18nField": "{\"bDesc_zh-CN\": \"多工艺产品 sc 1\", \"dDesc_zh-CN\": \"<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>\"}",
"semiLot": "A",
"sourceType": "prodMjob",
"mlot": "A",
"proId": 4634,
"qty": 100,
"ndFooterKey": " 1",
"stLot": "A",
"mproId": 4634,
"stType": "prodMjob",
"bDesc_zh-CN": "多工艺产品 sc 1"
}
],
"prodpwmattlot": [
{
"hId": 115,
"dualQty": 0,
"costAmt": 0,
"pickId": 128,
"iRev": 1,
"itemNo": " 1",
"oriUnitId": 38887,
"dualUnitId": 3937,
"ce01Module": "prodPw",
"beId": 142,
"jobId": 1650,
"oriQty": 100,
"footerKey": " 1",
"pickType": "prodPick",
"qty": 100,
"proId": 3972,
"newLotno": 0,
"ndFooterKey": " 1",
"unitId": 38887,
"id": 330,
"pickLot": "A",
"locId": 15,
"lotNoId": 5388
}
],
"prodpwmatt": [
{
"dDesc_ctw": "",
"dualQty": 0,
"iRev": 1,
"itemNo": " 1",
"dDesc_zh-CN": "",
"wcgDesc": "出水",
"bDesc_ctw": "",
"ce01Module": "prodPw",
"beId": 142,
"oriQty": 100,
"bDesc_haha1": "",
"dDesc_zh-TW": "",
"processId": 11,
"bDesc": "圓形鑽石+0 (SI1) sc",
"bDesc_ccn": "",
"bDesc_zh-TW": "",
"unitId": 38887,
"refdest": "",
"dDesc_ccn": "",
"id": 420,
"jobType": "prodJob",
"matLot": "A",
"matcatId": 0,
"dDesc_haha1": "",
"hId": 115,
"bDesc_en": "",
"lastPw": false,
"processDesc": "鑲石後電金",
"dDesc_en": "",
"wcgId": 15,
"oriUnitId": 38887,
"dualUnitId": 3937,
"jobId": 1650,
"footerKey": " 1",
"dDesc": "",
"i18nField": "{\"bDesc_zh-CN\": \"圓形鑽石+0 (SI1) sc\", \"dDesc_zh-CN\": \"\"}",
"proId": 3972,
"qty": 100,
"ndFooterKey": " 1",
"remarks": "",
"bDesc_zh-CN": "圓形鑽石+0 (SI1) sc"
}
],
"prodpwt": [
{
"lotnoNumAttr17": 0,
"lotnoNumAttr16": 0,
"lotnoNumAttr15": 0,
"lotnoNumAttr14": 0,
"lotnoNumAttr19": 0,
"pbDesc": "",
"lotnoNumAttr18": 0,
"lotnoLookupAttr20": 0,
"lotnoNumAttr13": 0,
"lotnoNumAttr12": 0,
"lotnoNumAttr11": 0,
"lotnoNumAttr10": 0,
"isSemi": false,
"lotnoLookupAttr16": 0,
"oriQty": 100,
"lotnoLookupAttr17": 0,
"lotnoLookupAttr14": 0,
"lotnoLookupAttr15": 0,
"lotnoLookupAttr18": 0,
"bDesc_zh-TW": "多工艺产品 tc 1",
"lotnoLookupAttr19": 0,
"newLotno": 1,
"lotnoLot": "A",
"id": 138,
"pbDesc_zh-TW": "",
"dDesc_haha1": "",
"matUc": 0,
"lotnoNumAttr20": 0,
"pdDesc_ccn": "",
"lotnoLookupAttr12": 0,
"lotnoLookupAttr13": 0,
"lotnoLookupAttr10": 0,
"passQty": 0,
"lotnoLookupAttr11": 0,
"i18nField": "{\"bDesc_en\": \"多工艺产品 1\", \"dDesc_en\": \"<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>\", \"bDesc_zh-CN\": \"多工艺产品 sc 1\", \"bDesc_zh-TW\": \"多工艺产品 tc 1\", \"dDesc_zh-CN\": \"<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>\", \"dDesc_zh-TW\": \"<p> </p>\", \"pbDesc_zh-CN\": \"\", \"pdDesc_zh-CN\": \"\"}",
"pbDesc_zh-CN": "",
"sourceType": "prodMjob",
"mproId": 4634,
"pproId": 0,
"costAmt": 0,
"iRev": 1,
"bDesc_ctw": "",
"ce01Module": "prodPw",
"lot": "A",
"lotnoDateAttr3": -2209017600000,
"lotnoDateAttr4": -2209017600000,
"lotnoDateAttr1": -2209017600000,
"lotnoDateAttr2": -2209017600000,
"lotnoDateAttr7": -2209017600000,
"lotnoDateAttr8": -2209017600000,
"bDesc_ccn": "",
"lotnoDateAttr5": -2209017600000,
"lotnoDateAttr6": -2209017600000,
"unitId": 39720,
"lotnoDateAttr9": -2209017600000,
"pbDesc_ctw": "",
"psfId": 3,
"locId": 15,
"directLaborUc": 0,
"mjobId": 425,
"bomId": 75,
"bDesc_en": "多工艺产品 1",
"pdDesc": "",
"scrapQty": 0,
"pdDesc_haha1": "",
"pdDesc_en": "",
"lotnoTextAttr1": "",
"lotnoTextAttr2": "",
"lotnoTextAttr3": "",
"lotnoTextAttr4": "",
"lotnoTextAttr5": "",
"lotnoTextAttr6": "",
"lotnoTextAttr7": "",
"lotnoTextAttr8": "",
"lotnoTextAttr9": "",
"bDesc_zh-CN": "多工艺产品 sc 1",
"sourceId": 425,
"dualQty": 0,
"supMatUc": 0,
"itemNo": " 1",
"uc": 0,
"beId": 142,
"pdDesc_zh-CN": "",
"bDesc": "多工艺产品 sc 1",
"hId": 115,
"pbDesc_ccn": "",
"lotnoNumAttr1": 0,
"lotnoNumAttr2": 0,
"lotnoNumAttr3": 0,
"lotnoNumAttr4": 0,
"pdDesc_zh-TW": "",
"mjobModule": "prodMjob",
"jobId": 0,
"lotnoExpDate": 253402271999000,
"footerKey": " 1",
"dDesc": "<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>",
"qty": 100,
"lotnoNumAttr5": 0,
"lotnoNumAttr6": 0,
"lotnoNumAttr7": 0,
"lotnoNumAttr8": 0,
"lotnoNumAttr9": 0,
"lotNoId": 5492,
"lotnoTextAttr16": "",
"dDesc_ctw": "",
"lotnoTextAttr15": "",
"lotnoTextAttr18": "",
"lotnoTextAttr17": "",
"lotnoTextAttr12": "",
"lotnoTextAttr11": "",
"lotnoDateAttr20": -2209017600000,
"lotnoTextAttr14": "",
"lotnoTextAttr13": "",
"dDesc_zh-CN": "<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>",
"lotnoTextAttr19": "",
"bDesc_haha1": "",
"dDesc_zh-TW": "<p> </p>",
"pdDesc_ctw": "",
"subconLaborUc": 0,
"dDesc_ccn": "",
"pbDesc_haha1": "",
"lotnoTextAttr10": "",
"bomDesc": "多个自制工艺",
"pbDesc_en": "",
"dDesc_en": "<p>钻石套装 -- 18K鑽戒 (女) 1<br></p>",
"oriUnitId": 39720,
"dualUnitId": 4489,
"lotnoLookupAttr5": 0,
"lotnoLookupAttr6": 0,
"sourceLot": "A",
"lotnoLookupAttr7": 0,
"lotnoDateAttr18": -2209017600000,
"lotnoLookupAttr8": 0,
"lotnoDateAttr19": -2209017600000,
"lotno": "PWTEST00000000000000",
"lotnoLookupAttr9": 0,
"semiLot": "A",
"mlot": "A",
"proId": 4634,
"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
}
],
"prodrempw": [
{
"hId": 115,
"i18nField": "{\"remarks_zh-CN\": \"\"}",
"remarks_zh-CN": "",
"remarks_ccn": "",
"remarks_en": "",
"remarks_haha1": "",
"iRev": 1,
"id": 114,
"remarks_zh-TW": "",
"remarks": "",
"remarks_ctw": "",
"ce01Module": "prodPw"
}
]
},
"messages": [],
"status": true
}
# Create Product Warehousing
# 一、Description
Usage: Create or Update 【Product Warehousing】
# 二、API Detail
1、Request URL
URL | http://[server]/jsf/rfws/root/api/save/prodPw |
---|---|
HTTP Method | PUT |
Encode | UTF-8 |
2、URL Parameters
Parameter | Type | Required | Remarks |
---|---|---|---|
authorization | String(Header) | Yes | Access Token obtained via Oauth2 |
client_id | String(Header) | Yes | Client ID from [OAuth Applications], generated by the M18 |
menuCode | String(Query) | Yes | prodPw |
param | String(Query) | No | Extra Pamameters: in JSON format |
3、Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/prodPw";
String param = "&menuCode=prodPw";
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 data as JSON format:
{
"prodmainpw": {
"values": [
{
"beId": 142,
"tDate": "2022-03-23",
"code": "PWTEST2",
"virDeptId": 7,
"staffId": 785,
"locId": 15
}
]
},
"prodpwstt": {
"values": [
{
"sourceId": 425,
"mjobId": 425,
"stId": 425,
"sourceProId": 4634,
"oriUnitId": 39720,
"lot": "A",
"oriQty": 100,
"sourceLot": "A",
"sourceMjobLot": "A",
"footerKey": " 1",
"semiLot": "A",
"sourceType": "prodMjob",
"mlot": "A",
"proId": 4634,
"qty": 100,
"unitId": 39720,
"ndFooterKey": " 1",
"stLot": "A",
"mproId": 4634,
"stType": "prodMjob"
}
]
},
"prodpwmattlot": {
"values": [
{
"pickId": 128,
"oriUnitId": 38887,
"lot": "A",
"jobId": 1650,
"oriQty": 100,
"footerKey": " 1",
"pickType": "prodPick",
"proId": 3972,
"qty": 100,
"unitId": 38887,
"ndFooterKey": " 1",
"pickLot": "A",
"locId": 15,
"lotNoId": 5388
}
]
},
"prodpwmatt": {
"values": [
{
"wcgId": 15,
"oriUnitId": 39720,
"lot": "A",
"jobId": 1650,
"oriQty": 100,
"footerKey": " 1",
"processId": 11,
"proId": 4634,
"qty": 100,
"unitId": 39720,
"ndFooterKey": " 1",
"jobType": "prodJob",
"matLot": "A",
"jobLot": "A"
}
]
},
"prodpwt": {
"values": [
{
"sourceId": 425,
"mjobId": 425,
"bomId": 75,
"oriUnitId": 39720,
"passQty": 100,
"lot": "A",
"isSemi": false,
"oriQty": 100,
"sourceLot": "A",
"footerKey": " 1",
"sourceType": "prodMjob",
"semiLot": "A",
"mlot": "A",
"proId": 4634,
"qty": 100,
"unitId": 39720,
"mproId": 4634,
"psfId": 3,
"locId": 15
}
]
}
}
4、Response Sample
{
"recordId": 116,
"messages": [],
"status": true
}
{
"recordId": 0,
"messages": [
{
"msgDetail": "Required field is empty",
"msgCode": "core_101905"
}
],
"status": false
}
# Delete Product Warehousing
# 一、Description
Usage: Delete Product Warehousing
# 二、API Detail
1、Request URL
URL | http://[server]/jsf/rfws/root/api/delete/prodPw |
---|---|
HTTP Method | DELETE |
Encode | UTF-8 |
2、URL Parameters
Parameter | Type | Required | Remarks |
---|---|---|---|
authorization | String(Header) | Yes | Access Token obtained via Oauth2 |
client_id | String(Header) | Yes | Client ID from [OAuth Applications], generated by the M18 |
menuCode | String(Query) | Yes | prodPw |
id | long(Query) | Yes | Product Warehousing ID |
param | String(Query) | No | Extra Pamameters: in JSON format |
3、Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/delete/prodPw";
String param = "&menuCode=prodPw&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、Response Sample
{
"messages": [],
"status": true
}
{
"messages": [
{
"msgDetail": "Record has been deleted",
"msgCode": "core_101017"
}
],
"status": false
}
# Load EBI data:Product Warehousing Report
# 一、Description
Usage: Run EBI[Product Warehousing Report],return EBI data
# 二、API Detail
1、Request URL
URL | http://[server]/jsf/rfws/ebiWidget/loadReport |
---|---|
HTTP Method | GET |
Encode | UTF-8 |
2、URL Parameters
Parameter | Type | Required | Remarks |
---|---|---|---|
authorization | String(Header) | Yes | Access Token obtained via Oauth2 |
client_id | String(Header) | Yes | Client ID from [OAuth Applications], generated by the M18 |
formatId | long(Query) | Yes | Format ID fetched from another API |
beId | long(Query) | No | Business Entity ID,If not specified, query all authorized Business Entity data. |
offset | int(Query) | No | Resultset offset : start index |
rows | int(Query) | No | Resultset offset : end index |
3、Request Sample
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、Response Sample
{
"size": 1,
"rows": [
{
"MAIN_outQty": "0.0000",
"MAINPW_A_code": "PW20210005",
"PWT_A_proId_code": "MX-JZ-F5",
"M18ReservedCol_dataIndex": 1,
"MAINPW_A_id": "90",
"LOTNO_A_lotno": "PW202100050000000000",
"MAINPW_A_tDate": "2021.04.29",
"MAIN_prodQty": "100.0000",
"MAIN_newLotno": "Y",
"PWT_A_mlot": "A",
"MAIN_lotQty": "40.0000",
"MAIN_consumReqQty": "0.0000",
"PWT_A_oriQty": "40.0000",
"MAIN_matReqQty": "0.0000",
"PWT_A_proId": "4634",
"MAIN_matReqQtyPerUnit": "0.0000"
}
]
}
← Subcontract Retail →