/// <summary> /// 获取所有部门集合 /// </summary> /// <returns></returns> public static IEnumerable <BranchInfo> GetAllBranch() { using (var client = ClientProxy.CreateMISWcfClient()) { return(client.Instance.GetAllFilialeBranch().OrderBy(w => w.OrderIndex).ToList()); } }
/// <summary> /// 读取公司信息 /// </summary> /// <returns></returns> private static IEnumerable <FilialeInfo> GetAllMisFiliales() { using (var client = ClientProxy.CreateMISWcfClient()) { var items = client.Instance.GetAllFiliale(); if (items != null && items.Any()) { foreach (var item in items.OrderBy(w => w.OrderIndex)) { if (item.IsActive) { yield return(new FilialeInfo { ID = item.ID, Address = item.Address, Code = item.Code, Description = item.Description, Name = item.Name, RealName = item.RealName, ParentId = item.ParentId, Rank = item.Rank, ShopJoinType = item.ShopJoinType, TaxNumber = item.TaxNumber, RegisterAddress = item.RegisterAddress, IsActive = item.IsActive, FilialeTypes = item.FilialeTypes, GoodsTypes = item.GoodsTypes, IsSaleFiliale = item.IsSaleFiliale }); } } } } }
/// <summary> /// 获取同类型框架 /// </summary> /// <param name="saleFilialeId"> </param> /// <param name="goodsID"></param> /// <param name="shopId"> </param> /// <returns></returns> public static IList <GoodsSaleBaseModel> GetSameClassGoodsList(Guid saleFilialeId, Guid goodsID, Guid shopId) { using (var client = ClientProxy.CreateShopStoreWcfClient(saleFilialeId)) { return(client.Instance.GetSameClassGoodsList(goodsID, shopId)); } }
/// <summary> /// 操作充值记录 /// </summary> /// <param name="saleFilialeId"></param> /// <param name="rechargeId"></param> /// <param name="rechargeState"></param> /// <param name="description"></param> /// <returns></returns> public static ReturnBase ConfirmRechargeState(Guid saleFilialeId, Guid rechargeId, int rechargeState, string description) { using (var client = ClientProxy.CreateShopStoreWcfClient(saleFilialeId)) { return(client.Instance.ConfirmRechargeState(rechargeId, rechargeState, description)); } }
/// <summary> /// 获取所有职位 /// </summary> /// <returns></returns> public static IEnumerable <SystemPositionInfo> GetAllSystemPositionList() { using (var client = ClientProxy.CreateMISWcfClient()) { return(client.Instance.GetSystemBranchPosition().OrderBy(w => w.OrderIndex).ToList()); } }
public IList <PersonnelInfo> GetAccountInfoByRealName(string realName) { using (var client = ClientProxy.CreateMISWcfClient()) { var info = client.Instance.GetAccountInfoByRealName(realName); List <PersonnelInfo> personnel = new List <PersonnelInfo>(); foreach (var loginAccountInfo in info) { personnel.Add(new PersonnelInfo { PersonnelId = loginAccountInfo.PersonnelId, RealName = loginAccountInfo.RealName, AccountNo = loginAccountInfo.AccountNo, EnterpriseNo = loginAccountInfo.AccountNo, IsActive = loginAccountInfo.IsActive, SystemBrandPositionId = loginAccountInfo.SystemBranchPositionID, FilialeId = loginAccountInfo.PositionInfo != null ? loginAccountInfo.PositionInfo.FilialeId : Guid.Empty, BranchId = loginAccountInfo.PositionInfo != null ? loginAccountInfo.PositionInfo.BranchId : Guid.Empty, PositionId = loginAccountInfo.PositionInfo != null ? loginAccountInfo.PositionInfo.ID : Guid.Empty, CurrentFilialeId = Guid.Empty }); } return(personnel); } }
/// <summary> 设置订单支付状态 /// </summary> /// <param name="saleFilialeId"></param> /// <param name="orderId"></param> /// <param name="payState"></param> public static void SetOrderPayState(Guid saleFilialeId, Guid orderId, PayState payState) { using (var client = ClientProxy.CreateB2CWcfClient(saleFilialeId)) { client.Instance.SetOrderPayState(Guid.NewGuid(), orderId, (Int32)payState); } }
/// <summary>更新B2C银行帐号为主账号 /// </summary> /// <param name="saleFilialeId">销售公司ID</param> /// <param name="bankAccountsId">银行ID</param> /// <param name="IsMain">是否主账号</param> /// <returns></returns> public static Boolean SetBankAccountsIsMain(Guid saleFilialeId, Guid bankAccountsId, Boolean IsMain) { using (var client = ClientProxy.CreateB2CWcfClient(saleFilialeId)) { return(client.Instance.UpdateIsMain(bankAccountsId, IsMain)); } }
/// <summary> /// /// </summary> /// <param name="filialeiId"></param> /// <param name="systemBranchId"></param> /// <returns></returns> public static IList <LoginAccountInfo> GetLoginAccountListBySystemBranchId(Guid filialeiId, Guid systemBranchId) { using (var client = ClientProxy.CreateMISWcfClient()) { return(client.Instance.GetLoginAccountListBySystemBranchId(filialeiId, systemBranchId)); } }
public static List <DemandOrderInfo> GetGoodsOrdersByRealGoodsId(Guid saleFilialeId, Guid realGoodsId, Guid warehouseId) { using (var client = ClientProxy.CreateB2CWcfClient(saleFilialeId)) { var result = client.Instance.GetGoodsOrdersByRealGoodsId(realGoodsId); return(result != null && result.IsSuccess && result.Data != null ? result.Data.Where(act => act.DeliverWarehouseId == warehouseId).Select(act => new DemandOrderInfo { OrderId = act.OrderId, Phone = act.Phone, RealTotalPrice = act.RealTotalPrice, Mobile = act.Mobile, OrderNo = act.OrderNo, Consignee = act.Consignee, Direction = act.Direction, ExpressNo = act.ExpressNo, PayMode = act.PayMode, TotalPrice = act.TotalPrice, Carriage = act.Carriage, OrderState = act.OrderState, Memo = act.Memo, SaleFilialeId = act.SaleFilialeId, DeliverWarehouseId = act.DeliverWarehouseId }).ToList() : new List <DemandOrderInfo>()); } }
public static LoginAccountInfo GetAccountInfoByPersonnelId(Guid personnelId) { using (var client = ClientProxy.CreateMISWcfClient()) { return(client.Instance.GetAccountInfoByPersonnelId(personnelId)); } }
public static IList <MenuInfo> GetMenuList(Guid systemId) { using (var client = ClientProxy.CreateMISWcfClient()) { return(client.Instance.GetMenuList(systemId).OrderBy(w => w.OrderIndex).ToList()); } }
public static Dictionary <Guid, int> GetAllRequireQuantity(Guid saleFilialeId, List <Guid> realGoodsIds, Guid warehouseId) { using (var client = ClientProxy.CreateB2CWcfClient(saleFilialeId)) { return(client.Instance.GetRequireAllQuantity(realGoodsIds, warehouseId)); } }
/// <summary> /// 获取一条充值记录 /// </summary> /// <param name="rechargeId"></param> /// <param name="saleFilialeId"></param> /// <returns></returns> public static ReturnInfo <RechargeDTO> SelectRechargeById(Guid rechargeId, Guid saleFilialeId) { using (var client = ClientProxy.CreateShopStoreWcfClient(saleFilialeId)) { return(client.Instance.SelectRechargeById(rechargeId)); } }
/// <summary>改变发票状态 /// </summary> /// <param name="saleFilialeId"></param> /// <param name="invoiceId"></param> /// <param name="invoiceState"></param> /// <param name="flag">true 更新订单表的发票状态和发票表的发票状态,false 只更新发票表的发票状态</param> /// <param name="clew"></param> public static void SetInvoiceState(Guid saleFilialeId, Guid invoiceId, InvoiceState invoiceState, Boolean flag, String clew) { using (var client = ClientProxy.CreateB2CWcfClient(saleFilialeId)) { client.Instance.SetInvoiceState(Guid.NewGuid(), invoiceId, (Int32)invoiceState, flag, clew); } }
/// <summary>获取发票信息 /// </summary> /// <param name="saleFilialeId"></param> /// <param name="orderId">订单ID</param> /// <returns></returns> public static B2C.Model.ERPExtensionModel.InvoiceInfo GetInvoiceInfo(Guid saleFilialeId, Guid orderId) { using (var client = ClientProxy.CreateB2CWcfClient(saleFilialeId)) { return(client.Instance.GetInvoiceInfo(orderId)); } }
public static bool VerifyIsAllowVisitPage(Guid personnelId, Guid systemId, string pageUrl) { using (var client = ClientProxy.CreateMISWcfClient()) { return(client.Instance.VerifyPageIsVisitPermission(personnelId, systemId, pageUrl)); } }
public static void GoodsOrderUpdateAffirm(Guid saleFilialeId, GoodsOrderInfo goodsOrderInfo) { using (var client = ClientProxy.CreateB2CWcfClient(saleFilialeId)) { client.Instance.GoodsOrderUpdateAffirm(Guid.NewGuid(), ConvertToB2CModel(goodsOrderInfo)); } }
/// <summary> /// 查询充值记录 /// </summary> /// <param name="saleFilialeId"></param> /// <param name="rechargeState"></param> /// <param name="startTime"></param> /// <param name="endTime"></param> /// <param name="pageSize"></param> /// <param name="pageIndex"></param> /// <returns></returns> public static ReturnList <RechargeDTO> SelectRechargeList(Guid saleFilialeId, int?rechargeState, DateTime?startTime, DateTime?endTime, int pageSize, int pageIndex) { using (var client = ClientProxy.CreateShopStoreWcfClient(saleFilialeId)) { return(client.Instance.SelectRechargeList(saleFilialeId, rechargeState, startTime, endTime, pageIndex, pageSize)); } }
/// <summary> /// 插入付款记录 /// </summary> /// <param name="saleFilialeId"></param> /// <param name="costRecordDto"></param> /// <returns></returns> /// zal 2015-09-22 public static bool InsertCostRecord(Guid saleFilialeId, CostRecordDTO costRecordDto) { using (var client = ClientProxy.CreateShopStoreWcfClient(saleFilialeId)) { var result = client.Instance.InsertCostRecord(costRecordDto); return(result != null && result.IsSuccess); } }
public PersonnelInfo Get(Guid personnelId) { using (var client = ClientProxy.CreateMISWcfClient()) { var info = client.Instance.GetAccountInfoByPersonnelId(personnelId); return(new PersonnelInfo(info)); } }
public static bool VerifyIsAllowPageOperation(Guid personnelId, Guid systemId, string pageUrl, string pointCode) { using (var client = ClientProxy.CreateMISWcfClient()) { //return true; return(client.Instance.VerifyPageOperationIsVisitPermission(personnelId, systemId, pageUrl, pointCode)); } }
/// <summary> /// 获取往来资金账号 /// </summary> /// <param name="entityShopId"></param> public static IList <BankAccountDTO> GetBankAccountsByEntityShop(Guid entityShopId) { using (var client = ClientProxy.CreateShopStoreWcfClient(entityShopId)) { var result = client.Instance.SelectBankAccountByPage(entityShopId, 1, 20); return(result != null && result.IsSuccess ? result.Data : new List <BankAccountDTO>()); } }
/// <summary> 门店资金流审核 /// </summary> /// <param name="saleFilialeId"></param> /// <param name="rechargeDto"></param> /// <returns></returns> public static bool AuditingSettlement(Guid saleFilialeId, RechargeDTO rechargeDto) { using (var client = ClientProxy.CreateShopStoreWcfClient(saleFilialeId)) { var result = client.Instance.AuditingSettlement(rechargeDto); return(result != null && result.IsSuccess); } }
public PersonnelInfo Get(string accountNo) { using (var client = ClientProxy.CreateMISWcfClient()) { var info = client.Instance.GetAccountInfo(accountNo); return(new PersonnelInfo(info)); } }
/// <summary> /// 查找充值记录-总公司 /// modify by liangcanren at 2015-04-14 添加按照店铺类型进行搜索 /// </summary> /// <param name="saleFilialeId"></param> /// <param name="shopId"> </param> /// <param name="rechargeState"></param> /// <param name="joinType"></param> /// <param name="startTime"></param> /// <param name="endTime"></param> /// <param name="pageSize"></param> /// <param name="pageIndex"></param> /// <returns></returns> public static ReturnPage <RechargeDTO> SelectRechargeListByParentId(Guid saleFilialeId, Guid?shopId, int rechargeState, int joinType, DateTime?startTime, DateTime?endTime, int?pageSize, int?pageIndex) { using (var client = ClientProxy.CreateShopStoreWcfClient(saleFilialeId)) { return(client.Instance.SelectRechargeListByParentId(shopId, rechargeState, joinType, startTime, endTime, pageIndex, pageSize)); } }
/// <summary>是不是换货订单(完成订单时不插入销量) /// </summary> /// <param name="saleFilialeId"></param> /// <param name="orderId"></param> /// <returns></returns> public static bool IsRefundOrder(Guid saleFilialeId, Guid orderId) { //TODO:换货单不插入销量 using (var client = ClientProxy.CreateB2CWcfClient(saleFilialeId)) { return(client.Instance.IsRefundOrder(orderId)); } }
public static bool IsExistGoodsStock(Guid filialeId, Guid compGoodsId, IList <Guid> realGoodsIds) { using (var client = ClientProxy.CreateShopStoreWcfClient(filialeId)) { var result = client.Instance.IsExistGoodsNonceStockService(compGoodsId, realGoodsIds); return(result != null && result.IsSuccess); } }
/// <summary>删除银行账户信息 /// </summary> public static void BankAccountsDelete(Guid targetId, Guid bankAccountId) { var filialeId = GetFilialeIdBySalePlatform(targetId); using (var client = ClientProxy.CreateB2CWcfClient(filialeId)) { client.Instance.BankAccountsDelete(Guid.NewGuid(), bankAccountId); } }
/// <summary>可以从数据库中取出订单 /// </summary> /// <param name="saleFilialeId"></param> /// <param name="orderId"></param> /// <returns></returns> public static GoodsOrderInfo GetGoodsOrderInfo(Guid saleFilialeId, Guid orderId) { using (var client = ClientProxy.CreateB2CWcfClient(saleFilialeId)) { var goodsOrderInfoB2C = client.Instance.GetGoodsOrderInfo(orderId); goodsOrderInfoB2C = goodsOrderInfoB2C ?? new B2C.Model.ERPExtensionModel.GoodsOrderInfo(); return(ConvertToERPModel(goodsOrderInfoB2C)); } }