WebAPI/Controllers/BaseSet/Gy_CustomerController.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
WebAPI/Controllers/BaseSet/Gy_MaterialController.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
WebAPI/Controllers/BaseSet/Gy_SupplierController.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
WebAPI/Controllers/BaseSet/Gy_UnitController.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
WebAPI/Controllers/BaseSet/Xt_ORGANIZATIONSController.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
WebAPI/Controllers/BaseSet/Gy_CustomerController.cs
@@ -25,7 +25,7 @@ /// </summary> [Route("Gy_Customer/list")] [HttpGet] public object list(string sWhere,string Organization) public object list(string sWhere, string Organization) { try { @@ -39,22 +39,11 @@ string sql = sql1 + sWhere + " order by HItemID desc"; ds = oCN.RunProcReturn(sql, "h_v_Gy_CustomerList"); } 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; } objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "Sucess!"; objJsonResult.data = ds.Tables[0]; return objJsonResult; } catch (Exception e) { WebAPI/Controllers/BaseSet/Gy_MaterialController.cs
@@ -27,7 +27,7 @@ /// </summary> [Route("Gy_Material/list")] [HttpGet] public object list(string sWhere,string Organization) public object list(string sWhere, string Organization) { try { @@ -41,22 +41,12 @@ string sql = sql1 + sWhere + "order by HItemID desc"; ds = oCN.RunProcReturn(sql, "h_v_Gy_MaterialList"); } 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; } objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "Sucess!"; objJsonResult.data = ds.Tables[0]; return objJsonResult; } catch (Exception e) { @@ -231,7 +221,7 @@ objJsonResult.data = 1; return objJsonResult; } oItem.HShortNumber = sShortNumber;//短代码 oItem.HEndFlag = true;//末级标志 oItem.HLevel = DBUtility.ClsPub.GetLevel(oItem.HNumber.Trim()); //等级 @@ -359,7 +349,7 @@ /// </summary> [Route("Gy_Mould/list1")] [HttpGet] public object list1(string sWhere,string ModRightNameSelect, string user) public object list1(string sWhere, string ModRightNameSelect, string user) { try { @@ -373,7 +363,7 @@ } if (sWhere == null || sWhere.Equals("")) { ds = oCN.RunProcReturn("select * from h_v_Gy_MouldFileList " + sWhere+ "order by 日期 desc", "h_v_Gy_MouldFileList"); ds = oCN.RunProcReturn("select * from h_v_Gy_MouldFileList " + sWhere + "order by 日期 desc", "h_v_Gy_MouldFileList"); } else { @@ -425,7 +415,7 @@ { if (sWhere == null || sWhere.Equals("")) { ds = oCN.RunProcReturn("select * from h_v_Gy_CheckToolsFileMainList " + sWhere+ "order by 日期 desc", "h_v_Gy_CheckToolsFileMainList"); ds = oCN.RunProcReturn("select * from h_v_Gy_CheckToolsFileMainList " + sWhere + "order by 日期 desc", "h_v_Gy_CheckToolsFileMainList"); } else { @@ -473,7 +463,7 @@ { if (sWhere == null || sWhere.Equals("")) { ds = oCN.RunProcReturn("select * from h_v_IF_BarCodeBillList " + sWhere+ "order by 日期 desc", "h_v_IF_BarCodeBillList"); ds = oCN.RunProcReturn("select * from h_v_IF_BarCodeBillList " + sWhere + "order by 日期 desc", "h_v_IF_BarCodeBillList"); } else { @@ -617,9 +607,9 @@ "," + HYear + "," + HPeriod + ",'" + HRemark + "','" + HMaker + "',getdate()" + ",'" + HMouldNo + "','" + HName + "','" + HModel + "','" + HModel2 + "','" + HDiameter + "'" + ",'" + HSubjoin + "','" + HSubjoin2 + "','" + HPICNo + "','" + HWorkMaterModel + "'" + "," + HMaterID + ",'" + HMaterNumber + "'," + HMouleTypeID + "," + HUnitID + "," + HMaterID + ",'" + HMaterNumber + "'," + HMouleTypeID + "," + HUnitID + ",'" + HOutComDate + "','" + HOutComNo + "'," + HDeptID + "," + HSupID + ",'" + HSupNumber + "'" + "," + HPrintQty + ",'" + HMouldStatus + "'," + HWHID + "," + HRoutingID + "," + HPrintQty + ",'" + HMouldStatus + "'," + HWHID + "," + HRoutingID + "," + HBOMID + ",'" + HVersion + "'," + HSPGroupID + "," + HSPID + ",'" + HDesignLife + "'" + ",'" + HUseLife + "','" + HLeaveLife + "','" + HProdQty + "','" + HProdWeight + "'" + ") "); @@ -633,7 +623,7 @@ " values('" + HInterID + "',0,''" + ",0,0,'','',0,0 " + ") "); if (objJsonResult.code == "0") { objJsonResult.code = "0"; @@ -692,7 +682,7 @@ //反序列化 msg2 = "[" + msg2.ToString() + "]"; List<Gy_Mould> mainList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Gy_Mould>>(msg2); long HInterID = mainList[0].HInterID;//递入type得到的单据ID string HBillNo = mainList[0].HBillNo;//递入type得到的单据号 DateTime HDate = mainList[0].HDate;//日期 @@ -733,7 +723,7 @@ long HPrintQty = mainList[0].HPrintQty; //若MAINDI重复则重新获取 @@ -780,7 +770,7 @@ ",HProdQty=" + HProdQty.ToString() + ",HProdWeight=" + HProdWeight.ToString() + " where HInterID=" + HInterID.ToString()); //修改子项目代码 //oCN.RunProc("exec h_p_Gy_UpdateNumber Gy_Department,'" + HNumber + ".','" + this.HOldNumber + ".'", ref DBUtility.ClsPub.sExeReturnInfo); //将上级 为非末级 @@ -856,24 +846,24 @@ return objJsonResult; } if (oBill.DeleteBill(hmainid, ref DBUtility.ClsPub.sExeReturnInfo)) { //写入日志 ClsPub.Add_Log("", "删除项目,代码:" + oBill.omodel.HMouldNo + ",名称:" + oBill.omodel.HName, ClsPub.CurUserName); //更新上级为 末级 objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "删除成功"; objJsonResult.data = null; return objJsonResult; } else { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "删除失败"; objJsonResult.data = null; return objJsonResult; } { //写入日志 ClsPub.Add_Log("", "删除项目,代码:" + oBill.omodel.HMouldNo + ",名称:" + oBill.omodel.HName, ClsPub.CurUserName); //更新上级为 末级 objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "删除成功"; objJsonResult.data = null; return objJsonResult; } else { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "删除失败"; objJsonResult.data = null; return objJsonResult; } //ds = oCN.RunProcReturn("delete from Gy_Department where HItemID = " + HItemID, "Gy_Department"); } WebAPI/Controllers/BaseSet/Gy_SupplierController.cs
@@ -39,22 +39,13 @@ string sql = sql1 + sWhere + " order by HItemID desc"; ds = oCN.RunProcReturn(sql, "h_v_Gy_SupplierList"); } 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) { WebAPI/Controllers/BaseSet/Gy_UnitController.cs
@@ -41,22 +41,12 @@ string sql = sql1 + sWhere + "order by HItemID desc"; ds = oCN.RunProcReturn(sql, "h_v_Gy_UnitList"); } 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) { WebAPI/Controllers/BaseSet/Xt_ORGANIZATIONSController.cs
@@ -25,7 +25,7 @@ /// </summary> [Route("Xt_ORGANIZATIONS/list")] [HttpGet] public object list(string sWhere,string Organization) public object list(string sWhere, string Organization) { try { @@ -39,22 +39,11 @@ string sql = sql1 + sWhere + "order by HItemID desc"; ds = oCN.RunProcReturn(sql, "h_v_IF_ORGANIZATIONSList"); } 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; } objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "Sucess!"; objJsonResult.data = ds.Tables[0]; return objJsonResult; } catch (Exception e) { @@ -85,12 +74,12 @@ long HItemID = list[0].HItemID; string HNumber = list[0].HNumber; string HName = list[0].HName; long HParentID = list[0].HParentID; string HRemark = list[0].HRemark; bool HStopflag = list[0].HStopflag; if (!DBUtility.ClsPub.AllowNumber(HNumber)) { objJsonResult.code = "0"; @@ -203,7 +192,7 @@ ",HStopflag,HMakeTime" + ",HRemark) " + " Values('" + HNumber + "','" + HName + "'," + HParentID.ToString() + "," + HStopflag + "getdate()"+ "," + HStopflag + "getdate()" + ",'" + HRemark + "')", ref DBUtility.ClsPub.sExeReturnInfo); //修改上级为非末级代码 @@ -246,7 +235,7 @@ /// </summary> /// <returns></returns> [Route("DeltetXt_ORGANIZATIONSList")] [HttpGet] public object DeltetXt_ORGANIZATIONSList(string HItemID) {