财务
# 记账凭证
# 获取记账凭证列表
# 一、接口描述
用于获取记账凭证列表(同UI界面左侧的Search List数据)
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/search/search |
---|---|
http请求方式 | GET |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
stSearch | String(Query) | 是 | jl |
beId | long(Query) | 是 | aiM18企业法人[部门]的ID |
formatId | long(Query) | 否 | aiM18[查询格式]的ID,用于获取[查询格式]步骤二中设定的栏位格式;若不使用此参数,则使用默认设置。 |
startRow | int(Query) | 否 | 返回结果的开始行 |
endRow | int(Query) | 否 | 返回结果的结束行 |
quickSearchStr | String(Query) | 否 | 用于设定关键字查找数据 |
3、请求示例
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/search/search";
String param = "&stSearch=jl&beId=11";
HttpGet get = new HttpGet(url + "?" + param);
get.addHeader("authorization", access_token);
get.addHeader("client_id", ClientID);
res = client.execute(get);
if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
}
get.releaseConnection();
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (res != null) {
res.close();
}
if (client != null) {
client.close();
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
4、返回示例
{
"stSearch": "jl",
"size": 1,
"stSearchDisplay": "记账凭证",
"values": [
{
"tDate": "2022-04-06",
"batchNo": "",
"maint.lastModifyUid.simpleUser.desc": "Joseph Chui",
"code": "JCAAJV220401",
"st_id": 43925,
"st_code": "JCAAJV220401",
"st_desc": "JCAAJV220401",
"iRev": 4,
"id": 43925,
"lastModifyDate": "2022-04-06 16:10:59"
}
]
}
# 读取记账凭证
# 一、接口描述
用于读取【记账凭证】数据
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/read/jl |
---|---|
http请求方式 | GET |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | jl |
id | long(Query) | 是 | 记账凭证的id |
param | String(Query) | 否 | 额外的系统参数;JSON字符串 |
3、请求示例
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/read/jl";
String param = "&menuCode=jl&id=" + id;
HttpGet get = new HttpGet(url + "?" + param);
get.addHeader("authorization", access_token);
get.addHeader("client_id", ClientID);
res = client.execute(get);
if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
System.out.println(json);
}
get.releaseConnection();
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (res != null) {
res.close();
}
if (client != null) {
client.close();
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
4、返回示例
{
"data": {
"t": [
{
"virDeptId": 4,
"AI1": 0,
"c_d": -1,
"AI2": 0,
"itemNo": " 1",
"AI3": 0,
"AI4": 0,
"AI5": 0,
"accDesc": "Account Receivable",
"payer": "",
"AI6": 0,
"AI7": 0,
"beId": 1,
"AI8": 0,
"payee": "",
"AI9": 0,
"iafSrcDocId": "",
"cusId": 0,
"id": 169398,
"AI30": 0,
"taxAmt": 0,
"debtorType": "cus",
"hId": 43925,
"reconciled": false,
"chequeNo": "",
"crBkopAc": "",
"taxDomAmt": 0,
"particular": "",
"importPermitAmt": 0,
"taxCodeId": 0,
"creditorType": "ven",
"printed": false,
"bankSlipNo": "",
"venId": 0,
"crBkopNoId": 0,
"importPermitTaxAmt": 0,
"sourceTableKey": "",
"adjustment": false,
"toAccId": 0,
"monthlyPeriodId": 28,
"tDate": 1649174400000,
"refNo": "",
"cnDeptId": 0,
"jlTypeId": 0,
"postStatus": "U",
"amt": 1000,
"iRev": 4,
"ipTaxCodeId": 0,
"reconDate": -2209017600000,
"udf001": "",
"AI19": 0,
"sTranId": 0,
"ce01Module": "jl",
"AI17": 0,
"poscoreShopId": 0,
"AI18": 0,
"preTaxAmt": 0,
"AI15": 0,
"curId": 1,
"AI16": 0,
"AI13": 0,
"AI14": 0,
"rate": 1,
"domAmt": 1000,
"AI11": 0,
"sourceMappingKey": "",
"AI12": 0,
"AI10": 0,
"preTaxDomAmt": 0,
"vatPer": 0,
"multiFlowId": 0,
"weeklyPeriodId": 0,
"drBkopNoId": 0,
"isAdj": false,
"faFooterId": 0,
"isMainAccPrdExtra": false,
"slmId": 53,
"drBkopAc": "",
"ipTaxRate": 0,
"reverse": false,
"chequeDate": -2209017600000,
"AI28": 0,
"AI29": 0,
"AI26": 0,
"AI27": 0,
"AI24": 0,
"AI25": 0,
"AI22": 0,
"AI23": 0,
"proId": 0,
"AI20": 0,
"AI21": 0,
"accId": 27,
"faFooterType": "",
"staffId": 4
},
{
"virDeptId": 4,
"AI1": 0,
"c_d": 1,
"AI2": 0,
"itemNo": " 2",
"AI3": 0,
"AI4": 0,
"AI5": 0,
"accDesc": "Cash",
"payer": "",
"AI6": 0,
"AI7": 0,
"beId": 1,
"AI8": 0,
"payee": "",
"AI9": 0,
"iafSrcDocId": "",
"cusId": 0,
"id": 169399,
"AI30": 0,
"taxAmt": 0,
"debtorType": "cus",
"hId": 43925,
"reconciled": false,
"chequeNo": "",
"crBkopAc": "",
"taxDomAmt": 0,
"particular": "",
"importPermitAmt": 0,
"taxCodeId": 0,
"creditorType": "ven",
"printed": false,
"bankSlipNo": "",
"venId": 0,
"crBkopNoId": 0,
"importPermitTaxAmt": 0,
"sourceTableKey": "",
"adjustment": false,
"toAccId": 0,
"monthlyPeriodId": 28,
"tDate": 1649174400000,
"refNo": "",
"cnDeptId": 0,
"jlTypeId": 0,
"postStatus": "U",
"amt": 1000,
"iRev": 4,
"ipTaxCodeId": 0,
"reconDate": -2209017600000,
"udf001": "",
"AI19": 0,
"sTranId": 0,
"ce01Module": "jl",
"AI17": 0,
"poscoreShopId": 0,
"AI18": 0,
"preTaxAmt": 0,
"AI15": 0,
"curId": 1,
"AI16": 0,
"AI13": 0,
"AI14": 0,
"rate": 1,
"domAmt": 1000,
"AI11": 0,
"sourceMappingKey": "",
"AI12": 0,
"AI10": 0,
"preTaxDomAmt": 0,
"vatPer": 0,
"multiFlowId": 0,
"weeklyPeriodId": 0,
"drBkopNoId": 0,
"isAdj": false,
"faFooterId": 0,
"isMainAccPrdExtra": false,
"slmId": 53,
"drBkopAc": "",
"ipTaxRate": 0,
"reverse": false,
"chequeDate": -2209017600000,
"AI28": 0,
"AI29": 0,
"AI26": 0,
"AI27": 0,
"AI24": 0,
"AI25": 0,
"AI22": 0,
"AI23": 0,
"proId": 0,
"AI20": 0,
"AI21": 0,
"accId": 57,
"faFooterType": "",
"staffId": 4
}
],
"maint": [
{
"udfint": 0,
"lastModifyUid": 5,
"useAccess": false,
"virDeptId": 4,
"expiredDate": -2209017600000,
"pzzId": 0,
"sysJson": "",
"viewCode": "jl",
"fromInterCoId": 0,
"beId": 1,
"hcJlId": 0,
"useAccessBl": false,
"cashierId": 0,
"id": 43925,
"doctypeId": 0,
"locked": false,
"srcHcJlId": 0,
"lastModifyDate": 1649232659000,
"createUid": 5,
"pZH": 0,
"rev": "4",
"batchNo": "",
"lastApproveUid": 5,
"iafTrxDesc": "Account Receivable,Cash",
"udfattach": 0,
"expiredUid": 0,
"permitNo": "",
"ttlImportPermitAmt": 0,
"bankSlipNo": "",
"batchGen": false,
"interVoucherType": "normal",
"taxOrigin": "ACC",
"toInterCoId": 0,
"postUid": 0,
"status": "Y",
"monthlyPeriodId": 28,
"tDate": 1649174400000,
"attachmentNo": 0,
"code": "JCAAJV220401",
"cnDeptId": 0,
"yearEndVoucher": false,
"postStatus": "U",
"iRev": 4,
"sTranId": 0,
"ce01Module": "jl",
"curId": 0,
"expired": false,
"rate": 1,
"sourceMappingKey": "",
"printCount": 0,
"ttlImportPermitTaxAmt": 0,
"statusModifyDate": 1649232281000,
"multiFlowId": 0,
"createDate": 1649232281000,
"weeklyPeriodId": 0,
"faFooterId": 0,
"voucherType": "normal",
"toDate": -2209017600000,
"slmId": 0,
"udfadatest": "",
"reverse": false,
"useAccessWl": false,
"accdfId": 0,
"toBeId": 0,
"yearEndVoucherToPeriod": 0,
"yearEndVoucherFromPeriod": 0,
"postDate": -2209017600000,
"attachmentCount": 1,
"faFooterType": "",
"useAccessAutoCalc": false,
"staffId": 4,
"sumJLId": 0,
"isStock": false
}
],
"remt": [
{
"remarks_jp": "",
"hId": 43925,
"remarks_en": "",
"iRev": 4,
"ce01Module": "jl",
"remarks_cth": "",
"remarks_hy": "",
"remarks_sxg": "",
"i18nField": "{\"remarks_en\": \"\"}",
"remarks_zh-CN": "",
"id": 6565,
"remarks_zh-TW": "",
"remarks": ""
}
]
},
"messages": [],
"status": true
}
# 保存记账凭证
# 一、接口描述
用于新增【记账凭证】
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/save/jl |
---|---|
http请求方式 | PUT |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | jl |
param | String(Query) | 否 | 额外的系统参数;JSON字符串 |
3、请求示例
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/jl";
String param = "&menuCode=jl";
HttpPut put = new HttpPut(url + "?" + param);
put.addHeader("authorization", access_token);
put.addHeader("client_id", ClientID);
StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON);
entity.setContentEncoding("UTF-8");
put.setEntity(entity);
res = client.execute(put);
if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
if (json != null) {
recordId = json.getLongValue("recordId");
}
System.out.println(json);
}
put.releaseConnection();
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (res != null) {
res.close();
}
if (client != null) {
client.close();
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
Entity的JSON格式数据如下:
{
"t": {
"values": [
{
"tDate": "2022-04-15",
"curId": 1,
"virDeptId": 4,
"rate": 1,
"domAmt": 100,
"accId": 27,
"c_d": 1,
"amt": 100,
"monthlyPeriodId": 28
},
{
"tDate": "2022-04-15",
"curId": 1,
"virDeptId": 4,
"rate": 1,
"domAmt": 100,
"accId": 57,
"c_d": -1,
"amt": 100,
"monthlyPeriodId": 28
}
]
},
"maint": {
"values": [
{
"beId": 1,
"tDate": "2022-04-15",
"staffId": 4
}
]
}
}
4、返回示例
{
"recordId": 44078,
"messages": [],
"status": true
}
{
"recordId": 0,
"messages": [
{
"msgDetail": "必填项为空",
"msgCode": "core_101905"
}
],
"status": false
}
# 删除记账凭证
# 一、接口描述
用于删除记账凭证
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/delete/jl |
---|---|
http请求方式 | DELETE |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | jl |
id | long(Query) | 是 | 记账凭证的id |
param | String(Query) | 否 | 额外的系统参数;JSON字符串 |
3、请求示例
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/delete/jl";
String param = "&menuCode=jl&id=" + id;
HttpDelete delete = new HttpDelete(url + "?" + param);
delete.addHeader("authorization", access_token);
delete.addHeader("client_id", ClientID);
res = client.execute(delete);
if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
System.out.println(json);
}
delete.releaseConnection();
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (res != null) {
res.close();
}
if (client != null) {
client.close();
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
4、返回示例
{
"messages": [],
"status": true
}
{
"messages": [
{
"msgDetail": "单据已被删除",
"msgCode": "core_101017"
}
],
"status": false
}
# 应收创始记录
# 获取应收创始记录列表
# 一、接口描述
用于获取应收创始记录列表(同UI界面左侧的Search List数据)
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/search/search |
---|---|
http请求方式 | GET |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
stSearch | String(Query) | 是 | arIni |
beId | long(Query) | 是 | aiM18企业法人[部门]的ID |
formatId | long(Query) | 否 | aiM18[查询格式]的ID,用于获取[查询格式]步骤二中设定的栏位格式;若不使用此参数,则使用默认设置。 |
startRow | int(Query) | 否 | 返回结果的开始行 |
endRow | int(Query) | 否 | 返回结果的结束行 |
quickSearchStr | String(Query) | 否 | 用于设定关键字查找数据 |
3、请求示例
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/search/search";
String param = "&stSearch=arIni&beId=11";
HttpGet get = new HttpGet(url + "?" + param);
get.addHeader("authorization", access_token);
get.addHeader("client_id", ClientID);
res = client.execute(get);
if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
}
get.releaseConnection();
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (res != null) {
res.close();
}
if (client != null) {
client.close();
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
4、返回示例
{
"stSearch": "arIni",
"size": 1,
"stSearchDisplay": "应收创始记录",
"values": [
{
"tDate": "2021-09-16",
"batchNo": "",
"code": "232516ARIB-1",
"st_code": "232516ARIB-1",
"arIni.lastModifyUid.simpleUser.desc": "Joseph Chui",
"st_desc": "232516ARIB-1",
"iRev": 10,
"arIni.AIId.dAICode.desc": "224300BU (SC)",
"st_id": 94,
"AIType": "virDept",
"arIni.AIId.dAICode.code": "224300BU",
"id": 94,
"lastModifyDate": "2021-09-16 12:12:50"
}
]
}
# 读取应收创始记录
# 一、接口描述
用于读取【应收创始记录】数据
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/read/arIni |
---|---|
http请求方式 | GET |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | arIni |
id | long(Query) | 是 | 应收创始记录的id |
param | String(Query) | 否 | 额外的系统参数;JSON字符串 |
3、请求示例
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/read/arIni";
String param = "&menuCode=arIni&id=" + id;
HttpGet get = new HttpGet(url + "?" + param);
get.addHeader("authorization", access_token);
get.addHeader("client_id", ClientID);
res = client.execute(get);
if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
System.out.println(json);
}
get.releaseConnection();
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (res != null) {
res.close();
}
if (client != null) {
client.close();
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
4、返回示例
{
"data": {
"remartran": [
{
"statement_cth": "",
"remarks_en": "",
"particular_jp": "",
"shipAd2_zh-TW": "",
"statement_sxg": "",
"shipAd1_en": "",
"payTerm_zh-TW": "",
"noteDesc": "",
"shipAd2_jp": "",
"noteDesc_jp": "",
"id": 483,
"remarks_zh-TW": "",
"shipAd1_zh-CN": "",
"shipAd4_hy": "",
"payTerm_hy": "",
"statement_hy": "",
"hId": 94,
"payTerm": "",
"particular_en": "",
"shipAd4_cth": "",
"particular_zh-TW": "",
"particular_cth": "",
"particular": "",
"payTerm_cth": "",
"remarks_cth": "",
"remarks_hy": "",
"particular_zh-CN": "",
"shipAd2_en": "",
"shipAd4_sxg": "",
"remarks_sxg": "",
"noteDesc_cth": "",
"i18nField": "{\"payTerm_zh-CN\": \"\", \"remarks_zh-CN\": \"\", \"shipAd1_zh-CN\": \"\", \"shipAd2_zh-CN\": \"\", \"shipAd3_zh-CN\": \"\", \"shipAd4_zh-CN\": \"\", \"noteDesc_zh-CN\": \"\", \"statement_zh-CN\": \"\", \"particular_zh-CN\": \"\"}",
"shipAd3_jp": "",
"remarks_zh-CN": "",
"statement_en": "",
"shipAd1_hy": "",
"shipAd3_zh-TW": "",
"payTerm_zh-CN": "",
"particular_sxg": "",
"payTerm_sxg": "",
"noteDesc_en": "",
"shipCodeId": 0,
"shipAd2_cth": "",
"noteDesc_zh-CN": "",
"payTerm_en": "",
"iRev": 1,
"shipAd1_cth": "",
"shipAd3_sxg": "",
"shipAd4_zh-TW": "",
"particular_hy": "",
"noteDesc_sxg": "",
"ce01Module": "arIni",
"shipAd3_cth": "",
"shipAd3_en": "",
"statement_zh-CN": "",
"shipAd3_zh-CN": "",
"shipAd4_zh-CN": "",
"shipAd1_sxg": "",
"shipAd4_jp": "",
"statement_jp": "",
"noteDesc_hy": "",
"statement": "",
"shipAd2_sxg": "",
"shipAd2_hy": "",
"remarks_jp": "",
"payTerm_jp": "",
"noteDesc_zh-TW": "",
"shipAd1": "",
"shipAd2": "",
"shipAd3": "",
"shipAd4": "",
"shipAd1_zh-TW": "",
"shipAd4_en": "",
"shipAd1_jp": "",
"shipAd2_zh-CN": "",
"shipAd3_hy": "",
"statement_zh-TW": "",
"remarks": ""
}
],
"mainarini": [
{
"useAccess": false,
"virDeptId": 4,
"expiredDate": -2209017600000,
"installNo": 1,
"AI1": 0,
"AI2": 0,
"sysJson": "",
"AI3": 0,
"AI4": 0,
"viewCode": "arIni",
"AI5": 0,
"accDesc": "",
"position_cth": "",
"accDesc_cth": "",
"AI6": 0,
"AI7": 0,
"AI8": 0,
"AI9": 0,
"alAmt": 0,
"useAccessBl": false,
"id": 94,
"lastModifyDate": 1631765570000,
"createUid": 5,
"position_hy": "",
"completed": true,
"iniAmt": 100,
"accjlId": 41664,
"i18nField": "{\"accDesc_zh-CN\": \"\", \"position_zh-CN\": \"\"}",
"dayOfMonth": 0,
"accDesc_en": "",
"manId": 0,
"status": "Y",
"cnDeptId": 0,
"jlTypeId": 0,
"iRev": 10,
"AI19": 0,
"aInvMonth": 0,
"ce01Module": "arIni",
"AI17": 0,
"AI18": 0,
"AI15": 0,
"AI16": 0,
"AI13": 0,
"AI14": 0,
"AI11": 0,
"AI12": 0,
"AI10": 0,
"statusModifyDate": 1631765570000,
"aiCnDeptId": 0,
"aiMemId": 0,
"createDate": 1631765570000,
"cp": 0,
"useAccessWl": false,
"AI28": 0,
"AI29": 0,
"AI26": 0,
"AI27": 0,
"AI24": 0,
"AI25": 0,
"AI22": 0,
"AI23": 0,
"AI20": 0,
"AI21": 0,
"AIId": 26,
"useAccessAutoCalc": false,
"position_sxg": "",
"cpDate": 1631721600000,
"lastModifyUid": 5,
"aiVirDeptId": 26,
"aiVenId": 0,
"position_zh-CN": "",
"eDiscRate": 0,
"beId": 1,
"accDesc_jp": "",
"AIType": "virDept",
"comRate": 0,
"AI30": 0,
"locked": false,
"accDesc_sxg": "",
"showEarlyPayDisc": false,
"rev": "1",
"batchNo": "",
"lastApproveUid": 5,
"aiCusId": 0,
"iafTrxDesc": "AR Initial Balance of 224300BU (EN)",
"expiredUid": 0,
"completedDate": 1631721600000,
"position_en": "",
"position_zh-TW": "",
"aiStaffId": 0,
"monthEndDate": "0",
"iniDate": 1631721600000,
"position": "",
"tDate": 1631721600000,
"attachmentNo": 0,
"code": "232516ARIB-1",
"amt": 100,
"accDesc_zh-TW": "",
"curId": 1,
"position_jp": "",
"expired": false,
"rate": 1,
"domAmt": 100,
"printCount": 0,
"accDesc_hy": "",
"accDesc_zh-CN": "",
"accdfId": 41,
"attachmentCount": 0,
"staffId": 4
}
]
},
"messages": [],
"status": true
}
# 保存应收创始记录
# 一、接口描述
用于新增【应收创始记录】
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/save/arIni |
---|---|
http请求方式 | PUT |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | arIni |
param | String(Query) | 否 | 额外的系统参数;JSON字符串 |
3、请求示例
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/arIni";
String param = "&menuCode=arIni";
HttpPut put = new HttpPut(url + "?" + param);
put.addHeader("authorization", access_token);
put.addHeader("client_id", ClientID);
StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON);
entity.setContentEncoding("UTF-8");
put.setEntity(entity);
res = client.execute(put);
if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
if (json != null) {
recordId = json.getLongValue("recordId");
}
System.out.println(json);
}
put.releaseConnection();
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (res != null) {
res.close();
}
if (client != null) {
client.close();
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
Entity的JSON格式数据如下:
{
"mainarini": {
"values": [
{
"beId": 1,
"tDate": "2022-04-15",
"curId": 1,
"AIType": "cus",
"rate": 1,
"virDeptId": 4,
"domAmt": 400,
"iniDate": "2022-04-15",
"amt": 400,
"AIId": 12,
"staffId": 4,
"iniAmt": 400
}
]
}
}
4、返回示例
{
"recordId": 113,
"messages": [],
"status": true
}
{
"recordId": 0,
"messages": [
{
"msgDetail": "必填项为空",
"msgCode": "core_101905"
}
],
"status": false
}
# 删除应收创始记录
# 一、接口描述
用于删除应收创始记录
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/delete/arIni |
---|---|
http请求方式 | DELETE |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | arIni |
id | long(Query) | 是 | 应收创始记录的id |
param | String(Query) | 否 | 额外的系统参数;JSON字符串 |
3、请求示例
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/delete/arIni";
String param = "&menuCode=arIni&id=" + id;
HttpDelete delete = new HttpDelete(url + "?" + param);
delete.addHeader("authorization", access_token);
delete.addHeader("client_id", ClientID);
res = client.execute(delete);
if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
System.out.println(json);
}
delete.releaseConnection();
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (res != null) {
res.close();
}
if (client != null) {
client.close();
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
4、返回示例
{
"messages": [],
"status": true
}
{
"messages": [
{
"msgDetail": "单据已被删除",
"msgCode": "core_101017"
}
],
"status": false
}
# 预收创始记录
# 获取预收创始记录列表
# 一、接口描述
用于获取预收创始记录列表(同UI界面左侧的Search List数据)
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/search/search |
---|---|
http请求方式 | GET |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
stSearch | String(Query) | 是 | drIni |
beId | long(Query) | 是 | aiM18企业法人[部门]的ID |
formatId | long(Query) | 否 | aiM18[查询格式]的ID,用于获取[查询格式]步骤二中设定的栏位格式;若不使用此参数,则使用默认设置。 |
startRow | int(Query) | 否 | 返回结果的开始行 |
endRow | int(Query) | 否 | 返回结果的结束行 |
quickSearchStr | String(Query) | 否 | 用于设定关键字查找数据 |
3、请求示例
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/search/search";
String param = "&stSearch=drIni&beId=11";
HttpGet get = new HttpGet(url + "?" + param);
get.addHeader("authorization", access_token);
get.addHeader("client_id", ClientID);
res = client.execute(get);
if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
}
get.releaseConnection();
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (res != null) {
res.close();
}
if (client != null) {
client.close();
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
4、返回示例
{
"stSearch": "drIni",
"size": 1,
"stSearchDisplay": "预收创始记录",
"values": [
{
"tDate": "2021-09-16",
"batchNo": "",
"code": "232516ARIB-1",
"st_code": "232516ARIB-1",
"drIni.lastModifyUid.simpleUser.desc": "Joseph Chui",
"st_desc": "232516ARIB-1",
"iRev": 10,
"drIni.AIId.dAICode.desc": "224300BU (SC)",
"st_id": 94,
"AIType": "virDept",
"drIni.AIId.dAICode.code": "224300BU",
"id": 94,
"lastModifyDate": "2021-09-16 12:12:50"
}
]
}
# 读取预收创始记录
# 一、接口描述
用于读取【预收创始记录】数据
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/read/drIni |
---|---|
http请求方式 | GET |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | drIni |
id | long(Query) | 是 | 预收创始记录的id |
param | String(Query) | 否 | 额外的系统参数;JSON字符串 |
3、请求示例
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/read/drIni";
String param = "&menuCode=drIni&id=" + id;
HttpGet get = new HttpGet(url + "?" + param);
get.addHeader("authorization", access_token);
get.addHeader("client_id", ClientID);
res = client.execute(get);
if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
System.out.println(json);
}
get.releaseConnection();
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (res != null) {
res.close();
}
if (client != null) {
client.close();
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
4、返回示例
{
"data": {
"maindrini": [
{
"lastModifyUid": 5,
"aiVirDeptId": 0,
"useAccess": false,
"virDeptId": 4,
"aiVenId": 0,
"expiredDate": -2209017600000,
"AI1": 0,
"AI2": 0,
"sysJson": "",
"AI3": 0,
"AI4": 0,
"viewCode": "drIni",
"AI5": 0,
"accDesc": "",
"AI6": 0,
"AI7": 0,
"beId": 1,
"AI8": 0,
"AI9": 0,
"alAmt": 0,
"AIType": "cus",
"useAccessBl": false,
"id": 49,
"AI30": 0,
"locked": false,
"lastModifyDate": 1647224729000,
"createUid": 5,
"rev": "2",
"batchNo": "",
"depositKey": "consignCo_0_",
"lastApproveUid": 5,
"aiCusId": 12,
"iafTrxDesc": "AP Initial Balance of JCB (HK) Trading Limited (AAC)",
"retAmt": 0,
"expiredUid": 0,
"multiRecId": 0,
"iniAmt": 1000,
"accjlId": 43542,
"aiStaffId": 0,
"manId": 0,
"iniDate": 1647187200000,
"position": "",
"status": "Y",
"tDate": 1647187200000,
"attachmentNo": 0,
"code": "155313DRIB",
"cnDeptId": 94,
"jlTypeId": 0,
"amt": 1000,
"iRev": 6,
"AI19": 0,
"sTranId": 0,
"ce01Module": "drIni",
"AI17": 0,
"AI18": 0,
"AI15": 0,
"curId": 1,
"AI16": 0,
"expired": false,
"AI13": 0,
"AI14": 0,
"rate": 1,
"domAmt": 1000,
"AI11": 0,
"AI12": 0,
"printCount": 0,
"AI10": 0,
"sorId": 0,
"statusModifyDate": 1647224614000,
"aiCnDeptId": 0,
"aiMemId": 0,
"createDate": 1647224608000,
"useAccessWl": false,
"AI28": 0,
"accdfId": 43,
"AI29": 0,
"AI26": 0,
"AI27": 0,
"AI24": 0,
"AI25": 0,
"AI22": 0,
"AI23": 0,
"AI20": 0,
"AI21": 0,
"attachmentCount": 0,
"sTranType": "consignCo",
"AIId": 12,
"useAccessAutoCalc": false,
"staffId": 1
}
],
"remrecreg": [
{
"statement_cth": "",
"remarks_en": "",
"particular_jp": "",
"shipAd2_zh-TW": "",
"statement_sxg": "",
"shipAd1_en": "Rm 1403 Wset Tower Shun Tak Centre 168",
"shipAd2_jp": "",
"id": 738,
"remarks_zh-TW": "",
"shipAd1_zh-CN": "",
"shipAd4_hy": "",
"statement_hy": "",
"hId": 49,
"particular_en": "",
"shipAd4_cth": "",
"particular_zh-TW": "",
"particular_cth": "",
"particular": "",
"remarks_cth": "",
"remarks_hy": "",
"particular_zh-CN": "",
"shipAd2_en": "Connaught Road Central",
"shipAd4_sxg": "",
"remarks_sxg": "",
"i18nField": "{\"remarks_en\": \"\", \"shipAd1_en\": \"Rm 1403 Wset Tower Shun Tak Centre 168\", \"shipAd2_en\": \"Connaught Road Central\", \"shipAd3_en\": \"Central and Western District\", \"shipAd4_en\": \"Hong Kong\", \"statement_en\": \"\", \"particular_en\": \"\"}",
"shipAd3_jp": "",
"remarks_zh-CN": "",
"statement_en": "",
"shipAd1_hy": "",
"shipAd3_zh-TW": "",
"particular_sxg": "",
"shipCodeId": 31,
"shipAd2_cth": "",
"iRev": 6,
"shipAd1_cth": "",
"shipAd3_sxg": "",
"shipAd4_zh-TW": "",
"particular_hy": "",
"ce01Module": "drIni",
"shipAd3_cth": "",
"shipAd3_en": "Central and Western District",
"statement_zh-CN": "",
"shipAd3_zh-CN": "",
"shipAd4_zh-CN": "",
"shipAd1_sxg": "",
"shipAd4_jp": "",
"statement_jp": "",
"statement": "",
"shipAd2_sxg": "",
"shipAd2_hy": "",
"remarks_jp": "",
"shipAd1": "Rm 1403 Wset Tower Shun Tak Centre 168",
"shipAd2": "Connaught Road Central",
"shipAd3": "Central and Western District",
"shipAd4": "Hong Kong",
"shipAd1_zh-TW": "",
"shipAd4_en": "Hong Kong",
"shipAd1_jp": "",
"shipAd2_zh-CN": "",
"shipAd3_hy": "",
"statement_zh-TW": "",
"remarks": ""
}
]
},
"messages": [],
"status": true
}
# 保存预收创始记录
# 一、接口描述
用于新增【预收创始记录】
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/save/drIni |
---|---|
http请求方式 | PUT |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | drIni |
param | String(Query) | 否 | 额外的系统参数;JSON字符串 |
3、请求示例
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/drIni";
String param = "&menuCode=drIni";
HttpPut put = new HttpPut(url + "?" + param);
put.addHeader("authorization", access_token);
put.addHeader("client_id", ClientID);
StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON);
entity.setContentEncoding("UTF-8");
put.setEntity(entity);
res = client.execute(put);
if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
if (json != null) {
recordId = json.getLongValue("recordId");
}
System.out.println(json);
}
put.releaseConnection();
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (res != null) {
res.close();
}
if (client != null) {
client.close();
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
Entity的JSON格式数据如下:
{
"maindrini": {
"values": [
{
"beId": 1,
"tDate": "2022-04-15",
"curId": 1,
"AIType": "cus",
"rate": 1,
"virDeptId": 4,
"domAmt": 400,
"iniDate": "2022-04-15",
"amt": 400,
"AIId": 12,
"staffId": 4,
"iniAmt": 400
}
]
}
}
4、返回示例
{
"recordId": 54,
"messages": [],
"status": true
}
{
"recordId": 0,
"messages": [
{
"msgDetail": "必填项为空",
"msgCode": "core_101905"
}
],
"status": false
}
# 删除预收创始记录
# 一、接口描述
用于删除预收创始记录
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/delete/drIni |
---|---|
http请求方式 | DELETE |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | drIni |
id | long(Query) | 是 | 预收创始记录的id |
param | String(Query) | 否 | 额外的系统参数;JSON字符串 |
3、请求示例
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/delete/drIni";
String param = "&menuCode=drIni&id=" + id;
HttpDelete delete = new HttpDelete(url + "?" + param);
delete.addHeader("authorization", access_token);
delete.addHeader("client_id", ClientID);
res = client.execute(delete);
if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
System.out.println(json);
}
delete.releaseConnection();
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (res != null) {
res.close();
}
if (client != null) {
client.close();
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
4、返回示例
{
"messages": [],
"status": true
}
{
"messages": [
{
"msgDetail": "单据已被删除",
"msgCode": "core_101017"
}
],
"status": false
}
# 应收账款交易
# 获取应收账款交易列表
# 一、接口描述
用于获取应收账款交易列表(同UI界面左侧的Search List数据)
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/search/search |
---|---|
http请求方式 | GET |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
stSearch | String(Query) | 是 | arTran |
beId | long(Query) | 是 | aiM18企业法人[部门]的ID |
formatId | long(Query) | 否 | aiM18[查询格式]的ID,用于获取[查询格式]步骤二中设定的栏位格式;若不使用此参数,则使用默认设置。 |
startRow | int(Query) | 否 | 返回结果的开始行 |
endRow | int(Query) | 否 | 返回结果的结束行 |
quickSearchStr | String(Query) | 否 | 用于设定关键字查找数据 |
3、请求示例
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/search/search";
String param = "&stSearch=arTran&beId=11";
HttpGet get = new HttpGet(url + "?" + param);
get.addHeader("authorization", access_token);
get.addHeader("client_id", ClientID);
res = client.execute(get);
if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
}
get.releaseConnection();
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (res != null) {
res.close();
}
if (client != null) {
client.close();
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
4、返回示例
{
"stSearch": "arTran",
"size": 1,
"stSearchDisplay": "应收账款交易",
"values": [
{
"tDate": "2023-01-01",
"batchNo": "",
"code": "JCAAART230102",
"st_code": "JCAAART230102",
"arTran.lastModifyUid.simpleUser.desc": "Joseph Chui",
"st_desc": "JCAAART230102",
"arTran.AIId.dAICode.desc": "JCB (HK) Trading Limited",
"amt": 200,
"iRev": 3,
"arTran.curId.cur.sym": "HK$",
"arTran.AIId.dAICode.code": "AAC",
"st_id": 420,
"AIType": "cus",
"id": 420,
"lastModifyDate": "2022-01-04 15:31:34"
}
]
}
# 读取应收账款交易
# 一、接口描述
用于读取【应收账款交易】数据
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/read/arTran |
---|---|
http请求方式 | GET |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | arTran |
id | long(Query) | 是 | 应收账款交易的id |
param | String(Query) | 否 | 额外的系统参数;JSON字符串 |
3、请求示例
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/read/arTran";
String param = "&menuCode=arTran&id=" + id;
HttpGet get = new HttpGet(url + "?" + param);
get.addHeader("authorization", access_token);
get.addHeader("client_id", ClientID);
res = client.execute(get);
if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
System.out.println(json);
}
get.releaseConnection();
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (res != null) {
res.close();
}
if (client != null) {
client.close();
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
4、返回示例
{
"data": {
"artrant": [
{
"AI1": 0,
"c_d": "discount",
"AI2": 0,
"itemNo": " 1",
"AI3": 0,
"AI4": 0,
"AI5": 0,
"accDesc": "Account Receivable 1",
"AI6": 0,
"AI7": 0,
"beId": 1,
"AI8": 0,
"AI9": 0,
"cusId": 0,
"id": 516,
"AI30": 0,
"taxAmt": 0,
"debtorType": "cus",
"oiId": 0,
"hId": 420,
"taxDomAmt": 0,
"particular": "",
"taxCodeId": 0,
"creditorType": "ven",
"venId": 0,
"cnDeptId": 0,
"amt": 100,
"iRev": 3,
"AI19": 0,
"ce01Module": "arTran",
"AI17": 0,
"AI18": 0,
"preTaxAmt": 100,
"AI15": 0,
"AI16": 0,
"AI13": 0,
"AI14": 0,
"domAmt": 100,
"AI11": 0,
"AI12": 0,
"AI10": 0,
"preTaxDomAmt": 100,
"vatPer": 0,
"AI28": 0,
"AI29": 0,
"AI26": 0,
"AI27": 0,
"AI24": 0,
"AI25": 0,
"AI22": 0,
"AI23": 0,
"proId": 0,
"AI20": 0,
"AI21": 0,
"accId": 58,
"staffId": 0
},
{
"AI1": 0,
"c_d": "discount",
"AI2": 0,
"itemNo": " 2",
"AI3": 0,
"AI4": 0,
"AI5": 0,
"accDesc": "Account Receivable 2",
"AI6": 0,
"AI7": 0,
"beId": 1,
"AI8": 0,
"AI9": 0,
"cusId": 0,
"id": 517,
"AI30": 0,
"taxAmt": 0,
"debtorType": "cus",
"oiId": 0,
"hId": 420,
"taxDomAmt": 0,
"particular": "",
"taxCodeId": 0,
"creditorType": "ven",
"venId": 0,
"cnDeptId": 0,
"amt": 200,
"iRev": 3,
"AI19": 0,
"ce01Module": "arTran",
"AI17": 0,
"AI18": 0,
"preTaxAmt": 200,
"AI15": 0,
"AI16": 0,
"AI13": 0,
"AI14": 0,
"domAmt": 200,
"AI11": 0,
"AI12": 0,
"AI10": 0,
"preTaxDomAmt": 200,
"vatPer": 0,
"AI28": 0,
"AI29": 0,
"AI26": 0,
"AI27": 0,
"AI24": 0,
"AI25": 0,
"AI22": 0,
"AI23": 0,
"proId": 0,
"AI20": 0,
"AI21": 0,
"accId": 59,
"staffId": 0
},
{
"AI1": 0,
"c_d": "charge",
"AI2": 0,
"itemNo": " 3",
"AI3": 0,
"AI4": 0,
"AI5": 0,
"accDesc": "Account Receivable 3",
"AI6": 0,
"AI7": 0,
"beId": 1,
"AI8": 0,
"AI9": 0,
"cusId": 0,
"id": 518,
"AI30": 0,
"taxAmt": 0,
"debtorType": "cus",
"oiId": 0,
"hId": 420,
"taxDomAmt": 0,
"particular": "",
"taxCodeId": 0,
"creditorType": "ven",
"venId": 0,
"cnDeptId": 0,
"amt": 500,
"iRev": 3,
"AI19": 0,
"ce01Module": "arTran",
"AI17": 0,
"AI18": 0,
"preTaxAmt": 500,
"AI15": 0,
"AI16": 0,
"AI13": 0,
"AI14": 0,
"domAmt": 500,
"AI11": 0,
"AI12": 0,
"AI10": 0,
"preTaxDomAmt": 500,
"vatPer": 0,
"AI28": 0,
"AI29": 0,
"AI26": 0,
"AI27": 0,
"AI24": 0,
"AI25": 0,
"AI22": 0,
"AI23": 0,
"proId": 0,
"AI20": 0,
"AI21": 0,
"accId": 60,
"staffId": 0
}
],
"mainartran": [
{
"useAccess": false,
"virDeptId": 4,
"sggstOvrr": false,
"expiredDate": -2209017600000,
"installNo": 0,
"AI1": 0,
"AI2": 0,
"sysJson": "",
"AI3": 0,
"AI4": 0,
"viewCode": "arTran",
"AI5": 0,
"accDesc": "",
"position_cth": "",
"accDesc_cth": "",
"AI6": 0,
"AI7": 0,
"AI8": 0,
"AI9": 0,
"useAccessBl": false,
"id": 420,
"lastModifyDate": 1641281494000,
"createUid": 5,
"method": "cod",
"taxDomAmt": 0,
"position_hy": "",
"udfaracc": 0,
"completed": false,
"accjlId": 42551,
"i18nField": "{\"accDesc_en\": \"\", \"position_en\": \"Sales Staff\"}",
"dayOfMonth": 1,
"accDesc_en": "",
"taxOrigin": "",
"manId": 36,
"multiFlowSrcId": 0,
"status": "Y",
"multiFlowFlowId": 0,
"cnDeptId": 94,
"jlTypeId": 0,
"iRev": 3,
"AI19": 0,
"aInvMonth": 0,
"ce01Module": "arTran",
"AI17": 0,
"AI18": 0,
"preTaxAmt": 200,
"AI15": 0,
"AI16": 0,
"AI13": 0,
"AI14": 0,
"AI11": 0,
"AI12": 0,
"AI10": 0,
"statusModifyDate": 1641281417000,
"aiCnDeptId": 0,
"aiMemId": 0,
"createDate": 1641281417000,
"needOi": true,
"cp": 0,
"useAccessWl": false,
"AI28": 0,
"AI29": 0,
"AI26": 0,
"AI27": 0,
"AI24": 0,
"AI25": 0,
"AI22": 0,
"multiFlowSrcBeId": 0,
"AI23": 0,
"AI20": 0,
"AI21": 0,
"prtFpsQrCode": false,
"AIId": 12,
"useAccessAutoCalc": false,
"udfamount": "",
"domAmtDiff": 0,
"position_sxg": "",
"cpDate": 1672502400000,
"lastModifyUid": 5,
"aiVirDeptId": 0,
"aiVenId": 0,
"position_zh-CN": "",
"eDiscRate": 0,
"beId": 1,
"accDesc_jp": "",
"AIType": "cus",
"comRate": 0,
"AI30": 0,
"locked": false,
"taxAmt": 0,
"accDesc_sxg": "",
"showEarlyPayDisc": false,
"oiId": 0,
"rev": "3",
"batchNo": "",
"lastApproveUid": 5,
"aiCusId": 12,
"ttlCharge": 500,
"iafTrxDesc": "",
"expiredUid": 0,
"completedDate": -2209017600000,
"position_en": "Sales Staff",
"position_zh-TW": "",
"aiStaffId": 0,
"monthEndDate": "0",
"position": "Sales Staff",
"hpSetting": "dayAfterInv",
"tDate": 1672502400000,
"attachmentNo": 0,
"code": "JCAAART230102",
"multiFlowSrcModule": "",
"amt": 200,
"accDesc_zh-TW": "",
"depoAmt": 0,
"curId": 1,
"position_jp": "",
"expired": false,
"rate": 1,
"domAmt": 200,
"printCount": 0,
"preTaxDomAmt": 200,
"vatPer": 0,
"domDepoAmt": 0,
"accDesc_hy": "",
"accDesc_zh-CN": "",
"loadGpCoData": false,
"accdfId": 409,
"fpsOffSetId": 0,
"ttlDisc": 300,
"attachmentCount": 0,
"staffId": 1
}
],
"remartran": [
{
"statement_cth": "",
"remarks_en": "",
"particular_jp": "",
"shipAd2_zh-TW": "",
"statement_sxg": "",
"shipAd1_en": "Rm 1403 Wset Tower Shun Tak Centre 168",
"payTerm_zh-TW": "",
"noteDesc": "",
"shipAd2_jp": "",
"noteDesc_jp": "",
"id": 527,
"remarks_zh-TW": "",
"shipAd1_zh-CN": "",
"shipAd4_hy": "",
"payTerm_hy": "",
"statement_hy": "",
"hId": 420,
"payTerm": "",
"particular_en": "",
"shipAd4_cth": "",
"particular_zh-TW": "",
"particular_cth": "",
"particular": "",
"payTerm_cth": "",
"remarks_cth": "",
"remarks_hy": "",
"particular_zh-CN": "",
"shipAd2_en": "Connaught Road Central",
"shipAd4_sxg": "",
"remarks_sxg": "",
"noteDesc_cth": "",
"i18nField": "{\"payTerm_en\": \"\", \"remarks_en\": \"\", \"shipAd1_en\": \"Rm 1403 Wset Tower Shun Tak Centre 168\", \"shipAd2_en\": \"Connaught Road Central\", \"shipAd3_en\": \"Central and Western District\", \"shipAd4_en\": \"Hong Kong\", \"noteDesc_en\": \"\", \"statement_en\": \"\", \"particular_en\": \"\"}",
"shipAd3_jp": "",
"remarks_zh-CN": "",
"statement_en": "",
"shipAd1_hy": "",
"shipAd3_zh-TW": "",
"payTerm_zh-CN": "",
"particular_sxg": "",
"payTerm_sxg": "",
"noteDesc_en": "",
"shipCodeId": 31,
"shipAd2_cth": "",
"noteDesc_zh-CN": "",
"payTerm_en": "",
"iRev": 3,
"shipAd1_cth": "",
"shipAd3_sxg": "",
"shipAd4_zh-TW": "",
"particular_hy": "",
"noteDesc_sxg": "",
"ce01Module": "arTran",
"shipAd3_cth": "",
"shipAd3_en": "Central and Western District",
"statement_zh-CN": "",
"shipAd3_zh-CN": "",
"shipAd4_zh-CN": "",
"shipAd1_sxg": "",
"shipAd4_jp": "",
"statement_jp": "",
"noteDesc_hy": "",
"statement": "",
"shipAd2_sxg": "",
"shipAd2_hy": "",
"remarks_jp": "",
"payTerm_jp": "",
"noteDesc_zh-TW": "",
"shipAd1": "Rm 1403 Wset Tower Shun Tak Centre 168",
"shipAd2": "Connaught Road Central",
"shipAd3": "Central and Western District",
"shipAd4": "Hong Kong",
"shipAd1_zh-TW": "",
"shipAd4_en": "Hong Kong",
"shipAd1_jp": "",
"shipAd2_zh-CN": "",
"shipAd3_hy": "",
"statement_zh-TW": "",
"remarks": ""
}
]
},
"messages": [],
"status": true
}
# 保存应收账款交易
# 一、接口描述
用于新增【应收账款交易】
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/save/arTran |
---|---|
http请求方式 | PUT |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | arTran |
param | String(Query) | 否 | 额外的系统参数;JSON字符串 |
3、请求示例
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/arTran";
String param = "&menuCode=arTran";
HttpPut put = new HttpPut(url + "?" + param);
put.addHeader("authorization", access_token);
put.addHeader("client_id", ClientID);
StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON);
entity.setContentEncoding("UTF-8");
put.setEntity(entity);
res = client.execute(put);
if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
if (json != null) {
recordId = json.getLongValue("recordId");
}
System.out.println(json);
}
put.releaseConnection();
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (res != null) {
res.close();
}
if (client != null) {
client.close();
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
Entity的JSON格式数据如下:
{
"artrant": {
"values": [
{
"domAmt": 400,
"accId": 22,
"c_d": "charge",
"amt": 400
}
]
},
"mainartran": {
"values": [
{
"beId": 1,
"tDate": "2022-04-15",
"cpDate": "2022-05-14",
"curId": 1,
"AIType": "cus",
"rate": 1,
"virDeptId": 4,
"domAmt": 400,
"amt": 400,
"AIId": 12,
"staffId": 4
}
]
}
}
4、返回示例
{
"recordId": 54,
"messages": [],
"status": true
}
{
"recordId": 0,
"messages": [
{
"msgDetail": "必填项为空",
"msgCode": "core_101905"
}
],
"status": false
}
# 删除应收账款交易
# 一、接口描述
用于删除应收账款交易
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/delete/arTran |
---|---|
http请求方式 | DELETE |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | arTran |
id | long(Query) | 是 | 应收账款交易的id |
param | String(Query) | 否 | 额外的系统参数;JSON字符串 |
3、请求示例
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/delete/arTran";
String param = "&menuCode=arTran&id=" + id;
HttpDelete delete = new HttpDelete(url + "?" + param);
delete.addHeader("authorization", access_token);
delete.addHeader("client_id", ClientID);
res = client.execute(delete);
if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
System.out.println(json);
}
delete.releaseConnection();
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (res != null) {
res.close();
}
if (client != null) {
client.close();
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
4、返回示例
{
"messages": [],
"status": true
}
{
"messages": [
{
"msgDetail": "单据已被删除",
"msgCode": "core_101017"
}
],
"status": false
}
# 收款单
# 获取收款单列表
# 一、接口描述
用于获取收款单列表(同UI界面左侧的Search List数据)
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/search/search |
---|---|
http请求方式 | GET |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
stSearch | String(Query) | 是 | recReg |
beId | long(Query) | 是 | aiM18企业法人[部门]的ID |
formatId | long(Query) | 否 | aiM18[查询格式]的ID,用于获取[查询格式]步骤二中设定的栏位格式;若不使用此参数,则使用默认设置。 |
startRow | int(Query) | 否 | 返回结果的开始行 |
endRow | int(Query) | 否 | 返回结果的结束行 |
quickSearchStr | String(Query) | 否 | 用于设定关键字查找数据 |
3、请求示例
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/search/search";
String param = "&stSearch=recReg&beId=11";
HttpGet get = new HttpGet(url + "?" + param);
get.addHeader("authorization", access_token);
get.addHeader("client_id", ClientID);
res = client.execute(get);
if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
}
get.releaseConnection();
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (res != null) {
res.close();
}
if (client != null) {
client.close();
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
4、返回示例
{
"stSearch": "recReg",
"size": 1,
"stSearchDisplay": "收款单",
"values": [
{
"tDate": "2022-03-19",
"recReg.AIId.dAICode.code": "237650CUS",
"batchNo": "",
"code": "RET22030001",
"st_code": "RET22030001",
"recReg.AIId.dAICode.desc": "237650CUS",
"st_desc": "RET22030001",
"iRev": 1,
"st_id": 698,
"AIType": "cus",
"recReg.lastModifyUid.simpleUser.desc": "Joseph Chui",
"id": 698,
"lastModifyDate": "2022-03-19 11:51:21"
}
]
}
# 读取收款单
# 一、接口描述
用于读取【收款单】数据
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/read/recReg |
---|---|
http请求方式 | GET |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | recReg |
id | long(Query) | 是 | 收款单的id |
param | String(Query) | 否 | 额外的系统参数;JSON字符串 |
3、请求示例
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/read/recReg";
String param = "&menuCode=recReg&id=" + id;
HttpGet get = new HttpGet(url + "?" + param);
get.addHeader("authorization", access_token);
get.addHeader("client_id", ClientID);
res = client.execute(get);
if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
System.out.println(json);
}
get.releaseConnection();
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (res != null) {
res.close();
}
if (client != null) {
client.close();
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
4、返回示例
{
"data": {
"remrecreg": [
{
"statement_cth": "",
"remarks_en": "",
"particular_jp": "",
"shipAd2_zh-TW": "",
"statement_sxg": "",
"shipAd1_en": "",
"shipAd2_jp": "",
"id": 747,
"remarks_zh-TW": "",
"shipAd1_zh-CN": "",
"shipAd4_hy": "",
"statement_hy": "",
"hId": 698,
"particular_en": "",
"shipAd4_cth": "",
"particular_zh-TW": "",
"particular_cth": "",
"particular": "",
"remarks_cth": "",
"remarks_hy": "",
"particular_zh-CN": "",
"shipAd2_en": "",
"shipAd4_sxg": "",
"remarks_sxg": "",
"i18nField": "{\"remarks_en\": \"\", \"shipAd1_en\": \"\", \"shipAd2_en\": \"\", \"shipAd3_en\": \"\", \"shipAd4_en\": \"\", \"statement_en\": \"\", \"particular_en\": \"\"}",
"shipAd3_jp": "",
"remarks_zh-CN": "",
"statement_en": "",
"shipAd1_hy": "",
"shipAd3_zh-TW": "",
"particular_sxg": "",
"shipCodeId": 0,
"shipAd2_cth": "",
"iRev": 1,
"shipAd1_cth": "",
"shipAd3_sxg": "",
"shipAd4_zh-TW": "",
"particular_hy": "",
"ce01Module": "recReg",
"shipAd3_cth": "",
"shipAd3_en": "",
"statement_zh-CN": "",
"shipAd3_zh-CN": "",
"shipAd4_zh-CN": "",
"shipAd1_sxg": "",
"shipAd4_jp": "",
"statement_jp": "",
"statement": "",
"shipAd2_sxg": "",
"shipAd2_hy": "",
"remarks_jp": "",
"shipAd1": "",
"shipAd2": "",
"shipAd3": "",
"shipAd4": "",
"shipAd1_zh-TW": "",
"shipAd4_en": "",
"shipAd1_jp": "",
"shipAd2_zh-CN": "",
"shipAd3_hy": "",
"statement_zh-TW": "",
"remarks": ""
}
],
"recregdbt": [
{
"AI1": 0,
"c_d": 1,
"AI2": 0,
"itemNo": " 1",
"AI3": 0,
"AI4": 0,
"AI5": 0,
"accDesc": "HSBC",
"payer": "",
"AI6": 0,
"AI7": 0,
"beId": 1,
"AI8": 0,
"AI9": 0,
"iafSrcDocId": "",
"cusId": 0,
"id": 908,
"AI30": 0,
"debtorType": "cus",
"hId": 698,
"chequeNo": "",
"taxCodeId": 0,
"creditorType": "ven",
"bankSlipNo": "",
"printed": false,
"venId": 0,
"receipt": false,
"cnDeptId": 0,
"amt": 300,
"iRev": 1,
"AI19": 0,
"ce01Module": "recReg",
"AI17": 0,
"AI18": 0,
"AI15": 0,
"curId": 1,
"AI16": 0,
"AI13": 0,
"AI14": 0,
"rate": 1,
"domAmt": 300,
"AI11": 0,
"AI12": 0,
"AI10": 0,
"bkopNoId": 27,
"slmId": 0,
"chequeDate": 1647619200000,
"AI28": 0,
"AI29": 0,
"AI26": 0,
"AI27": 0,
"AI24": 0,
"AI25": 0,
"AI22": 0,
"AI23": 0,
"proId": 0,
"AI20": 0,
"AI21": 0,
"accId": 25,
"staffId": 0,
"bkopAc": "4937481502"
}
],
"recregt": [
{
"AI1": 0,
"AI2": 0,
"itemNo": " 1",
"AI3": 0,
"AI4": 0,
"AI5": 0,
"accDesc": "",
"AI6": 0,
"AI7": 0,
"eDiscRate": 0,
"beId": 1,
"AI8": 0,
"shipAd2_zh-TW": "",
"AI9": 0,
"iafSrcDocId": "",
"shipAd1_en": "Rm 1403 Wset Tower Shun Tak Centre 168",
"shipAd2_jp": "",
"revertSettled": false,
"id": 786,
"AI30": 0,
"shipAd1_zh-CN": "",
"shipAd4_hy": "",
"hId": 698,
"depositKey": "arTran_435_",
"shipAd4_cth": "",
"shipAd2_en": "Mong Kok",
"shipAd4_sxg": "",
"i18nField": "{\"shipAd1_en\": \"Rm 1403 Wset Tower Shun Tak Centre 168\", \"shipAd2_en\": \"Mong Kok\", \"shipAd3_en\": \"Central and Western District\", \"shipAd4_en\": \"Hong Kong\"}",
"shipAd3_jp": "",
"invRate": 1,
"curDomAmt": -300,
"multiRecKey": "",
"shipAd1_hy": "",
"shipAd3_zh-TW": "",
"srcAIId": 1760,
"shipCodeId": 358,
"shipAd2_cth": "",
"settle": true,
"amt": -300,
"iRev": 1,
"shipAd1_cth": "",
"shipAd3_sxg": "",
"shipAd4_zh-TW": "",
"udf002": "",
"udf001": 0,
"AI19": 0,
"sTranId": 435,
"ce01Module": "recReg",
"AI17": 0,
"lot": "",
"shipAd3_cth": "",
"AI18": 0,
"shipAd3_en": "Central and Western District",
"AI15": 0,
"curId": 1,
"AI16": 0,
"shipAd3_zh-CN": "",
"shipAd4_zh-CN": "",
"AI13": 0,
"AI14": 0,
"rate": 1,
"domAmt": -300,
"curDomEDiscAmt": 0,
"shipAd1_sxg": "",
"shipAd4_jp": "",
"AI11": 0,
"AI12": 0,
"shipAd2_sxg": "",
"AI10": 0,
"shipAd2_hy": "",
"eDiscAmt": 0,
"domEDiscAmt": 0,
"AI28": 0,
"AI29": 0,
"AI26": 0,
"shipAd1": "Rm 1403 Wset Tower Shun Tak Centre 168",
"AI27": 0,
"shipAd2": "Mong Kok",
"AI24": 0,
"shipAd3": "Central and Western District",
"AI25": 0,
"shipAd4": "Hong Kong",
"shipAd1_zh-TW": "",
"AI22": 0,
"shipAd4_en": "Hong Kong",
"AI23": 0,
"shipAd1_jp": "",
"AI20": 0,
"shipAd2_zh-CN": "",
"AI21": 0,
"shipAd3_hy": "",
"sTranType": "arTran",
"settleType": "invoice",
"domAmtDiff": 0
}
],
"mainrecreg": [
{
"settledAmtCurId": 1,
"setAmt": -300,
"useAccess": false,
"virDeptId": 4,
"suspenseAmtCurId": 1,
"expiredDate": -2209017600000,
"AI1": 0,
"AI2": 0,
"sysJson": "{\"autoGenCode\":{\"snId\":447,\"code\":\"RET22030001\",\"sn\":\"1\"}}",
"AI3": 0,
"AI4": 0,
"viewCode": "recReg",
"AI5": 0,
"AI6": 0,
"AI7": 0,
"AI8": 0,
"AI9": 0,
"fromSiId": 0,
"useAccessBl": false,
"id": 698,
"lastModifyDate": 1647661881000,
"createUid": 5,
"depoUsedAmt": 0,
"retAmt": 0,
"accjlId": 0,
"suspenseAmtRate": 1,
"depoAppliedAmtRate": 1,
"receivedAmtRate": 1,
"manId": 459,
"multiFlowSrcId": 0,
"status": "N",
"multiFlowFlowId": 0,
"cnDeptId": 177,
"jlTypeId": 0,
"iRev": 1,
"AI19": 0,
"ce01Module": "recReg",
"AI17": 0,
"AI18": 0,
"AI15": 0,
"AI16": 0,
"AI13": 0,
"AI14": 0,
"AI11": 0,
"AI12": 0,
"AI10": 0,
"statusModifyDate": 1647661881000,
"aiCnDeptId": 0,
"multiFlowId": 0,
"aiMemId": 0,
"createDate": 1647661881000,
"debitAmtCurId": 1,
"settledAmtRate": 1,
"useAccessWl": false,
"AI28": 0,
"AI29": 0,
"AI26": 0,
"suspenseAmt": 0,
"AI27": 0,
"AI24": 0,
"AI25": 0,
"AI22": 0,
"multiFlowSrcBeId": 0,
"AI23": 0,
"AI20": 0,
"AI21": 0,
"AIId": 1760,
"useAccessAutoCalc": false,
"lastModifyUid": 5,
"aiVirDeptId": 0,
"aiVenId": 0,
"beId": 1,
"receivedAmtCurId": 1,
"AIType": "cus",
"AI30": 0,
"locked": false,
"rev": "1",
"batchNo": "",
"lastApproveUid": 0,
"aiCusId": 1760,
"iafTrxDesc": "",
"expiredUid": 0,
"fromSoId": 0,
"multiRecId": 0,
"aiStaffId": 0,
"position": "Sales Staff",
"tDate": 1647619200000,
"attachmentNo": 0,
"code": "RET22030001",
"multiFlowSrcModule": "",
"amt": -300,
"curId": 1,
"expired": false,
"rate": 1,
"domAmt": -300,
"printCount": 0,
"sorId": 0,
"debitAmtRate": 1,
"fpsOffReceiptId": "",
"loadGpCoData": false,
"depoAppliedAmtCurId": 1,
"accdfId": 0,
"attachmentCount": 0,
"staffId": 1029
}
]
},
"messages": [],
"status": true
}
# 保存收款单
# 一、接口描述
用于新增【收款单】
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/save/recReg |
---|---|
http请求方式 | PUT |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | recReg |
param | String(Query) | 否 | 额外的系统参数;JSON字符串 |
3、请求示例
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/recReg";
String param = "&menuCode=recReg";
HttpPut put = new HttpPut(url + "?" + param);
put.addHeader("authorization", access_token);
put.addHeader("client_id", ClientID);
StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON);
entity.setContentEncoding("UTF-8");
put.setEntity(entity);
res = client.execute(put);
if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
if (json != null) {
recordId = json.getLongValue("recordId");
}
System.out.println(json);
}
put.releaseConnection();
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (res != null) {
res.close();
}
if (client != null) {
client.close();
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
Entity的JSON格式数据如下:
{
"recregdbt": {
"values": [
{
"curId": 1,
"rate": 1,
"domAmt": 200,
"accId": 22,
"amt": 200,
"chequeDate": "2022-04-15"
}
]
},
"recregt": {
"values": [
{
"lot": "A",
"curId": 1,
"rate": 1,
"domAmt": 200,
"invRate": 1,
"amt": 200,
"curDomAmt": 200,
"sTranType": "arTran",
"settleType": "invoice",
"sTranId": 440
}
]
},
"mainrecreg": {
"values": [
{
"beId": 1,
"tDate": "2022-04-15",
"curId": 1,
"AIType": "cus",
"rate": 1,
"virDeptId": 4,
"domAmt": 400,
"amt": 400,
"AIId": 12,
"staffId": 4
}
]
}
}
4、返回示例
{
"recordId": 717,
"messages": [],
"status": true
}
{
"recordId": 0,
"messages": [
{
"msgDetail": "必填项为空",
"msgCode": "core_101905"
}
],
"status": false
}
# 删除收款单
# 一、接口描述
用于删除收款单
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/delete/recReg |
---|---|
http请求方式 | DELETE |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | recReg |
id | long(Query) | 是 | 收款单的id |
param | String(Query) | 否 | 额外的系统参数;JSON字符串 |
3、请求示例
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/delete/recReg";
String param = "&menuCode=recReg&id=" + id;
HttpDelete delete = new HttpDelete(url + "?" + param);
delete.addHeader("authorization", access_token);
delete.addHeader("client_id", ClientID);
res = client.execute(delete);
if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
System.out.println(json);
}
delete.releaseConnection();
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (res != null) {
res.close();
}
if (client != null) {
client.close();
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
4、返回示例
{
"messages": [],
"status": true
}
{
"messages": [
{
"msgDetail": "单据已被删除",
"msgCode": "core_101017"
}
],
"status": false
}
# 应付创始记录
# 获取应付创始记录列表
# 一、接口描述
用于获取应付创始记录列表(同UI界面左侧的Search List数据)
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/search/search |
---|---|
http请求方式 | GET |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
stSearch | String(Query) | 是 | apIni |
beId | long(Query) | 是 | aiM18企业法人[部门]的ID |
formatId | long(Query) | 否 | aiM18[查询格式]的ID,用于获取[查询格式]步骤二中设定的栏位格式;若不使用此参数,则使用默认设置。 |
startRow | int(Query) | 否 | 返回结果的开始行 |
endRow | int(Query) | 否 | 返回结果的结束行 |
quickSearchStr | String(Query) | 否 | 用于设定关键字查找数据 |
3、请求示例
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/search/search";
String param = "&stSearch=apIni&beId=11";
HttpGet get = new HttpGet(url + "?" + param);
get.addHeader("authorization", access_token);
get.addHeader("client_id", ClientID);
res = client.execute(get);
if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
}
get.releaseConnection();
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (res != null) {
res.close();
}
if (client != null) {
client.close();
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
4、返回示例
{
"stSearch": "apIni",
"size": 1,
"stSearchDisplay": "应付创始记录",
"values": [
{
"tDate": "2021-09-16",
"batchNo": "",
"code": "232516APIB-1",
"st_code": "232516APIB-1",
"apIni.lastModifyUid.simpleUser.desc": "admin",
"st_desc": "232516APIB-1",
"amt": 100,
"iRev": 1,
"apIni.AIId.cAICode.code": "224300BU",
"st_id": 45,
"AIType": "virDept",
"apIni.curId.cur.sym": "HK$",
"id": 45,
"lastModifyDate": "2021-09-16 16:59:45",
"apIni.AIId.cAICode.desc": "224300BU (SC)"
}
]
}
# 读取应付创始记录
# 一、接口描述
用于读取【应付创始记录】数据
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/read/apIni |
---|---|
http请求方式 | GET |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | apIni |
id | long(Query) | 是 | 应付创始记录的id |
param | String(Query) | 否 | 额外的系统参数;JSON字符串 |
3、请求示例
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/read/apIni";
String param = "&menuCode=apIni&id=" + id;
HttpGet get = new HttpGet(url + "?" + param);
get.addHeader("authorization", access_token);
get.addHeader("client_id", ClientID);
res = client.execute(get);
if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
System.out.println(json);
}
get.releaseConnection();
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (res != null) {
res.close();
}
if (client != null) {
client.close();
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
4、返回示例
{
"data": {
"mainapini": [
{
"useAccess": false,
"virDeptId": 4,
"expiredDate": -2209017600000,
"installNo": 1,
"AI1": 0,
"AI2": 0,
"sysJson": "",
"AI3": 0,
"AI4": 0,
"viewCode": "apIni",
"AI5": 0,
"accDesc": "",
"accDesc_cth": "",
"AI6": 0,
"AI7": 0,
"AI8": 0,
"AI9": 0,
"alAmt": 0,
"useAccessBl": false,
"id": 45,
"venInvNo_jp": "",
"lastModifyDate": 1631782785000,
"createUid": 1,
"completed": false,
"iniAmt": 100,
"accjlId": 41682,
"i18nField": "{\"accDesc_zh-CN\": \"\", \"venInvNo_zh-CN\": \"\"}",
"dayOfMonth": 0,
"accDesc_en": "",
"manId": 0,
"status": "Y",
"cnDeptId": 0,
"jlTypeId": 1,
"iRev": 1,
"AI19": 0,
"aInvMonth": 0,
"ce01Module": "apIni",
"AI17": 0,
"AI18": 0,
"AI15": 0,
"AI16": 0,
"AI13": 0,
"venInvNo_hy": "",
"AI14": 0,
"AI11": 0,
"AI12": 0,
"AI10": 0,
"venInvNo_zh-CN": "",
"statusModifyDate": 1631782785000,
"aiCnDeptId": 0,
"createDate": 1631782785000,
"cp": 0,
"useAccessWl": false,
"AI28": 0,
"AI29": 0,
"AI26": 0,
"AI27": 0,
"venInvNo_zh-TW": "",
"AI24": 0,
"AI25": 0,
"AI22": 0,
"AI23": 0,
"AI20": 0,
"AI21": 0,
"venInvNo_cth": "",
"AIId": 26,
"useAccessAutoCalc": false,
"cpDate": 1631721600000,
"lastModifyUid": 1,
"aiVirDeptId": 26,
"aiVenId": 0,
"eDiscRate": 0,
"beId": 1,
"accDesc_jp": "",
"AIType": "virDept",
"AI30": 0,
"locked": false,
"accDesc_sxg": "",
"showEarlyPayDisc": false,
"rev": "1",
"batchNo": "",
"lastApproveUid": 1,
"aiCusId": 0,
"iafTrxDesc": "AP Initial Balance of 224300BU (EN)",
"expiredUid": 0,
"completedDate": -2209017600000,
"aiStaffId": 0,
"monthEndDate": "0",
"iniDate": 1631721600000,
"position": "",
"venInvNo": "",
"tDate": 1631721600000,
"attachmentNo": 0,
"code": "232516APIB-1",
"amt": 100,
"accDesc_zh-TW": "",
"curId": 1,
"expired": false,
"rate": 1,
"domAmt": 100,
"printCount": 0,
"accDesc_hy": "",
"accDesc_zh-CN": "",
"venInvNo_sxg": "",
"accdfId": 147,
"attachmentCount": 0,
"venInvNo_en": "",
"staffId": 1
}
],
"remaptran": [
{
"noteDesc_zh-CN": "",
"remarks_en": "",
"particular_jp": "",
"payTerm_en": "",
"iRev": 1,
"particular_hy": "",
"noteDesc_sxg": "",
"ce01Module": "apIni",
"payTerm_zh-TW": "",
"noteDesc": "",
"noteDesc_hy": "",
"noteDesc_jp": "",
"id": 118,
"remarks_zh-TW": "",
"payTerm_hy": "",
"remarks_jp": "",
"hId": 45,
"payTerm": "",
"particular_en": "",
"particular_zh-TW": "",
"particular_cth": "",
"particular": "",
"payTerm_cth": "",
"payTerm_jp": "",
"noteDesc_zh-TW": "",
"remarks_cth": "",
"remarks_hy": "",
"particular_zh-CN": "",
"remarks_sxg": "",
"noteDesc_cth": "",
"i18nField": "{\"payTerm_zh-CN\": \"\", \"remarks_zh-CN\": \"\", \"noteDesc_zh-CN\": \"\", \"particular_zh-CN\": \"\"}",
"remarks_zh-CN": "",
"payTerm_zh-CN": "",
"particular_sxg": "",
"remarks": "",
"payTerm_sxg": "",
"noteDesc_en": ""
}
]
},
"messages": [],
"status": true
}
# 保存应付创始记录
# 一、接口描述
用于新增【应付创始记录】
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/save/apIni |
---|---|
http请求方式 | PUT |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | apIni |
param | String(Query) | 否 | 额外的系统参数;JSON字符串 |
3、请求示例
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/apIni";
String param = "&menuCode=apIni";
HttpPut put = new HttpPut(url + "?" + param);
put.addHeader("authorization", access_token);
put.addHeader("client_id", ClientID);
StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON);
entity.setContentEncoding("UTF-8");
put.setEntity(entity);
res = client.execute(put);
if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
if (json != null) {
recordId = json.getLongValue("recordId");
}
System.out.println(json);
}
put.releaseConnection();
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (res != null) {
res.close();
}
if (client != null) {
client.close();
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
Entity的JSON格式数据如下:
{
"mainapini": {
"values": [
{
"beId": 1,
"tDate": "2022-04-15",
"curId": 1,
"AIType": "ven",
"rate": 1,
"virDeptId": 4,
"domAmt": 400,
"mainapini": 400,
"iniDate": "2022-05-14",
"amt": 400,
"AIId": 14,
"staffId": 4
}
]
}
}
4、返回示例
{
"recordId": 64,
"messages": [],
"status": true
}
{
"recordId": 0,
"messages": [
{
"msgDetail": "必填项为空",
"msgCode": "core_101905"
}
],
"status": false
}
# 删除应付创始记录
# 一、接口描述
用于删除应付创始记录
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/delete/apIni |
---|---|
http请求方式 | DELETE |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | apIni |
id | long(Query) | 是 | 应付创始记录的id |
param | String(Query) | 否 | 额外的系统参数;JSON字符串 |
3、请求示例
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/delete/apIni";
String param = "&menuCode=apIni&id=" + id;
HttpDelete delete = new HttpDelete(url + "?" + param);
delete.addHeader("authorization", access_token);
delete.addHeader("client_id", ClientID);
res = client.execute(delete);
if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
System.out.println(json);
}
delete.releaseConnection();
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (res != null) {
res.close();
}
if (client != null) {
client.close();
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
4、返回示例
{
"messages": [],
"status": true
}
{
"messages": [
{
"msgDetail": "单据已被删除",
"msgCode": "core_101017"
}
],
"status": false
}
# 预付创始记录
# 获取预付创始记录列表
# 一、接口描述
用于获取预付创始记录列表(同UI界面左侧的Search List数据)
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/search/search |
---|---|
http请求方式 | GET |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
stSearch | String(Query) | 是 | dpIni |
beId | long(Query) | 是 | aiM18企业法人[部门]的ID |
formatId | long(Query) | 否 | aiM18[查询格式]的ID,用于获取[查询格式]步骤二中设定的栏位格式;若不使用此参数,则使用默认设置。 |
startRow | int(Query) | 否 | 返回结果的开始行 |
endRow | int(Query) | 否 | 返回结果的结束行 |
quickSearchStr | String(Query) | 否 | 用于设定关键字查找数据 |
3、请求示例
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/search/search";
String param = "&stSearch=dpIni&beId=11";
HttpGet get = new HttpGet(url + "?" + param);
get.addHeader("authorization", access_token);
get.addHeader("client_id", ClientID);
res = client.execute(get);
if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
}
get.releaseConnection();
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (res != null) {
res.close();
}
if (client != null) {
client.close();
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
4、返回示例
{
"stSearch": "dpIni",
"size": 1,
"stSearchDisplay": "预付创始记录",
"values": [
{
"dpIni.AIId.cAICode.desc": "Han Guang Company",
"tDate": "2021-12-08",
"batchNo": "",
"code": "235724DPIB",
"dpIni.AIId.cAICode.code": "HGSY",
"st_code": "235724DPIB",
"st_desc": "235724DPIB",
"amt": 10000,
"dpIni.curId.cur.sym": "HK$",
"iRev": 5,
"st_id": 24,
"AIType": "ven",
"dpIni.lastModifyUid.simpleUser.desc": "admin",
"id": 24,
"lastModifyDate": "2021-12-08 14:43:17"
}
]
}
# 读取预付创始记录
# 一、接口描述
用于读取【预付创始记录】数据
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/read/dpIni |
---|---|
http请求方式 | GET |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | dpIni |
id | long(Query) | 是 | 预付创始记录的id |
param | String(Query) | 否 | 额外的系统参数;JSON字符串 |
3、请求示例
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/read/dpIni";
String param = "&menuCode=dpIni&id=" + id;
HttpGet get = new HttpGet(url + "?" + param);
get.addHeader("authorization", access_token);
get.addHeader("client_id", ClientID);
res = client.execute(get);
if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
System.out.println(json);
}
get.releaseConnection();
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (res != null) {
res.close();
}
if (client != null) {
client.close();
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
4、返回示例
{
"data": {
"maindpini": [
{
"lastModifyUid": 1,
"aiVirDeptId": 0,
"useAccess": false,
"orderId": 0,
"virDeptId": 4,
"aiVenId": 7,
"expiredDate": -2209017600000,
"AI1": 0,
"AI2": 0,
"sysJson": "",
"AI3": 0,
"AI4": 0,
"viewCode": "dpIni",
"AI5": 0,
"accDesc": "",
"AI6": 0,
"AI7": 0,
"beId": 1,
"AI8": 0,
"AI9": 0,
"alAmt": 0,
"AIType": "ven",
"useAccessBl": false,
"id": 24,
"AI30": 0,
"locked": false,
"lastModifyDate": 1638945797000,
"createUid": 1,
"rev": "1",
"batchNo": "",
"depositKey": "prodSpjob_0_",
"lastApproveUid": 1,
"aiCusId": 0,
"iafTrxDesc": "",
"expiredUid": 0,
"iniAmt": 10000,
"accjlId": 42413,
"aiStaffId": 0,
"multiPayId": 0,
"manId": 0,
"iniDate": 1638892800000,
"position": "",
"status": "Y",
"tDate": 1638892800000,
"attachmentNo": 0,
"code": "235724DPIB",
"cnDeptId": 177,
"jlTypeId": 0,
"amt": 10000,
"iRev": 5,
"petAmt": 0,
"AI19": 0,
"sTranId": 0,
"ce01Module": "dpIni",
"AI17": 0,
"AI18": 0,
"AI15": 0,
"curId": 1,
"AI16": 0,
"expired": false,
"AI13": 0,
"AI14": 0,
"rate": 1,
"domAmt": 10000,
"AI11": 0,
"AI12": 0,
"printCount": 0,
"AI10": 0,
"statusModifyDate": 1638945797000,
"aiCnDeptId": 0,
"createDate": 1638945794000,
"sjobId": 0,
"useAccessWl": false,
"spjobId": 0,
"AI28": 0,
"accdfId": 44,
"AI29": 0,
"AI26": 0,
"AI27": 0,
"AI24": 0,
"AI25": 0,
"AI22": 0,
"AI23": 0,
"AI20": 0,
"AI21": 0,
"attachmentCount": 0,
"sTranType": "prodSpjob",
"AIId": 7,
"useAccessAutoCalc": false,
"staffId": 1029
}
],
"rempayreg": [
{
"statement_cth": "",
"remarks_en": "",
"particular_jp": "",
"iRev": 5,
"particular_hy": "",
"ce01Module": "dpIni",
"statement_zh-CN": "",
"statement_sxg": "",
"statement_jp": "",
"statement": "",
"id": 165,
"remarks_zh-TW": "",
"remarks_jp": "",
"statement_hy": "",
"hId": 24,
"particular_en": "",
"particular_zh-TW": "",
"particular_cth": "",
"particular": "",
"remarks_cth": "",
"remarks_hy": "",
"particular_zh-CN": "",
"remarks_sxg": "",
"i18nField": "{\"remarks_en\": \"\", \"statement_en\": \"\", \"particular_en\": \"\"}",
"remarks_zh-CN": "",
"statement_en": "",
"statement_zh-TW": "",
"particular_sxg": "",
"remarks": ""
}
]
},
"messages": [],
"status": true
}
# 保存预付创始记录
# 一、接口描述
用于新增【预付创始记录】
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/save/dpIni |
---|---|
http请求方式 | PUT |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | dpIni |
param | String(Query) | 否 | 额外的系统参数;JSON字符串 |
3、请求示例
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/dpIni";
String param = "&menuCode=dpIni";
HttpPut put = new HttpPut(url + "?" + param);
put.addHeader("authorization", access_token);
put.addHeader("client_id", ClientID);
StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON);
entity.setContentEncoding("UTF-8");
put.setEntity(entity);
res = client.execute(put);
if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
if (json != null) {
recordId = json.getLongValue("recordId");
}
System.out.println(json);
}
put.releaseConnection();
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (res != null) {
res.close();
}
if (client != null) {
client.close();
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
Entity的JSON格式数据如下:
{
"maindpini": {
"values": [
{
"beId": 1,
"tDate": "2022-04-15",
"curId": 1,
"AIType": "ven",
"rate": 1,
"virDeptId": 4,
"domAmt": 400,
"iniDate": "2022-05-14",
"amt": 400,
"AIId": 14,
"staffId": 4,
"iniAmt": 400
}
]
}
}
4、返回示例
{
"recordId": 64,
"messages": [],
"status": true
}
{
"recordId": 0,
"messages": [
{
"msgDetail": "必填项为空",
"msgCode": "core_101905"
}
],
"status": false
}
# 删除预付创始记录
# 一、接口描述
用于删除预付创始记录
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/delete/dpIni |
---|---|
http请求方式 | DELETE |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | dpIni |
id | long(Query) | 是 | 预付创始记录的id |
param | String(Query) | 否 | 额外的系统参数;JSON字符串 |
3、请求示例
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/delete/dpIni";
String param = "&menuCode=dpIni&id=" + id;
HttpDelete delete = new HttpDelete(url + "?" + param);
delete.addHeader("authorization", access_token);
delete.addHeader("client_id", ClientID);
res = client.execute(delete);
if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
System.out.println(json);
}
delete.releaseConnection();
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (res != null) {
res.close();
}
if (client != null) {
client.close();
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
4、返回示例
{
"messages": [],
"status": true
}
{
"messages": [
{
"msgDetail": "单据已被删除",
"msgCode": "core_101017"
}
],
"status": false
}
# 应付账款交易
# 获取应付账款交易列表
# 一、接口描述
用于获取应付账款交易列表(同UI界面左侧的Search List数据)
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/search/search |
---|---|
http请求方式 | GET |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
stSearch | String(Query) | 是 | apTran |
beId | long(Query) | 是 | aiM18企业法人[部门]的ID |
formatId | long(Query) | 否 | aiM18[查询格式]的ID,用于获取[查询格式]步骤二中设定的栏位格式;若不使用此参数,则使用默认设置。 |
startRow | int(Query) | 否 | 返回结果的开始行 |
endRow | int(Query) | 否 | 返回结果的结束行 |
quickSearchStr | String(Query) | 否 | 用于设定关键字查找数据 |
3、请求示例
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/search/search";
String param = "&stSearch=apTran&beId=11";
HttpGet get = new HttpGet(url + "?" + param);
get.addHeader("authorization", access_token);
get.addHeader("client_id", ClientID);
res = client.execute(get);
if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
}
get.releaseConnection();
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (res != null) {
res.close();
}
if (client != null) {
client.close();
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
4、返回示例
{
"stSearch": "apTran",
"size": 1,
"stSearchDisplay": "应付账款交易",
"values": [
{
"tDate": "2021-12-30",
"batchNo": "",
"code": "AP_211230",
"st_code": "AP_211230",
"st_desc": "AP_211230",
"iRev": 1,
"apTran.lastModifyUid.simpleUser.desc": "admin",
"st_id": 109,
"AIType": "ven",
"apTran.AIId.cAICode.code": "2021125VEN",
"id": 109,
"lastModifyDate": "2021-12-29 11:00:09",
"apTran.AIId.cAICode.desc": "2021125VEN"
}
]
}
# 读取应付账款交易
# 一、接口描述
用于读取【应付账款交易】数据
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/read/apTran |
---|---|
http请求方式 | GET |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | apTran |
id | long(Query) | 是 | 应付账款交易的id |
param | String(Query) | 否 | 额外的系统参数;JSON字符串 |
3、请求示例
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/read/apTran";
String param = "&menuCode=apTran&id=" + id;
HttpGet get = new HttpGet(url + "?" + param);
get.addHeader("authorization", access_token);
get.addHeader("client_id", ClientID);
res = client.execute(get);
if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
System.out.println(json);
}
get.releaseConnection();
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (res != null) {
res.close();
}
if (client != null) {
client.close();
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
4、返回示例
{
"data": {
"mainaptran": [
{
"useAccess": false,
"virDeptId": 17,
"expiredDate": -2209017600000,
"installNo": 0,
"AI1": 0,
"AI2": 0,
"sysJson": "",
"AI3": 0,
"AI4": 0,
"viewCode": "apTran",
"AI5": 0,
"accDesc": "",
"accDesc_cth": "",
"AI6": 0,
"AI7": 0,
"AI8": 0,
"AI9": 0,
"cusAcc": false,
"useAccessBl": false,
"id": 109,
"venInvNo_jp": "",
"lastModifyDate": 1640746809000,
"createUid": 1,
"method": "cod",
"taxDomAmt": 0,
"completed": false,
"permitNo": "",
"ttlImportPermitAmt": 0,
"accjlId": 42532,
"i18nField": "{\"accDesc_en\": \"\", \"venInvNo_en\": \"\"}",
"dayOfMonth": 1,
"accDesc_en": "",
"taxOrigin": "",
"manId": 0,
"multiFlowSrcId": 0,
"status": "Y",
"multiFlowFlowId": 0,
"cnDeptId": 177,
"jlTypeId": 0,
"iRev": 1,
"AI19": 0,
"aInvMonth": 0,
"ce01Module": "apTran",
"AI17": 0,
"AI18": 0,
"preTaxAmt": 200,
"AI15": 0,
"AI16": 0,
"AI13": 0,
"venInvNo_hy": "",
"AI14": 0,
"AI11": 0,
"AI12": 0,
"AI10": 0,
"venInvNo_zh-CN": "",
"statusModifyDate": 1640746809000,
"aiCnDeptId": 0,
"createDate": 1640746809000,
"cp": 0,
"useAccessWl": false,
"AI28": 0,
"AI29": 0,
"AI26": 0,
"AI27": 0,
"venInvNo_zh-TW": "",
"AI24": 0,
"AI25": 0,
"AI22": 0,
"multiFlowSrcBeId": 0,
"AI23": 0,
"AI20": 0,
"AI21": 0,
"venInvNo_cth": "",
"AIId": 1627,
"useAccessAutoCalc": false,
"domAmtDiff": 0,
"cpDate": 1640793600000,
"lastModifyUid": 1,
"aiVirDeptId": 0,
"aiVenId": 1627,
"udfDefaultAP": 0,
"eDiscRate": 0,
"beId": 1,
"accDesc_jp": "",
"AIType": "ven",
"AI30": 0,
"locked": false,
"taxAmt": 0,
"accDesc_sxg": "",
"showEarlyPayDisc": false,
"rev": "1",
"batchNo": "",
"lastApproveUid": 1,
"aiCusId": 0,
"ttlCharge": 200,
"iafTrxDesc": "",
"expiredUid": 0,
"completedDate": -2209017600000,
"reverseCharge": false,
"aiStaffId": 0,
"monthEndDate": "0",
"position": "",
"venInvNo": "",
"hpSetting": "dayAfterInv",
"tDate": 1640793600000,
"attachmentNo": 0,
"code": "AP_211230",
"multiFlowSrcModule": "",
"amt": 200,
"accDesc_zh-TW": "",
"depoAmt": 0,
"curId": 22,
"expired": false,
"rate": 1.3,
"domAmt": 260,
"printCount": 0,
"preTaxDomAmt": 260,
"ttlImportPermitTaxAmt": 0,
"vatPer": 0,
"domDepoAmt": 0,
"accDesc_hy": "",
"accDesc_zh-CN": "",
"venInvNo_sxg": "",
"loadGpCoData": false,
"accdfId": 129,
"ttlDisc": 0,
"attachmentCount": 0,
"venInvNo_en": "",
"staffId": 1029
}
],
"aptrant": [
{
"AI1": 0,
"c_d": "charge",
"AI2": 0,
"itemNo": " 1",
"AI3": 0,
"AI4": 0,
"AI5": 0,
"accDesc": "Fee",
"AI6": 0,
"AI7": 0,
"beId": 1,
"AI8": 0,
"AI9": 0,
"cusId": 0,
"id": 126,
"AI30": 0,
"taxAmt": 0,
"debtorType": "cus",
"hId": 109,
"taxDomAmt": 0,
"particular": "",
"importPermitAmt": 0,
"taxCodeId": 0,
"creditorType": "ven",
"venId": 0,
"importPermitTaxAmt": 0,
"cnDeptId": 0,
"amt": 200,
"iRev": 1,
"ipTaxCodeId": 0,
"AI19": 0,
"ce01Module": "apTran",
"AI17": 0,
"AI18": 0,
"preTaxAmt": 200,
"AI15": 0,
"AI16": 0,
"AI13": 0,
"AI14": 0,
"domAmt": 260,
"AI11": 0,
"AI12": 0,
"AI10": 0,
"preTaxDomAmt": 260,
"vatPer": 0,
"ipTaxRate": 0,
"AI28": 0,
"AI29": 0,
"AI26": 0,
"AI27": 0,
"AI24": 0,
"AI25": 0,
"AI22": 0,
"AI23": 0,
"proId": 0,
"AI20": 0,
"AI21": 0,
"accId": 22,
"staffId": 0
}
],
"remaptran": [
{
"noteDesc_zh-CN": "",
"remarks_en": "",
"particular_jp": "",
"payTerm_en": "",
"iRev": 1,
"particular_hy": "",
"noteDesc_sxg": "",
"ce01Module": "apTran",
"payTerm_zh-TW": "",
"noteDesc": "",
"noteDesc_hy": "",
"noteDesc_jp": "",
"id": 157,
"remarks_zh-TW": "",
"payTerm_hy": "",
"remarks_jp": "",
"hId": 109,
"payTerm": "",
"particular_en": "",
"particular_zh-TW": "",
"particular_cth": "",
"particular": "",
"payTerm_cth": "",
"payTerm_jp": "",
"noteDesc_zh-TW": "",
"remarks_cth": "",
"remarks_hy": "",
"particular_zh-CN": "",
"remarks_sxg": "",
"noteDesc_cth": "",
"i18nField": "{\"payTerm_en\": \"\", \"remarks_en\": \"\", \"noteDesc_en\": \"\", \"particular_en\": \"\"}",
"remarks_zh-CN": "",
"payTerm_zh-CN": "",
"particular_sxg": "",
"remarks": "",
"payTerm_sxg": "",
"noteDesc_en": ""
}
]
},
"messages": [],
"status": true
}
# 保存应付账款交易
# 一、接口描述
用于新增【应付账款交易】
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/save/apTran |
---|---|
http请求方式 | PUT |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | apTran |
param | String(Query) | 否 | 额外的系统参数;JSON字符串 |
3、请求示例
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/apTran";
String param = "&menuCode=apTran";
HttpPut put = new HttpPut(url + "?" + param);
put.addHeader("authorization", access_token);
put.addHeader("client_id", ClientID);
StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON);
entity.setContentEncoding("UTF-8");
put.setEntity(entity);
res = client.execute(put);
if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
if (json != null) {
recordId = json.getLongValue("recordId");
}
System.out.println(json);
}
put.releaseConnection();
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (res != null) {
res.close();
}
if (client != null) {
client.close();
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
Entity的JSON格式数据如下:
{
"mainaptran": {
"values": [
{
"beId": 1,
"tDate": "2022-04-15",
"cpDate": "2022-05-14",
"curId": 1,
"AIType": "ven",
"rate": 1,
"virDeptId": 4,
"domAmt": 400,
"amt": 400,
"AIId": 14,
"staffId": 4
}
]
},
"aptrant": {
"values": [
{
"domAmt": 400,
"accId": 22,
"c_d": "charge",
"amt": 400
}
]
}
}
4、返回示例
{
"recordId": 64,
"messages": [],
"status": true
}
{
"recordId": 0,
"messages": [
{
"msgDetail": "必填项为空",
"msgCode": "core_101905"
}
],
"status": false
}
# 删除应付账款交易
# 一、接口描述
用于删除应付账款交易
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/delete/apTran |
---|---|
http请求方式 | DELETE |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | apTran |
id | long(Query) | 是 | 应付账款交易的id |
param | String(Query) | 否 | 额外的系统参数;JSON字符串 |
3、请求示例
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/delete/apTran";
String param = "&menuCode=apTran&id=" + id;
HttpDelete delete = new HttpDelete(url + "?" + param);
delete.addHeader("authorization", access_token);
delete.addHeader("client_id", ClientID);
res = client.execute(delete);
if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
System.out.println(json);
}
delete.releaseConnection();
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (res != null) {
res.close();
}
if (client != null) {
client.close();
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
4、返回示例
{
"messages": [],
"status": true
}
{
"messages": [
{
"msgDetail": "单据已被删除",
"msgCode": "core_101017"
}
],
"status": false
}
# 付款单
# 获取付款单列表
# 一、接口描述
用于获取付款单列表(同UI界面左侧的Search List数据)
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/search/search |
---|---|
http请求方式 | GET |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
stSearch | String(Query) | 是 | payReg |
beId | long(Query) | 是 | aiM18企业法人[部门]的ID |
formatId | long(Query) | 否 | aiM18[查询格式]的ID,用于获取[查询格式]步骤二中设定的栏位格式;若不使用此参数,则使用默认设置。 |
startRow | int(Query) | 否 | 返回结果的开始行 |
endRow | int(Query) | 否 | 返回结果的结束行 |
quickSearchStr | String(Query) | 否 | 用于设定关键字查找数据 |
3、请求示例
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/search/search";
String param = "&stSearch=payReg&beId=11";
HttpGet get = new HttpGet(url + "?" + param);
get.addHeader("authorization", access_token);
get.addHeader("client_id", ClientID);
res = client.execute(get);
if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
}
get.releaseConnection();
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (res != null) {
res.close();
}
if (client != null) {
client.close();
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
4、返回示例
{
"stSearch": "payReg",
"size": 1,
"stSearchDisplay": "付款单",
"values": [
{
"tDate": "2022-02-28",
"batchNo": "",
"code": "237006PR-1",
"st_code": "237006PR-1",
"payReg.lastModifyUid.simpleUser.desc": "Joseph Chui",
"st_desc": "237006PR-1",
"payReg.AIId.cAICode.code": "HGSY",
"iRev": 4,
"st_id": 149,
"payReg.AIId.cAICode.desc": "Han Guang Company",
"AIType": "ven",
"id": 149,
"lastModifyDate": "2022-04-06 11:50:45"
}
]
}
# 读取付款单
# 一、接口描述
用于读取【付款单】数据
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/read/payReg |
---|---|
http请求方式 | GET |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | payReg |
id | long(Query) | 是 | 付款单的id |
param | String(Query) | 否 | 额外的系统参数;JSON字符串 |
3、请求示例
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/read/payReg";
String param = "&menuCode=payReg&id=" + id;
HttpGet get = new HttpGet(url + "?" + param);
get.addHeader("authorization", access_token);
get.addHeader("client_id", ClientID);
res = client.execute(get);
if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
System.out.println(json);
}
get.releaseConnection();
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (res != null) {
res.close();
}
if (client != null) {
client.close();
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
4、返回示例
{
"data": {
"rempayreg": [
{
"statement_cth": "",
"remarks_en": "",
"particular_jp": "",
"iRev": 4,
"particular_hy": "",
"ce01Module": "payReg",
"statement_zh-CN": "",
"statement_sxg": "",
"statement_jp": "",
"statement": "",
"id": 173,
"remarks_zh-TW": "",
"remarks_jp": "",
"statement_hy": "",
"hId": 149,
"particular_en": "",
"particular_zh-TW": "",
"particular_cth": "",
"particular": "",
"remarks_cth": "",
"remarks_hy": "",
"particular_zh-CN": "",
"remarks_sxg": "",
"i18nField": "{\"remarks_en\": \"\", \"statement_en\": \"\", \"particular_en\": \"\"}",
"remarks_zh-CN": "",
"statement_en": "",
"statement_zh-TW": "",
"particular_sxg": "",
"remarks": ""
}
],
"payregdbt": [
{
"AI1": 0,
"c_d": 1,
"AI2": 0,
"itemNo": " 1",
"AI3": 0,
"AI4": 0,
"AI5": 0,
"accDesc": "Cash",
"AI6": 0,
"AI7": 0,
"beId": 1,
"AI8": 0,
"payee": "Mr. Chan",
"AI9": 0,
"cusId": 0,
"payment": false,
"id": 213,
"AI30": 0,
"debtorType": "cus",
"hId": 149,
"chequeNo": "653412",
"creditorType": "ven",
"bankSlipNo": "",
"printed": false,
"venId": 0,
"cnDeptId": 0,
"amt": 6600,
"iRev": 4,
"AI19": 0,
"ce01Module": "payReg",
"AI17": 0,
"AI18": 0,
"AI15": 0,
"curId": 1,
"AI16": 0,
"AI13": 0,
"AI14": 0,
"rate": 1,
"domAmt": 6600,
"AI11": 0,
"AI12": 0,
"AI10": 0,
"bkopNoId": 32,
"slmId": 0,
"chequeDate": 1645977600000,
"AI28": 0,
"AI29": 0,
"AI26": 0,
"AI27": 0,
"AI24": 0,
"AI25": 0,
"AI22": 0,
"AI23": 0,
"proId": 0,
"AI20": 0,
"AI21": 0,
"accId": 57,
"staffId": 0,
"bkopAc": "8437256014"
}
],
"payregt": [
{
"AI1": 0,
"AI2": 0,
"itemNo": " 1",
"AI3": 0,
"AI4": 0,
"AI5": 0,
"accDesc": "",
"AI6": 0,
"AI7": 0,
"eDiscRate": 0,
"beId": 1,
"AI8": 0,
"AI9": 0,
"revertSettled": false,
"id": 216,
"AI30": 0,
"hId": 149,
"depositKey": "po_3540_A",
"invRate": 1,
"curDomAmt": 6600,
"srcAIId": 7,
"settle": true,
"amt": 6600,
"iRev": 4,
"AI19": 0,
"sTranId": 3540,
"ce01Module": "payReg",
"AI17": 0,
"lot": "A",
"AI18": 0,
"AI15": 0,
"curId": 1,
"AI16": 0,
"AI13": 0,
"AI14": 0,
"rate": 1,
"domAmt": 6600,
"curDomEDiscAmt": 0,
"AI11": 0,
"AI12": 0,
"AI10": 0,
"eDiscAmt": 0,
"domEDiscAmt": 0,
"multiPayKey": "",
"AI28": 0,
"AI29": 0,
"AI26": 0,
"AI27": 0,
"AI24": 0,
"AI25": 0,
"AI22": 0,
"AI23": 0,
"AI20": 0,
"AI21": 0,
"sTranType": "po",
"settleType": "deposit",
"domAmtDiff": 0
}
],
"mainpayreg": [
{
"settledAmtCurId": 1,
"setAmt": 0,
"useAccess": false,
"orderId": 0,
"virDeptId": 4,
"suspenseAmtCurId": 1,
"expiredDate": -2209017600000,
"AI1": 0,
"AI2": 0,
"sysJson": "",
"AI3": 0,
"AI4": 0,
"viewCode": "payReg",
"AI5": 0,
"AI6": 0,
"AI7": 0,
"AI8": 0,
"AI9": 0,
"creditAmtCurId": 1,
"useAccessBl": false,
"id": 149,
"lastModifyDate": 1649217045000,
"createUid": 1,
"depoUsedAmt": 0,
"suspenseAmtRate": 1,
"depoAppliedAmtRate": 1,
"receivedAmtRate": 1,
"manId": 7,
"multiFlowSrcId": 0,
"status": "Y",
"multiFlowFlowId": 0,
"cnDeptId": 177,
"jlTypeId": 1,
"creditAmtRate": 1,
"iRev": 4,
"AI19": 0,
"ce01Module": "payReg",
"AI17": 0,
"AI18": 0,
"AI15": 0,
"AI16": 0,
"AI13": 0,
"AI14": 0,
"AI11": 0,
"AI12": 0,
"AI10": 0,
"statusModifyDate": 1646021145000,
"aiCnDeptId": 0,
"multiFlowId": 0,
"createDate": 1646021145000,
"settledAmtRate": 1,
"useAccessWl": false,
"AI28": 0,
"AI29": 0,
"AI26": 0,
"suspenseAmt": 0,
"AI27": 0,
"AI24": 0,
"AI25": 0,
"AI22": 0,
"multiFlowSrcBeId": 0,
"AI23": 0,
"AI20": 0,
"AI21": 0,
"AIId": 7,
"useAccessAutoCalc": false,
"lastModifyUid": 5,
"aiVirDeptId": 0,
"aiVenId": 7,
"beId": 1,
"receivedAmtCurId": 1,
"AIType": "ven",
"AI30": 0,
"locked": false,
"rev": "4",
"batchNo": "",
"lastApproveUid": 1,
"aiCusId": 0,
"expiredUid": 0,
"aiStaffId": 0,
"multiPayId": 0,
"position": "Supervisior",
"tDate": 1645977600000,
"attachmentNo": 0,
"code": "237006PR-1",
"multiFlowSrcModule": "",
"amt": 6600,
"petAmt": 6600,
"curId": 1,
"expired": false,
"rate": 1,
"domAmt": 6600,
"printCount": 0,
"loadGpCoData": false,
"depoAppliedAmtCurId": 1,
"attachmentCount": 0,
"staffId": 1029
}
]
},
"messages": [],
"status": true
}
# 保存付款单
# 一、接口描述
用于新增【付款单】
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/save/payReg |
---|---|
http请求方式 | PUT |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | payReg |
param | String(Query) | 否 | 额外的系统参数;JSON字符串 |
3、请求示例
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/payReg";
String param = "&menuCode=payReg";
HttpPut put = new HttpPut(url + "?" + param);
put.addHeader("authorization", access_token);
put.addHeader("client_id", ClientID);
StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON);
entity.setContentEncoding("UTF-8");
put.setEntity(entity);
res = client.execute(put);
if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
if (json != null) {
recordId = json.getLongValue("recordId");
}
System.out.println(json);
}
put.releaseConnection();
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (res != null) {
res.close();
}
if (client != null) {
client.close();
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
Entity的JSON格式数据如下:
{
"payregdbt": {
"values": [
{
"curId": 1,
"rate": 1,
"domAmt": 200,
"accId": 22,
"amt": 200,
"chequeDate": "2022-04-15"
}
]
},
"payregt": {
"values": [
{
"lot": "A",
"curId": 1,
"rate": 1,
"domAmt": 200,
"invRate": 1,
"amt": 200,
"curDomAmt": 200,
"sTranType": "apTran",
"settleType": "invoice",
"sTranId": 135
}
]
},
"mainpayreg": {
"values": [
{
"beId": 1,
"tDate": "2022-04-15",
"curId": 1,
"AIType": "ven",
"rate": 1,
"virDeptId": 4,
"domAmt": 400,
"amt": 400,
"AIId": 14,
"staffId": 4
}
]
}
}
4、返回示例
{
"recordId": 182,
"messages": [],
"status": true
}
{
"recordId": 0,
"messages": [
{
"msgDetail": "必填项为空",
"msgCode": "core_101905"
}
],
"status": false
}
# 删除付款单
# 一、接口描述
用于删除付款单
# 二、接口调用说明
1、请求说明
URL | http://[server]/jsf/rfws/root/api/delete/payReg |
---|---|
http请求方式 | DELETE |
编码类型 | UTF-8 |
2、URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
authorization | String(Header) | 是 | OAuth获取的Access Token |
client_id | String(Header) | 是 | aiM18[授权应用列表]中的Client ID |
menuCode | String(Query) | 是 | payReg |
id | long(Query) | 是 | 付款单的id |
param | String(Query) | 否 | 额外的系统参数;JSON字符串 |
3、请求示例
CloseableHttpClient client = HttpClientBuilder.create().build();
CloseableHttpResponse res = null;
try {
String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/delete/payReg";
String param = "&menuCode=payReg&id=" + id;
HttpDelete delete = new HttpDelete(url + "?" + param);
delete.addHeader("authorization", access_token);
delete.addHeader("client_id", ClientID);
res = client.execute(delete);
if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity()));
System.out.println(json);
}
delete.releaseConnection();
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (res != null) {
res.close();
}
if (client != null) {
client.close();
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
4、返回示例
{
"messages": [],
"status": true
}
{
"messages": [
{
"msgDetail": "单据已被删除",
"msgCode": "core_101017"
}
],
"status": false
}