$params['project_id'], 'executor' => $params['executor'], 'contacts' => $params['contacts'], 'contact_information' => $params['contact_information'], 'project_role' => $params['project_role'], 'position' => $params['position'], 'follow_date' => strtotime($params['follow_date']), 'follow_type' => $params['follow_type'], 'theme' => $params['theme'], 'action_description' => $params['action_description'], 'project_assurance' => $params['project_assurance'], 'follow_status' => $params['follow_status'], 'follow_stage' => $params['follow_stage'], 'notes' => $params['notes'], 'next_follow_up_date' => strtotime($params['next_follow_up_date']), 'ceate_time' => $params['ceate_time'] ]); Db::commit(); return true; } catch (\Exception $e) { Db::rollback(); self::setError($e->getMessage()); return false; } } /** * @notes 编辑 * @param array $params * @return bool * @author likeadmin * @date 2023/11/14 10:49 */ public static function edit(array $params): bool { Db::startTrans(); try { ProjectFollowUp::where('id', $params['id'])->update([ 'project_id' => $params['project_id'], 'executor' => $params['executor'], 'contacts' => $params['contacts'], 'contact_information' => $params['contact_information'], 'project_role' => $params['project_role'], 'position' => $params['position'], 'follow_date' => strtotime($params['follow_date']), 'follow_type' => $params['follow_type'], 'theme' => $params['theme'], 'action_description' => $params['action_description'], 'project_assurance' => $params['project_assurance'], 'follow_status' => $params['follow_status'], 'follow_stage' => $params['follow_stage'], 'notes' => $params['notes'], 'next_follow_up_date' => strtotime($params['next_follow_up_date']), 'ceate_time' => $params['ceate_time'] ]); Db::commit(); return true; } catch (\Exception $e) { Db::rollback(); self::setError($e->getMessage()); return false; } } /** * @notes 删除 * @param array $params * @return bool * @author likeadmin * @date 2023/11/14 10:49 */ public static function delete(array $params): bool { return ProjectFollowUp::destroy($params['id']); } /** * @notes 获取详情 * @param $params * @return array * @author likeadmin * @date 2023/11/14 10:49 */ public static function detail($params): array { return ProjectFollowUp::findOrEmpty($params['id'])->toArray(); } }