From e481bc706eeedfa7e4061b1c79ad4a5d3b440249 Mon Sep 17 00:00:00 2001
From: llj <132905093+newwwwwwtree@users.noreply.github.com>
Date: 星期五, 05 十二月 2025 09:15:27 +0800
Subject: [PATCH] 添康问题清单修复

---
 WebAPI/Controllers/BaseSet/Gy_MaterialController.cs |   28 ++++++++++++++++++++--------
 1 files changed, 20 insertions(+), 8 deletions(-)

diff --git a/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs b/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs
index b493f57..6461537 100644
--- a/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs
+++ b/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs
@@ -3996,7 +3996,7 @@
         #region [妯″叿妗f鎵归噺鐢熸垚]
         [Route("Gy_Mould/SaveBatchGen_MouldFile")]
         [HttpGet]
-        public object SaveBatchGen_MouldFile(long HInterID, string StarNum, string EndNum)
+        public object SaveBatchGen_MouldFile(long HInterID, string StarNum, string EndNum,string user)
         {
             int StarNum1 = int.Parse(StarNum);
             int EndNum1 = int.Parse(EndNum);
@@ -4049,10 +4049,10 @@
                         ",HUseLife,HLeaveLife,HProdQty,HProdWeight,HMouldOWNER,HSaveLife,HMouldDotCheckRuleInterID,HMouldMaintainRuleInterID" +
                         ") " +
                         " values('3899','3899'," + HItemID + ",'" + Num1 + j + "',getdate()" +
-                        "," + dr["HYear"] + "," + dr["HPeriod"] + ",'" + dr["HRemark"] + "','" + dr["HMaker"] + "',getdate(),'" + Num1 + j +
+                        "," + dr["HYear"] + "," + dr["HPeriod"] + ",'" + dr["HRemark"] + "','" + user + "',getdate(),'" + Num1 + j +
                         "','" + Num1 + j + "','" + dr["HName"] + "','" + dr["HModel"] + "','" + dr["HModel2"] + "','" + dr["HDiameter"] + "'" +
                         ",'" + dr["HSubjoin"] + "','" + dr["HSubjoin2"] + "','" + dr["HPICNo"] + "','" + dr["HWorkMaterModel"] + "'" +
-                        "," + dr["HMaterID"] + ",'" + dr["HMaterNumber"] + "',0," + dr["HUnitID"] +
+                        "," + dr["HMaterID"] + ",'" + dr["HMaterNumber"] + "',"+dr["HMouldType"]+"," + dr["HUnitID"] +
                         ",'" + dr["HOutComDate"] + "','" + dr["HOutComNo"] + "'," + dr["HDeptID"] + "," + dr["HSupID"] + ",'" + dr["HSupNumber"] + "'" +
                         "," + dr["HPrintQty"] + ",'" + dr["HMouldStatus"] + "'," + dr["HWHID"] + "," + dr["HRoutingID"] + ",'" + dr["HCaveQty"] +
                         "'," + dr["HBOMID"] + ",'" + dr["HVersion"] + "'," + dr["HSPGroupID"] + "," + dr["HSPID"] + ",'" + dr["HDesignLife"] + "','" + dr["HNowSupID"] + "','" + dr["HNowSupTypeID"] + "'" +
@@ -4905,11 +4905,23 @@
             try
             {
                 ds = oCN.RunProcReturn($"select * from Gy_BarCodeBill where HBarCode='{HbarCode}' ", "Gy_Material");
-                objJsonResult.code = "0";
-                objJsonResult.count = 1;
-                objJsonResult.Message = "鎴愬姛";
-                objJsonResult.data = ds.Tables[0];
-                return objJsonResult;
+                if (ds == null || ds.Tables[0].Rows.Count == 0)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏌ユ壘澶辫触锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                else
+                {
+                    objJsonResult.code = "1";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = "鎴愬姛";
+                    objJsonResult.data = ds.Tables[0];
+                    return objJsonResult;
+                }
+                
             }
             catch (Exception)
             {

--
Gitblit v1.9.1