冷链需求评审
需求一:添加作业单时,收费标准设为可修改
在 details 中添加 unit_price 字段在 details 中添加 unit_price 字段
接口名
/business/additional_task/submit
Method
POST
请求
id M string 作业单号
operate_date M datetime 作业日期
type M int 作业单类型(1:入库;2:出库;3:其他)
remark O string 备注
stock_io_receipt_id C string 绑定的出入库单号
handwriting_id O string 手写单号
details M list 作业单信息
fee_id M int 费用ID
real_count M int 实际数量
unit_price M int 收费标准 # 新增
follower_id M int 跟进人ID
remark M string 备注
响应
code M int 返回码,0表示成功,其他表示错误
msg M string 错误信息
data M string 空
示例
request
127.0.0.1:8888/business/additional_task/submit
form-data
id: ZY00001
operate_date: 2016-08-05
type: 1
"stock_io_receipt_id": "RK00129"
details:[{"fee_id":"1","real_count":100,"follower_id":20,"remark":"WD205"}]
response
{
"msg": "ok",
"code": 0,
"data": ""
}
需求二:出库/入库页面查询功能搜索项添加批号和批次号
接口名
/business/stock_out
Method
GET
请求
start_date M datetime 开始查询日期
end_date M datetime 结束查询日期
date_type M string 查询日期类型('operate_date'或'create_time')
offset O int 分页缩进,默认0
limit O int 分页每页数量,默认10
status O int 出库单状态(1:待提交;2:待审核;3:审核通过;4:审核未通过;5:已冲销)
query_data O string 查询内容,支持客户ID(K001或者1)和出库单号(CK001)
响应
code M int 返回码,0表示成功,其他表示错误
msg M string 错误信息
data M string 返回json数据
[
{
"status" M 出库单状态码(1:待提交;2:待审核;3:审核通过;4:审核未通过;5:已冲销)
"customer_cellphone" M 客户手机号
"customer_name" M 客户名
"create_time" M 'YYYY-MM-DD' 出库单创建时间
"id" M 出库单ID
"operate_date" M 'YYYY-MM-DD' 出库时间
"customer_id" M 客户ID
"out_count" M 出库件数
}
]
query_data 里添加 [批号,批次号] 这两种查询方法,接口不变
需求三:私库设置到期提醒
返回结果按照到期时间升序排列,同时接口里添加一个字段 is_soon
接口名
/finance/contract
Method
GET
请求
query_data O string 查询内容,支持客户ID(K001或者1)和合同ID
offset O int 分页缩进,默认0
limit O int 分页每页数量,默认10
响应
code M int 返回码,0表示成功,其他表示错误
msg M string 错误信息
data M string 返回json数据
[
{
"id" M string 合同号
"customer_id" M string 客户ID
"customer_name" M string 客户名
"is_active" M bool 是否激活
"type" M int 合同类型(1:公库;2:私库)
"is_soon" M bool 到期时间是否小于 15 天 # 新增
}
]
需求四:结算明细单添加计算方式
接口里新增 计算方式 calculate_method 字段
接口名
/finance/bill/detail
Method
GET
请求
id M string 结款单ID
响应
code M int 返回码,0表示成功,其他表示错误
msg M string 错误信息
data M string 返回json数据
"should_pay" M float 应付金额
"freeze_fees": [{ O list 冷藏费
"days" M int 计费天数
"name" M string 商品名
"charge_count" M float 计费数量
"batch_id" M string 批次号
"contract_id" M string 合同ID # 合同单号
"unit_price" M float 单价
"real_count" M float 实际数量
"start_date" M datetime 开始日期
"unit_name" M string 单位 # 计算单位
"calculate_method" M string 计算方式 # 计算方式,中文字符串 # 新增
"should_pay" M float 应付金额
"end_date" M datetime 截止日期
}],
...
需求六:公库替换合同时可选开始计费时间
添加 start_date 字段
接口名
finance/contract/replace
Method
POST
请求
"old_id" M string 被替换掉的合同ID
"new_id" M string 新的合同ID
"start_date" M datetime 生效开始日期 # 新增
响应
code M int 返回码,0表示成功,其他表示错误
msg M string 错误信息
data M string 无