Commit e2f273b1 authored by liudong1993's avatar liudong1993

采购

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