Merge branch 'master' of http://8.130.121.29:3000/TianHua/Piolot_RepotForm
This commit is contained in:
commit
df591445e9
@ -188,11 +188,9 @@
|
|||||||
<Compile Include="ContractDetails\ContractDetailsReport.cs" />
|
<Compile Include="ContractDetails\ContractDetailsReport.cs" />
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
<Compile Include="PublicClass\EnvironmentTEST.cs" />
|
<Compile Include="PublicClass\EnvironmentTEST.cs" />
|
||||||
<Compile Include="Receivables\ReceivablesAutoExecute.cs" />
|
|
||||||
<Compile Include="Receivables\ReceivablseGL.cs" />
|
<Compile Include="Receivables\ReceivablseGL.cs" />
|
||||||
<Compile Include="Receivables\ReceivablesDetails.cs" />
|
<Compile Include="Receivables\ReceivablesDetails.cs" />
|
||||||
<Compile Include="ResultsKanbanSummary\ResultsKanbanSumReport.cs" />
|
<Compile Include="ResultsKanbanSummary\ResultsKanbanSumReport.cs" />
|
||||||
<Compile Include="ResultsKanbanSummary\ResultsReportServicePlugIn.cs" />
|
|
||||||
<Compile Include="SaleOrderProgress\PHBSaleOrderReport.cs" />
|
<Compile Include="SaleOrderProgress\PHBSaleOrderReport.cs" />
|
||||||
<Compile Include="SaleOrderProgress\SaleOrderProgressReport.cs" />
|
<Compile Include="SaleOrderProgress\SaleOrderProgressReport.cs" />
|
||||||
<Compile Include="SpecialDetails\SpecialDetailsPlugIn.cs" />
|
<Compile Include="SpecialDetails\SpecialDetailsPlugIn.cs" />
|
||||||
|
@ -38,8 +38,6 @@ namespace Pilot.Report.Exploitation.ResultsKanbanSummary
|
|||||||
this.ReportProperty.IsGroupSummary = true;
|
this.ReportProperty.IsGroupSummary = true;
|
||||||
//
|
//
|
||||||
this.ReportProperty.SimpleAllCols = false;
|
this.ReportProperty.SimpleAllCols = false;
|
||||||
// 单据主键:两行FID相同,则为同一单的两条分录,单据编号可以不重复显示
|
|
||||||
this.ReportProperty.PrimaryKeyFieldName = "FID";
|
|
||||||
//
|
//
|
||||||
this.ReportProperty.IsDefaultOnlyDspSumAndDetailData = true;
|
this.ReportProperty.IsDefaultOnlyDspSumAndDetailData = true;
|
||||||
|
|
||||||
@ -70,14 +68,12 @@ namespace Pilot.Report.Exploitation.ResultsKanbanSummary
|
|||||||
ReportHeader header = new ReportHeader();
|
ReportHeader header = new ReportHeader();
|
||||||
|
|
||||||
// 下单时间
|
// 下单时间
|
||||||
string fDate = customFilter["F_Date"]?.ToString();
|
string fDate = customFilter["FSDate"]?.ToString();
|
||||||
|
|
||||||
int year = Convert.ToInt32(fDate.Split('-')[0]);
|
int year = Convert.ToInt32(fDate.Split('-')[0]);
|
||||||
//int year = 2011;
|
|
||||||
|
|
||||||
//header.AddChild("ID", new LocaleValue("序号"), SqlStorageType.Sqlvarchar);
|
header.AddChild("F_SBU", new LocaleValue("SBU"), SqlStorageType.Sqlvarchar);
|
||||||
header.AddChild("SBU", new LocaleValue("SBU"), SqlStorageType.Sqlvarchar);
|
header.AddChild("F_MXQY", new LocaleValue("明细区域"), SqlStorageType.Sqlvarchar);
|
||||||
header.AddChild("明细区域", new LocaleValue("明细区域"), SqlStorageType.Sqlvarchar);
|
|
||||||
header.AddChild("销售员", 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);
|
||||||
@ -113,34 +109,23 @@ namespace Pilot.Report.Exploitation.ResultsKanbanSummary
|
|||||||
{
|
{
|
||||||
DynamicObject customFilter = filter.FilterParameter.CustomFilter;
|
DynamicObject customFilter = filter.FilterParameter.CustomFilter;
|
||||||
|
|
||||||
// 销售员列表
|
DynamicObject dynamic = customFilter["F_Salesperson"] as DynamicObject;
|
||||||
var salesperson = (customFilter["F_Salesperson"] as DynamicObjectCollection)?.Select(n => (n["F_Salesperson"] as DynamicObject)["msterID"].ToString()).ToList();
|
|
||||||
|
|
||||||
// 销售员
|
|
||||||
var salespersonString = salesperson == null ? "" : string.Join(",", salesperson);
|
|
||||||
|
|
||||||
// 组织列表
|
|
||||||
var organizationList = (customFilter["FZuZhi"] as DynamicObjectCollection)?.Select(n => (n["FZuZhi"] as DynamicObject)["ID"].ToString()).ToList();
|
|
||||||
|
|
||||||
// 组织
|
|
||||||
var organization = organizationList == null ? "" : (string.Join(",", organizationList));
|
|
||||||
|
|
||||||
// 开始日期
|
// 开始日期
|
||||||
string fStrartDate = customFilter["FSDate"]?.ToString();
|
string fStrartDate = Convert.ToString(customFilter["FSDate"]);
|
||||||
|
|
||||||
// 结束日期
|
// 结束日期
|
||||||
string fEndDate = customFilter["FEDate"]?.ToString();
|
string fEndDate = Convert.ToString(customFilter["FEDate"]);
|
||||||
|
|
||||||
base.BuilderReportSqlAndTempTable(filter, tableName);
|
base.BuilderReportSqlAndTempTable(filter, tableName);
|
||||||
|
|
||||||
string sql = string.Format("EXEC GZ_JXKBHZB_LTH '{0}','{1}' " +
|
string sql = string.Format(@"/*dialect*/
|
||||||
"SELECT" +
|
EXEC GZ_JXKBHZB_LTH '{0}','{1}'
|
||||||
"ROW_NUMBER() OVER (ORDER BY SBU DESC) AS FID," +
|
SELECT
|
||||||
"ROW_NUMBER() OVER (ORDER BY SBU DESC) AS FIDENTITYID," +
|
ROW_NUMBER() OVER (ORDER BY F_SBU DESC) AS FID,
|
||||||
" * INTO {2} FROM JXKBHZB", fStrartDate,fEndDate,tableName);
|
ROW_NUMBER() OVER (ORDER BY F_SBU DESC) AS FIDENTITYID,
|
||||||
|
* INTO {2} FROM JXKBHZB
|
||||||
Loghelp.Log("BuilderReportSqlAndTempTable");
|
", fStrartDate,fEndDate,tableName);
|
||||||
Loghelp.Log(sql);
|
|
||||||
DBUtils.Execute(this.Context, sql);
|
DBUtils.Execute(this.Context, sql);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,60 +0,0 @@
|
|||||||
using Kingdee.BOS.Core.Metadata;
|
|
||||||
using Kingdee.BOS.Core.Report.PlugIn;
|
|
||||||
using Kingdee.BOS.Core.Report.PlugIn.Args;
|
|
||||||
using Kingdee.BOS.Util;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.ComponentModel;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Pilot.Report.Exploitation.ResultsKanbanSummary
|
|
||||||
{
|
|
||||||
[Description("【报表表单插件】绩效看板汇总报表插件"), HotUpdate]
|
|
||||||
public class ResultsReportServicePlugIn: AbstractSysReportPlugIn
|
|
||||||
{
|
|
||||||
List<string> _rates = new string[] { "AttainmentRate", "SameGrowthRate", "PaymentRate" }.ToList();
|
|
||||||
public override void FormatCellValue(FormatCellValueArgs args)
|
|
||||||
{
|
|
||||||
// 格式化日期
|
|
||||||
base.FormatCellValue(args);
|
|
||||||
if (args.Header.ColType == Kingdee.BOS.SqlStorageType.SqlDatetime)
|
|
||||||
{
|
|
||||||
DateTime value = Convert.ToDateTime(args.FormateValue);
|
|
||||||
string afterValue = value.ToString("yyyy-MM-dd");
|
|
||||||
args.FormateValue = afterValue;
|
|
||||||
}
|
|
||||||
// 格式化金额 汇率不格式化
|
|
||||||
if (args.Header.ColType == Kingdee.BOS.SqlStorageType.SqlDecimal)
|
|
||||||
{
|
|
||||||
decimal value = decimal.Parse(args.FormateValue);
|
|
||||||
// 千分位
|
|
||||||
string afterValue = value.ToString("N");
|
|
||||||
args.FormateValue = afterValue;
|
|
||||||
}
|
|
||||||
if (args.Header.ColType == Kingdee.BOS.SqlStorageType.Sqlvarchar && _rates.Contains(args.Header.Key))
|
|
||||||
{
|
|
||||||
decimal value = decimal.Parse(args.FormateValue);
|
|
||||||
// 不显示小数
|
|
||||||
string afterValue = value.ToString("N") + "%"; // "F" 表示固定点格式,"0" 表示小数位数为0
|
|
||||||
args.FormateValue = afterValue;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
public override void OnFormatRowConditions(ReportFormatConditionArgs args)
|
|
||||||
{
|
|
||||||
base.OnFormatRowConditions(args);
|
|
||||||
|
|
||||||
//行背景色:FROWNO为偶数的行,背景色设为灰色
|
|
||||||
if (Convert.ToInt32(args.DataRow["Sort"]) == 0 || Convert.ToInt32(args.DataRow["Sort"]) == 3)
|
|
||||||
{
|
|
||||||
FormatCondition FRow_FC = new FormatCondition()
|
|
||||||
{
|
|
||||||
BackColor = "#FCE4D6",
|
|
||||||
};
|
|
||||||
args.FormatConditions.Add(FRow_FC);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user