/****** 查找案件信息———————注意案件信息一定需要在卷宗系统中存在 ******/
SELECT TOP 1000 *
FROM [Ldt_JudgeDoc].[dbo].[CS_Case] where CaseID = '3895846254264975360' or CaseCode='(2021)鲁1602民初15号'
/****** 获取存在证据材料案件 ******/
SELECT TOP 1000 *
FROM [LDT_FileManage].[dbo].[FM_Dossier_2021_1955] d,[LDT_FileManage].[dbo].FM_Dossier_AuxiliaryInfo_2021_1955 a
where d.DS_ID = a.DS_ID and a.DAI_IsEvidence='1' order by d.DS_CreateTime desc
/****** 更新CaseId ******/
update [LDT_FileManage].[dbo].[FM_Dossier_2021_1955] set cs_id = '3895846254264975360',DS_ISSeal='1',DS_IsParsed='1',DS_PageCount='1',DS_CreateType='5'
where DS_ID in('54f66663551d4ebda995e01ca7e14a8a','97ba603119e540189b4fe1192bcfd194')
update [LDT_FileManage].[dbo].FM_Dossier_AuxiliaryInfo_2021_1955 set cs_id = '3895846254264975360', DAI_IsEvidence='1'
where DS_ID in('54f66663551d4ebda995e01ca7e14a8a')
/****** 获取案件证据材料信息 ******/
SELECT TOP 1000 * FROM [LDT_FileManage].[dbo].[FM_Dossier_2021_1955] d,[LDT_FileManage].[dbo].FM_Dossier_AuxiliaryInfo_2021_1955 a
where d.DS_ID = a.DS_ID and d.cs_id = '3895846254264975360' and a.DAI_IsEvidence='1'
/****** 方法二 ******/
/**查找证据**/
select b.dai_isevidence,b.* from FM_Dossier_2021_1955 a
left join FM_Dossier_AuxiliaryInfo_2021_1955 b on a.ds_id = b.ds_id where a.CS_ID = '3895846254264975360'
/*设置证据材料*/
update [LDT_FileManage].[dbo].FM_Dossier_AuxiliaryInfo_2021_1955 set cs_id = '3895846254264975360', DAI_IsEvidence='1'
,DAI_Round_stamp='0',DAI_Finger_print='0'
where DS_ID in('4b6ff757163b49c0b94bcba4d9820074')