1
This commit is contained in:
parent
0cf24f34c1
commit
064bd4be1b
@ -13,6 +13,9 @@ using Kingdee.BOS.Orm.DataEntity;
|
|||||||
using System.Data;
|
using System.Data;
|
||||||
using Pilot.Report.Exploitation.PublicClass;
|
using Pilot.Report.Exploitation.PublicClass;
|
||||||
using Pilot.Report.Exploitation.Common;
|
using Pilot.Report.Exploitation.Common;
|
||||||
|
using NPOI.SS.Formula.Functions;
|
||||||
|
using Kingdee.BOS.Core.Enums;
|
||||||
|
using DocumentFormat.OpenXml.Bibliography;
|
||||||
|
|
||||||
namespace Pilot.Report.Exploitation.ResultsKanbanSummary
|
namespace Pilot.Report.Exploitation.ResultsKanbanSummary
|
||||||
{
|
{
|
||||||
@ -34,7 +37,7 @@ namespace Pilot.Report.Exploitation.ResultsKanbanSummary
|
|||||||
this.IsCreateTempTableByPlugin = true;
|
this.IsCreateTempTableByPlugin = true;
|
||||||
//
|
//
|
||||||
this.IsCreateTempTableByPlugin = true;
|
this.IsCreateTempTableByPlugin = true;
|
||||||
//
|
//支持分组汇总
|
||||||
this.ReportProperty.IsGroupSummary = true;
|
this.ReportProperty.IsGroupSummary = true;
|
||||||
//
|
//
|
||||||
this.ReportProperty.SimpleAllCols = false;
|
this.ReportProperty.SimpleAllCols = false;
|
||||||
@ -139,20 +142,37 @@ namespace Pilot.Report.Exploitation.ResultsKanbanSummary
|
|||||||
StringBuilder strwhere = new StringBuilder(); //创建字符串构建器;
|
StringBuilder strwhere = new StringBuilder(); //创建字符串构建器;
|
||||||
|
|
||||||
var xsy = customFilter["F_Salesperson"] as DynamicObjectCollection;
|
var xsy = customFilter["F_Salesperson"] as DynamicObjectCollection;
|
||||||
|
strwhere.AppendLine("WHERE 1 = 1");
|
||||||
|
if (xsy.Count > 0) {
|
||||||
|
List<string> xsyList = new List<string>();
|
||||||
|
//循环获取物料信息
|
||||||
|
foreach (DynamicObject dobj in xsy)
|
||||||
|
{
|
||||||
|
xsyList.Add(Convert.ToString((dobj["F_Salesperson"] as DynamicObject)["Name"]));
|
||||||
|
}
|
||||||
|
strwhere.AppendFormat(string.Format(@"AND 销售员 IN ({0})"),string.Join(",",xsyList.ToArray()));
|
||||||
|
}
|
||||||
|
return strwhere.ToString();
|
||||||
|
}
|
||||||
|
|
||||||
//判定为空情况
|
//设置报表合计列
|
||||||
if (xsy == null && xsy.Count <= 0)
|
public override List<SummaryField> GetSummaryColumnInfo(IRptParams filter)
|
||||||
{
|
{
|
||||||
strwhere.AppendLine("where 1=1");
|
var result = base.GetSummaryColumnInfo(filter);
|
||||||
}
|
result.Add(new SummaryField("本年业绩目标_万元", BOSEnums.Enu_SummaryType.SUM));
|
||||||
else
|
result.Add(new SummaryField("本年派诺业绩_万元", BOSEnums.Enu_SummaryType.SUM));
|
||||||
{
|
result.Add(new SummaryField("本年兴诺业绩_万元", BOSEnums.Enu_SummaryType.SUM));
|
||||||
//当字段不为空时
|
result.Add(new SummaryField("本年武汉派诺_万元", BOSEnums.Enu_SummaryType.SUM));
|
||||||
strwhere.AppendFormat("where 1=1");
|
result.Add(new SummaryField("本年碳索业绩_万元", BOSEnums.Enu_SummaryType.SUM));
|
||||||
strwhere.AppendFormat("AND [销售员] IN ({0})",string.Join(",",xsy.Select(n => ObjectUtils.Object2String(
|
result.Add(new SummaryField("本年香港派诺业绩_万元", BOSEnums.Enu_SummaryType.SUM));
|
||||||
n["F_Salesperson_FName"]))));
|
result.Add(new SummaryField("本年华夏云联业绩_万元", BOSEnums.Enu_SummaryType.SUM));
|
||||||
}
|
result.Add(new SummaryField("往年订单变更金额_万元", BOSEnums.Enu_SummaryType.SUM));
|
||||||
return strwhere.ToString();
|
result.Add(new SummaryField("本年业绩合计_万元", BOSEnums.Enu_SummaryType.SUM));
|
||||||
|
result.Add(new SummaryField("去年合计业绩额_万元", BOSEnums.Enu_SummaryType.SUM));
|
||||||
|
result.Add(new SummaryField("回款额_万元", BOSEnums.Enu_SummaryType.SUM));
|
||||||
|
result.Add(new SummaryField("已发货应收款_万元", BOSEnums.Enu_SummaryType.SUM));
|
||||||
|
result.Add(new SummaryField("已到期应收款_万元", BOSEnums.Enu_SummaryType.SUM));
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user