zzr99
2021-10-12 dd031f91464d6452c0705cb5456f854a3d91dcc2
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)
            {
@@ -274,7 +301,7 @@
            return new ApiResult<DataSet> { code = 1, msg = "查询成功", data = dataSet };
        }
        #endregion
        #region[设备点检计划表编辑时获取表题数据]
        #region[设备点检计划表编辑时获取表体数据]
        [Route("Sb_EquipDotCheckPlanBill/Sb_EquipDotCheckPlanBillListProjectDetai")]
        [HttpGet]
        public object Sb_EquipDotCheckPlanBillListProjectDetai(string sqlWhere)
@@ -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 点检项目ID  HDotCheckItemID,点检项目代码  HDotCheckCode ,点检项目 HDotCheckItem,点检部位 HDotCheckPart ,具体要求 HClaim,表体备注 HRemark,负责人ID HManagerID,负责人代码 HManagerCode,负责人 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 点检项目ID  HDotCheckItemID,点检项目代码  HDotCheckCode ,点检项目 HDotCheckItem,点检部位 HDotCheckPart ,具体要求 HClaim,表体备注 HRemark,负责人ID HManagerID,负责人代码 HManagerCode,负责人 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 = "获取信息成功!";