zzr99
2022-01-17 1b6bd34c01baa643ecb0a99e830f7487321684af
WebAPI/Controllers/GG_NoticeController.cs
@@ -68,7 +68,7 @@
        public static DataSet Get_GG_NoticeBillList(string sWhere)
        {
            var sql = "select A.HInterID,b.HEntryID,A.HBillNo,A.HContext,A.HDeptID,D.HName HDeptName, A.HSendMan, B.HReceiveMan,A.HLevel,A.HDescription,case when B.HReadFlag=0 then '未阅' when B.HReadFlag=1 then '已阅' end HReadFlag, A.HMaker,A.HDate,A.HUpDater,A.HUpDateDate" +
            var sql = "select A.HInterID,b.HEntryID,A.HBillNo,A.HContext,A.HDeptID,D.HName HDeptName, A.HSendMan, B.HReceiveMan,A.HLevel,A.HDescription,case when B.HReadFlag=0 then '未阅' when B.HReadFlag=1 then '已阅' end HReadFlag, A.HMaker,A.HMakeDate,A.HUpDater,A.HUpDateDate" +
               " from OA_InformBillMain A inner join  OA_InformBillSub B on A.HInterID=B.HInterID left join Gy_Department D on A.HDeptID=D.HItemID where 1=1 " + sWhere;
            return new SQLHelper.ClsCN().RunProcReturn(sql, "OA_InformBillMain");
        }
@@ -84,7 +84,7 @@
                return new ApiResult<DataSet> { code = -1, msg = "ID不能为空" };
            SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
            var dataSet = oCN.RunProcReturn("select A.HInterID,b.HEntryID,A.HBillNo,A.HContext,A.HDeptID,D.HName HDeptName, A.HSendMan, B.HReceiveMan,A.HLevel,A.HDescription,case when B.HReadFlag=0 then '未阅' when B.HReadFlag=1 then '已阅' end HReadFlag, A.HMaker,A.HDate,A.HUpDater,A.HUpDateDate" +
            var dataSet = oCN.RunProcReturn("select A.HInterID,b.HEntryID,A.HBillNo,A.HContext,A.HDeptID,D.HName HDeptName, A.HSendMan, B.HReceiveMan,A.HLevel,A.HDescription,case when B.HReadFlag=0 then '未阅' when B.HReadFlag=1 then '已阅' end HReadFlag, A.HMaker,A.HMakeDate,A.HUpDater,A.HUpDateDate" +
               " from OA_InformBillMain A inner join  OA_InformBillSub B on A.HInterID=B.HInterID left join Gy_Department D on A.HDeptID=D.HItemID where  A.HInterID='"+ HID + "' and b.HEntryID='"+HEntryID+"'", "OA_InformBillMain");
            if (dataSet == null || dataSet.Tables[0].Rows.Count == 0)
                return new ApiResult<DataSet> { code = -1, msg = "不存在单号" };
@@ -255,5 +255,44 @@
        }
        #endregion
        #region 公告列表删除
        [Route("GG_Notice/Get_GG_Notice_DeleteBill")]
        [HttpGet]
        public object Get_GG_Notice_DeleteBill(string HInterID, string user)
        {
            try
            {
                //删除权限
                //if (!DBUtility.ClsPub.Security_Log_second("", 1, true, user))
                //{
                //    objJsonResult.code = "0";
                //    objJsonResult.count = 0;
                //    objJsonResult.Message = "无删除权限!";
                //    objJsonResult.data = null;
                //    return objJsonResult;
                //}
                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                oCN.RunProc("delete from OA_InformBillSub where HInterID=" + HInterID);
                oCN.RunProc("delete from OA_InformBillMain where HInterID=" + HInterID);
                oCN.Commit();//提交事务
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "公告数据删除成功!";
                objJsonResult.data = null;
                return objJsonResult; ;
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "公告数据删除失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
    }
}