开发案例分享-资产实物清单添加资产卡片的自定义字段

栏目:云星空知识作者:金蝶来源:金蝶云社区发布:2024-09-16浏览:1

开发案例分享-资产实物清单添加资产卡片的自定义字段

在固定资产卡片新增原资产编码字段,需要在资产实物清单进行显示


image.webp

image.webp


实现代码


using System;

using System.ComponentModel;

using System.Text;

using Kingdee.BOS;

using Kingdee.BOS.App;

using Kingdee.BOS.App.Data;

using Kingdee.BOS.Contracts;

using Kingdee.BOS.Core.Report;

using Kingdee.BOS.Util;

using Kingdee.K3.FIN.FA.App.Report;



namespace AssetListService.ServicePlugIn

{

    [Kingdee.BOS.Util.HotUpdate]

    [Description("资产卡片添加原资产编号")]

    public class AssetListService : AssetObjectListService

    {

        public override void BuilderReportSqlAndTempTable(IRptParams filter, string tableName)

        {

            IDBService service = ServiceHelper.GetService<IDBService>();

            this.customRptTempTableNames = service.CreateTemporaryTableName(base.Context, 1);

            string text = this.customRptTempTableNames[0];

            base.BuilderReportSqlAndTempTable(filter, text);

            StringBuilder stringBuilder = new StringBuilder();

            string format = "/*dialect*/SELECT t1.*,a3.F_PAEZ_HX_zichan into {0} FROM {1} t1 left join t_fa_card a3 on t1.FALTERID = a3.FALTERID";

            stringBuilder.AppendFormat(format, tableName, text);

            DBUtils.Execute(base.Context, stringBuilder.ToString());

        }


   

        public override ReportHeader GetReportHeaders(IRptParams filter)

        {

            ReportHeader reportHeaders = base.GetReportHeaders(filter);

            reportHeaders.AddChild("F_PAEZ_HX_zichan", new LocaleValue("原资产编号"));

            return reportHeaders;

        }



        public override void CloseReport()

        {

            bool flag = ObjectUtils.IsNullOrEmptyOrWhiteSpace(this.customRptTempTableNames);

            bool flag2 = !flag;

            if (flag2)

            {

                IDBService service = ServiceHelper.GetService<IDBService>();

                service.DeleteTemporaryTableName(base.Context, this.customRptTempTableNames);

                base.CloseReport();

            }

        }



        private string[] customRptTempTableNames;

    }

}



请问下,如何解决的,2楼陈sir的链接跳转到首页了


需求已经解决,感谢各位小伙伴


参看下述链接:https://vip.kingdee.com/article/285118202751868703


请大神不吝赐教,急急急

开发案例分享-资产实物清单添加资产卡片的自定义字段

在固定资产卡片新增原资产编码字段,需要在资产实物清单进行显示实现代码using System;using System.ComponentModel;using System.Text;...
点击下载文档
确认删除?
回到顶部
客服QQ
  • 客服QQ点击这里给我发消息