IF EXISTS (SELECT 1 FROM sys.objects WHERE object_id = OBJECT_ID('[dbo].[order_43_dolinkdata_3110]') AND type = 'P')
DROP PROCEDURE [dbo].[order_43_dolinkdata_3110]
GO
create procedure order_43_dolinkdata_3110(
@cmpid int ,
@useruid int ,
@bizid int ,
@ordbcid int,
@ordid bigint,
@jbid bigint,
@ftype varchar(10),
@fbizid int,
@fordid bigint,
@ford2tag int ,
@ford2id bigint,
@rtype varchar(10),
@rbizid int,
@rordid bigint,
@rord2tag int ,
@rord2id bigint 
) 
as 
begin
declare @operation varchar(50) 
declare @errorinfo nvarchar(4000)  
declare @newobjid bigint 
declare @ident varchar(40) 
declare @newsql nvarchar(max) 
declare @condition nvarchar(4000) 
declare @authority varchar(200) 
declare @bcid int 
set @bcid=@ordbcid 

--- 下面这段程序，是完成帐务处理------
insert into mps_account_operation(accop_cmpid,accop_type,accop_category,accop_date,accop_objid,accop_fiid,accop_opdate,accop_operation,accop_value,accop_valuesuspend,accop_bizid,accop_no,accop_ordid,accop_jbid,accop_back) select 1,'staf','dpot',DATEPART(YEAR,ord_date),ord_bgid,0,getdate(),100,-1*100,0*100,ord_bizid,ord_no,ord_id,@jbid,1 from order_43 where ord_id=@ordid 
--- 帐务处理完毕 ------

--- 下面这段程序，是完成物资帐务处理------

--- 物资帐务处理完毕 ------


end