Commit 9d86e1e4 by 泽锋 李

平台费接口对接

parent d7412f6c
...@@ -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);
} }
} }
......
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; }
}
}
...@@ -45,4 +45,6 @@ namespace AutoTurnOver.Models.ApiDto ...@@ -45,4 +45,6 @@ namespace AutoTurnOver.Models.ApiDto
} }
} }
...@@ -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"
} }
...@@ -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"
} }
...@@ -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
...@@ -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
...@@ -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"
} }
...@@ -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"
} }
...@@ -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"
} }
...@@ -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("结束初始化调拨费用+采购费用");
}); });
......
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