From 35ede7c9c6277fcbaeabf8d475c802f43b51627c Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期二, 10 九月 2024 09:32:57 +0800
Subject: [PATCH] 进站单控制打开 开工单 保存后控制往后放

---
 WebAPI/Controllers/POStockInBillController.cs |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/WebAPI/Controllers/POStockInBillController.cs b/WebAPI/Controllers/POStockInBillController.cs
index 923ccbe..9dcce14 100644
--- a/WebAPI/Controllers/POStockInBillController.cs
+++ b/WebAPI/Controllers/POStockInBillController.cs
@@ -4439,6 +4439,7 @@
                             jobject16.Add("FSRCENTRYID", dataRow2["FENTRYID"].ToString());
                             jobject16.Add("FORDERBILLNO", dataRow2["FBILLNO"].ToString());
                             jobject16.Add("FPOORDERENTRYID", dataRow2["FENTRYID"].ToString());
+                            jobject16.Add("FGiveAway", dataRow2["FGIVEAWAY"].ToString());//鏄惁璧犲搧
                             //jobject16.Add("FPrice", dataRow2["FPRICE"].ToString());
                             //jobject16.Add("FTaxPrice", dataRow2["FTAXPRICE"].ToString());
                             //jobject16.Add("FEntryTaxRate", dataRow2["FTAXRATE"].ToString());
@@ -5060,6 +5061,7 @@
 ,D.FSUPPLIERID,DS.FNUMBER AS FSUPPLIERNUMBER,D.FPURCHASEORGID,DOO.FNUMBER AS FPURCHASEORGNUMBER,CROO.FNUMBER  AS FSETTLEORGNUMBER,
 E.FPRICETIMEPOINT,E.FSETTLECURRID,EC.FNUMBER AS FSETTLECURRNUMBER,C.FMATERIALID,CM.FNUMBER AS FMATERIALNUMBER ,C.FUNITID 
 ,CU.FNUMBER AS FUNITNUMBER,CR.FPRICE,CR.FTAXPRICE,CR.FTAXRATE,D.FPURCHASERID,isnull(T4.FNUMBER,'') AS FPURCHASERNUMBER
+,C.FGIVEAWAY AS FGIVEAWAY   
 FROM CG_POINSTOCKBILLSUB B  
 JOIN CG_POINSTOCKBILLMAIN M ON B.HINTERID = M.HINTERID
 JOIN {0}..T_PUR_POORDERENTRY C ON B.HSOURCEINTERID = C.FID AND B.HSOURCEENTRYID = C.FENTRYID
@@ -5143,6 +5145,7 @@
                                 FentityModel.Add("FPrice", item["FPRICE"].ToString());//鍗曚环
                                 FentityModel.Add("FTaxPrice", item["FTAXPRICE"].ToString());//鍚◣鍗曚环
                                 FentityModel.Add("FEntryTaxRate", item["FTAXRATE"].ToString());//绋庣巼
+                                FentityModel.Add("FGiveAway", item["FGIVEAWAY"].ToString());//鏄惁璧犲搧
 
                                 JArray Fentity2 = new JArray();
                                 JObject FentityModel2 = new JObject();
@@ -5332,9 +5335,11 @@
                 string sql = string.Empty;
                 if (FCusName.Contains("瀹夌憺"))
                     sql = $"select top 1 HItemID,HSourceBillNo,HQty,HSourceInterID,HSourceEntryID from  Gy_BarCodeBill where HSourceInterID =(select distinct HSourceInterID from Cg_POInStockBillSub where HInterID ={HInterID}) and HBarCode = '{HBarcode}' and HBarCodeType ='绠卞彿鍐呮潯鐮�'";
+                else if(FCusName.Contains("娣诲悍绉戞妧"))
+                    sql = $"select top 1 HItemID,HSourceBillNo,HQty,HSourceInterID,HSourceEntryID,HMaterID,HBatchNo,HProduceDate,HExpiryDate from  Gy_BarCodeBill where HSourceInterID = {HInterID} and HBarCode = '{HBarcode}' and HBarCodeType ='绠卞彿鍐呮潯鐮�'";
                 else
                     sql = $"select HItemID,HSourceBillNo,HQty,HSourceInterID,HSourceEntryID from  Gy_BarCodeBill where HSourceInterID ={HInterID} and HBarCode = '{HBarcode.Split('#')[0]}' and HQty = {HBarcode.Split('#')[1]}";
-                DataSet ds = oCn.RunProcReturn(sql, "H_v_SRM_POOrderBillList");
+                DataSet ds = oCn.RunProcReturn(sql, "Gy_BarCodeBill");
                 if (ds.Tables[0].Rows.Count == 0)
                 {
                     objJsonResult.code = "0";

--
Gitblit v1.9.1