|
|
|
|
|
|
|
|
|
/****** Object: Table [dbo].[t_code_source] Script Date: 2021-09-30 8:27:17 ******/
|
|
|
|
|
SET ANSI_NULLS ON
|
|
|
|
|
GO
|
|
|
|
|
|
|
|
|
|
SET QUOTED_IDENTIFIER ON
|
|
|
|
|
GO
|
|
|
|
|
|
|
|
|
|
CREATE TABLE [dbo].[t_code_filetype](
|
|
|
|
|
[<EFBFBD><EFBFBD><EFBFBD><EFBFBD>] [varchar](2) NOT NULL,
|
|
|
|
|
[<EFBFBD>ļ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>] [varchar](8) NOT NULL,
|
|
|
|
|
[<EFBFBD>Ƿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>] [bit] NULL,
|
|
|
|
|
CONSTRAINT [PK_t_code_filetype] PRIMARY KEY CLUSTERED
|
|
|
|
|
(
|
|
|
|
|
[<EFBFBD><EFBFBD><EFBFBD><EFBFBD>] ASC
|
|
|
|
|
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
|
|
|
|
) ON [PRIMARY]
|
|
|
|
|
GO
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
insert t_sys_code(Ȩ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>,һ<EFBFBD><EFBFBD>ģ<EFBFBD><EFBFBD>,<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģ<EFBFBD><EFBFBD>,Ȩ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)
|
|
|
|
|
values(617,'<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ҵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ҵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','<EFBFBD>ĵ<EFBFBD><EFBFBD>ӵ<EFBFBD><EFBFBD><EFBFBD>')
|
|
|
|
|
|
|
|
|
|
insert t_sys_code_emp (Ȩ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>,һ<EFBFBD><EFBFBD>ģ<EFBFBD><EFBFBD>,<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģ<EFBFBD><EFBFBD>,Ȩ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<EFBFBD><EFBFBD>Ա,<EFBFBD>Ƿ<EFBFBD><EFBFBD>ɲ<EFBFBD><EFBFBD><EFBFBD>)
|
|
|
|
|
select 617,'<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ҵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ҵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','<EFBFBD>ĵ<EFBFBD><EFBFBD>ӵ<EFBFBD><EFBFBD><EFBFBD>',<EFBFBD><EFBFBD><EFBFBD><EFBFBD>,0
|
|
|
|
|
from t_sys_employee
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
declare @vs_DocType varchar(50)
|
|
|
|
|
|
|
|
|
|
declare CurPlu cursor for
|
|
|
|
|
select <EFBFBD>ļ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> from t_code_filetype where <EFBFBD>Ƿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=1
|
|
|
|
|
|
|
|
|
|
open CurPlu
|
|
|
|
|
fetch next from CurPlu into @vs_DocType
|
|
|
|
|
while @@Fetch_Status=0
|
|
|
|
|
begin
|
|
|
|
|
|
|
|
|
|
update t_op_seae set <EFBFBD>۵<EFBFBD>״̬='<EFBFBD>۵<EFBFBD>' from t_op_seae b where datediff(day,b.<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,getdate())=7
|
|
|
|
|
and not EXISTS (select 1 from Receipt_Doc d where d.bsno=b.<EFBFBD><EFBFBD><EFBFBD><EFBFBD> and RECEIPTTYPE=@vs_DocType)
|
|
|
|
|
fetch next from CurPlu into @vs_DocType
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
close CurPlu
|
|
|
|
|
dealLocate CurPlu
|