sqlstr+=string.Format(@"insert into esn_todos_points(sn,date_points_settlement,date_points_settlement_AssignTo,date_points_settlement_Point,update_user_id,update_time)
sqlstr+=string.Format(@"update esn_todos_Flow Set Is_Settlement = 1,update_user_id = @gWadeID,Update_time = GETDATE()
,StepType_id =(select id from esn_todos_Flow_StepType a where a.Map_Class='HR') output INSERTED.id INTO @TempTable where esn_todos_sn =@SN{0};
select @FlowId=id from @TempTable;
insert into esn_todos_Flow_his(Flow_id,ConfirmTime,FromType_id,ToType_id,ConfirmUserId,ConfirmUserClass,ConfirmMethod,Description,Create_User_id,Create_time)
select id as Flow_id,@value,a.StepType_id,StepType_id,@gWadeID,'HR','SL','確認日期:' + @value,@gWadeID,GETDATE() from esn_todos_Flow a where a.id=@FlowId;