Commit b4297c07 authored by 吴春's avatar 吴春

提交代码

parent ebb8c016
......@@ -3085,8 +3085,7 @@ namespace Mall.WebApi.Controllers.MallBase
EndTime = parameters.GetStringValue("EndTime"),
OrderBy = parameters.GetInt("OrderBy"),
Isynchro = parameters.GetInt("Isynchro", 0),
SupplierId = parameters.GetInt("SupplierId", 0),
TenantId = parameters.GetInt("SupplierId", 0)
};
demodel.SourceMallBaseId = parms.MallBaseId;
......@@ -3117,7 +3116,11 @@ namespace Mall.WebApi.Controllers.MallBase
x.Name,
x.Sort,
x.CoverImage,
CategoryList = x.CategoryList.Select(y => new { y.Id, y.CategoryName }),
CategoryList = x.CategoryList.Select(y => new
{
y.Id,
y.CategoryName
}),
x.SellingPrice,
x.InventoryNum,
x.SalesNum,
......@@ -3154,7 +3157,7 @@ namespace Mall.WebApi.Controllers.MallBase
JObject parms = JObject.Parse(RequestParm.msg.ToString());
var CategoryList = JsonHelper.DeserializeObject<List<RB_Goods_Category_Extend>>(parms.GetStringValue("CategoryList"));//商品分类
string GoodsIds = parms.GetStringValue("GoodsIds");//商品ids
//根据商品id获取商品信息
//根据商品id获取商品信息
var goodsList = productModule.GetGoodsList(new RB_Goods_Extend { GoodsIds = GoodsIds });
if (goodsList.Any(x => x.SourceGoodsId > 0 && x.TenantId == RequestParm.TenantId && x.MallBaseId == RequestParm.MallBaseId))
{
......
......@@ -39,7 +39,8 @@ namespace Mall.WebApi.Controllers.User
/// </summary>
private readonly FinanceModule financeModule = AOPHelper.CreateAOPObject<FinanceModule>();
private readonly TenantModule tenantModule = AOPHelper.CreateAOPObject<TenantModule>();
#region 供应商管理
[HttpPost]
......@@ -205,12 +206,25 @@ namespace Mall.WebApi.Controllers.User
public ApiResult GetAllSupplierList()
{
var parms = RequestParm;
var query = JsonConvert.DeserializeObject<RB_Supplier_Extend>(RequestParm.msg.ToString());
// query.TenantId = UserInfo.TenantId;
// query.MallBaseId = parms.MallBaseId;
var oldLogisticsList = supplierModule.GetList(query);
oldLogisticsList.ForEach(x => x.Name = "【"+x.TenantName + "】" + x.Name);
return ApiResult.Success("", oldLogisticsList);
var query = JsonConvert.DeserializeObject<RB_Tenant_Extend>(RequestParm.msg.ToString());
// query.TenantId = UserInfo.TenantId;
// query.MallBaseId = parms.MallBaseId;
var oldLogisticsList = tenantModule.GetTenantListModule(query);
var tenantList = oldLogisticsList.GroupBy(x => x.TenantId);
List<object> result = new List<object>();
foreach (var item in oldLogisticsList.Where(x=>x.AccountStatus==2))
{
var now = new
{
ID = item.TenantId,
Name = item.Name
};
result.Add(now);
}
// oldLogisticsList.ForEach(x => x.Name = x.TenantName);
return ApiResult.Success("", result);
}
/// <summary>
......@@ -330,7 +344,7 @@ namespace Mall.WebApi.Controllers.User
{
FinanceType = 1,
Final_Price = orderGoodsItem.Final_Price,
Number =1,
Number = 1,
FreightMoney = orderGoodsItem.FreightMoney,
GoodsName = orderGoodsItem.GoodsName,
OrderNo = orderGoodsItem.OrderNo,
......@@ -342,7 +356,8 @@ namespace Mall.WebApi.Controllers.User
OrderDetailPaid += (orderGoodsItem.CostMoney ?? 0);
result.Add(newOrderGoods);
}
else {
else
{
var newOrderGoods = new RB_Goods_OrderDetail_Extend
{
FinanceType = 1,
......@@ -360,7 +375,7 @@ namespace Mall.WebApi.Controllers.User
result.Add(newOrderGoods);
}
}
}
if (demodel.IsSelectAll == 0 || demodel.IsSelectAll == 2)
......@@ -423,7 +438,7 @@ namespace Mall.WebApi.Controllers.User
Name = orderGoodsItem.GoodsName,
OrderId = orderGoodsItem.OrderId ?? 0,
OrderDetailId = orderGoodsItem.Id,
GoodsPrice =(orderGoodsItem.OrderClassify==1&& orderGoodsItem.CarType!=Common.Enum.Goods.GuideCarGoodsTypeEnum.Line)? (orderGoodsItem.CostMoney ?? 0): ((orderGoodsItem.CostMoney ?? 0) * (orderGoodsItem.Number ?? 0)),
GoodsPrice = (orderGoodsItem.OrderClassify == 1 && orderGoodsItem.CarType != Common.Enum.Goods.GuideCarGoodsTypeEnum.Line) ? (orderGoodsItem.CostMoney ?? 0) : ((orderGoodsItem.CostMoney ?? 0) * (orderGoodsItem.Number ?? 0)),
FreightMoney = orderGoodsItem.FreightCostMoney,
Unit_Price = orderGoodsItem.CostMoney,
Number = orderGoodsItem.Number,
......
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