From e4eb9faebca09bb48a66d47764a27e8282c2872c Mon Sep 17 00:00:00 2001
From: zrg <z1873@LAPTOP-EAVL132E>
Date: 星期四, 29 一月 2026 16:10:56 +0800
Subject: [PATCH] 1

---
 WebAPI/Controllers/QC_ManagementController.cs |   19 +++++++++++++++++--
 1 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/WebAPI/Controllers/QC_ManagementController.cs b/WebAPI/Controllers/QC_ManagementController.cs
index 03097aa..e5ecba2 100644
--- a/WebAPI/Controllers/QC_ManagementController.cs
+++ b/WebAPI/Controllers/QC_ManagementController.cs
@@ -1083,6 +1083,7 @@
                 msg2 = msg2.Replace("\\", "");
                 msg2 = msg2.Replace("\n", "");  //\n
                 lsmain = oListModels.getObjectByJson_Gy_QCCheckProjectMain(msg2);
+                string ts;
                 foreach (Model.ClsGy_QCCheckProjectMain oItem in lsmain)
                 {
                     //oItem.HMaker = "";
@@ -1107,6 +1108,7 @@
                         return objJsonResult;
                     }
                     oBill.omodel = oItem;
+                    ts = oItem.HCheckBillType;
                 }
                 //琛ㄤ綋鏁版嵁
                 //鎸� },{鏉ユ媶鍒嗘暟缁� //鍘绘帀銆愬拰銆�
@@ -1351,8 +1353,21 @@
                 {
                     //鍒ゆ柇鍗曟嵁鏄惁宸茬粡瀹℃牳
                     DataSet ds;
-                    string sql = "select * from  Gy_QCCheckProjectMain  where HInterID = " + HInterID;
+                    string sql;
+                    if(HInterID=="0")
+                    {
+                        sql = "select top 1 * from  Gy_QCCheckProjectMain  order by HInterID desc";
+                        
+                    }
+                    else
+                     sql = "select * from  Gy_QCCheckProjectMain  where HInterID = " + HInterID;
                     ds = oCN.RunProcReturn(sql, oBill.MvarItemKey);
+                    if(ds!=null)
+                    {
+                        oBill.omodel.HInterID = Convert.ToInt64(ds.Tables[0].Rows[0]["HInterID"]);
+                        HInterID = Convert.ToInt64(ds.Tables[0].Rows[0]["HInterID"]).ToString();
+                    }
+                    
                     if (ds.Tables[0].Rows[0]["HChecker"] != null && ds.Tables[0].Rows[0]["HChecker"].ToString() != "")
                     {
                         objJsonResult.code = "0";
@@ -2117,7 +2132,7 @@
                     UserName = oItem.HMaker;
                     oItem.HMakeDate = DBUtility.ClsPub.isStrNull(DateTime.Now.ToString("yyyy-MM-dd"));
                     oItem.HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year);
-                    oItem.HDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString("yyyy-MM-dd"));
+                    oItem.HDate=oItem.HDate.ToString()==""? DBUtility.ClsPub.isDate(DateTime.Now.ToString("yyyy-MM-dd")) : oItem.HDate;
                     oItem.HBillType = "7506";
                     oItem.HBillSubType = "7506";
                     oItem.HBillStatus = 0;

--
Gitblit v1.9.1