yusijie
2023-05-05 97eb1934697f8bd6d16ba1f5547752ab65330836
条码删除权限,工艺路线
4个文件已修改
119 ■■■■ 已修改文件
Pub_Class/CustomerCls/ClsXt_SystemParameter.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/BaseSet/Gy_MaterialController.cs 48 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/LMESController.cs 64 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/基础资料/工资基础资料/Gy_ProcPriceController.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
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")
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++)
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>
        /// è¿”回工艺路线列表
        ///参数:string 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>
WebAPI/Controllers/»ù´¡×ÊÁÏ/¹¤×Ê»ù´¡×ÊÁÏ/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);