diff --git a/PEIS/Model/Exam/PartModel.cs b/PEIS/Model/Exam/PartModel.cs index 9fcdb49..37f7726 100644 --- a/PEIS/Model/Exam/PartModel.cs +++ b/PEIS/Model/Exam/PartModel.cs @@ -199,7 +199,7 @@ namespace PEIS.Model { "3101", //病理科 "3201", //放射科 - "3202", //超声科 + "3203", //超声科 }; var index = 1; @@ -208,11 +208,16 @@ namespace PEIS.Model if (index > 1) summary += Environment.NewLine; summary += $@"{index}.{items.Key}:" + Environment.NewLine; - if (!deptCodeList.Contains(deptCode)) + if (!deptCodeList.Contains(deptCode) && deptCode != "0141" ) { summary += string.Join(Environment.NewLine, items.Select(s => $@" {s.RptItemName}:{s.TextResult} {s.Unit} {s.UnusualFlag};").ToList()); } + else if(deptCode == "0141") + { + summary += string.Join(Environment.NewLine, + items.Select(s => $@" {s.RptItemName}:{s.TextResult} {s.Unit} {s.UnusualFlag}").ToList()); + } else { summary += string.Join(Environment.NewLine, items.Select(s => $@" {s.TextResult}").ToList()); diff --git a/PEIS/Utils/ReportHelper.cs b/PEIS/Utils/ReportHelper.cs index 848182f..4674bd3 100644 --- a/PEIS/Utils/ReportHelper.cs +++ b/PEIS/Utils/ReportHelper.cs @@ -33,37 +33,6 @@ namespace PEIS.Utils { public static class ReportHelper { - - // 逆时针旋转图片的函数 - public static Image RotateImage(Image img) - { - // 旋转角度为负90度 - float angle = -90f; - - // 计算旋转后的图像的矩形范围 - RectangleF bounds = new RectangleF(0, 0, img.Height, img.Width); - - // 创建旋转后的位图 - Bitmap rotatedImage = new Bitmap((int)bounds.Width, (int)bounds.Height); - rotatedImage.SetResolution(img.HorizontalResolution, img.VerticalResolution); - - using (Graphics g = Graphics.FromImage(rotatedImage)) - { - // 设置插值模式以改善旋转后图像的质量 - g.InterpolationMode = InterpolationMode.HighQualityBicubic; - // 设置旋转中心点 - g.TranslateTransform(rotatedImage.Width / 2, rotatedImage.Height / 2); - // 旋转角度 - g.RotateTransform(angle); - // 将旋转中心点恢复到原点 - g.TranslateTransform(-img.Width / 2, -img.Height / 2); - // 绘制旋转后的图片 - g.DrawImage(img, new PointF(0, 0)); - } - - return rotatedImage; - } - /// /// PDF to Image /// diff --git a/PEIS/View/Exam/PartForm.cs b/PEIS/View/Exam/PartForm.cs index ced17cd..43e89ab 100644 --- a/PEIS/View/Exam/PartForm.cs +++ b/PEIS/View/Exam/PartForm.cs @@ -1,13 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Drawing; -using System.Globalization; -using System.IO; -using System.Linq; -using System.Text.RegularExpressions; -using System.Windows.Forms; -using DevExpress.XtraEditors; +using DevExpress.XtraEditors; using DevExpress.XtraEditors.Repository; using DevExpress.XtraGrid.Views.Base; using DevExpress.XtraGrid.Views.Grid; @@ -20,6 +11,15 @@ using PEIS.Model.Exam; using PEIS.Presenter; using PEIS.Utils; using PEIS.View.UControl; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Drawing; +using System.Globalization; +using System.IO; +using System.Linq; +using System.Text.RegularExpressions; +using System.Windows.Forms; using static PEIS.Utils.ColorHelper; using static PEIS.Utils.Global; @@ -1001,8 +1001,7 @@ namespace PEIS.View.Exam var img = ReportHelper.PdfToImg(item.ReportImg); if (img != null) { - var newImg = ReportHelper.RotateImage(img); - Invoke(new Action(() => { picReportExt.Image = newImg; })); + Invoke(new Action(() => { picReportExt.Image = img; picReportExt.Dock = DockStyle.Fill; picReportExt.SizeMode = PictureBoxSizeMode.Zoom; })); } return; diff --git a/PEIS/View/Exam/TotalForm.cs b/PEIS/View/Exam/TotalForm.cs index 9924384..6d02413 100644 --- a/PEIS/View/Exam/TotalForm.cs +++ b/PEIS/View/Exam/TotalForm.cs @@ -1,14 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Drawing; -using System.Globalization; -using System.IO; -using System.Linq; -using System.Reflection; -using System.Threading.Tasks; -using System.Windows.Forms; -using DevExpress.XtraEditors; +using DevExpress.XtraEditors; using DevExpress.XtraGrid.Views.Base; using DevExpress.XtraGrid.Views.Grid; using PEIS.Base; @@ -19,6 +9,14 @@ using PEIS.Model.Exam; using PEIS.Presenter; using PEIS.Utils; using PEIS.View.UControl; +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Globalization; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Windows.Forms; using static PEIS.Utils.ColorHelper; namespace PEIS.View.Exam @@ -954,8 +952,7 @@ namespace PEIS.View.Exam var img = ReportHelper.PdfToImg(item.ReportImg); if (img != null) { - var newImg = ReportHelper.RotateImage(img); - Invoke(new Action(() => { PictureBoxReportExt.Image = newImg; })); + Invoke(new Action(() => { PictureBoxReportExt.Image = img; PictureBoxReportExt.Dock = DockStyle.Fill; PictureBoxReportExt.SizeMode = PictureBoxSizeMode.Zoom; })); } return;