Commit ebaf3055 by guanzhenshan

更新数据仓报表,平台利润统计去掉刷单数据

parent b2ac9e9c
...@@ -676,7 +676,7 @@ namespace Dapper ...@@ -676,7 +676,7 @@ namespace Dapper
/// <returns></returns> /// <returns></returns>
public static IEnumerable<T> Page<T>(this IDbConnection connection, int page, int pagesize, string strsql, ref int total, object parameters = null,string countsql="",int? timeout=null) public static IEnumerable<T> Page<T>(this IDbConnection connection, int page, int pagesize, string strsql, ref int total, object parameters = null,string countsql="",int? timeout=null)
{ {
total = connection.ExecuteScalar<int>((string.IsNullOrEmpty(countsql)?"select count(0) from (" + strsql + ") tb1":countsql),parameters); total = connection.ExecuteScalar<int>((string.IsNullOrEmpty(countsql)?"select count(0) from (" + strsql + ") tb1":countsql),parameters,null,2*60);
strsql += " limit " + (page - 1) * pagesize + "," + pagesize; strsql += " limit " + (page - 1) * pagesize + "," + pagesize;
......
...@@ -8,4 +8,8 @@ ...@@ -8,4 +8,8 @@
<PackageReference Include="Dapper" Version="1.50.5" /> <PackageReference Include="Dapper" Version="1.50.5" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Folder Include="OrderExport\" />
</ItemGroup>
</Project> </Project>
...@@ -34,7 +34,7 @@ namespace Bailun.DC.Models ...@@ -34,7 +34,7 @@ namespace Bailun.DC.Models
/// <summary> /// <summary>
/// 监控状态 /// 监控状态
/// </summary> /// </summary>
public int? monitorstatus { get; set; } public int? status { get; set; }
/// <summary> /// <summary>
/// 清货状态 /// 清货状态
...@@ -74,7 +74,7 @@ namespace Bailun.DC.Models ...@@ -74,7 +74,7 @@ namespace Bailun.DC.Models
/// <summary> /// <summary>
/// 分类名称 /// 分类名称
/// </summary> /// </summary>
public string categoryname { get; set; } public string category_name { get; set; }
/// <summary> /// <summary>
/// sku中文名称 /// sku中文名称
...@@ -186,5 +186,9 @@ namespace Bailun.DC.Models ...@@ -186,5 +186,9 @@ namespace Bailun.DC.Models
/// </summary> /// </summary>
public string groupupdateuser { get; set; } public string groupupdateuser { get; set; }
/// <summary>
/// 未发货数
/// </summary>
public decimal? quantity_unshipped { get; set; }
} }
} }
...@@ -375,7 +375,7 @@ namespace Bailun.DC.Services ...@@ -375,7 +375,7 @@ namespace Bailun.DC.Services
{ {
var strlimit = (((page - 1) * pagesize) + "," + pagesize); var strlimit = (((page - 1) * pagesize) + "," + pagesize);
var liststock = cn.Query<Models.Warehouse.mWarehouseRedundancy>($@"select t1.bailun_sku,t1.warehouse_code,t1.usable_stock,t2.sku_title_cn,t2.unit_price,t3.warehouse_name,t4.quantity,t5.quantity_out_stock,t6.oneday_total_sales,t6.threeday_total_sales,t6.sevenday_total_sales,t6.fourteenday_total_sales,t6.thirtyday_total_sales,t6.threeday_average_sales,t6.sevenday_average_sales,t6.fourteenday_average_sales,t6.thirtyday_average_sales,t5.quantity_purchase,t5.quantity_transfer,t2.product_code,t2.bailun_category_id,t2.bailun_category_name,t7.status as 'monitorstatus',t8.tortstatus var liststock = cn.Query<Models.Warehouse.mWarehouseRedundancy>($@"select t1.bailun_sku,t1.warehouse_code,t1.usable_stock,t2.sku_title_cn,t2.unit_price,t3.warehouse_name,t4.quantity,t5.quantity_out_stock,t6.oneday_total_sales,t6.threeday_total_sales,t6.sevenday_total_sales,t6.fourteenday_total_sales,t6.thirtyday_total_sales,t6.threeday_average_sales,t6.sevenday_average_sales,t6.fourteenday_average_sales,t6.thirtyday_average_sales,t5.quantity_purchase,t5.quantity_transfer,t2.product_code,t2.bailun_category_id,t2.bailun_category_name,t7.status as 'monitorstatus',t8.tortstatus
from dc_daily_stock t1 from dc_base_stock t1
join dc_base_sku t2 on t1.bailun_sku=t2.bailun_sku join dc_base_sku t2 on t1.bailun_sku=t2.bailun_sku
join dc_base_warehouse t3 on t1.warehouse_code=t3.warehouse_code join dc_base_warehouse t3 on t1.warehouse_code=t3.warehouse_code
left join dc_auto_daily_redundance t4 on t4.record_time='{DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd")}' and t1.bailun_sku=t4.bailun_sku and t1.warehouse_code=t4.warehouse_code -- 仓库冗余 left join dc_auto_daily_redundance t4 on t4.record_time='{DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd")}' and t1.bailun_sku=t4.bailun_sku and t1.warehouse_code=t4.warehouse_code -- 仓库冗余
...@@ -383,7 +383,6 @@ namespace Bailun.DC.Services ...@@ -383,7 +383,6 @@ namespace Bailun.DC.Services
left join dc_daily_sales t6 on t1.bailun_sku=t6.bailun_sku and t6.record_date='{DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd")}' and t1.warehouse_code=t6.warehouse_code left join dc_daily_sales t6 on t1.bailun_sku=t6.bailun_sku and t6.record_date='{DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd")}' and t1.warehouse_code=t6.warehouse_code
left join dc_auto_config_sku_warehouse t7 on t7.bailun_sku=t1.bailun_sku and t7.warehouse_code=t1.warehouse_code left join dc_auto_config_sku_warehouse t7 on t7.bailun_sku=t1.bailun_sku and t7.warehouse_code=t1.warehouse_code
left join dc_sku_monitor t8 on t8.sku=t1.bailun_sku and t8.warehousecode=t1.warehouse_code left join dc_sku_monitor t8 on t8.sku=t1.bailun_sku and t8.warehousecode=t1.warehouse_code
where t1.record_time='{DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd")}'
limit {strlimit}", null, null, true, 30 * 60); limit {strlimit}", null, null, true, 30 * 60);
resultcount = liststock.AsList().Count; resultcount = liststock.AsList().Count;
......
...@@ -998,7 +998,7 @@ namespace Bailun.DC.Services ...@@ -998,7 +998,7 @@ namespace Bailun.DC.Services
sql += " left join dc_base_oms_pick t1 on tb.bailun_order_id =t1.bailun_order_id "; sql += " left join dc_base_oms_pick t1 on tb.bailun_order_id =t1.bailun_order_id ";
} }
sql += " where tb.bailun_order_status!='Canceled'"; sql += " where tb.bailun_order_status!='Canceled' and tb.has_scalp=0 ";
//presql += " where tb.bailun_order_status!='Canceled' and tb.amount_prepaid>0"; //presql += " where tb.bailun_order_status!='Canceled' and tb.amount_prepaid>0";
if (!string.IsNullOrWhiteSpace(platform)) if (!string.IsNullOrWhiteSpace(platform))
...@@ -1094,7 +1094,7 @@ namespace Bailun.DC.Services ...@@ -1094,7 +1094,7 @@ namespace Bailun.DC.Services
sql += " group by bailun_order_id) t2 on tb.bailun_order_id=t2.bailun_order_id "; sql += " group by bailun_order_id) t2 on tb.bailun_order_id=t2.bailun_order_id ";
sql += " where bailun_order_status!='Canceled'"; sql += " where bailun_order_status!='Canceled' and tb.has_scalp=0 ";
if (!string.IsNullOrWhiteSpace(platform)) if (!string.IsNullOrWhiteSpace(platform))
{ {
......
...@@ -54,9 +54,9 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers ...@@ -54,9 +54,9 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
p.warehouse_code, p.warehouse_code,
p.warehousename, p.warehousename,
p.sku, p.sku,
p.categoryname, p.category_name,
p.skuname, p.skuname,
monitorstatus = (p.monitorstatus??0)==1?"正在监控":"停止监控", status = (p.status ?? 0)==1?"正在监控":"停止监控",
clearancestatus = (p.clearancestatus??0)==1?"正在清货":"否", clearancestatus = (p.clearancestatus??0)==1?"正在清货":"否",
tortstatus = (p.tortstatus??0)==1?"已侵权":"否", tortstatus = (p.tortstatus??0)==1?"已侵权":"否",
p.str_skutag, p.str_skutag,
...@@ -80,6 +80,7 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers ...@@ -80,6 +80,7 @@ namespace Bailun.DC.Web.Areas.Reports.Controllers
skucreatetime = p.skucreatetime.HasValue?p.skucreatetime.Value.ToString("yyyy-MM-dd HH:mm"):"", skucreatetime = p.skucreatetime.HasValue?p.skucreatetime.Value.ToString("yyyy-MM-dd HH:mm"):"",
amount_sevendaysale = (p.amount_sevendaysale??0).ToString("N2"), amount_sevendaysale = (p.amount_sevendaysale??0).ToString("N2"),
groupname = string.IsNullOrEmpty(p.groupname)?"":p.groupname.Trim(), groupname = string.IsNullOrEmpty(p.groupname)?"":p.groupname.Trim(),
quantity_unshipped = p.quantity_unshipped??0
}); });
return JsonConvert.SerializeObject(new { total = total, rows = list,count_row = new { return JsonConvert.SerializeObject(new { total = total, rows = list,count_row = new {
......
...@@ -229,8 +229,8 @@ ...@@ -229,8 +229,8 @@
} }
}, },
{ {
field: 'categoryname', title: '分类', width: '180', formatter: function (idx, data) { field: 'category_name', title: '分类', width: '180', formatter: function (idx, data) {
var str = '<p class="mules" title="' + data.categoryname + '">' + data.categoryname + '</p>'; var str = '<p class="mules" title="' + data.category_name + '">' + data.category_name + '</p>';
return str; return str;
} }
}, },
...@@ -240,7 +240,7 @@ ...@@ -240,7 +240,7 @@
return str; return str;
} }
}, },
{ field: 'monitorstatus', title: '监控状态', width: '100', sortable: true }, { field: 'status', title: '监控状态', width: '100', sortable: true },
{ field: 'clearancestatus', title: '清货状态', width: '100', sortable: true }, { field: 'clearancestatus', title: '清货状态', width: '100', sortable: true },
{ field: 'tortstatus', title: '侵权状态', width: '100', sortable: true }, { field: 'tortstatus', title: '侵权状态', width: '100', sortable: true },
{ field: 'str_skutag', title: 'sku标签', width: '120', sortable: true }, { field: 'str_skutag', title: 'sku标签', width: '120', sortable: true },
...@@ -251,7 +251,7 @@ ...@@ -251,7 +251,7 @@
{ field: 'purchase_amount', title: '采购在途金额', width: '120', sortable: true, iscount: true }, { field: 'purchase_amount', title: '采购在途金额', width: '120', sortable: true, iscount: true },
{ field: 'quantity_transfer', title: '调拨在途数量', width: '120', sortable: true, iscount: true }, { field: 'quantity_transfer', title: '调拨在途数量', width: '120', sortable: true, iscount: true },
{ field: 'amount_transit', title: '调拨在途金额', width: '120', sortable: true, iscount: true }, { field: 'amount_transit', title: '调拨在途金额', width: '120', sortable: true, iscount: true },
{ field: 'nosendcount', title: '待发货数量', width: '120', sortable: true, iscount: true }, { field: 'quantity_unshipped', title: '待发货数量', width: '120', sortable: true, iscount: true },
{ field: 'quantity_out_stock', title: '缺货数量', sortable: true, width: '110', iscount: true }, { field: 'quantity_out_stock', title: '缺货数量', sortable: true, width: '110', iscount: true },
{ field: 'oneday_total_sales', title: '昨日销量', sortable: true, width: '110', iscount: true }, { field: 'oneday_total_sales', title: '昨日销量', sortable: true, width: '110', iscount: true },
{ field: 'sevenday_average_sales', title: '近七日日均销量', width: '140', sortable: true, iscount: true }, { field: 'sevenday_average_sales', title: '近七日日均销量', width: '140', sortable: true, iscount: true },
......
...@@ -15,5 +15,14 @@ namespace Bailun.DC.Web.Controllers ...@@ -15,5 +15,14 @@ namespace Bailun.DC.Web.Controllers
{ {
return View(); return View();
} }
public ActionResult ExportShipOrder()
{
return View();
}
} }
} }
\ No newline at end of file
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