料品下发控制容易混淆的表

by 马杰 2011.9.8 16:53
注:脚本执行有风险,对于客户正式环境请在研发指导下执行。select * from CBO_AttributeController  --实体下发属性控制表  select * from CBO_BaseObject   --实体下发控制表 select * from cbo_ObjectAttribute   --属性下发预置表 select * from CBO_SendPath    -- 下发历史表 select * from CBO_SendObject  -??? 预置表: --[维度-按照需求分类控制]DECLARE @EntityType bigint,@AttributeID bigint,@StartSN bigint,@BaseObjectClassUId uniqueidentifier,@BaseAttributeUId uniqueidentifier,@BaseObjectID bigint SET @BaseObjectID=11SELECT @EntityType = local_id FROM ubf_md_class WHERE FullName = 'UFIDA.U9.CBO.SCM.Item.ItemMRPInfo'SELECT @BaseAttributeUId=ID,@AttributeID = Local_ID FROM UBF_MD_Attribute WHERE Local_Class_ID = @EntityType AND [Name] = 'IsControlByDC' if @AttributeID is not null and not exists(select 1 from CBO_ObjectAttribute where Attribute=@AttributeID and BaseObject=@BaseObjectID) INSERT INTO CBO_ObjectAttribute (ID,Attribute,IsSend,IsCanBeModified,BaseObject,IsSystem,U_ID) VALUES (1,@AttributeID,1,1,@BaseObjectID,0,@BaseAttributeUId)    增加表列:  alter table CBO_ObjectAttribute add  ada varchar(200) default 1 not null     

Tags:

BASECBO

调整会计期间的脚本

by 马杰 2011.8.26 14:18
注:脚本执行有风险,对于客户正式环境请在研发指导下执行。  -- 应付管理delete from AP_APPeriodClose where Org = (select ID from Base_Organization_Trl where Name = '双虎实业有限公司')-- 应收管理delete from AR_ARPeriodClose where Org = (select ID from Base_Organization_Trl where Name = '双虎实业有限公司')--删除现金银行日结表数据delete CM_DailyClosed where Org = (select ID from Base_Organization_Trl where Name = '双虎实业有限公司')-- 固定资产delete from FA_DepreciationBookPeriod where SOB  in (select ID from Base_SetofBooks where Org  = (select ID from Base_Organization_Trl where Name = '双虎实业有限公司'))     DECLARE @AccountCalendarCode NVARCHAR(200) SET @AccountCalendarCode = '会计期间编码' --设置会计日历的结束日志 如果结束日期的确改变了 自行修改为最后一个会计期间的结束日期UPDATE  dbo.Base_AccountCalendarSET     ToDate = '2013-12-26 00:00:00' ----这个时间自行填入WHERE   Code = @AccountCalendarCode ---设置会计期间的开始结束日期UPDATE  Base_AccountingPeriodSET     FromDate = '2012-07-01 00:00:00' ,        ToDate = '2012-07-25 00:00:00'WHERE   AccountingCalendar IN ( SELECT  ID                                FROM    Base_AccountCalendar                                WHERE   Code = @AccountCalendarCode )        AND year = 2012        AND number = 7 UPDATE  Base_AccountingPeriodSET     FromDate = DATEADD(DAY, 25,                           DATEADD(month, -1,                                   CONVERT(DATETIME, dbo.FloatToStr(year)                                   + '-' + dbo.FloatToStr(Number) + '-01', 121))) ,        ToDate = DATEADD(DAY, 24,                         CONVERT(DATETIME, dbo.FloatToStr(year) + '-'                         + dbo.FloatToStr(Number) + '-01', 121))WHERE   AccountingCalendar IN ( SELECT  ID                                FROM    Base_AccountCalendar                                WHERE   Code = @AccountCalendarCode )        AND ( year > 2012              OR ( year = 2012                   AND number > 7                 )            ) --资产:UPDATE  FAPeriodSET     FAPeriod.FromDate = P.FromDate ,        FAPeriod.ToDate = P.ToDateFROM    FA_DepreciationBookPeriod FAPeriod        INNER JOIN Base_SOBAccountingPeriod SP ON FAPeriod.AccountingPeriod = SP.ID        INNER JOIN Base_AccountingPeriod P ON P.AccountingCalendar = ( SELECT                                                              id                                                              FROM                                                              dbo.Base_AccountCalendar                                                              WHERE                                                              code = @AccountCalendarCode                                                              )--预算.预算日历期间UPDATE  TBPSET     TBP.StartDate = StartP.FromDateFROM    CBO_TBCalendarPeriod TBP        INNER JOIN Base_AccountingPeriod StartP ON TBP.StartPeriod = StartP.IDWHERE   StartP.AccountingCalendar = ( SELECT    id                                      FROM      dbo.Base_AccountCalendar                                      WHERE     code = @AccountCalendarCode                                    )        AND TBP.StartDate <> StartP.FromDate UPDATE  TBPSET     TBP.StartDate = EndP.ToDateFROM    CBO_TBCalendarPeriod TBP        INNER JOIN Base_AccountingPeriod EndP ON TBP.EndPeriod = EndP.IDWHERE   EndP.AccountingCalendar = ( SELECT  id                                    FROM    dbo.Base_AccountCalendar                                    WHERE   code = @AccountCalendarCode                                  )        AND TBP.StartDate <> EndP.ToDate  --预算.预算期间UPDATE  TPSET     TP.StartDate = TBP.StartDate ,        TP.EndDate = TBP.EndDateFROM    CBO_TBPeriod TP        INNER JOIN CBO_TBCalendarPeriod TBP ON TP.TBCalendarPeriod = TBP.IDWHERE   ( TBP.StartPeriod = ( SELECT    ID                              FROM      dbo.Base_AccountingPeriod                              WHERE     AccountingCalendar IN (                                        SELECT  id                                        FROM    dbo.Base_AccountCalendar                                        WHERE   Code = @AccountCalendarCode )                            )          OR TBP.EndPeriod = ( SELECT   ID                               FROM     dbo.Base_AccountingPeriod                               WHERE    AccountingCalendar IN (                                        SELECT  id                                        FROM    dbo.Base_AccountCalendar                                        WHERE   Code = @AccountCalendarCode )                             )        )       

Tags:

BASECBO

补充空单号的存储过程

by 马杰 2011.8.5 13:05
补充空单号的存储过程 [更多...]

Tags:

BASECBO

通用的列表批量修改功能已经提供

by 祁宏伟 2011.7.25 11:08
通用的列表批量修改功能 [更多...]

Tags:

BASECBO

单选列表改成多选列表后 有BUG?

by 祁宏伟 2011.7.22 16:26
注:脚本执行有风险,对于客户正式环境请在研发指导下执行。select * from Base_User where Code='10030203' select * from Query_QueryCase where UserID =1001103093919815 and CaseModelID ='9541E535-C3F9-4ACA-A9AF-9112EB828A12' select * from UBF_MD_UIReference where uID like '04c5%' select * from aspnet_Parts where FormId like '04c5%' select * from Query_QueryCase where CaseModelID ='9541E535-C3F9-4ACA-A9AF-9112EB828A12' delete from Query_QueryCase where CaseModelID ='9541E535-C3F9-4ACA-A9AF-9112EB828A12'

Tags:

BASECBO

关于编码结构中流水号与实际不符的检索sql

by 马杰 2011.7.14 13:17
注:脚本执行有风险,对于客户正式环境请在研发指导下执行。 假设有三段,第三段为流水段:    ------客户部分    select A.ID,A.Code,B.CODE1,A.NextNo,B.NO+1 from Base_FlexFieldFlow A,  (select Segment1+'-'+Segment2 as CODE1,MAX(Segment3) AS NO from CBO_Customer group by Segment1,Segment2 ) B    where A.KeyFlexFieldStru in (2) and A.Code=B.CODE1 AND A.NextNo<=B.NO      --------供应商部分     select A.ID,A.Code,B.CODE1,A.NextNo,B.NO+1 from Base_FlexFieldFlow A,  (select Segment1+'-'+Segment2 as CODE1,MAX(Segment3) AS NO from CBO_Supplier group by Segment1,Segment2 ) B    where A.KeyFlexFieldStru in (4) and A.Code=B.CODE1 AND A.NextNo<=B.NO

Tags:

BASECBO

常用CBO支持问题修改脚本

by 祁宏伟 2011.7.7 11:28
常用CBO支持问题修改脚本 [更多...]

Tags:

BASECBO

修改料品可匹配参数步骤

by 祁宏伟 2011.7.6 13:02
注:脚本执行有风险,对于客户正式环境请在研发指导下执行。1 执行如下脚本update Base_Profile set Application=3000,ControlScope=2 where ID=2   2 打开基础设置—参数设置中知道找到是否启用匹配符参数 修改为true(打上勾)然后保存 3 找下料品参照测试下

Tags:

BASECBO

RecentComments

评论 RSS

Statistics

989 篇文章
0 个单页
652791 条评论
11 次评分
243677 次访问
访问统计开始于 2019年12月15日
平均日访问 5415 次
当前 84 人在线