You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
DS7/DSWeb/Areas/Dispatch/Helper/WxAppHelper.cs

125 lines
4.9 KiB
C#

3 years ago
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace DSWeb.Areas.Dispatch.Helper
{
public class WxAppHelper
{
}
public class QueryInfoHelper
{
private static Dictionary<string, string> dicMapping;
static QueryInfoHelper()
{
dicMapping = new Dictionary<string, string>();
dicMapping.Add("0", "标准版");
dicMapping.Add("1", "总账模块");
dicMapping.Add("2", "提单管理模块");
dicMapping.Add("3", "凭证接口");
dicMapping.Add("4", "销售订舱");
dicMapping.Add("5", "运价管理");
dicMapping.Add("6", "陆运管理");
dicMapping.Add("7", "集装箱管理");
dicMapping.Add("8", "进口贸易");
dicMapping.Add("9", "仓储管理");
dicMapping.Add("10", "OA");
dicMapping.Add("11", "CRM");
}
//public static QueryInfoModel GetUserInfo(string custName)
//{
// WSData wsData = new WSData();
// var infoModel = new QueryInfoModel();
// if (!string.IsNullOrEmpty(custName))
// {
// var infoClient = wsData.InfoClients.AsNoTracking().FirstOrDefault(i => i.SHORTNAME == custName);
// if (infoClient != null)
// {
// infoModel.SALE = infoClient.SALE;//销售
// infoModel.DOC = infoClient.DOC;//客服
// infoModel.OP = infoClient.OP;//客服经理
// infoModel.STLNAME = infoClient.STLNAME;//结费方式
// infoModel.STLMIDDLEDATE = infoClient.STLMIDDLEDATE; //维护截止日期
// var query = from u in wsData.SysUsers.AsNoTracking()
// join ub in wsData.UserBases.AsNoTracking() on u.GID equals ub.USERID
// where u.SHOWNAME == infoModel.SALE || u.SHOWNAME == infoModel.DOC || u.SHOWNAME == infoModel.OP
// select new
// {
// u.SHOWNAME,
// ub.MOBILE,
// ub.OFFICEPHONE
// };
// var userList = query.ToList();
// var userSale = userList.FirstOrDefault(u => u.SHOWNAME == infoModel.SALE);
// if (userSale != null)
// {
// infoModel.SALE_TEL = userSale.OFFICEPHONE;
// }
// var userDoc = userList.FirstOrDefault(u => u.SHOWNAME == infoModel.DOC);
// if (userDoc != null)
// {
// infoModel.DOC_TEL = userDoc.OFFICEPHONE;
// }
// var userOP = userList.FirstOrDefault(u => u.SHOWNAME == infoModel.OP);
// if (userOP != null)
// {
// infoModel.OP_TEL = userOP.OFFICEPHONE;
// }
// var list = wsData.SysSecCompany.AsNoTracking().ToList();
// foreach (var item in list)
// {
// string str = CommonHelper.string_Decrypt(item.CompanySecretKey, "Dw9pVb9r");
// var obj = JsonConvert.DeserializeAnonymousType(str, new
// {
// Id = "",
// Name = "",
// Times = 0,
// Enabled = false,
// MenuControl = false,
// ModHistory = ""
// });
// if (obj.Name == custName)
// {
// infoModel.HasAuth = false;
// infoModel.Times = obj.Times;
// if (!string.IsNullOrEmpty(obj.ModHistory))
// {
// string[] arr = obj.ModHistory.Split(",".ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
// foreach (var ss in arr)
// {
// if (dicMapping.ContainsKey(ss))
// {
// infoModel.AuthInfo += dicMapping[ss] + ",";
// }
// }
// }
// else
// {
// infoModel.AuthInfo = string.Empty;
// }
// break;
// }
// }
// }
// }
// return infoModel;
//}
}
}