From 0a34481ece298f7dbefd4f51c4bf8fc785d0c716 Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期一, 29 一月 2024 13:59:15 +0800
Subject: [PATCH] 收款单、应收退款单:编辑保存增加保存前/保存后控制
---
WebAPI/Controllers/Sc_MouldRepairInBillListController.cs | 171 +++++++++++++++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 165 insertions(+), 6 deletions(-)
diff --git a/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs b/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs
index e31b4f6..9b8a85d 100644
--- a/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs
+++ b/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs
@@ -520,6 +520,58 @@
}
}
+ #region 鍣ㄥ叿鏁呴殰璁板綍缁熻鍒嗘瀽
+ /// <summary>
+ /// 鍣ㄥ叿缁翠慨璁板綍缁熻鍒嗘瀽 鍒楄〃
+ ///鍙傛暟锛歴tring sql銆�
+ ///杩斿洖鍊硷細object銆�
+ /// </summary>
+ [Route("Sb_MouldRepairWorkBill/Sc_MouldConkBookBillMain")]
+ [HttpGet]
+ public object Sc_MouldConkBookBillMain(string DateYear, string HType, string user)
+ {
+ try
+ {
+ List<object> columnNameList = new List<object>();
+
+ if (DateYear == null || DateYear.Equals(""))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "璇烽�夋嫨鏈夋晥骞翠唤";
+ return objJsonResult;
+ }
+ else
+ {
+ ds = oCN.RunProcReturn("exec h_p_Sc_MouldConkBookBillMain'" + DateYear + "','" + HType + "'", "h_p_Sc_MouldConkBookBillMain");
+ }
+
+ //娣诲姞鍒楀悕
+ 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鍒楀璞$殑鍒楀悕
+ }
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ objJsonResult.list = columnNameList;
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
#region sql璇彞
@@ -1011,14 +1063,18 @@
oCN.BeginTran();
//閿�鍞嚭搴撳垹闄ゅ洖濉攢鍞鍗曞叧鑱旀暟閲�
- oCN.RunProc("exec h_p_Xs_UpDateRelation_SeOrderToSellOut_Delete " + HInterID);
+ //oCN.RunProc("exec h_p_Xs_UpDateRelation_SeOrderToSellOut_Delete " + HInterID);
- oCN.RunProc("Delete From Kf_ICStockBillMain where HInterID = " + HInterID);
- oCN.RunProc("Delete From Kf_ICStockBillSub where HInterID = " + HInterID);
+ //oCN.RunProc("Delete From Kf_ICStockBillMain where HInterID = " + HInterID);
+ //oCN.RunProc("Delete From Kf_ICStockBillSub where HInterID = " + HInterID);
+
+ string sql = "exec h_p_WMS_ICStockBillAndWMS_Delete " + BillOld.omodel.HInterID + ",'" + BillOld.omodel.HBillNo + "','1205'";
+ oCn.RunProc(sql);
+
oCN.Commit();
objJsonResult.code = "1";
objJsonResult.count = 1;
- objJsonResult.Message = "鍒犻櫎鎴愬姛锛�";
+ objJsonResult.Message = "鎮ㄥ凡鍒犻櫎鍗曟嵁鍙蜂负" + BillOld.omodel.HBillNo + "鐨勯攢鍞嚭搴撳崟锛�";
objJsonResult.data = null;
return objJsonResult;
}
@@ -1039,11 +1095,11 @@
{
if (sWhere == null || sWhere.Equals(""))
{
- return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_IF_SellOutBillList order by 鍗曟嵁鍙� desc", "h_v_IF_SellOutBillList");
+ return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_IF_SellOutBillList order by 鍒跺崟鏃ユ湡 desc,鍗曟嵁鍙� desc", "h_v_IF_SellOutBillList");
}
else
{
- return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_IF_SellOutBillList where 1=1 " + sWhere + " order by 鍗曟嵁鍙� desc", "h_v_IF_SellOutBillList");
+ return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_IF_SellOutBillList where 1=1 " + sWhere + " order by 鍒跺崟鏃ユ湡 desc,鍗曟嵁鍙� desc", "h_v_IF_SellOutBillList");
}
}
#endregion
@@ -2895,6 +2951,58 @@
}
#endregion
+ #region 鍣ㄥ叿缁翠慨璁板綍缁熻鍒嗘瀽
+ /// <summary>
+ /// 鍣ㄥ叿缁翠慨璁板綍缁熻鍒嗘瀽 鍒楄〃
+ ///鍙傛暟锛歴tring sql銆�
+ ///杩斿洖鍊硷細object銆�
+ /// </summary>
+ [Route("Sb_MouldRepairWorkBill/Sb_MouldRepairWorkBill")]
+ [HttpGet]
+ public object Sb_MouldRepairWorkBill(string DateYear, string HType, string user)
+ {
+ try
+ {
+ List<object> columnNameList = new List<object>();
+
+ if (DateYear == null || DateYear.Equals(""))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "璇烽�夋嫨鏈夋晥骞翠唤";
+ return objJsonResult;
+ }
+ else
+ {
+ ds = oCN.RunProcReturn("exec h_p_Sb_MouldRepairWorkBill'" + DateYear + "','" + HType + "'", "h_p_Sb_MouldRepairWorkBill");
+ }
+
+ //娣诲姞鍒楀悕
+ 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鍒楀璞$殑鍒楀悕
+ }
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ objJsonResult.list = columnNameList;
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
#region 妯″叿缁翠慨楠屾敹鍗曚繚瀛�/缂栬緫
@@ -3783,6 +3891,57 @@
}
#endregion
+ #region 鍣ㄥ叿淇濆吇璁板綍缁熻鍒嗘瀽
+ /// <summary>
+ /// 鍣ㄥ叿缁翠慨璁板綍缁熻鍒嗘瀽 鍒楄〃
+ ///鍙傛暟锛歴tring sql銆�
+ ///杩斿洖鍊硷細object銆�
+ /// </summary>
+ [Route("Sb_MouldRepairWorkBill/Sc_MouldMaintainBillMain")]
+ [HttpGet]
+ public object Sc_MouldMaintainBillMain(string DateYear, string HType, string user)
+ {
+ try
+ {
+ List<object> columnNameList = new List<object>();
+
+ if (DateYear == null || DateYear.Equals(""))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "璇烽�夋嫨鏈夋晥骞翠唤";
+ return objJsonResult;
+ }
+ else
+ {
+ ds = oCN.RunProcReturn("exec h_p_Sc_MouldMaintainBillMain'" + DateYear + "','" + HType + "'", "h_p_Sc_MouldMaintainBillMain");
+ }
+
+ //娣诲姞鍒楀悕
+ 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鍒楀璞$殑鍒楀悕
+ }
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ objJsonResult.list = columnNameList;
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
#endregion
#region 妯″叿淇濆吇璁板綍琛�
--
Gitblit v1.9.1