商品
# 新增开票商品
请求路径:
`/openapi/item/add`
请求方法:
` POST`
接口参数:
|字段名|类型|必填|说明|
| ------------ | ------------ | ------------ |------------ |
|identifier|String| 是|唯一识别码|
|name|String| 是|商品名称|
|itemNo|String| 否|商品编号|
|taxTypeNo|String| 是|税收分类编码|
|taxTypeName|String| 是|税收分类名称|
|abbreviation|String| 是|简称|
|taxRate|String| 是|税率|
|discountIdentification|Integer| 是|优化政策标识(1:享受,2:不享受)|
|discountContent|String| 否|享受优化政策内容|
|taxFlag|Integer| 否|零税率标识 0[出口退税]、1[免税]、2[不征税]、3[普通0税率]|
|originalPrice|String| 否|单价(含税)|
|unit|String | 否|计量单位|
|specification|String| 否|规格型号|
|companyId|Long| 是|平台公司ID|
请求参数示例:
```json
{
"identifier":"112323",
"name":"燕麦",
"taxTypeNo":"1010101070000000000",
"taxTypeName":"燕麦",
"abbreviation":"谷物",
"taxRate":"6",
"discountIdentification":2,
"companyId":100000351
}
```
响应结果:
| 字段名 | 类型 | 说明 |
| ------------ | ------------ | ------------ |
| code | Integer | 处理结果 |
| message | String | 结果描述 |
| data | Object | 门店信息(ItemDTO) |
ItemDTO:
| 字段名 | 类型 | 说明 |
| ------------ | ------------ | ------------ |
| itemId | Long | 平台商品ID |
响应结果示例:
失败:
```json
{
"code": -1,
"message": "门店名称不能为空"
}
```
成功:
```json
{
"code": 0,
"data": "添加成功"
}
```
# 查询开票商品
请求路径:
`/openapi/item/get`
请求方法:
`GET`
接口参数:
| 字段名 | 类型 | 是否必填 | 说明 |
| ------------ | ------------ |------------ | ------------ |
| itemId | Long | 否 | 平台商品ID |
请求示例:
`/openapi/item/get?itemId=102313`
响应结果:
| 字段名 | 类型 | 说明 |
| ------------ | ------------ | ------------ |
| code | Integer | 处理结果 |
| message | String | 结果描述 |
| data | Object | 门店信息(ItemDTO) |
ItemDTO:
| 字段名 | 类型 | 说明 |
| ------------ | ------------ | ------------ |
|identifier|String|唯一识别码|
|itemName|String|商品名称|
|itemNo|String|商品编号|
|taxTypeNo|String|税收分类编码|
|taxTypeName|String|税收分类名称|
|abbreviation|String|简称|
|taxRate|String|税率|
|discountIdentification|Integer|优化政策标识(1:享受,2:不享受)|
|discountContent|String|享受优化政策内容|
|zeroReteIdentification|Integer|零税率标识|
|originalPrice|String|单价(含税)|
|unit|String|计量单位|
|specification|String|规格型号|
|companyId|Long|平台公司ID|
响应结果示例:
```json
失败:
{
"code": -1,
"message": "商品ID不存在"
}
成功:
{
"code": 0,
"message": "success",
"data":{
"itemId": 102313
"identifier":"112323",
"itemName":"燕麦",
"itemNo":"19123",
"taxTypeNo":"1010101070000000000",
"taxTypeName":"燕麦",
"abbreviation":"谷物",
"taxRate":"6",
"discountIdentification":2,
"discountContent":"",
"zeroReteIdentification":"",
"originalPrice":"10",
"unit":"克",
"specification":"袋",
"companyId":100000351
}
}
```
# 修改开票商品
请求路径:
`/openapi/item/update`
请求方法:
` POST`
接口参数:
|字段名|类型|是否必填|说明|
| ------------ | ------------ | ------------ |------------ |
|itemId|Long| 是|平台商品ID|
|identifier|String| 否|唯一识别码|
|itemName|String| 否|商品名称|
|itemNo|String| 否|商品编号|
|taxTypeNo|String| 否|税收分类编码|
|taxTypeName|String| 否|税收分类名称|
|abbreviation|String| 否|简称|
|taxRate|String| 否|税率|
|discountIdentification|Integer| 否|优化政策标识(1:享受,2:不享受)|
|discountContent|String| 否|享受优化政策内容|
|zeroReteIdentification|Integer | 否|零税率标识|
|originalPrice|String | 否|单价(含税)|
|unit|String| 否|计量单位|
|specification|String| 否|规格型号|
|companyId|Long| 否|平台公司ID|
请求参数示例:
```json
{
"itemId":102313
"identifier":"112323",
"itemName":"燕麦",
"itemNo":"19123",
"taxTypeNo":"1010101070000000000",
"taxTypeName":"燕麦",
"abbreviation":"谷物",
"taxRate":"6",
"discountIdentification":2,
"discountContent":"",
"zeroReteIdentification":"",
"originalPrice":"10",
"unit":"克",
"specification":"袋",
"companyId":100000351
}
```
响应结果:
| 字段名 | 类型 | 说明 |
| ------------ | ------------ | ------------ |
| code | Integer | 处理结果 |
| message | String | 结果描述 |
| data | Object | 修改结果 |
响应结果示例:
```json
失败:
{
"code": -1,
"message": "商品名称不能为空"
}
成功:
{
"code": 0,
"message": "success",
"data": "修改成功"
}
```
# 删除开票商品
请求路径:
`/openapi/item/delete`
请求方法:
`DELETE`
接口参数:
|字段名|类型|是否必填|说明|
| ------------ | ------------ | ------------ |------------ |
|itemId|Long| 是|平台商品ID|
请求示例:
`/openapi/store/delete?itemId=102313`
响应结果:
| 字段名 | 类型 | 说明 |
| ------------ | ------------ | ------------ |
| code | Integer | 处理结果 |
| message | String | 结果描述 |
| data | Object | 删除结果 |
响应结果示例:
```json
失败:
{
"code": -1,
"message": "商品ID不存在"
}
成功:
{
"code": 0,
"message": "success",
"data": "删除成功"
}
```