From 97eb1934697f8bd6d16ba1f5547752ab65330836 Mon Sep 17 00:00:00 2001 From: yusijie <ysj@hz-kingdee.com> Date: 星期五, 05 五月 2023 10:57:30 +0800 Subject: [PATCH] 条码删除权限,工艺路线 --- Pub_Class/CustomerCls/ClsXt_SystemParameter.cs | 5 ++ WebAPI/Controllers/BaseSet/Gy_MaterialController.cs | 48 ++++++++++++----------- WebAPI/Controllers/LMESController.cs | 64 ++++++++++++++++++++++++++++---- WebAPI/Controllers/基础资料/工资基础资料/Gy_ProcPriceController.cs | 2 4 files changed, 87 insertions(+), 32 deletions(-) diff --git a/Pub_Class/CustomerCls/ClsXt_SystemParameter.cs b/Pub_Class/CustomerCls/ClsXt_SystemParameter.cs index 1d02c35..6bbdc24 100644 --- a/Pub_Class/CustomerCls/ClsXt_SystemParameter.cs +++ b/Pub_Class/CustomerCls/ClsXt_SystemParameter.cs @@ -1648,6 +1648,11 @@ omodel.Sc_MESProceReportWorkBill_AutoCheck = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); } + //条码主档删除人必须是制单人('Y'为控制) + if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "BarCode_DeleterAndMakerMustSame") + { + omodel.BarCode_DeleterAndMakerMustSame = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); + } ////=========工序进站单 ////自动匹配流水号 //if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "MES_StationBill_ProcNo") diff --git a/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs b/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs index 3def53a..2a61065 100644 --- a/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs +++ b/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs @@ -608,17 +608,7 @@ string HInterID = HInter.Replace("\"", ""); string user = sArray[1].ToString(); string HBarCode = sArray[2].ToString().Replace("\"",""); - string HComputerName = SystemInformation.ComputerName; //璁惧鍚嶇О - - //缂栬緫鏉冮檺 - if (!DBUtility.ClsPub.Security_Log("Gy_BarCodeBillList_Edit", 1, false, user)) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "鏃犲垹闄ゆ潈闄愶紒"; - objJsonResult.data = null; - return objJsonResult; - } + string HComputerName = SystemInformation.ComputerName; //璁惧鍚嶇О try { @@ -626,6 +616,16 @@ string[] NewBarCode; NewBarCode = HBarCode.Split(Convert.ToChar(",")); + + //缂栬緫鏉冮檺 + if (!DBUtility.ClsPub.Security_Log("Gy_BarCodeBill_Del", 1, false, user)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏃犲垹闄ゆ潈闄愶紒"; + objJsonResult.data = null; + return objJsonResult; + } //鍒犻櫎鏉$爜鍓嶈繘琛屽垽鏂� Ds = oCN.RunProcReturn("exec h_p_Gy_BarCodeBill_MulDelete_Before '" + HInterID + "','" + HBarCode + "'", "h_p_Gy_BarCodeBill_MulDelete_Before", ref DBUtility.ClsPub.sExeReturnInfo); @@ -664,18 +664,20 @@ { oCN.BeginTran(); - ////鑾峰彇绯荤粺鍙傛暟 - //string Ret = ""; - //if (oSystemParameter.ShowBill(ref Ret)) - //{ - // //鍒ゆ柇鏄惁鍙兘鍒犻櫎鑷繁鐢熸垚鐨勬潯鐮� - // if (oSystemParameter.omodel.BarCode_DeleterAndMakerllustSame != "榫欏北姹介厤") //绯荤粺鍙傛暟 - // { - - // } - //} - - oCN.RunProc("Delete from Gy_BarCodeBill Where HItemID in (" + HInterID + ")"); + //鑾峰彇绯荤粺鍙傛暟 + string Ret = ""; + if (oSystemParameter.ShowBill(ref Ret)) + { + //鍒ゆ柇鏄惁鍙兘鍒犻櫎鑷繁鐢熸垚鐨勬潯鐮� + if (oSystemParameter.omodel.BarCode_DeleterAndMakerMustSame == "Y") //绯荤粺鍙傛暟 + { + oCN.RunProc("Delete from Gy_BarCodeBill Where HItemID in (" + HInterID + ")" + " and HMaker = '" + user + "'"); + } + else + { + oCN.RunProc("Delete from Gy_BarCodeBill Where HItemID in (" + HInterID + ")"); + } + } //鍐欏叆绯荤粺鏃ュ織 for (int i = 0; i <= NewBarCode.Length - 1; i++) diff --git a/WebAPI/Controllers/LMESController.cs b/WebAPI/Controllers/LMESController.cs index 470d0fc..db1c9f7 100644 --- a/WebAPI/Controllers/LMESController.cs +++ b/WebAPI/Controllers/LMESController.cs @@ -363,14 +363,14 @@ try { //鍒ゆ柇鏄惁鏈夋煡璇㈡潈闄� - //if (!DBUtility.ClsPub.Security_Log("Gy_RoutingBill_Query", 1, false, user)) - //{ - // objJsonResult.code = "0"; - // objJsonResult.count = 0; - // objJsonResult.Message = "鏃犳潈闄愭煡璇�!"; - // objJsonResult.data = null; - // return objJsonResult; - //} + if (!DBUtility.ClsPub.Security_Log("Gy_RoutingBill_Query", 1, false, user)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏃犳潈闄愭煡璇�!"; + objJsonResult.data = null; + return objJsonResult; + } SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); if (sWhere == null || sWhere.Equals("")) @@ -521,6 +521,54 @@ #endregion + #region 宸ヨ壓璺嚎(缁存姢宸ヤ环) + /// <summary> + /// 杩斿洖宸ヨ壓璺嚎鍒楄〃 + ///鍙傛暟锛歴tring sql銆� + ///杩斿洖鍊硷細object銆� + /// </summary> + [Route("LEMS/MES_Gy_RoutingBillMainRates_Json")] + [HttpGet] + public object MES_Gy_RoutingBillMainRates_Json(string sWhere, string user) + { + DataSet ds; + try + { + //鍒ゆ柇鏄惁鏈夋煡璇㈡潈闄� + if (!DBUtility.ClsPub.Security_Log("Gy_RoutingBill_Query", 1, false, user)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏃犳潈闄愭煡璇�!"; + objJsonResult.data = null; + return objJsonResult; + } + + SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); + if (sWhere == null || sWhere.Equals("")) + { + ds = oCN.RunProcReturn("select * from h_v_Gy_RoutingBillList_MainRate order by hmainid desc", "h_v_Gy_RoutingBillList_MainRate"); + } + else + { + string sql1 = "select * from h_v_Gy_RoutingBillList_MainRate where 1 = 1 "; + string sql = sql1 + sWhere + " order by hmainid desc,cast(宸ュ簭鍙� as int)"; + ds = oCN.RunProcReturn(sql, "h_v_Gy_RoutingBillList_MainRate"); + } + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + return GetObjectJson(ds); + } + + #endregion + #endregion /// <summary> diff --git "a/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\267\245\350\265\204\345\237\272\347\241\200\350\265\204\346\226\231/Gy_ProcPriceController.cs" "b/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\267\245\350\265\204\345\237\272\347\241\200\350\265\204\346\226\231/Gy_ProcPriceController.cs" index 70d50bf..f829083 100644 --- "a/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\267\245\350\265\204\345\237\272\347\241\200\350\265\204\346\226\231/Gy_ProcPriceController.cs" +++ "b/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\267\245\350\265\204\345\237\272\347\241\200\350\265\204\346\226\231/Gy_ProcPriceController.cs" @@ -120,7 +120,7 @@ oSub.HMaterID = DBUtility.ClsPub.isLong(subList[i].HMaterIDCol); oSub.HProcID = DBUtility.ClsPub.isLong(subList[i].HProcIDCol); oSub.HSourceID = DBUtility.ClsPub.isLong(subList[i].HSourceIDCol); - oSub.HPrice = DBUtility.ClsPub.isLong(subList[i].HPriceCol); + oSub.HPrice = DBUtility.ClsPub.isDoule(subList[i].HPriceCol); oSub.HBeginDate = DBUtility.ClsPub.isDate(subList[i].HBeginDateCol); oSub.HEndDate = DBUtility.ClsPub.isDate(subList[i].HEndDateCol); oSub.HCostFlag = DBUtility.ClsPub.GridToBool(subList[i].HCostFlagCol); -- Gitblit v1.9.1