1
lan
2024-05-30 8affd199e02bd37f0dcb16447d1fbcaa34bfa2f8
WebAPI/Controllers/SBGL/Sb_EquipMaintainRuleBillController.cs
@@ -99,9 +99,10 @@
                return objJsonResult;
            }
            DLL.ClsSb_EquipMaintainRuleBill oBill = new DLL.ClsSb_EquipMaintainRuleBill();
            if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo))
            ds = oCN.RunProcReturn("select * from Sb_EquipMaintainRuleBillMain where HItemID=" + HInterID, "Sb_EquipMaintainRuleBillMain");
            if (ds.Tables[0].Rows.Count > 0)
            {
                if (oBill.omodel.HBillStatus > 1)
                if (int.Parse(ds.Tables[0].Rows[0]["HBillStatus"].ToString()) > 1)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
@@ -109,7 +110,7 @@
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                if (oBill.omodel.HChecker != ""&& oBill.omodel.HChecker != null)
                if (ds.Tables[0].Rows[0]["HChecker"].ToString() != "")
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
@@ -200,9 +201,9 @@
            if (string.IsNullOrEmpty(HID))
                return new ApiResult<DataSet> { code = -1, msg = "ID不能为空" };
            SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
            var dataSet = oCN.RunProcReturn("select top 1 * from Sb_EquipMaintainRuleBillMain  where HInterID= " + HID + " ", "Sb_EquipMaintainRuleBillMain");
            var dataSet = oCN.RunProcReturn("select top 1 * from h_v_Sb_EquipMaintainRuleBillList  where HInterID= " + HID + " ", "h_v_Sb_EquipMaintainRuleBillList");
            if (dataSet == null || dataSet.Tables[0].Rows.Count == 0)
                return new ApiResult<DataSet> { code = -1, msg = "不存在点检计划表" };
                return new ApiResult<DataSet> { code = -1, msg = "不存在保养规程表" };
            return new ApiResult<DataSet> { code = 1, msg = "查询成功", data = dataSet };
        }
        #endregion