zzr99
2021-09-03 2a5b005c45ffc7df2a33102a92912160426f233a
WebAPI/Controllers/SBGL/Sb_EquipDotCheckPlanBillController.cs
@@ -9,6 +9,7 @@
    public class Sb_EquipDotCheckPlanBillController : ApiController
    {
        private json objJsonResult = new json();
        SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
        public DataSet ds = new DataSet();
        #region 设备点检计划表
@@ -23,12 +24,38 @@
        {
            try
            {
                ds = Sb_EquipDotCheckPlanBillList_s(sWhere);
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "返回记录成功!";
                objJsonResult.data = ds.Tables[0];
                return objJsonResult;
                if (sWhere == null || sWhere.Equals(""))
                {
                    ds = oCN.RunProcReturn("select * from h_v_Sb_EquipDotCheckPlanBillList " + sWhere + " order by hmainid desc", "h_v_Sb_EquipDotCheckPlanBillList");
                }
                else
                {
                    string sql1 = "select * from h_v_Sb_EquipDotCheckPlanBillList where 1 = 1";
                    string sql = sql1 + sWhere + " order by hmainid desc";
                    ds = oCN.RunProcReturn(sql, "h_v_Sb_EquipDotCheckPlanBillList");
                }
                if (ds == null || ds.Tables[0].Rows.Count == 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "没有你要找的记录!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "返回记录成功!";
                    objJsonResult.data = ds.Tables[0];
                    return objJsonResult;
                }
                //ds = Sb_EquipDotCheckPlanBillList_s(sWhere);
                //objJsonResult.code = "1";
                //objJsonResult.count = 1;
                //objJsonResult.Message = "返回记录成功!";
                //objJsonResult.data = ds.Tables[0];
                //return objJsonResult;
            }
            catch (Exception ex)
            {
@@ -285,7 +312,7 @@
                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                if (sqlWhere == null || sqlWhere.Equals(""))
                {
                    ds = oCN.RunProcReturn("select 点检项目 HDotCheckItem,点检部位 HDotCheckPart ,具体要求 HClaim,表体备注 HRemark,HManagerID from h_v_Sb_EquipDotCheckPlanBillList_Edit", "h_v_Sb_EquipDotCheckPlanBillList_Edit");
                    ds = oCN.RunProcReturn("select 点检项目 HDotCheckItem,点检部位 HDotCheckPart ,具体要求 HClaim,表体备注 HRemark,负责人代码 HManagerID,负责人 HManagerName from h_v_Sb_EquipDotCheckPlanBillList", "h_v_Sb_EquipDotCheckPlanBillList");
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "获取信息成功!";
@@ -293,9 +320,9 @@
                }
                else
                {
                    string sql1 = "select 点检项目 HDotCheckItem,点检部位 HDotCheckPart,具体要求 HClaim,表体备注 HRemark,HManagerID from h_v_Sb_EquipDotCheckPlanBillList_Edit where 1 = 1 ";
                    string sql1 = "select 点检项目 HDotCheckItem,点检部位 HDotCheckPart ,具体要求 HClaim,表体备注 HRemark,负责人代码 HManagerID,负责人 HManagerName from h_v_Sb_EquipDotCheckPlanBillList where 1 = 1 ";
                    string sql = sql1 + sqlWhere;
                    ds = oCN.RunProcReturn(sql, "h_v_Sb_EquipDotCheckPlanBillList_Edit");
                    ds = oCN.RunProcReturn(sql, "h_v_Sb_EquipDotCheckPlanBillList");
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "获取信息成功!";