From 0ae6913f3c7d83c9e4a3ebca3391b1bcaa0bdf15 Mon Sep 17 00:00:00 2001 From: LiJiaWen Date: Wed, 10 Dec 2025 09:52:10 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E6=8A=A5=E8=A1=A8BUG?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复了查询统计页面的订单统计表没有正确统计对应单位的BUG --- PEIS/Model/StatisticalReportModel.cs | 6 +++++- PEIS/Presenter/StatisticalReportPresenter.cs | 2 +- PEIS/View/statistics/StatisticalReportForm.cs | 1 + 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/PEIS/Model/StatisticalReportModel.cs b/PEIS/Model/StatisticalReportModel.cs index 75a1fe9..7faef43 100644 --- a/PEIS/Model/StatisticalReportModel.cs +++ b/PEIS/Model/StatisticalReportModel.cs @@ -503,7 +503,7 @@ namespace PEIS.Model } // 订单统计表 - public List GetCheckCosts(DateTime begTime, DateTime endTime, string dateType, int status) + public List GetCheckCosts(DateTime begTime, DateTime endTime, string dateType, int status, long oEid) { var sql = $@"SELECT a.ID, @@ -585,6 +585,10 @@ namespace PEIS.Model break; } } + if (oEid != -1) + { + sql += $@" AND a.OEID = {oEid} "; + } return DAOHelp.GetDataBySQL(sql); } diff --git a/PEIS/Presenter/StatisticalReportPresenter.cs b/PEIS/Presenter/StatisticalReportPresenter.cs index ec53a5c..7e10d61 100644 --- a/PEIS/Presenter/StatisticalReportPresenter.cs +++ b/PEIS/Presenter/StatisticalReportPresenter.cs @@ -47,7 +47,7 @@ namespace PEIS.Presenter }; View.GetCheckCost += (send, args) => { - View.ShowCheckCost(new StatisticalReportModel().GetCheckCosts(args.Item.begDate, args.Item.endDate, args.Item.dateType, args.Item.status)); + View.ShowCheckCost(new StatisticalReportModel().GetCheckCosts(args.Item.begDate, args.Item.endDate, args.Item.dateType, args.Item.status, args.Item.oEid)); }; View.GetTwoCancerData += (send, args) => { diff --git a/PEIS/View/statistics/StatisticalReportForm.cs b/PEIS/View/statistics/StatisticalReportForm.cs index 19248d3..42e526d 100644 --- a/PEIS/View/statistics/StatisticalReportForm.cs +++ b/PEIS/View/statistics/StatisticalReportForm.cs @@ -411,6 +411,7 @@ namespace PEIS.View.Statistics paramsData.begDate = BegDate.Value; paramsData.endDate = EndDate.Value; paramsData.status = TeamRadio.Checked ? 0 : PersonRadio.Checked ? 1 : 2; + paramsData.oEid = _org == null || !TeamRadio.Checked ? -1 : _org.ID; GetCheckCost?.Invoke(this, new Args { Item = paramsData }); }