Commit ba692afa authored by 吴春's avatar 吴春

提交代码

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