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
9d86e1e4
Commit
9d86e1e4
authored
Aug 11, 2020
by
泽锋 李
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
平台费接口对接
parent
d7412f6c
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
126 additions
and
12 deletions
+126
-12
ApiUtility.cs
AutoTurnOver.DB/ApiUtility.cs
+32
-3
api_plat_category_dto.cs
AutoTurnOver.Models/ApiDto/api_plat_category_dto.cs
+35
-0
api_platform_fee_input_dto.cs
AutoTurnOver.Models/ApiDto/api_platform_fee_input_dto.cs
+2
-0
appsettings.dev.json
AutoTurnOver.Purchase.AverageTarget/appsettings.dev.json
+2
-1
appsettings.json
AutoTurnOver.Purchase.AverageTarget/appsettings.json
+2
-1
appsettings.prod.json
AutoTurnOver.Purchase.AverageTarget/appsettings.prod.json
+3
-1
CommonController.cs
AutoTurnOver/Controllers/CommonController.cs
+43
-1
appsettings.Development.json
AutoTurnOver/appsettings.Development.json
+2
-1
appsettings.Production.json
AutoTurnOver/appsettings.Production.json
+2
-1
appsettings.json
AutoTurnOver/appsettings.json
+2
-1
ResetOutofstockBackgrounService.cs
ResetOutofstock/ResetOutofstockBackgrounService.cs
+1
-2
No files found.
AutoTurnOver.DB/ApiUtility.cs
View file @
9d86e1e4
...
@@ -119,7 +119,7 @@ namespace AutoTurnOver.DB
...
@@ -119,7 +119,7 @@ namespace AutoTurnOver.DB
var
result
=
resultStr
.
ToObj
<
api_platform_fee_result_dto
>();
var
result
=
resultStr
.
ToObj
<
api_platform_fee_result_dto
>();
if
(
result
==
null
)
if
(
result
==
null
)
{
{
return
new
api_platform_fee_result_dto
.
result_dto
()
{
};
return
new
api_platform_fee_result_dto
.
result_dto
()
{};
}
}
else
else
{
{
...
@@ -128,8 +128,37 @@ namespace AutoTurnOver.DB
...
@@ -128,8 +128,37 @@ namespace AutoTurnOver.DB
}
}
catch
(
Exception
ex
)
catch
(
Exception
ex
)
{
{
throw
new
Exception
(
"平台费 接口异常: "
+
ex
.
Message
);
return
new
api_platform_fee_result_dto
.
result_dto
()
{
};
throw
new
Exception
(
"平台费 接口异常: "
+
ex
.
StackTrace
);
//throw new Exception("平台费 接口异常: " + ex.Message);
//throw new Exception("平台费 接口异常: " + ex.StackTrace);
}
}
/// <summary>
/// 获取平台分类
/// </summary>
/// <returns></returns>
public
static
List
<
api_plat_category_dto
>
GetPlatformCategory
(
api_platform_category_input_dto
data
)
{
try
{
//查询采购建议明细
string
url
=
ConfigHelper
.
GetValue
(
"api_plat_category"
);
string
resultStr
=
HttpHelper
.
Request
(
url
+
$"?plat=
{
data
.
plat
}
&site=
{
data
.
site
}
"
,
RequestType
.
GET
,
timeout
:
1000
*
60
*
60
*
24
);
var
result
=
resultStr
.
ToObj
<
api_platform_category_result_dto
>();
if
(
result
==
null
)
{
return
new
List
<
api_plat_category_dto
>(){
}
;
}
else
{
return
result
.
result
;
}
}
catch
(
Exception
ex
)
{
throw
new
Exception
(
"平台分类 接口异常: "
+
ex
.
Message
);
throw
new
Exception
(
"平台分类 接口异常: "
+
ex
.
StackTrace
);
}
}
}
}
...
...
AutoTurnOver.Models/ApiDto/api_plat_category_dto.cs
0 → 100644
View file @
9d86e1e4
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
AutoTurnOver.Models.ApiDto
{
public
class
api_platform_category_result_dto
{
public
List
<
api_plat_category_dto
>
result
{
get
;
set
;
}
}
/// <summary>
/// 平台分类
/// </summary>
public
class
api_plat_category_dto
{
public
string
plat
{
get
;
set
;
}
public
string
site
{
get
;
set
;
}
public
int
bailunCategoryId
{
get
;
set
;
}
public
int
platCategoryId
{
get
;
set
;
}
public
string
platCategory
{
get
;
set
;
}
/// <summary>
/// 费率
/// </summary>
public
decimal
categoryRate
{
get
;
set
;
}
}
public
class
api_platform_category_input_dto
{
public
string
plat
{
get
;
set
;
}
public
string
site
{
get
;
set
;
}
}
}
AutoTurnOver.Models/ApiDto/api_platform_fee_input_dto.cs
View file @
9d86e1e4
...
@@ -45,4 +45,6 @@ namespace AutoTurnOver.Models.ApiDto
...
@@ -45,4 +45,6 @@ namespace AutoTurnOver.Models.ApiDto
}
}
}
}
AutoTurnOver.Purchase.AverageTarget/appsettings.dev.json
View file @
9d86e1e4
...
@@ -5,5 +5,6 @@
...
@@ -5,5 +5,6 @@
"PPSSkuStatus"
:
"http://pps.bailuntec.com/Api/Centre/Publish/External/SkuStatus"
,
"PPSSkuStatus"
:
"http://pps.bailuntec.com/Api/Centre/Publish/External/SkuStatus"
,
"ApiLogisticsGetFilterLogisticsAssignLine"
:
"http://lms.bailuntec.com/api/Logistics/ApiLogistics/GetFilterLogisticsAssignLine"
,
"ApiLogisticsGetFilterLogisticsAssignLine"
:
"http://lms.bailuntec.com/api/Logistics/ApiLogistics/GetFilterLogisticsAssignLine"
,
"Lms_GetLogistics"
:
"http://lms.bailuntec.com/api/DataInfo/ApiLogistics/GetLogistics"
,
"Lms_GetLogistics"
:
"http://lms.bailuntec.com/api/DataInfo/ApiLogistics/GetLogistics"
,
"PostPlatCategoryRate"
:
"http://test.profit.bailuntec.com/api/platfee/ProfitPlatfee/PostPlatCategoryRate"
"PostPlatCategoryRate"
:
"http://test.profit.bailuntec.com/api/platfee/ProfitPlatfee/PostPlatCategoryRate"
,
"api_plat_category"
:
"http://doc.bailuntec.com:6040/profitplatfee/getplatcategory"
}
}
AutoTurnOver.Purchase.AverageTarget/appsettings.json
View file @
9d86e1e4
...
@@ -5,5 +5,6 @@
...
@@ -5,5 +5,6 @@
"PPSSkuStatus"
:
"http://pps.bailuntec.com/Api/Centre/Publish/External/SkuStatus"
,
"PPSSkuStatus"
:
"http://pps.bailuntec.com/Api/Centre/Publish/External/SkuStatus"
,
"ApiLogisticsGetFilterLogisticsAssignLine"
:
"http://lms.bailuntec.com/api/Logistics/ApiLogistics/GetFilterLogisticsAssignLine"
,
"ApiLogisticsGetFilterLogisticsAssignLine"
:
"http://lms.bailuntec.com/api/Logistics/ApiLogistics/GetFilterLogisticsAssignLine"
,
"Lms_GetLogistics"
:
"http://lms.bailuntec.com/api/DataInfo/ApiLogistics/GetLogistics"
,
"Lms_GetLogistics"
:
"http://lms.bailuntec.com/api/DataInfo/ApiLogistics/GetLogistics"
,
"PostPlatCategoryRate"
:
"http://test.profit.bailuntec.com/api/platfee/ProfitPlatfee/PostPlatCategoryRate"
"PostPlatCategoryRate"
:
"http://test.profit.bailuntec.com/api/platfee/ProfitPlatfee/PostPlatCategoryRate"
,
"api_plat_category"
:
"http://doc.bailuntec.com:6040/profitplatfee/getplatcategory"
}
}
AutoTurnOver.Purchase.AverageTarget/appsettings.prod.json
View file @
9d86e1e4
...
@@ -5,5 +5,6 @@
...
@@ -5,5 +5,6 @@
"PPSSkuStatus"
:
"http://pps.bailuntec.com/Api/Centre/Publish/External/SkuStatus"
,
"PPSSkuStatus"
:
"http://pps.bailuntec.com/Api/Centre/Publish/External/SkuStatus"
,
"ApiLogisticsGetFilterLogisticsAssignLine"
:
"http://lms.bailuntec.com/api/Logistics/ApiLogistics/GetFilterLogisticsAssignLine"
,
"ApiLogisticsGetFilterLogisticsAssignLine"
:
"http://lms.bailuntec.com/api/Logistics/ApiLogistics/GetFilterLogisticsAssignLine"
,
"Lms_GetLogistics"
:
"http://lms.bailuntec.com/api/DataInfo/ApiLogistics/GetLogistics"
,
"Lms_GetLogistics"
:
"http://lms.bailuntec.com/api/DataInfo/ApiLogistics/GetLogistics"
,
"PostPlatCategoryRate"
:
"http://172.31.255.11/api/platfee/ProfitPlatfee/PostPlatCategoryRate"
"PostPlatCategoryRate"
:
"http://172.31.255.11/api/platfee/ProfitPlatfee/PostPlatCategoryRate"
,
"api_plat_category"
:
"http://doc.bailuntec.com:6040/profitplatfee/getplatcategory"
}
}
\ No newline at end of file
AutoTurnOver/Controllers/CommonController.cs
View file @
9d86e1e4
...
@@ -174,7 +174,7 @@ namespace AutoTurnOver.Controllers
...
@@ -174,7 +174,7 @@ namespace AutoTurnOver.Controllers
}
}
public
JsonResult
PlatformtypeWebsiteList
(
string
platform_type
)
public
JsonResult
PlatformtypeWebsiteList
(
string
platform_type
)
{
{
var
datas
=
ApiServices
.
PlatformtypeWebsiteList
(
platform_type
).
GroupBy
(
s
=>
s
.
website
).
Select
(
s
=>
new
{
website
=
s
.
Key
}).
ToList
();
var
datas
=
ApiServices
.
PlatformtypeWebsiteList
(
platform_type
).
GroupBy
(
s
=>
s
.
website
).
Select
(
s
=>
new
{
website
=
s
.
Key
}).
ToList
();
return
new
JsonResult
(
datas
);
return
new
JsonResult
(
datas
);
}
}
...
@@ -309,5 +309,46 @@ namespace AutoTurnOver.Controllers
...
@@ -309,5 +309,46 @@ namespace AutoTurnOver.Controllers
}
}
}
}
/// <summary>
/// 查询平台分类
/// </summary>
/// <param name="m"></param>
/// <returns></returns>
public
JsonResult
GetPlatformCategory
(
string
plat
,
string
site
,
string
name
)
{
var
result
=
ApiUtility
.
GetPlatformCategory
(
new
api_platform_category_input_dto
{
site
=
site
,
plat
=
plat
}).
Where
(
s
=>
s
.
platCategory
.
Contains
(
name
));
return
new
JsonResult
(
result
.
Select
(
p
=>
new
{
id
=
p
.
platCategoryId
,
text
=
p
.
platCategory
}));
}
[
HttpPost
]
public
JsonResult
GetPlatformFee
([
FromBody
]
api_platform_fee_input_dto
m
)
{
try
{
var
result
=
ApiUtility
.
GetPlatformFee
(
m
);
return
new
JsonResult
(
new
{
data
=
result
,
success
=
true
});
}
catch
(
Exception
ex
)
{
return
new
JsonResult
(
new
{
success
=
false
,
message
=
ex
.
Message
});
}
}
}
}
}
}
\ No newline at end of file
AutoTurnOver/appsettings.Development.json
View file @
9d86e1e4
...
@@ -42,5 +42,6 @@
...
@@ -42,5 +42,6 @@
"Saas_Departments"
:
"http://sso.bailuntec.com/GetDepartmentsByCompanyId"
,
"Saas_Departments"
:
"http://sso.bailuntec.com/GetDepartmentsByCompanyId"
,
"Saas_GetMenus"
:
"http://sso.bailuntec.com/GetMenus"
,
"Saas_GetMenus"
:
"http://sso.bailuntec.com/GetMenus"
,
"ApiLogisticsGetFilterLogisticsAssignLine"
:
"http://lms.bailuntec.com/api/Logistics/ApiLogistics/GetFilterLogisticsAssignLine"
,
"ApiLogisticsGetFilterLogisticsAssignLine"
:
"http://lms.bailuntec.com/api/Logistics/ApiLogistics/GetFilterLogisticsAssignLine"
,
"PostPlatCategoryRate"
:
"http://test.profit.bailuntec.com/api/platfee/ProfitPlatfee/PostPlatCategoryRate"
"PostPlatCategoryRate"
:
"http://test.profit.bailuntec.com/api/platfee/ProfitPlatfee/PostPlatCategoryRate"
,
"api_plat_category"
:
"http://doc.bailuntec.com:6040/profitplatfee/getplatcategory"
}
}
AutoTurnOver/appsettings.Production.json
View file @
9d86e1e4
...
@@ -42,5 +42,6 @@
...
@@ -42,5 +42,6 @@
"Saas_Departments"
:
"http://sso.bailuntec.com/GetDepartmentsByCompanyId"
,
"Saas_Departments"
:
"http://sso.bailuntec.com/GetDepartmentsByCompanyId"
,
"Saas_GetMenus"
:
"http://sso.bailuntec.com/GetMenus"
,
"Saas_GetMenus"
:
"http://sso.bailuntec.com/GetMenus"
,
"ApiLogisticsGetFilterLogisticsAssignLine"
:
"http://lms.bailuntec.com/api/Logistics/ApiLogistics/GetFilterLogisticsAssignLine"
,
"ApiLogisticsGetFilterLogisticsAssignLine"
:
"http://lms.bailuntec.com/api/Logistics/ApiLogistics/GetFilterLogisticsAssignLine"
,
"PostPlatCategoryRate"
:
"http://172.31.255.11/api/platfee/ProfitPlatfee/PostPlatCategoryRate"
"PostPlatCategoryRate"
:
"http://172.31.255.11/api/platfee/ProfitPlatfee/PostPlatCategoryRate"
,
"api_plat_category"
:
"http://doc.bailuntec.com:6040/profitplatfee/getplatcategory"
}
}
AutoTurnOver/appsettings.json
View file @
9d86e1e4
...
@@ -42,5 +42,6 @@
...
@@ -42,5 +42,6 @@
"Saas_Departments"
:
"http://sso.bailuntec.com/GetDepartmentsByCompanyId"
,
"Saas_Departments"
:
"http://sso.bailuntec.com/GetDepartmentsByCompanyId"
,
"Saas_GetMenus"
:
"http://sso.bailuntec.com/GetMenus"
,
"Saas_GetMenus"
:
"http://sso.bailuntec.com/GetMenus"
,
"ApiLogisticsGetFilterLogisticsAssignLine"
:
"http://lms.bailuntec.com/api/Logistics/ApiLogistics/GetFilterLogisticsAssignLine"
,
"ApiLogisticsGetFilterLogisticsAssignLine"
:
"http://lms.bailuntec.com/api/Logistics/ApiLogistics/GetFilterLogisticsAssignLine"
,
"PostPlatCategoryRate"
:
"http://test.profit.bailuntec.com/api/platfee/ProfitPlatfee/PostPlatCategoryRate"
"PostPlatCategoryRate"
:
"http://test.profit.bailuntec.com/api/platfee/ProfitPlatfee/PostPlatCategoryRate"
,
"api_plat_category"
:
"http://doc.bailuntec.com:6040/profitplatfee/getplatcategory"
}
}
ResetOutofstock/ResetOutofstockBackgrounService.cs
View file @
9d86e1e4
...
@@ -18,8 +18,7 @@ namespace ResetOutofstock
...
@@ -18,8 +18,7 @@ namespace ResetOutofstock
{
{
Console
.
WriteLine
(
"开始初始化调拨费用+采购费用"
);
Console
.
WriteLine
(
"开始初始化调拨费用+采购费用"
);
var
now
=
DateTime
.
Now
;
var
now
=
DateTime
.
Now
;
report_cash_flow_dao
.
CalculationPurchaseOrder
(
now
.
AddMonths
(-
3
),
DateTime
.
Parse
(
now
.
AddDays
(-
1
).
ToString
(
"yyyy-MM-dd 23:59:59"
)));
report
.
ResetCashFlowData
();
report_cash_flow_dao
.
CalculationTransferOrder
(
now
.
AddMonths
(-
3
),
DateTime
.
Parse
(
now
.
AddDays
(-
1
).
ToString
(
"yyyy-MM-dd 23:59:59"
)));
Console
.
WriteLine
(
"结束初始化调拨费用+采购费用"
);
Console
.
WriteLine
(
"结束初始化调拨费用+采购费用"
);
});
});
...
...
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