From 6367b170a3db4df6e43a8962b2f17b06a020b913 Mon Sep 17 00:00:00 2001
From: yusijie <ysj@hz-kingdee.com>
Date: 星期五, 16 一月 2026 15:36:40 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API

---
 WebAPI/Controllers/生产管理/质量汇报单/Sc_QualityReportBillController.cs |   84 ++++++++++++++++++++++--------------------
 1 files changed, 44 insertions(+), 40 deletions(-)

diff --git "a/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\350\264\250\351\207\217\346\261\207\346\212\245\345\215\225/Sc_QualityReportBillController.cs" "b/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\350\264\250\351\207\217\346\261\207\346\212\245\345\215\225/Sc_QualityReportBillController.cs"
index 466e0c2..172fe19 100644
--- "a/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\350\264\250\351\207\217\346\261\207\346\212\245\345\215\225/Sc_QualityReportBillController.cs"
+++ "b/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\350\264\250\351\207\217\346\261\207\346\212\245\345\215\225/Sc_QualityReportBillController.cs"
@@ -247,10 +247,12 @@
                 BillNew.HMaker = mainList[0].HMaker;
                 BillNew.HMakeDate = mainList[0].HMakeDate;
                 BillNew.HReportType = mainList[0].HReportType;
-                BillNew.HSourceBillNo = mainList[0].HICMOBillNo;
-                BillNew.HSourceInterID = mainList[0].HICMOInterID;
+                BillNew.HSourceBillNo = mainList[0].HSourceBillNo;
+                BillNew.HSourceInterID = mainList[0].HSourceInterID;
+                BillNew.HSourceEntryID = mainList[0].HSourceEntryID;
                 BillNew.HSourceBillType = mainList[0].HSourceBillType;
                 BillNew.HBadReasonHQty = mainList[0].HBadReasonHQty;
+                BillNew.HQty = DBUtility.ClsPub.isLong(mainList[0].HQty);
                 oCN.BeginTran();
                 //涓存椂琛�
                 oCN.RunProc("Insert Into Sc_ICMOBillQualityStatus_Tmp " +
@@ -258,13 +260,13 @@
                     ",HProcExchBillNo,HProcExchInterID,HProcExchEntryID,HProcID,HMaterID" +
                     ",HSourceID,HGroupID,HDeptID,HCheckManID,HBadReasonID,HBarCode" +
                     ",HMaker,HMakeDate,HBillType,HReportType,HSourceBillNo" +
-                    ",HSourceInterID,HSourceBillType,HICMOEntryID,HSourceEntryID,HBadReasonHQty" +
+                    ",HSourceInterID,HSourceBillType,HICMOEntryID,HSourceEntryID,HBadReasonHQty,HQty" +
                 ") " +
                 " values(" + BillNew.HInterID + ",'" + BillNew.HBillNo + "','" + BillNew.HDate + "','" + BillNew.HICMOBillNo + "'," + BillNew.HICMOInterID + 
                 ",'" + BillNew.HProcExchBillNo + "'," + BillNew.HProcExchInterID + "," + BillNew.HProcExchEntryID + "," + BillNew.HProcID + "," + BillNew.HMaterID +
                 "," + BillNew.HSourceID + "," + BillNew.HGroupID + "," + BillNew.HDeptID + "," + BillNew.HCheckManID + "," + BillNew.HBadReasonID + ",'" + BillNew.HBarCode + "'" +
                 ",'" + BillNew.HMaker + "','" + BillNew.HMakeDate + "','" + BillNew.HBillType + "','" + +BillNew.HReportType + "','" +BillNew.HSourceBillNo + "'" +
-                "," + BillNew.HSourceInterID + ",'" + BillNew.HSourceBillType + "'," + BillNew.HICMOEntryID + "," + BillNew.HICMOEntryID + "," + BillNew.HBadReasonHQty +
+                "," + BillNew.HSourceInterID + ",'" + BillNew.HSourceBillType + "'," + BillNew.HICMOEntryID + "," + BillNew.HSourceEntryID + "," + BillNew.HBadReasonHQty + "," + BillNew.HQty +
                 ") ");
                 sReturn = "鎵爜鎴愬姛锛�";
                 oCN.Commit();
@@ -696,6 +698,7 @@
 
                 if (ds == null || ds.Tables[0].Rows.Count == 0)
                 {
+                    oCN.RollBack();
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
                     objJsonResult.Message = "淇濆瓨鍚庡垽鏂け璐ワ紒";
@@ -704,6 +707,7 @@
                 }
                 if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0")
                 {
+                    oCN.RollBack();
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
                     objJsonResult.Message = "淇濆瓨澶辫触锛�" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
@@ -1847,15 +1851,15 @@
             try
             {
                 List<object> columnNameList = new List<object>();
-                //鏌ョ湅鏉冮檺
-                if (!DBUtility.ClsPub.Security_Log("Sc_QualityReportBill_Query", 1, false, user))
-                {
-                    objJsonResult.code = "0";
-                    objJsonResult.count = 0;
-                    objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒";
-                    objJsonResult.data = null;
-                    return objJsonResult;
-                }
+                ////鏌ョ湅鏉冮檺
+                //if (!DBUtility.ClsPub.Security_Log("Sc_QualityReportBill_Query", 1, false, user))
+                //{
+                //    objJsonResult.code = "0";
+                //    objJsonResult.count = 0;
+                //    objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒";
+                //    objJsonResult.data = null;
+                //    return objJsonResult;
+                //}
                 ReportWorkDemandPlanBill Report = JsonConvert.DeserializeObject<ReportWorkDemandPlanBill>(sWhere);
                 ds = oCN.RunProcReturn($"exec h_p_Sc_StationOutBillMain  '{Report.HBeginDate}','{Report.HEndDate}','{Report.HNumber}','{Report.HName}','{Report.HProcName}','{Report.HEquipName}','{Report.HBactNo}'", "h_p_Sc_StationOutBillMain");
 
@@ -1902,15 +1906,15 @@
             try
             {
                 List<object> columnNameList = new List<object>();
-                //鏌ョ湅鏉冮檺
-                if (!DBUtility.ClsPub.Security_Log("Sc_QualityReportBill_Query", 1, false, user))
-                {
-                    objJsonResult.code = "0";
-                    objJsonResult.count = 0;
-                    objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒";
-                    objJsonResult.data = null;
-                    return objJsonResult;
-                }
+                ////鏌ョ湅鏉冮檺
+                //if (!DBUtility.ClsPub.Security_Log("Sc_QualityReportBill_Query", 1, false, user))
+                //{
+                //    objJsonResult.code = "0";
+                //    objJsonResult.count = 0;
+                //    objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒";
+                //    objJsonResult.data = null;
+                //    return objJsonResult;
+                //}
                 ReportWorkDemandPlanBill1 Report = JsonConvert.DeserializeObject<ReportWorkDemandPlanBill1>(sWhere);
                 ds = oCN.RunProcReturn($"exec h_p_Sc_StationOutBillMonth  '{Report.HYear}','{Report.HWorkCenter}','{Report.HName}', '{Report.HBeginDate}','{Report.HEndDate}'", "h_p_Sc_StationOutBillMonth");
 
@@ -1949,15 +1953,15 @@
             try
             {
                 List<object> columnNameList = new List<object>();
-                //鏌ョ湅鏉冮檺
-                if (!DBUtility.ClsPub.Security_Log("Sc_QualityReportBill_Query", 1, false, user))
-                {
-                    objJsonResult.code = "0";
-                    objJsonResult.count = 0;
-                    objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒";
-                    objJsonResult.data = null;
-                    return objJsonResult;
-                }
+                ////鏌ョ湅鏉冮檺
+                //if (!DBUtility.ClsPub.Security_Log("Sc_QualityReportBill_Query", 1, false, user))
+                //{
+                //    objJsonResult.code = "0";
+                //    objJsonResult.count = 0;
+                //    objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒";
+                //    objJsonResult.data = null;
+                //    return objJsonResult;
+                //}
 
                 if (sWhere == null || sWhere.Equals(""))
                 {
@@ -2005,15 +2009,15 @@
             try
             {
                 List<object> columnNameList = new List<object>();
-                //鏌ョ湅鏉冮檺
-                if (!DBUtility.ClsPub.Security_Log("Sc_QualityReportBill_Query", 1, false, user))
-                {
-                    objJsonResult.code = "0";
-                    objJsonResult.count = 0;
-                    objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒";
-                    objJsonResult.data = null;
-                    return objJsonResult;
-                }
+                ////鏌ョ湅鏉冮檺
+                //if (!DBUtility.ClsPub.Security_Log("Sc_QualityReportBill_Query", 1, false, user))
+                //{
+                //    objJsonResult.code = "0";
+                //    objJsonResult.count = 0;
+                //    objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒";
+                //    objJsonResult.data = null;
+                //    return objJsonResult;
+                //}
 
                 if (sWhere == null || sWhere.Equals(""))
                 {

--
Gitblit v1.9.1