zrg
2024-12-11 cf46a6e4beb7e83af331a28065c96077fa2f1e15
WebAPI/Controllers/SBGL/SB_EquipICMOTechParamBillController.cs
@@ -86,6 +86,112 @@
        }
        #endregion
        #region 设备工艺参数分页查询
        [Route("SB_EquipICMOTechParamBillController/GetSB_EquipICMOTechParamBillList_Page")]
        [HttpGet]
        public object GetSB_EquipICMOTechParamBillList_Page(string sWhere, string user, int page, int size)
        {
            try
            {
                List<object> columnNameList = new List<object>();
                //编辑权限
                if (!DBUtility.ClsPub.Security_Log_second(ModRightNameList, 3, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无查看权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                sWhere = sWhere.Replace("'", "''");
                if (sWhere == null || sWhere.Equals(""))
                {
                    ds = oCn.RunProcReturn("exec h_p_SB_EquipICMOTechParamBillListPage " + page + "," + size + ",''", "h_p_SB_EquipICMOTechParamBillListPage");
                }
                else
                {
                    ds = oCn.RunProcReturn("exec h_p_SB_EquipICMOTechParamBillListPage " + page + "," + size + ",'" + sWhere + "'", "h_p_SB_EquipICMOTechParamBillListPage");
                }
                //添加列名
                foreach (DataColumn col in ds.Tables[0].Columns)
                {
                    Type dataType = col.DataType;
                    string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
                    columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//获取到DataColumn列对象的列名
                }
                objJsonResult.code = "1";
                objJsonResult.count = int.Parse(ds.Tables[1].Rows[0]["count"].ToString());
                objJsonResult.Message = "Sucess!";
                objJsonResult.list = columnNameList;
                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;
            }
        }
        #endregion
        #region 设备工艺参数明细行分页查询
        [Route("Sb_EquipStopBill/getSb_EquipStopBillListPage")]
        [HttpGet]
        public object Sb_EquipBeginBillListPage(string sWhere, string user, int page, int size)
        {
            try
            {
                List<object> columnNameList = new List<object>();
                //编辑权限
                if (!DBUtility.ClsPub.Security_Log_second("ModRightNameList", 3, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无查看权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                sWhere = sWhere.Replace("'", "''");
                if (sWhere == null || sWhere.Equals(""))
                {
                    ds = oCn.RunProcReturn("exec h_p_Sb_EquipStopBillMainListPage " + page + "," + size + ",''", "h_p_Sb_EquipStopBillMainListPage");
                }
                else
                {
                    ds = oCn.RunProcReturn("exec h_p_Sb_EquipStopBillMainListPage " + page + "," + size + ",'" + sWhere + "'", "h_p_Sb_EquipStopBillMainListPage");
                }
                //添加列名
                foreach (DataColumn col in ds.Tables[0].Columns)
                {
                    Type dataType = col.DataType;
                    string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
                    columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//获取到DataColumn列对象的列名
                }
                objJsonResult.code = "1";
                objJsonResult.count = int.Parse(ds.Tables[1].Rows[0]["count"].ToString());
                objJsonResult.Message = "Sucess!";
                objJsonResult.list = columnNameList;
                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;
            }
        }
        #endregion
        #region 设备工艺参数订单点检表删除
        /// <summary>
        /// 删除设备工艺参数订单点检表
@@ -667,7 +773,7 @@
                {
                    BillStatus = DBUtility.ClsPub.Enum_BillStatus.BillStatus_AddNew;
                    //判断新增权限
                    if (!DBUtility.ClsPub.Security_Log(ModRightName, 1, false, HMaker))
                    if (!DBUtility.ClsPub.Security_Log(ModRightNameEdit, 1, false, HMaker))
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;