$params['contract_id'], 'fee_application_id' => $params['fee_application_id'], 'theme' => $params['theme'], 'code' => $params['code'], 'bill_num' => $params['bill_num'], 'pay_type' => $params['pay_type'], 'content' => $params['content'], 'annex' => $params['annex'], 'create_user' => $params['create_user'], 'create_time' => $params['create_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 2024/03/28 14:45 */ public static function edit(array $params): bool { Db::startTrans(); try { FinancialExpenseReimbursement::where('id', $params['id'])->update([ 'contract_id' => $params['contract_id'], 'fee_application_id' => $params['fee_application_id'], 'theme' => $params['theme'], 'code' => $params['code'], 'bill_num' => $params['bill_num'], 'pay_type' => $params['pay_type'], 'content' => $params['content'], 'annex' => $params['annex'], 'create_user' => $params['create_user'], 'create_time' => $params['create_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 2024/03/28 14:45 */ public static function delete(array $params): bool { return FinancialExpenseReimbursement::destroy($params['id']); } /** * @notes 获取财务管理--费用报销单详情 * @param $params * @return array * @author likeadmin * @date 2024/03/28 14:45 */ public static function detail($params): array { return FinancialExpenseReimbursement::findOrEmpty($params['id'])->toArray(); } }