Commit ac5a23d2 authored by 吴春's avatar 吴春

提交出库

parent 9edcd163
...@@ -382,8 +382,8 @@ namespace Property.Module.Mall ...@@ -382,8 +382,8 @@ namespace Property.Module.Mall
{ {
oldMoney = oldOutGoods.Sum(x => x.CostMoney ?? 0) / Convert.ToDecimal(oldOutGoods.Count()); oldMoney = oldOutGoods.Sum(x => x.CostMoney ?? 0) / Convert.ToDecimal(oldOutGoods.Count());
} }
costMoney = (nowGoods.Sum(x => x.CostMoney ?? 0) / nowGoodsFinan.FirstOrDefault()?.Number ?? 0);
costMoney = (nowGoods.Sum(x => x.CostMoney ?? 0) / nowGoodsFinan.Sum(x => x.Number ?? 0)); // costMoney = (nowGoods.Sum(x => x.CostMoney ?? 0) / nowGoodsFinan.Sum(x => x.Number ?? 0));
//更新申请单的出库状态 //更新申请单的出库状态
Dictionary<string, object> filesGoods = new Dictionary<string, object>() { Dictionary<string, object> filesGoods = new Dictionary<string, object>() {
{nameof(RB_Goods_OrderDetail.CostFinanceId),frid}, {nameof(RB_Goods_OrderDetail.CostFinanceId),frid},
......
...@@ -32,10 +32,12 @@ namespace Property.Repository ...@@ -32,10 +32,12 @@ namespace Property.Repository
{ {
where += " and " + nameof(RB_Supplies_Check_Extend.Periods) + " like '%" + dmodel.Periods + "%'"; where += " and " + nameof(RB_Supplies_Check_Extend.Periods) + " like '%" + dmodel.Periods + "%'";
} }
if (dmodel.WarehouseId > 0) { if (dmodel.WarehouseId > 0)
{
where += " and " + nameof(RB_Supplies_Check_Extend.WarehouseId) + "=" + dmodel.WarehouseId; where += " and " + nameof(RB_Supplies_Check_Extend.WarehouseId) + "=" + dmodel.WarehouseId;
} }
if (dmodel.CheckState > 0) { if (dmodel.CheckState > 0)
{
where += " and " + nameof(RB_Supplies_Check_Extend.CheckState) + "=" + (int)dmodel.CheckState; where += " and " + nameof(RB_Supplies_Check_Extend.CheckState) + "=" + (int)dmodel.CheckState;
} }
string sql = $@" select * from RB_Supplies_Check {where} order by Id desc"; string sql = $@" select * from RB_Supplies_Check {where} order by Id desc";
...@@ -63,11 +65,11 @@ namespace Property.Repository ...@@ -63,11 +65,11 @@ namespace Property.Repository
if (dmodel.StartDate.HasValue) if (dmodel.StartDate.HasValue)
{ {
where += $" and nameof(RB_Supplies_Check_Extend.StartDate) >={dmodel.StartDate} "; where += $" and " + nameof(RB_Supplies_Check_Extend.StartDate) + "<='" + dmodel.StartDate+"' ";
} }
if (dmodel.EndDate.HasValue) if (dmodel.EndDate.HasValue)
{ {
where += $" and nameof(RB_Supplies_Check_Extend.StartDate) <={dmodel.EndDate} "; where += $" and " + nameof(RB_Supplies_Check_Extend.EndDate) + ">='" + dmodel.EndDate + "' ";
} }
if (!string.IsNullOrWhiteSpace(dmodel.Periods)) if (!string.IsNullOrWhiteSpace(dmodel.Periods))
......
...@@ -299,7 +299,7 @@ namespace Property.WebApi.Controllers.Mall ...@@ -299,7 +299,7 @@ namespace Property.WebApi.Controllers.Mall
{ {
return ApiResult.Failed("订单号:" + oldOrderGoods.OrderNo + "商品名称:" + oldOrderGoods.GoodsName + "必须一起出库"); return ApiResult.Failed("订单号:" + oldOrderGoods.OrderNo + "商品名称:" + oldOrderGoods.GoodsName + "必须一起出库");
} }
if (!wareHouseGoodsList.Any(x => x.OrderGoodsId == item.Key.OrderGoodsId && x.GoodsId == item.Key.GoodsId && x.SpecificationSort == item.Key.SpecificationSort)) if (!wareHouseGoodsList.Any(x => x.OrderGoodsId == item.Key.OrderGoodsId && x.NewGoodsId == item.Key.GoodsId && x.NewSpecificationSort == item.Key.SpecificationSort))
{ {
return ApiResult.Failed("订单号:" + oldOrderGoods.OrderNo + "商品名称:" + oldOrderGoods.GoodsName + "没在当前仓库"); return ApiResult.Failed("订单号:" + oldOrderGoods.OrderNo + "商品名称:" + oldOrderGoods.GoodsName + "没在当前仓库");
} }
......
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