dbo.QER_ZITShopRepairClosed
Stored ProcedureSQL_STORED_PROCEDURESandbox DB
Interpretation
- Database routine. Review parameters, called procedures, DBQueue inserts, and QBM_PJobCreate helper calls before assuming side effects.
Relations
- No extracted relations.
Typed Edges
- references source dbo.QBM_FCVStringToBit source text reference
- references source dbo.QBM_FGIConfigparmValue source text reference
- references source dbo.QBM_FGISessionContext source text reference
- references source dbo.QER_FGIGenProcIDForPWO source text reference
- references source dbo.QBM_PSessionContextSet source text reference
- references source dbo.QBM_PSessionErrorAdd source text reference
References
- dbo.QBM_FCVStringToBit
- dbo.QBM_FGIConfigparmValue
- dbo.QBM_FGISessionContext
- dbo.QER_FGIGenProcIDForPWO
- dbo.QBM_PSessionContextSet
- dbo.QBM_PSessionErrorAdd
Referenced By
- No direct source references extracted.
Complete Source
1CREATE PROCEDURE QER_ZITShopRepairClosed(2 @Slotnumber int,3 @UID_PersonWantsOrg varchar(38),4 @Dummy varchar(38),5 @GenProcID varchar(38)6)7AS8BEGIN9 DECLARE @XUser nvarchar(64) = object_name(@@procid)10 DECLARE @XDate datetime = getutcdate()11 DECLARE @SetUIDPersonOrdered int,12 @SetUIDPersonInserted int,13 @SetUIDPersonHead int,14 @SetDisplayPersonOrdered int,15 @SetDisplayPersonInserted int,16 @SetDisplayPersonHead int17 DECLARE @UID_DelegationToDelete varchar(38)18 DECLARE @CfgUseGenProcID BIT = dbo.QBM_FCVStringToBit(dbo.QBM_FGIConfigparmValue('Common\ProcessState\UseGenProcIDFromPWO'))19 DECLARE @GenProcID_R varchar(38) = dbo.QBM_FGISessionContext('')20 DECLARE @GenProcIDToUse varchar(38)21 BEGIN TRY22 SELECT23 TOP 1 @SetUIDPersonOrdered = r.SetUIDPersonOrdered,24 @SetUIDPersonInserted = r.SetUIDPersonInserted,25 @SetUIDPersonHead = r.SetUIDPersonHead,26 @SetDisplayPersonOrdered = r.SetDisplayPersonOrdered,27 @SetDisplayPersonInserted = r.SetDisplayPersonInserted,28 @SetDisplayPersonHead = r.SetDisplayPersonHead,29 @GenProcIDToUse = dbo.QER_FGIGenProcIDForPWO(r.GenProcID,30 @GenProcID,31 @CfgUseGenProcID),32 @UID_DelegationToDelete = r.UID_DelegationToDelete33 FROM QER_VPWOPersonPropertyReset r34 WHERE35 r.UID_PersonWantsOrg = @UID_PersonWantsOrg36 EXEC QBM_PSessionContextSet 'GenProcID',37 @GenProcIDToUse38 IF @SetUIDPersonOrdered = 139 BEGIN40 UPDATE PersonWantsOrg41 SET UID_PersonOrdered = NULL,42 XDateUpdated = @XDate,43 XUserUpdated = @XUser44 WHERE45 UID_PersonWantsOrg = @UID_PersonWantsOrg46 END47 IF @SetUIDPersonInserted = 148 BEGIN49 UPDATE PersonWantsOrg50 SET UID_PersonInserted = NULL,51 XDateUpdated = @XDate,52 XUserUpdated = @XUser53 WHERE54 UID_PersonWantsOrg = @UID_PersonWantsOrg55 END56 IF @SetUIDPersonHead = 157 BEGIN58 UPDATE PersonWantsOrg59 SET UID_PersonHead = NULL,60 XDateUpdated = @XDate,61 XUserUpdated = @XUser62 WHERE63 UID_PersonWantsOrg = @UID_PersonWantsOrg64 END65 IF @SetDisplayPersonOrdered = 166 BEGIN67 UPDATE PersonWantsOrg68 SET DisplayPersonOrdered = NULL,69 XDateUpdated = @XDate,70 XUserUpdated = @XUser71 WHERE72 UID_PersonWantsOrg = @UID_PersonWantsOrg73 END74 IF @SetDisplayPersonInserted = 175 BEGIN76 UPDATE PersonWantsOrg77 SET DisplayPersonInserted = NULL,78 XDateUpdated = @XDate,79 XUserUpdated = @XUser80 WHERE81 UID_PersonWantsOrg = @UID_PersonWantsOrg82 END83 IF @SetDisplayPersonHead = 184 BEGIN85 UPDATE PersonWantsOrg86 SET DisplayPersonHead = NULL,87 XDateUpdated = @XDate,88 XUserUpdated = @XUser89 WHERE90 UID_PersonWantsOrg = @UID_PersonWantsOrg91 END92 IF @UID_DelegationToDelete > ' '93 BEGIN94 DELETE Delegation95 WHERE96 UID_Delegation = @UID_DelegationToDelete97 END98 END TRY99 BEGIN CATCH100 EXEC QBM_PSessionErrorAdd DEFAULT101 RAISERROR('',102 18,103 1)104 WITH NOWAIT105 END CATCH106 endLabel:107 EXEC QBM_PSessionContextSet 'GenProcID',108 @GenProcID_R109 RETURN110END
Open raw exported source
1 create procedure QER_ZITShopRepairClosed ( @Slotnumber int , @UID_PersonWantsOrg varchar(38) , @Dummy varchar(38) , @GenProcID varchar(38)2 ) AS begin declare @XUser nvarchar(64) = object_name(@@procid) declare @XDate datetime = getutcdate() declare @SetUIDPersonOrdered int , @SetUIDPersonInserted3 int , @SetUIDPersonHead int , @SetDisplayPersonOrdered int , @SetDisplayPersonInserted int , @SetDisplayPersonHead int declare @UID_DelegationToDelete4 varchar(38) declare @CfgUseGenProcID bit = dbo.QBM_FCVStringToBit(dbo.QBM_FGIConfigparmValue('Common\ProcessState\UseGenProcIDFromPWO')) declare @GenProcID_R5 varchar(38) = dbo.QBM_FGISessionContext('') declare @GenProcIDToUse varchar(38) BEGIN TRY select top 1 @SetUIDPersonOrdered = r.SetUIDPersonOrdered , 6@SetUIDPersonInserted = r.SetUIDPersonInserted , @SetUIDPersonHead = r.SetUIDPersonHead , @SetDisplayPersonOrdered = r.SetDisplayPersonOrdered , @SetDisplayPersonInserted7 = r.SetDisplayPersonInserted , @SetDisplayPersonHead = r.SetDisplayPersonHead , @GenProcIDToUse = dbo.QER_FGIGenProcIDForPWO(r.GenProcID, @GenProcID, 8@CfgUseGenProcID) , @UID_DelegationToDelete = r.UID_DelegationToDelete from QER_VPWOPersonPropertyReset r where r.UID_PersonWantsOrg = @UID_PersonWantsOrg9 exec QBM_PSessionContextSet 'GenProcID', @GenProcIDToUse if @SetUIDPersonOrdered = 1 begin update PersonWantsOrg set UID_PersonOrdered = null , XDateUpdated10 = @XDate , XUserUpdated = @XUser where UID_PersonWantsOrg = @UID_PersonWantsOrg end if @SetUIDPersonInserted = 1 begin update PersonWantsOrg set UID_PersonInserted11 = null , XDateUpdated = @XDate , XUserUpdated = @XUser where UID_PersonWantsOrg = @UID_PersonWantsOrg end if @SetUIDPersonHead = 1 begin update PersonWantsOrg12 set UID_PersonHead = null , XDateUpdated = @XDate , XUserUpdated = @XUser where UID_PersonWantsOrg = @UID_PersonWantsOrg end if @SetDisplayPersonOrdered13 = 1 begin update PersonWantsOrg set DisplayPersonOrdered = null , XDateUpdated = @XDate , XUserUpdated = @XUser where UID_PersonWantsOrg = @UID_PersonWantsOrg14 end if @SetDisplayPersonInserted = 1 begin update PersonWantsOrg set DisplayPersonInserted = null , XDateUpdated = @XDate , XUserUpdated = @XUser where15 UID_PersonWantsOrg = @UID_PersonWantsOrg end if @SetDisplayPersonHead = 1 begin update PersonWantsOrg set DisplayPersonHead = null , XDateUpdated = @XDate16 , XUserUpdated = @XUser where UID_PersonWantsOrg = @UID_PersonWantsOrg end if @UID_DelegationToDelete > ' ' begin delete Delegation where UID_Delegation17 = @UID_DelegationToDelete end END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH endLabel: exec QBM_PSessionContextSet18 'GenProcID', @GenProcID_R return end 19