市电路灯系统


2.7 添加灯控(批量导入)

<h4>请求地址</h4> <ul> <li>正式环境: <a href="https://www.lampmind.com/api/lamp/batchInput">https://www.lampmind.com/api/lamp/batchInput</a></li> <li>测试环境: <a href="https://sd.solar-iot.com/api/lamp/batchInput">https://sd.solar-iot.com/api/lamp/batchInput</a></li> </ul> <h4>请求方法</h4> <p><strong>POST</strong></p> <h4>请求参数</h4> <table> <thead> <tr> <th>名称</th> <th>类型</th> <th>说明</th> <th>是否必须</th> </tr> </thead> <tbody> <tr> <td>username</td> <td>string</td> <td>用户名</td> <td>Y</td> </tr> <tr> <td>client_key</td> <td>string</td> <td>设备唯一码(imei)</td> <td>Y</td> </tr> <tr> <td>token</td> <td>string</td> <td>鉴权口令</td> <td>Y</td> </tr> <tr> <td>os</td> <td>string</td> <td>使用平台(0:PC, 1:iOS, 2:Android)</td> <td>Y</td> </tr> <tr> <td>file</td> <td>file</td> <td>导入文件</td> <td>N</td> </tr> <tr> <td>areaid</td> <td>int</td> <td>区域id</td> <td>Y</td> </tr> <tr> <td>sectionid</td> <td>int</td> <td>路段id</td> <td>Y</td> </tr> <tr> <td>type</td> <td>int</td> <td>1 验证,2 创建</td> <td>Y</td> </tr> <tr> <td>lampData</td> <td>array</td> <td>路灯列表([{&quot;number&quot;=&gt;&quot;123&quot;,&quot;address&quot;=&gt;&quot;4561&quot;,&quot;protocoltype&quot;=&gt;&quot;test&quot;,&quot;longitude&quot;=&gt;&quot;120.124512354&quot;,&quot;latitude&quot;=&gt;&quot;20.12351521&quot;}])</td> </tr> </tbody> </table> <h4>返回参数</h4> <table> <thead> <tr> <th>名称</th> <th>类型</th> <th>说明</th> <th>必须存在</th> </tr> </thead> <tbody> <tr> <td>status</td> <td>string</td> <td>返回码</td> <td>Y</td> </tr> <tr> <td>msg</td> <td>string</td> <td>返回信息</td> <td>Y</td> </tr> <tr> <td>data</td> <td>object</td> <td>结果数据</td> <td>Y</td> </tr> <tr> <td>验证</td> </tr> <tr> <td>lampData</td> <td>array</td> <td>路灯列表</td> <td>Y</td> </tr> <tr> <td>number</td> <td>string</td> <td>路灯编号</td> <td>Y</td> </tr> <tr> <td>address</td> <td>string</td> <td>无线模块地址</td> <td>Y</td> </tr> <tr> <td>protocoltype</td> <td>string</td> <td>协议内容</td> <td>Y</td> </tr> <tr> <td>areaid</td> <td>string</td> <td>区域</td> <td>Y</td> </tr> <tr> <td>sectionid</td> <td>string</td> <td>路段</td> <td>Y</td> </tr> <tr> <td>longitude</td> <td>string</td> <td>经度</td> <td>Y</td> </tr> <tr> <td>latitude</td> <td>string</td> <td>纬度</td> <td>Y</td> </tr> <tr> <td>msg</td> <td>array</td> <td>错误内容</td> <td>Y</td> </tr> </tbody> </table> <h4>返回内容实例</h4> <pre><code>{ "status":"0000", "msg":"操作成功", "data":{ "lampData":[ { "number":"01234", "address":"acd12451", "protocoltype":"test", "areaid":"福田区", "sectionid":"彩田路", "longitude"=&gt;"120.124512354", "latitude"=&gt;"20.12351521" } ], "msg":[ "test1", "test2", ] } }</code></pre>

页面列表

ITEM_HTML