From 0ddb62e15fb6c088ef54a77e99464f9389805f3b Mon Sep 17 00:00:00 2001
From: yxj <1qaz@123>
Date: 星期三, 11 一月 2023 13:32:11 +0800
Subject: [PATCH] 新增获取单据子类型方法,直接调拨、其他入库、其他出库上传方法中递入单据子类型
---
WebAPI/Controllers/Sc_ProcessMangementController.cs | 66 ++++++++++++++++++++++++++++-----
1 files changed, 56 insertions(+), 10 deletions(-)
diff --git a/WebAPI/Controllers/Sc_ProcessMangementController.cs b/WebAPI/Controllers/Sc_ProcessMangementController.cs
index 74861e0..e8d5b10 100644
--- a/WebAPI/Controllers/Sc_ProcessMangementController.cs
+++ b/WebAPI/Controllers/Sc_ProcessMangementController.cs
@@ -98,6 +98,51 @@
return objJsonResult;
}
+ #region 鏈亾宸ュ簭姹囨姤鍏ュ簱
+ /// <summary>
+ /// 鏈亾宸ュ簭姹囨姤鍏ュ簱鍒楄〃
+ /// </summary>
+ /// <param name="sWhere"></param>
+ /// <param name="user"></param>
+ /// <returns></returns>
+ [Route("Sc_ProcessMangement/Sc_ProcessReportList_Last")]
+ [HttpGet]
+ public object Sc_ProcessReportList_Last(string sWhere, string user)
+ {
+ try
+ {
+ //鍒ゆ柇鏄惁鏈夋煡璇㈡潈闄�
+ if (!DBUtility.ClsPub.Security_Log("Cj_StationOutBill_Query", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犳煡璇㈡潈闄�!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ string sql1 = "select * from h_v_Sc_ProcessReportList_Last where 1 = 1 and HLastProc='鏄�'";
+ string sql = sql1 + sWhere + " order by hmainid desc";
+ ds = oCN.RunProcReturn(sql, "h_v_Sc_ProcessReportList_Last");
+
+ 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;
+ }
+ }
+ #endregion
+
#region 宸ュ簭姹囨姤鍏ュ簱
/// <summary>
/// 鑾峰彇宸ュ簭姹囨姤鍏ュ簱鍗曞垪琛�
@@ -121,16 +166,11 @@
return objJsonResult;
}
- if (sWhere == null || sWhere.Equals(""))
- {
- ds = oCN.RunProcReturn("select * from h_v_MES_StationOutBillList_LastProc order by hmainid desc", "h_v_MES_StationOutBillList_LastProc");
- }
- else
- {
- string sql1 = "select * from h_v_MES_StationOutBillList_LastProc where 1 = 1 ";
- string sql = sql1 + sWhere + " order by hmainid desc";
- ds = oCN.RunProcReturn(sql, "h_v_MES_StationOutBillList_LastProc");
- }
+
+ string sql1 = "select * from h_v_Sc_ProcessReportList_Last where 1 = 1 and HFstProc='鏄�' ";
+ string sql = sql1 + sWhere + " order by hmainid desc";
+ ds = oCN.RunProcReturn(sql, "h_v_Sc_ProcessReportList_Last");
+
objJsonResult.code = "1";
objJsonResult.count = 1;
objJsonResult.Message = "Sucess锛�";
@@ -331,6 +371,8 @@
objJsonResult.data = null;
return objJsonResult;
}
+
+ oCN.RunProc("update Sc_StationOutBillMain set HRelationQty=1 where HBillNo='" + BillNo+"'");
oCN.Commit();
objJsonResult.code = "0";
@@ -577,6 +619,8 @@
return objJsonResult;
}
+ oCN.RunProc("update Sc_StationOutBillMain set HRelationQty=1 where HBillNo='" + BillNo + "'");
+
oCN.Commit();
objJsonResult.code = "0";
objJsonResult.count = 1;
@@ -814,6 +858,8 @@
return objJsonResult;
}
+ //oCN.RunProc("update Sc_StationOutBillMain set HRelationQty=1 where HBillNo='" + BillNo + "'");
+
oCN.Commit();
oCN.RunProc("update sc_stationoutbillmain set HBFFlag =1 where HProcExchBillNo = '" + BillNo + "'");
objJsonResult.code = "0";
--
Gitblit v1.9.1