123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423 |
- using System;
- using System.Collections.Generic;
- using Winsoft.GOV.Framework;
- using Winsoft.GOV.Framework.Model;
- using Winsoft.GOV.Framework.Provider;
- namespace Winsoft.GOV.WCF
- {
- // 注意: 使用“重构”菜单上的“重命名”命令,可以同时更改代码和配置文件中的类名“Service1”。
- public class PowerMettersService : IPowerMettersService
- {
- public PagedResult<NotificationOfAction> GetNotifysPagedResultEx(int itemIndex, int size, County c = County.LS)
- {
- try
- {
- return ProvidersFactory.GetNotificationOfActionProvider(c).FindByPage(itemIndex, size);
- }
- catch (Exception e)
- {
- FunLib.Log(e.Message);
- return new PagedResult<NotificationOfAction>()
- {
- Data = new List<NotificationOfAction>()
- };
- }
- }
- public PagedResult<NotificationOfAction> GetUnreadNotifysPagedResultEx(int itemIndex, int size, County c = County.LS)
- {
- try
- {
- return ProvidersFactory.GetNotificationOfActionProvider(c).FindUnreadByPage(itemIndex, size);
- }
- catch (Exception e)
- {
- FunLib.Log(e.Message);
- return new PagedResult<NotificationOfAction>()
- {
- Data = new List<NotificationOfAction>()
- };
- }
- }
- public void ReadNotify(string ql_inner_code, County c = County.LS)
- {
- try
- {
- ProvidersFactory.GetNotificationOfActionProvider(c).Read(ql_inner_code);
- }
- catch (Exception e)
- {
- FunLib.Log(e.Message);
- }
- }
- public PagedResult<NotificationOfAction> GetUnreadNotifysPagedResultByQL_KindEx(string key, int itemIndex, int size, string[] ql_kinds, bool isHidRead, County c = County.LS)
- {
- try
- {
- return ProvidersFactory.GetNotificationOfActionProvider(c).FindByPage(key, itemIndex, size, ql_kinds, isHidRead);
- }
- catch (Exception e)
- {
- FunLib.Log(e.Message);
- return new PagedResult<NotificationOfAction>()
- {
- Data = new List<NotificationOfAction>()
- };
- }
- }
- public int GetUnreadCount(County c = County.LS)
- {
- try
- {
- return ProvidersFactory.GetNotificationOfActionProvider(c).UnreadCount();
- }
- catch (Exception e)
- {
- FunLib.Log(e.Message);
- return 0;
- }
- }
- public PagedResult<PowerMattersBase> SearchByKeyPagedResultEx(string key, int itemIndex, int size, County c = County.LS)
- {
- try
- {
- return ProvidersFactory.GetPowerMettersBaseProvider(c).FindByPage(key, itemIndex, size);
- }
- catch (Exception e)
- {
- FunLib.Log(e.Message);
- return new PagedResult<PowerMattersBase>()
- {
- Data = new List<PowerMattersBase>()
- };
- }
- }
- public PagedResult<PowerMattersBase> GetPowerMatterBasesByQL_KindEx(string key, int itemIndex, int size, string[] ql_kinds, County c = County.LS)
- {
- try
- {
- return ProvidersFactory.GetPowerMettersBaseProvider(c).FindByPage(key, itemIndex, size, ql_kinds);
- }
- catch (Exception e)
- {
- FunLib.Log(e.Message);
- return new PagedResult<PowerMattersBase>()
- {
- Data = new List<PowerMattersBase>()
- };
- }
- }
- public PagedResult<PowerMattersBase> GetPowerMatterBasesEx(int itemIndex, int size, County c = County.LS)
- {
- try
- {
- return ProvidersFactory.GetPowerMettersBaseProvider(c).FindByPage(itemIndex, size);
- }
- catch (Exception e)
- {
- FunLib.Log(e.Message);
- return new PagedResult<PowerMattersBase>()
- {
- Data = new List<PowerMattersBase>()
- };
- }
- }
- /// <summary>
- /// 获取所有部门
- /// </summary>
- /// <returns></returns>
- public IEnumerable<Branch> GetBranchsEx(County c)
- {
- IEnumerable<Branch> r = null;
- try
- {
- r = ProvidersFactory.GetBranchProvider(c).FindAll();
- if (r == null)
- return new List<Branch>();
- return r;
- }
- catch (Exception e)
- {
- FunLib.Log(e.Message);
- if (r == null)
- return new List<Branch>();
- return r;
- }
- }
- /// <summary>
- /// 获取所有部门及部门事项统计出数量
- /// </summary>
- /// <returns></returns>
- public IEnumerable<Branch> GetBranchsAndSumMattersEx(County c)
- {
- IEnumerable<Branch> r = null;
- try
- {
- r = ProvidersFactory.GetBranchProvider(c).FindBranchsAndSumMatters();
- if (r == null)
- return new List<Branch>();
- return r;
- }
- catch (Exception e)
- {
- FunLib.Log(e.Message);
- if (r == null)
- return new List<Branch>();
- return r;
- }
- }
- /// <summary>
- /// 获取最多跑一次部门
- /// </summary>
- /// <returns></returns>
- public IEnumerable<Branch> GetOnceRunBranchsEx(County c)
- {
- IEnumerable<Branch> r = null;
- try
- {
- r = ProvidersFactory.GetBranchProvider(c).FindOnceRunBranch();
- if (r == null)
- return new List<Branch>();
- return r;
- }
- catch (Exception e)
- {
- FunLib.Log(e.Message);
- if (r == null)
- return new List<Branch>();
- return r;
- }
- }
- /// <summary>
- /// 按实现方式获取部门,数据来源实现方式表
- /// </summary>
- /// <param name="type"></param>
- /// <returns></returns>
- public IEnumerable<Branch> GetBranchsByApplyTypeEx(int type, County c)
- {
- IEnumerable<Branch> r = null;
- try
- {
- r = ProvidersFactory.GetBranchProvider(c).FindByApplyType(type);
- if (r == null)
- return new List<Branch>();
- return r;
- }
- catch (Exception e)
- {
- FunLib.Log(e.Message);
- if (r == null)
- return new List<Branch>();
- return r;
- }
- }
- /// <summary>
- /// 通过部门guid获取部门的权力清单,来源于权力清单(全部)表
- /// </summary>
- /// <param name="guid"></param>
- /// <returns></returns>
- public IEnumerable<PowerMattersBase> GetPowerMattersByBranchGuidEx(string guid, County c)
- {
- IEnumerable<PowerMattersBase> r = null;
- try
- {
- r = ProvidersFactory.GetPowerMettersBaseProvider(c).FindByBranchGUID(guid);
- if (r == null)
- return new List<PowerMattersBase>();
- return r;
- }
- catch (Exception e)
- {
- FunLib.Log(e.Message);
- if (r == null)
- return new List<PowerMattersBase>();
- return r;
- }
- }
- public PagedResult<PowerMattersBase> GetPowerMattersByBranchGuidPagedResultEx(string guid, int itemIndex, int size, County c = County.LS)
- {
- try
- {
- return ProvidersFactory.GetPowerMettersBaseProvider(c).FindByPage(itemIndex, size, guid);
- }
- catch (Exception e)
- {
- FunLib.Log(e.Message);
- return new PagedResult<PowerMattersBase>()
- {
- Data = new List<PowerMattersBase>()
- };
- }
- }
- /// <summary>
- /// 通过部门guid,获取最多跑一次事项
- /// </summary>
- /// <param name="guid"></param>
- /// <returns></returns>
- public IEnumerable<PowerMattersBase> GetOnceRunPowerMattersByBranchGuidEx(string guid, County c)
- {
- IEnumerable<PowerMattersBase> r = null;
- try
- {
- r = ProvidersFactory.GetOnceRunPowerMattersProvider(c).FindOnceRunPowerMattersByBranchGUID(guid);
- if (r == null)
- return new List<PowerMattersBase>();
- return r;
- }
- catch(Exception e)
- {
- FunLib.Log(e.Message);
- if (r == null)
- return new List<PowerMattersBase>();
- return r;
- }
- }
- public PagedResult<PowerMattersBase> GetOnceRunPowerMattersByBranchGuidPagedResultEx(string guid, int itemIndex, int size, County c = County.LS)
- {
- try
- {
- return ProvidersFactory.GetOnceRunPowerMattersProvider(c).FindByPage(itemIndex, size, guid);
- }
- catch (Exception e)
- {
- FunLib.Log(e.Message);
- return new PagedResult<PowerMattersBase>()
- {
- Data = new List<PowerMattersBase>()
- };
- }
- }
- /// <summary>
- /// 通过部门guid和实现方式type,获取权力事项,数据来源实现方式表
- /// </summary>
- /// <param name="guid"></param>
- /// <param name="type"></param>
- /// <returns></returns>
- public IEnumerable<PowerMattersBase> GetPowerMattersByBranchGuidAndApplyTypeEx(string guid, int type, County c)
- {
- IEnumerable<PowerMattersBase> r = null;
- try
- {
- r = ProvidersFactory.GetOnceRunPowerMattersProvider(c).FindByBranchGUIDAndApplyType(guid, type);
- if (r == null)
- return new List<PowerMattersBase>();
- return r;
- }
- catch (Exception e)
- {
- FunLib.Log(e.Message);
- if (r == null)
- return new List<PowerMattersBase>();
- return r;
- }
- }
- /// <summary>
- /// 通过部门guid和权力类型kind,获取权力事项,数据来源权力清单(全部)表
- /// </summary>
- /// <param name="guid"></param>
- /// <param name="ql_kind"></param>
- /// <returns></returns>
- public IEnumerable<PowerMattersBase> GetPowerMattersEx(string guid, string ql_kind, County c)
- {
- IEnumerable<PowerMattersBase> r = null;
- try
- {
- r = ProvidersFactory.GetPowerMettersBaseProvider(c).Find(guid, ql_kind);
- if (r == null)
- return new List<PowerMattersBase>();
- return r;
- }
- catch (Exception e)
- {
- FunLib.Log(e.Message);
- if (r == null)
- return new List<PowerMattersBase>();
- return r;
- }
- }
- public PowerMattersDetail GetPowerMattersDetailByRowIDEx(string rowID, County c)
- {
- PowerMattersDetail r = null;
- try
- {
- r = ProvidersFactory.GetPowerMettersDetailProvider(c).FindByRowID(rowID);
- //if (r == null)
- // r = new PowerMattersDetail();
- return r;
- }
- catch (Exception e)
- {
- FunLib.Log(e.Message);
- //if (r == null)
- // r = new PowerMattersDetail();
- return null;
- }
- }
- public IEnumerable<PowerMattersBase> SearchByQLNameEx(string ql_name, int itemIndex, int size, County c)
- {
- try
- {
- return ProvidersFactory.GetPowerMettersBaseProvider(c).Search(ql_name, itemIndex, size);
- }
- catch (Exception e)
- {
- FunLib.Log(e.Message);
- return new List<PowerMattersBase>();
- }
- }
- public IEnumerable<Branch> GetBranchs()
- {
- return GetBranchsEx(County.LS);
- }
- public IEnumerable<PowerMattersBase> GetPowerMattersByBranchGuid(string guid)
- {
- return GetPowerMattersByBranchGuidEx(guid, County.LS);
- }
- public PowerMattersDetail GetPowerMattersDetailByRowID(string rowID)
- {
- return GetPowerMattersDetailByRowIDEx(rowID, County.LS);
- }
- public IEnumerable<PowerMattersBase> GetPowerMatters(string guid, string ql_kind)
- {
- return GetPowerMattersEx(guid, ql_kind, County.LS);
- }
- public IEnumerable<Branch> GetBranchsByApplyType(int type)
- {
- return GetBranchsByApplyTypeEx(type, County.LS);
- }
- public IEnumerable<PowerMattersBase> GetPowerMattersByBranchGuidAndApplyType(string guid, int type)
- {
- return GetPowerMattersByBranchGuidAndApplyTypeEx(guid, type, County.LS);
- }
- public IEnumerable<PowerMattersBase> SearchByQLName(string ql_name, int itemIndex, int size)
- {
- return SearchByQLNameEx(ql_name, itemIndex, size, County.LS);
- }
- public IEnumerable<Branch> GetOnceRunBranchs()
- {
- return GetOnceRunBranchsEx(County.LS);
- }
- public IEnumerable<PowerMattersBase> GetOnceRunPowerMattersByBranchGuid(string guid)
- {
- return GetOnceRunPowerMattersByBranchGuidEx(guid, County.LS);
- }
- }
- }
|