《K-3开发积累》由会员分享,可在线阅读,更多相关《K-3开发积累(18页珍藏版)》请在金锄头文库上搜索。
1、1. 删除已发布的功能Delete from t_DataFlowDetailFunc where fSubfuncid in (select FSubFuncID from t_DataFlowSubFunc where fFuncName=子功能名称) Delete t_DataFlowSubFunc where fFuncName=子功能名称 Update t_DataFlowTimeStamp set FName=FName 2. 计算公式Select * from icTemplate where fID = s01修改其中的fAction其中的 fDefaultCtrl为1时不能改
2、,为0时可以修改公式。3. 在基础资料中增加列3.1增加相应的表结构如(物料、客户等),增加自己列(fOperCode)3.2往表 ItemPropDesc 中增加相应数据3.3在t_IcItemCustom中增加相应列(t_Item)3.4更新t_IcItemCustom中数据,如:Update t_ICItemCustom SetfOperCode = b.fOperCodeFromt_ICItemCustom a , t_Item bwhere a.fItemID = b.fItemID3.5执行exec SP_CREATE_ICItem_VIEWexec SP_CREATE_ICIte
3、m_TRIGGER-Select * from t_ItemClass-客户Alter Table t_Organization Add fOperCode varchar(30)INSERT INTO t_ItemPropDesc (FItemClassID,FPropID,FName,FName_en,FName_cht,FSQLColumnName,FDataType,FPrecision,FScale,FActualType,FActualSize,FBehavior,FSearch,FSrcTable,FSrcField,FDisplayField,FDefaultValue,FPa
4、geName,FPageName_en,FPageName_cht,FComCall,FIsShownList,FViewMask) VALUES (1, 102, 业务系统代码, 业务系统代码, 业务系统代码, fOperCode, 200, 30, 0, 200, 30, NULL, 0, NULL, NULL, NULL, NULL, 1.基本资料, 1. Basic Data, 1.基本資料, NULL, 0, 0)-部门Alter Table t_Department Add fOperCode varchar(30)INSERT INTO t_ItemPropDesc (FItem
5、ClassID,FPropID,FName,FName_en,FName_cht,FSQLColumnName,FDataType,FPrecision,FScale,FActualType,FActualSize,FBehavior,FSearch,FSrcTable,FSrcField,FDisplayField,FDefaultValue,FPageName,FPageName_en,FPageName_cht,FComCall,FIsShownList,FViewMask) VALUES (2, 102, 业务系统代码, 业务系统代码, 业务系统代码, fOperCode, 200,
6、30, 0, 200, 30, NULL, 0, NULL, NULL, NULL, NULL, 1.基本资料, 1. Basic Data, 1.基本資料, NULL, 0, 0)-职员Alter Table t_Emp Add fOperCode varchar(30)INSERT INTO t_ItemPropDesc (FItemClassID,FPropID,FName,FName_en,FName_cht,FSQLColumnName,FDataType,FPrecision,FScale,FActualType,FActualSize,FBehavior,FSearch,FSrc
7、Table,FSrcField,FDisplayField,FDefaultValue,FPageName,FPageName_en,FPageName_cht,FComCall,FIsShownList,FViewMask) VALUES (3, 102, 业务系统代码, 业务系统代码, 业务系统代码, fOperCode, 200, 30, 0, 200, 30, NULL, 0, NULL, NULL, NULL, NULL, 1.基本资料, 1. Basic Data, 1.基本資料, NULL, 0, 0)-物料Alter Table t_Item Add fOperCode var
8、char(30)INSERT INTO t_ItemPropDesc (FItemClassID,FPropID,FName,FName_en,FName_cht,FSQLColumnName,FDataType,FPrecision,FScale,FActualType,FActualSize,FBehavior,FSearch,FSrcTable,FSrcField,FDisplayField,FDefaultValue,FPageName,FPageName_en,FPageName_cht,FComCall,FIsShownList,FViewMask) VALUES (4, 102,
9、 业务系统代码, 业务系统代码, 业务系统代码, fOperCode, 200, 30, 0, 200, 30, NULL, 0, NULL, NULL, NULL, NULL, 1.基本资料, 1. Basic Data, 1.基本資料, NULL, 0, 0)exec SP_CREATE_ICItem_VIEWexec SP_CREATE_ICItem_TRIGGER4. 客户希望在销售订单的审核事件中加入一些控制条件,由于是老单据,在插件中抓不到审核事件,请高手指教!审核需要在中间层插件去做。做一个中间层Dll,如MidSample.dll,有一个类如clsMid.cls。在这个类中加入
10、下面的代码:Public Function HookInvoke(ByVal pEventID As Long, Para As KFO.Dictionary) As Boolean On Error GoTo e If pEventID = 200003 Then 200004取自t_ThirdPartyComponent表FtypedetailID字段 增加自己的代码 If Para(OperateCode) = 1 Then 1审核 2反审核 If Para(TranType) = 81 Then 销售订单 If (CanCheck = False) Then CanCheck可以是自己
11、判断审核条件的函数 Para(ErrCode) = 33 可以自定义 Para(ErrSource) = XX审核判断组件 Para(ErrDescription) = XX提示:不能审核 HookInvoke = False Exit Function Else HookInvoke = True Exit Function End If End If End If End If HookInvoke = True Exit Functione: HookInvoke = FalseEnd Function这个类要在t_ThirdPartyComponent中注册,注册的SQL如下:inse
12、rt t_ThirdPartyComponent (FTypeID,FTypeDetailID,FIndex,FComponentName,FComponentSrv,FDescription) values ( 2,200003,-2, MidSample.clsMid,)5. 辅助属性Select * from t_ItemClass where fType in (3, 4)Select FAuxClassID from t_IcItem where FAuxClassID 06. 老单插件SQL-有关老单的插件注册-FTypeDetailID为单据类型21是销售出库单-有关fTypeD
13、etailID 在ICTransactionType表中查询Delete FROM t_ThirdPartyComponent WHERE (FTypeDetailID = 21)insert t_ThirdPartyComponent (FTypeID,FTypeDetailID,FIndex,FComponentName,FComponentSrv,FDescription) values ( 0,21,-2,K3Serial.CSerialInput,K3MSerial.WriteData,单据序列号客户端组件)insert t_ThirdPartyComponent (FTypeID,
14、FTypeDetailID,FIndex,FComponentName,FComponentSrv,FDescription) values ( 0,21,-1,SettlePlugInForICBill.RetailSettles,POSORMapping.RetailBillWSvr,销售出库单多种结算方式)insert t_ThirdPartyComponent (FTypeID,FTypeDetailID,FIndex,FComponentName,FComponentSrv,FDescription) values ( 0,21,-3,OutPlus.clsOut,南通港口销售出库单插件(提取装卸作业单相关成本)insert t_ThirdPartyComponent (FTypeID,FTypeDetailID,FIndex,FComponentName,FComponentSrv,FDescription) values ( 0,21,0, , , )GoCode1. 插件引用 位置: D:Kingdee项目保华集团OrdComp