chenhaozhe
2025-05-06 92a93a399f8c8481a9cc2f2e46b89ee0b45a98ec
WebAPI/Controllers/WebAPIController.cs
@@ -17920,6 +17920,16 @@
            ListModels oListModels = new ListModels();
            try
            {
                //保存权限
                if (!DBUtility.ClsPub.Security_Log("EqiupMaterWorkTimes_Edit", 1, false, msg2))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无保存权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                WebAPI.DLL.ClsEqiupMaterWorkTimes_Ctl oBill = new WebAPI.DLL.ClsEqiupMaterWorkTimes_Ctl();
                List<Model.ClsEqiupMaterWorkTimes_Model> lsmain = new List<Model.ClsEqiupMaterWorkTimes_Model>();
@@ -17992,6 +18002,16 @@
            DataSet ds;
            try
            {
                //删除权限
                if (!DBUtility.ClsPub.Security_Log("EqiupMaterWorkTimes_Delete", 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无删除权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                if (string.IsNullOrWhiteSpace(HItemID))
                {
@@ -19060,6 +19080,51 @@
        }
        /// <summary>
        /// 获取巡检项目列表
        /// </summary>
        /// <returns></returns>
        [Route("Web/GetPatrolCheckItemList_Json")]
        [HttpGet]
        public object GetPatrolCheckItemList_Json(string CheckItem)
        {
            DataSet ds;
            try
            {
                sWhere = " Where HStopFlag=0 and HEndFlag=1";
                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                if(CheckItem != "" && CheckItem != null)
                {
                    sWhere = sWhere + " and ( HNumber like '%" + CheckItem + "%' or HName like '%" + CheckItem + "%' ) ";
                }
                ds = oCN.RunProcReturn("Select HItemID,HNumber,HName  from Gy_PatrolCheck " + sWhere + " Order by HItemID ", "Gy_DotCheck");
                if(ds == null )
                {
                    objjson.code = "0";
                    objjson.count = 0;
                    objjson.Message = "获取失败" + DBUtility.ClsPub.sErrInfo;
                    objjson.data = null;
                    return objjson;
                }
                else
                {
                    objjson.code = "1";
                    objjson.count = 1;
                    objjson.Message = "获取成功";
                    objjson.data = ds.Tables[0];
                    return objjson;
                }
            }
            catch(Exception ex)
            {
                objjson.code = "0";
                objjson.count = 0;
                objjson.Message = "获取失败" + ex.ToString();
                objjson.data = null;
                return objjson;
            }
        }
        /// <summary>
        /// 获取生产任务单列表
        /// </summary>
        /// <returns></returns>