Commit 8c3a1ab7 by huangruiyao

aims日志记录功能

parent 9165f31d
......@@ -10,5 +10,9 @@
},
"QiYeJiQiRen": "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=5fa4c1d5-ce65-4e8a-9ae9-a0d689a13b65",
"GetSchedulings": "http://oa.bailuntec.com/Api/Cq/GetSchedulings?userID=1922",
"postaveragesales": "http://doc.bailuntec.com:6032/postaveragesales"
"postaveragesales": "http://doc.bailuntec.com:6032/postaveragesales",
"BrowseLogSetting": {
"Url": "http://saas.admin.bailuntec.com/Api/Ssoadmin/operationloginfo/addoperationloginfo",
"CanLog": "yes"
}
}
......@@ -10,5 +10,9 @@
},
"QiYeJiQiRen": "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=5fa4c1d5-ce65-4e8a-9ae9-a0d689a13b65",
"GetSchedulings": "http://oa.bailuntec.com/Api/Cq/GetSchedulings?userID=1922",
"postaveragesales": "http://10.0.6.27/api/pds/postaveragesales"
"postaveragesales": "http://10.0.6.27/api/pds/postaveragesales",
"BrowseLogSetting": {
"Url": "http://saas.admin.bailuntec.com/Api/Ssoadmin/operationloginfo/addoperationloginfo",
"CanLog": "yes"
}
}
......@@ -10,5 +10,9 @@
},
"QiYeJiQiRen": "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=5fa4c1d5-ce65-4e8a-9ae9-a0d689a13b65",
"GetSchedulings": "http://oa.bailuntec.com/Api/Cq/GetSchedulings?userID=1922",
"postaveragesales": "http://10.0.6.27/api/pds/postaveragesales"
"postaveragesales": "http://10.0.6.27/api/pds/postaveragesales",
"BrowseLogSetting": {
"Url": "http://saas.admin.bailuntec.com/Api/Ssoadmin/operationloginfo/addoperationloginfo",
"CanLog": "yes"
}
}
\ No newline at end of file
......@@ -2,7 +2,7 @@
using AutoTurnOver.Models;
using AutoTurnOver.Models.Base;
using AutoTurnOver.Models.Report;
using Bailun.ServiceFabric.Core;
using Bailun.ServiceFabric;
using Dapper;
using System;
using System.Collections.Generic;
......
......@@ -6,5 +6,9 @@
"ApiLogisticsGetFilterLogisticsAssignLine": "http://lms.bailuntec.com/api/Logistics/ApiLogistics/GetFilterLogisticsAssignLine",
"Lms_GetLogistics": "http://lms.bailuntec.com/api/DataInfo/ApiLogistics/GetLogistics",
"PostPlatCategoryRate": "http://test.profit.bailuntec.com/api/platfee/ProfitPlatfee/PostPlatCategoryRate",
"api_plat_category": "http://doc.bailuntec.com:6040/profitplatfee/getplatcategory"
"api_plat_category": "http://doc.bailuntec.com:6040/profitplatfee/getplatcategory",
"BrowseLogSetting": {
"Url": "http://saas.admin.bailuntec.com/Api/Ssoadmin/operationloginfo/addoperationloginfo",
"CanLog": "yes"
}
}
......@@ -6,5 +6,9 @@
"ApiLogisticsGetFilterLogisticsAssignLine": "http://lms.bailuntec.com/api/Logistics/ApiLogistics/GetFilterLogisticsAssignLine",
"Lms_GetLogistics": "http://lms.bailuntec.com/api/DataInfo/ApiLogistics/GetLogistics",
"PostPlatCategoryRate": "http://test.profit.bailuntec.com/api/platfee/ProfitPlatfee/PostPlatCategoryRate",
"api_plat_category": "http://doc.bailuntec.com:6040/profitplatfee/getplatcategory"
"api_plat_category": "http://doc.bailuntec.com:6040/profitplatfee/getplatcategory",
"BrowseLogSetting": {
"Url": "http://saas.admin.bailuntec.com/Api/Ssoadmin/operationloginfo/addoperationloginfo",
"CanLog": "yes"
}
}
......@@ -6,5 +6,9 @@
"ApiLogisticsGetFilterLogisticsAssignLine": "http://lms.bailuntec.com/api/Logistics/ApiLogistics/GetFilterLogisticsAssignLine",
"Lms_GetLogistics": "http://lms.bailuntec.com/api/DataInfo/ApiLogistics/GetLogistics",
"PostPlatCategoryRate": "http://172.31.255.11/api/platfee/ProfitPlatfee/PostPlatCategoryRate",
"api_plat_category": "http://doc.bailuntec.com:6040/profitplatfee/getplatcategory"
"api_plat_category": "http://doc.bailuntec.com:6040/profitplatfee/getplatcategory",
"BrowseLogSetting": {
"Url": "http://saas.admin.bailuntec.com/Api/Ssoadmin/operationloginfo/addoperationloginfo",
"CanLog": "yes"
}
}
\ No newline at end of file
using AutoTurnOver.DB;
using AutoTurnOver.Models;
using AutoTurnOver.Models.ApiDto;
using Bailun.ServiceFabric.Core;
using Bailun.ServiceFabric;
using Dapper;
using MySql.Data.MySqlClient;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text.RegularExpressions;
......
......@@ -7,6 +7,9 @@
<ItemGroup>
<PackageReference Include="Baidu.AI" Version="3.6.14" />
<PackageReference Include="Bailun.ServiceFabric.Authorize" Version="1.0.5" />
<PackageReference Include="Bailun.ServiceFabric.Core" Version="1.2.2" />
<PackageReference Include="Bailun.ServiceFabric.CustomLog" Version="1.0.1" />
<PackageReference Include="Bailun.ServiceFabric.Redis" Version="1.0.1" />
<PackageReference Include="EPPlus.Core" Version="1.5.4" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="2.1.1" />
......
using System;
using Microsoft.AspNetCore.Mvc.Filters;
using System.Net;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using Newtonsoft.Json;
using Bailun.ServiceFabric;
using ConfigManagerConf = Bailun.ServiceFabric.ConfigManagerConf;
namespace AutoTurnOver.Utility
{
public class BrowseLogAttribute : ActionFilterAttribute
{
/// <summary>
/// 项目id
/// </summary>
private readonly string _projectCode;
/// <summary>
/// 模块名称
/// </summary>
private readonly string _moduleName;
/// <summary>
/// 备注信息
/// </summary>
private readonly string _remark;
/// <summary>
/// 操作类型 (0查、1增、2删、3修改)
/// </summary>
private readonly int _operationType;
/// <summary>
/// 此特性负责写浏览日志
/// </summary>
/// <param name="projectId">项目id</param>
/// <param name="moduleName">模块名称</param>
/// <param name="operationType">操作类型 (0查、1增、2删、3修改)</param>
/// <param name="remark">备注信息</param>
public BrowseLogAttribute(string projectCode, string moduleName, int operationType, string remark = "")
{
_projectCode = projectCode;
_moduleName = moduleName;
_operationType = operationType;
_remark = remark;
}
public override void OnActionExecuted(ActionExecutedContext context)
{
try
{
//获取appsetting配置失败暂时直接赋值开启是否开启日志记录功能 “yes”/“no”
string canLogValue = "yes";
// string canLogValue = ConfigManagerConf.GetValue("BrowseLogSetting:CanLog");
if (canLogValue != "yes")
{
return;
}
var userId = context.HttpContext?.User?.GetUid();
if (userId==null)
{
return;
}
var userName = context.HttpContext?.User?.GetUserName();
var companyId = context.HttpContext?.User?.GetCompanyId();
// 执行结果
var isSuccessed = true;
// 执行失败的信息
var execFaildMsg = "";
if (context.Exception != null && context.Result == null)
{
// 方法执行失败 有异常
isSuccessed = false;
execFaildMsg = context.Exception.Message;
}
// 组装写日志的入参
var input = new AddOperationLogInfoInput
{
UserId =Convert.ToInt32(userId ?? 0),
UserName = userName?? "system",
ProjectCode = _projectCode,
OperationType = _operationType,
OperationContent = _moduleName,
OperationTime = DateTime.Now,
IsSuccessed = isSuccessed,
FailInfo = execFaildMsg,
Remarks = _remark,
CompanyId = companyId??"1"
};
//服务配置获取失败直接赋值给url进行日志记录若解决获取配置问题可取消注释 源码:var url = ConfigManagerConf.GetValue("BrowseLogSetting:Url");
var url = "http://saas.admin.bailuntec.com/Api/Ssoadmin/operationloginfo/addoperationloginfo";
var logRes = PostAsync<AddOperationLogInfoInput, AddOperationLogInfoOutput>(url, input);
if (logRes.StatusCode != 200)
{
Console.WriteLine($"写浏览日志失败:{logRes.Message}");
}
}
catch (Exception e)
{
Console.WriteLine(e);
}
}
/// <summary>
/// HttpClient实现Post请求
/// </summary>
/// <typeparam name="T1">传入对象类型</typeparam>
/// <typeparam name="T2">返回对象类型</typeparam>
/// <param name="url"></param>
/// <param name="content"></param>
/// <returns></returns>
public static T2 PostAsync<T1, T2>(string url, T1 content) where T2 : new()
{
if (string.IsNullOrWhiteSpace(url) || content == null)
{
return new T2();
}
try
{
//设置内容压缩
var handler = new HttpClientHandler() { AutomaticDecompression = DecompressionMethods.GZip };
using (var client = new HttpClient(handler))
{
client.DefaultRequestHeaders.Accept.Clear();
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
var postDataJson = JsonConvert.SerializeObject(content, new JsonSerializerSettings()
{
ReferenceLoopHandling = ReferenceLoopHandling.Ignore,
NullValueHandling = NullValueHandling.Ignore
});
var response = client.PostAsync(url, new StringContent(postDataJson, Encoding.UTF8, "application/json")).Result;
//var response = client.PostAsJsonAsync<T1>(url, content).Result;
if (response.IsSuccessStatusCode)
{
var reponseResult = response.Content.ReadAsStringAsync().Result;
var result = JsonConvert.DeserializeObject<T2>(reponseResult, new JsonSerializerSettings()
{
ReferenceLoopHandling = ReferenceLoopHandling.Ignore,
NullValueHandling = NullValueHandling.Ignore
});
return result;
}
return JsonConvert.DeserializeObject<T2>(null, new JsonSerializerSettings()
{
ReferenceLoopHandling = ReferenceLoopHandling.Ignore,
NullValueHandling = NullValueHandling.Ignore
});
//return new T2() { Message = "HTTP响应失败", };
}
}
catch (Exception ex)
{
throw ex;
}
}
public class AddOperationLogInfoOutput
{
/// <summary>
/// 信息
/// </summary>
[JsonProperty("message")]
public string Message { get; set; }
/// <summary>
/// 结果
/// </summary>
[JsonProperty("result")]
public object Result { get; set; }
/// <summary>
/// 状态码
/// </summary>
[JsonProperty("statusCode")]
public int StatusCode { get; set; }
}
public class AddOperationLogInfoInput
{
/// <summary>
///
/// </summary>
public int UserId { get; set; }
/// <summary>
/// 系统id
/// </summary>
public int ProjectId { get; set; }
/// <summary>
/// 系统代码
/// </summary>
public string ProjectCode { get; set; }
/// <summary>
///
/// </summary>
public string UserName { get; set; }
/// <summary>
/// 公司id
/// </summary>
public string CompanyId { get; set; }
/// <summary>
/// 操作类型(0查、1增、2删、3修改)
/// </summary>
public int OperationType { get; set; }
/// <summary>
/// 操作内容
/// </summary>
public string OperationContent { get; set; }
/// <summary>
/// 操作时间
/// </summary>
public DateTime OperationTime { get; set; }
/// <summary>
/// 是否操作成功
/// </summary>
public bool IsSuccessed { get; set; }
/// <summary>
/// 失败原因
/// </summary>
public string FailInfo { get; set; }
/// <summary>
/// 备注
/// </summary>
public string Remarks { get; set; }
}
}
}
\ No newline at end of file
......@@ -35,6 +35,6 @@
</Content>
</ItemGroup>
<ProjectExtensions><VisualStudio><UserProperties /></VisualStudio></ProjectExtensions>
<ProjectExtensions><VisualStudio><UserProperties appsettings_1json__JsonSchema="" /></VisualStudio></ProjectExtensions>
</Project>
......@@ -8,6 +8,7 @@ using System.Threading.Tasks;
using AutoTurnOver.Common;
using AutoTurnOver.Models;
using AutoTurnOver.Services;
using AutoTurnOver.Utility;
using Dapper;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
......@@ -18,6 +19,7 @@ namespace AutoTurnOver.Controllers
[ApiController]
public class CashFlowController : ControllerBase
{
[BrowseLog("Bailun_aims", "访问【百伦自动周转系统】->【现金流】->【报表】->【搜索】页面", 0)]
public JsonResult GetView(DateTime? btime, DateTime? etime, string platform_type, string web_site, string bailun_sku, string warehouse_code)
{
report_cash_flow_view_search_dto search_data = new report_cash_flow_view_search_dto
......@@ -99,7 +101,7 @@ namespace AutoTurnOver.Controllers
memory.Position = 0;
return File(memory, "text/csv", "现金流明细.csv");
}
[BrowseLog("Bailun_aims", "访问【百伦自动周转系统】->【现金流】->【仓库sku现金流列表】->【搜索】页面", 0)]
public JsonResult GetSkuView(int? data_type, string sku_label, string bailun_sku, int offset, int limit, string order, string sort, string buyer_name, string warehousecode, string supplier_name, string warehousetype, int? warehousearea, int? monitor_status = null, string product_type = null)
{
try
......
......@@ -61,6 +61,7 @@ namespace AutoTurnOver.Controllers
/// <param name="limit"></param>
/// <returns></returns>
[UseAction]
[BrowseLog("Bailun_aims", "访问【百伦自动周转系统】->【实时数据】->【实时库存】->【搜索】页面", 0)]
public JsonResult RealtimeList(int? monitor_status, int? searchType, string key_words, string warehousecode, string buyer_name, string supplier_name, int offset, int limit, string order, string sort, string warehousetype, int? warehousearea, int? has_tort = null, string categoryIds = null,
DateTime? start_date = null, DateTime? end_date = null, DateTime? f_start_date = null, DateTime? f_end_date = null, int? product_type = null)
{
......@@ -108,6 +109,7 @@ namespace AutoTurnOver.Controllers
/// <param name="limit"></param>
/// <param name="total"></param>
/// <returns></returns>
[BrowseLog("Bailun_aims", "访问【百伦自动周转系统】->【实时数据】->【修改在线数量日志】->【搜索】页面", 0)]
public JsonResult ShortagePushList(string platform, string bailun_sku, int offset, int limit, DateTime? end_date, DateTime? start_date, string warehousecode, string warehousetype, int? warehousearea)
{
try
......@@ -201,6 +203,7 @@ namespace AutoTurnOver.Controllers
/// </summary>
/// <returns></returns>
[UseAction]
[BrowseLog("Bailun_aims", "访问【百伦自动周转系统】->【实时数据】->【库存监控】->【搜索】页面", 0)]
public JsonResult StockMonitorList(int? type, string bailun_sku, int offset, int limit, string order, string sort,
DateTime? end_date, DateTime? start_date)
{
......@@ -267,7 +270,7 @@ namespace AutoTurnOver.Controllers
});
}
}
[BrowseLog("Bailun_aims", "访问【百伦自动周转系统】->【实时数据】->【刊登监控】->【搜索】页面", 0)]
public JsonResult GetShowField(string warehouse_code)
{
try
......
......@@ -6,6 +6,7 @@ using System.Linq;
using System.Threading.Tasks;
using AutoTurnOver.Common;
using AutoTurnOver.Models;
using AutoTurnOver.Utility;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
......@@ -17,6 +18,7 @@ namespace AutoTurnOver.Controllers
{
[HttpGet]
[UseAction]
[BrowseLog("Bailun_aims", "访问【百伦自动周转系统】->【自动下单管理】->【非jit异常提醒】->【搜索】页面",0)]
public JsonResult List(int limit, int offset, string order, string sort, string sku, string character, string warehousecode, string warehousetype, int? warehousearea,
bool? has_overdue = null, bool? has_confirm = null, bool? has_solve = null,int? err_type = null)
{
......
......@@ -6,6 +6,7 @@ using System.Linq;
using System.Threading.Tasks;
using AutoTurnOver.Common;
using AutoTurnOver.Models.Report;
using AutoTurnOver.Utility;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
......@@ -19,6 +20,7 @@ namespace AutoTurnOver.Controllers
[HttpGet]
[BrowseLog("Bailun_aims", "访问【百伦自动周转系统】->【现金流】->【预测现金流任务】->【搜索】页面", 0)]
public JsonResult Page(int limit, int offset, string order, string sort, string bailun_sku)
{
var m = new dc_report_cash_flow_forecast_task_search_dto
......@@ -38,6 +40,7 @@ namespace AutoTurnOver.Controllers
}
[HttpPost]
[BrowseLog("Bailun_aims", "触发【百伦自动周转系统】->【现金流】->【预测现金流任务】->【新增(修改)】->【保存】操作", 1)]
public JsonResult Save([FromBody]dc_report_cash_flow_forecast_task_input_dto m)
{
try
......
......@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using AutoTurnOver.Models;
using AutoTurnOver.Utility;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
......@@ -16,6 +17,7 @@ namespace AutoTurnOver.Controllers
[HttpGet]
[UseAction]
[BrowseLog("Bailun_aims", "访问【百伦自动周转系统】->【配置】->【动态备货规则】->【搜索】页面", 0)]
public JsonResult JitTagList(int limit, int offset, string order, string sort,int? group_id = null)
{
var total = 0;
......@@ -30,6 +32,7 @@ namespace AutoTurnOver.Controllers
}
[UseAction]
[BrowseLog("Bailun_aims", "访问【百伦自动周转系统】->【日志】->【jit规则日志】->【搜索】页面", 0)]
public JsonResult JitTagLogList(int limit, int offset, string order, string sort,string bailun_sku,DateTime? b_date,DateTime? e_date,int? tag_id = null)
{
var total = 0;
......@@ -58,6 +61,7 @@ namespace AutoTurnOver.Controllers
[HttpPost]
[UseAction]
[BrowseLog("Bailun_aims", "触发【百伦自动周转系统】->【配置】->【动态备货规则】->【新增】->【保存】操作", 1)]
public JsonResult SaveJitTag([FromBody]dc_auto_jit_tag m)
{
var result = new Services.JitTagServices().SaveJitTag(m, "");
......
......@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using AutoTurnOver.Models;
using AutoTurnOver.Utility;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
......@@ -17,6 +18,7 @@ namespace AutoTurnOver.Controllers
public class NotStockController : Controller
{
[HttpGet]
[BrowseLog("Bailun_aims", "访问【百伦自动周转系统】->【无库仓】->【无库仓sku】->【搜索】页面", 0)]
public JsonResult List(int limit, int offset, string order, string sort, decimal? goods_sales_max, decimal? goods_sales_min,
int? source_type, int? success_states,int search_type,string key_words,DateTime? push_time_max, DateTime? push_time_min)
{
......@@ -48,6 +50,7 @@ namespace AutoTurnOver.Controllers
/// </summary>
/// <returns></returns>
[HttpPost]
[BrowseLog("Bailun_aims", "触发【百伦自动周转系统】->【无库仓】->【无库仓sku】->【淘汰】操作",2)]
public JsonResult Eliminate([FromBody]EliminateRequestDto data)
{
try
......@@ -70,6 +73,7 @@ namespace AutoTurnOver.Controllers
}
[HttpPost]
[BrowseLog("Bailun_aims", "触发【百伦自动周转系统】->【无库仓】->【无库仓sku】->【转仓】操作",3)]
public JsonResult TransferWarehouse([FromBody]EliminateRequestDto data)
{
try
......
......@@ -106,6 +106,7 @@ namespace AutoTurnOver.Controllers
/// <param name="start_date"></param>
/// <returns></returns>
[HttpGet]
[BrowseLog("Bailun_aims", "访问【百伦自动周转系统】->【自动下单管理】->【采购建议列表】->【搜索】页面", 0)]
public JsonResult DetailListSumFooter(int limit, int offset, int main_id, string sort, string sku, string warehousecode,
DateTime? end_date, DateTime? start_date, string warehousetype, int? warehousearea,
bool? ispush = null, int? type = null, string supplier_name = null, string purchase_user = null, string product_inner_code = null, bool is_multiple_warehouse = false,
......@@ -242,6 +243,7 @@ namespace AutoTurnOver.Controllers
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
[BrowseLog("Bailun_aims", "触发【百伦自动周转系统】->【自动下单管理】->【采购建议列表】->【保存】操作", 1)]
public JsonResult SetQuantityActual(int id, int quantity_actual)
{
try
......@@ -268,6 +270,7 @@ namespace AutoTurnOver.Controllers
/// <param name="id"></param>
/// <returns></returns>
[HttpPost]
[BrowseLog("Bailun_aims", "触发【百伦自动周转系统】->【自动下单管理】->【采购建议列表】->【批量保存】操作", 1)]
public JsonResult BatchSetQuantityActual([FromBody] BatchSetQuantityActualInputDataDto data)
{
try
......@@ -293,6 +296,7 @@ namespace AutoTurnOver.Controllers
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
[BrowseLog("Bailun_aims", "访问【百伦自动周转系统】->【自动下单管理】->【采购建议列表】->【推送采购系统】页面", 0)]
public JsonResult PushBuySys(int limit, int offset, int main_id, string sort, string sku, string warehousecode,
DateTime? end_date, DateTime? start_date, string warehousetype, int? warehousearea, string order,
bool? ispush = null, int? type = null, string supplier_name = null, string purchase_user = null, string product_inner_code = null, bool? is_multiple_warehouse = false,
......@@ -371,6 +375,7 @@ namespace AutoTurnOver.Controllers
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
[BrowseLog("Bailun_aims", "触发【百伦自动下单系统】->【自动下单管理】->【采购建议列表】->【删除采购建议】操作",2)]
public JsonResult Del(int id)
{
try
......
......@@ -113,6 +113,7 @@ namespace AutoTurnOver.Controllers
/// <param name="limit"></param>
/// <returns></returns>
[UseAction]
[BrowseLog("Bailun_aims", "访问【百伦自动周转系统】->【实时数据】->【jit实时缺货】->【搜索】页面", 0)]
public JsonResult QuantityOutStockList(string bailun_sku, string warehousecode, string product_inner_code, string purchase_user, int offset, int limit, string order, string sort, string warehousetype, int? warehousearea)
{
var m = new quantity_out_stock_search_dto
......@@ -225,6 +226,7 @@ namespace AutoTurnOver.Controllers
/// <param name="limit"></param>
/// <returns></returns>
[UseAction]
[BrowseLog("Bailun_aims", "访问【百伦自动周转系统】->【实时数据】->【实时缺货明细】->【搜索】页面", 0)]
public JsonResult QuantityOutStockDetailList(DateTime? pay_time_min,DateTime? pay_time_max,string platform_type,string shiplogistics_code, int? bailun_account_id, int? search_type, string warehousecode, string key_words, string purchase_user, int offset, int limit, string order, string sort, string warehousetype, int? warehousearea)
{
var m = new quantity_out_stock_detail_search_dto
......@@ -252,7 +254,7 @@ namespace AutoTurnOver.Controllers
});
}
public JsonResult QuantityOutStockDetailFooter(DateTime? pay_time_min, DateTime? pay_time_max, string platform_type, string shiplogistics_code, int? bailun_account_id, int? search_type, string warehousecode, string key_words, string purchase_user, int offset, int limit, string order, string sort, string warehousetype, int? warehousearea)
{
var m = new quantity_out_stock_detail_search_dto
......@@ -276,8 +278,7 @@ namespace AutoTurnOver.Controllers
return new JsonResult(list == null || list.Count <= 0 ? new quantity_out_stock_detail_dto() : list[0]);
}
[BrowseLog("Bailun_aims", "触发【百伦自动周转系统】->【实时数据】->【实时缺货明细】->【导出】操作", 1)]
public FileResult QuantityOutStockDetailExport(DateTime? pay_time_min, DateTime? pay_time_max, string platform_type, string shiplogistics_code, int? bailun_account_id, int? search_type, string warehousecode, string key_words, string purchase_user, int offset, int limit, string order, string sort, string warehousetype, int? warehousearea)
{
var m = new quantity_out_stock_detail_search_dto
......@@ -378,6 +379,7 @@ namespace AutoTurnOver.Controllers
/// <param name="warehousetype"></param>
/// <param name="warehousearea"></param>
/// <returns></returns>
[BrowseLog("Bailun_aims", "访问【百伦自动周转系统】->【配置】->【缺货改零】->【搜索】页面", 0)]
public JsonResult OutStockList(int? search_type, string warehousecode, string key_words, string purchase_user, int offset, int limit, string order, string sort, string warehousetype, int? warehousearea)
{
var m = new out_stock_search_dto
......@@ -474,6 +476,7 @@ namespace AutoTurnOver.Controllers
/// <param name="warehousetype"></param>
/// <param name="warehousearea"></param>
/// <returns></returns>
[BrowseLog("Bailun_aims", "访问【百伦自动周转系统】->【实时数据】->【回货速改】->【搜索】页面", 0)]
public JsonResult ReturnSpeedChangeList(bool? has_available_stock, int? search_type, string warehousecode, string key_words, string purchase_user, int offset, int limit, string order, string sort, string warehousetype, int? warehousearea)
{
var m = new return_speed_change_search_dto
......@@ -569,6 +572,7 @@ namespace AutoTurnOver.Controllers
/// <param name="warehousetype"></param>
/// <param name="warehousearea"></param>
/// <returns></returns>
[BrowseLog("Bailun_aims", "触发【百伦自动周转系统】->【配置】->【回货速改】->【标记回货】操作", 3)]
public JsonResult MarkReturnSpeedChange(bool? has_available_stock, int? search_type, string warehousecode, string key_words, string purchase_user, string warehousetype, int? warehousearea)
{
var m = new return_speed_change_search_dto
......@@ -597,6 +601,7 @@ namespace AutoTurnOver.Controllers
/// 批量出信
/// </summary>
/// <returns></returns>
[BrowseLog("Bailun_aims", "触发【百伦自动周转系统】->【实时数据】->【实时缺货明细】->【批量出信】操作", 1)]
public FileResult BatchSendMessage(string bailun_order_ids,string content,string subject,string remarks)
{
BatchSendMessageInputDto data = new BatchSendMessageInputDto {
......@@ -626,6 +631,7 @@ namespace AutoTurnOver.Controllers
/// <param name="platform_type"></param>
/// <returns></returns>
[UseAction]
[BrowseLog("Bailun_aims", "访问【百伦自动周转系统】->【报表】->【商品分类汇总】->【搜索】页面", 0)]
public JsonResult GetSkuWebsiteSales(string platform_type,string warehousetype, int? warehousearea, string warehousecode,DateTime? btime,DateTime? etime)
{
bailun_sku_website_sales_search_dto search_data = new bailun_sku_website_sales_search_dto {
......@@ -658,7 +664,6 @@ namespace AutoTurnOver.Controllers
}, AutoUtility.GetUser());
return File(memory, "text/csv", $"{user.UserAccount}商品分类数据信息.csv");
}
public JsonResult GetSkuWebsiteSalesSumFooter(string platform_type,string warehousetype, int? warehousearea, string warehousecode, DateTime? btime, DateTime? etime)
{
......@@ -679,6 +684,7 @@ namespace AutoTurnOver.Controllers
}
[UseAction]
[BrowseLog("Bailun_aims", "访问【百伦自动周转系统】->【报表】->【商品分类汇总】->【搜索】页面", 0)]
public JsonResult SupplierSalesList(string supplier_name, int offset, int limit, string order, string sort)
{
var m = new supplier_sales_search_dto
......@@ -742,7 +748,7 @@ namespace AutoTurnOver.Controllers
var fileData = await QiNiuCloudHelper.UploadAsync(memory, $"商品销售情况统计{user.UserName}-{DateTime.Now.ToString("yyyyMMddHHmmss")}导入结果.csv");
return File(memory, "text/csv", $"{user.UserAccount}商品汇总数据信息.csv");
}
[BrowseLog("Bailun_aims", "访问【百伦自动周转系统】->【报表】->【商品销售情况统计】->【搜索】页面", 0)]
public JsonResult GetGoodsSumFooter(string product_inner_code, string platform_type)
{
......@@ -768,6 +774,7 @@ namespace AutoTurnOver.Controllers
/// <param name="order"></param>
/// <param name="sort"></param>
/// <returns></returns>
[BrowseLog("Bailun_aims", "访问【百伦自动周转系统】->【实时数据】->【安全库存汇总】->【搜索】页面", 0)]
public JsonResult GetInventoryStock(string warehousetype, int offset, int limit, string order, string sort,int? warehousearea,string warehouse_code)
{
try
......
......@@ -29,9 +29,10 @@ namespace AutoTurnOver.Controllers
/// <returns></returns>
[HttpGet]
[UseAction]
[BrowseLog("Bailun_aims", "触发【百伦自动周转系统】->【自动下单管理】->【自动周转列表】->【搜索】页面",0)]
public JsonResult List(int limit, int offset, string order, string sort, int? searchType, string key_words, string buyer_name, int? IsRedundant, int? IsStockOut, string warehousecode,string supplier_name, string warehousetype, int? warehousearea, bool? hasDefectConfig, bool? hasAadvise = null, string categoryIds = null, int? monitor_status = null, int? returngoodspush_state = null,int? has_tort = null)
{
try
try
{
var m = new Condition_AutoTurnOver
{
......@@ -163,6 +164,7 @@ namespace AutoTurnOver.Controllers
/// <returns></returns>
[HttpGet]
[UseAction]
[BrowseLog("Bailun_aims", "访问【百伦自动周转系统】->【配置】->【特殊销售规则】->【搜索】页面",0)]
public JsonResult ListSaleSetting(int limit, int offset, string order, string sort, string sku, string warehousecode, string warehousetype, int? warehousearea, bool? IsEffective = null)
{
var m = new Condition_ConfigPromotion
......@@ -201,6 +203,7 @@ namespace AutoTurnOver.Controllers
/// </summary>
/// <returns></returns>
[HttpGet]
[BrowseLog("Bailun_aims","触发【百伦自动周转系统】->【配置】->【特殊销售规则】->【新增规则】->【保存】操作",1)]
public JsonResult SaveSaleSetting(int id, string sku, string warehousecode, DateTime time, int count, string note, string username)
{
var m = new Models.dc_auto_config_promotion
......@@ -323,6 +326,7 @@ namespace AutoTurnOver.Controllers
/// <returns></returns>
[HttpGet]
[UseAction]
[BrowseLog("Bailun_aims", "访问【百伦自动周转系统】->【配置】->【市场因素配置】->【搜索】页面", 0)]
public JsonResult ListCorrection(int limit, int offset, string order, string sort, string sku, string warehousecode, string warehousetype, int? warehousearea, bool? IsEffective = null)
{
var m = new Condition_ConfigPromotion
......@@ -361,6 +365,7 @@ namespace AutoTurnOver.Controllers
/// <returns></returns>
[HttpGet]
[UseAction]
[BrowseLog("Bailun_aims", "触发【百伦自动周转系统】->【配置】->【市场因素配置】->【新增规则】->【保存】操作", 1)]
public JsonResult SaveCorrection(int id, string sku, string warehousecode, DateTime btime, DateTime etime, decimal param, string note, string username)
{
var m = new Models.dc_auto_config_correction
......
......@@ -19,7 +19,7 @@
<_IsPortable>true</_IsPortable>
<publishUrl>C:\WebSite\SkuAutoTurn</publishUrl>
<DeleteExistingFiles>False</DeleteExistingFiles>
<publishUrl>F:\dataCenter_fu</publishUrl>
<publishUrl>E:\aims-fu</publishUrl>
<DeleteExistingFiles>True</DeleteExistingFiles>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
</PropertyGroup>
......
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<DeleteExistingFiles>False</DeleteExistingFiles>
<ExcludeApp_Data>False</ExcludeApp_Data>
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<PublishProvider>FileSystem</PublishProvider>
<PublishUrl>E:\aims-text</PublishUrl>
<WebPublishMethod>FileSystem</WebPublishMethod>
</PropertyGroup>
</Project>
\ No newline at end of file
......@@ -43,5 +43,9 @@
"Saas_GetMenus": "http://sso.bailuntec.com/GetMenus",
"ApiLogisticsGetFilterLogisticsAssignLine": "http://lms.bailuntec.com/api/Logistics/ApiLogistics/GetFilterLogisticsAssignLine",
"PostPlatCategoryRate": "http://test.profit.bailuntec.com/api/platfee/ProfitPlatfee/PostPlatCategoryRate",
"api_plat_category": "http://doc.bailuntec.com:6040/profitplatfee/getplatcategory"
"api_plat_category": "http://doc.bailuntec.com:6040/profitplatfee/getplatcategory",
"BrowseLogSetting": {
"Url": "http://saas.admin.bailuntec.com/Api/Ssoadmin/operationloginfo/addoperationloginfo",
"CanLog": "yes"
}
}
......@@ -43,5 +43,9 @@
"Saas_GetMenus": "http://sso.bailuntec.com/GetMenus",
"ApiLogisticsGetFilterLogisticsAssignLine": "http://lms.bailuntec.com/api/Logistics/ApiLogistics/GetFilterLogisticsAssignLine",
"PostPlatCategoryRate": "http://172.31.255.11/api/platfee/ProfitPlatfee/PostPlatCategoryRate",
"api_plat_category": "http://doc.bailuntec.com:6040/profitplatfee/getplatcategory"
"api_plat_category": "http://doc.bailuntec.com:6040/profitplatfee/getplatcategory",
"BrowseLogSetting": {
"Url": "http://saas.admin.bailuntec.com/Api/Ssoadmin/operationloginfo/addoperationloginfo",
"CanLog": "yes"
}
}
......@@ -43,5 +43,9 @@
"Saas_GetMenus": "http://sso.bailuntec.com/GetMenus",
"ApiLogisticsGetFilterLogisticsAssignLine": "http://lms.bailuntec.com/api/Logistics/ApiLogistics/GetFilterLogisticsAssignLine",
"PostPlatCategoryRate": "http://test.profit.bailuntec.com/api/platfee/ProfitPlatfee/PostPlatCategoryRate",
"api_plat_category": "http://doc.bailuntec.com:6040/profitplatfee/getplatcategory"
"api_plat_category": "http://doc.bailuntec.com:6040/profitplatfee/getplatcategory",
"BrowseLogSetting": {
"Url": "http://saas.admin.bailuntec.com/Api/Ssoadmin/operationloginfo/addoperationloginfo",
"CanLog": "yes"
}
}
......@@ -12,5 +12,9 @@
"WipStockUrl": "http://mjzz.bailuntec.com/api/FullStockPageList",
"Lms_GetLogistics": "http://lms.bailuntec.com/api/DataInfo/ApiLogistics/GetLogistics",
"PPSSkuStatus": "http://pps.bailuntec.com/Api/Centre/Publish/External/SkuStatus",
"transfer_cost_real": "http://api.wms.bailuntec.com/api/services/app/OrderLogisticCostService/GetOrderLogisticCostPageList"
"transfer_cost_real": "http://api.wms.bailuntec.com/api/services/app/OrderLogisticCostService/GetOrderLogisticCostPageList",
"BrowseLogSetting": {
"Url": "http://saas.admin.bailuntec.com/Api/Ssoadmin/operationloginfo/addoperationloginfo",
"CanLog": "yes"
}
}
......@@ -13,5 +13,9 @@
"WipStockUrl": "http://mjzz.bailuntec.com/api/FullStockPageList",
"Lms_GetLogistics": "http://lms.bailuntec.com/api/DataInfo/ApiLogistics/GetLogistics",
"PPSSkuStatus": "http://pps.bailuntec.com/Api/Centre/Publish/External/SkuStatus",
"transfer_cost_real": "http://api.wms.bailuntec.com/api/services/app/OrderLogisticCostService/GetOrderLogisticCostPageList"
"transfer_cost_real": "http://api.wms.bailuntec.com/api/services/app/OrderLogisticCostService/GetOrderLogisticCostPageList",
"BrowseLogSetting": {
"Url": "http://saas.admin.bailuntec.com/Api/Ssoadmin/operationloginfo/addoperationloginfo",
"CanLog": "yes"
}
}
......@@ -12,5 +12,9 @@
"WipStockUrl": "http://mjzz.bailuntec.com/api/FullStockPageList",
"Lms_GetLogistics": "http://lms.bailuntec.com/api/DataInfo/ApiLogistics/GetLogistics",
"PPSSkuStatus": "http://pps.bailuntec.com/Api/Centre/Publish/External/SkuStatus",
"transfer_cost_real": "http://api.wms.bailuntec.com/api/services/app/OrderLogisticCostService/GetOrderLogisticCostPageList"
"transfer_cost_real": "http://api.wms.bailuntec.com/api/services/app/OrderLogisticCostService/GetOrderLogisticCostPageList",
"BrowseLogSetting": {
"Url": "http://saas.admin.bailuntec.com/Api/Ssoadmin/operationloginfo/addoperationloginfo",
"CanLog": "yes"
}
}
\ No newline at end of file
......@@ -11,5 +11,9 @@
"Port": "6379",
"Password": "SpaceHorse1",
"Defaultdatabase": "0"
},
"BrowseLogSetting": {
"Url": "http://saas.admin.bailuntec.com/Api/Ssoadmin/operationloginfo/addoperationloginfo",
"CanLog": "yes"
}
}
......@@ -11,5 +11,9 @@
},
"PPS_ShortagePush": "http://bltpro.bailuntec.com/api/EbayTask/PushSkuEditQtyTask",
"PPS_ShortagePush2": "http://pps.bailuntec.com/Api/AutoOperation/skutask/pushskueditqtytask",
"PPS_Return_GoodsPush": ""
"PPS_Return_GoodsPush": "",
"BrowseLogSetting": {
"Url": "http://saas.admin.bailuntec.com/Api/Ssoadmin/operationloginfo/addoperationloginfo",
"CanLog": "yes"
}
}
......@@ -4,5 +4,9 @@
},
"PPS_ShortagePush": "http://10.0.6.8:8002/api/EbayTask/PushSkuEditQtyTask",
"PPS_ShortagePush2": "http://10.0.0.27:5051/skutask/pushskueditqtytask",
"PPS_Return_GoodsPush": ""
"PPS_Return_GoodsPush": "",
"BrowseLogSetting": {
"Url": "http://saas.admin.bailuntec.com/Api/Ssoadmin/operationloginfo/addoperationloginfo",
"CanLog": "yes"
}
}
\ No newline at end of file
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