From b52018589bf6c7ec1d51ce8ad000a7aa993b0ab5 Mon Sep 17 00:00:00 2001
From: dengjunjie <dengjunjie@hnkhzn.com>
Date: 星期一, 13 四月 2026 16:06:15 +0800
Subject: [PATCH] 优化组盘表获取成品编号、流水号、供方代码

---
 代码管理/WIDESEAWCS_Server/WIDESEAWCS_Server/WIDESEAWCS_BasicInfoService/ProcessInfoService.cs |   49 ++++++++++++-------------------------------------
 1 files changed, 12 insertions(+), 37 deletions(-)

diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WIDESEAWCS_Server/WIDESEAWCS_Server/WIDESEAWCS_BasicInfoService/ProcessInfoService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WIDESEAWCS_Server/WIDESEAWCS_Server/WIDESEAWCS_BasicInfoService/ProcessInfoService.cs"
index 098bb4e..092a28e 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WIDESEAWCS_Server/WIDESEAWCS_Server/WIDESEAWCS_BasicInfoService/ProcessInfoService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WIDESEAWCS_Server/WIDESEAWCS_Server/WIDESEAWCS_BasicInfoService/ProcessInfoService.cs"
@@ -3,6 +3,7 @@
 using WIDESEAWCS_Core;
 using WIDESEAWCS_Core.BaseRepository;
 using WIDESEAWCS_Core.BaseServices;
+using WIDESEAWCS_Core.Helper;
 using WIDESEAWCS_DTO.BasicInfo;
 using WIDESEAWCS_Model.Models;
 
@@ -10,46 +11,20 @@
 {
     public class ProcessInfoService : ServiceBase<Dt_ProcessInfo, IRepository<Dt_ProcessInfo>>, IProcessInfoService
     {
-        public ProcessInfoService(IRepository<Dt_ProcessInfo> BaseDal) : base(BaseDal)
+
+        private readonly IFormulaService _formulaService;
+        private readonly IFormulaDetailService _formulaDetailService;
+
+        public ProcessInfoService(
+            IRepository<Dt_ProcessInfo> BaseDal,
+            IFormulaService formulaService,
+            IFormulaDetailService formulaDetailService
+            ) : base(BaseDal)
         {
+            _formulaService = formulaService;
+            _formulaDetailService = formulaDetailService;
         }
 
         public IRepository<Dt_ProcessInfo> Repository => BaseDal;
-
-        /// <summary>
-        /// 涓嬭浇娴佺▼鍗�
-        /// </summary>
-        /// <param name="dt_ProcessInfo"></param>
-        /// <returns></returns>
-        public WebResponseContent ExportData(Dt_ProcessInfo dt_ProcessInfo)
-        {
-            
-                string fileName = $"{DateTime.Now.ToString("yyyyMMddHHssmm")}.xlsx";
-                string templatePath = $"{AppDomain.CurrentDomain.BaseDirectory}ExprotTemplate\\鍙戠數鏈哄脊鎬ф敮鎾戜俊鎭寲娴佺▼鍗�.xlsx";//妯℃澘璺緞
-                string savePath = $"{AppDomain.CurrentDomain.BaseDirectory}Download\\{fileName}";//淇濆瓨鏂囦欢璺緞
-
-                using Stream templateStream = new FileStream(templatePath, FileMode.Open);
-                using Stream saveStream = new FileStream(savePath, FileMode.Create);
-                using ExcelPackage package = new ExcelPackage(saveStream, templateStream);
-                ExcelWorksheet worksheet = package.Workbook.Worksheets["娴佺▼鍗�"];
-                worksheet.Cells[3, 5].Value = dt_ProcessInfo.ProductCode;//鎴愬搧缂栧彿
-
-                package.Save();
-
-                string pdfFileName = $"{DateTime.Now.ToString("yyyyMMddHHssmm")}.pdf";
-                string pdfPath = $"{AppDomain.CurrentDomain.BaseDirectory}Download\\{pdfFileName}";
-
-                Workbook workbook = new Workbook();
-                workbook.LoadFromFile(savePath);
-
-                // 杞崲绗竴涓伐浣滆〃鍒癙DF
-                workbook.SaveToFile(pdfPath, FileFormat.PDF);
-                return WebResponseContent.Instance.OK(data: new { path = pdfPath, fileName = pdfFileName });
-             
-            }
-
-        
-
-
     }
 }

--
Gitblit v1.9.3