From f02c7cbe27d7da079f057b464e2b179f1dc17b08 Mon Sep 17 00:00:00 2001
From: yxj <yxj@hz-kingdee.com>
Date: 星期二, 18 三月 2025 09:26:16 +0800
Subject: [PATCH] 新增提料运算(根据欠料单进行计算)调用方法

---
 WebAPI/Controllers/CJGL/Cj_SingleStationController.cs |   31 ++++++++++++++++++++++++-------
 1 files changed, 24 insertions(+), 7 deletions(-)

diff --git a/WebAPI/Controllers/CJGL/Cj_SingleStationController.cs b/WebAPI/Controllers/CJGL/Cj_SingleStationController.cs
index 4885568..99408a2 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 + "') ");
+                    }
+                    
 
                 }
                

--
Gitblit v1.9.1