From ae5490b17751fa55c03359d837414f52a4a28649 Mon Sep 17 00:00:00 2001 From: YL <YL@LAPTOP-SE03PLUR> Date: 星期三, 17 十一月 2021 08:22:41 +0800 Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API --- WebAPI/Controllers/CGGL/Kf_POStockInBillController.cs | 112 ++++++++++ WebAPI/Controllers/CGGL/Cg_POInStockBillController.cs | 196 +++++++++++++++++ WebAPI/Controllers/XSGL/Xs_SeOrderBillController.cs | 68 ++++++ WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user | 34 +- WebAPI/Models/Gy_Mould.cs | 2 WebAPI/Controllers/BaseSet/Gy_MaterialController.cs | 13 WebAPI/Controllers/CGGL/Cg_POInStockBackBillController.cs | 38 +++ WebAPI/Controllers/WebAPIController.cs | 102 +++++++++ WebAPI/WebAPI.csproj | 1 WebAPI/Controllers/Sc_MouldRepairInBillListController - .cs | 74 +++--- 10 files changed, 583 insertions(+), 57 deletions(-) diff --git a/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs b/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs index 0dc8c6b..e15478b 100644 --- a/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs +++ b/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs @@ -591,6 +591,10 @@ long HPrintQty = mainList[0].HPrintQty; string HMouldOWNER = mainList[0].HMouldOWNER; string HSaveLife = mainList[0].HSaveLife; + int HMouldDotCheckRuleInterID= mainList[0].HMouldDotCheckRuleInterID; + int HMouldMaintainRuleInterID= mainList[0].HMouldMaintainRuleInterID; + + //涓昏〃 oCN.RunProc("Insert Into Gy_MouldFileMain " + @@ -602,7 +606,7 @@ ",HOutComDate,HOutComNo,HDeptID,HSupID,HSupNumber" + ",HPrintQty,HMouldStatus,HWhID,HRoutingID" + ",HBomID,HVersion,HSPGroupID,HSPID,HDesignLife" + - ",HUseLife,HLeaveLife,HProdQty,HProdWeight,HMouldOWNER,HSaveLife" + + ",HUseLife,HLeaveLife,HProdQty,HProdWeight,HMouldOWNER,HSaveLife,HMouldDotCheckRuleInterID,HMouldMaintainRuleInterID" + ") " + " values('" + BillType + "','" + BillType + "'," + HInterID + ",'" + HBillNo + "','" + HDate + "'" + "," + HYear + "," + HPeriod + ",'" + HRemark + "','" + HMaker + "',getdate()" + @@ -612,7 +616,7 @@ ",'" + HOutComDate + "','" + HOutComNo + "'," + HDeptID + "," + HSupID + ",'" + HSupNumber + "'" + "," + HPrintQty + ",'" + HMouldStatus + "'," + HWHID + "," + HRoutingID + "," + HBOMID + ",'" + HVersion + "'," + HSPGroupID + "," + HSPID + ",'" + HDesignLife + "'" + - ",'" + HUseLife + "','" + HLeaveLife + "','" + HProdQty + "','" + HProdWeight + "','" + HMouldOWNER + "'," + "','" + HSaveLife + "'," + + ",'" + HUseLife + "','" + HLeaveLife + "','" + HProdQty + "','" + HProdWeight + "','" + HMouldOWNER + "','" + HSaveLife + "','" + HMouldDotCheckRuleInterID+"','"+ HMouldMaintainRuleInterID+"'"+ ") "); @@ -724,7 +728,8 @@ long HPrintQty = mainList[0].HPrintQty; string HMouldOWNER = mainList[0].HMouldOWNER; string HSaveLife = mainList[0].HSaveLife; - + int HMouldDotCheckRuleInterID = mainList[0].HMouldDotCheckRuleInterID; + int HMouldMaintainRuleInterID = mainList[0].HMouldMaintainRuleInterID; //鑻AINDI閲嶅鍒欓噸鏂拌幏鍙� @@ -770,6 +775,8 @@ ",HUseLife=" + HUseLife.ToString() + ",HLeaveLife=" + HLeaveLife.ToString() + ",HProdQty=" + HProdQty.ToString() + + ",HMouldDotCheckRuleInterID="+ HMouldDotCheckRuleInterID.ToString()+ + ",HMouldMaintainRuleInterID=" + HMouldMaintainRuleInterID.ToString() + ",HMouldOWNER='" + HMouldOWNER + "'" + ",HProdWeight=" + HProdWeight.ToString() + " where HInterID=" + HInterID.ToString()); diff --git a/WebAPI/Controllers/CGGL/Cg_POInStockBackBillController.cs b/WebAPI/Controllers/CGGL/Cg_POInStockBackBillController.cs index 8973803..bc8a779 100644 --- a/WebAPI/Controllers/CGGL/Cg_POInStockBackBillController.cs +++ b/WebAPI/Controllers/CGGL/Cg_POInStockBackBillController.cs @@ -19,7 +19,45 @@ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); DataSet ds; + /// <summary> + /// 鏍规嵁鍩虹璧勬枡ID 鏌ユ壘璁板綍 + ///鍙傛暟锛歴tring sql銆� + ///杩斿洖鍊硷細object銆� + /// </summary> + [Route("Cg_POInStockBackBill/cx")] + [HttpGet] + public object cx(long HInterID) + { + try + { + ds = oCN.RunProcReturn("select * from h_v_IF_POInStockBackBillList where HitemID=" + HInterID, "h_v_IF_POInStockBackBillList"); + if (ds == null || ds.Tables[0].Rows.Count == 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "false锛�"; + objJsonResult.data = null; + return objJsonResult; + } + else + { + 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; + } + } /// <summary> /// 杩斿洖閫�鏂欓�氱煡鍗曞垪琛� ///鍙傛暟锛歴tring sql銆� diff --git a/WebAPI/Controllers/CGGL/Cg_POInStockBillController.cs b/WebAPI/Controllers/CGGL/Cg_POInStockBillController.cs index e48d969..ea8839f 100644 --- a/WebAPI/Controllers/CGGL/Cg_POInStockBillController.cs +++ b/WebAPI/Controllers/CGGL/Cg_POInStockBillController.cs @@ -19,6 +19,45 @@ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); DataSet ds; + /// <summary> + /// 鏍规嵁鍩虹璧勬枡ID 鏌ユ壘璁板綍 + ///鍙傛暟锛歴tring sql銆� + ///杩斿洖鍊硷細object銆� + /// </summary> + [Route("Cg_POInStockBill/cx")] + [HttpGet] + public object cx(long HInterID) + { + try + { + + ds = oCN.RunProcReturn("select * from h_v_IF_POInStockBillList where HitemID=" + HInterID, "h_v_IF_POInStockBillList"); + if (ds == null || ds.Tables[0].Rows.Count == 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "false锛�"; + objJsonResult.data = null; + return objJsonResult; + } + else + { + 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; + } + } /// <summary> /// 杩斿洖鏀舵枡閫氱煡鍗曞垪琛� @@ -67,7 +106,164 @@ return objJsonResult; } } + /// <summary> + /// 淇濆瓨鎸夐挳 + ///鍙傛暟锛歴tring sql銆� + ///杩斿洖鍊硷細object銆� + /// </summary> + [Route("Cg_POInStockBill/ModifyByID")] + [HttpPost] + public object ModifyByID([FromBody] JObject oMain) + { + try + { + DAL.ClsGy_Warehouse_Ctl oDept = new DAL.ClsGy_Warehouse_Ctl(); + DAL.ClsGy_Warehouse_View oDeptHlp = new DAL.ClsGy_Warehouse_View(); + var _value = oMain["oMain"].ToString(); + string msg1 = _value.ToString(); + string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); + string msg2 = sArray[0].ToString(); + //string msg3 = sArray[1].ToString(); + //string msg4 = sArray[2].ToString(); + //string msg5 = sArray[3].ToString(); + //鍙嶅簭鍒楀寲 + msg2 = "[" + msg2.ToString() + "]"; + List<Warehouse> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Warehouse>>(msg2); + + long HItemID = list[0].HItemID; + string HNumber = list[0].HNumber; + string HName = list[0].HName; + string HHelpCode = list[0].HHelpCode; + string HShortNumber = list[0].HShortNumber; + long HParentID = list[0].HParentID; + long HLevel = list[0].HLevel; + bool HEndFlag = list[0].HEndFlag; + bool HStopflag = list[0].HStopflag; + string HRemark = list[0].HRemark; + string HBarCode = list[0].HBarCode; + long HEmpID = list[0].HEmpID; + string HAddress = list[0].HAddress; + string HPhone = list[0].HPhone; + long HUSEORGID = list[0].HUSEORGID; + string HUpDater = list[0].HUpDater; + + ////鍒ゆ柇鏉冮檺 + //if (!ClsPub.Security_Log(msg5, 1, true, msg4)) + //{ + // objJsonResult.code = "0"; + // objJsonResult.count = 0; + // objJsonResult.Message = "娌℃湁鎵惧埌璇ュ姛鑳芥ā鍧楋紒"; + // objJsonResult.data = null; + // return objJsonResult; + //} + + //if (!DBUtility.ClsPub.AllowNumber(HNumber)) + //{ + // objJsonResult.code = "0"; + // objJsonResult.count = 0; + // objJsonResult.Message = "浠g爜涓笉鑳藉嚭鐜拌繛缁��.鈥欏苟涓旈浣嶆湯浣嶄笉鑳戒负鈥�.鈥欙紒"; + // objJsonResult.data = null; + // return objJsonResult; + //} + + //if (oDept.HavSameNumber(HItemID, HNumber)) + //{ + // objJsonResult.code = "0"; + // objJsonResult.count = 0; + // objJsonResult.Message = "浠g爜閲嶅锛�"; + // objJsonResult.data = null; + // return objJsonResult; + //} + //淇濆瓨 + //淇濆瓨瀹屾瘯鍚庡鐞� + if (HItemID == 0) + { + oCN.BeginTran(); + oCN.RunProc("Insert into Gy_Warehouse " + + " (HNumber,HName,HHelpCode,HShortNumber,HParentID" + + ",HLevel,HEndFlag,HStopflag,HRemark,HEmpID,HAddress,HPhone,HUSEORGID) " + + " Values('" + HNumber + "','" + HName + "','" + HHelpCode + "','" + HShortNumber + "'," + HParentID.ToString() + + "," + HLevel.ToString() + "," + Convert.ToString(HEndFlag ? 1 : 0) + "," + Convert.ToString(HStopflag ? 1 : 0) + ",'" + HRemark + "'," + HEmpID.ToString() + ",'" + HAddress + "','" + HPhone + "','" + HUSEORGID + "')", ref DBUtility.ClsPub.sExeReturnInfo); + //淇敼涓婄骇涓洪潪鏈骇浠g爜 + oCN.RunProc("Update Gy_Warehouse set HEndflag=0 where HItemID=" + HParentID, ref DBUtility.ClsPub.sExeReturnInfo); + oCN.Commit(); + } + else + { + //鑻AINDI閲嶅鍒欓噸鏂拌幏鍙� + oCN.BeginTran(); + //涓昏〃 + oCN.RunProc("Update Gy_Warehouse set " + + " HNumber='" + HNumber + "'" + + ",HName='" + HName + "'" + + ",HShortNumber='" + HShortNumber + "'" + + ",HHelpCode='" + HHelpCode + "'" + + ",HLevel=" + HLevel.ToString() + + ",HParentID=" + HParentID.ToString() + + ",HEndflag=" + Convert.ToString(HEndFlag ? 1 : 0) + + ",HStopflag=" + Convert.ToString(HStopflag ? 1 : 0) + + ",HEmpID=" + HEmpID.ToString() + + ",HAddress='" + HAddress + "'" + + ",HPhone='" + HPhone + "'" + + ",HUSEORGID='" + HUSEORGID + "'" + + ",HUpdater='" + HUpDater + "'" + + ",HUpdateDate= getdate()" + + ",HRemark= '" + HRemark + "' Where HItemID=" + HItemID, ref DBUtility.ClsPub.sExeReturnInfo); + //淇敼瀛愰」鐩唬鐮� + //oCN.RunProc("exec h_p_Gy_UpdateNumber Gy_Warehouse,'" + HNumber + ".','" + this.HOldNumber + ".'", ref DBUtility.ClsPub.sExeReturnInfo); + //灏嗕笂绾� 涓洪潪鏈骇 + oCN.RunProc("Update Gy_Warehouse set HEndflag=0 where HItemID=" + HParentID, ref DBUtility.ClsPub.sExeReturnInfo); + // + oCN.Commit(); + } + objJsonResult.code = "0"; + objJsonResult.count = 1; + objJsonResult.Message = "淇濆瓨鎴愬姛锛�"; + //WebAPIController.Add_Log("閫佽揣鍗曚笅鎺�", UserName, "鐢熸垚閫佽揣鍗�"); + objJsonResult.data = 1; + return objJsonResult; + } + catch (Exception e) + { + oCN.RollBack(); + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "Exception锛�" + e.Message; + objJsonResult.data = null; + return objJsonResult; + } + } + /// <summary> + ///鍒犻櫎鍔熻兘 + /// </summary> + /// <returns></returns> + [Route("Cg_POInStockBill/DeltetPOInStockBill")] + [HttpGet] + public object DeltetPOInStockBill(string HInterID) + { + try + { + oCN.BeginTran(); + oCN.RunProc("Delete From Cg_POInStockBillMain where HInterID = " + HInterID); + oCN.RunProc("Delete From Cg_POInStockBillSub 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; + } + } // diff --git a/WebAPI/Controllers/CGGL/Kf_POStockInBillController.cs b/WebAPI/Controllers/CGGL/Kf_POStockInBillController.cs new file mode 100644 index 0000000..1e37d71 --- /dev/null +++ b/WebAPI/Controllers/CGGL/Kf_POStockInBillController.cs @@ -0,0 +1,112 @@ +锘縰sing Newtonsoft.Json.Linq; +using Pub_Class; +using System; +using System.Collections; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Web.Http; +using WebAPI.Models; + +namespace WebAPI.Controllers +{ + //閲囪喘鍏ュ簱鍗旵ontroller + public class Kf_POStockInBillController : ApiController + { + public DBUtility.ClsPub.Enum_BillStatus BillStatus; + + private json objJsonResult = new json(); + SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); + DataSet ds; + + /// <summary> + /// 鏍规嵁鍩虹璧勬枡ID 鏌ユ壘璁板綍 + ///鍙傛暟锛歴tring sql銆� + ///杩斿洖鍊硷細object銆� + /// </summary> + [Route("Kf_POStockInBill/cx")] + [HttpGet] + public object cx(long HInterID) + { + try + { + + ds = oCN.RunProcReturn("select * from h_v_Kf_POStockInBillList where HitemID=" + HInterID, "h_v_Kf_POStockInBillList"); + if (ds == null || ds.Tables[0].Rows.Count == 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "false锛�"; + objJsonResult.data = null; + return objJsonResult; + } + else + { + 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; + } + } + + /// <summary> + /// 杩斿洖鏀舵枡閫氱煡鍗曞垪琛� + ///鍙傛暟锛歴tring sql銆� + ///杩斿洖鍊硷細object銆� + /// </summary> + [Route("Kf_POStockInBill/list")] + [HttpGet] + public object list(string sWhere) + { + try + { + if (sWhere == null || sWhere.Equals("")) + { + ds = oCN.RunProcReturn("select * from h_v_Kf_POStockInBillList " + sWhere, "h_v_Kf_POStockInBillList"); + } + else + { + string sql1 = "select * from h_v_Kf_POStockInBillList where 1 = 1 "; + string sql = sql1 + sWhere; + ds = oCN.RunProcReturn(sql, "h_v_Kf_POStockInBillList"); + } + 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 = "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; + } + } + + // + } +} \ No newline at end of file diff --git a/WebAPI/Controllers/Sc_MouldRepairInBillListController - .cs b/WebAPI/Controllers/Sc_MouldRepairInBillListController - .cs index 302faa8..ebf6599 100644 --- a/WebAPI/Controllers/Sc_MouldRepairInBillListController - .cs +++ b/WebAPI/Controllers/Sc_MouldRepairInBillListController - .cs @@ -988,44 +988,44 @@ #endregion - /// <summary> - /// 閲囪喘鍏ュ簱鍗曞垪琛� - /// </summary> - /// <returns></returns> - [Route("Kf_POStockInBill/GetPOStockInBill")] - [HttpGet] - public object GetPOStockInBill(string sWhere) - { - try - { + ///// <summary> + ///// 閲囪喘鍏ュ簱鍗曞垪琛� + ///// </summary> + ///// <returns></returns> + //[Route("Kf_POStockInBill/GetPOStockInBill")] + //[HttpGet] + //public object GetPOStockInBill(string sWhere) + //{ + // try + // { - ds = Sc_GetPOStockInBill(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; - } - } + // ds = Sc_GetPOStockInBill(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璇彞 diff --git a/WebAPI/Controllers/WebAPIController.cs b/WebAPI/Controllers/WebAPIController.cs index 37c0a4a..03fbe4b 100644 --- a/WebAPI/Controllers/WebAPIController.cs +++ b/WebAPI/Controllers/WebAPIController.cs @@ -2086,6 +2086,108 @@ } /// <summary> + /// 鏍规嵁鍣ㄥ叿涓诲唴鐮佽幏鍙栧櫒鍏蜂繚鍏绘楠岄」鐩� + /// </summary> + /// <returns></returns> + [Route("Web/GetMaintainItemtemByMouldProjectID")] + [HttpGet] + public object GetMaintainItemtemByMouldProjectID(int MouldProjectID) + { + if (MouldProjectID <= 0) + { + objjson.code = "0"; + objjson.count = 0; + objjson.Message = "浜у搧鍣ㄥ叿鏈�夋嫨"; + objjson.data = null; + return objjson; + } + try + { + SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); + string sql = string.Format(@"select t.HMaintainItemID HMaintainItemID,m.HNumber HMaintainItemNumber,t.HMaintainItem HMaintainItem,t.HMaintainPart HMaintainPart,t.HClaim HClaim,t.HManagerID HManagerID,e.HNumber HManagerNumber,e.HName HManagerName,a.HRemark + from Sc_MouldMaintainRuleBillMain a left join Sc_MouldMaintainRuleBillSub_Item t on a.HInterID=t.HInterID + left join Gy_Maintain m on m.HItemID=t.HMaintainItemID + left join Gy_Employee e on e.HItemID=t.HManagerID + where a.HInterID=(select HMouldMaintainRuleInterID from Gy_MouldFileMain where HInterID=" + MouldProjectID + ") "); + ds = oCN.RunProcReturn(sql, "Sc_MouldMaintainRuleBillMain"); + if (ds == null || ds.Tables[0].Rows.Count <= 0) + { + objjson.code = "0"; + objjson.count = 0; + objjson.Message = "鑾峰彇澶辫触" + DBUtility.ClsPub.sErrInfo; + objjson.data = null; + return objjson; + } + else + { + objjson.code = "1"; + objjson.count = 1; + objjson.Message = "鑾峰彇鎴愬姛!"; + objjson.data = ds.Tables[0]; + return objjson; + } + } + catch (Exception ex) + { + objjson.code = "0"; + objjson.count = 0; + objjson.Message = "鑾峰彇澶辫触" + ex.ToString(); + objjson.data = null; + return objjson; + } + } + + + /// <summary> + /// 鍣ㄥ叿鐐规瑙勭▼鍗曞垪琛� + /// </summary> + /// <returns></returns> + [Route("Sc_MouldDotCheckRuleInter/GetMouldDotCheckRuleInterList")] + [HttpGet] + public object GetMouldDotCheckRuleInterList(int MouldProjectID) + { + if (MouldProjectID <= 0) + { + objjson.code = "0"; + objjson.count = 0; + objjson.Message = "浜у搧鍣ㄥ叿鏈�夋嫨"; + objjson.data = null; + return objjson; + } + try + { + SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); + string sql = string.Format(@"select * from h_v_Sc_MouldDotCheckRuleBillList"); + ds = oCN.RunProcReturn(sql, "h_v_Sc_MouldDotCheckRuleBillList"); + if (ds == null || ds.Tables[0].Rows.Count <= 0) + { + objjson.code = "0"; + objjson.count = 0; + objjson.Message = "鑾峰彇澶辫触" + DBUtility.ClsPub.sErrInfo; + objjson.data = null; + return objjson; + } + else + { + objjson.code = "1"; + objjson.count = 1; + objjson.Message = "鑾峰彇鎴愬姛!"; + objjson.data = ds.Tables[0]; + return objjson; + } + } + catch (Exception ex) + { + objjson.code = "0"; + objjson.count = 0; + objjson.Message = "鑾峰彇澶辫触" + ex.ToString(); + objjson.data = null; + return objjson; + } + } + + + /// <summary> /// 鑾峰彇缁翠慨椤圭洰鍒楄〃 /// </summary> /// <returns></returns> diff --git a/WebAPI/Controllers/XSGL/Xs_SeOrderBillController.cs b/WebAPI/Controllers/XSGL/Xs_SeOrderBillController.cs index fda1b9d..266338f 100644 --- a/WebAPI/Controllers/XSGL/Xs_SeOrderBillController.cs +++ b/WebAPI/Controllers/XSGL/Xs_SeOrderBillController.cs @@ -19,7 +19,45 @@ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); DataSet ds; + /// <summary> + /// 鏍规嵁鍩虹璧勬枡ID 鏌ユ壘璁板綍 + ///鍙傛暟锛歴tring sql銆� + ///杩斿洖鍊硷細object銆� + /// </summary> + [Route("Xs_SeOrderBill/cx")] + [HttpGet] + public object cx(long HInterID) + { + try + { + ds = oCN.RunProcReturn("select * from h_v_IF_SeOrderBillList where HitemID=" + HInterID, "h_v_IF_SeOrderBillList"); + if (ds == null || ds.Tables[0].Rows.Count == 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "false锛�"; + objJsonResult.data = null; + return objJsonResult; + } + else + { + 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; + } + } /// <summary> /// 杩斿洖閿�鍞鍗曞垪琛� ///鍙傛暟锛歴tring sql銆� @@ -68,6 +106,36 @@ } } + /// <summary> + ///鍒犻櫎鍔熻兘 + /// </summary> + /// <returns></returns> + [Route("Xs_SeOrderBill/DeltetSeOrderBill")] + [HttpGet] + public object DeltetSeOrderBill(string HInterID) + { + try + { + oCN.BeginTran(); + oCN.RunProc("Delete From Xs_SeOrderBillMain where HInterID = " + HInterID); + oCN.RunProc("Delete From Xs_SeOrderBillSub 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; + } + } // diff --git a/WebAPI/Models/Gy_Mould.cs b/WebAPI/Models/Gy_Mould.cs index 357dc0e..33e5ad1 100644 --- a/WebAPI/Models/Gy_Mould.cs +++ b/WebAPI/Models/Gy_Mould.cs @@ -58,6 +58,8 @@ public string HSaveLife { get; set; } public long HPrintQty { get; set; } public string HMouldOWNER { get; set; } + public int HMouldMaintainRuleInterID { get; set; } + public int HMouldDotCheckRuleInterID { get; set; } } } \ No newline at end of file diff --git a/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user b/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user index 5c2cc2a..1e8a616 100644 --- a/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user +++ b/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user @@ -18,25 +18,25 @@ <publishTime>02/22/2013 08:43:40</publishTime> </File> <File Include="bin/BLL.dll"> - <publishTime>11/12/2021 16:30:36</publishTime> + <publishTime>11/16/2021 18:46:35</publishTime> </File> <File Include="bin/BLL.pdb"> - <publishTime>11/12/2021 16:30:36</publishTime> + <publishTime>11/16/2021 18:46:35</publishTime> </File> <File Include="bin/DAL.dll"> - <publishTime>11/12/2021 16:30:34</publishTime> + <publishTime>11/16/2021 18:46:33</publishTime> </File> <File Include="bin/DAL.pdb"> - <publishTime>11/12/2021 16:30:34</publishTime> + <publishTime>11/16/2021 18:46:33</publishTime> </File> <File Include="bin/Dapper.dll"> <publishTime>07/22/2016 14:52:40</publishTime> </File> <File Include="bin/DBUtility.dll"> - <publishTime>11/12/2021 16:30:31</publishTime> + <publishTime>11/16/2021 18:46:29</publishTime> </File> <File Include="bin/DBUtility.pdb"> - <publishTime>11/12/2021 16:30:31</publishTime> + <publishTime>11/16/2021 18:46:29</publishTime> </File> <File Include="bin/Interop.gregn6Lib.dll"> <publishTime>08/25/2021 10:28:25</publishTime> @@ -60,10 +60,10 @@ <publishTime>07/25/2012 11:48:56</publishTime> </File> <File Include="bin/Model.dll"> - <publishTime>11/12/2021 16:30:31</publishTime> + <publishTime>11/16/2021 18:46:30</publishTime> </File> <File Include="bin/Model.pdb"> - <publishTime>11/12/2021 16:30:31</publishTime> + <publishTime>11/16/2021 18:46:30</publishTime> </File> <File Include="bin/Models/ClsSc_MouldScrapOutBillMain.cs"> <publishTime>08/16/2021 17:23:15</publishTime> @@ -72,22 +72,22 @@ <publishTime>08/03/2014 20:33:56</publishTime> </File> <File Include="bin/Pub_Class.dll"> - <publishTime>11/12/2021 16:30:29</publishTime> + <publishTime>11/16/2021 18:46:28</publishTime> </File> <File Include="bin/Pub_Class.pdb"> - <publishTime>11/12/2021 16:30:29</publishTime> + <publishTime>11/16/2021 18:46:28</publishTime> </File> <File Include="bin/Pub_Control.dll"> - <publishTime>11/12/2021 16:30:30</publishTime> + <publishTime>11/16/2021 18:46:28</publishTime> </File> <File Include="bin/Pub_Control.pdb"> - <publishTime>11/12/2021 16:30:30</publishTime> + <publishTime>11/16/2021 18:46:28</publishTime> </File> <File Include="bin/SQLHelper.dll"> - <publishTime>11/12/2021 16:30:30</publishTime> + <publishTime>11/16/2021 18:46:29</publishTime> </File> <File Include="bin/SQLHelper.pdb"> - <publishTime>11/12/2021 16:30:30</publishTime> + <publishTime>11/16/2021 18:46:29</publishTime> </File> <File Include="bin/stdole.dll"> <publishTime>05/09/2021 13:35:37</publishTime> @@ -189,10 +189,10 @@ <publishTime>11/24/2014 11:18:48</publishTime> </File> <File Include="bin/WebAPI.dll"> - <publishTime>11/12/2021 16:30:40</publishTime> + <publishTime>11/16/2021 18:46:38</publishTime> </File> <File Include="bin/WebAPI.pdb"> - <publishTime>11/12/2021 16:30:40</publishTime> + <publishTime>11/16/2021 18:46:38</publishTime> </File> <File Include="bin/WebGrease.dll"> <publishTime>07/17/2013 17:03:52</publishTime> @@ -363,7 +363,7 @@ <publishTime>08/06/2021 22:57:28</publishTime> </File> <File Include="Web.config"> - <publishTime>11/12/2021 16:32:44</publishTime> + <publishTime>11/16/2021 18:46:49</publishTime> </File> </ItemGroup> </Project> \ No newline at end of file diff --git a/WebAPI/WebAPI.csproj b/WebAPI/WebAPI.csproj index e2e1938..a84bcd1 100644 --- a/WebAPI/WebAPI.csproj +++ b/WebAPI/WebAPI.csproj @@ -319,6 +319,7 @@ <Compile Include="Controllers\BLL\Xt_UserController.cs" /> <Compile Include="Controllers\BLL\Xt_SystemLogController.cs" /> <Compile Include="Controllers\CellWidthController.cs" /> + <Compile Include="Controllers\CGGL\Kf_POStockInBillController.cs" /> <Compile Include="Controllers\CGGL\Cg_POOrderBillController.cs" /> <Compile Include="Controllers\CGGL\WW_EntrustOrderBillController.cs" /> <Compile Include="Controllers\CGGL\Cg_POInStockBillController.cs" /> -- Gitblit v1.9.1