Commit 901927ef authored by 吴春's avatar 吴春
parents 476aceba f5a1dfa9
......@@ -245,6 +245,9 @@ namespace Mall.Common.Plugin
HSSFPalette palette = workbook.GetCustomPalette();
int rowIndex = 0;
HSSFFont ffont = (HSSFFont)workbook.CreateFont();
//单元格样式
HSSFCellStyle fCellStyle = (HSSFCellStyle)workbook.CreateCellStyle();
//循环添加行
foreach (var item in list)
{
......@@ -258,8 +261,7 @@ namespace Mall.Common.Plugin
dataRow.Height = 50 * 10;//行高
}
int columnsIndex = 0;
//单元格样式
HSSFCellStyle fCellStyle = (HSSFCellStyle)workbook.CreateCellStyle();
//循环添加列
foreach (var subItem in item.ExcelRows)
{
......
......@@ -7,6 +7,7 @@ using System.Linq;
using Mall.Model.Entity.User;
using Mall.Common.Enum.Goods;
using Mall.Model.Query;
using VT.FW.DB.Dapper;
namespace Mall.Repository.Product
{
......@@ -26,6 +27,7 @@ namespace Mall.Repository.Product
/// <returns></returns>
public List<RB_Goods_Order_Extend> GetOrderPageList(int pageIndex, int pageSize, out long count, RB_Goods_Order_Extend dmodel)
{
var parameters = new DynamicParameters();
string where = $" 1=1 and o.{nameof(RB_Goods_Order.Status)}=0";
if (dmodel.TenantId > 0)
{
......@@ -74,15 +76,18 @@ namespace Mall.Repository.Product
}
if (!string.IsNullOrEmpty(dmodel.OrderNo))
{
where += $@" and o.{nameof(RB_Goods_Order.OrderNo)} like '%{dmodel.OrderNo}%'";
where += $@" and o.{nameof(RB_Goods_Order.OrderNo)} like @OrderNo ";
parameters.Add("OrderNo", "%" + dmodel.OrderNo.Trim() + "%");
}
if (!string.IsNullOrEmpty(dmodel.MerchantsNo))
{
where += $@" and o.{nameof(RB_Goods_Order.MerchantsNo)} like '%{dmodel.MerchantsNo}%'";
where += $@" and o.{nameof(RB_Goods_Order.MerchantsNo)} like @MerchantsNo ";
parameters.Add("MerchantsNo", "%" + dmodel.MerchantsNo.Trim() + "%");
}
if (!string.IsNullOrEmpty(dmodel.UserName))
{
where += $@" and u.{nameof(RB_Member_User.Name)} like '%{dmodel.UserName}%'";
where += $@" and u.{nameof(RB_Member_User.Name)} like @UserName ";
parameters.Add("UserName", "%" + dmodel.UserName.Trim() + "%");
}
if (dmodel.UserId > 0)
{
......@@ -122,7 +127,7 @@ INNER JOIN rb_goods_orderdetail od on o.OrderId=od.OrderId
INNER JOIN rb_member_user u on o.UserId=u.Id
LEFT JOIN rb_smallshops_info as sshop on o.SmallShopsId=sshop.Id
where {where} group by o.OrderId order by o.CreateDate desc";
return GetPage<RB_Goods_Order_Extend>(pageIndex, pageSize, out count, sql).ToList();
return GetPage<RB_Goods_Order_Extend>(pageIndex, pageSize, out count, sql, parameters).ToList();
}
/// <summary>
......@@ -970,10 +975,15 @@ as t GROUP BY t.CreateDate desc";
}
else
{
sql = $@"SELECT t.CreateDate,SUM(t.ReNumber)as GoodsNum ,COUNT(t.ReOrderId)as OrderNum ,SUM(t.Income)as PayMoney,MAX(t.PayMemerNum) as PayMemerNum
from (SELECT DATE_FORMAT(a.CreateDate,'%Y-%m-%d' )as CreateDate,a.ReNumber,a.Refund as Income,c.PayMemerNum,a.ReOrderId from RB_Goods_OrderAfterSale as a
LEFT JOIN (SELECT COUNT(DISTINCT UserId) as PayMemerNum, DATE_FORMAT(CreateDate,'%Y-%m-%d' ) as CreateDate from RB_Goods_OrderAfterSale where {payMemerNumWhere} GROUP BY DATE_FORMAT(CreateDate,'%Y-%m-%d' ))
as c on c.CreateDate=DATE_FORMAT(a.CreateDate,'%Y-%m-%d' ) {where} )
sql = $@"
SELECT t.CreateDate,SUM(t.ReNumber)as GoodsNum ,COUNT(t.ReOrderId)as OrderNum ,SUM(t.Income)as PayMoney,MAX(t.PayMemerNum) as PayMemerNum
from
(
SELECT DATE_FORMAT(a.CreateDate,'%Y-%m-%d' )as CreateDate,a.ReNumber,a.Refund as Income,c.PayMemerNum,a.ReOrderId from RB_Goods_OrderAfterSale as a
LEFT JOIN
(SELECT COUNT(DISTINCT UserId) as PayMemerNum, DATE_FORMAT(CreateDate,'%Y-%m-%d' ) as CreateDate from RB_Goods_OrderAfterSale where 1=1 {payMemerNumWhere} GROUP BY DATE_FORMAT(CreateDate,'%Y-%m-%d' ))
as c on c.CreateDate=DATE_FORMAT(a.CreateDate,'%Y-%m-%d' ) {where}
)
as t GROUP BY t.CreateDate desc";
}
// else if (dmodel.OrderStatus == 4)
......
......@@ -54,8 +54,26 @@ namespace Mall.WebApi.Controllers.MallBase
public ApiResult GetGoodsOrderPageList()
{
var parms = RequestParm;
JObject newParms = JObject.Parse(RequestParm.msg.ToString());
ResultPageModel pagelist = JsonConvert.DeserializeObject<ResultPageModel>(parms.msg.ToString());
RB_Goods_Order_Extend demodel = JsonConvert.DeserializeObject<RB_Goods_Order_Extend>(parms.msg.ToString());
RB_Goods_Order_Extend demodel = new RB_Goods_Order_Extend()
{
UserName = newParms.GetStringValue("UserName"),
OrderSource = (UserSourceEnum)newParms.GetInt("OrderSource"),
OrderType = newParms.GetInt("OrderType"),
DeliveryMethod = (OrderDeliveryMethodEnum)newParms.GetInt("DeliveryMethod"),
OrderId = newParms.GetInt("OrderId"),
StartTime = newParms.GetStringValue("StartTime"),
EndTime = newParms.GetStringValue("EndTime"),
OrderStatus = (OrderStatusEnum)newParms.GetInt("OrderStatus"),
OrderNo = newParms.GetStringValue("OrderNo"),
MerchantsNo = newParms.GetStringValue("MerchantsNo"),
UserId = newParms.GetInt("UserId"),
GoodsName = newParms.GetStringValue("GoodsName"),
Consignee = newParms.GetStringValue("Consignee"),
Recycled = newParms.GetInt("Recycled"),
AnchorName = newParms.GetStringValue("AnchorName"),
};
demodel.TenantId = parms.TenantId;
demodel.MallBaseId = parms.MallBaseId;
......
......@@ -1424,64 +1424,64 @@ namespace Mall.WebApi.Controllers.MallBase
var model = productModule.GetProductGoodsInfo(GoodsId, req.TenantId, req.MallBaseId);
return ApiResult.Success("", new
{
model.Id,
model.Name,
model.CarouselImage,
model.VideoAddress,
model.CustomShareTitles,
model.CustomShareImage,
model.CustomShareImagePath,
model.GoodsStatus,
model.InventoryNum,
model.DefaultSpecificationName,
model.IsCustomSpecification,
model.Sort,
model.SellingPrice,
model.OriginalPrice,
model.Unit,
model.CostPrice,
model.IsGoodsNegotiable,
model.SalesNum,
model.GoodsNumbers,
model.GoodsWeight,
model.IsDefaultService,
model.GoodsService,
model.FreightId,
model.FreightName,
model.FormsId,
model.FormsName,
model.LimitBuyGoodsNum,
model.LimitBuyOrderNum,
model.FullNumPinkage,
model.FullMoneyPinkage,
model.IsAreaBuy,
model.IntegralPresent,
model.IntegralPresentType,
model.PointsDeduction,
model.PointsDeductionType,
model.IsMultipleDeduction,
model.GoodsDetails,
model.SeparateDistribution,
model.SeparateDistributionType,
model.SeparateDistributionMoneyType,
model.EnjoyMember,
model.SeparateSetMember,
model.IsQuickBuy,
model.SupplierId,
model.IsProxy,
model.ProxyType,
model.ProxyRises,
model.ProxyMoney,
model.IsProcurement,
model.Commission,
model.IsLiveGoods,
CategoryList = model.CategoryList.Select(x => new
model?.Id,
model?.Name,
model?.CarouselImage,
model?.VideoAddress,
model?.CustomShareTitles,
model?.CustomShareImage,
model?.CustomShareImagePath,
model?.GoodsStatus,
model?.InventoryNum,
model?.DefaultSpecificationName,
model?.IsCustomSpecification,
model?.Sort,
model?.SellingPrice,
model?.OriginalPrice,
model?.Unit,
model?.CostPrice,
model?.IsGoodsNegotiable,
model?.SalesNum,
model?.GoodsNumbers,
model?.GoodsWeight,
model?.IsDefaultService,
model?.GoodsService,
model?.FreightId,
model?.FreightName,
model?.FormsId,
model?.FormsName,
model?.LimitBuyGoodsNum,
model?.LimitBuyOrderNum,
model?.FullNumPinkage,
model?.FullMoneyPinkage,
model?.IsAreaBuy,
model?.IntegralPresent,
model?.IntegralPresentType,
model?.PointsDeduction,
model?.PointsDeductionType,
model?.IsMultipleDeduction,
model?.GoodsDetails,
model?.SeparateDistribution,
model?.SeparateDistributionType,
model?.SeparateDistributionMoneyType,
model?.EnjoyMember,
model?.SeparateSetMember,
model?.IsQuickBuy,
model?.SupplierId,
model?.IsProxy,
model?.ProxyType,
model?.ProxyRises,
model?.ProxyMoney,
model?.IsProcurement,
model?.Commission,
model?.IsLiveGoods,
CategoryList = model?.CategoryList.Select(x => new
{
x.Id,
x.CategoryId,
x.CategoryName
}),
SpecificationList = model.SpecificationList.Select(x => new
SpecificationList = model?.SpecificationList.Select(x => new
{
x.Id,
x.EnabledImage,
......@@ -1496,7 +1496,7 @@ namespace Mall.WebApi.Controllers.MallBase
y.Sort
})
}),
SpecificationPriceList = model.SpecificationPriceList.Select(x => new
SpecificationPriceList = model?.SpecificationPriceList.Select(x => new
{
x.Id,
x.GoodsNumbers,
......@@ -1508,14 +1508,14 @@ namespace Mall.WebApi.Controllers.MallBase
x.Commission,
x.CostMoney
}),
AreaList = model.AreaList.Select(x => new
AreaList = model?.AreaList.Select(x => new
{
x.Id,
x.AreaId,
x.AreaName,
x.AreaType
}),
DistributionCommissionList = model.DistributionCommissionList.Select(x => new
DistributionCommissionList = model?.DistributionCommissionList.Select(x => new
{
x.Id,
x.DistributorGrade,
......@@ -1524,7 +1524,7 @@ namespace Mall.WebApi.Controllers.MallBase
x.ThreeCommission,
x.TwoCommission
}),
DistributionCommissionTreeList = model.DistributionCommissionTreeList.Select(x => new
DistributionCommissionTreeList = model?.DistributionCommissionTreeList.Select(x => new
{
x.Id,
x.SpecificationSort,
......@@ -1537,14 +1537,14 @@ namespace Mall.WebApi.Controllers.MallBase
y.TwoCommission
})
}),
MemberPriceList = model.MemberPriceList.Select(x => new
MemberPriceList = model?.MemberPriceList.Select(x => new
{
x.Id,
x.MemberGrade,
x.MemberPrice,
x.SpecificationSort
}),
MemberPriceTreeList = model.MemberPriceTreeList.Select(x => new
MemberPriceTreeList = model?.MemberPriceTreeList.Select(x => new
{
x.Id,
x.SpecificationSort,
......@@ -1555,13 +1555,13 @@ namespace Mall.WebApi.Controllers.MallBase
y.MemberPrice
})
}),
model.CarouselImageList,
model.ServiceList,
model.PresentFXGrade,
model.PresentFXMonth,
model.Advertising,
model.SubName,
model.MarketingLogo
model?.CarouselImageList,
model?.ServiceList,
model?.PresentFXGrade,
model?.PresentFXMonth,
model?.Advertising,
model?.SubName,
model?.MarketingLogo
});
}
......
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