Commit 662f0877 by 泽锋 李

生产订单抓取

parent 145b120c
......@@ -1376,7 +1376,7 @@ left join dc_base_prod_order as t8 on t1.bailun_sku = t8.bailun_sku and t1.purch
{
sql += " left join dc_auto_config_sku_warehouse as t10 on t1.bailun_sku = t10.bailun_sku and t1.warehouse_code = t10.warehouse_code ";
}
sql += " where t1.`status` not in (-1) and t1.quantity_not_inbound > 0 ";
sql += " where t1.`status` not in (-1,4) and t1.quantity_not_inbound > 0 ";
}
......@@ -1400,7 +1400,7 @@ left join dc_base_warehouse as t2 on t1.warehouse_code = t2.warehouse_code
countSql += " left join dc_auto_config_sku_warehouse as t10 on t1.bailun_sku = t10.bailun_sku and t1.warehouse_code = t10.warehouse_code ";
}
countSql += " where t1.`status` not in (-1) and t1.quantity_not_inbound > 0 ";
countSql += " where t1.`status` not in (-1,4) and t1.quantity_not_inbound > 0 ";
......
......@@ -54,6 +54,10 @@ namespace AutoTurnOver.DB
foreach (var item in datas)
{
if (string.IsNullOrWhiteSpace(item.purchase_no))
{
continue;
}
var db_data = new dc_base_prod_order()
{
gmt_modified_date = DateTime.Now,
......
......@@ -42,7 +42,18 @@ namespace AutoTurnOver.Models.Report
public string purchase_id { get; set; }
public decimal quantity_purchase { get; set; }
public decimal quantity_not_inbound { get; set; }
public string purchase_status_str
{
get
{
return ((purchase_status_enum)purchase_status).ToString();
}
}
public int purchase_status { get; set; }
public enum purchase_status_enum
{
作废=-1,待确认=0,已确认=1, 已完成=4
}
public DateTime? last_signtime { get; set; }
public DateTime? purchase_arrivaldate { get; set; }
public decimal quantity_arrival { get; set; }
......
......@@ -523,7 +523,7 @@ namespace AutoTurnOver.Services
if (list == null || list.Count <= 0) break;
DataTable table = new DataTable();
string[] cols = new string[] { "仓库名称","仓库编码","产品名称","可用库存","采购在途数","调拨在途数","暂存区数","临时在途数","调拨单在途数"
string[] cols = new string[] { "仓库名称","仓库编码","产品编码","产品名称","可用库存","采购在途数","调拨在途数","暂存区数","临时在途数","调拨单在途数"
,"商品来源","采购员","过去7天日均","过去14天日均","过去30天日均","sku状态"
,"采购单号","采购数量","采购单状态","预计到货时间","最后签收时间","已到货数量","已入库数量","生产分配状态","待分配生产数","已分配生产数","已生产数"
......@@ -539,6 +539,7 @@ namespace AutoTurnOver.Services
row["仓库名称"] = itemData.warehouse_name;
row["仓库编码"] = itemData.warehouse_code;
row["产品编码"] = itemData.bailun_sku;
row["产品名称"] = itemData.product_title;
row["可用库存"] = itemData.stock;
row["采购在途数"] = itemData.quantity_not_inbound;
......@@ -556,7 +557,7 @@ namespace AutoTurnOver.Services
row["采购单号"] = itemData.purchase_id;
row["采购数量"] = itemData.quantity_purchase;
row["采购单状态"] = itemData.purchase_status;
row["采购单状态"] = itemData.purchase_status_str;
row["预计到货时间"] = itemData.purchase_arrivaldate;
row["最后签收时间"] = itemData.last_signtime == null ? "" : itemData.last_signtime.Value.ToString("yyyy-MM-dd HH:mm:ss");
row["已到货数量"] = itemData.quantity_arrival;
......
......@@ -98,7 +98,6 @@ namespace AutoTurnOver.Controllers
/// <param name="offset"></param>
/// <param name="limit"></param>
/// <returns></returns>
[UseAction]
[BrowseLog("Bailun_aims", "访问【百伦自动周转系统】->【实时数据】->【供应链采购在途】->【搜索】页面", 0)]
public JsonResult FullLinkPurchaseList([FromQuery]dc_base_stock_search_dto search_data)
{
......
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