ÿþUSE [ECTEST]

GO

SET IDENTITY_INSERT [dbo].[Sys_Dictionary] ON 



INSERT [dbo].[Sys_Dictionary] ([Keyid], [Name], [DicType], [LastUpdateTime], [Operator], [Remark], [MeanValue]) VALUES (453, N'gÓ~', N'ØN>köeô', CAST(N'2021-03-30T10:54:30.820' AS DateTime), N'¡{tXT', N'', 1)

INSERT [dbo].[Sys_Dictionary] ([Keyid], [Name], [DicType], [LastUpdateTime], [Operator], [Remark], [MeanValue]) VALUES (454, N'c[Ó~', N'ØN>köeô', CAST(N'2021-03-30T10:55:02.610' AS DateTime), N'¡{tXT', N'', 2)

INSERT [dbo].[Sys_Dictionary] ([Keyid], [Name], [DicType], [LastUpdateTime], [Operator], [Remark], [MeanValue]) VALUES (455, N'JSt^Ó~', N'ØN>köeô', CAST(N'2021-03-30T10:55:09.410' AS DateTime), N'¡{tXT', N'', 3)

INSERT [dbo].[Sys_Dictionary] ([Keyid], [Name], [DicType], [LastUpdateTime], [Operator], [Remark], [MeanValue]) VALUES (456, N't^Ó~', N'ØN>köeô', CAST(N'2021-03-30T10:55:14.627' AS DateTime), N'¡{tXT', N'', 4)

INSERT [dbo].[Sys_Dictionary] ([Keyid], [Name], [DicType], [LastUpdateTime], [Operator], [Remark], [MeanValue]) VALUES (457, N'f[gÓ~', N'ØN>köeô', CAST(N'2021-03-30T10:55:19.763' AS DateTime), N'¡{tXT', N'', 5)

INSERT [dbo].[Sys_Dictionary] ([Keyid], [Name], [DicType], [LastUpdateTime], [Operator], [Remark], [MeanValue]) VALUES (458, N'e\¦~[ÕkÓ~', N'ØN>köeô', CAST(N'2021-03-30T10:55:25.100' AS DateTime), N'¡{tXT', N'', 6)

INSERT [dbo].[Sys_Dictionary] ([Keyid], [Name], [DicType], [LastUpdateTime], [Operator], [Remark], [MeanValue]) VALUES (459, N'¤N'Tx)YÓ~', N'ØN>köeô', CAST(N'2021-03-30T10:55:40.610' AS DateTime), N'¡{tXT', N'', 7)

SET IDENTITY_INSERT [dbo].[Sys_Dictionary] OFF

GO



 alter table OA_CorporateClients add Paytime int  default 1 

 

  alter table OA_CorporateClients add Paydays int  default 0



  update OA_CorporateClients set Paytime=0 

   update OA_CorporateClients set Paydays=0









   USE [ECTEST]

GO

/****** Object:  StoredProcedure [dbo].[sp_OA_CorporateClients_Insert]    Script Date: 2021/3/30 15:12:28 ******/

SET ANSI_NULLS ON

GO

SET QUOTED_IDENTIFIER ON

GO



-- ==========================================================================================

-- Entity Name:	sp_OA_CorporateClients_Insert

-- Author:	cyin

-- Create date:	2013/8/21 10:00:38

-- Description:	This stored procedure is intended for inserting values to OA_CorporateClients table

-- ==========================================================================================

ALTER Procedure [dbo].[sp_OA_CorporateClients_Insert]

	@Keyid uniqueidentifier,

	@FirmId uniqueidentifier,

	@CustomerId int,

	@CompanyName varchar(50),

	@CustomerIndustriesId int,

	@CustomerTypeId int,

	@SourcesInfoId int,

	@DegreeImportanId int,

	@AccountManagerId int,

	@BusinessManagerId int,

	@CreateTime datetime,

	@CreditId int,

	@LoginPhone varchar(20),

	@LoginPwd varchar(20),

	@CorporateWebsite varchar(50),

	@BusinessAnalysisId int,

	@Credit money,

	@IsLoginCorporateWeb bit,

	@Bank varchar(50),

	@TaxID varchar(50),

	@AccountID varchar(50),

	@OrderCount int,

	@OrderMoney money,

	@LastOrderTime datetime,

	@Prepayments money,

	@IsOutsourcing bit,

	@OutVendorName varchar(50),

	@IsPriority bit,

	@CumulativePrepayments money,

	@LastUpdateTime datetime,

	@Operator varchar(20),

	@Remark varchar(200),

	@InquiryId uniqueidentifier,

	@MemberId uniqueidentifier,

	@OutRate float,

	@Paytime int,

	@Paydays int

As

Begin

	Insert Into OA_CorporateClients

		([Keyid],[FirmId],[CustomerId],[CompanyName],[CustomerIndustriesId],[CustomerTypeId],[SourcesInfoId],[DegreeImportanId],[AccountManagerId],[BusinessManagerId],[CreateTime],[CreditId],[LoginPhone],[LoginPwd],[CorporateWebsite],[BusinessAnalysisId],[Credit],[IsLoginCorporateWeb],[Bank],[TaxID],[AccountID],[OrderCount],[OrderMoney],[LastOrderTime],[Prepayments],[IsOutsourcing],[OutVendorName],[IsPriority],[CumulativePrepayments],[LastUpdateTime],[Operator],[Remark],[InquiryId],[MemberId],[OutRate],[Paytime],[Paydays])

	Values

		(@Keyid,@FirmId,@CustomerId,@CompanyName,@CustomerIndustriesId,@CustomerTypeId,@SourcesInfoId,@DegreeImportanId,@AccountManagerId,@BusinessManagerId,@CreateTime,@CreditId,@LoginPhone,@LoginPwd,@CorporateWebsite,@BusinessAnalysisId,@Credit,@IsLoginCorporateWeb,@Bank,@TaxID,@AccountID,@OrderCount,@OrderMoney,@LastOrderTime,@Prepayments,@IsOutsourcing,@OutVendorName,@IsPriority,@CumulativePrepayments,@LastUpdateTime,@Operator,@Remark,@InquiryId,@MemberId,@OutRate,@Paytime,@Paydays)



End







USE [ECTEST]

GO

/****** Object:  StoredProcedure [dbo].[sp_OA_CorporateClients_Update]    Script Date: 2021/3/30 15:14:40 ******/

SET ANSI_NULLS ON

GO

SET QUOTED_IDENTIFIER ON

GO



-- ==========================================================================================

-- Entity Name:	sp_OA_CorporateClients_Update

-- Author:	cyin

-- Create date:	2013/8/21 10:00:38

-- Description:	This stored procedure is intended for updating OA_CorporateClients table

-- ==========================================================================================

ALTER Procedure [dbo].[sp_OA_CorporateClients_Update]

	@Keyid uniqueidentifier,

	@FirmId uniqueidentifier,

	@CustomerId int,

	@CompanyName varchar(50),

	@CustomerIndustriesId int,

	@CustomerTypeId int,

	@SourcesInfoId int,

	@DegreeImportanId int,

	@AccountManagerId int,

	@BusinessManagerId int,

	@CreateTime datetime,

	@CreditId int,

	@LoginPhone varchar(20),

	@LoginPwd varchar(20),

	@CorporateWebsite varchar(50),

	@BusinessAnalysisId int,

	@Credit money,

	@IsLoginCorporateWeb bit,

	@Bank varchar(50),

	@TaxID varchar(50),

	@AccountID varchar(50),

	@OrderCount int,

	@OrderMoney money,

	@LastOrderTime datetime,

	@Prepayments money,

	@IsOutsourcing bit,

	@OutVendorName varchar(50),

	@IsPriority bit,

	@CumulativePrepayments money,

	@LastUpdateTime datetime,

	@Operator varchar(20),

	@Remark varchar(200),

	@InquiryId uniqueidentifier,

	@MemberId uniqueidentifier,

	@OutRate float,

	@Paytime int,

	@Paydays int

As

Begin

	Update OA_CorporateClients

	Set

		[FirmId] = @FirmId,

		[CustomerId] = @CustomerId,

		[CompanyName] = @CompanyName,

		[CustomerIndustriesId] = @CustomerIndustriesId,

		[CustomerTypeId] = @CustomerTypeId,

		[SourcesInfoId] = @SourcesInfoId,

		[DegreeImportanId] = @DegreeImportanId,

		[AccountManagerId] = @AccountManagerId,

		[BusinessManagerId] = @BusinessManagerId,

		[CreateTime] = @CreateTime,

		[CreditId] = @CreditId,

		[LoginPhone] = @LoginPhone,

		[LoginPwd] = @LoginPwd,

		[CorporateWebsite] = @CorporateWebsite,

		[BusinessAnalysisId] = @BusinessAnalysisId,

		[Credit] = @Credit,

		[IsLoginCorporateWeb] = @IsLoginCorporateWeb,

		[Bank] = @Bank,

		[TaxID] = @TaxID,

		[AccountID] = @AccountID,

		[OrderCount] = @OrderCount,

		[OrderMoney] = @OrderMoney,

		[LastOrderTime] = @LastOrderTime,

		[Prepayments] = @Prepayments,

		[IsOutsourcing] = @IsOutsourcing,

		[OutVendorName] = @OutVendorName,

		[IsPriority] = @IsPriority,

		[CumulativePrepayments] = @CumulativePrepayments,

		[LastUpdateTime] = @LastUpdateTime,

		[Operator] = @Operator,

		[Remark] = @Remark,

		[InquiryId] = @InquiryId,

		[MemberId] = @MemberId,

		[OutRate] = @OutRate,

		[Paytime] = @Paytime,

		[Paydays] = @Paydays

	Where		

		[Keyid] = @Keyid



End



