Commit 10ed0e9d authored by 吴春's avatar 吴春

提交代码

parent c97527f9
...@@ -6626,6 +6626,20 @@ namespace Mall.Module.Product ...@@ -6626,6 +6626,20 @@ namespace Mall.Module.Product
#endregion #endregion
#region 分销商 #region 分销商
/// <summary>
/// 获取公司列表
/// </summary>
/// <param name="dmodel"></param>
/// <returns></returns>
public List<RB_Member_User_Extend> GetCompanyUserList(RB_Member_User_Extend dmodel)
{
return member_UserRepository.GetCompanyUserList(dmodel);
}
/// <summary> /// <summary>
/// 获取列表 /// 获取列表
/// </summary> /// </summary>
......
...@@ -335,6 +335,10 @@ namespace Mall.Module.User ...@@ -335,6 +335,10 @@ namespace Mall.Module.User
} }
/// <summary> /// <summary>
/// 分页列表 /// 分页列表
/// </summary> /// </summary>
...@@ -2219,11 +2223,14 @@ namespace Mall.Module.User ...@@ -2219,11 +2223,14 @@ namespace Mall.Module.User
} }
}; };
bool flag = distributor_RemitRepository.Update(keyValues, wheres); bool flag = distributor_RemitRepository.Update(keyValues, wheres);
if (flag) { if (flag)
{
var remodel = distributor_RemitRepository.GetEntity<RB_Distributor_Remit_Extend>(remitId); var remodel = distributor_RemitRepository.GetEntity<RB_Distributor_Remit_Extend>(remitId);
if (remodel.WithdrawalWay == DistrbutorWithdrawWayEnum.YETX) { if (remodel.WithdrawalWay == DistrbutorWithdrawWayEnum.YETX)
{
var umodel = member_UserRepository.GetEntity(remodel.UserId); var umodel = member_UserRepository.GetEntity(remodel.UserId);
if (umodel != null) { if (umodel != null)
{
Dictionary<string, object> keyValues1 = new Dictionary<string, object>() { Dictionary<string, object> keyValues1 = new Dictionary<string, object>() {
{ nameof(RB_Member_User.Balance),(umodel.Balance??0)+(remodel.RemitMoney??0)} { nameof(RB_Member_User.Balance),(umodel.Balance??0)+(remodel.RemitMoney??0)}
}; };
...@@ -2235,7 +2242,8 @@ namespace Mall.Module.User ...@@ -2235,7 +2242,8 @@ namespace Mall.Module.User
} }
}; };
bool flag1 = member_UserRepository.Update(keyValues1, wheres1); bool flag1 = member_UserRepository.Update(keyValues1, wheres1);
if (flag1) { if (flag1)
{
//插入余额明细 //插入余额明细
member_BalanceRepository.Insert(new RB_Member_Balance() member_BalanceRepository.Insert(new RB_Member_Balance()
{ {
...@@ -2406,7 +2414,8 @@ namespace Mall.Module.User ...@@ -2406,7 +2414,8 @@ namespace Mall.Module.User
{ {
List<int> reorderIdList = JsonConvert.DeserializeObject<List<int>>(remitModel.ReOrderIds); List<int> reorderIdList = JsonConvert.DeserializeObject<List<int>>(remitModel.ReOrderIds);
List<int> revipIdList = JsonConvert.DeserializeObject<List<int>>(remitModel.ReVipIds); List<int> revipIdList = JsonConvert.DeserializeObject<List<int>>(remitModel.ReVipIds);
if (revipIdList.Any()) { if (revipIdList.Any())
{
var vipbuycList = vipBuy_CommissionRepository.GetList(new RB_VipBuy_Commission_Extend() { TenantId = TenantId, MallBaseId = MallBaseId, VipIds = string.Join(",", revipIdList) }); var vipbuycList = vipBuy_CommissionRepository.GetList(new RB_VipBuy_Commission_Extend() { TenantId = TenantId, MallBaseId = MallBaseId, VipIds = string.Join(",", revipIdList) });
//获取订单列表 //获取订单列表
if (vipbuycList.Where(x => x.ReOrderId > 0).Any()) if (vipbuycList.Where(x => x.ReOrderId > 0).Any())
...@@ -2414,10 +2423,12 @@ namespace Mall.Module.User ...@@ -2414,10 +2423,12 @@ namespace Mall.Module.User
reorderIdList.AddRange(vipbuycList.Where(x => x.ReOrderId > 0).Select(x => x.ReOrderId ?? 0).ToList()); reorderIdList.AddRange(vipbuycList.Where(x => x.ReOrderId > 0).Select(x => x.ReOrderId ?? 0).ToList());
} }
} }
if (reorderIdList.Any()) { if (reorderIdList.Any())
{
reorderIdList = reorderIdList.Distinct().ToList(); reorderIdList = reorderIdList.Distinct().ToList();
var orderDetailList = goods_OrderDetailRepository.GetOrderDetailList(new RB_Goods_OrderDetail_Extend() { TenantId = TenantId, MallBaseId = MallBaseId, OrderIds = string.Join(",", reorderIdList) }); var orderDetailList = goods_OrderDetailRepository.GetOrderDetailList(new RB_Goods_OrderDetail_Extend() { TenantId = TenantId, MallBaseId = MallBaseId, OrderIds = string.Join(",", reorderIdList) });
foreach (var qitem in orderDetailList) { foreach (var qitem in orderDetailList)
{
ECList.Add(new Model.Entity.Finance.RB_ECFinanceId_Relation() ECList.Add(new Model.Entity.Finance.RB_ECFinanceId_Relation()
{ {
ECOrderId = qitem.OrderId, ECOrderId = qitem.OrderId,
...@@ -2537,7 +2548,8 @@ namespace Mall.Module.User ...@@ -2537,7 +2548,8 @@ namespace Mall.Module.User
item.IsPublic = 5;//默认平台虚拟账户 item.IsPublic = 5;//默认平台虚拟账户
#region 查询所有的订单 #region 查询所有的订单
List<Model.Entity.Finance.RB_ECFinanceId_Relation> ECList = new List<Model.Entity.Finance.RB_ECFinanceId_Relation>(); List<Model.Entity.Finance.RB_ECFinanceId_Relation> ECList = new List<Model.Entity.Finance.RB_ECFinanceId_Relation>();
foreach (var qitem in list) { foreach (var qitem in list)
{
ECList.Add(new Model.Entity.Finance.RB_ECFinanceId_Relation() ECList.Add(new Model.Entity.Finance.RB_ECFinanceId_Relation()
{ {
ECOrderId = qitem.OrderId, ECOrderId = qitem.OrderId,
...@@ -3715,7 +3727,8 @@ namespace Mall.Module.User ...@@ -3715,7 +3727,8 @@ namespace Mall.Module.User
vipBuy_CommissionRepository.Update(keyValues2, wheres2, trans); vipBuy_CommissionRepository.Update(keyValues2, wheres2, trans);
string OrderNo = item.OrderNo; string OrderNo = item.OrderNo;
var vipoModel = vipolist.Where(x => x.OrderId == item.ReOrderId).FirstOrDefault(); var vipoModel = vipolist.Where(x => x.OrderId == item.ReOrderId).FirstOrDefault();
if (vipoModel != null) { if (vipoModel != null)
{
OrderNo = vipoModel.OrderNo ?? ""; OrderNo = vipoModel.OrderNo ?? "";
} }
OrderNos += "\"VIP " + OrderNo + "\":" + (item.Commission ?? 0) + "元,"; OrderNos += "\"VIP " + OrderNo + "\":" + (item.Commission ?? 0) + "元,";
...@@ -5566,7 +5579,7 @@ namespace Mall.Module.User ...@@ -5566,7 +5579,7 @@ namespace Mall.Module.User
/// <param name="mallBaseId"></param> /// <param name="mallBaseId"></param>
/// <param name="userId"></param> /// <param name="userId"></param>
/// <returns></returns> /// <returns></returns>
public string GetWeiXinQRCodeForSmallShops(string path, int width, int mallBaseId,int userId) public string GetWeiXinQRCodeForSmallShops(string path, int width, int mallBaseId, int userId)
{ {
var appletWeChatModel = miniProgramRepository.GetEntity(mallBaseId); var appletWeChatModel = miniProgramRepository.GetEntity(mallBaseId);
string token = CacheManager.AppletWeChat.WeiXinReidsCache.Get(appletWeChatModel.MiniAppId); string token = CacheManager.AppletWeChat.WeiXinReidsCache.Get(appletWeChatModel.MiniAppId);
...@@ -6373,17 +6386,13 @@ namespace Mall.Module.User ...@@ -6373,17 +6386,13 @@ namespace Mall.Module.User
//未结算返佣 //未结算返佣
decimal WJSCommission = goods_OrderCommissionRepository.GetUserOrderCommissionNoSettlement(userInfo.UserId); decimal WJSCommission = goods_OrderCommissionRepository.GetUserOrderCommissionNoSettlement(userInfo.UserId);
if (userInfo.SmallShopId == 0)
{
return "微店不存在";
}
var umodel = smallShopsInfoRepository.GetEntity(userInfo.SmallShopId);
//下线数量 //下线数量
int smallShopsNum = 0; int smallShopsNum = 0;
//求其所有下线的数量 //求其所有下线的数量
var UserIds = member_UserRepository.GetSmallShopChildIdStr(umodel.Id); var UserIds = member_UserRepository.GetSmallShopChildIdStr(model.Id);
if (!string.IsNullOrEmpty(UserIds)) if (!string.IsNullOrEmpty(UserIds))
{ {
string[] arr = UserIds.Split(','); string[] arr = UserIds.Split(',');
...@@ -6432,10 +6441,10 @@ namespace Mall.Module.User ...@@ -6432,10 +6441,10 @@ namespace Mall.Module.User
}, },
UserInfo = new UserInfo = new
{ {
UserId = umodel.Id, UserId = model.Id,
UserName = umodel.Name, UserName = model.Name,
umodel.Logo, model.Logo,
umodel.Notice, Notice = string.IsNullOrWhiteSpace(model.Notice) ? "" : model.Notice,
GradeName = "", GradeName = "",
CommissionWithdrawal = model.Commission ?? 0,//可提现佣金 CommissionWithdrawal = model.Commission ?? 0,//可提现佣金
TXCommission = commModel?.TXCommission ?? 0,//已提现佣金 TXCommission = commModel?.TXCommission ?? 0,//已提现佣金
......
...@@ -1362,6 +1362,10 @@ GROUP BY b.Id order by b.Id desc"; ...@@ -1362,6 +1362,10 @@ GROUP BY b.Id order by b.Id desc";
{ {
where += $" and b.GoodsId={dmodel.GoodsID} "; where += $" and b.GoodsId={dmodel.GoodsID} ";
} }
if (dmodel.CompanyId > 0)
{
where += $" and b.CompanyId={dmodel.CompanyId} ";
}
if (!string.IsNullOrWhiteSpace(dmodel.StartDate)) if (!string.IsNullOrWhiteSpace(dmodel.StartDate))
{ {
...@@ -1396,7 +1400,7 @@ LEFT JOIN rb_goods_order as A on a.OrderId=b.OrderId ...@@ -1396,7 +1400,7 @@ LEFT JOIN rb_goods_order as A on a.OrderId=b.OrderId
LEFT JOIN rb_supplier as f on f.ID=b.SupplierId LEFT JOIN rb_supplier as f on f.ID=b.SupplierId
LEFT JOIN rb_member_user as muser on muser.id=b.CompanyId LEFT JOIN rb_member_user as muser on muser.id=b.CompanyId
left join rb_goods_orderaftersale oa on b.ID= oa.OrderDetialId and oa.Type=1 and oa.Status=0 and oa.ReOrderStatus in (2,3,4,5) {where} left join rb_goods_orderaftersale oa on b.ID= oa.OrderDetialId and oa.Type=1 and oa.Status=0 and oa.ReOrderStatus in (2,3,4,5) {where}
GROUP BY b.Id "; GROUP BY b.Id desc ";
return Get<OrderStatistics_Query>(sql).ToList(); return Get<OrderStatistics_Query>(sql).ToList();
} }
......
...@@ -147,6 +147,74 @@ select * from RB_Member_User where {where} order by CreateDate desc ...@@ -147,6 +147,74 @@ select * from RB_Member_User where {where} order by CreateDate desc
return Get<RB_Member_User_Extend>(sql).ToList(); return Get<RB_Member_User_Extend>(sql).ToList();
} }
/// <summary>
/// 获取列表
/// </summary>
/// <param name="dmodel"></param>
/// <returns></returns>
public List<RB_Member_User_Extend> GetCompanyUserList(RB_Member_User_Extend dmodel)
{
string where = " 1=1 and ID<20 ";
if (dmodel.TenantId > 0)
{
where += $@" and {nameof(RB_Member_User.TenantId)}={dmodel.TenantId}";
}
if (dmodel.MallBaseId > 0)
{
where += $@" and {nameof(RB_Member_User.MallBaseId)}={dmodel.MallBaseId}";
}
if (!string.IsNullOrEmpty(dmodel.Name))
{
where += $@" and {nameof(RB_Member_User.Name)} like '%{dmodel.Name}%'";
}
if (!string.IsNullOrEmpty(dmodel.UserNameStr))
{
where += $@" and {nameof(RB_Member_User.Name)} in({dmodel.UserNameStr})";
}
if (!string.IsNullOrEmpty(dmodel.AliasName))
{
where += $@" and {nameof(RB_Member_User.AliasName)} like '%{dmodel.AliasName}%'";
}
if (dmodel.Source > 0)
{
where += $@" and {nameof(RB_Member_User.Source)} ={(int)dmodel.Source}";
}
if (!string.IsNullOrEmpty(dmodel.Moblie))
{
where += $@" and {nameof(RB_Member_User.Moblie)} like '%{dmodel.Moblie}%'";
}
if (dmodel.MemberGrade > 0)
{
where += $@" and {nameof(RB_Member_User.MemberGrade)}={dmodel.MemberGrade}";
}
if (dmodel.SuperiorId > 0)
{
where += $@" and {nameof(RB_Member_User.SuperiorId)}={dmodel.SuperiorId}";
}
if (!string.IsNullOrEmpty(dmodel.UserIds))
{
where += $@" and {nameof(RB_Member_User.Id)} in({dmodel.UserIds})";
}
if (!string.IsNullOrEmpty(dmodel.StartTime))
{
where += $@" and {nameof(RB_Member_User.CreateDate)} >='{dmodel.StartTime}'";
}
if (!string.IsNullOrEmpty(dmodel.EndTime))
{
where += $@" and {nameof(RB_Member_User.CreateDate)} <='{dmodel.EndTime} 23:59:59'";
}
string sql = $@"
select * from RB_Member_User where {where} order by CreateDate desc
";
return Get<RB_Member_User_Extend>(sql).ToList();
}
/// <summary> /// <summary>
/// 获取列表(粉象) /// 获取列表(粉象)
/// </summary> /// </summary>
......
...@@ -34,6 +34,8 @@ namespace Mall.WebApi.Controllers.AppletWeChat ...@@ -34,6 +34,8 @@ namespace Mall.WebApi.Controllers.AppletWeChat
private readonly SupplierModule supplierModule = new SupplierModule(); private readonly SupplierModule supplierModule = new SupplierModule();
private readonly ProductModule productModule = new ProductModule(); private readonly ProductModule productModule = new ProductModule();
#region 直播房间信息 #region 直播房间信息
[HttpPost] [HttpPost]
[AllowAnonymous] [AllowAnonymous]
...@@ -302,7 +304,7 @@ namespace Mall.WebApi.Controllers.AppletWeChat ...@@ -302,7 +304,7 @@ namespace Mall.WebApi.Controllers.AppletWeChat
List<ExcelDataSource> slist = new List<ExcelDataSource>(); List<ExcelDataSource> slist = new List<ExcelDataSource>();
ExcelDataSource header = new ExcelDataSource() ExcelDataSource header = new ExcelDataSource()
{ {
ExcelRows = new List<ExcelColumn>(31) { ExcelRows = new List<ExcelColumn>(32) {
new ExcelColumn(value: "序号") { CellWidth = 15, HAlignmentEnum = HAlignmentEnum.CENTER, VAlignmentEnum = VAlignmentEnum.CENTER }, new ExcelColumn(value: "序号") { CellWidth = 15, HAlignmentEnum = HAlignmentEnum.CENTER, VAlignmentEnum = VAlignmentEnum.CENTER },
new ExcelColumn(value: "订单号") { CellWidth = 15, HAlignmentEnum = HAlignmentEnum.CENTER, VAlignmentEnum = VAlignmentEnum.CENTER }, new ExcelColumn(value: "订单号") { CellWidth = 15, HAlignmentEnum = HAlignmentEnum.CENTER, VAlignmentEnum = VAlignmentEnum.CENTER },
new ExcelColumn(value: "数量") { CellWidth = 15, HAlignmentEnum = HAlignmentEnum.CENTER, VAlignmentEnum = VAlignmentEnum.CENTER }, new ExcelColumn(value: "数量") { CellWidth = 15, HAlignmentEnum = HAlignmentEnum.CENTER, VAlignmentEnum = VAlignmentEnum.CENTER },
...@@ -327,8 +329,10 @@ namespace Mall.WebApi.Controllers.AppletWeChat ...@@ -327,8 +329,10 @@ namespace Mall.WebApi.Controllers.AppletWeChat
new ExcelColumn(value: "应付") { CellWidth = 15, HAlignmentEnum = HAlignmentEnum.CENTER, VAlignmentEnum = VAlignmentEnum.CENTER }, new ExcelColumn(value: "应付") { CellWidth = 15, HAlignmentEnum = HAlignmentEnum.CENTER, VAlignmentEnum = VAlignmentEnum.CENTER },
new ExcelColumn(value: "优惠金额") { CellWidth = 15, HAlignmentEnum = HAlignmentEnum.CENTER, VAlignmentEnum = VAlignmentEnum.CENTER }, new ExcelColumn(value: "优惠金额") { CellWidth = 15, HAlignmentEnum = HAlignmentEnum.CENTER, VAlignmentEnum = VAlignmentEnum.CENTER },
new ExcelColumn(value: "实际退款金额") { CellWidth = 15, HAlignmentEnum = HAlignmentEnum.CENTER, VAlignmentEnum = VAlignmentEnum.CENTER }, new ExcelColumn(value: "实际退款金额") { CellWidth = 15, HAlignmentEnum = HAlignmentEnum.CENTER, VAlignmentEnum = VAlignmentEnum.CENTER },
new ExcelColumn(value: "其他实际收入") { CellWidth = 15, HAlignmentEnum = HAlignmentEnum.CENTER, VAlignmentEnum = VAlignmentEnum.CENTER }, new ExcelColumn(value: "其他应收") { CellWidth = 15, HAlignmentEnum = HAlignmentEnum.CENTER, VAlignmentEnum = VAlignmentEnum.CENTER },
new ExcelColumn(value: "其他实际支出") { CellWidth = 15, HAlignmentEnum = HAlignmentEnum.CENTER, VAlignmentEnum = VAlignmentEnum.CENTER }, new ExcelColumn(value: "其他实收") { CellWidth = 15, HAlignmentEnum = HAlignmentEnum.CENTER, VAlignmentEnum = VAlignmentEnum.CENTER },
new ExcelColumn(value: "其他应付") { CellWidth = 15, HAlignmentEnum = HAlignmentEnum.CENTER, VAlignmentEnum = VAlignmentEnum.CENTER },
new ExcelColumn(value: "其他实付") { CellWidth = 15, HAlignmentEnum = HAlignmentEnum.CENTER, VAlignmentEnum = VAlignmentEnum.CENTER },
new ExcelColumn(value: "毛利") { CellWidth = 15, HAlignmentEnum = HAlignmentEnum.CENTER, VAlignmentEnum = VAlignmentEnum.CENTER }, new ExcelColumn(value: "毛利") { CellWidth = 15, HAlignmentEnum = HAlignmentEnum.CENTER, VAlignmentEnum = VAlignmentEnum.CENTER },
new ExcelColumn(value: "分公司名称") { CellWidth = 15, HAlignmentEnum = HAlignmentEnum.CENTER, VAlignmentEnum = VAlignmentEnum.CENTER }, new ExcelColumn(value: "分公司名称") { CellWidth = 15, HAlignmentEnum = HAlignmentEnum.CENTER, VAlignmentEnum = VAlignmentEnum.CENTER },
new ExcelColumn(value: "分公司结算") { CellWidth = 15, HAlignmentEnum = HAlignmentEnum.CENTER, VAlignmentEnum = VAlignmentEnum.CENTER }, new ExcelColumn(value: "分公司结算") { CellWidth = 15, HAlignmentEnum = HAlignmentEnum.CENTER, VAlignmentEnum = VAlignmentEnum.CENTER },
...@@ -352,7 +356,7 @@ namespace Mall.WebApi.Controllers.AppletWeChat ...@@ -352,7 +356,7 @@ namespace Mall.WebApi.Controllers.AppletWeChat
// item.ALLCommission = item.CostFreight + item.CostMoney + item.PackingMoney + item.GoodsFreight + item.OneCommission + item.TwoCommission + item.OtherPrice; // item.ALLCommission = item.CostFreight + item.CostMoney + item.PackingMoney + item.GoodsFreight + item.OneCommission + item.TwoCommission + item.OtherPrice;
item.ALLCommission = item.CostFreight + item.CostMoney + item.PackingMoney + item.GoodsFreight + item.FXCommission + item.LiveCommission + item.OtherPrice; item.ALLCommission = item.CostFreight + item.CostMoney + item.PackingMoney + item.GoodsFreight + item.FXCommission + item.LiveCommission + item.OtherPrice;
item.NoPaid = item.ALLCommission; item.NoPaid = item.ALLCommission;
item.Paid = item.PaidCostMoney + item.RemitFXCommission + (!string.IsNullOrWhiteSpace(item.LiveFinanceIds) ? item.LiveCommission : 0); item.Paid = item.PaidCostMoney + item.RemitFXCommission + (!string.IsNullOrWhiteSpace(item.LiveFinanceIds) ? item.LiveCommission : 0);
item.GrossProfit = (item.AllPrice + item.RealMoney) - item.CouponMoney - item.RefundActual - item.ALLCommission - item.PayMoney; item.GrossProfit = (item.AllPrice + item.RealMoney) - item.CouponMoney - item.RefundActual - item.ALLCommission - item.PayMoney;
item.GrossProfitRate = (item.AllPrice + item.RealMoney) == 0 ? 0 : Math.Round((item.GrossProfit / (item.AllPrice + item.RealMoney - item.RefundActual)), 2, MidpointRounding.AwayFromZero); item.GrossProfitRate = (item.AllPrice + item.RealMoney) == 0 ? 0 : Math.Round((item.GrossProfit / (item.AllPrice + item.RealMoney - item.RefundActual)), 2, MidpointRounding.AwayFromZero);
//item.GrossProfit = item.AllPrice - item.ALLCommission; //item.GrossProfit = item.AllPrice - item.ALLCommission;
...@@ -414,11 +418,13 @@ namespace Mall.WebApi.Controllers.AppletWeChat ...@@ -414,11 +418,13 @@ namespace Mall.WebApi.Controllers.AppletWeChat
datarow.ExcelRows.Add(new ExcelColumn(value: item.NoPaid.ToString("#0.00")) { }); datarow.ExcelRows.Add(new ExcelColumn(value: item.NoPaid.ToString("#0.00")) { });
datarow.ExcelRows.Add(new ExcelColumn(value: item.CouponMoney.ToString("#0.00")) { }); datarow.ExcelRows.Add(new ExcelColumn(value: item.CouponMoney.ToString("#0.00")) { });
datarow.ExcelRows.Add(new ExcelColumn(value: item.RefundActual.ToString("#0.00")) { }); datarow.ExcelRows.Add(new ExcelColumn(value: item.RefundActual.ToString("#0.00")) { });
datarow.ExcelRows.Add(new ExcelColumn(value: item.YSMoney.ToString("#0.00")) { });
datarow.ExcelRows.Add(new ExcelColumn(value: item.RealMoney.ToString("#0.00")) { }); datarow.ExcelRows.Add(new ExcelColumn(value: item.RealMoney.ToString("#0.00")) { });
datarow.ExcelRows.Add(new ExcelColumn(value: item.YFMoney.ToString("#0.00")) { });
datarow.ExcelRows.Add(new ExcelColumn(value: item.PayMoney.ToString("#0.00")) { }); datarow.ExcelRows.Add(new ExcelColumn(value: item.PayMoney.ToString("#0.00")) { });
datarow.ExcelRows.Add(new ExcelColumn(value: item.GrossProfit.ToString("#0.00")) { }); datarow.ExcelRows.Add(new ExcelColumn(value: item.GrossProfit.ToString("#0.00")) { });
datarow.ExcelRows.Add(new ExcelColumn(value: item.CompanyName) { }); datarow.ExcelRows.Add(new ExcelColumn(value: item.CompanyName) { });
datarow.ExcelRows.Add(new ExcelColumn(value: Math.Round((item.GrossProfit * item.CompanyProfitRate), 2, MidpointRounding.AwayFromZero).ToString("#0.00")) { }); datarow.ExcelRows.Add(new ExcelColumn(value: Math.Round((item.GrossProfit * (item.CompanyProfitRate / 100)), 2, MidpointRounding.AwayFromZero).ToString("#0.00")) { });
datarow.ExcelRows.Add(new ExcelColumn(value: item.GrossProfitRate.ToString("#0.00")) { }); datarow.ExcelRows.Add(new ExcelColumn(value: item.GrossProfitRate.ToString("#0.00")) { });
slist.Add(datarow); slist.Add(datarow);
} }
...@@ -501,7 +507,7 @@ namespace Mall.WebApi.Controllers.AppletWeChat ...@@ -501,7 +507,7 @@ namespace Mall.WebApi.Controllers.AppletWeChat
item.ALLCommission = item.CostFreight + item.CostMoney + item.PackingMoney + item.GoodsFreight + item.FXCommission + item.LiveCommission + item.OtherPrice; item.ALLCommission = item.CostFreight + item.CostMoney + item.PackingMoney + item.GoodsFreight + item.FXCommission + item.LiveCommission + item.OtherPrice;
// item.ALLCommission = item.CostFreight + item.CostMoney + item.PackingMoney + item.GoodsFreight + item.OneCommission + item.TwoCommission + item.OtherPrice; // item.ALLCommission = item.CostFreight + item.CostMoney + item.PackingMoney + item.GoodsFreight + item.OneCommission + item.TwoCommission + item.OtherPrice;
item.NoPaid = item.ALLCommission; item.NoPaid = item.ALLCommission;
item.Paid = item.PaidCostMoney + item.RemitFXCommission + (!string.IsNullOrWhiteSpace(item.LiveFinanceIds) ? item.LiveCommission : 0); item.Paid = item.PaidCostMoney + item.RemitFXCommission + (!string.IsNullOrWhiteSpace(item.LiveFinanceIds) ? item.LiveCommission : 0);
item.GrossProfit = (item.AllPrice + item.RealMoney) - item.CouponMoney - item.RefundActual - item.ALLCommission - item.PayMoney; item.GrossProfit = (item.AllPrice + item.RealMoney) - item.CouponMoney - item.RefundActual - item.ALLCommission - item.PayMoney;
item.GrossProfitRate = (item.AllPrice + item.RealMoney) == 0 ? 0 : Math.Round((item.GrossProfit / (item.AllPrice + item.RealMoney - item.RefundActual)), 2, MidpointRounding.AwayFromZero); item.GrossProfitRate = (item.AllPrice + item.RealMoney) == 0 ? 0 : Math.Round((item.GrossProfit / (item.AllPrice + item.RealMoney - item.RefundActual)), 2, MidpointRounding.AwayFromZero);
//item.GrossProfit = item.AllPrice - item.ALLCommission; //item.GrossProfit = item.AllPrice - item.ALLCommission;
...@@ -535,7 +541,7 @@ namespace Mall.WebApi.Controllers.AppletWeChat ...@@ -535,7 +541,7 @@ namespace Mall.WebApi.Controllers.AppletWeChat
TotalRealMoney = list.Sum(x => x.RealMoney),//其他实收 TotalRealMoney = list.Sum(x => x.RealMoney),//其他实收
TotalPayMoney = list.Sum(x => x.PayMoney),//其他实付 TotalPayMoney = list.Sum(x => x.PayMoney),//其他实付
TotalCouponMoney = list.Sum(x => x.CouponMoney),//优惠金额 TotalCouponMoney = list.Sum(x => x.CouponMoney),//优惠金额
TotalCompanyProfit = list.Sum(x => Math.Round((x.GrossProfit * x.CompanyProfitRate), 2, MidpointRounding.AwayFromZero)),//公司结算金额 TotalCompanyProfit = list.Sum(x => Math.Round((x.GrossProfit * (x.CompanyProfitRate / 100)), 2, MidpointRounding.AwayFromZero)),//公司结算金额
}; };
...@@ -563,6 +569,29 @@ namespace Mall.WebApi.Controllers.AppletWeChat ...@@ -563,6 +569,29 @@ namespace Mall.WebApi.Controllers.AppletWeChat
/// <summary>
/// 获取用户下拉列表
/// </summary>
/// <returns></returns>
[HttpPost]
public ApiResult GetCompanyUserList(object requestMsg)
{
var requestParm = JsonConvert.DeserializeObject<RequestParm>(requestMsg.ToString());
RB_Member_User_Extend demodel = JsonConvert.DeserializeObject<RB_Member_User_Extend>(requestParm.msg.ToString());
demodel.TenantId = requestParm.TenantId;
demodel.MallBaseId = requestParm.MallBaseId;
var list = productModule.GetCompanyUserList(demodel);
var result = list.Select(x => new
{
x.Id,
x.Name,
x.Moblie,
x.Photo
});
return ApiResult.Success("", result);
}
#endregion #endregion
} }
......
...@@ -2144,6 +2144,8 @@ namespace Mall.WebApi.Controllers.User ...@@ -2144,6 +2144,8 @@ namespace Mall.WebApi.Controllers.User
}); });
return ApiResult.Success("", result); return ApiResult.Success("", result);
} }
/// <summary> /// <summary>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment