WebAPI/Controllers/WebAPIController.cs
@@ -8951,11 +8951,11 @@
                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                if (sWhere == null || sWhere.Equals(""))
                {
                    ds = oCN.RunProcReturn("Select HInterID,HEquipFileNumber,HName  from Gy_EquipFileBillMain where 0=0 Order by HInterID ", "Gy_EquipFileBillMain");
                    ds = oCN.RunProcReturn("Select HInterID,HEquipFileNumber,HName,HModel2  from Gy_EquipFileBillMain where 0=0 Order by HInterID ", "Gy_EquipFileBillMain");
                }
                else
                {
                    string sql1 = "Select HInterID,HEquipFileNumber,HName  from Gy_EquipFileBillMain where 0=0  ";
                    string sql1 = "Select HInterID,HEquipFileNumber,HName,HModel2  from Gy_EquipFileBillMain where 0=0  ";
                    string sql = sql1 + sWhere;
                    ds = oCN.RunProcReturn(sql, "Gy_EquipFileBillMain");
                }
@@ -9984,7 +9984,7 @@
        /// <returns></returns>
        [Route("Web/GetItemByEquipFile")]
        [HttpGet]
        public object GetItemByEquipFile(int EquipProjectID,string Type)
        public object GetItemByEquipFile(int EquipProjectID,string Type,string HDate)
        {
            if (EquipProjectID <= 0)
            {
@@ -10014,7 +10014,8 @@
                }
                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                string sql = string.Format(@"select * from " + HView + " where HInterID = " + EquipProjectID);
                //string sql = string.Format(@"select * from " + HView + " where HInterID = " + EquipProjectID);
                string sql = string.Format(@"Exec h_p_Sb_GetCheckItem_PDA '" + EquipProjectID + "','" + Type + "','" + HDate + "'");
                ds = oCN.RunProcReturn(sql, HView);
                if (ds == null || ds.Tables[0].Rows.Count <= 0)
                {
@@ -10329,6 +10330,37 @@
            }
        }
        /// <summary>
        /// 获取选单号的源单类型
        /// </summary>
        /// <returns></returns>
        [Route("Web/GetHSourceBillName")]
        [HttpGet]
        public object GetHSourceBillName(string HBillType)
        {
            try
            {
                ClsCN oCn = new ClsCN();
                DataSet oDs = new DataSet();
                //==========
                oDs = oCn.RunProcReturn("select * from  xt_BillType where HNumber='" + HBillType + "'", "xt_BillType");
                objjson.code = "1";
                objjson.count = 1;
                objjson.Message = "获取成功!";
                objjson.data = oDs.Tables[0];
                return objjson; ;
            }
            catch (Exception e)
            {
                objjson.code = "0";
                objjson.count = 0;
                objjson.Message = "获取失败!异常" + e.ToString();
                objjson.data = null;
                return objjson; ;
            }
        }
        #region [从数据库加载菜单]
        public class MenuLoad
@@ -11231,6 +11263,47 @@
            }
        }
        /// <summary>
        /// 获取单据模块名称
        /// </summary>
        /// <returns></returns>
        [Route("Web/GetModuleName")]
        [HttpGet]
        public object GetModuleName(string HModuleType)
        {
            try
            {
                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                ds = oCN.RunProcReturn("Select * from Xt_BillType where HNumber = '" + HModuleType + "'", "Xt_BillType");
                if (ds == null || ds.Tables[0].Rows.Count <= 0)
                {
                    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;
            }
        }
    }
}