Commit ba692afa authored by 吴春's avatar 吴春

提交代码

parent 079d208e
...@@ -473,7 +473,7 @@ namespace Property.WebApi.Controllers.Mall ...@@ -473,7 +473,7 @@ namespace Property.WebApi.Controllers.Mall
#region 组装财务单据需要的数据 #region 组装财务单据需要的数据
List<RB_WarehouseOut_Goods_Extend> financeList = new List<RB_WarehouseOut_Goods_Extend>(); List<RB_WarehouseOut_Goods_Extend> financeList = new List<RB_WarehouseOut_Goods_Extend>();
foreach (var item in applyModel.WarehouseOutGoodsDetailList.GroupBy(x => new { x.OrderGoodsId, x.CostMoney })) foreach (var item in applyModel.WarehouseOutGoodsDetailList.GroupBy(x => new { x.OrderGoodsId, x.CostMoney,x.GoodsId,x.SpecificationSort }))
{ {
RB_WarehouseOut_Goods_Extend warehouseOutModel = new RB_WarehouseOut_Goods_Extend RB_WarehouseOut_Goods_Extend warehouseOutModel = new RB_WarehouseOut_Goods_Extend
{ {
...@@ -485,14 +485,14 @@ namespace Property.WebApi.Controllers.Mall ...@@ -485,14 +485,14 @@ namespace Property.WebApi.Controllers.Mall
Status = 0, Status = 0,
IsOut = 1, IsOut = 1,
OrderGoodsId = item.Key.OrderGoodsId, OrderGoodsId = item.Key.OrderGoodsId,
OrderNo = oldModel.WarehouseOutGoodsList.Where(x => x.OrderGoodsId == item.Key.OrderGoodsId).FirstOrDefault()?.OrderNo ?? "", OrderNo = oldModel.WarehouseOutGoodsList.Where(x => x.OrderGoodsId == item.Key.OrderGoodsId && x.NewSpecificationSort == item.Key.SpecificationSort && x.NewGoodsId == item.Key.GoodsId).FirstOrDefault()?.OrderNo ?? "",
GoodsName = oldModel.WarehouseOutGoodsList.Where(x => x.OrderGoodsId == item.Key.OrderGoodsId).FirstOrDefault()?.GoodsName, GoodsName = oldModel.WarehouseOutGoodsList.Where(x => x.OrderGoodsId == item.Key.OrderGoodsId&&x.NewSpecificationSort== item.Key.SpecificationSort && x.NewGoodsId == item.Key.GoodsId).FirstOrDefault()?.GoodsName,
Specification = oldModel.WarehouseOutGoodsList.Where(x => x.OrderGoodsId == item.Key.OrderGoodsId).FirstOrDefault()?.Specification, Specification = oldModel.WarehouseOutGoodsList.Where(x => x.OrderGoodsId == item.Key.OrderGoodsId && x.NewSpecificationSort == item.Key.SpecificationSort && x.NewGoodsId == item.Key.GoodsId).FirstOrDefault()?.Specification,
SpecificationSort = oldModel.WarehouseOutGoodsList.Where(x => x.OrderGoodsId == item.Key.OrderGoodsId).FirstOrDefault()?.SpecificationSort, SpecificationSort = oldModel.WarehouseOutGoodsList.Where(x => x.OrderGoodsId == item.Key.OrderGoodsId && x.NewSpecificationSort == item.Key.SpecificationSort && x.NewGoodsId == item.Key.GoodsId).FirstOrDefault()?.SpecificationSort,
NewGoodsName = oldModel.WarehouseOutGoodsList.Where(x => x.OrderGoodsId == item.Key.OrderGoodsId).FirstOrDefault()?.NewGoodsName, NewGoodsName = oldModel.WarehouseOutGoodsList.Where(x => x.OrderGoodsId == item.Key.OrderGoodsId && x.NewSpecificationSort == item.Key.SpecificationSort && x.NewGoodsId == item.Key.GoodsId).FirstOrDefault()?.NewGoodsName,
NewSpecification = oldModel.WarehouseOutGoodsList.Where(x => x.OrderGoodsId == item.Key.OrderGoodsId).FirstOrDefault()?.NewSpecification, NewSpecification = oldModel.WarehouseOutGoodsList.Where(x => x.OrderGoodsId == item.Key.OrderGoodsId && x.NewSpecificationSort == item.Key.SpecificationSort && x.NewGoodsId == item.Key.GoodsId).FirstOrDefault()?.NewSpecification,
NewSpecificationSort = oldModel.WarehouseOutGoodsList.Where(x => x.OrderGoodsId == item.Key.OrderGoodsId).FirstOrDefault()?.NewSpecificationSort, NewSpecificationSort = oldModel.WarehouseOutGoodsList.Where(x => x.OrderGoodsId == item.Key.OrderGoodsId && x.NewSpecificationSort == item.Key.SpecificationSort && x.NewGoodsId == item.Key.GoodsId).FirstOrDefault()?.NewSpecificationSort,
ProductCode = oldModel.WarehouseOutGoodsList.Where(x => x.OrderGoodsId == item.Key.OrderGoodsId).FirstOrDefault()?.ProductCode, ProductCode = oldModel.WarehouseOutGoodsList.Where(x => x.OrderGoodsId == item.Key.OrderGoodsId && x.NewSpecificationSort == item.Key.SpecificationSort && x.NewGoodsId == item.Key.GoodsId).FirstOrDefault()?.ProductCode,
Number = applyModel.WarehouseOutGoodsDetailList.Where(x => x.OrderGoodsId == item.Key.OrderGoodsId && x.CostMoney == item.Key.CostMoney).Count(), Number = applyModel.WarehouseOutGoodsDetailList.Where(x => x.OrderGoodsId == item.Key.OrderGoodsId && x.CostMoney == item.Key.CostMoney).Count(),
TenantId = applyModel.TenantId, TenantId = applyModel.TenantId,
MallBaseId = applyModel.MallBaseId, MallBaseId = applyModel.MallBaseId,
......
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