Commit 5d2511a8 authored by 吴春's avatar 吴春

提交代码

parent 3c096e6d
......@@ -105,6 +105,21 @@ namespace Mall.Model.Entity.Property
public string NewSpecificationSort { get; set; }
/// <summary>
/// 商品id
/// </summary>
public int NewGoodsId
{
get;
set;
}
/// <summary>
/// 出库商品名称
/// </summary>
public string NewGoodsName { get; set; }
/// <summary>
/// 规格(出库的规格名称)
/// </summary>
......
......@@ -1533,7 +1533,8 @@ namespace Mall.WebApi.Controllers.MallBase
model.CarouselImageList,
model.ServiceList,
model.PresentFXGrade,
model.PresentFXMonth
model.PresentFXMonth,
model.Advertising
});
}
......@@ -2053,7 +2054,7 @@ namespace Mall.WebApi.Controllers.MallBase
}
else if (Type == 12)
{
if (SupplierId == 0 && req.TenantId==1 && req.MallBaseId == 1)
if (SupplierId == 0 && req.TenantId == 1 && req.MallBaseId == 1)
{
return ApiResult.ParamIsNull("请选择供应商");
}
......@@ -2278,13 +2279,15 @@ namespace Mall.WebApi.Controllers.MallBase
/// </summary>
/// <returns></returns>
[HttpPost]
public ApiResult SyncGoodsSpecificationCommission() {
public ApiResult SyncGoodsSpecificationCommission()
{
var req = RequestParm;
JObject parms = JObject.Parse(req.msg.ToString());
int TenantId = parms.GetInt("TenantId", 0);
int MallBaseId = parms.GetInt("MallBaseId", 0);
if (TenantId <= 0 || MallBaseId <= 0) {
if (TenantId <= 0 || MallBaseId <= 0)
{
return ApiResult.Failed();
}
......@@ -2293,7 +2296,8 @@ namespace Mall.WebApi.Controllers.MallBase
{
return ApiResult.Success();
}
else {
else
{
return ApiResult.Failed();
}
}
......
......@@ -158,9 +158,11 @@ namespace Mall.WebApi.Controllers.Property
if (item.NewSpecificationSort != item.SpecificationSort)//修改了规格的判断新规格是否在物料中存在
{
var materialModel = materialList.Where(x => x.GoodsId == orderGoodsDetailModel.GoodsId && x.SpecificationKey == item.NewSpecificationSort).FirstOrDefault();
var orderGoodsDetail = orderGoodsList.Where(x => x.Id == item.OrderGoodsId).FirstOrDefault();
if (materialModel == null)
{
return ApiResult.Failed("订单号:" + item.OrderNo + "的商品:" + item.GoodsName + "不存在物料请先同步");
return ApiResult.Failed("订单号:" + orderGoodsDetail?.OrderNo + "的商品:" + orderGoodsDetail?.GoodsName + "不存在物料请先同步");
}
item.NewSpecificationSort = materialModel.SpecificationKey;
item.NewSpecification = materialModel.SpecificationName;
......
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