From a1c3a3d1b0b0b8c28a19e99177e4cee5a64949b7 Mon Sep 17 00:00:00 2001
From: zrg <z18737863051@163.com>
Date: 星期二, 25 二月 2025 11:20:17 +0800
Subject: [PATCH] 增加斯莫尔  性能检测散点图报表

---
 WebAPI/Controllers/CJGL/Cj_SingleStationController.cs |   37 ++++++++++++++++++++++++++-----------
 1 files changed, 26 insertions(+), 11 deletions(-)

diff --git a/WebAPI/Controllers/CJGL/Cj_SingleStationController.cs b/WebAPI/Controllers/CJGL/Cj_SingleStationController.cs
index a1d0b75..c1d5dbb 100644
--- a/WebAPI/Controllers/CJGL/Cj_SingleStationController.cs
+++ b/WebAPI/Controllers/CJGL/Cj_SingleStationController.cs
@@ -183,14 +183,31 @@
 
                 if (ds.Tables[0].Rows.Count == 0)//鏂板
                 {
-                    //涓昏〃
-                    oCN.RunProc(@"Insert Into Sc_QualityReportBillMain   
-(HBillType,HBillSubType,HBillStatus,HInterID,HBillNo,HDate
-,HYear,HPeriod,HRemark,HMaker,HMakeDate
-,HEmpID,HGroupID,HDeptID,HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo)
+                    if (HResult== "寰憰鍝�")
+                    {
+                        //涓昏〃
+                        oCN.RunProc(@"Insert Into Sc_QualityReportBillMain   
+                    (HBillType,HBillSubType,HBillStatus,HInterID,HBillNo,HDate
+                    ,HYear,HPeriod,HRemark,HMaker,HMakeDate
+                    ,HEmpID,HGroupID,HDeptID,HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo)
+                        values('3717','3717-1',1," + HInterID + ",'" + HBillNo + "','" + HDate + "'" +
+                        "," + DateTime.Now.Year + "," + DateTime.Now.Month + ",'" + HRemark + "','" + HMaker + "',getdate()" +
+                        ",'" + HEmpID + "'," + HGroupID + "," + HDeptID + "," + HMainSourceInterID + "," + HMainSourceEntryID + ",'" + HMainSourceBillNo + "') ");
+                        //閲嶆柊缁橦Result璧嬪��
+                        HResult = "";
+                    }
+                    else
+                    {
+                        //涓昏〃
+                        oCN.RunProc(@"Insert Into Sc_QualityReportBillMain   
+                    (HBillType,HBillSubType,HBillStatus,HInterID,HBillNo,HDate
+                    ,HYear,HPeriod,HRemark,HMaker,HMakeDate
+                    ,HEmpID,HGroupID,HDeptID,HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo)
                         values('3717','3717',1," + HInterID + ",'" + HBillNo + "','" + HDate + "'" +
-                    "," + DateTime.Now.Year + "," + DateTime.Now.Month + ",'" + HRemark + "','" + HMaker + "',getdate()" +
-                    ",'" + HEmpID + "'," + HGroupID + "," + HDeptID + "," + HMainSourceInterID + "," + HMainSourceEntryID + ",'" + HMainSourceBillNo + "') ");
+                        "," + DateTime.Now.Year + "," + DateTime.Now.Month + ",'" + HRemark + "','" + HMaker + "',getdate()" +
+                        ",'" + HEmpID + "'," + HGroupID + "," + HDeptID + "," + HMainSourceInterID + "," + HMainSourceEntryID + ",'" + HMainSourceBillNo + "') ");
+                    }
+                    
 
                 }
                
@@ -280,11 +297,11 @@
 (HInterID,HENTRYID,HBillNo_bak,HEmpID,HBarCode,HBadReasonID,HAddr,HMaker,HMakeDate
 ,HMaterID,HUnitID,HRemark,HSourceID,HICMOInterID,HICMOEntryID,HICMOBillNo,HReportType
 ,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney
-,HQty,HResult,HProcExchInterID,HProcExchEntryID,HProcExchBillNo) 
+,HQty,HResult,HProcExchInterID,HProcExchEntryID,HProcExchBillNo,HProcID) 
 values({HInterID},1,'{oSub.HBillNo_bak}',{oSub.HEmpID},'{oSub.HBarCode}',{oSub.HBadReasonID},'','{oSub.HMaker}','{oSub.HMakeDate}'
 ,{oSub.HMaterID},{oSub.HUnitID},'{oSub.HRemark}',{oSub.HSourceID},{oSub.HICMOInterID},{oSub.HICMOEntryID},'{oSub.HICMOBillNo}',{oSub.HReportType}
 ,0,0,'','',0,0
-,1,'{HResult}',{oSub.HProcExchInterID},{oSub.HProcExchEntryID},'{oSub.HProcExchBillNo}')");
+,1,'{HResult}',{oSub.HProcExchInterID},{oSub.HProcExchEntryID},'{oSub.HProcExchBillNo}',{oSub.HProcID})");
 
             //淇敼鏉$爜琛ㄧ殑鐘舵��
             oCN.RunProc("update Gy_BarCodeBill set HStatus='"+ HResult + "' where HBarCode='"+ oSub.HBarCode + "'");
@@ -666,8 +683,6 @@
                 {
                     HShiftsID = int.Parse(set.Tables[0].Rows[0]["HInterID"].ToString());
                 }
-
-
                 ds = oCN.RunProcReturn("select  * from Sc_StationOutBillMain a WITH(NOLOCK) left join  Sc_StationOutBillSub_SN sn WITH(NOLOCK) on a.HInterID=sn.HInterID where a.HInterID=" + HInterID + " and HBillNo='" + HBillNo + "' and CONVERT(varchar(10),HDate,20) ='" + DateTime.Now.ToString("yyyy-MM-dd") + "' ", "Sc_StationOutBillMain");
 
                 if (ds.Tables[0].Rows.Count == 0)

--
Gitblit v1.9.1