Skip to content

创建巡检记录 API

PathMethodCreated At
/api/contracts/inspections/createPOST2025-11-29 00:39:11

Request

KeyRuleDescription
contract_idstring,size:24合同不存在
contentstring内容格式错误
start_datedate_format:Y-m-d H:i:s开始日期格式错误
end_datedate_format:Y-m-d H:i:s结束日期格式错误
frequencyin:Year,Month,Quarter巡检频率必须是年/月/季
statusin:Completed,NotCompleted状态必须是到期已巡检/到期未巡检
sales_idinteger,min:0销售不存在
inspector_idinteger,min:0巡检人员不存在
current_inspection_timedate_format:Y-m-d H:i:s本次巡检时间格式错误
next_inspection_timedate_format:Y-m-d H:i:s下次巡检时间格式错误
inspection_countinteger已巡检次数必须是整数
inspection_issuesstring巡检问题格式错误
customer_contactstring客户联系人格式错误
customer_phonestring客户联系电话格式错误
work_hoursnumeric工时必须是数值
is_completedApp\Rules\BoolRule是否完成格式错误
pending_issuesstring待处理问题格式错误
attachmentsarray附件必须是数组

Response

KeyTypeExampleComment
codeint0编号:0表示成功,非0表示错误
messagestringsuccess成功为 success, 失败则错误消息

TypeScript Result Example:

TypeScript
interface Result {
  /** 编号:0表示成功,非0表示错误 */
  code: number;
  /** 成功为 success, 失败则错误消息 */
  message: string;
}