首页 > 代码库 > Get sqls from Maps
Get sqls from Maps
/*------------------BudgetControlorMap----------------------*/select BudgetControlorID,FeeSortID,BudgetYear,BudgetMonth,Remark,BudgetMoney from OA_Project_BudgetControlor Where (@BudgetYear is null or LTRIM(RTRIM(@BudgetYear)) = ‘‘ or BudgetYear = @BudgetYear)And (@BudgetMonth is null or LTRIM(RTRIM(@BudgetMonth)) = ‘‘ or BudgetMonth= @BudgetMonth)And (@FeeSortID is null or LTRIM(RTRIM(@FeeSortID)) = ‘‘ or FeeSortID= @FeeSortID) select BudgetControlorID,FeeSortID,BudgetYear,BudgetMonth,Remark,BudgetMoney from OA_Project_BudgetControlor Where BudgetControlorID=@BudgetControlorID select BudgetControlorID,FeeSortID,BudgetYear,BudgetMonth,Remark,BudgetMoney from OA_Project_BudgetControlor/*------------------ChargeUpInfoMap----------------------*/select ChargeUpID,ChargeUpDate,UserID,FormNo,FormType,OutputMoney,Income,Description,Company,Fund,Currency,Account from OA_Project_ChargeUp where ChargeUpID=@ChargeUpIDselect ChargeUpID, ChargeUpDate, UserID, FormNo, FormType, OutputMoney, Income, Description, Company, Fund, Currency, Account from OA_Project_ChargeUp order by ChargeUpDate desc select ChargeUpID, ChargeUpDate, UserID, FormNo, FormType, OutputMoney, Income, Description, Company, Fund, Currency, Account from OA_Project_ChargeUp Where (@Company is null or LTRIM(RTRIM(@Company)) = ‘‘ or Company = @Company) And (@Fund is null or LTRIM(RTRIM(@Fund)) = ‘‘ or Fund= @Fund) And (@Currency is null or LTRIM(RTRIM(@Currency)) = ‘‘ or Currency= @Currency) And (@Account is null or LTRIM(RTRIM(@Account)) = ‘‘ or Account= @Account) And (@StartDate is null or LTRIM(RTRIM(@StartDate)) = ‘‘ or ChargeUpDate>=cast(@StartDate as datetime)) And (@EndDate is null or LTRIM(RTRIM(@EndDate)) = ‘‘ or ChargeUpDate<=cast(@EndDate as datetime)) order by ChargeUpDate desc select SUM(OutputMoney), SUM(Income) from OA_Project_ChargeUp Where datediff(day,ChargeUpDate,@ChargeUpDate)=0 /*------------------Form_HR_Dimission----------------------*/--GetDimissionFormByIDselectDimissionFormID,DimissionFormNo,DimissionFormOrder,UrgencyDegree,DimissionUserID,LocationUnitID,DimissionReason,ExpectDate,CreateByUserID,CreateTimefrom OA_Form_HR_Dimission where DimissionFormID=@ID--GetDimissionFormListselectDimissionFormID,DimissionFormNo,DimissionFormOrder,UrgencyDegree,DimissionUserID,LocationUnitID,DimissionReason,ExpectDate,CreateByUserID,CreateTimefrom OA_Form_HR_Dimission --SelectDimissionFormCodeSELECT MAX(CAST(SUBSTRING(DimissionFormNo,3,6) as int))FROM OA_Form_HR_Dimission--SelectDimissionFormCountSELECT COUNT(*) FROM OA_Form_HR_Dimission/*------------------Form_HR_Employee----------------------*/--GetEmployeeFormByIDselect * from OA_Form_HR_Employee where EmployeeFormID=@ID--GetEmployeeFormListselect * from OA_Form_HR_Employee --SelectFormCodeSELECT MAX(CAST(SUBSTRING(EmployeeFormNo,3,6) as int))FROM OA_Form_HR_Employee--SelectCountSELECT COUNT(*) FROM OA_Form_HR_Employee/*------------------Form_Project_OrderForm----------------------*/--GetOrderFormByIDselectOrderFormID,OrderFormNo,UrgencyDegree,OrderFormOrder,ProjectID,CorrelationCompany,OrderFormDate,CompleteTime,JoinUserXML,AttachmentName,OrderContent,CreateUserID,CreateFormDatefrom OA_T_OrderForm where OrderFormID=@OrderFormID--GetMaxOrderselect max(cast(substring(OrderFormNo,3,6) as int)) as OrderFormNo from OA_T_OrderForm--GetOrderFormListselectOrderFormID,OrderFormNo,UrgencyDegree,OrderFormOrder,ProjectID,CorrelationCompany,OrderFormDate,CompleteTime,JoinUserXML,AttachmentName,OrderContent,CreateUserID,CreateFormDatefrom OA_T_OrderForm /*------------------Form_Project_WorkManeuve----------------------*/--GetWorkManeuveFormByIDselectManeuveFormID,ManeuveFormNo,UrgencyDegree,ManeuveFormOrder,ProjectID,CorrelationCompany,ManeuveFormDate,CompleteTime,JoinUserXML,AttachmentName,ManeuveContent,CreateUserID,CreateFormDatefrom OA_T_WorkManeuveForm where ManeuveFormID=@ManeuveFormID--GetWorkManeuveFormListselectManeuveFormID,ManeuveFormNo,UrgencyDegree,ManeuveFormOrder,ProjectID,CorrelationCompany,ManeuveFormDate,CompleteTime,JoinUserXML,AttachmentName,ManeuveContent,CreateUserID,CreateFormDatefrom OA_T_WorkManeuveForm --GetMaxManeuveFormOrderselect max(cast(substring(ManeuveFormNo,3,6) as int)) as ManeuveFormNo from OA_T_WorkManeuveForm/*------------------HR_BargainInfo----------------------*/--GetBargainInfoByIDselectBargainID,EmployeeID,BargainCode,StartTime,EndTime,BargainContent,BargainUrl,BargainDesc,Memo,CreateUserID,CreateTimefrom OA_HR_BargainInfo where BargainID=@BargainID--GetBargainInfoListselectBargainID,EmployeeID,BargainCode,StartTime,EndTime,BargainContent,BargainUrl,BargainDesc,Memo,CreateUserID,CreateTimefrom OA_HR_BargainInfo --GetBargainInfoListByEmployeeIDselect BargainID,EmployeeID,BargainCode,StartTime,EndTime,BargainContent,BargainUrl,BargainDesc,Memo,CreateUserID,CreateTime from OA_HR_BargainInfo where EmployeeID=@EmployeeID/*------------------HR_EmployeeInfo----------------------*/--GetEmployeeInfoByIDselect OA_HR_EmployeeInfo.*, IBP_T_EA.PK_UnitID as UnitID,IBP_T_EA.UnitName As UnitName,IBP_T_User.LogonName As UserAccountfrom OA_HR_EmployeeInfoleft outer join IBP_T_User on IBP_T_User.PK_UserID = OA_HR_EmployeeInfo.EmployeeUserIDleft outer join IBP_T_EAon IBP_T_EA.PK_UnitID = IBP_T_User.FK_UnitIDwhere EmployeeID=@EmployeeID--GetEmployeeInfoByUserIDselect OA_HR_EmployeeInfo.*, IBP_T_EA.PK_UnitID as UnitID,IBP_T_EA.UnitName As UnitName,IBP_T_User.LogonName As UserAccountfrom OA_HR_EmployeeInfoleft outer join IBP_T_User on IBP_T_User.PK_UserID = OA_HR_EmployeeInfo.EmployeeUserIDleft outer join IBP_T_EAon IBP_T_EA.PK_UnitID = IBP_T_User.FK_UnitIDwhere EmployeeUserID=@UserID--GetEmployeeInfoListselect OA_HR_EmployeeInfo.*,IBP_T_EA.PK_UnitID as UnitID,IBP_T_EA.UnitName As UnitName,IBP_T_User.LogonName As UserAccountfrom OA_HR_EmployeeInfo left outer join IBP_T_User on IBP_T_User.PK_UserID = OA_HR_EmployeeInfo.EmployeeUserIDleft outer join IBP_T_EA on IBP_T_EA.PK_UnitID = IBP_T_User.FK_UnitIDfrom OA_HR_EmployeeInfo WHERE EmployeeDataStatus=2 AND IsDeleted = 0 --SearchEmployeeInfoListselect OA_HR_EmployeeInfo.*,IBP_T_EA.PK_UnitID as UnitID,IBP_T_EA.UnitName As UnitName,IBP_T_User.LogonName As UserAccountfrom OA_HR_EmployeeInfoleft outer join IBP_T_User on IBP_T_User.PK_UserID = OA_HR_EmployeeInfo.EmployeeUserIDleft outer join IBP_T_EAon IBP_T_EA.PK_UnitID = IBP_T_User.FK_UnitIDWHERE EmployeeDataStatus=2 AND IsDeleted = 0 AND (@UserAccount is null or LTRIM(RTRIM(@UserAccount)) = ‘‘ or IBP_T_User.LogonName = @UserAccount)AND (@Name is null or LTRIM(RTRIM(@Name)) = ‘‘ or Name = @Name)AND (@Sex is null or LTRIM(RTRIM(@Sex)) = ‘‘ or OA_HR_EmployeeInfo.Sex= @Sex)AND (@EmploeeStatus is null or LTRIM(RTRIM(@EmploeeStatus)) = ‘‘ or EmploeeStatus= @EmploeeStatus)AND (@UnitID is null or LTRIM(RTRIM(@UnitID)) = ‘‘ or IBP_T_User.FK_UnitID= @UnitID)--SelectIdentitySELECT IDENT_CURRENT(‘OA_HR_EmployeeInfo‘)--GetMaxMiddleNumOfEmployeeCodeSELECT TOP 1SUBSTRING(EmployeeCode, LEN(@Prefix)+1, @MiddleNumCount) AS MiddleNumFROM OA_HR_EmployeeInfoWHERE LEN(EmployeeCode)-LEN(@Prefix)-LEN(@Postfix)=@MiddleNumCountAND (LEN(@Prefix)=0 OR (CHARINDEX(@Prefix, EmployeeCode) = 1)) AND (LEN(@Postfix)=0 OR (CHARINDEX(@Postfix, EmployeeCode) = LEN(EmployeeCode) - LEN(@Postfix)+1))ORDER BY MiddleNum DESC/*------------------HR_FamilyMember----------------------*/--GetFamilyMemberByIDselect * from OA_HR_FamilyMemberInfo where FamilyMemberID = @FamilyMemberID--GetFamilyMemberListselect * from OA_HR_FamilyMemberInfo --GetFamilyMemberListByEmployeeIDselect * from OA_HR_FamilyMemberInfo where EmployeeID=@EmployeeID/*------------------HR_LanguageAbility----------------------*/--GetLanguageAbilityByIDselectLanguageAbilityID,LanguageName,LanguageAbility,EmployeeIDfrom OA_HR_LanguageAbility where LanguageAbilityID=@LanguageAbilityID--GetLanguageAbilityListselectLanguageAbilityID,LanguageName,LanguageAbility,EmployeeIDfrom OA_HR_LanguageAbility --GetLanguageAbilityByEmployeeIDselect * from OA_HR_LanguageAbility where EmployeeID=@EmployeeID/*------------------HR_RewardsPunishmentInfo----------------------*/--GetRewardsPunishmentInfoByIDselectRewardsPunishmentID,EmployeeID,RewardsPunishmentType,RewardsPunishmentDate,RewardsPunishmentContent,ApproveReson,ApproveResult,ApproveUnit,ApproveMind,Memofrom OA_HR_RewardsPunishment where RewardsPunishmentID=@RewardsPunishmentID--GetRewardsPunishmentInfoListselectRewardsPunishmentID,EmployeeID,RewardsPunishmentType,RewardsPunishmentDate,RewardsPunishmentContent,ApproveReson,ApproveResult,ApproveUnit,ApproveMind,Memofrom OA_HR_RewardsPunishment --GetRewardsPunishmentInfoListByEmployeeIdselectEmployeeID,RewardsPunishmentID,RewardsPunishmentType,RewardsPunishmentDate,RewardsPunishmentContent,ApproveReson,ApproveResult,ApproveUnit,ApproveMind,Memofrom OA_HR_RewardsPunishment where EmployeeID=@EmployeeID/*------------------HR_SalaryInfo----------------------*/--GetSalaryInfoByIDselectSalaryInfoID,EmployeeID,OldSalary,CurrentSalary,Reason,ApprovePerson,ChangeTime,Memo,CreateUserID,CreateTimefrom OA_HR_SalaryInfo where SalaryInfoID=@SalaryInfoID--GetSalaryInfoListselectSalaryInfoID,EmployeeID,OldSalary,CurrentSalary,Reason,ApprovePerson,ChangeTime,Memo,CreateUserID,CreateTimefrom OA_HR_SalaryInfo --GetSalaryInfoListByEmployeeIDselectSalaryInfoID,EmployeeID,OldSalary,CurrentSalary,Reason,ApprovePerson,ChangeTime,Memo,CreateUserID,CreateTimefrom OA_HR_SalaryInfo where EmployeeID=@EmployeeID/*------------------HR_SchoolingInfo----------------------*/--GetSchoolingInfoByIDselect * from OA_HR_SchoolingInfo where SchoolingInfoID=@SchoolingInfoID--GetSchoolingInfoListselect * from OA_HR_SchoolingInfo --GetSchoolingInfoListByEmployeeIDselect *from OA_HR_SchoolingInfo where EmployeeID=@EmployeeID/*------------------HR_SkillsInfo----------------------*/--GetSkillsInfoByIDselect * from OA_HR_OtherSkills where OtherSkillsID=@OtherSkillsID--GetSkillsInfoListselect * from OA_HR_OtherSkills --GetSkillsInfoByEmployeeIDselect * from OA_HR_OtherSkills where EmployeeID=@EmployeeID/*------------------HR_VitaInfo----------------------*/--GetVitaInfoByIDselectVitaID,EmployeeID,WorkUnit,WorkStartTime,WorkEndTime,Department,WorkPosition,Achievement,SalaryRange,DimissionReason,ProvePerson,ProvePersonRelation,Memo,CreateUserID,CreateTimefrom OA_HR_VitaInfo where VitaID=@VitaID--GetVitaInfoListselectVitaID,EmployeeID,WorkUnit,WorkStartTime,WorkEndTime,Department,WorkPosition,Achievement,SalaryRange,DimissionReason,ProvePerson,ProvePersonRelation,Memo,CreateUserID,CreateTimefrom OA_HR_VitaInfo --GetVitaInfoListByEmployeeIDselectVitaID,EmployeeID,WorkUnit,WorkStartTime,WorkEndTime,Department,WorkPosition,Achievement,SalaryRange,DimissionReason,ProvePerson,ProvePersonRelation,Memo,CreateUserID,CreateTimefrom OA_HR_VitaInfo where EmployeeID=@EmployeeID/*------------------IM_InternalMessage----------------------*/--GetInternalMessageByIDselectMessageID,MessageTitle,MessageContent,SendTime,MessageType,SendUserID,SendTarget,IsDeleted,IBP_T_User.UserName As SendUserNamefrom OA_IM_InternalMessageLEFT OUTER JOIN IBP_T_UserON IBP_T_User.PK_UserID=SendUserIDwhere MessageID=@MessageID--UpdateDeleteStatusOfInternalMessageupdate OA_IM_InternalMessage set IsDeleted=@IsDeleteD where MessageID=@MessageID--GetInternalMessageReceiveInfoByIDselectMessageID,ReceiveUserID,ReceiveTime,ViewState,ViewTimefrom OA_IM_InternalMessageReceive where MessageID=@MessageID AND ReceiveUserID=@ReceiveUserID--GetMsgCountNotViewedselect Count(*)from OA_IM_InternalMessageReceive where ReceiveUserID=@ReceiveUserID AND ViewState=0;--SearchSendMessage/*if MessageTitle is not null and is not emptyset MessageTitle = ‘%‘ +MessageTitle +‘%‘*/selectMessageID,MessageTitle,MessageContent,SendTime,MessageType,SendUserID,SendTarget,IsDeleted,IBP_T_User.UserName As SendUserNamefrom OA_IM_InternalMessageLEFT OUTER JOIN IBP_T_User ON IBP_T_User.PK_UserID=SendUserIDWHERE SendUserID = @SendUserID And IsDeleted=0 AND (@MessageTitle is null or LTRIM(RTRIM(@MessageTitle)) = ‘‘ or MessageTitle LIKE @MessageTitle)AND (@MessageContent is null or LTRIM(RTRIM(@MessageContent)) = ‘‘ or MessageContent LIKE @MessageContent)AND (@SendStartTime is null or LTRIM(RTRIM(@SendStartTime)) = ‘‘ or SendTime >= cast(@SendStartTime as datetime))AND (@SendEndTime is null or LTRIM(RTRIM(@SendEndTime)) = ‘‘ or SendTime <= cast(@SendEndTime as datetime))AND (@SendTarget is null or LTRIM(RTRIM(@SendTarget)) = ‘‘ or MessageID IN (Select MessageID From OA_IM_InternalMessageReceive WHERE ReceiveUserID=@SendTarget))Order by SendTime Desc--SearchReceiveMessageselectOA_IM_InternalMessage.MessageID,ReceiveUserID,ReceiveTime,ViewState,ViewTimefrom OA_IM_InternalMessageReceiveLeft Outer Join OA_IM_InternalMessage ON OA_IM_InternalMessageReceive.MessageID = OA_IM_InternalMessage.MessageIDWhere OA_IM_InternalMessageReceive.ReceiveUserID = @ReceiveUserIDAND (@MessageTitle is null or LTRIM(RTRIM(@MessageTitle)) = ‘‘ or OA_IM_InternalMessage.MessageTitle LIKE @MessageTitle)AND (@MessageContent is null or LTRIM(RTRIM(@MessageContent)) = ‘‘ or OA_IM_InternalMessage.MessageContent LIKE @MessageContent)AND (@ReceiveStartTime is null or LTRIM(RTRIM(@ReceiveStartTime)) = ‘‘ or ReceiveTime >= cast(@ReceiveStartTime as datetime))AND (@ReceiveEndTime is null or LTRIM(RTRIM(@ReceiveEndTime)) = ‘‘ or ReceiveTime <= cast(@ReceiveEndTime as datetime)) AND (@SendUserID is null or LTRIM(RTRIM(@SendUserID)) = ‘‘ or OA_IM_InternalMessage.SendUserID = @SendUserID)Order by ReceiveTime Desc/*------------------LateInfoMap----------------------*/--GetLateInfoByIDselectBLMonthRPTID,RPTYear,RPTMonth,RPTStatus,RPTCreateUser,RPTCreateDate,RPTAuditUser,RPTAuditDatefrom OA_T_BeLateMonthRPT where BLMonthRPTID=@BLMonthRPTID--GetLateInfoListselectBLMonthRPTID,RPTYear,RPTMonth,RPTStatus,RPTCreateUser,RPTCreateDate,RPTAuditUser,RPTAuditDatefrom OA_T_BeLateMonthRPT --GetLateInfoByYearAndMonthselectBLMonthRPTID,RPTYear,RPTMonth,RPTStatus,RPTCreateUser,RPTCreateDate,RPTAuditUser,RPTAuditDatefrom OA_T_BeLateMonthRPT WHERE (@RPTYear is null or LTRIM(RTRIM(@RPTYear)) = ‘‘ or RPTYear = @RPTYear)AND (@RPTMonth is null or LTRIM(RTRIM(@)) = ‘‘ or RPTMonth= @RPTMonth) --DeleteLateInfoByYearAndMonthdelete from OA_T_BeLateMonthRPTWHERE (@RPTYear is null or LTRIM(RTRIM(@RPTYear)) = ‘‘ or RPTYear = @RPTYear)AND (@RPTMonth is null or LTRIM(RTRIM(@RPTMonth)) = ‘‘ or RPTMonth= @RPTMonth) --GetLateInfoDetailByIDselectDetailID,BLMonthRPTID,UserID,WorkDays,BLNumberONFifteen,BLTimeONFifteen,BLNumberOutFifteen,BLTimeOutFifteen,BLNumberTotal,BLTimeTotal,isSendWarning,SendWarningStatusfrom OA_T_BeLateMonthRPTDetail where DetailID=@DetailID--GetLateInfoDetailListselectDetailID,BLMonthRPTID,UserID,WorkDays,BLNumberONFifteen,BLTimeONFifteen,BLNumberOutFifteen,BLTimeOutFifteen,BLNumberTotal,BLTimeTotal,isSendWarning,SendWarningStatusfrom OA_T_BeLateMonthRPTDetail --GetLateInfoDetailListByMasterIdselectDetailID,BLMonthRPTID,UserID,WorkDays,BLNumberONFifteen,BLTimeONFifteen,BLNumberOutFifteen,BLTimeOutFifteen,BLNumberTotal,BLTimeTotal,isSendWarning,SendWarningStatus,UnitName,UserNamefrom OA_T_BeLateMonthRPTDetail Left Outer Join IBP_T_User On IBP_T_User.PK_UserID=OA_T_BeLateMonthRPTDetail.UserIDLeft Outer Join IBP_T_EAOn IBP_T_EA.PK_UnitID=IBP_T_User.FK_UnitIDwhere BLMonthRPTID=@BLMonthRPTIDOrder by UnitName,UserName/*------------------ProjectEstimateCostMap----------------------*/--GetProjectEstimateCostByIDselectCostID,ProjectID,ProjectEstimateQuote,ProjectEstimateBudget,CreateUserID,CreateDate,Remarkfrom OA_T_ProjectEstimateCost where CostID=@CostID--GetProjectEstimateCostByProjectselect TOP 1CostID,ProjectID,ProjectEstimateQuote,ProjectEstimateBudget,CreateUserID,CreateDate,Remarkfrom OA_T_ProjectEstimateCost where ProjectID=@ProjectIDORDER BY CreateDate DESC--GetProjectEstimateCostListselectCostID,ProjectID,ProjectEstimateQuote,ProjectEstimateBudget,CreateUserID,CreateDate,Remark from OA_T_ProjectEstimateCost /*------------------TimeCard_OverTimeInfoMap----------------------*/--GetOverTimeInfoByIDselectOTMonthRPTID,RPTYear,RPTMonth,RPTStatus,RPTCreateUser,RPTCreateDate,RPTAuditUser,RPTAuditDate,RPTEndDatefrom OA_T_OvertimeMonthRPT where OTMonthRPTID=@OTMonthRPTID--GetOverTimeInfoByYearAndMonthselectOTMonthRPTID,RPTYear,RPTMonth,RPTStatus,RPTCreateUser,RPTCreateDate,RPTAuditUser,RPTAuditDate,RPTEndDatefrom OA_T_OvertimeMonthRPT WHERE (@RPTYear is null or LTRIM(RTRIM(@RPTYear)) = ‘‘ or RPTYear = @RPTYear)AND (@RPTMonth is null or LTRIM(RTRIM(@RPTMonth)) = ‘‘ or RPTMonth= @RPTMonth) --GetOverTimeInfoListselectOTMonthRPTID,RPTYear,RPTMonth,RPTStatus,RPTCreateUser,RPTCreateDate,RPTAuditUser,RPTAuditDate,RPTEndDatefrom OA_T_OvertimeMonthRPT --GetOverTimeInfoDetailByIDselectDetailID,OTMonthRPTID,UserID,LastOTTime,OTTimeTotal,ReturnMoneyTime,LeaveOTTime,FurloughTimeTotalfrom OA_T_OvertimeMonthRPTDetail where DetailID=@DetailID--GetOverTimeInfoDetailListselectDetailID,OTMonthRPTID,UserID,LastOTTime,OTTimeTotal,ReturnMoneyTime,LeaveOTTime,FurloughTimeTotalfrom OA_T_OvertimeMonthRPTDetail --GetMaxEndDateSelect Max(RPTEndDate) FROM OA_T_OvertimeMonthRPT--GetLeaveOTTimeForMaxMonth" parameterClass="stringSELECT LeaveOTTime FROM OA_T_OvertimeMonthRPTDetailWhere UserID=@UserID AND OTMonthRPTID IN (Select OTMonthRPTID From OA_T_OvertimeMonthRPT WHERE RPTEndDate=(Select Max(RPTEndDate) FROM OA_T_OvertimeMonthRPT))--GetOTInfoDetailListByMasterId" resultMap="OverTimeInfoDetailResult" parameterClass="stringselectDetailID,OTMonthRPTID,UserID,LastOTTime,OTTimeTotal,ReturnMoneyTime,LeaveOTTime,FurloughTimeTotal,UserName,UnitNamefrom OA_T_OvertimeMonthRPTDetail Left Outer Join IBP_T_User On IBP_T_User.PK_UserID=OA_T_OvertimeMonthRPTDetail.UserIDLeft Outer Join IBP_T_EAOn IBP_T_EA.PK_UnitID=IBP_T_User.FK_UnitIDwhere OTMonthRPTID=@OTMonthRPTIDOrder by UnitName,UserName/*------------------TimeCard_YearFurlough----------------------*/--SearchYearFurloughselectYFID,YearWord,PFStartDate,TFStartDate,PFEndDate,TFEndDate,PFMount,TFMount,SurplusMount,YFEditUserID,YFEditDate,IBP_T_User.PK_UserID as UserID,IBP_T_User.UserName,IBP_T_EA.UnitNamefrom IBP_T_User Left Outer Join IBP_T_EAOn IBP_T_EA.PK_UnitID=IBP_T_User.FK_UnitIDLeft Outer Join OA_YearFurlough On IBP_T_User.PK_UserID=OA_YearFurlough.UserIDWHERE (YearWord=@YearWorD OR YearWord IS NULL) AND IBP_T_User.Status=1 Order by UnitName,UserName--GetYearFurloughByUserAndYearselectYFID,YearWord,UserID,PFStartDate,TFStartDate,PFEndDate,TFEndDate,PFMount,TFMount,SurplusMount,YFEditUserID,YFEditDate,UnitName,UserNamefrom OA_YearFurloughLeft Outer Join IBP_T_User On IBP_T_User.PK_UserID=OA_YearFurlough.UserID Left Outer Join IBP_T_EAOn IBP_T_EA.PK_UnitID=IBP_T_User.FK_UnitIDwhere YearWord=@YearWorD And UserID=@UserID --GetYearFurloughListselectYFID,UserID,PFStartDate,TFStartDate,PFEndDate,TFEndDate,PFMount,TFMount,SurplusMount,YFEditUserID,YFEditDatefrom OA_YearFurlough --GetYearFurloughCanUsedSELECTYFID,YearWord,UserID,PFStartDate,TFStartDate,PFEndDate,TFEndDate,PFMount,TFMount,SurplusMount,YFEditUserID,YFEditDate,UnitName,UserNameFROM OA_YearFurloughLeft Outer Join IBP_T_User On IBP_T_User.PK_UserID=OA_YearFurlough.UserID Left Outer Join IBP_T_EAOn IBP_T_EA.PK_UnitID=IBP_T_User.FK_UnitIDWHERE TFStartDate<=Cast(@TFStartDate as DateTime) AND TFEndDate>= Cast(@TFEndDate as DateTime) And UserID=@UserID--UpdateSurplusMountupdate OA_YearFurlough set SurplusMount=Cast(SurplusMount as Float)-Cast(@SurplusMount as Float)where TFStartDate<=Cast(@TFStartDate@ as DateTime) AND TFEndDate>= Cast(@TFStartDate@ as DateTime) And UserID=@UserID/*------------------WorkFlow_FormField----------------------*/--GetFormFieldByIDselectFormFieldID,FormTypeID,FormFieldName,FormFieldNofrom OA_WorkFlow_FormField where FormFieldID=@FormFieldID--GetFormFieldByFormTypeIDselectFormFieldID,FormTypeID,FormFieldName,FormFieldNofrom OA_WorkFlow_FormField where FormTypeID=@FormTypeID--GetFormFieldListselectFormFieldID,FormTypeID,FormFieldName,FormFieldNofrom OA_WorkFlow_FormField /*------------------WorkFlow_NodeAction----------------------*/--GetNodeActionByIDselectNodeActionID,FormTypeID,NodeActionName,NodeActionNofrom OA_WorkFlow_NodeAction where NodeActionID=@NodeActionID--GetNodeActionListselectNodeActionID,FormTypeID,NodeActionName,NodeActionNofrom OA_WorkFlow_NodeAction --GetNodeActionListByFormTypeIDselectNodeActionID,FormTypeID,NodeActionName,NodeActionNofrom OA_WorkFlow_NodeAction Where FormTypeID=@FormTypeID OR FormTypeID is NULLORDER BY NodeActionNo/*------------------WorkFlow_NodeActionResult----------------------*/--GetNodeActionResultByIDselectFlowScoreID,ProjectFormID,NodeActionCode,FieldName,FieldValuefrom OA_WorkFlow_NodeActionResult where FlowScoreID=@FlowScoreID--GetNodeActionResultListselectFlowScoreID,ProjectFormID,NodeActionCode,FieldName,FieldValuefrom OA_WorkFlow_NodeActionResult --DeleteNodeActionResultByFormIDAndActionCodedelete from OA_WorkFlow_NodeActionResult WHERE (@ProjectFormID is null or LTRIM(RTRIM(@ProjectFormID)) = ‘‘ or ProjectFormID = @ProjectFormID)AND (@NodeActionCode is null or LTRIM(RTRIM(@NodeActionCode)) = ‘‘ or NodeActionCode = @NodeActionCode)--GetNodeActionResultselectFlowScoreID,ProjectFormID,NodeActionCode,FieldName,FieldValuefrom OA_WorkFlow_NodeActionResult where ProjectFormID=@ProjectFormID AND NodeActionCode=@NodeActionCode--GetNodeActionResultByParamselectFlowScoreID,ProjectFormID,NodeActionCode,FieldName,FieldValuefrom OA_WorkFlow_NodeActionResult WHERE (@ProjectFormID is null or LTRIM(RTRIM(@ProjectFormID)) = ‘‘ or ProjectFormID = @ProjectFormID)AND (@NodeActionCode is null or LTRIM(RTRIM(@NodeActionCode)) = ‘‘ or NodeActionCode = @NodeActionCode)AND (@FieldName is null or LTRIM(RTRIM(@FieldName)) = ‘‘ or FieldName = @FieldName)
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。