| | |
| | | lsmain = oListModels.getObjectByJson_Gy_UserSupper(msg2); |
| | | oCN.BeginTran(); |
| | | //删除已经关联的数据 |
| | | oCN.RunProc("Delete From Gy_UserSupplierRelation where HUserID=" + msg3.ToString()); |
| | | oCN.RunProc("Delete From Gy_UserSupplierRelation where HUserID='" + msg3.ToString() + "'"); |
| | | foreach (Models.Gy_UserSupper oItem in lsmain) |
| | | { |
| | | //重新写入关联数据 |
| | |
| | | |
| | | 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"); |
| | | } |
| | |
| | | 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 = "不存在单号" }; |
| | |
| | | using System; |
| | | using DBUtility; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Data; |
| | | using System.Linq; |
| | | using System.Net; |
| | | using System.Net.Http; |
| | | using System.Web.Http; |
| | | using System.Web.UI.WebControls; |
| | | using WebAPI.Models; |
| | | |
| | | namespace WebAPI.Controllers |
| | |
| | | #endregion |
| | | |
| | | #endregion |
| | | } |
| | | |
| | | #region 用户关联权限 |
| | | |
| | | #region 条件查询权限列表 |
| | | [Route("PublicPageMethod/PowerList")] |
| | | [HttpGet] |
| | | public object PowerList(string czybm,string sGnbm) |
| | | { |
| | | try |
| | | { |
| | | string sName = ""; |
| | | if (sGnbm != "" && sGnbm != null) |
| | | { |
| | | sName = sGnbm.Substring(1, sGnbm.Length - 1); |
| | | } |
| | | ds = oCN.RunProcReturn("select * from Gy_Czygl where czybm='" + czybm + "'", "Gy_Czygl"); |
| | | string AuthorityID = ClsPub.isStrNull(ds.Tables[0].Rows[0]["AuthorityID"]); |
| | | ds = oCN.RunProcReturn("SELECT id hid,case when id<=" + AuthorityID.Length + " then case when SUBSTRING('" + AuthorityID + "',id,1)=1 then 1 else 0 end else 0 end 是否权限,gnms 功能说明,gnbm hgnbm FROM xt_xtgnb where useflag=1 and sjgnbm='" + sName + "' and rightflag=1 order by gnbm", "xt_xtgnb"); |
| | | 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 = "Sucess!"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exception!" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region 树型列表功能列表数据 |
| | | [Route("Gy_MaintenanceMode/PowerLoadTree")] |
| | | [HttpGet] |
| | | public object PowerLoadTree() |
| | | { |
| | | SQLHelper.ClsCN SubCn = new SQLHelper.ClsCN(); |
| | | string sql = string.Format(@"select 'T权限管理-用户' id,'' HNumber,'权限管理--用户' title,'' ParentID, 'true' spread |
| | | union all |
| | | Select 'T'+gnbm id,gnsy HNumber,gnmc as title,case when sjgnbm<>null then sjgnbm else 'T权限管理-用户' end ParentID, 'true' spread |
| | | from Xt_Xtgnb where useflag=1 and rightflag=1 and (gnbm NOT LIKE '99%') and sjgnbm='' and mjbz=0 "); |
| | | ds = oCN.RunProcReturn(sql, "Xt_Xtgnb"); |
| | | 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 = "Sucess!"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #endregion |
| | | |
| | | } |
| | | } |
| | |
| | | ",HReceiveMan,HLevel,HDescription" + |
| | | ") " + |
| | | " values('" + this.BillType + "','" + this.HBillSubType + "'," +omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "'" + |
| | | "," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "','" + omodel.HRemark + "',getdate()" + |
| | | "," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "','" + omodel.HMaker + "',getdate()" + |
| | | ",'" + omodel.HContext + "'," + omodel.HDeptID.ToString() + ",'" + omodel.HSendMan.ToString() + |
| | | "','" + omodel.HReceiveMan + "','" + omodel.HLevel + "','" + omodel.HDescription + "'" + |
| | | ") "); |