From 40f60a528ae741f3cf220fd79dbb68450799bf09 Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期二, 18 六月 2024 12:10:37 +0800
Subject: [PATCH] 出站单审核优化
---
WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs | 74 ++++++++++++++++++++++---------------
1 files changed, 44 insertions(+), 30 deletions(-)
diff --git a/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs b/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs
index 43a78b6..6635690 100644
--- a/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs
+++ b/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs
@@ -441,36 +441,36 @@
//涓昏〃
LogService.Write($"5.绯荤粺鎺у埗鏌ヨ鍒ゆ柇锛岀敤鏃�" + sw.Elapsed);
- ds = oCN.RunProcReturn("exec h_p_MES_StationOutBill_QtyCtrl " + HInterID + "", "h_p_MES_StationOutBill_QtyCtrl");
- if (ds == null)
- {
- oCN.RollBack();
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "鍒ゆ柇鏁伴噺澶辫触锛�";
- objJsonResult.data = null;
- return objJsonResult;
- }
- LogService.Write($"5.1锛岀敤鏃�" + sw.Elapsed);
- if (ds.Tables[0].Rows.Count == 0)
- {
- oCN.RollBack();
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "鍒ゆ柇鏁伴噺澶辫触锛�";
- objJsonResult.data = null;
- return objJsonResult;
- }
- LogService.Write($"5.2锛岀敤鏃�" + sw.Elapsed);
- if (ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) == "2")
- {
- oCN.RollBack();
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "鏁伴噺鎺у埗," + ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
- objJsonResult.data = null;
- return objJsonResult;
- }
+ //ds = oCN.RunProcReturn("exec h_p_MES_StationOutBill_QtyCtrl " + HInterID + "", "h_p_MES_StationOutBill_QtyCtrl");
+ //if (ds == null)
+ //{
+ // oCN.RollBack();
+ // objJsonResult.code = "0";
+ // objJsonResult.count = 0;
+ // objJsonResult.Message = "鍒ゆ柇鏁伴噺澶辫触锛�";
+ // objJsonResult.data = null;
+ // return objJsonResult;
+ //}
+ //LogService.Write($"5.1锛岀敤鏃�" + sw.Elapsed);
+ //if (ds.Tables[0].Rows.Count == 0)
+ //{
+ // oCN.RollBack();
+ // objJsonResult.code = "0";
+ // objJsonResult.count = 0;
+ // objJsonResult.Message = "鍒ゆ柇鏁伴噺澶辫触锛�";
+ // objJsonResult.data = null;
+ // return objJsonResult;
+ //}
+ //LogService.Write($"5.2锛岀敤鏃�" + sw.Elapsed);
+ //if (ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) == "2")
+ //{
+ // oCN.RollBack();
+ // objJsonResult.code = "0";
+ // objJsonResult.count = 0;
+ // objJsonResult.Message = "鏁伴噺鎺у埗," + ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
+ // objJsonResult.data = null;
+ // return objJsonResult;
+ //}
LogService.Write($"6.鍒ゆ柇缁撴潫锛岀敤鏃�" + sw.Elapsed);
oCN.RunProc("exec h_p_Mes_ProcessExchangeRelationQty_Out " + HInterID + ","+ num + "");
LogService.Write($"6.1锛岀敤鏃�" + sw.Elapsed);
@@ -2665,6 +2665,19 @@
{
}
+ DataSet dataSet = oCN.RunProcReturn(@"select a.HProcExchBillNo,a.HQty,b.HQty HProcExchQty from Sc_StationOutBillMain a
+inner join Sc_ProcessExchangeBillMain b on a.HProcExchInterID = b.HInterID
+where a.HInterID = " + lngBillKey, "Sc_ProcessExchangeBillMain");
+
+ if (dataSet.Tables[0].Rows.Count > 0)
+ {
+ string HProcExchBillNo = dataSet.Tables[0].Rows[0]["HProcExchBillNo"].ToString();
+ double HQty = double.Parse(dataSet.Tables[0].Rows[0]["HQty"].ToString());
+ double HProcExchQty = double.Parse(dataSet.Tables[0].Rows[0]["HProcExchQty"].ToString());
+
+ LogService.Write("鍑虹珯鍗曟嵁瀹℃牳鏇存敼娴佽浆鍗℃暟閲�,娴佽浆鍗�:" + HProcExchBillNo + ",鍑虹珯鍗曞彿锛�" + HBillNo + ",鍘熸祦杞崱鏁伴噺:" + HProcExchQty + ",鏂版祦杞崱鏁伴噺:" + HQty);
+ }
+
//瀹℃牳鍚庢帶鍒�
string sql = "exec h_p_Sc_StationOutBill_AfterCheckCtrl " + lngBillKey + ",'" + HBillNo + "','" + CurUserName + "'";
ds = oCN.RunProcReturn(sql, "h_p_Sc_StationOutBill_AfterCheckCtrl");
@@ -2680,6 +2693,7 @@
oCN.RollBack();
return false;
}
+
sReturn = sReturn + " 瀹℃牳鍔熻兘锛�";
oCN.Commit();
--
Gitblit v1.9.1