Commit 82ee6928 by guanzhenshan

逻辑仓库服务增加记录每日快照功能

parent 48c717b3
......@@ -10,6 +10,7 @@
<PackageReference Include="Dapper" Version="1.60.6" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="2.2.0" />
<PackageReference Include="MySql.Data" Version="8.0.16" />
<PackageReference Include="Newtonsoft.Json" Version="10.0.1" />
</ItemGroup>
<ItemGroup>
......
using System;
using System.Collections.Generic;
using System.Text;
namespace Bailun.DC.LogicWareHouse.Models
{
/// <summary>
/// 逻辑仓库的历史数据
/// </summary>
public class dc_mid_logic_wh_statistic
{
public int id { get; set; }
public string warehouse_code { get; set; }
public string warehouse_name { get; set; }
public int days { get; set; }
public string hq_type { get; set; }
public string usable_stock { get; set; }
public string amount_stock { get; set; }
public string quantity_purchase { get; set; }
public string purchase_amount { get; set; }
public string quantity_transfer { get; set; }
public string amount_transit { get; set; }
public string oneday_total_sales { get; set; }
public string amount_onedaysale { get; set; }
public string sevenday_total_sales { get; set; }
public string fourteenday_total_sales { get; set; }
public string thirtyday_total_sales { get; set; }
public string quantity_tuneout_onway { get; set; }
public string quantity_tuneout_30days { get; set; }
public string quantity_tunein_30days { get; set; }
public string nostockcount { get; set; }
public string noshippingcount { get; set; }
public DateTime lastupdatetime { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Text;
namespace Bailun.DC.LogicWareHouse
{
public class dc_semi_stock_sales_shipping
{
public int id { get; set; }
public int material_id { get; set; }
public int material_data_center { get; set; }
public string sku { get; set; }
public decimal redundancy_stock { get; set; }
public string warehouse_name { get; set; }
public string sku_name { get; set; }
public int warehouse_id { get; set; }
public decimal buyer_price { get; set; }
public decimal stock { get; set; }
public decimal stock_amount { get; set; }
public decimal on_the_way_count { get; set; }
public decimal on_the_way_amount { get; set; }
public decimal need_quantity { get; set; }
public decimal out_of_stock { get; set; }
public decimal sales_1 { get; set; }
public decimal sales_7 { get; set; }
public decimal sales_14 { get; set; }
public decimal sales_30 { get; set; }
public decimal stock_amount_1 { get; set; }
public decimal out_stock_30 { get; set; }
public decimal put_stock_30 { get; set; }
public int available_days { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Text;
namespace Bailun.DC.LogicWareHouse
{
public class mLogicWarehouse
{
/// <summary>
/// 仓库编码
/// </summary>
public string warehouse_code { get; set; }
/// <summary>
/// 仓库名称
/// </summary>
public string warehouse_name { get; set; }
/// <summary>
/// 可用库存
/// </summary>
public int usable_stock { get; set; }
/// <summary>
/// 可用库存金额
/// </summary>
public decimal amount_stock { get; set; }
/// <summary>
/// 采购在途数
/// </summary>
public int? quantity_purchase { get; set; }
/// <summary>
/// 采购在途金额
/// </summary>
public decimal? purchase_amount { get; set; }
/// <summary>
/// 调拨在途数
/// </summary>
public int? quantity_transfer { get; set; }
/// <summary>
/// 调拨在途金额
/// </summary>
public decimal? amount_transit { get; set; }
/// <summary>
/// 未发货数
/// </summary>
public int? noshippingcount { get; set; }
/// <summary>
/// 缺货数
/// </summary>
public int? nostockcount { get; set; }
/// <summary>
/// 昨日销量
/// </summary>
public int? oneday_total_sales { get; set; }
/// <summary>
/// 昨日销售额
/// </summary>
public decimal? amount_onedaysale { get; set; }
/// <summary>
/// 过去7天销量
/// </summary>
public int? sevenday_total_sales { get; set; }
/// <summary>
/// 过去14天销量
/// </summary>
public int? fourteenday_total_sales { get; set; }
/// <summary>
/// 过去30天销量
/// </summary>
public int? thirtyday_total_sales { get; set; }
/// <summary>
/// 调出在途数
/// </summary>
public int? quantity_tuneout_onway { get; set; }
/// <summary>
/// 30天内调出数量
/// </summary>
public int? quantity_tuneout_30days { get; set; }
/// <summary>
/// 30天内调入数量
/// </summary>
public int? quantity_tunein_30days { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Text;
namespace Bailun.DC.LogicWareHouse
{
public class mResponse
{
public bool success { get; set; }
public ResponseData data {get;set;}
public string message { get; set; }
}
public class ResponseData
{
public int CurrentPage { get; set; }
public int TotalPages { get; set; }
public int TotalItems { get; set; }
public int ItemsPerPage { get; set; }
public List<ItemData> Items { get; set; }
}
public class ItemData
{
public int material_id { get; set; }
public int material_data_center { get; set; }
public string sku { get; set; }
public decimal redundancy_stock { get; set; }
public string warehouse_name { get; set; }
public string sku_name { get; set; }
public int warehouse_id { get; set; }
public decimal buyer_price { get; set; }
public decimal stock { get; set; }
public decimal stock_amount { get; set; }
public decimal on_the_way_count { get; set; }
public decimal on_the_way_amount { get; set; }
public decimal need_quantity { get; set; }
public decimal out_of_stock { get; set; }
public decimal sales_1 { get; set; }
public decimal sales_7 { get; set; }
public decimal sales_14 { get; set; }
public decimal sales_30 { get; set; }
public decimal stock_amount_1 { get; set; }
public decimal out_stock_30 { get; set; }
public decimal put_stock_30 { get; set; }
public int available_days { get; set; }
}
}
......@@ -21,7 +21,8 @@ namespace Bailun.DC.LogicWareHouse
//static void Main(string[] args)
//{
// new Services().Save();
// //new Services().Save();
// new Services().SaleWHDailySnaps();
//}
}
}
......@@ -77,7 +77,7 @@ namespace Bailun.DC.Web.Controllers
public ActionResult Main()
{
#if DEBUG
var cookie = "Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IjdhZDA5MjQ5ZDk0ZDgxN2VhNmI5ZThhMTc1MzlmNmY3IiwidHlwIjoiSldUIn0.eyJuYmYiOjE1OTk0NjE2NjgsImV4cCI6MTU5OTQ5NzY2OCwiaXNzIjoiaHR0cDovL2xvY2FsaG9zdDo1MDAxIiwiYXVkIjpbImh0dHA6Ly9sb2NhbGhvc3Q6NTAwMS9yZXNvdXJjZXMiLCJiYWlsdW5BcGkiXSwiY2xpZW50X2lkIjoiYmFpbHVuQ2xpZW50Iiwic3ViIjoi5YWz5oyv5bGxIiwiYXV0aF90aW1lIjoxNTk5NDYxNjY4LCJpZHAiOiJsb2NhbCIsIlVzZXJJZCI6IjIzNDYiLCJzdWNlc3NzIjoidHJ1ZSIsIkNvbXBhbnkiOiJ7XCJJZFwiOjEsXCJDb21wYW55Q29kZVwiOlwiYmFpbHVuXCIsXCJDb21wYW55TmFtZVwiOlwi5b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ZXJJZCI6IjIzNDYiLCJzdWNlc3NzIjoidHJ1ZSIsIkNvbXBhbnkiOiJ7XCJJZFwiOjEsXCJDb21wYW55Q29kZVwiOlwiYmFpbHVuXCIsXCJDb21wYW55TmFtZVwiOlwi5bm_5bee55m-5Lym5L6b5bqU6ZO-5pyJ6ZmQ5YWs5Y-4XCJ9IiwiQWxsQ29tcGFueSI6IkZhbHNlIiwiVXNlckNvZGVOZXciOiJCTDExNjkiLCJVc2VyQ29kZSI6IkJMMTE3MCIsIk9hVXNlcklkIjoiMjM0NiIsIkRlcGFydG1lbnQiOiJ7XCJEZXBhcnRtZW50SWRcIjoyNTgsXCJOYW1lXCI6XCLmlbDmja7kuK3lv4NcIixcIkNvZGVcIjpcIlwifSIsInNjb3BlIjpbIm9wZW5pZCIsInByb2ZpbGUiLCJiYWlsdW5BcGkiXSwiYW1yIjpbImN1c3RvbSJdfQ.D01p7v4Jmj1qjdVItNTSgpqJ5yWbmlp1EzNY_bYGxZIJB6DE8gwlvmVfeBFLx_IePjCfXDflXn3QIr-HwZ2ato72IRs3LZj4N__pwqxVFAGSkyHUFY0DNtg2YA0DX6AeAhb7cwQqEZKYcs-HhoSm7Vy0j56wBbFC13FSXHxU817YRFqLw5kdgEogcvrxmAA8XdPD6EGdfZeSkBh5bcTbmOhzR3JMo7xUiZp5iiMGOiGu70r6xG2M_7lTLCqStaawNL9SCA1WOsOEO86ZMWzO48xzMKTgYuXMVK3jTjPSa8rlnwqDPBfiqF5qzQVFyuAuuaThNtsK0vzAh3pL4i28qA";
#else
//var user = Common.HttpHelper.NetHelper.Request("http://sso.bailuntec.com/GetUserResource");
var cookie = HttpContext.Request.Cookies["BailunToken"];
......
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