没有合适的资源?快使用搜索试试~ 我知道了~
首页用友U9系统客开常用代码.pdf
用友U9系统客开常用代码.pdf
需积分: 15 48 下载量 96 浏览量
更新于2023-03-03
评论 3
收藏 814KB PDF 举报
多年用友U9系统二次开发的经验总结,包含日常所涉及到的所有方面,一般的定制化开发需求,都可从本文档中找到相关的开发代码,对新手和从业人员应该有一定帮助。
资源详情
资源评论
资源推荐
PO终止,后台改状态脚本
update PM_POLine set Cancel_Canceled = 0,Cancel_CancelDate=null,Cancel_CancelUser =null,Cancel_CancelReason= null
where PurchaseOrder in( select ID from PM_PurchaseOrder where DocNo = '564191')
update PM_POShipLine set Cancel_Canceled = 0,Cancel_CancelDate=null,Cancel_CancelUser =null,Cancel_CancelReason= null
where POLine in (select ID from PM_POLine where PurchaseOrder in( select ID from PM_PurchaseOrder where DocNo = '564191'))
update PM_PurchaseOrder set Cancel_Canceled = 0,Cancel_CancelDate=null,Cancel_CancelUser =null,Cancel_CancelReason= null
where DocNo = '564191'
改系统启用状态的脚本
update UBF_SM_AppState set IsEnabled = 0,EnableDate=null,EnableUser = null where ID = 1001910293209585
查用户操作记录
select * from UBF_Portal_OperationRecord where OccurrenceTime >= '2014-01-04 12:25:30' and OccurrenceTime < '2014-01-04 12:55:57'
库存在手量更新
exec P_InvTrans_WhQohRebuild '','1002305137407081'---料品ID,空表示全部
账簿科目失效
update CBO_NaturalAccountSOBProperty set Effective_IsEffective = 0 where Org in (select ID from Base_Organization where Code = '015')
取堆位计划数据到过磅系统中间表
select OrgCode,ShipmentNo,LWPO,a.CabinetNo,c.Code,a.DescFlexSegments_PrivateDescSeg1,d.Name
from LM_HeapBitPlanLine a join LM_HeapBitPlan b on a.HeapBitPlan = b.ID left join CBO_Bin c on a.Bin = c.ID
left join (select EValue,Name from UBF_Sys_ExtEnumValue x join UBF_Sys_ExtEnumValue_Trl y on x.ID = y.ID where ExtEnumTypeUID in (select UID from ubf_sys_extenumtype where Code =
'UFIDA.U9.Cust.LM.Lit.UserPubLicBE.DisLocalEnum')) d on a.DisLocalEnum = d.EValue
where b.Org = 1002106211219055 and b.DocStatusEnum = 2 and a.PlanStatusEnum in (0,2) and a.Bin is not null
and a.CabinetNo in ('')
INSERT INTO U9_LOC_Interface(cmpNo,SHIPMENT_NO,PO_NO,CNTR_NO,LOC_NO,Machine_NO,CreateBy,CreateDate,unloadplate)VALUES('971','IJX1314626','34470130','CCLU7372378','0203D','28車間','Tolly','2014-02-12','1#卸貨臺')
--更新实体类型值集值
update Base_ValueSetDef set EntityType =1002703219891445,CodeAttribute = 1002703219891453,NameAttribute = 1002703219891454 where Code = 'ItemSpec'
--更新枚举类型值集值
update Base_ValueSetDef set EnumType = 1002312283452368 where Code = 'TCEnum'
--select EntityType,CodeAttribute,* from Base_ValueSetDef where Code = 'ItemSpec'
---查找实体或枚举对应的ID
select ID,* from UBF_MD_Class where FullName like '%ItemSpec' order by CreateTime desc
----查找实体下字段的ID
select Name,* from UBF_MD_Attribute where MD_Class_ID = '4FFBABAD-32EC-477C-963F-3AD6139427A9'
----凭证签字加内账连接串
insert into GD_CUST_IQCParameter values(1002706044798845,getdate(),'Tolly',getdate(),'Tolly',0,'neizhangIP','172.23.1.219:MRPRW:^M2dmin','leemanpaper',1002705253515024)
----查死锁
select * from sys.sysprocesses where blocked <> 0
select * from sys.sysprocesses order by waitresource
---查报表词条及对应报表名
select cValue,c.cName,c.cDescription from UBF_MD_ASRPT_ReportTemplate_lang a join UBF_MD_ASRPT_Category c on A.uReportID = c.ID where a.cKey + convert(nvarchar(500),a.uReportID) in (
select cKey + convert(nvarchar(500),uReportID) from (
select cKey,uReportID,count(*) num from UBF_MD_ASRPT_ReportTemplate_lang group by cKey,uReportID) aa where num = 1
) and a.cCulture = 'zh-CN'
---查U9页面、菜单词条
select r.DisplayName,t.DisplayName from UBF_RES_ResourceValue r
join UBF_MD_UIRComponent u on r.ComponentID = u.UID join UBF_MD_UIRComponent_trl t on u.ID = t.ID and t.SysMLFlag = 'zh-CN'
where 1=1
and r.[Type] not
in('BEEntityStereotype','BEEventAttribute','BPEvent','BEAutoEvent','BPEventAttribute','BPOperationAttribute','BPOperationImplementsOperation','SvrOperationAttribute','SvrOperationImplementsOperation','SvrExceptionAttribute',
'BPExceptionAttribute','BEExceptionAttribute','BEException','BPException','SvrException','Uimcomponent','DicComponent')
and r.ComponentID in (select distinct ID from UBF_MD_Component where AssemblyName like '%Cust.%' or AssemblyName like '%LM%'
union all
select distinct UID from UBF_MD_UIForm where AssemblyName like '%Cust.%' or AssemblyName like '%LM%'
union all
select distinct m.UID from UBF_MD_UIModel m join UBF_MD_UIComponent c on m.UIComponent = c.ID where c.AssemblyName like '%Cust.%' or c.AssemblyName like '%LM%'
union all
select distinct UID from UBF_MD_UIRComponent where URI like '%Cust.%' or URI like '%LM%')
-----更新收货单立账方式(凭单制、非凭单制)
update PM_RcvLine set ConfirmMode = 0 where receivement in (select id from PM_Receivement where org = 1002705221521670 and Status = 0)
----Postback支持的事件
UFDateGridEventName.OnCellFocusEnter
----越南收货报“未将对象*****”
select *
DELETE
from LM_IQC_RcvDoc_RcvIqcRel where RcvDoc in (select ID from PM_Receivement where docno = 'YNMZ16020052')
and RcvLine not in (select ID from PM_RcvLine where receivement in (select ID from PM_Receivement where docno = 'YNMZ16020052') )
--------审批中单据改为开立
update CBO_ItemCodeApplyDoc set DocState = 0,WFCurrentState = -1,WFOriginalState=-1
where docno in
('REQ028968','REQ028975','REQ028976','REQ028977','REQ028978','REQ028979','REQ028980','REQ028981','REQ028982','REQ028983','REQ028984','REQ028985','REQ028986','REQ028987','REQ028988','REQ028989','REQ028991','REQ028992','REQ028
993')
----结算单未生单,改未生单状态
select DescFlexField_PrivateDescSeg27,* from KK_SettlementCoal where docno like '%GLM201605009%'
update KK_SettlementCoal set DescFlexField_PrivateDescSeg27 = '' where docno like '%GLM201605009%'
delete from KK_SettlementLinkAllDoc where DocType='成本调整单' and SettlementCoal=1003308310578339
---没有分录处理
update KK_SettlementCoal set status = 2 where docno like '%GLM201604008_02%'
exec p_GetNewDocData 1003304188593934,'领用和在途',0,'','',''
----转售查询
select distinct C.lm_po_no ,A.shipment_no,A.po_no,A.U9_po_no,sum_Weight,sum_No,Is_Transfer_Factory,Transfer_Customer_Id,contract_customer_id,
B.Is_Transfer_Factory,case when Terms_Of_Trade = 'T' then '一般贸易' else '来料加工' end as Terms_Of_Trade,C.So_No as factory_Po,invoice_no,invoice_date,invoice_amount, customs_clear_date as u9
_grn_date,b.transfer_date from
( select shipment_no,po_no,prod_id,U9_po_no,sum(net_weight) sum_Weight,sum(no_of_bales) sum_No from u9_shipment_po_cntr_dtl where company_id=75 and Roll_over_flag='N' and (u9_trans_flag is null or u9
U9
脚本大全
2012年7月26日
12:21
分区 常用代码 的第
1
页
( select shipment_no,po_no,prod_id,U9_po_no,sum(net_weight) sum_Weight,sum(no_of_bales) sum_No from u9_shipment_po_cntr_dtl where company_id=75 and Roll_over_flag='N' and (u9_trans_flag is null or u9
_trans_flag='' or u9_trans_flag='N') group by shipment_no,po_no,prod_id,U9_po_no) A
inner join u9_inland_track_hdr B on A.shipment_no=B.Shipment_No
inner join u9_po_hdr C on A.po_no=C.Po_No
inner join Acct_Ar D on D.Company_Id=B.Company_Id and D.so_no=C.So_No and A.shipment_no=D.Shipment_No
where B.company_id='75'
and Is_Transfer_Factory='Y'
and nvl(Transfer_Customer_Id,'')<> 860
and contract_customer_id=860
AND invoice_date > ADD_MONTHS(SYSDATE,-6)
--and a.shipment_no = 'IDG1607375'
---国废批量采购超交期审不了
declare @FlowInstance bigint,@BatchPO bigint,@BatchPOLine bigint
--查询批量采购订单信息
select
@FlowInstance=a.FlowInstance,
@BatchPO=a.id,
@BatchPOLine=c.ID
from Cust_LM_Waste_BatchPO a
inner join Cust_LM_Waste_BatchPOSupplier b on a.id=b.bathpo
inner join Cust_LM_Waste_BatchPOLine c on b.id=c.BathPOSupplier
where a.docno='CPPG17010296'
--修改审批流状态 设为开立 修改交期
update Cust_LM_Waste_BatchPO set Status=0,WFCurrentState=-1,WFOriginalState=-1 where id=@BatchPO
--删除流程实例信息
delete CS_Workflow_FlowInstance where id=@FlowInstance
delete CS_Workflow_FlowInstance_trl where id=@FlowInstance
分区 常用代码 的第
2
页
------BE------
2010年2月4日
20:57
分区 常用代码 的第 3 页
/// <summary>
/// 设置默认值
/// </summary>
protected override void OnSetDefaultValue()
base.OnSetDefaultValue();
{
if (this.Org == null)
{
this.Org = UFIDA.U9.Base.Context.LoginOrg;
}
}
赋默认组织
2010年2月4日
20:17
分区 常用代码 的第 4 页
UFSoft.UBF.Util.Context.PlatformContext.Current.EnterpriseID
UFSoft.UBF.Util.Context.PlatformContext.Current.EnterpriseName
获取上下文企业信息
2014年7月8日
8:56
分区 常用代码 的第 5 页
剩余64页未读,继续阅读
jankidt
- 粉丝: 2
- 资源: 2
上传资源 快速赚钱
- 我的内容管理 收起
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
会员权益专享
最新资源
- 27页智慧街道信息化建设综合解决方案.pptx
- 计算机二级Ms-Office选择题汇总.doc
- 单链表的插入和删除实验报告 (2).docx
- 单链表的插入和删除实验报告.pdf
- 物联网智能终端项目设备管理方案.pdf
- 如何打造品牌的模式.doc
- 样式控制与页面布局.pdf
- 武汉理工Java实验报告(二).docx
- 2021线上新品消费趋势报告.pdf
- 第3章 Matlab中的矩阵及其运算.docx
- 基于Web的人力资源管理系统的必要性和可行性.doc
- 基于一阶倒立摆的matlab仿真实验.doc
- 速运公司物流管理模式研究教材
- 大数据与管理.pptx
- 单片机课程设计之步进电机.doc
- 大数据与数据挖掘.pptx
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0