| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176 | 
							- using OASystem.Domain.Entities.Resource;
 
- using SqlSugar;
 
- var db = new SqlSugarClient(new ConnectionConfig()
 
- {
 
-     ConnectionString = "server=132.232.92.186;uid=sa;pwd=Yjx@158291;database=OA2023DB;Encrypt=True;TrustServerCertificate=True;",
 
-     DbType = DbType.SqlServer,
 
-     IsAutoCloseConnection = true,
 
-     InitKeyType = InitKeyType.Attribute
 
- },
 
-     provider =>
 
-     {
 
-         provider.Aop.OnLogExecuting = (sql, pars) =>
 
-         {
 
-             Console.WriteLine(sql); // 输出生成的 SQL
 
-         };
 
-     });
 
- #region Aop
 
- //db.Aop.OnLogExecuting = (sql, pars) =>
 
- //{
 
- //    Console.WriteLine(sql + "" + Db.Utilities.SerializeObject
 
- //        (pars.ToDictionary(it => it.ParameterName, it => it.Value)));
 
- //    Console.WriteLine();
 
- //}; 
 
- #endregion
 
- #region 对话框
 
- Console.WriteLine("是否确定同步数据库表结构?(同名数据表将会被备份,生产环境慎用,回车确认)");
 
- var str = Console.ReadKey();
 
- if (str.Key == ConsoleKey.Enter)
 
- {
 
-     Console.WriteLine("同步中,请稍后...");
 
- }
 
- else
 
- {
 
-     Console.WriteLine("\r\n输入错误,已退出...");
 
-     return;
 
- }
 
- #endregion
 
- //同步数据表结构
 
- db.DbMaintenance.CreateDatabase();
 
- db.CodeFirst.SetStringDefaultLength(50).BackupTable().InitTables(new Type[]
 
- {
 
-     //typeof(Sys_PageFunctionPermission)
 
-     //,typeof(Sys_SystemMenuAndFunction)
 
-     //,typeof(Sys_SystemMenuPermission)
 
-     //,typeof(Sys_JobPostAuthority)
 
-     //,typeof(Sys_UserAuthority)
 
-     //typeof(Crm_CustomerCert),
 
-     //typeof(Crm_CustomerCompany),
 
-     //typeof(Crm_CustomerFile),
 
-     //typeof(Crm_DeleClient)
 
-     //typeof(Crm_VisaCustomerCompany),
 
-     //typeof(Crm_VisaCustomerFamily),
 
-     //typeof(Crm_VisaCustomerSchool)
 
-     //typeof(Grp_AirInquiry),
 
-     //typeof(Grp_AirPrice),
 
-     //typeof(Grp_CreditCardPayment),
 
-     //typeof(Grp_DeleFile),
 
-     //typeof(Grp_DelegationInfo),
 
-     //typeof(Grp_DelegationJoinCustomer),
 
-     //typeof(Grp_DeleMeetingNeeds),
 
-     //typeof(Grp_HotelReservations),
 
-     //typeof(Grp_VisaProgress),
 
-     //typeof(Grp_DeleClientNeeds),
 
-     //typeof(Res_AirCompany),
 
-     //typeof(Res_AirTicketAgent),
 
-     //typeof(Res_HotelData),
 
-     //typeof(Res_ThreeCode)
 
-     //typeof(Res_ScenicSpotInfo),
 
-     //typeof(Res_CarGuides),
 
-     //typeof(Res_CarInfo),
 
-     //typeof(Res_GuidesInfo)
 
-     //typeof(Res_CarData),
 
-     //typeof(Res_LocalGuideData)
 
-     //typeof(Grp_ScheduleInfo),
 
-     //typeof(Grp_ScheduleDetailInfo),
 
-     //typeof(Grp_SchedulePersonInfo)
 
-     //typeof(Sys_Message),
 
-     //typeof(Sys_MessageReadAuth)
 
-     //typeof(Crm_DeleClient)
 
-     //typeof(Crm_NewClientData)
 
-     //typeof(Crm_ClientDataAndUser),
 
-     //typeof(Crm_ClientDataAndBusiness),
 
-     //typeof(Res_ItemDetailInfo),
 
-     //typeof(Res_ItemVendor)
 
-     //typeof(Res_ItemTypeInfo)
 
-     //typeof(Bus_ConfItemInfo)
 
-     //typeof(Bus_ConfItemListInfo)
 
-     //typeof(Res_CountryFeeCost)
 
-     //typeof(Res_MemoInfo),
 
-     //typeof(Fin_DailyFeePayment),       // 财务 - 日付申请
 
-     //typeof(Fin_DailyFeePaymentContent),// 财务 - 日付申请详细类
 
-     //typeof(Grp_GroupsTaskAssignment),
 
-     //typeof(Grp_AirTicketReservations),
 
-     //typeof(Grp_GroupCostParameter),
 
-     //typeof(Grp_TeamRate),              // 团组汇率
 
-     //typeof(Fin_ForeignReceivables),    // 对外收款账单
 
-     //typeof(Fin_ProceedsReceived),      // 已收款项
 
-     //typeof(Fin_OtherPrice),            // 其他款项
 
-     //typeof(Res_OfficialActivities)     //公务出访
 
-     //typeof(Res_AskData),//请示数据库
 
-     //typeof(Grp_DelegationEnData),
 
-     //typeof(Grp_EnterExitCost),
 
-     //typeof(Grp_DayAndCost), 
 
-     //typeof(Grp_NationalTravelFee),
 
-     //typeof(Air_TicketBlackCode),
 
-     //typeof(Pm_WageSheet)       //人事模块 工资表单
 
-     //typeof(Grp_VisaProgressCustomer),
 
-     //typeof(Grp_VisaProgressCustomerPicture)
 
-     //typeof(Grp_CheckBoxs)  //成本选中
 
-     //typeof(Grp_GroupCost) //成本数据信息
 
-     //typeof(Grp_CostTypeHotelNumber)//分段房间数量
 
-     //typeof(Grp_VisaInfo)
 
-     //typeof(Grp_CarTouristGuideGroundReservations),
 
-     //typeof(Grp_CarTouristGuideGroundReservationsContent),//
 
-     //typeof(Fin_PaymentRefundAndOtherMoney),
 
-     //typeof(Grp_InsuranceCost),
 
-     //typeof(Grp_TourClientList), //接团客户名单
 
-     //typeof(Dis_Intercontinental), //洲
 
-     //typeof(Dis_Country), //国家
 
-     //typeof(Dis_City), //城市 
 
-     //typeof(Fin_GroupExtraCost), //超支费用 
 
-     //typeof(Pm_TaskAllocation), //任务分配 
 
-     //typeof(Pm_TaskRelevanceUser), //任务分配关联人员(完成者) 
 
-     //typeof(Pm_TaskJobRelevancy), //任务分配关联人员(完成者) 
 
-     //typeof(Crm_TableOperationRecord), //表操作记录 
 
-     //typeof(Grp_InvertedList), //倒推表 
 
-     //typeof(Grp_InvertedListVisaCountry), //倒推表签证国家 
 
-     //typeof(Grp_VisaFeeInfo),  //签证费用info 
 
-     //typeof(Grp_HotelInquiry),  //酒店询价 
 
-     //typeof(Grp_HotelReservationsContent),  //酒店费用子表
 
-     //typeof(Grp_VisitingClients),  //拜访团组客户
 
-     //typeof(Grp_ApprovalTravelDetails),  //公务出访表
 
-     //typeof(Sys_Countries),  //洲
 
-     //typeof(Sys_Continent),  //国家
 
-     //typeof(Sys_Cities),  //城市
 
-     //typeof(Grp_GroupModelFile),//团组文件 
 
-     //typeof(Grp_VisaCommission),//签证费用录入 
 
-     //typeof(Pm_GoodsReceive),//物品领用表 
 
-     //typeof(Pm_GoodsStorage),//物品入库表 
 
-     //typeof(Pm_GoodsInfo),//物品详细表 
 
-     //typeof(Grp_Opinionaire),//团组接待意见调查 
 
-     //typeof(Sys_ExchangeRateRecord),//团组接待意见调查 
 
-     //typeof(Res_TranslatorLibrary),//翻译人员库 
 
-     //typeof(Grp_OfficialDutyLinkTranslator),//公务信息关联翻译人员 
 
-     //typeof(Sys_DeviceToken),
 
-     //typeof(Res_MediaSuppliers),//策划部供应商资料 
 
-     //typeof(Res_BasicInsuranceCost)//保险国家基础费用 
 
-     //typeof(Grp_EnterExitCostPermission),//团组 - 出入境费用 --> 操作权限
 
-     //typeof(Grp_EnterExitCostDraftPermission)//团组 - 出入境费用 --> 操作权限-草稿
 
-     //typeof(Grp_RestaurantInfo),
 
-     //ypeof(Grp_EnterExitCostQuote), //团组 - 出入境费用报价表
 
-     //ypeof(Grp_EnterExitCostQuoteItem), //团组 - 出入境费用报价表
 
-     //typeof(Sys_FormTemp), //表单模板
 
-     //typeof(Grp_OrderPreInfo), //团组下单前信息
 
-     //typeof(Grp_OrderPreItem), //团组下单前信息Item
 
-     //typeof(Grp_GroupShareFile),//团组共享文件 
 
-     //typeof(Pm_GoodsAudit),//物品确认审核表 
 
-     
 
-     //typeof(Pm_GoodsReceiveDetails),//物品领用明细表 
 
-     /*审核流程相关表*/
 
-     //typeof(Sys_AuditFlow),//审核流程表 
 
-     //typeof(Sys_AuditRecord),//审核记录表 
 
-     //typeof(Sys_AuditTemplate),//审核模板表 
 
-     //typeof(Sys_AuditTemplateNode),//审核模板节点表 
 
-     //typeof(Sys_AuditTemplateNodeUser),//审核模板节点人员表 
 
-     //typeof(Fin_ApplicationLinkGoods),//日服申请单物品关联表 
 
-     //typeof(Grp_GamesBudgetMaster),//世运会成本预算明细 
 
-     typeof(Res_VisaFeeStandard),//签证费用标准 
 
-     typeof(Res_VisaFeeStandardDetails),//签证费用标准详情 
 
- });
 
- Console.WriteLine("数据库结构同步完成!");
 
 
  |