From 7f6310aa085749df1e1c66bf6d48b3850e332107 Mon Sep 17 00:00:00 2001
From: yusijie <ysj@hz-kingdee.com>
Date: 星期四, 20 二月 2025 15:09:13 +0800
Subject: [PATCH] 送货单编辑保存报错回滚;生成送货单校验数量,金蝶表连接方式取值改为取配置文件上的金蝶数据库
---
WebAPI/Controllers/PODemandPlanController.cs | 24 ++++++++----------------
1 files changed, 8 insertions(+), 16 deletions(-)
diff --git a/WebAPI/Controllers/PODemandPlanController.cs b/WebAPI/Controllers/PODemandPlanController.cs
index ad24e71..46bf448 100644
--- a/WebAPI/Controllers/PODemandPlanController.cs
+++ b/WebAPI/Controllers/PODemandPlanController.cs
@@ -27,30 +27,22 @@
/// <param name="OnePage"></param>
/// <returns></returns>
[Route("GetPODemandPlanBill")]
- [HttpGet]
+ [HttpPost]
//閲囪喘璁㈠崟鍒楄〃
- public object GetPODemandPlanBill(string HSupNo, string sqlWhere)
+ public object GetPODemandPlanBill([FromBody] JObject msg)
{
- string msg = "";
+ string HSupNo = msg["HSupNo"].ToString(); string sqlWhere = msg["sqlWhere"].ToString();
try
{
string VsWhere = "";
string PcWhere = "";
- SQLHelper.ClsCNSRM oCn = new SQLHelper.ClsCNSRM();
+ SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
DataSet ds;
//鍏朵粬杩囨护
- if (msg.Trim() == "")
- {
- msg = " Where hsupid in (select HItemID from h_v_IF_Supplier where hnumber=^^" + HSupNo.Trim() + "^^) " + sqlWhere;
- // msg = " Where hsupid in (select hsupid from Gy_UserSupplierRelation where HUserID=^^" + System.Web.HttpContext.Current.Session["HUserName"].ToString() + "^^)";
- }
- else
- {
- msg = msg + " and hsupid in (select HItemID from h_v_IF_Supplier where hnumber=^^" + HSupNo.Trim() + "^^) " + sqlWhere;
- // msg = msg + " Where hsupid in (select hsupid from Gy_UserSupplierRelation where HUserID=^^" + System.Web.HttpContext.Current.Session["HUserName"].ToString() + "^^)";
- }
+ string sql = " Where hsupid in (select HSupID from h_v_Gy_UserSupplierList where 鐢ㄦ埛=^^" + HSupNo.Trim() + "^^) " + sqlWhere;
+
//杞崲鐗规畩瀛楃
- if (Common.SQLtoChange(msg, ref VsWhere, ref PcWhere) == false)
+ if (Common.SQLtoChange(sql, ref VsWhere, ref PcWhere) == false)
{
objjson.code = "0";
objjson.count = 0;
@@ -59,7 +51,7 @@
return objjson;
}
//鑾峰彇鎬昏鏁�
- Int64 RowTotal = Common.GetRowTotal("H_v_SRM_PODemandPlanBillList", VsWhere, ref DBUtility.ClsPub.sExeReturnInfo);
+ Int64 RowTotal = Common.GetRowTotal("h_v_SRM_JIT_PODemandPlanBillList", VsWhere, ref DBUtility.ClsPub.sExeReturnInfo);
//鑾峰彇杩斿洖鏁版嵁
ds = oCn.RunProcReturn("exec H_p_SRM_PODemandPlanBillList '" + PcWhere + "'", "H_p_SRM_PODemandPlanBillList");
if (ds == null || ds.Tables[0].Rows.Count == 0)
--
Gitblit v1.9.1