Commit 581f31de by 泽锋 李

回货过滤指定数据

parent 09e834cd
using System;
using System.Collections.Generic;
using System.Text;
namespace AutoTurnOver.Models
{
public class dc_return_goods_not_push
{
public int id { get; set; }
public string bailun_sku { get; set; }
public string warehouse_code { get; set; }
public int status { get; set; }
}
public class dc_return_goods_not_push_log
{
public int id { get; set; }
public string bailun_sku { get; set; }
public string warehouse_code { get; set; }
public int status { get; set; }
public DateTime create_time { get; set; }
public string create_user_name { get; set; }
}
}
...@@ -415,6 +415,10 @@ namespace AutoTurnOver.Services ...@@ -415,6 +415,10 @@ namespace AutoTurnOver.Services
{ {
return DB.db_config.BatchMonitorStatus(ids, monitor_status, user); return DB.db_config.BatchMonitorStatus(ids, monitor_status, user);
} }
public string BatchReturnGoodsStatus(string ids, int monitor_status, UserData user)
{
return DB.db_config.BatchReturnGoodsStatus(ids, monitor_status, user);
}
public string BatchTortStatus(string ids, int monitor_status, UserData user) public string BatchTortStatus(string ids, int monitor_status, UserData user)
{ {
......
...@@ -552,7 +552,12 @@ namespace AutoTurnOver.Services ...@@ -552,7 +552,12 @@ namespace AutoTurnOver.Services
public List<dc_return_goods_push> ReturnGoodsPushFilter(List<dc_return_goods_push> datas) public List<dc_return_goods_push> ReturnGoodsPushFilter(List<dc_return_goods_push> datas)
{ {
// 规则一 // 规则一
datas = datas.Where(s=> !(s.bailun_sku== "294155433" && ( s.warehouse_code== "GB4PXBL" || s.warehouse_code == "BLGBPX")) ).ToList(); var not_push_list = db_config.ReturnGoodsList(datas.Select(s=>s.bailun_sku).ToList());
if(not_push_list!=null && not_push_list.Count >= 1)
{
datas = datas.Where(s => !not_push_list.Any(p=>p.bailun_sku==s.bailun_sku && p.warehouse_code==s.warehouse_code)).ToList();
}
// 规则二 // 规则二
var buyers = new List<string> { "张莹霞", "张莹霞1", "黄静洁" }; var buyers = new List<string> { "张莹霞", "张莹霞1", "黄静洁" };
......
...@@ -715,5 +715,20 @@ namespace AutoTurnOver.Controllers ...@@ -715,5 +715,20 @@ namespace AutoTurnOver.Controllers
} }
#endregion #endregion
/// <summary>
/// 批量修改缺货推送状态
/// </summary>
/// <param name="ids"></param>
/// <param name="monitor_status"></param>
/// <returns></returns>
[HttpGet]
public JsonResult BatchReturnGoodsStatus(string ids, int monitor_status)
{
var user = AutoUtility.GetUser();
if (user == null) return null;
var result = new Services.ConfigServices().BatchReturnGoodsStatus(ids, monitor_status, user);
return new JsonResult(result);
}
} }
} }
\ 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