zrg
2024-08-28 26ba47c84ba0b96943869a541178e7e394d424f5
WebAPI/Controllers/SBGL/Gy_EquipFileMainController.cs
@@ -82,7 +82,7 @@
                return objJsonResult;
            }
            string s = "";
            //string s = "";
            Int64 lngBillKey = 0;
            lngBillKey = DBUtility.ClsPub.isLong(HItemID);
            if (lngBillKey == 0)
@@ -156,6 +156,51 @@
        }
        #endregion
        # region 设备保养规程编辑时获取表体数据新(保养规程列表、点检规程列表)
        [Route("Gy_EquipFileMain/Gy_EquipFileMainSubAndSubItem")]
        [HttpGet]
        public object Gy_EquipFileMainSubAndSubItem(string HInterID)
        {
            DataSet ds, ds1;
            List<object> list = new List<object>();
            string Swhere = "";
            try
            {
                if (HInterID != "" || HInterID != null)
                {
                    Swhere = " and hmainid='" + HInterID + "'";
                }
                else
                {
                    Swhere = HInterID;
                }
                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                //获取保养项目编辑数据
                string sql = "select 保养项目ID HMaintainItemID,保养项目代码 HMaintainItemNumber,保养项目 HMaintainItem,保养部位 HMaintainPart,具体要求 HClaim,负责人ID HManagerID,负责人代码 HManagerNumber,负责人名称 HManagerName,子备注2 HRemark from h_v_Sb_EquipMaintainRuleSub_Item where 1 = 1 " + Swhere + "";
                ds = oCN.RunProcReturn(sql, "h_v_Sb_EquipMaintainRuleSub_Item");
                //获取配件项目编辑数据
                string sql1 = "select 配件ID HMaterID,配件代码 HMaterNumber,配件名称 HMaterName,单位ID HUnitID,计量单位代码 HUnitNumber,计量单位名称 HUnitName,用量 HQty,子备注1 HRemark from h_v_Sb_EquipMaintainRuleSub where 1 = 1 " + Swhere + "";
                ds1 = oCN.RunProcReturn(sql1, "h_v_Sb_EquipMaintainRuleSub");
                list.Add(ds.Tables[0]);
                list.Add(ds1.Tables[0]);
                objJsonResult.code = "0";
                objJsonResult.count = 1;
                objJsonResult.Message = "获取信息成功!";
                objJsonResult.list = list;
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "没有返回任何记录!" + e.ToString();
                objJsonResult.data = null;
            }
            return objJsonResult;
        }
        #endregion
        #region[设备档案编辑时获取子表数据]
        [Route("Gy_EquipFileMain/Gy_EquipFileSubDetai")]
        [HttpGet]