From 702aba29448a0f5729f31df6f511873b8d42cef2 Mon Sep 17 00:00:00 2001
From: YL <YL@LAPTOP-SE03PLUR>
Date: 星期一, 22 十一月 2021 14:24:31 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API
---
WebAPI/Controllers/Sc_MouldRepairInBillListController - .cs | 195 +++++++++++++++++++++++++-----------------------
1 files changed, 102 insertions(+), 93 deletions(-)
diff --git a/WebAPI/Controllers/Sc_MouldRepairInBillListController - .cs b/WebAPI/Controllers/Sc_MouldRepairInBillListController - .cs
index ebf6599..cac2f61 100644
--- a/WebAPI/Controllers/Sc_MouldRepairInBillListController - .cs
+++ b/WebAPI/Controllers/Sc_MouldRepairInBillListController - .cs
@@ -18,6 +18,7 @@
public DataSet ds = new DataSet();
public WebServer webserver = new WebServer();
public SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
public DAL.ClsSc_MouldScrapInBill BillNew0 = new DAL.ClsSc_MouldScrapInBill(); //妯″叿鎶ュ簾鍏ュ簱瀵瑰簲鍗曟嵁绫�
public DAL.ClsSc_MouldScrapInBill BillOld0 = new DAL.ClsSc_MouldScrapInBill(); //妯″叿鎶ュ簾鍏ュ簱瀵瑰簲鍗曟嵁绫�
@@ -227,9 +228,9 @@
else
{
string sql1 = "select * from h_v_Sc_MouldMaintain where 1 = 1 ";
- string sql = sql1 + sWhere+ "order by 鏃ユ湡 desc";
+ string sql = sql1 + sWhere + "order by 鏃ユ湡 desc";
return new SQLHelper.ClsCN().RunProcReturn(sql, "h_v_Sc_MouldMaintain");
-
+
}
//return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Sc_MouldMaintainBillList ", "h_v_Sc_MouldMaintainBillList");
}
@@ -329,7 +330,7 @@
public static DataSet Sc_MouldDotCheckBillList_s(string sWhere)
{
- return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Sc_MouldDotCheckBillList where 1=1 "+sWhere+ "order by 鏃ユ湡 desc", "h_v_Sc_MouldDotCheckBillList");
+ return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Sc_MouldDotCheckBillList where 1=1 " + sWhere + "order by 鏃ユ湡 desc", "h_v_Sc_MouldDotCheckBillList");
}
#endregion
@@ -468,12 +469,12 @@
DataSet ds;
if (sWhere == null || sWhere.Equals(""))
{
- ds = new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Sc_MouldConkBookBillList order by 鏃ユ湡 desc" + sWhere, "h_v_Sc_MouldConkBookBillList");
+ ds = new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Sc_MouldConkBookBillList order by 鏃ユ湡 desc" + sWhere, "h_v_Sc_MouldConkBookBillList");
}
else
{
string sql1 = "select * from h_v_Sc_MouldConkBookBillList where 1 = 1 ";
- string sql = sql1 + sWhere+ "order by 鏃ユ湡 desc";
+ string sql = sql1 + sWhere + "order by 鏃ユ湡 desc";
ds = new SQLHelper.ClsCN().RunProcReturn(sql, "h_v_Sc_MouldConkBookBillList");
}
return ds;
@@ -523,7 +524,7 @@
else
{
string sql1 = "select * from h_v_Sc_MouldRepairCheckBillList_Edit where 1 = 1 ";
- string sql = sql1 + sWhere+ "order by 鏃ユ湡 desc";
+ string sql = sql1 + sWhere + "order by 鏃ユ湡 desc";
ds = new SQLHelper.ClsCN().RunProcReturn(sql, "h_v_Sc_MouldRepairCheckBillList_Edit");
}
return ds;
@@ -639,7 +640,7 @@
else
{
string sql1 = "select * from h_v_Sc_MouldRepairWorkBillList where 1 = 1 ";
- string sql = sql1 + sWhere+ "order by 鏃ユ湡 desc";
+ string sql = sql1 + sWhere + "order by 鏃ユ湡 desc";
return new SQLHelper.ClsCN().RunProcReturn(sql, "h_v_Sc_MouldRepairWorkBillList");
}
}
@@ -791,56 +792,6 @@
return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_IF_MoveStockBillList order by 鏃ユ湡 desc", "h_v_IF_MoveStockBillList");
}
#endregion
-
- /// <summary>
- /// 鐢熶骇棰嗘枡鍗曞垪琛�
- /// </summary>
- /// <returns></returns>
- [Route("Kf_MateOutBill/GetMateOutBillList")]
- [HttpGet]
- public object GetMateOutBillList(string sWhere)
- {
- try
- {
-
- ds = Sc_GetMateOutBillList(sWhere);
- if (ds == null || ds.Tables[0].Rows.Count <= 0)
- {
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�";
- objJsonResult.data = null;
- return objJsonResult;
- }
- else
- {
- objJsonResult.code = "1";
- objJsonResult.count = 1;
- objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�";
- objJsonResult.data = ds.Tables[0];
- return objJsonResult;
- }
- }
- catch (Exception ex)
- {
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + ex.ToString();
- objJsonResult.data = null;
- return objJsonResult;
- }
- }
-
- #region sql璇彞
-
-
- public static DataSet Sc_GetMateOutBillList(string sWhere)
- {
- return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_IF_MateOutBillList order by 鏃ユ湡 desc", "h_v_IF_MateOutBillList");
- }
- #endregion
-
-
/// <summary>
/// 閿�鍞嚭搴撳崟鍒楄〃
/// </summary>
@@ -879,7 +830,36 @@
return objJsonResult;
}
}
-
+ /// <summary>
+ ///閿�鍞嚭搴撳崟鍒犻櫎鍔熻兘
+ /// </summary>
+ /// <returns></returns>
+ [Route("Kf_SellOutBill/DeltetSellOutBill")]
+ [HttpGet]
+ public object DeltetSeOutStockBackBill(string HInterID)
+ {
+ try
+ {
+ oCN.BeginTran();
+ oCN.RunProc("Delete From Kf_ICStockBillMain where HInterID = " + HInterID);
+ oCN.RunProc("Delete From Kf_ICStockBillSub where HInterID = " + HInterID);
+ oCN.Commit();
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍒犻櫎鎴愬姛锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ oCN.RollBack();
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
#region sql璇彞
@@ -1076,7 +1056,36 @@
return objJsonResult;
}
}
-
+ /// <summary>
+ ///浜у搧鍏ュ簱鍗曞垹闄ゅ姛鑳�
+ /// </summary>
+ /// <returns></returns>
+ [Route("Kf_ProductInBill/DeltetProductInBill")]
+ [HttpGet]
+ public object DeltetProductInBill(string HInterID)
+ {
+ try
+ {
+ oCN.BeginTran();
+ oCN.RunProc("Delete From Kf_ICStockBillMain where HInterID = " + HInterID);
+ oCN.RunProc("Delete From Kf_ICStockBillSub where HInterID = " + HInterID);
+ oCN.Commit();
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍒犻櫎鎴愬姛锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ oCN.RollBack();
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
#region sql璇彞
@@ -1502,7 +1511,7 @@
public object AuditProcessReportList(int HInterID, int IsAudit, string CurUserName)
{
string ModRightNameCheck = "Sb_MouldRepairWorkBill_Check";
- DBUtility.ClsPub.CurUserName=CurUserName;
+ DBUtility.ClsPub.CurUserName = CurUserName;
try
{
//瀹℃牳鏉冮檺
@@ -1576,7 +1585,7 @@
return objJsonResult;
}
if (IsAudit == 0) //瀹℃牳鎻愪氦
- {
+ {
//瀹℃牳鎻愪氦
if (oBill.CheckBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true)
{
@@ -2572,12 +2581,12 @@
//oItemSub.HSourceBillNo = ""; //婧愬崟鍗曞彿
//oItemSub.HSourceBillType = ""; //婧愬崟绫诲瀷
Sub.HRelationQty = 0; //鍏宠仈鏁伴噺
- //oItemSub.HRelationMoney = 0; //鍏宠仈閲戦
- //HMaterID = "";//閰嶄欢浠g爜
- //HUnitID = "";//鍗曚綅浠g爜
- //HQty = "";//瀹為檯鐢ㄩ噺
- //HQtyMust = "";//鍗曚綅鐢ㄩ噺
- //HRemark = "";//澶囨敞
+ //oItemSub.HRelationMoney = 0; //鍏宠仈閲戦
+ //HMaterID = "";//閰嶄欢浠g爜
+ //HUnitID = "";//鍗曚綅浠g爜
+ //HQty = "";//瀹為檯鐢ㄩ噺
+ //HQtyMust = "";//鍗曚綅鐢ㄩ噺
+ //HRemark = "";//澶囨敞
oBill.DetailColl.Add(Sub);
@@ -2683,7 +2692,7 @@
public object Sc_MouldMaintainBillListProjectDetaiNew(string HInterID)
{
- DataSet ds,ds1;
+ DataSet ds, ds1;
List<object> list = new List<object>();
string Swhere = "";
try
@@ -2692,7 +2701,7 @@
{
Swhere = " and hmainid='" + HInterID + "'";
}
- else
+ else
{
Swhere = HInterID;
}
@@ -2700,7 +2709,7 @@
//鑾峰彇淇濆吇椤圭洰缂栬緫鏁版嵁
string sql = "select HMaintainItemID, 淇濆吇椤圭洰浠g爜 HMaintainItemNumber,淇濆吇椤圭洰鍚嶇О HMaintainItem,淇濆吇閮ㄤ綅 HMaintainPart,鍏蜂綋瑕佹眰 HClaim,HManagerID,璐熻矗浜轰唬鐮� HManagerNumber,璐熻矗浜� HManagerName,琛ㄤ綋澶囨敞 HRemark from h_v_Sc_MouldMaintainBillListItem where 1 = 1 " + Swhere + "";
ds = oCN.RunProcReturn(sql, "h_v_Sc_MouldMaintainBillListItem");
- //鑾峰彇閰嶄欢椤圭洰缂栬緫鏁版嵁
+ //鑾峰彇閰嶄欢椤圭洰缂栬緫鏁版嵁
string sql1 = "select HMaterID, 閰嶄欢浠g爜 HMaterNumber,閰嶄欢鍚嶇О HMaterName,瑙勬牸鍨嬪彿 HMaterSpec,HUnitID,鍗曚綅浠g爜 HUnitNumber,鍗曚綅鍚嶇О HUnitName,瀹為檯鐢ㄩ噺 HQty,鏍囧噯鐢ㄩ噺 HQtyMust,HManagerID,璐熻矗浜轰唬鐮� HManagerNumber,璐熻矗浜� HManagerName,琛ㄤ綋澶囨敞 HRemark from h_v_Sc_MouldMaintainBillList where 1 = 1 " + Swhere + "";
ds1 = oCN.RunProcReturn(sql1, "h_v_Sc_MouldMaintainBillList");
list.Add(ds.Tables[0]);
@@ -2722,11 +2731,11 @@
#endregion
#region [妯″叿淇濆吇璁板綍琛ㄥ垹闄ゅ姛鑳絔
- /// <summary>
- /// 妯″叿缁翠慨鍗曞垹闄ゅ姛鑳�
- /// </summary>
- /// <returns></returns>
- [Route("Sc_MouldMaintainBill/DeltetSc_MouldMaintainBill")]
+ /// <summary>
+ /// 妯″叿缁翠慨鍗曞垹闄ゅ姛鑳�
+ /// </summary>
+ /// <returns></returns>
+ [Route("Sc_MouldMaintainBill/DeltetSc_MouldMaintainBill")]
[HttpGet]
public object DeltetSc_MouldMaintainBill(string HInterID)
{
@@ -3675,7 +3684,7 @@
oBill.omodel = oItem;
}
//瀛愯〃浣撴暟鎹�
-
+
List<Models.ClsSc_MouldStockBillSub> ls = new List<Models.ClsSc_MouldStockBillSub>();
ls = oListModels.getObjectByJson_Gy_MouldScrapInHouseBillSub(msg2);
int i = 0;
@@ -3753,7 +3762,7 @@
[Route("Sc_MouldScrapOutHouseBill/GetMouldScrapOutHouseBill")]
[HttpGet]
- public object GetMouldScrapOutHouseBill(string sWhere,string user, string Organization)
+ public object GetMouldScrapOutHouseBill(string sWhere, string user, string Organization)
{
try
{
@@ -3767,7 +3776,7 @@
return objJsonResult;
}
- ds = Sc_GetMouldScrapOutHouseBill(sWhere,Organization);
+ ds = Sc_GetMouldScrapOutHouseBill(sWhere, Organization);
objJsonResult.code = "1";
objJsonResult.count = 1;
objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�";
@@ -3789,11 +3798,11 @@
string sql1 = string.Format(@"select * from h_v_Sc_MouldScrapOutHouseBillList where 搴撳瓨缁勭粐='" + Organization + "'");
if (sWhere == null || sWhere.Equals(""))
{
- return new SQLHelper.ClsCN().RunProcReturn(sql1+ "order by 鏃ユ湡 desc", "h_v_Sc_MouldScrapOutHouseBillList");
+ return new SQLHelper.ClsCN().RunProcReturn(sql1 + "order by 鏃ユ湡 desc", "h_v_Sc_MouldScrapOutHouseBillList");
}
else
{
- string sql = sql1 + sWhere+ "order by 鏃ユ湡 desc";
+ string sql = sql1 + sWhere + "order by 鏃ユ湡 desc";
return new SQLHelper.ClsCN().RunProcReturn(sql, "h_v_Sc_MouldScrapOutHouseBillList");
}
}
@@ -3834,7 +3843,7 @@
HSecUnitID, 杈呭姪璁¢噺鍗曚綅浠g爜 HSecUnitCode, 杈呭姪璁¢噺鍗曚綅鍚嶇О HSecUnitName, 鎹㈢畻鐜� HSecUnitRate, HUnitID, 璁¢噺鍗曚綅浠g爜 HUnitCode, 璁¢噺鍗曚綅鍚嶇О HUnitName, 鎵规 HBatchNo,
璁捐瀵垮懡 HDesignLife, 鍓╀綑瀵垮懡 HLeaveLife, 浣跨敤瀵垮懡 HUseLife, 瀹炲彂鏁伴噺 HQty, 鍗曚环 HPrice, 閲戦 HMoney, HWHID, 鍙戣揣浠撳簱浠g爜 HWHCode, 鍙戣揣浠撳簱鍚嶇О HWHName,
HSPID, 浠撲綅浠g爜 HSPCode, 浠撲綅鍚嶇О HSPName, 澶囨敞 HRemark,HStockOrgID FROM h_v_Sc_MouldScrapOutHouseBillList"), "h_v_Sc_MouldScrapOutHouseBillList");
-
+
}
else
{
@@ -4023,7 +4032,7 @@
/// <returns></returns>
[Route("Sc_MouldScrapOutHouseBill/DeltetMouldScrapOutHouseBill")]
[HttpGet]
- public object DeltetMouldScrapOutHouseBill(string HInterID,string user)
+ public object DeltetMouldScrapOutHouseBill(string HInterID, string user)
{
//缂栬緫鏉冮檺
if (!DBUtility.ClsPub.Security_Log("Sc_MouldScrapOutBill_Delete", 1, true, user))
@@ -4327,7 +4336,7 @@
[Route("Sc_MouldProdBackBill/GetMouldProdBackBill")]
[HttpGet]
- public object GetMouldProdBackBill(string sWhere,string user, string Organization)
+ public object GetMouldProdBackBill(string sWhere, string user, string Organization)
{
try
{
@@ -4340,7 +4349,7 @@
return objJsonResult;
}
- ds = Sc_GetMouldProdBackBill(sWhere,Organization);
+ ds = Sc_GetMouldProdBackBill(sWhere, Organization);
objJsonResult.code = "1";
objJsonResult.count = 1;
objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�";
@@ -4357,7 +4366,7 @@
}
}
- public static DataSet Sc_GetMouldProdBackBill(string sWhere,string Organization)
+ public static DataSet Sc_GetMouldProdBackBill(string sWhere, string Organization)
{
string sql1 = string.Format(@"select * from h_v_Sc_MouldProdBackBillList where 搴撳瓨缁勭粐='" + Organization + "'");
if (sWhere == null || sWhere.Equals(""))
@@ -4366,7 +4375,7 @@
}
else
{
- string sql = sql1 + sWhere+ "order by 鏃ユ湡 desc";
+ string sql = sql1 + sWhere + "order by 鏃ユ湡 desc";
return new SQLHelper.ClsCN().RunProcReturn(sql, "h_v_Sc_MouldProdBackBillList");
}
@@ -4596,7 +4605,7 @@
/// <returns></returns>
[Route("Sc_MouldProdBackBill/DeltetMouldProdBackBill")]
[HttpGet]
- public object DeltetMouldProdBackBill(string HInterID,string user)
+ public object DeltetMouldProdBackBill(string HInterID, string user)
{
//缂栬緫鏉冮檺
if (!DBUtility.ClsPub.Security_Log("Sc_MouldProdBackBill_Delete", 1, true, user))
@@ -4760,7 +4769,7 @@
[Route("Sc_MouldProdOutBill/GetMouldProdOutBill")]
[HttpGet]
- public object GetMouldProdOutBill(string sWhere, string user,string Organization)
+ public object GetMouldProdOutBill(string sWhere, string user, string Organization)
{
try
{
@@ -4773,7 +4782,7 @@
return objJsonResult;
}
- ds = Sc_GetMouldProdOutBill(sWhere,Organization);
+ ds = Sc_GetMouldProdOutBill(sWhere, Organization);
objJsonResult.code = "1";
objJsonResult.count = 1;
objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�";
@@ -4795,11 +4804,11 @@
string sql1 = string.Format(@"select * from h_v_Sc_MouldProdOutHouseBillList where 搴撳瓨缁勭粐='" + Organization + "'");
if (sWhere == null || sWhere.Equals(""))
{
- return new SQLHelper.ClsCN().RunProcReturn(sql1+ "order by 鏃ユ湡 desc", "h_v_Sc_MouldProdOutHouseBillList");
+ return new SQLHelper.ClsCN().RunProcReturn(sql1 + "order by 鏃ユ湡 desc", "h_v_Sc_MouldProdOutHouseBillList");
}
else
{
- string sql = sql1 + sWhere+ "order by 鏃ユ湡 desc";
+ string sql = sql1 + sWhere + "order by 鏃ユ湡 desc";
return new SQLHelper.ClsCN().RunProcReturn(sql, "h_v_Sc_MouldProdOutHouseBillList");
}
@@ -4892,7 +4901,7 @@
string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
string msg2 = sArray[0].ToString();
string msg3 = sArray[1].ToString();
- string msg4= sArray[2].ToString();
+ string msg4 = sArray[2].ToString();
string UserName = "";
@@ -5223,7 +5232,7 @@
else
{
string sql1 = "select * from h_v_Sc_MouldLifeChangeBillList where 1 = 1 ";
- string sql = sql1 + sWhere+ "order by 鏃ユ湡 desc";
+ string sql = sql1 + sWhere + "order by 鏃ユ湡 desc";
return new SQLHelper.ClsCN().RunProcReturn(sql, "h_v_Sc_MouldLifeChangeBillList");
}
--
Gitblit v1.9.1