Commit 854ff16d by guanzhenshan

逻辑仓库增加调出在途数和30天调出数

parent c2c8456f
...@@ -84,11 +84,11 @@ namespace Bailun.DC.Models.Stock ...@@ -84,11 +84,11 @@ namespace Bailun.DC.Models.Stock
/// <summary> /// <summary>
/// 调出在途数 /// 调出在途数
/// </summary> /// </summary>
public int? stock_tuneout_onway { get; set; } public int? quantity_tuneout_onway { get; set; }
/// <summary> /// <summary>
/// 30天库存调出数 /// 30天内调出数量
/// </summary> /// </summary>
public int? stock_tuneout_30days { get; set; } public int? quantity_tuneout_30days { get; set; }
} }
} }
...@@ -77,7 +77,7 @@ namespace Bailun.DC.Services ...@@ -77,7 +77,7 @@ namespace Bailun.DC.Services
{ {
var sqlparam = new DynamicParameters(); var sqlparam = new DynamicParameters();
var sqlwhere = " where 1=1 "; var sqlwhere = " where 1=1 ";
var sql = @"select t1.hq_type,t1.warehouse_code,t1.warehouse_name,sum(t1.usable_stock) usable_stock,sum(t1.amount_stock) amount_stock,sum(t1.quantity_purchase) quantity_purchase,sum(t1.purchase_amount) purchase_amount,sum(t1.quantity_transfer) quantity_transfer,sum(t1.amount_transit) amount_transit,sum(t1.oneday_total_sales) oneday_total_sales,sum(t1.amount_onedaysale) amount_onedaysale,sum(t1.sevenday_total_sales) sevenday_total_sales,sum(t1.fourteenday_total_sales) fourteenday_total_sales,sum(t1.thirtyday_total_sales) thirtyday_total_sales from dc_skuwarehouse_stock_sales t1 "; var sql = @"select t1.hq_type,t1.warehouse_code,t1.warehouse_name,sum(t1.usable_stock) usable_stock,sum(t1.amount_stock) amount_stock,sum(t1.quantity_purchase) quantity_purchase,sum(t1.purchase_amount) purchase_amount,sum(t1.quantity_transfer) quantity_transfer,sum(t1.amount_transit) amount_transit,sum(t1.oneday_total_sales) oneday_total_sales,sum(t1.amount_onedaysale) amount_onedaysale,sum(t1.sevenday_total_sales) sevenday_total_sales,sum(t1.fourteenday_total_sales) fourteenday_total_sales,sum(t1.thirtyday_total_sales) thirtyday_total_sales,sum(quantity_tuneout_onway) quantity_tuneout_onway,sum(t1.quantity_tuneout_30days) quantity_tuneout_30days from dc_skuwarehouse_stock_sales t1 ";
//var sqlcount = "select t1.warehouse_code from dc_skuwarehouse_stock_sales t1 "; //var sqlcount = "select t1.warehouse_code from dc_skuwarehouse_stock_sales t1 ";
...@@ -174,7 +174,7 @@ namespace Bailun.DC.Services ...@@ -174,7 +174,7 @@ namespace Bailun.DC.Services
{ {
var sqlparam = new DynamicParameters(); var sqlparam = new DynamicParameters();
var sqlwhere = " where 1=1 "; var sqlwhere = " where 1=1 ";
var sql = @"select sum(usable_stock) usable_stock,sum(amount_stock) amount_stock,sum(quantity_purchase) quantity_purchase,sum(purchase_amount) purchase_amount,sum(quantity_transfer) quantity_transfer,sum(amount_transit) amount_transit,sum(oneday_total_sales) oneday_total_sales,sum(amount_onedaysale) amount_onedaysale,sum(sevenday_total_sales) sevenday_total_sales,sum(fourteenday_total_sales) fourteenday_total_sales,sum(thirtyday_total_sales) thirtyday_total_sales from dc_skuwarehouse_stock_sales "; var sql = @"select sum(usable_stock) usable_stock,sum(amount_stock) amount_stock,sum(quantity_purchase) quantity_purchase,sum(purchase_amount) purchase_amount,sum(quantity_transfer) quantity_transfer,sum(amount_transit) amount_transit,sum(oneday_total_sales) oneday_total_sales,sum(amount_onedaysale) amount_onedaysale,sum(sevenday_total_sales) sevenday_total_sales,sum(fourteenday_total_sales) fourteenday_total_sales,sum(thirtyday_total_sales) thirtyday_total_sales,sum(quantity_tuneout_onway) quantity_tuneout_onway,sum(quantity_tuneout_30days) quantity_tuneout_30days from dc_skuwarehouse_stock_sales ";
if (!string.IsNullOrWhiteSpace(warehousetype)) if (!string.IsNullOrWhiteSpace(warehousetype))
{ {
......
...@@ -75,6 +75,9 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers ...@@ -75,6 +75,9 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
usable_stock = p.usable_stock.ToString("N0"), usable_stock = p.usable_stock.ToString("N0"),
p.warehouse_code, p.warehouse_code,
p.warehouse_name, p.warehouse_name,
quantity_tuneout_onway = (p.quantity_tuneout_onway??0).ToString("N0"),
quantity_tuneout_30days = (p.quantity_tuneout_30days??0).ToString("N0"),
}); });
return JsonConvert.SerializeObject(new { total = total, rows = list, count_row = new { return JsonConvert.SerializeObject(new { total = total, rows = list, count_row = new {
...@@ -91,7 +94,9 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers ...@@ -91,7 +94,9 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
sevenday_total_sales = (countM.sevenday_total_sales??0).ToString("N0"), sevenday_total_sales = (countM.sevenday_total_sales??0).ToString("N0"),
thirtyday_total_sales = (countM.thirtyday_total_sales??0).ToString("N0"), thirtyday_total_sales = (countM.thirtyday_total_sales??0).ToString("N0"),
usable_stock = countM.usable_stock.ToString("N0"), usable_stock = countM.usable_stock.ToString("N0"),
fourteenday_total_sales = (countM.fourteenday_total_sales??0).ToString("N0") fourteenday_total_sales = (countM.fourteenday_total_sales??0).ToString("N0"),
quantity_tuneout_onway = (countM.quantity_tuneout_onway ?? 0).ToString("N0"),
quantity_tuneout_30days = (countM.quantity_tuneout_30days ?? 0).ToString("N0"),
} }); } });
} }
......
...@@ -98,6 +98,12 @@ ...@@ -98,6 +98,12 @@
{ {
field: 'nostockcount', title: '缺货数量', width: '130', sortable: true, iscount: true field: 'nostockcount', title: '缺货数量', width: '130', sortable: true, iscount: true
}, },
{
field: 'quantity_tuneout_onway', title: '调出在途数', width: '130', sortable: true, iscount: true
},
{
field: 'quantity_tuneout_30days', title: '30天调出数', width: '130', sortable: true, iscount: true
},
{ field: 'oneday_total_sales', title: '昨日总销量', width: '130', sortable: true, iscount: true }, { field: 'oneday_total_sales', title: '昨日总销量', width: '130', sortable: true, iscount: true },
{ field: 'amount_onedaysale', title: '昨日总销售额', width: '130', sortable: true, iscount: true }, { field: 'amount_onedaysale', title: '昨日总销售额', width: '130', sortable: true, iscount: true },
{ field: 'sevenday_total_sales', title: '七天销量', width: '100', sortable: true, iscount: true }, { field: 'sevenday_total_sales', title: '七天销量', width: '100', sortable: true, iscount: true },
......
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