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