|
@@ -5,25 +5,33 @@
|
|
|
* @Author: likang
|
|
|
* @Date: 2022-06-09 16:27:35
|
|
|
* @LastEditors: likang
|
|
|
- * @LastEditTime: 2022-06-09 16:38:19
|
|
|
+ * @LastEditTime: 2022-06-09 19:09:54
|
|
|
*/
|
|
|
|
|
|
namespace catchAdmin\api\controller;
|
|
|
|
|
|
+use catchAdmin\worklocation\model\Worklocation;
|
|
|
use catcher\base\CatchRequest as Request;
|
|
|
use catcher\CatchResponse;
|
|
|
use catcher\base\CatchController;
|
|
|
-class MaintenanceRecord extends CatchController
|
|
|
+use think\facade\Db;
|
|
|
+
|
|
|
+class MaintenanceRecord extends Base
|
|
|
{
|
|
|
/**
|
|
|
- * @Descripttion: 接收维保记录
|
|
|
+ * @Descripttion: 接收维保记录
|
|
|
+ * 维保记录可能是多条数据
|
|
|
* @name: likang
|
|
|
* @return {*}
|
|
|
*/
|
|
|
- public function getMaintenanceRecord()
|
|
|
+ public function SaveMaintenanceRecord()
|
|
|
{
|
|
|
- $data = $_GET['data'];
|
|
|
-
|
|
|
+ $data = json_decode($_POST['data'],true);
|
|
|
+ foreach($data as $item)
|
|
|
+ {
|
|
|
+
|
|
|
+ Db::name('work_location')->data($item)->install();
|
|
|
+ }
|
|
|
|
|
|
}
|
|
|
|