Commit e2f273b1 authored by liudong1993's avatar liudong1993

采购

parent 2ae5a6af
......@@ -138,5 +138,9 @@ namespace Mall.Model.Entity.Property
/// 供应商名称
/// </summary>
public string SupplierName { get; set; }
/// <summary>
/// 入库状态 1未入库 2部分入库 3已入库
/// </summary>
public int? StockInStatus { get; set; }
}
}
\ No newline at end of file
......@@ -109,5 +109,9 @@ namespace Mall.Model.Entity.Property
get;
set;
}
/// <summary>
/// 已入库的数量
/// </summary>
public int? StockInNum { get; set; }
}
}
\ No newline at end of file
......@@ -49,6 +49,10 @@ namespace Mall.Repository.Property
{
where += " and p.CreateTime <='" + dmodel.EndTime + " 23:59:59'";
}
if (dmodel.StockInStatus > 0)
{
where += " and p." + nameof(RB_Procurement_Extend.StockInStatus) + "=" + dmodel.StockInStatus;
}
string sql = $@" SELECT p.* FROM rb_procurement p
INNER JOIN rb_procurement_detail pd on p.Id = pd.ProcurementId
......
......@@ -55,12 +55,14 @@ namespace Mall.WebApi.Controllers.MallBase
x.TotalCostMoney,
x.TotalNumber,
x.Remark,
x.StockInStatus,
DetailList = x.DetailList.Select(y=>new
{
y.Id,
y.MaterialId,
y.CostMoney,
y.Number,
y.StockInNum,
MaterialModel = new {
y.MaterialModel.Name,
y.MaterialModel.SuppliesNum,
......@@ -102,12 +104,14 @@ namespace Mall.WebApi.Controllers.MallBase
model.TotalCostMoney,
model.TotalNumber,
model.Remark,
model.StockInStatus,
DetailList = model.DetailList.Select(y => new
{
y.Id,
y.MaterialId,
y.CostMoney,
y.Number,
y.StockInNum,
MaterialModel = new
{
y.MaterialModel.Name,
......
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