1
wangbin
2024-07-08 4548e24916ac5f63eef736cabdcd634864f8de16
WebAPI/Controllers/MJGL/Sc_MouldDotCheckRuleBillController.cs
@@ -68,6 +68,56 @@
        }
        #endregion
        #region 器具点检规程单列表
        [Route("Sc_MouldDotCheckRuleBill/Sc_MouldDotCheckRuleListPDA")]
        [HttpGet]
        public object Sc_MouldDotCheckRuleListPDA(string sWhere, string user)
        {
            try
            {
                List<object> columnNameList = new List<object>();
                //反序列化传递的值
                //HlpBill com = JsonConvert.DeserializeObject<HlpBill>(sWhere.ToString());
                //编辑权限
                if (!DBUtility.ClsPub.Security_Log("Sc_MouldDotCheckRuleBillList", 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无查看权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                string sql = "select * from h_v_Sc_MouldDotCheckRuleListByMould where 1 = 1" + sWhere + " order by hmainid desc";
                ds = oCN.RunProcReturn(sql, "h_v_Sc_MouldDotCheckRuleListByMould");
                //添加列名
                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 = 1;
                objJsonResult.Message = "Sucess!";
                objJsonResult.data = ds.Tables[0];
                objJsonResult.list = columnNameList;
                return objJsonResult;
            }
            catch (Exception ex)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "没有返回任何记录!" + ex.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region 器具点检规程 保存/编辑
        /// <summary>
        /// 保存模具维修单