zrg
2024-06-17 2e0421bc2278345b45d5b041fff4cce3d6146a46
WebAPI/Controllers/WebAPIController.cs
@@ -12503,13 +12503,56 @@
            try
            {
                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                string sql = string.Format(@"select b.HDotCheckItemID HDotCheckItemID,c.HNumber HDotCheckCode,b.HDotCheckItem,b.HDotCheckPart,b.HClaim,
                                    b.HManagerID,e.HNumber HManagerCode,e.HName HManagerName,b.HRemark from Sb_EquipDotCheckRuleBillMain  a
                           left join Sb_EquipDotCheckRuleBillSub b on a.HInterID=b.HInterID
                                    left join Gy_DotCheck c on c.HItemID=b.HDotCheckItemID
                                     left join Gy_Employee e on e.HItemID=b.HManagerID
                                    where a.HInterID=" + HDotCheckRuleInterID);
                ds = oCN.RunProcReturn(sql, "Sb_EquipDotCheckRuleBillMain");
                string sql = string.Format(@"select * from h_v_Sb_EquipDotCheckRuleBillList_PDA where HInterID=" + HDotCheckRuleInterID);
                ds = oCN.RunProcReturn(sql, "h_v_Sb_EquipDotCheckRuleBillList_PDA");
                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;
            }
        }
        /// <summary>
        /// 根据设备保养规程显示设备保养程项目
        /// </summary>
        /// <returns></returns>
        [Route("Web/GetMaintainItemByMaintainRuleID")]
        [HttpGet]
        public object GetMaintainItemByMaintainRuleID(int HEquipMaintainRuleInterID)
        {
            if (HEquipMaintainRuleInterID <= 0)
            {
                objjson.code = "0";
                objjson.count = 0;
                objjson.Message = "设备保养规程未选择";
                objjson.data = null;
                return objjson;
            }
            try
            {
                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                string sql = string.Format(@"select * from h_v_Sb_EquipMaintainRuleBillList_PDA where HInterID=" + HEquipMaintainRuleInterID);
                ds = oCN.RunProcReturn(sql, "h_v_Sb_EquipMaintainRuleBillList_PDA");
                if (ds == null || ds.Tables[0].Rows.Count <= 0)
                {
                    objjson.code = "0";