stringzbSql="select NewId() as Id,a.DecisionId,a.ProjectId,a.SubSystemId,a.ResponsibilityUser,ruser.UserName as ResponsibilityUserName,a.ResponsibilityUnit,unit.UnitName as ResponsibilityUnitName,a.QuestionDesc,a.Level,a.Speciality,a.AskDestructionTime,a.RealityDestructionTime,a.RestrictCondition,a.GeneraUser as ConfirmUser,cuser.UserName as ConfirmUserName,4 as ConfirmType,'总包' as ConfirmTypeName,a.GeneraConfirm as ConfirmState,(case a.GeneraConfirm when 1 then '未确认' when 2 then '确认通过' else '' end) as ConfirmStateName,a.GeneraConfirmData as ConfirmData,a.DecisionIsClose,(case a.DecisionIsClose when 1 then '已关闭' else '未关闭' end) as DecisionIsCloseName,(case ISNULL(a.AskDestructionTime,'') when '' then 0 else DATEDIFF(DAY, GETDATE(),a.AskDestructionTime) end) as DestructionDiffDay,a.AddUser,a.AddTime,a.Sort from PreRun_SubThreeChecksFourDecision as a left join Sys_User as cuser on a.GeneraUser=cuser.UserId left join Sys_User as ruser on a.ResponsibilityUser=ruser.UserId left join Base_Unit as unit on a.ResponsibilityUnit=unit.UnitId where 1=1 and a.ProposeConfirm=2 and a.SubSystemId=@SubSystemId and a.ProjectId=@ProjectId ";
stringjlSql="select NewId() as Id,a.DecisionId,a.ProjectId,a.SubSystemId,a.ResponsibilityUser,ruser.UserName as ResponsibilityUserName,a.ResponsibilityUnit,unit.UnitName as ResponsibilityUnitName,a.QuestionDesc,a.Level,a.Speciality,a.AskDestructionTime,a.RealityDestructionTime,a.RestrictCondition,a.SupervisionUser as ConfirmUser,cuser.UserName as ConfirmUserName,5 as ConfirmType,'监理' as ConfirmTypeName,a.SupervisionConfirm as ConfirmState,(case a.SupervisionConfirm when 1 then '未确认' when 2 then '确认通过' else '' end) as ConfirmStateName,a.SupervisionConfirmData as ConfirmData,a.DecisionIsClose,(case a.DecisionIsClose when 1 then '已关闭' else '未关闭' end) as DecisionIsCloseName,(case ISNULL(a.AskDestructionTime,'') when '' then 0 else DATEDIFF(DAY, GETDATE(),a.AskDestructionTime) end) as DestructionDiffDay,a.AddUser,a.AddTime,a.Sort from PreRun_SubThreeChecksFourDecision as a left join Sys_User as cuser on a.SupervisionUser=cuser.UserId left join Sys_User as ruser on a.ResponsibilityUser=ruser.UserId left join Base_Unit as unit on a.ResponsibilityUnit=unit.UnitId where 1=1 and a.ProposeConfirm=2 and a.SubSystemId=@SubSystemId and a.ProjectId=@ProjectId ";
stringyzSql="select NewId() as Id,a.DecisionId,a.ProjectId,a.SubSystemId,a.ResponsibilityUser,ruser.UserName as ResponsibilityUserName,a.ResponsibilityUnit,unit.UnitName as ResponsibilityUnitName,a.QuestionDesc,a.Level,a.Speciality,a.AskDestructionTime,a.RealityDestructionTime,a.RestrictCondition,a.OwnerUser as ConfirmUser,cuser.UserName as ConfirmUserName,6 as ConfirmType,'业主' as ConfirmTypeName,a.OwnerConfirm as ConfirmState,(case a.OwnerConfirm when 1 then '未确认' when 2 then '确认通过' else '' end) as ConfirmStateName,a.OwnerConfirmData as ConfirmData,a.DecisionIsClose,(case a.DecisionIsClose when 1 then '已关闭' else '未关闭' end) as DecisionIsCloseName,(case ISNULL(a.AskDestructionTime,'') when '' then 0 else DATEDIFF(DAY, GETDATE(),a.AskDestructionTime) end) as DestructionDiffDay,a.AddUser,a.AddTime,a.Sort from PreRun_SubThreeChecksFourDecision as a left join Sys_User as cuser on a.OwnerUser=cuser.UserId left join Sys_User as ruser on a.ResponsibilityUser=ruser.UserId left join Base_Unit as unit on a.ResponsibilityUnit=unit.UnitId where 1=1 and a.ProposeConfirm=2 and a.SubSystemId=@SubSystemId and a.ProjectId=@ProjectId ";