Appearance
更新巡检记录 API
| Path | Method | Created At |
|---|---|---|
| /api/contracts/inspections/ | PUT | 2025-11-29 00:39:11 |
Request
| Key | Rule | Description |
|---|---|---|
| id | string,size:24 | 巡检记录不存在 |
| contract_id | string,size:24 | 合同不存在 |
| content | string | 内容格式错误 |
| start_date | date_format:Y-m-d H:i:s | 开始日期格式错误 |
| end_date | date_format:Y-m-d H:i:s | 结束日期格式错误 |
| frequency | in:Year,Month,Quarter | 巡检频率必须是年/月/季 |
| status | in:Completed,NotCompleted | 状态必须是到期已巡检/到期未巡检 |
| sales_id | integer,min:0 | 销售不存在 |
| inspector_id | integer,min:0 | 巡检人员不存在 |
| current_inspection_time | date_format:Y-m-d H:i:s | 本次巡检时间格式错误 |
| next_inspection_time | date_format:Y-m-d H:i:s | 下次巡检时间格式错误 |
| inspection_count | integer | 已巡检次数必须是整数 |
| inspection_issues | string | 巡检问题格式错误 |
| customer_contact | string | 客户联系人格式错误 |
| customer_phone | string | 客户联系电话格式错误 |
| work_hours | numeric | 工时必须是数值 |
| is_completed | App\Rules\BoolRule | 是否完成格式错误 |
| pending_issues | string | 待处理问题格式错误 |
| attachments | array | 附件必须是数组 |
Response
| Key | Type | Example | Comment |
|---|---|---|---|
| code | int | 0 | 编号:0表示成功,非0表示错误 |
| message | string | success | 成功为 success, 失败则错误消息 |
TypeScript Result Example:
TypeScript
interface Result {
/** 编号:0表示成功,非0表示错误 */
code: number;
/** 成功为 success, 失败则错误消息 */
message: string;
}