From 849e974e20d9894f3da95ebf504d97ce9f14c9ed Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期四, 05 十二月 2024 15:03:25 +0800
Subject: [PATCH] 工艺路线撤回,出站汇报单修改时间功能能
---
WebAPI/Controllers/CGGL/Kf_POStockInBillController.cs | 68 +++++++++++++++++++++++++++++++--
1 files changed, 63 insertions(+), 5 deletions(-)
diff --git a/WebAPI/Controllers/CGGL/Kf_POStockInBillController.cs b/WebAPI/Controllers/CGGL/Kf_POStockInBillController.cs
index 46a466c..deff087 100644
--- a/WebAPI/Controllers/CGGL/Kf_POStockInBillController.cs
+++ b/WebAPI/Controllers/CGGL/Kf_POStockInBillController.cs
@@ -90,6 +90,64 @@
}
}
+
+ #region 閲囪喘鍏ュ簱鍗曞垎椤靛垪琛�
+ [Route("Kf_POStockInBill/page")]
+ [HttpGet]
+ public object Kf_POStockInBillPage(string sWhere, string user, int page, int size)
+ {
+ DataSet ds;
+ json res = new json();
+ try
+ {
+ List<object> columnNameList = new List<object>();
+ //鍒ゆ柇鏉冮檺
+ //if (!DBUtility.ClsPub.Security_Log("Kf_POStockInBillList", 1, false, user))
+ //{
+ // objJsonResult.code = CodeConstant.FAIL;
+ // objJsonResult.count = CountConstant.FAIL;
+ // objJsonResult.Message = "鎮ㄦ病鏈夎妯″潡鏉冮檺,璇蜂笌绠$悊鍛樿仈绯伙紒";
+ // objJsonResult.data = null;
+ // return objJsonResult;
+ //}
+
+ sWhere = sWhere.Replace("'", "''");
+ if (sWhere == null || sWhere.Equals(""))
+ {
+ ds = oCN.RunProcReturn("exec h_p_Kf_POStockInBillList_New " + page + "," + size + ",''", "h_p_Kf_POStockInBillList_New");
+ }
+ else
+ {
+ ds = oCN.RunProcReturn("exec h_p_Kf_POStockInBillList_New " + page + "," + size + ",'" + sWhere + "'", "h_p_Kf_POStockInBillList_New");
+ }
+
+ //娣诲姞鍒楀悕
+ foreach (DataColumn col in ds.Tables[0].Columns)
+ {
+ Type dataType = col.DataType;
+ string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+ columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+ }
+
+ res.code = CodeConstant.SUCCEED;
+ res.count = int.Parse(ds.Tables[1].Rows[0]["count"].ToString());
+ res.Message = "Sucess锛�";
+ res.list = columnNameList;
+ res.data = ds.Tables[0];
+ return res;
+ }
+ catch (Exception e)
+ {
+ res.code = CodeConstant.FAIL;
+ res.count = CountConstant.FAIL;
+ res.Message = "Exception锛�" + e.ToString();
+ res.data = null;
+ return res;
+ }
+ }
+ #endregion
+
+
#region 閲囪喘鍏ュ簱鍗� 淇濆瓨/缂栬緫鍔熻兘
[Route("Kf_POStockInBill/POStockInBillEdit")]
[HttpPost]
@@ -194,7 +252,7 @@
return objJsonResult;
}
- ds = oCN.RunProcReturn("select * from h_v_Kf_POStockInBillList where hmainid=" + HInterID + " and 鍗曟嵁鍙�='" + HBillNo + "'", "h_v_Kf_POStockInBillList");
+ ds = oCN.RunProcReturn("select * from h_v_Kf_POStockInBillList where hmainid=" + HInterID, "h_v_Kf_POStockInBillList");
if ((OperationType == 1 || OperationType == 2 || OperationType == 4) && ds.Tables[0].Rows.Count == 0)//鏂板
{
@@ -235,7 +293,7 @@
{ //淇敼
DataSet dss;
- dss = oCN.RunProcReturn("select * from h_v_Kf_POStockInBillList where hmainid=" + HInterID + " and 鍗曟嵁鍙�='" + HBillNo + "'", "h_v_Kf_POStockInBillList");
+ dss = oCN.RunProcReturn("select * from h_v_Kf_POStockInBillList where hmainid=" + HInterID , "h_v_Kf_POStockInBillList");
//鍒ゆ柇鏄惁鍙紪杈�
if (dss.Tables[0].Rows[0]["瀹℃牳浜�"].ToString() != "" && dss.Tables[0].Rows[0]["瀹℃牳浜�"] != null)
{
@@ -255,7 +313,7 @@
}
String sql = $@"update Kf_ICStockBillMain set " +
- "HRemark='" + HRemark + "', HUpDater='" + HMaker + "', HUpDateDate=getdate()" +
+ "HRemark='" + HRemark + "', HUpDater='" + HMaker + "', HUpDateDate=getdate()" + ",HBillNo='" + HBillNo + "'" +
",HSupID=" + HSupID + ",HCurID=" + HCurID + ",HSecManagerID=" + HSecManagerID + ", HSTOCKORGID=" + HSTOCKORGID + ",HKeeperID=" + HKeeperID + ",HWHID = " + HWHID
+ ",HEmpID=" + HEmpID + ",HManagerID=" + HManagerID + ",HDeptID=" + HDeptID + ",HOWNERID=" + HOWNERID
+ ",HAddress='" + HAddress + "',HInnerBillNo='" + HInnerBillNo + "',HProjectID="+ HProjectID + ",HInvoiceBillNo='"+ HInvoiceBillNo + "' where HInterID=" + HInterID;
@@ -573,7 +631,7 @@
try
{
- ds = oCN.RunProcReturn("select * from h_v_Kf_POStockInBillList where hmainid =" + HInterID, "h_v_Kf_POStockInBillList");
+ ds = oCN.RunProcReturn("select * from h_v_Kf_POStockInBillEdit where hmainid =" + HInterID, "h_v_Kf_POStockInBillList");
if (ds == null || ds.Tables[0].Rows.Count == 0)
{
objJsonResult.code = "0";
@@ -1972,7 +2030,7 @@
}
string sql = "select * from h_v_Kf_POStockInBillQuerySub where hmainid = " + hmainid;
- ds = oCN.RunProcReturn(sql + " order by hsubid desc", "h_v_Kf_POStockInBillQuerySub");
+ ds = oCN.RunProcReturn(sql + " order by hsubid ASC", "h_v_Kf_POStockInBillQuerySub");
foreach (DataColumn col in ds.Tables[0].Columns)
--
Gitblit v1.9.1