From 98d347cca2dea579b6281a9ca4dd6405eea16c76 Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期二, 16 八月 2022 18:22:22 +0800
Subject: [PATCH] 1
---
WebAPI/Controllers/MJGL/Sc_MouldProdInBillController.cs | 41 +++++++++++++++++++++++++++++------------
1 files changed, 29 insertions(+), 12 deletions(-)
diff --git a/WebAPI/Controllers/MJGL/Sc_MouldProdInBillController.cs b/WebAPI/Controllers/MJGL/Sc_MouldProdInBillController.cs
index a12cc8c..dba3dc3 100644
--- a/WebAPI/Controllers/MJGL/Sc_MouldProdInBillController.cs
+++ b/WebAPI/Controllers/MJGL/Sc_MouldProdInBillController.cs
@@ -144,9 +144,22 @@
objJsonResult.data = null;
return objJsonResult;
}
+ //鍒犻櫎鍓嶆煡鎵惧綋鍓嶅崟鎹殑鎵�鏈夊櫒鍏稩D
+ //string swhere = "";
+ //DataSet ds = oCn.RunProcReturn("select HMaterID from Sc_MouldStockBillSub where HinterID=" + HInterID, "Sc_MouldStockBillSub");
+ //for (var i = 0; i < ds.Tables[0].Rows.Count; i++)
+ //{
+ // swhere = swhere + ds.Tables[0].Rows[i]["HMaterID"].ToString() + ",";
+ //}
+ //swhere = swhere.Substring(0, swhere.Length - 1);
bool IsDete = oBill.DeleteBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo);
+
if (IsDete)
{
+ //鍒犻櫎鎴愬姛淇敼鍣ㄥ叿妗f浣嶇疆
+ //string sql = string.Format($"exec h_p_Sc_MouldChangeNowWHID 0,0,'{swhere}' ");
+ string sql = string.Format($"exec h_p_Sc_MouldChangeNowWHID ");
+ oCn.RunProc(sql);
objJsonResult.code = "1";
objJsonResult.count = 1;
objJsonResult.Message = DBUtility.ClsPub.sExeReturnInfo;
@@ -166,7 +179,7 @@
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "鍗曟嵁鏈壘鍒�";
+ objJsonResult.Message = DBUtility.ClsPub.sExeReturnInfo;
objJsonResult.data = null;
return objJsonResult;
}
@@ -627,24 +640,28 @@
{
// bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo);
bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo);
- }
- else
- {
- bResult = oBill.ModifyBill(oBill.omodel.HInterID, ref DBUtility.ClsPub.sExeReturnInfo);
- }
- if (bResult)
- {
- string sql =string.Format($"exec h_p_Sc_MouldChangeFileStatus 'in','{oBill.omodel.HInterID.ToString()}' ");
- DataSet db=oCn.RunProcReturn(sql, "h_p_Sc_MouldChangeFileStatus");
- if (db.Tables[0].Rows[0]["issuccess"].ToString()=="0")
+ //淇敼鍣ㄥ叿妗f浣嶇疆
+ string sql = string.Format($"exec h_p_Sc_MouldChangeFileStatus 'in','{oBill.omodel.HInterID.ToString()}' ");
+ DataSet db = oCn.RunProcReturn(sql, "h_p_Sc_MouldChangeFileStatus");
+ if (db.Tables[0].Rows[0]["issuccess"].ToString() == "0")
{
objJsonResult.code = "0";
objJsonResult.count = 0;
objJsonResult.Message = "鍣ㄥ叿浣嶇疆鍚屾澶辫触锛�";
- //WebAPIController.Add_Log("閫佽揣鍗曚笅鎺�", UserName, "鐢熸垚閫佽揣鍗�");
objJsonResult.data = 1;
return objJsonResult;
}
+ }
+ else
+ {
+ bResult = oBill.ModifyBill(oBill.omodel.HInterID, ref DBUtility.ClsPub.sExeReturnInfo);
+ //淇敼鎴愬姛
+ //string sql = string.Format($"exec h_p_Sc_MouldChangeNowWHID 1,{oBill.omodel.HInterID.ToString()},' ' ");
+ string sql = string.Format($"exec h_p_Sc_MouldChangeNowWHID ");
+ oCn.RunProc(sql);
+ }
+ if (bResult)
+ {
objJsonResult.code = "0";
objJsonResult.count = 1;
objJsonResult.Message = "淇濆瓨鎴愬姛锛�";
--
Gitblit v1.9.1