From 1a94e0e270668ef1cfbcd5043b72bc6591a50706 Mon Sep 17 00:00:00 2001
From: llj <132905093+newwwwwwtree@users.noreply.github.com>
Date: 星期四, 07 八月 2025 15:18:46 +0800
Subject: [PATCH] 价目表新增审核按钮无效修理bug
---
WebAPI/Controllers/基础资料/基础资料/Gy_SOPBillController.cs | 99 +++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 99 insertions(+), 0 deletions(-)
diff --git "a/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_SOPBillController.cs" "b/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_SOPBillController.cs"
index 98ed206..dc2d10c 100644
--- "a/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_SOPBillController.cs"
+++ "b/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_SOPBillController.cs"
@@ -19,6 +19,7 @@
private json objJsonResult = new json();
SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
DataSet ds;
+ Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter();
/// <summary>
/// 杩斿洖鐢熶骇璧勬簮鐢熶骇鐘舵�佸伐鍗曞垪琛�
@@ -179,5 +180,103 @@
}
}
+ /// <summary>
+ /// 鏍规嵁鐗╂枡锛屽伐鍗曟煡鎵句綔涓氭寚瀵间功
+ ///鍙傛暟锛歴tring sql銆�
+ ///杩斿洖鍊硷細object銆�
+ /// </summary>
+ [Route("Gy_SopBill/getListByMaterID")]
+ [HttpGet]
+ public object getListByMaterID(Int64 HMaterID, string HSourceNo)
+ {
+ try
+ {
+ var sWhere = "";
+ if (Convert.ToInt32(HMaterID) != 0 && HMaterID.ToString() != "" && HSourceNo != null && HSourceNo.ToString() != "" )
+ {
+ sWhere += " and HMaterID = " + HMaterID + " and HSourceNo = '" + HSourceNo + "'";
+ }
+ string sql1 = string.Format(@"select * from h_v_Sc_ICMOBillList_ToSop where 1 = 1 " + sWhere);
+
+ ds = oCN.RunProcReturn(sql1, "h_v_Sc_ICMOBillList_ToSop");
+
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ /// <summary>
+ /// 鏍规嵁鐗╂枡+宸ュ簭鏌ユ壘浣滀笟鎸囧涔�
+ ///鍙傛暟锛歴tring sql銆�
+ ///杩斿洖鍊硷細object銆�
+ /// </summary>
+ [Route("Gy_SopBill/getListByMaterProc")]
+ [HttpGet]
+ public object getListByMaterProc(Int64 HMaterID, Int64 HProcID,string HType)
+ {
+ try
+ {
+ var sWhere = "";
+ if (HType != "")
+ {
+ if (Convert.ToInt32(HMaterID) != 0 && HMaterID.ToString() != "" && Convert.ToInt32(HProcID) != 0 && HProcID.ToString() != "")
+ {
+ sWhere += " and HMaterID = " + HMaterID + " and HProcID = " + HProcID + " and HProcID2 = " + HProcID + " and 鎸囧涔︾被鍨� = '"+ HType + "'";
+ }
+ }
+ else
+ {
+ if (Convert.ToInt32(HMaterID) != 0 && HMaterID.ToString() != "" && Convert.ToInt32(HProcID) != 0 && HProcID.ToString() != "")
+ {
+ sWhere += " and HMaterID = " + HMaterID + " and HProcID = " + HProcID + " and HProcID2 = " + HProcID + " ";
+ }
+ }
+ //if (Convert.ToInt32(HMaterID) != 0 && HMaterID.ToString() != "" && Convert.ToInt32(HProcID) != 0 && HProcID.ToString() != "")
+ //{
+ // sWhere += " and HMaterID = " + HMaterID + " and HProcID = " + HProcID + " and HProcID2 = " + HProcID ;
+ //}
+ string sql1 = string.Format(@"select * from h_v_Sc_ICMOBillStatus_Tmp_SOP where 1 = 1 " + sWhere);
+
+ //鑾峰彇鏄剧ず绯荤粺鍙傛暟
+ string sReturn = "";
+ oSystemParameter.ShowBill(ref sReturn);
+
+ if (oSystemParameter.omodel.WMS_CampanyName == "涔濊彵") //绯荤粺鍙傛暟 瀹㈡埛瀹氬埗鍖栧悕绉� 绌虹櫧涓洪�氱敤
+ {
+ ds = oCN.RunProcReturn("select * from h_v_Sc_ICMOBillStatus_Tmp_SOP where HMaterID = " + HMaterID, "h_v_Sc_ICMOBillStatus_Tmp_SOP");
+ }
+ else
+ {
+ ds = oCN.RunProcReturn(sql1, "h_v_Sc_ICMOBillStatus_Tmp_SOP");
+ }
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
}
}
\ No newline at end of file
--
Gitblit v1.9.1