Commit d1f44cc9 by guanzhenshan

调整同步财务分类服务

parent b0810d4a
using System;
using System.Collections.Generic;
using System.Text;
namespace Bailun.DC.DailyLogisticSupplierTransaction.Models
{
/// <summary>
/// 物流供应商往来供应商配置
/// </summary>
public class dc_logistics_supplier_config
{
public int id { get; set; }
public string suppliername { get; set; }
public string parentsuppliername { get; set; }
/// <summary>
/// 类型,1:需合并的,2:需删除不统计的
/// </summary>
public int type { get; set; }
public DateTime lastupdatetime { get; set; }
public int lastupdateuserid { get; set; }
public string lastupdateusername { get; set; }
public int delstatus { get; set; }
}
}
......@@ -11,23 +11,23 @@ namespace Bailun.DC.SyncSkuFinanceCategory
/// 同步sku财务分类
/// </summary>
/// <param name="args"></param>
//static async Task Main(string[] args)
//{
// Console.WriteLine("启动服务 " + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
// var builder = new HostBuilder().ConfigureServices((hostContext, services) =>
// {
// services.AddHostedService<Services>();
// });
static async Task Main(string[] args)
{
Console.WriteLine("启动服务 " + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
var builder = new HostBuilder().ConfigureServices((hostContext, services) =>
{
services.AddHostedService<Services>();
});
// await builder.RunConsoleAsync();
//}
await builder.RunConsoleAsync();
}
static void Main(string[] args)
{
//Console.WriteLine("Hello World!");
//static void Main(string[] args)
//{
// //Console.WriteLine("Hello World!");
new Services().Init();
// new Services().Init();
}
//}
}
}
......@@ -49,6 +49,7 @@ namespace Bailun.DC.SyncSkuFinanceCategory
public void Init()
{
var page = 0;
var pagesize = 1000;
var count = 0;
......@@ -82,7 +83,7 @@ namespace Bailun.DC.SyncSkuFinanceCategory
foreach (var item in list)
{
cn.Execute("delete from dc_base_sku_finance_category where bailuncategoryid=" + item.bailunCategoryId + " and financecategoryid=" + item.platCateoryId);
cn.Execute("delete from dc_base_sku_finance_category where bailuncategoryid=" + item.bailunCategoryId);
var m = new Models.dc_base_sku_finance_category {
bailuncategoryid = item.bailunCategoryId,
......
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