Compare commits
2 Commits
c8cb278e9d
...
06e602ee2d
| Author | SHA1 | Date | |
|---|---|---|---|
| 06e602ee2d | |||
| 695b33a814 |
@ -128,4 +128,7 @@
|
|||||||
<Content Include="Library\NPOI.OpenXmlFormats.dll" />
|
<Content Include="Library\NPOI.OpenXmlFormats.dll" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<PostBuildEvent>copy $(TargetPath) "D:\Program Files (x86)\Kingdee\K3Cloud\WebSite\Bin\$(TargetFileName)"</PostBuildEvent>
|
||||||
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
||||||
@ -51,57 +51,34 @@ namespace GZ_LTHReportForms.JiXiaoKanBan
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 报表列表头
|
/// 填充过滤条件
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="filter"></param>
|
/// <param name="filter"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public override ReportHeader GetReportHeaders(IRptParams filter)
|
public override ReportTitles GetReportTitles(IRptParams filter)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
ReportTitles reportTitles = new ReportTitles();
|
||||||
DynamicObject customFilter = filter.FilterParameter.CustomFilter;
|
DynamicObject customFilter = filter.FilterParameter.CustomFilter;
|
||||||
|
if (customFilter == null)
|
||||||
base.GetReportHeaders(filter);
|
|
||||||
|
|
||||||
ReportHeader header = new ReportHeader();
|
|
||||||
|
|
||||||
|
|
||||||
// 下单时间
|
|
||||||
int currentYear = DateTime.Now.Year;
|
|
||||||
|
|
||||||
|
|
||||||
string fDate = (customFilter["FSDate"] == null) ? Convert.ToString(currentYear) : Convert.ToDateTime(
|
|
||||||
customFilter["FSDate"]).ToString("yyyy-MM-dd");
|
|
||||||
|
|
||||||
int year = Convert.ToInt32(fDate.Split('-')[0]);
|
|
||||||
|
|
||||||
header.AddChild("F_SBU", new LocaleValue("SBU"), SqlStorageType.Sqlvarchar);
|
|
||||||
header.AddChild("F_MXQY", new LocaleValue("明细区域"), SqlStorageType.Sqlvarchar);
|
|
||||||
header.AddChild("销售员", new LocaleValue("销售员"), SqlStorageType.Sqlvarchar);
|
|
||||||
header.AddChild("本年业绩目标_万元", new LocaleValue("" + year + "年业绩目标(万元)"), SqlStorageType.SqlDecimal);
|
|
||||||
header.AddChild("本年派诺业绩_万元", new LocaleValue("" + year + "派诺业绩(万元)"), SqlStorageType.SqlDecimal);
|
|
||||||
header.AddChild("本年兴诺业绩_万元", new LocaleValue("" + year + "兴诺业绩(万元)"), SqlStorageType.SqlDecimal);
|
|
||||||
header.AddChild("本年武汉派诺_万元", new LocaleValue("" + year + "武汉派诺(万元)"), SqlStorageType.SqlDecimal);
|
|
||||||
header.AddChild("本年碳索业绩_万元", new LocaleValue("" + year + "碳索业绩(万元)"), SqlStorageType.SqlDecimal);
|
|
||||||
header.AddChild("本年香港派诺业绩_万元", new LocaleValue("" + year + "香港派诺业绩(万元)"), SqlStorageType.SqlDecimal);
|
|
||||||
header.AddChild("本年华夏云联业绩_万元", new LocaleValue("" + year + "华夏云联业绩(万元)"), SqlStorageType.SqlDecimal);
|
|
||||||
header.AddChild("本年诺瓦数能业绩_万元", new LocaleValue("" + year + "诺瓦数能业绩(万元)"), SqlStorageType.SqlDecimal);
|
|
||||||
header.AddChild("往年订单变更金额_万元", new LocaleValue("往年订单变更金额(万元)"), SqlStorageType.SqlDecimal);
|
|
||||||
header.AddChild("本年业绩合计_万元", new LocaleValue("" + year + "合计业绩额(万元)"), SqlStorageType.SqlDecimal);
|
|
||||||
header.AddChild("达标率", new LocaleValue("达标率"), SqlStorageType.Sqlvarchar);
|
|
||||||
header.AddChild("去年合计业绩额_万元", new LocaleValue("" + (year - 1) + "合计业绩额(万元)"), SqlStorageType.SqlDecimal);
|
|
||||||
header.AddChild("同比增长率", new LocaleValue("同比增长率"), SqlStorageType.Sqlvarchar);
|
|
||||||
header.AddChild("本年回款目标_万元", new LocaleValue("" + year + "回款目标(万元)"), SqlStorageType.SqlDecimal);
|
|
||||||
header.AddChild("回款额_万元", new LocaleValue("回款额(万元)"), SqlStorageType.SqlDecimal);
|
|
||||||
header.AddChild("回款率", new LocaleValue("回款率"), SqlStorageType.Sqlvarchar);
|
|
||||||
header.AddChild("已发货应收款_万元", new LocaleValue("已发货应收款(万元)"), SqlStorageType.SqlDecimal);
|
|
||||||
header.AddChild("已到期应收款_万元", new LocaleValue("已到期应收款(万元)"), SqlStorageType.SqlDecimal);
|
|
||||||
|
|
||||||
foreach (var item in header.GetChilds())
|
|
||||||
{
|
{
|
||||||
item.Width = 160;
|
return reportTitles;
|
||||||
}
|
}
|
||||||
return header;
|
// 供需组织 List
|
||||||
}
|
var salesPersons = customFilter["F_Salesperson"] as DynamicObjectCollection;
|
||||||
|
if (salesPersons.Count > 0)
|
||||||
|
{
|
||||||
|
reportTitles.AddTitle("F_Salesperson", string.Join(",", salesPersons.Select(n => n["Name"].ToString())));
|
||||||
|
}
|
||||||
|
var startDate = Convert.ToDateTime(customFilter["FSDate"]);
|
||||||
|
var endDate = Convert.ToDateTime(customFilter["FEDate"]);
|
||||||
|
|
||||||
|
reportTitles.AddTitle("FStartDate", startDate.ToString("yyyy-MM-dd"));
|
||||||
|
|
||||||
|
reportTitles.AddTitle("FEndDate", endDate.ToString("yyyy-MM-dd"));
|
||||||
|
|
||||||
|
return reportTitles;
|
||||||
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 显示报表数据
|
/// 显示报表数据
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -134,6 +111,59 @@ namespace GZ_LTHReportForms.JiXiaoKanBan
|
|||||||
DBUtils.Execute(this.Context, sql);
|
DBUtils.Execute(this.Context, sql);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 报表列表头
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="filter"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public override ReportHeader GetReportHeaders(IRptParams filter)
|
||||||
|
{
|
||||||
|
DynamicObject customFilter = filter.FilterParameter.CustomFilter;
|
||||||
|
|
||||||
|
base.GetReportHeaders(filter);
|
||||||
|
|
||||||
|
ReportHeader header = new ReportHeader();
|
||||||
|
// 下单时间
|
||||||
|
int currentYear = DateTime.Now.Year;
|
||||||
|
|
||||||
|
|
||||||
|
string fDate = (customFilter["FSDate"] == null) ? Convert.ToString(currentYear) : Convert.ToDateTime(
|
||||||
|
customFilter["FSDate"]).ToString("yyyy-MM-dd");
|
||||||
|
|
||||||
|
int year = Convert.ToInt32(fDate.Split('-')[0]);
|
||||||
|
|
||||||
|
header.AddChild("F_SBU", new LocaleValue("SBU"), SqlStorageType.Sqlvarchar);
|
||||||
|
header.AddChild("F_MXQY", new LocaleValue("明细区域"), SqlStorageType.Sqlvarchar);
|
||||||
|
header.AddChild("销售员", new LocaleValue("销售员"), SqlStorageType.Sqlvarchar);
|
||||||
|
header.AddChild("本年业绩目标_万元", new LocaleValue("" + year + "年业绩目标(万元)"), SqlStorageType.SqlDecimal);
|
||||||
|
header.AddChild("本年派诺业绩_万元", new LocaleValue("" + year + "派诺业绩(万元)"), SqlStorageType.SqlDecimal);
|
||||||
|
header.AddChild("本年兴诺业绩_万元", new LocaleValue("" + year + "兴诺业绩(万元)"), SqlStorageType.SqlDecimal);
|
||||||
|
header.AddChild("本年武汉派诺_万元", new LocaleValue("" + year + "武汉派诺(万元)"), SqlStorageType.SqlDecimal);
|
||||||
|
header.AddChild("本年碳索业绩_万元", new LocaleValue("" + year + "碳索业绩(万元)"), SqlStorageType.SqlDecimal);
|
||||||
|
header.AddChild("本年香港派诺业绩_万元", new LocaleValue("" + year + "香港派诺业绩(万元)"), SqlStorageType.SqlDecimal);
|
||||||
|
header.AddChild("本年华夏云联业绩_万元", new LocaleValue("" + year + "华夏云联业绩(万元)"), SqlStorageType.SqlDecimal);
|
||||||
|
header.AddChild("本年诺瓦数能业绩_万元", new LocaleValue("" + year + "诺瓦数能业绩(万元)"), SqlStorageType.SqlDecimal);
|
||||||
|
header.AddChild("往年订单变更金额_万元", new LocaleValue("往年订单变更金额(万元)"), SqlStorageType.SqlDecimal);
|
||||||
|
header.AddChild("本年业绩合计_万元", new LocaleValue("" + year + "合计业绩额(万元)"), SqlStorageType.SqlDecimal);
|
||||||
|
header.AddChild("达标率", new LocaleValue("达标率"), SqlStorageType.Sqlvarchar);
|
||||||
|
header.AddChild("去年合计业绩额_万元", new LocaleValue("" + (year - 1) + "合计业绩额(万元)"), SqlStorageType.SqlDecimal);
|
||||||
|
header.AddChild("同比增长率", new LocaleValue("同比增长率"), SqlStorageType.Sqlvarchar);
|
||||||
|
header.AddChild("本年回款目标_万元", new LocaleValue("" + year + "回款目标(万元)"), SqlStorageType.SqlDecimal);
|
||||||
|
header.AddChild("回款额_万元", new LocaleValue("回款额(万元)"), SqlStorageType.SqlDecimal);
|
||||||
|
header.AddChild("回款率", new LocaleValue("回款率"), SqlStorageType.Sqlvarchar);
|
||||||
|
header.AddChild("已发货应收款_万元", new LocaleValue("已发货应收款(万元)"), SqlStorageType.SqlDecimal);
|
||||||
|
header.AddChild("已到期应收款_万元", new LocaleValue("已到期应收款(万元)"), SqlStorageType.SqlDecimal);
|
||||||
|
|
||||||
|
foreach (var item in header.GetChilds())
|
||||||
|
{
|
||||||
|
item.Width = 160;
|
||||||
|
}
|
||||||
|
return header;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//报表过滤条件-多选销售员
|
//报表过滤条件-多选销售员
|
||||||
private string GetFilterWhere(IRptParams filter)
|
private string GetFilterWhere(IRptParams filter)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user