123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202 |
- using PMS.BusinessModels;
- using PMS.BusinessModels.ExternalManage;
- using PMS.DBService.ExternalManage;
- using PMS.DBService.Search;
- using PMS.EntityModels.ExternalManage;
- using PMS.Interface.ExternalManage;
- using QWPlatform.IService;
- using QWPlatform.SystemLibrary;
- using QWPlatform.SystemLibrary.Utils;
- using System;
- using System.Collections.Generic;
- using System.Data;
- using System.Linq;
- using System.Runtime.InteropServices;
- using System.Text;
- using System.Threading.Tasks;
- using System.Web.UI;
- namespace PMS.BusinessService.ExternalManage
- {
- public class ExternalManageBuiness : IExternalManage
- {
- //提供ProService的数据服务
- private ExternalManageService DB_ExterManageService = DataServiceBase.Instance<ExternalManageService>();
-
- /// <summary>
- /// 关键字查询外部服务分类
- /// </summary>
- /// <param name="keyword"></param>
- /// <returns></returns>
- public string GetMenu(string keyword, string productId, int type)
- {
- var dt = Strings.ObjectToJson(DB_ExterManageService.GetMenu(keyword, productId, type));
- return dt;
- }
- /// <summary>
- /// 根据产品ID获取分类
- /// </summary>
- /// <param name="productIds"></param>
- /// <returns></returns>
- public string GetMenuByProduct(List<string> productIds)
- {
- var dt = Strings.ObjectToJson(DB_ExterManageService.GetMenuByProduct(productIds));
- return dt;
- }
- //// <summary>
- /// 获取编码
- /// </summary>
- /// <param name="tableName">表名</param>
- /// <returns></returns>
- public string GetMaxClassCode(string parent_id, int type, string productId)
- {
- var dt = DB_ExterManageService.GetMaxClassCode(parent_id, type, productId);
- return dt;
- }
- /// <summary>
- /// 保存服务分类
- /// </summary>
- /// <param name="model"></param>
- /// <returns></returns>
- public bool SaveExternalClass(ExternalClass model)
- {
- var dt = DB_ExterManageService.SaveExternalClass(model);
- return dt;
- }
- /// <summary>
- /// 删除服务分类
- /// </summary>
- /// <param name="id"></param>
- /// <returns></returns>
- public bool DeleteClass(string id)
- {
- var dt = DB_ExterManageService.DeleteClass(id);
- return dt;
- }
- /// <summary>
- /// 获取服务目录
- /// </summary>
- /// <param name="class_id">分类id</param>
- /// <param name="keyword">关键字</param>
- /// <returns></returns>
- public string GetExternal(string class_id, string keyword, int pageSize, int pageNum)
- {
- int total = 0;
- DataTable dt = DB_ExterManageService.GetExternal(class_id, keyword, pageSize, pageNum, out total);
- return dt.ToEasyUIGridJson(total);
- }
- /// <summary>
- /// 保存服务
- /// </summary>
- /// <param name="model"></param>
- /// <returns></returns>
- public bool SaveExternal(External model)
- {
- var dt = DB_ExterManageService.SaveExternal(model);
- return dt;
- }
- /// <summary>
- /// 获取参数
- /// </summary>
- /// <param name="type"></param>
- /// <param name="id"></param>
- /// <returns></returns>
- public string GetParameter(string tyep, string id)
- {
- var dt = Strings.ObjectToJson(DB_ExterManageService.GetParameter(tyep, id));
- return dt;
- }
- /// <summary>
- /// 参数设置
- /// </summary>
- /// <param name="id"></param>
- /// <returns></returns>
- public string GetExternalParameter(string id)
- {
- var dt = Strings.ObjectToJson(DB_ExterManageService.GetExternalParameter(id));
- return dt;
- }
- /// <summary>
- /// 保存参数设置
- /// </summary>
- /// <param name="model"></param>
- /// <returns></returns>
- public bool SavaExternalSet(v_parameter model)
- {
- var dt = DB_ExterManageService.SavaExternalSet(model);
- return dt;
- }
- /// <summary>
- /// 删除服务和出入参信息
- /// </summary>
- /// <param name="id"></param>
- /// <returns></returns>
- public bool deleteExternal(string id)
- {
- var dt = DB_ExterManageService.deleteExternal(id);
- return dt;
- }
-
- /// <summary>
- /// 复制
- /// </summary>
- /// <param name="model"></param>
- /// <returns></returns>
- public bool CopyExternalByClass(dto_copy_class model)
- {
- var dt = DB_ExterManageService.CopyExternalByClass(model);
- return dt;
- }
- /// <summary>
- /// 复制
- /// </summary>
- /// <param name="model"></param>
- /// <returns></returns>
- public bool CopyExternal(dto_copy_external model)
- {
- var dt = DB_ExterManageService.CopyExternal(model);
- return dt;
- }
- /// <summary>
- /// 查询授权接口
- /// </summary>
- /// <param name="keyword"></param>
- /// <param name="pageSize"></param>
- /// <param name="pageNum"></param>
- /// <returns></returns>
- public string GetAccredit(string keyword, int pageSize, int pageNum, int is_stop)
- {
- int total = 0;
- DataTable dt = DB_ExterManageService.GetAccredit(keyword, pageSize, pageNum, is_stop, out total);
- return dt.ToEasyUIGridJson(total);
- }
- /// <summary>
- /// 保存授权信息
- /// </summary>
- /// <param name="model"></param>
- /// <returns></returns>
- public bool SavaAccredit(ExternalAccredit model)
- {
- return DB_ExterManageService.SavaAccredit(model);
- }
- public string GetAccredView(string id, string channel_id, string project_id, int pageSize, int pageNum, int is_stop)
- {
- int total = 0;
- DataTable dt = DB_ExterManageService.GetAccredView(id, channel_id, project_id, pageSize, pageNum, is_stop, out total);
- return dt.ToEasyUIGridJson(total);
- }
- public string GetRecords(dto_records_in model)
- {
- int total = 0;
- DataTable dt = DB_ExterManageService.GetRecords(model, out total);
- return dt.ToEasyUIGridJson(total); ;
- }
- }
- }
|