功能说明:查询当前选择的成本中心,科目,时间是否超过预算,用于费控提交校验
请求方式:POST(HTTPS)
请求地址:https://qwif.do1.com.cn/qwcgi/api/reimApiCtl/batchJudgeSubjectMoney.do
judgeSubjectMoney参数示例
[{
"centerId": "成本中心id",
"money": 1000.89,
"subjectParentsId": "科目分组id",
"subjId": "科目id",
"time": "2023-03-04"
}]
| 参数名 | 释义 | 类型 | 是否必须 | 描述 |
|---|---|---|---|---|
| token | 用于验证 | String | 是 | 参考获取token接口 |
| corpId | 公司唯一标识 | String | 是 | |
| judgeSubjectMoney | 报销超额参数 | DetermineParameterApiVO | 是 | |
| wxUserId | 提单人账号 | String | 是 | |
| refId | 外部系统报销单id | String | 否 | 新增时无需传递,为了精确计算,外部系统修改时务必传递 |
| 参数名 | 释义 | 类型 | 是否必须 | 描述 |
|---|---|---|---|---|
| subjId | 科目id | String | 是 | |
| money | 金额 | BigDecimal | 是 | |
| time | 报销时间 | String | 是 | yyyy-MM-dd或yyyy-MM-dd HH:mm:ss格式 |
| centerId | 成本中心id | String | 是 | |
| subjectParentsId | 一级科目id | String | 是 |
ReimApi api = QwSdkUtil.getInter(ReimApi.class);
DetermineParameterApiVO[] list = new DetermineParameterApiVO[1];
DetermineParameterApiVO vo = new DetermineParameterApiVO();
vo.setCenterId("成本中心id");
// 科目组id
vo.setSubjectParentsId("科目组id");
// 科目id
vo.setSubjId("科目id");
vo.setMoney(new BigDecimal("1000.00"));
vo.setTime("2023-04-21");
list[0] = vo;
BatchJudgeSubjectMoneyResult result = api.batchJudgeSubjectMoney(QwSdkUtil.getCacheToken(),list,"通讯录账号","外部系统报销单id");
System.out.println(JSONUtil.stringify(result));
{
"code":"0",
"data":
{
"limitBudgetList":
[
[
{
"dimension":"March",
"enabled":0,
"excessBudget":900,
"existBudget":true,
"existSubBudge":true,
"state":1,
"status":0,
"surplusBudget":0
}
]
],
"limitMoneyVO":
[
{
"enabled":0,
"limitCycle":1,
"limitMoney":"60",
"state":1,
"surplusMoney":"940.00",
"versionNumber":4
}
]
},
"desc":"成功"
}
| 参数名 | 释义 | 类型 | 是否必须 | 描述 |
|---|---|---|---|---|
| limitBudgetList | 预算检查列表 | LimitBudgetVO[][] | 否 | |
| limitMoneyVO | 预算列表 | LimitMoneyVO[] | 否 |
| 参数名 | 释义 | 类型 | 是否必须 | 描述 |
|---|---|---|---|---|
| surplusBudget | 可用预算 | BigDecimal | 是 | 剩余可用预算,单位为元 |
| excessBudget | 超出预算 | BigDecimal | 是 | 单位为元 |
| state | 是否超额 | Integer | 是 | 0:未超额 ,1:超额 |
| enabled | 是否可提交 | Integer | 是 | 0:可提交,1:不可提交 |
| dimension | 预算时间(维度) | String | 是 | January:1月 February:2月 March:3月 April:4月 May:5月 June:6月 July:7月 August:8月 September:9月 October:10月 November:11月 December:12月 first_season:第一季度 second_season:第二季度 third_season:第三季度 fourth_season:第四季度 year:年度 |
| existBudget | 是否存在预算 | Boolean | 是 | |
| status | 状态 | Integer | 是 | 0:启用 1:禁用 |
| existSubBudge | 是否存在预算 | Boolean | 是 |
| 参数名 | 释义 | 类型 | 是否必须 | 描述 |
|---|---|---|---|---|
| limitMoney | 限制金额 | BigDecimal | 否 | 不受规则控制或不超额时默认为空,单位为元 |
| limitCycle | 限制周期 | Integer | 是 | 0:无周期 1:每天 2:每周 3:每月 |
| state | 是否超额 | Integer | 是 | 0:未超额 1:超额 |
| enabled | 是否可提交 | Integer | 是 | 0:可提交 1:不可提交 |
| versionNumber | 报销科目版本号 | Integer | 否 | |
| surplusMoney | 超出金额 | BigDecimal | 是 | 单位为元 |