This commit is contained in:
2025-08-21 21:28:37 +08:00
parent 06e602ee2d
commit ada33aa1f8
5 changed files with 816 additions and 10 deletions

View File

@@ -68,11 +68,20 @@ namespace GZ_LTHReportForms.JiXiaoKanBan
var salesPersons = customFilter["F_Salesperson"] as DynamicObjectCollection;
if (salesPersons.Count > 0)
{
reportTitles.AddTitle("F_Salesperson", string.Join(",", salesPersons.Select(n => n["Name"].ToString())));
reportTitles.AddTitle("F_Salesperson", string.Join(",", salesPersons.Select(n => (n["F_Salesperson"] as DynamicObject)["Name"].ToString())));
}
var startDate = Convert.ToDateTime(customFilter["FSDate"]);
var endDate = Convert.ToDateTime(customFilter["FEDate"]);
if (startDate.Year != endDate.Year)
{
throw new Exception("开始时间和结束时间必须是同一年份");
}
if (startDate > endDate)
{
throw new Exception("开始时间不能大于结束时间");
}
reportTitles.AddTitle("FStartDate", startDate.ToString("yyyy-MM-dd"));
reportTitles.AddTitle("FEndDate", endDate.ToString("yyyy-MM-dd"));
@@ -102,7 +111,7 @@ namespace GZ_LTHReportForms.JiXiaoKanBan
customFilter["FEDate"]).ToString("yyyy-MM-dd");
string sql = string.Format(@"/*dialect*/
EXEC GZ_JXKBHZB_LTH '{0}','{1}'
EXEC GZ_JXKBHZB_LTH '{0}','{1}','1'
SELECT
ROW_NUMBER() OVER (ORDER BY F_SBU DESC) AS FID,
ROW_NUMBER() OVER (ORDER BY F_SBU DESC) AS FIDENTITYID,