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>
@@ -19271,22 +19336,18 @@
        /// <returns></returns>
        [Route("Web/GetSc_ProcessExchangeBillListView")]
        [HttpGet]
        public object GetSc_ProcessExchangeBillListView(string ICMOBill, int OrganizationID)
        {
            if (ICMOBill != "" & ICMOBill != null)
            {
                sWhere = " where 1=1 and 单据号 like '%" + ICMOBill + "%' ";
            }
        public object GetSc_ProcessExchangeBillListView(string sWhere,int OrganizationID)
        {
            try
            {
                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                if (sWhere == null || sWhere.Equals(""))
                {
                    ds = oCN.RunProcReturn("select top 500 * from h_v_Sc_ProcessExchangeBillList where 1=1  order by 单据号 desc,hsubid", "h_v_Sc_ProcessExchangeBillList");
                }
                    ds = oCN.RunProcReturn("select top 300 * from h_v_Sc_ProcessExchangeBillList where 1=1  order by 单据号 desc,hsubid", "h_v_Sc_ProcessExchangeBillList");
                }
                else
                {
                    string sql = "select * from h_v_Sc_ProcessExchangeBillList " + sWhere + " order by 单据号 desc,hsubid ";
                    string sql = "select * from h_v_Sc_ProcessExchangeBillList  where 1=1 " + sWhere + " order by 单据号 desc,hsubid ";
                    ds = oCN.RunProcReturn(sql, "h_v_Sc_ProcessExchangeBillList");
                }
                if (ds == null || ds.Tables[0].Rows.Count <= 0)