$params['dataid'], 'num' => $params['num'], 'project' => $params['project'], 'project_num' => $params['project_num'], 'apptime' => $params['apptime'], 'person' => $params['person'], 'number' => $params['number'], 'position' => $params['position'], 'tips' => $params['tips'], 'bidding_file' => $params['bidding_file'], 'zbkzj_file' => $params['zbkzj_file'], 'gczjht_file' => $params['gczjht_file'], 'xmbgqzzl_file' => $params['xmbgqzzl_file'], 'ssgsysjs_file' => $params['ssgsysjs_file'], 'wlhj_file' => $params['wlhj_file'], 'other_file' => $params['other_file'], ]); Db::commit(); return true; } catch (\Exception $e) { Db::rollback(); self::setError($e->getMessage()); return false; } } /** * @notes 编辑 * @param array $params * @return bool * @author likeadmin * @date 2024/02/23 09:21 */ public static function edit(array $params): bool { Db::startTrans(); try { DataReception::where('id', $params['id'])->update([ 'dataid' => $params['dataid'], 'num' => $params['num'], 'project' => $params['project'], 'project_num' => $params['project_num'], 'apptime' => $params['apptime'], 'person' => $params['person'], 'number' => $params['number'], 'position' => $params['position'], 'tips' => $params['tips'], 'bidding_file' => $params['bidding_file'], 'zbkzj_file' => $params['zbkzj_file'], 'gczjht_file' => $params['gczjht_file'], 'xmbgqzzl_file' => $params['xmbgqzzl_file'], 'ssgsysjs_file' => $params['ssgsysjs_file'], 'wlhj_file' => $params['wlhj_file'], 'other_file' => $params['other_file'], ]); Db::commit(); return true; } catch (\Exception $e) { Db::rollback(); self::setError($e->getMessage()); return false; } } /** * @notes 删除 * @param array $params * @return bool * @author likeadmin * @date 2024/02/23 09:21 */ public static function delete(array $params): bool { return DataReception::destroy($params['id']); } /** * @notes 获取详情 * @param $params * @return array * @author likeadmin * @date 2024/02/23 09:21 */ public static function detail($params): array { return DataReception::findOrEmpty($params['id'])->toArray(); } }