费用明细导入

接口描述

此接口用于导入费用明细。

请求URI

/api/openapi/invoice/import

请求方式

POST

请求体示例

{
  "email": "93512111200@function-test.com",
  "employeeId": "9980001",
  "companyCode": "Test001",
  "departmentCode": "001",
  "baseDate": "2024-05-21",
  "expenseTypeCode": "OpneAPI",
  "createDate": "2024-05-12",
  "expenseConsumptionTaxCode": "z010",
  "expensePriceTaxAmount": 1100,
  "comment": "テストの為",
  "applicationNumber": "TA00295787",
  "fieldDTOList": [
    {
      "fieldCode": "Text",
      "value": "AAA"
    },
    {
      "fieldCode": "Texts",
      "value": "BBBB bbbb"
    },
    {
      "fieldCode": "Time",
      "value": "2024-05-13 17:40:26"
    },
    {
      "fieldCode": "Date",
      "value": "2024-05-13"
    },
    {
      "fieldCode": "YearMonth",
      "value": "2024-05"
    },
    {
      "fieldCode": "Duration",
      "value": "2024-05-13;2024-05-14"
    },
    {
      "fieldCode": "Duration2",
      "value": "2024-02;2024-03"
    },
    {
      "fieldCode": "Integer",
      "value": "1000"
    },
    {
      "fieldCode": "Positive",
      "value": "2000"
    },
    {
      "fieldCode": "Float",
      "value": "33.44"
    },
    {
      "fieldCode": "Costcenter",
      "value": "1"
    },
    {
      "fieldCode": "ValueList",
      "value": "1"
    },
    {
      "fieldCode": "CustomTable",
      "value": "1"
    },
    {
      "fieldCode": "AccountName",
      "value": "15040"
    }
  ]
}

请求体字段

字段名 类型 必填 主键 约束 说明
email String 邮箱地址和工号,二者至少一个必填
邮箱地址有值,优先使用
费用归属人邮箱地址
employeeId String 费用归属人员工工号
companyCode String 费用归属人公司编码
departmentCode String 费用归属人部门编码
baseDate String 基准日期
expenseTypeCode String 费用类型编码
createDate String 发生日期
expenseConsumptionTaxCode String 消费税类别代码
expensePriceTaxAmount String 价税合计
comment String 事由
applicationNumber String 关联申请单编号
fieldDTOList Array 【支持导入的控件列表】 费用自定义控件list

fieldDTOList

字段名 类型 必填 主键 约束 说明
fieldCode String 控件编码
value String 控件値

接口返回示例

成功

{
  "message": "success",
  "key": "1679023007848440027"
}

失败示例

{
  "message": "参数:employeeId 不存在",
  "errorCode": "spd.26048.007"
}

字段说明

字段名称 类型 说明
message String 返回信息说明
errorCode String 返回错误码

错误代码

errorCode message 说明
120003 缺少必填项
spd.26048.002 参数:{0},日期格式不正确
spd.26048.003 参数:{0},不能输入数字以外的字符
spd.26048.006 参数:{0}格式错误
spd.26048.007 参数:{0}不存在
spd.26048.009 参数:{0},字数输入范围为{1}~{2}
spd.26048.012 参数:{0}的整数位数最多{1}位,小数位最多{2}位
spd.28190.002 {0}必须小于10,000,000,000,000
spd.28190.003 参数:{0},申请人无参照权限
spd.12819.0011 {0}不能小于0
spd.12819.0012 {0}不能等于0
spd.28015.001 参数:{0}、{1}至少有一个必填
spd.28015.002 该员工不存在公司编码{0}、部门编码{1}的岗位
spd.28015.003 参数:{0},该费用类型不支持OpenApi创建
spd.28015.004 参数:{0},单价*数量模式的费用类型,不支持OpenApi创建
spd.28015.005 参数:{0},没有配置默认消费税代码,请联系系统管理员
spd.28015.006 基准日期:{0}下申请人的岗位不存在
120001 当前操作需要租户权限