开始核查(生成工单)
<h2>开始核查(生成工单)</h2>
<h3>接口描述</h3>
<p>该接口用于核查人员进入房间后点击核查按钮,请求后端生成工单,之后在当前页面上的核查操作都需要带上工单id。</p>
<h3>请求方式</h3>
<p>POST</p>
<h3>请求地址</h3>
<p><code>/nrl/api/workOrder/create</code></p>
<h3>请求参数</h3>
<ul>
<li><font color='red'>header需要带授权X-Token</font></li>
</ul>
<table>
<thead>
<tr>
<th>参数名</th>
<th>参数类型</th>
<th>是否必填</th>
<th>参数描述</th>
</tr>
</thead>
<tbody>
<tr>
<td>userId</td>
<td>int</td>
<td>是</td>
<td>用户ID</td>
</tr>
<tr>
<td>roomId</td>
<td>int</td>
<td>是</td>
<td>房间ID</td>
</tr>
</tbody>
</table>
<h3>响应参数</h3>
<table>
<thead>
<tr>
<th>参数名</th>
<th>参数类型</th>
<th>参数描述</th>
</tr>
</thead>
<tbody>
<tr>
<td>workOrderNo</td>
<td>string</td>
<td>工单号</td>
</tr>
</tbody>
</table>
<h3>响应示例</h3>
<pre><code class="language-json">{
&quot;code&quot;: 200,
&quot;message&quot;: &quot;操作成功&quot;,
&quot;data&quot;: {
&quot;workOrderNo&quot;: &quot;2023090611234501&quot;
}
}</code></pre>
<h3>错误码</h3>
<table>
<thead>
<tr>
<th>错误码</th>
<th>错误信息</th>
</tr>
</thead>
<tbody>
<tr>
<td>500</td>
<td>操作失败</td>
</tr>
<tr>
<td>401</td>
<td>暂未登录或token已经过期</td>
</tr>
<tr>
<td>403</td>
<td>没有相关权限</td>
</tr>
<tr>
<td>404</td>
<td>参数检验失败</td>
</tr>
</tbody>
</table>