王 垚
2021-10-26 3cb2f210a9839a7bcc78a227013f3139f8a7440a
WebAPI/Controllers/SBGL/Sb_EquipDotCheckBillController.cs
@@ -28,12 +28,38 @@
        {
            try
            {
                ds = Sb_EquipDotCheckBillList_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_EquipDotCheckBillList " + sWhere + " order by hmainid desc", "h_v_Sb_EquipDotCheckBillList");
                }
                else
                {
                    string sql1 = "select * from h_v_Sb_EquipDotCheckBillList where 1 = 1";
                    string sql = sql1 + sWhere + " order by hmainid desc";
                    ds = oCN.RunProcReturn(sql, "h_v_Sb_EquipDotCheckBillList");
                }
                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_EquipDotCheckBillList_s(sWhere);
                //objJsonResult.code = "1";
                //objJsonResult.count = 1;
                //objJsonResult.Message = "返回记录成功!";
                //objJsonResult.data = ds.Tables[0];
                //return objJsonResult;
            }
            catch (Exception ex)
            {
@@ -56,7 +82,7 @@
        #region 设备点检记录表 保存/编辑
        /// <summary>
        /// 保存模具维修单
        /// 点检记录表 保存
        /// </summary>
        /// <param name="msg"></param>
        /// <returns></returns>
@@ -186,6 +212,7 @@
            }
        }
        #endregion
        #region [设备点检记录表删除功能]
        /// <summary>
        /// 模具维修单删除功能
@@ -196,7 +223,7 @@
        public object DeltetEquipDotCheckBillList(string HInterID)
        {
            //编辑权限
            //if (!DBUtility.ClsPub.Security_Log("Sb_MouldRepairWorkBill_Delete", 1, true, DBUtility.ClsPub.CurUserName))
            //if (!DBUtility.ClsPub.Security_Log_second("Sb_MouldRepairWorkBill_Delete", 1, true, DBUtility.ClsPub.CurUserName))
            //{
            //    objJsonResult.code = "0";
            //    objJsonResult.count = 0;
@@ -279,6 +306,7 @@
            return new ApiResult<DataSet> { code = 1, msg = "查询成功", data = dataSet };
        }
        #endregion
        #region[设备点检记录表编辑时获取表题数据]
        [Route("Sb_EquipDotCheckBill/Sb_EquipDotCheckBillListProjectDetai")]
        [HttpGet]
@@ -290,7 +318,7 @@
                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                if (sqlWhere == null || sqlWhere.Equals(""))
                {
                    ds = oCN.RunProcReturn("select 点检项目 HDotCheckItem,点检部位 HDotCheckPart ,具体要求 HClaim,表体备注 HRemark,负责人ID HManagerID,负责人编码 HManagerCode,负责人 HManagerName  from h_v_Sb_EquipDotCheckBillList", "h_v_Sb_EquipDotCheckBillList");
                    ds = oCN.RunProcReturn("select 点检项目ID HDotCheckItemID,点检项目代码 as HDotCheckCode ,点检项目 HDotCheckItem,点检部位 HDotCheckPart ,具体要求 HClaim,表体备注 HRemark,负责人ID HManagerID,负责人编码 HManagerCode,负责人 HManagerName  from h_v_Sb_EquipDotCheckBillList", "h_v_Sb_EquipDotCheckBillList");
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "获取信息成功!";
@@ -298,7 +326,7 @@
                }
                else
                {
                    string sql1 = "select 点检项目 HDotCheckItem,点检部位 HDotCheckPart,具体要求 HClaim,表体备注 HRemark,负责人ID HManagerID,负责人编码 HManagerCode,负责人 HManagerName  from h_v_Sb_EquipDotCheckBillList where 1 = 1 ";
                    string sql1 = "select 点检项目ID HDotCheckItemID,点检项目代码 as HDotCheckCode ,点检项目 HDotCheckItem,点检部位 HDotCheckPart,具体要求 HClaim,表体备注 HRemark,负责人ID HManagerID,负责人编码 HManagerCode,负责人 HManagerName  from h_v_Sb_EquipDotCheckBillList where 1 = 1 ";
                    string sql = sql1 + sqlWhere;
                    ds = oCN.RunProcReturn(sql, "h_v_Sb_EquipDotCheckBillList");
                    objJsonResult.code = "0";