Commit db26fea8 by lizefeng

试试库存采购员查询

parent a5a878de
...@@ -355,6 +355,7 @@ left join dc_base_warehouse as dbw on t1.warehouse_code = dbw.warehouse_code ...@@ -355,6 +355,7 @@ left join dc_base_warehouse as dbw on t1.warehouse_code = dbw.warehouse_code
if (!string.IsNullOrWhiteSpace(buyer_name)) if (!string.IsNullOrWhiteSpace(buyer_name))
{ {
sql += " and t3.buyer_name = @buyer_name "; sql += " and t3.buyer_name = @buyer_name ";
countSql += " and t3.buyer_name = @buyer_name ";
parameters.Add("buyer_name", buyer_name); parameters.Add("buyer_name", buyer_name);
} }
......
...@@ -76,7 +76,7 @@ namespace AutoTurnOver.Services ...@@ -76,7 +76,7 @@ namespace AutoTurnOver.Services
private static int export_count = 0; private static int export_count = 0;
public MemoryStream Export(UserData user, string sku, string bailun_sku, string warehousecode, string product_inner_code, string sku_title_cn, string supplier_name, int offset, int limit, ref int total, string warehousetype, int? warehousearea, bool isSum = false, string order = null, string sort = null, int? has_tort = null) public MemoryStream Export(UserData user, string sku, string bailun_sku, string warehousecode, string product_inner_code, string sku_title_cn, string supplier_name, int offset, int limit, ref int total, string warehousetype, int? warehousearea, bool isSum = false, string order = null, string sort = null, int? has_tort = null,string buyer_name =null)
{ {
try try
{ {
...@@ -92,7 +92,7 @@ namespace AutoTurnOver.Services ...@@ -92,7 +92,7 @@ namespace AutoTurnOver.Services
while (true) while (true)
{ {
var list = services.RealtimeList(sku, bailun_sku, warehousecode, product_inner_code, sku_title_cn, supplier_name, (page - 1) * rows, rows, ref total, warehousetype, warehousearea, has_tort: has_tort); var list = services.RealtimeList(sku, bailun_sku, warehousecode, product_inner_code, sku_title_cn, supplier_name, (page - 1) * rows, rows, ref total, warehousetype, warehousearea, has_tort: has_tort, buyer_name: buyer_name);
if (list == null || list.Count <= 0) break; if (list == null || list.Count <= 0) break;
......
...@@ -128,11 +128,11 @@ namespace AutoTurnOver.Controllers ...@@ -128,11 +128,11 @@ namespace AutoTurnOver.Controllers
/// <param name="sku"></param> /// <param name="sku"></param>
/// <param name="warehousecode"></param> /// <param name="warehousecode"></param>
/// <returns></returns> /// <returns></returns>
public FileResult ExportRealtime(string sku, string bailun_sku, string warehousecode, string product_inner_code, string sku_title_cn, string supplier_name, int offset, int limit, string order, string sort, string warehousetype, int? warehousearea, int? has_tort = null) public FileResult ExportRealtime(string sku, string bailun_sku,string buyer_name, string warehousecode, string product_inner_code, string sku_title_cn, string supplier_name, int offset, int limit, string order, string sort, string warehousetype, int? warehousearea, int? has_tort = null)
{ {
var user = AutoUtility.GetUser(); var user = AutoUtility.GetUser();
int total = 0; int total = 0;
var memory = new DailyServices().Export(user,sku, bailun_sku, warehousecode, product_inner_code, sku_title_cn, supplier_name, offset, limit, ref total, warehousetype, warehousearea, has_tort: has_tort); var memory = new DailyServices().Export(user,sku, bailun_sku, warehousecode, product_inner_code, sku_title_cn, supplier_name, offset, limit, ref total, warehousetype, warehousearea, has_tort: has_tort, buyer_name: buyer_name);
return File(memory, "text/csv", $"{user.UserAccount}实时库存.csv"); return File(memory, "text/csv", $"{user.UserAccount}实时库存.csv");
} }
......
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