开发案例分享-资产实物清单添加资产卡片的自定义字段
在固定资产卡片新增原资产编码字段,需要在资产实物清单进行显示
实现代码
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
请大神不吝赐教,急急急
开发案例分享-资产实物清单添加资产卡片的自定义字段
本文2024-09-16 17:24:12发表“云星空知识”栏目。
本文链接:https://wenku.my7c.com/article/kingdee-k3cloud-15484.html