Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
data-center-auto
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bltdc
data-center-auto
Commits
0f892b2f
Commit
0f892b2f
authored
Aug 31, 2020
by
泽锋 李
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增调拨费同步任务
parent
5c65111a
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
136 additions
and
3 deletions
+136
-3
ApiUtility.cs
AutoTurnOver.DB/ApiUtility.cs
+33
-0
report_cash_flow_dao.cs
AutoTurnOver.DB/report_cash_flow_dao.cs
+0
-0
api_transfer_cost_real_dto.cs
AutoTurnOver.Models/ApiDto/api_transfer_cost_real_dto.cs
+58
-0
dc_base_transfer_cost_real.cs
AutoTurnOver.Models/dc_base_transfer_cost_real.cs
+17
-0
Program.cs
ResetOutofstock/Program.cs
+2
-0
ResetOutofstockBackgrounService.cs
ResetOutofstock/ResetOutofstockBackgrounService.cs
+19
-0
appsettings.dev.json
ResetOutofstock/appsettings.dev.json
+2
-1
appsettings.json
ResetOutofstock/appsettings.json
+2
-1
appsettings.prod.json
ResetOutofstock/appsettings.prod.json
+3
-1
No files found.
AutoTurnOver.DB/ApiUtility.cs
View file @
0f892b2f
...
@@ -201,5 +201,38 @@ namespace AutoTurnOver.DB
...
@@ -201,5 +201,38 @@ namespace AutoTurnOver.DB
throw
new
Exception
(
" lms 接口异常: "
+
ex
.
StackTrace
);
throw
new
Exception
(
" lms 接口异常: "
+
ex
.
StackTrace
);
}
}
}
}
/// <summary>
/// 获取调拨单真实费用
/// </summary>
/// <param name="data"></param>
/// <returns></returns>
public
static
List
<
api_transfer_cost_real_dto
.
data_dto
.
items_dto
>
GetTransferCost
(
api_transfer_cost_real_input_dto
data
)
{
try
{
//查询采购建议明细
string
url
=
ConfigHelper
.
GetValue
(
"transfer_cost_real"
);
string
resultStr
=
HttpHelper
.
Request
(
url
,
RequestType
.
POST
,
data
.
ToJson
(),
"application/json"
,
timeout
:
1000
*
60
*
60
*
24
);
var
result
=
resultStr
.
ToObj
<
api_transfer_cost_real_dto
>();
if
(
result
==
null
)
{
throw
new
Exception
(
"未获取响应数据"
);
}
else
{
if
(!
result
.
isSuccess
)
{
throw
new
Exception
(
result
.
message
);
}
return
result
.
data
.
items
;
}
}
catch
(
Exception
ex
)
{
throw
new
Exception
(
"调拨费用同步接口 异常: "
+
ex
.
Message
);
throw
new
Exception
(
"调拨费用同步接口 接口异常: "
+
ex
.
StackTrace
);
}
}
}
}
}
}
AutoTurnOver.DB/report_cash_flow_dao.cs
View file @
0f892b2f
This diff is collapsed.
Click to expand it.
AutoTurnOver.Models/ApiDto/api_transfer_cost_real_dto.cs
0 → 100644
View file @
0f892b2f
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
AutoTurnOver.Models.ApiDto
{
/// <summary>
/// 调拨系统获取真实费用
/// </summary>
public
class
api_transfer_cost_real_dto
{
public
bool
isSuccess
{
get
;
set
;
}
public
string
message
{
get
;
set
;
}
public
data_dto
data
{
get
;
set
;
}
public
class
data_dto
{
public
List
<
items_dto
>
items
{
get
;
set
;
}
public
class
items_dto
{
public
int
id
{
get
;
set
;
}
public
string
boxCode
{
get
;
set
;
}
public
string
orderCode
{
get
;
set
;
}
public
decimal
blCost
{
get
;
set
;
}
public
decimal
blWeight
{
get
;
set
;
}
public
decimal
logisticCost
{
get
;
set
;
}
public
decimal
logisticWeight
{
get
;
set
;
}
public
List
<
skus_dto
>
skus
{
get
;
set
;
}
public
class
skus_dto
{
public
string
sku
{
get
;
set
;
}
public
string
skuTitle
{
get
;
set
;
}
public
int
deliveryCount
{
get
;
set
;
}
public
int
storageCount
{
get
;
set
;
}
public
decimal
weight
{
get
;
set
;
}
public
decimal
skuAvgCost
{
get
;
set
;
}
}
}
}
}
public
class
api_transfer_cost_real_input_dto
{
public
data_dto
data
{
get
;
set
;
}
public
class
data_dto
{
public
page_dto
page
{
get
;
set
;
}
public
class
page_dto
{
public
int
page
{
get
;
set
;
}
public
int
rows
{
get
;
set
;
}
}
}
}
}
AutoTurnOver.Models/dc_base_transfer_cost_real.cs
0 → 100644
View file @
0f892b2f
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
AutoTurnOver.Models
{
/// <summary>
/// 财务结算后的真实运费
/// </summary>
public
class
dc_base_transfer_cost_real
{
public
int
id
{
get
;
set
;
}
public
string
transfer_order_id
{
get
;
set
;
}
public
string
bailun_sku
{
get
;
set
;
}
public
decimal
sku_avg_cost
{
get
;
set
;
}
}
}
ResetOutofstock/Program.cs
View file @
0f892b2f
...
@@ -16,6 +16,8 @@ namespace ResetOutofstock
...
@@ -16,6 +16,8 @@ namespace ResetOutofstock
var
now
=
DateTime
.
Now
;
var
now
=
DateTime
.
Now
;
//report_cash_flow_dao.CalculationTransferOrder(now.AddMonths(-3), DateTime.Parse(now.AddDays(-1).ToString("yyyy-MM-dd 23:59:59")));
//report_cash_flow_dao.CalculationTransferOrder(now.AddMonths(-3), DateTime.Parse(now.AddDays(-1).ToString("yyyy-MM-dd 23:59:59")));
var
builder
=
new
HostBuilder
().
ConfigureServices
((
hostContext
,
services
)
=>
var
builder
=
new
HostBuilder
().
ConfigureServices
((
hostContext
,
services
)
=>
{
{
services
.
AddHostedService
<
ResetOutofstockBackgrounService
>();
services
.
AddHostedService
<
ResetOutofstockBackgrounService
>();
...
...
ResetOutofstock/ResetOutofstockBackgrounService.cs
View file @
0f892b2f
...
@@ -129,6 +129,25 @@ namespace ResetOutofstock
...
@@ -129,6 +129,25 @@ namespace ResetOutofstock
Thread
.
Sleep
(
5
*
60
*
1000
);
Thread
.
Sleep
(
5
*
60
*
1000
);
}
}
});
Task
.
Factory
.
StartNew
(()
=>
{
while
(
true
)
{
try
{
Console
.
WriteLine
(
$"开始同步真实调拨费,线程Id:
{
Thread
.
CurrentThread
.
ManagedThreadId
}
,
{
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)}
"
);
report_cash_flow_dao
.
SynchroTransferCost
();
Console
.
WriteLine
(
$"结束同步真实调拨费,线程Id:
{
Thread
.
CurrentThread
.
ManagedThreadId
}
,
{
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)}
"
);
}
catch
(
Exception
ex
)
{
Console
.
WriteLine
(
ex
.
Message
);
}
Thread
.
Sleep
(
60
*
60
*
1000
);
}
});
});
...
...
ResetOutofstock/appsettings.dev.json
View file @
0f892b2f
...
@@ -11,5 +11,6 @@
...
@@ -11,5 +11,6 @@
},
},
"WipStockUrl"
:
"http://mjzz.bailuntec.com/api/FullStockPageList"
,
"WipStockUrl"
:
"http://mjzz.bailuntec.com/api/FullStockPageList"
,
"Lms_GetLogistics"
:
"http://lms.bailuntec.com/api/DataInfo/ApiLogistics/GetLogistics"
,
"Lms_GetLogistics"
:
"http://lms.bailuntec.com/api/DataInfo/ApiLogistics/GetLogistics"
,
"PPSSkuStatus"
:
"http://pps.bailuntec.com/Api/Centre/Publish/External/SkuStatus"
"PPSSkuStatus"
:
"http://pps.bailuntec.com/Api/Centre/Publish/External/SkuStatus"
,
"transfer_cost_real"
:
"http://api.wms.bailuntec.com/api/services/app/OrderLogisticCostService/GetOrderLogisticCostPageList"
}
}
ResetOutofstock/appsettings.json
View file @
0f892b2f
...
@@ -12,5 +12,6 @@
...
@@ -12,5 +12,6 @@
"PPS_ShortagePush"
:
"http://bltpro.bailuntec.com/api/EbayTask/PushSkuEditQtyTask"
,
"PPS_ShortagePush"
:
"http://bltpro.bailuntec.com/api/EbayTask/PushSkuEditQtyTask"
,
"WipStockUrl"
:
"http://mjzz.bailuntec.com/api/FullStockPageList"
,
"WipStockUrl"
:
"http://mjzz.bailuntec.com/api/FullStockPageList"
,
"Lms_GetLogistics"
:
"http://lms.bailuntec.com/api/DataInfo/ApiLogistics/GetLogistics"
,
"Lms_GetLogistics"
:
"http://lms.bailuntec.com/api/DataInfo/ApiLogistics/GetLogistics"
,
"PPSSkuStatus"
:
"http://pps.bailuntec.com/Api/Centre/Publish/External/SkuStatus"
"PPSSkuStatus"
:
"http://pps.bailuntec.com/Api/Centre/Publish/External/SkuStatus"
,
"transfer_cost_real"
:
"http://api.wms.bailuntec.com/api/services/app/OrderLogisticCostService/GetOrderLogisticCostPageList"
}
}
ResetOutofstock/appsettings.prod.json
View file @
0f892b2f
...
@@ -11,5 +11,6 @@
...
@@ -11,5 +11,6 @@
},
},
"WipStockUrl"
:
"http://mjzz.bailuntec.com/api/FullStockPageList"
,
"WipStockUrl"
:
"http://mjzz.bailuntec.com/api/FullStockPageList"
,
"Lms_GetLogistics"
:
"http://lms.bailuntec.com/api/DataInfo/ApiLogistics/GetLogistics"
,
"Lms_GetLogistics"
:
"http://lms.bailuntec.com/api/DataInfo/ApiLogistics/GetLogistics"
,
"PPSSkuStatus"
:
"http://pps.bailuntec.com/Api/Centre/Publish/External/SkuStatus"
"PPSSkuStatus"
:
"http://pps.bailuntec.com/Api/Centre/Publish/External/SkuStatus"
,
"transfer_cost_real"
:
"http://api.wms.bailuntec.com/api/services/app/OrderLogisticCostService/GetOrderLogisticCostPageList"
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment