Commit d0b81450 by 心随飞扬

任务调度修改,自动下单仓库规则调整。bug修复

parent d7632f88
......@@ -33,9 +33,9 @@
<add key="ExternalAuth.Google.ClientSecret" value="" />
<add key="RouteDebugger:Enabled" value="false" />
<!--Redis写入服务器地址,可以添加多个服务器通过;分隔-->
<add key="readWriteHosts" value="192.168.2.212:6379" />
<add key="readWriteHosts" value="192.168.6.207:6379" />
<!--Redis读服务器地址,可以添加多个服务器通过;分隔-->
<add key="readOnlyHosts" value="192.168.2.212:6379" />
<add key="readOnlyHosts" value="192.168.6.207:6379" />
<add key="BaiLunBi" value="http://bi.bailuntec.com" />
<add key="LoginUrl" value="http://www.oa.com/Login/Index?guid=f1fca59400e84b52a0d5076900e7e3a5" />
<add key="LoginOutUrl" value="http://www.oa.com/Login/LoginOut" />
......
......@@ -61,7 +61,7 @@ namespace Bailun.Oms.SynOrderService.Task
}
/// <summary>
/// 根据环球更新时间重新抓取环球订单
/// 同步环球订单配发货信息
/// </summary>
[DisallowConcurrentExecution]
public class UpdateOrdersTask : JobBase, ITransientDependency
......
......@@ -9,7 +9,7 @@
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
</configSections>
<connectionStrings>
<!--<add name="Default" connectionString="server=192.168.2.212;database=bailun_oms;uid=root;password=123456;port=3306;Convert Zero Datetime=True;Allow User Variables=True" providerName="MySql.Data.MySqlClient" />-->
<!--<add name="Default" connectionString="server=192.168.6.207;database=bailun_oms;uid=root;password=123456;port=3306;Convert Zero Datetime=True;Allow User Variables=True" providerName="MySql.Data.MySqlClient" />-->
<!--<add name="Default" connectionString="server=5790681955c16.gz.cdb.myqcloud.com;database=bailun_oms_test;uid=cdb_outerroot;password=%nEe%y^exJ;port=5459;Convert Zero Datetime=True;Allow User Variables=True" providerName="MySql.Data.MySqlClient" />-->
<!--<add name="Default" connectionString="Server=localhost; Database=LinkTree_V1.0;user id=sa;pwd=123456;" providerName="System.Data.SqlClient" />-->
<!--<add name="Default" connectionString="server=5790681955c16.gz.cdb.myqcloud.com;database=bailundb;uid=root;password=#7kfnymAM$Y9-Ntf;port=5459;Convert Zero Datetime=True;Allow User Variables=True" providerName="MySql.Data.MySqlClient" />-->
......@@ -33,9 +33,9 @@
<add key="ExternalAuth.Google.ClientSecret" value="" />
<add key="RouteDebugger:Enabled" value="false" />
<!--Redis写入服务器地址,可以添加多个服务器通过;分隔-->
<add key="readWriteHosts" value="192.168.2.212:6379" />
<add key="readWriteHosts" value="192.168.6.207:6379" />
<!--Redis读服务器地址,可以添加多个服务器通过;分隔-->
<add key="readOnlyHosts" value="192.168.2.212:6379" />
<add key="readOnlyHosts" value="192.168.6.207:6379" />
<add key="BaiLunBi" value="http://bi.bailuntec.com" />
<add key="LoginUrl" value="http://www.oa.com/Login/Index?guid=f1fca59400e84b52a0d5076900e7e3a5" />
<add key="LoginOutUrl" value="http://www.oa.com/Login/LoginOut" />
......@@ -59,7 +59,7 @@
<add key="ebayfee" value="/interface/data/ebayfee" />
<!--环球订单接口地址-->
<!--获取百伦产品库数据接口地址-->
<add key="productHost" value="http://pms.oa.com" />
<add key="productHost" value="http://pms.bailuntec.com" />
<add key="product" value="/api/ApiOrderProduct/GetOrderProducts" />
<add key="getSkuMapping" value="/api/ApiOrderProduct/GetSkuMapping" />
<add key="productDevCount" value="/api/ApiOrderProduct/GetCountByDeveloper" />
......@@ -114,6 +114,8 @@
<add key="ApiCenter" value="http://api.sku.bailuntec.com" />
<add key="ApiCenAppId" value="SystemOMS" />
<add key="ApiCenAppKey" value="YmFpbHVuT01T" />
<!--根据sku跟仓库获取采购单信息-->
<add key="GetPurchaseStock" value="http://purchase.bailuntec.com/Api/GetSkuCount" />
</appSettings>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
......
......@@ -239,8 +239,6 @@
<Compile Include="Task\JobManager.cs" />
<Compile Include="Task\OrderProductTaskService.cs" />
<Compile Include="Task\SynchronizeOrderSalesService.cs" />
<Compile Include="Task\SynchronizeOrginalOrdersTask.cs" />
<Compile Include="Task\UpdateOriginalOrdersByChangeTask.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config">
......
......@@ -75,9 +75,9 @@ namespace Bailun.Oms.WindowsService.Task
.Build();//创建一个作业
ITrigger MonitorOrderSalesJobTrigger = TriggerBuilder.Create()
.WithIdentity("MonitorOrderSaleTrigger", "SynchronizeOrderSale")
.WithSimpleSchedule(t =>
t.WithIntervalInMinutes(300) //触发执行,5s一次
.RepeatForever())
//.WithSimpleSchedule(t =>
//t.WithIntervalInMinutes(300) //触发执行,5s一次
//.RepeatForever())
.StartNow()
.WithCronSchedule("0 55 23 * * ?") //每天晚上十一点58分执行
.Build();
......
......@@ -28,7 +28,7 @@ namespace Bailun.Oms.WindowsService.Task
public override void Execute(IJobExecutionContext context)
{
Logger.Info("MatchOrderProductWareHouse同步仓库任务开启");
_orderProductService.MatchOrderProductWareHouse();
_orderProductService.MatchOrderProductWareHouse(true);
Logger.Info("MatchOrderProductWareHouse同步仓库任务结束");
}
}
......
using Abp.Dependency;
using Abp.Quartz.Quartz;
using Bailun.Statistics.Application.OrderList;
using Bailun.Statistics.Domain.OrderApi.ValueObjects;
using Quartz;
using Quartz.Impl;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Bailun.Oms.WindowsService.Task
{
/// <summary>
/// 抓取环球订单任务1
/// </summary>
[DisallowConcurrentExecution]
public class SynchronizeOrginalOrdersTask1:JobBase, ITransientDependency
{
private readonly IOrderAppService _orderAppService;
public SynchronizeOrginalOrdersTask1(IOrderAppService orderAppService)
{
_orderAppService = orderAppService;
}
public override void Execute(IJobExecutionContext context)
{
_orderAppService.SynchronizeOrginalOrders(OrderRequestType.OriOrder);
}
}
/// <summary>
/// 抓取环球订单任务2
/// </summary>
[DisallowConcurrentExecution]
public class SynchronizeOrginalOrdersTask2 : JobBase, ITransientDependency
{
private readonly IOrderAppService _orderAppService;
public SynchronizeOrginalOrdersTask2(IOrderAppService orderAppService)
{
_orderAppService = orderAppService;
}
public override void Execute(IJobExecutionContext context)
{
_orderAppService.SynchronizeOrginalOrders(OrderRequestType.OriOrder2);
}
}
public class SynchronizeOrderJobScheduler
{
public static void Start()
{
IScheduler scheduler = StdSchedulerFactory.GetDefaultScheduler(); //从工厂中获取一个调度器实例化
scheduler.Start(); //开始调度器
#region 抓取环球订单任务1
//IJobDetail job1 = JobBuilder.Create<SynchronizeOrginalOrdersTask1>().Build();//创建一个作业
//ITrigger trigger1 = TriggerBuilder.Create()
// .WithSimpleSchedule(t =>
// t.WithIntervalInMinutes(5) //触发执行,5s一次
// .RepeatForever()) //重复执行
// .Build();
//scheduler.ScheduleJob(job1, trigger1); //把作业,触发器加入调度器。
#endregion
#region 抓取环球订单任务2
IJobDetail job2 = JobBuilder.Create<SynchronizeOrginalOrdersTask2>().Build();//创建一个作业
ITrigger trigger2 = TriggerBuilder.Create()
.WithSimpleSchedule(t =>
t.WithIntervalInMinutes(15) //触发执行,5s一次
.RepeatForever()) //重复执行
.Build();
scheduler.ScheduleJob(job2, trigger2); //把作业,触发器加入调度器。
#endregion
}
}
}
using Abp.Quartz.Quartz;
using Bailun.Statistics.Application.OrderList;
using Quartz;
using Quartz.Impl;
using Bailun.Statistics.Domain.OrderApi.ValueObjects;
using Abp.Dependency;
namespace Bailun.Oms.WindowsService.Task
{
/// <summary>
/// 更新订单信息与发货信息任务(定时任务-UpdateOriginalOrderTaskService2)
/// </summary>
[DisallowConcurrentExecution]
public class UpdateOrdersShippingByChangeTask1:JobBase, ITransientDependency
{
private readonly IOrderAppService _orderAppService;
public UpdateOrdersShippingByChangeTask1(IOrderAppService orderAppService)
{
_orderAppService = orderAppService;
}
public override void Execute(IJobExecutionContext context)
{
_orderAppService.UpdateOrdersShippingByChange(OrderRequestType.UpdateOriOrder2);
}
}
/// <summary>
/// 更新原始订单产品信息(定时任务-UpdateOriginalOrderTaskService)
/// </summary>
[DisallowConcurrentExecution]
public class UpdateOrdersProductByOrders1 : JobBase, ITransientDependency
{
private readonly IOrderAppService _orderAppService;
public UpdateOrdersProductByOrders1(IOrderAppService orderAppService)
{
_orderAppService = orderAppService;
}
public override void Execute(IJobExecutionContext context)
{
_orderAppService.GetOrginalOrderFromOms(OrderRequestType.UpdateOriOrder);
}
}
public class UpdateOriginalOrdersJob
{
public static void Start()
{
IScheduler scheduler = StdSchedulerFactory.GetDefaultScheduler(); //从工厂中获取一个调度器实例化
scheduler.Start(); //开始调度器
IJobDetail job = JobBuilder.Create<UpdateOrdersShippingByChangeTask1>().Build();//创建一个作业
ITrigger trigger = TriggerBuilder.Create()
.WithSimpleSchedule(t =>
t.WithIntervalInMinutes(5) //触发执行,5分一次
.RepeatForever()) //重复执行
.Build();
scheduler.ScheduleJob(job, trigger); //把作业,触发器加入调度器。
}
}
}
......@@ -222,7 +222,6 @@
<Compile Include="OrderSku\IOrderSkuAppService.cs" />
<Compile Include="OrderSku\OrderSkuAppService.cs" />
<Compile Include="OtherModel\BaseResponseResult.cs" />
<Compile Include="OtherModel\PurchaseStockDto.cs" />
<Compile Include="OtherModel\skuorderlist.cs" />
<Compile Include="PurchaseAdvice\Dto\PurchaseProduct_Query.cs" />
<Compile Include="PurchaseAdvice\Dto\SplitAdviceInput.cs" />
......
......@@ -66,5 +66,10 @@ namespace Bailun.Statistics.Application.OrderList.Dto
/// 是否退款订单
/// </summary>
public int IsRefund { get; set; }
/// <summary>
/// paypal付款账号
/// </summary>
public string PaypalOutAccount { get; set; }
}
}
......@@ -137,6 +137,11 @@ namespace Bailun.Statistics.Application.OrderList.Dto
public bool? IsSystemShip { get; set; }
public string EbayTransactionId { get; set; }
public int IsRefund { get; set; }
/// <summary>
/// 发货数据
/// </summary>
public List<SinppingDto> SinppingList { get; set; }
}
public class ApiSkuDto
......
......@@ -65,39 +65,12 @@ namespace Bailun.Statistics.Application.OrderList
Task<GetOrderListOutput<OrderDto>> GetNoPeihuoOrderList(GetOrderListInput getOrderListInput);
/// <summary>
/// 获取没有发货信息的订单
/// </summary>
/// <returns></returns>
List<OrderOriginal> GetNotOrderShipping();
/// <summary>
/// 获取订单多次发货信息
/// </summary>
[UnitOfWork(IsDisabled =true)]
void UpdateShippingOrders(OrderRequestType orderRequestType);
/// <summary>
/// 当订单状态更改时更新订单信息与发货信息任务(定时任务-UpdateOriginalOrderTaskService2/UpdateOriginalOrderTaskService4)
/// </summary>
/// <param name="orderRequestType">任务类型</param>
[UnitOfWork(IsDisabled =true)]
void UpdateOrdersShippingByChange(OrderRequestType orderRequestType);
/// <summary>
/// 实时同步环球订单信息(定时任务-AddOriginalOrderTaskService)
/// </summary>
/// <param name="orderRequestType">任务类型</param>
[UnitOfWork(IsDisabled =true)]
void SynchronizeOrginalOrders(OrderRequestType orderRequestType);
/// <summary>
/// 更新原始订单产品信息(定时任务-UpdateOriginalOrderTaskService/UpdateOriginalOrderTaskService3)
/// </summary>
/// <param name="orderRequestType"></param>
[UnitOfWork(IsDisabled =true)]
void UpdateOrdersProductByOrders(OrderRequestType orderRequestType);
/// <summary>
/// 获取订单商品基础信息
/// </summary>
/// <param name="pagination"></param>
......@@ -164,5 +137,18 @@ namespace Bailun.Statistics.Application.OrderList
/// <param name="queryJson">查询参数</param>
/// <returns>返回列表</returns>
IEnumerable<OrderShippings> GetShippingsList(string queryJson);
#region tasktest
/// <summary>
/// 测试环球配货信息同步接口
/// </summary>
/// <param name="OrderNoSystem"></param>
void testship(string OrderNoSystem);
/// <summary>
/// 测试环球订单信息同步接口
/// </summary>
/// <param name="OrderNoSystem"></param>
void testAddOrder(string OrderNoSystem);
#endregion
}
}
......@@ -45,6 +45,6 @@ namespace Bailun.Statistics.Application.OrderList
/// 匹配发货仓库为空的订单产品
/// </summary>
[UnitOfWork(IsDisabled =true)]
void MatchOrderProductWareHouse();
void MatchOrderProductWareHouse(bool IsSystem);
}
}
......@@ -143,6 +143,11 @@ namespace Bailun.Statistics.Application.PurchaseAdvice
var buyer = queryParam["Buyer"].ToString();
query = query.Where(m => m.Buyer == buyer);
}
if (!queryParam["supplier"].IsEmpty())
{
var supplier = queryParam["supplier"].ToInt();
query = query.Where(m => m.SupplierId == supplier);
}
}
return query;
}
......@@ -307,6 +312,11 @@ namespace Bailun.Statistics.Application.PurchaseAdvice
if (turnoverInfoResult.Data != null)
{
newTurnoverInfo = turnoverInfoResult.Data;
if (newTurnoverInfo != null)
{
//实时获取采购在途数据
_purchaseMonitorDomainService.GetPurchaseStock(newTurnoverInfo);
}
}
}
if (purchaseMonitor != null)
......@@ -447,6 +457,11 @@ namespace Bailun.Statistics.Application.PurchaseAdvice
if (turnoverInfoResult.Data != null)
{
newTurnoverInfo = turnoverInfoResult.Data;
if (newTurnoverInfo != null)
{
//实时获取采购在途数据
_purchaseMonitorDomainService.GetPurchaseStock(newTurnoverInfo);
}
}
if (newTurnoverInfo == null)
......
......@@ -66,16 +66,6 @@ namespace Bailun.Statistics.Application.PurchaseAdvice.Task
oriOrderList = oriOrderList.Skip((pagination.page - 1) * pagination.rows).Take(pagination.rows).ToList();
StatisticsSkuSales(oriOrderList, pagination);
//var pagecount= pagination.records / pagination.rows;
//if (pagination.records % pagination.rows != 0)
//{
// pagecount += 1;
//}
//for (int i = 0; i < pagecount; i++)
//{
// oriOrderList = oriOrderList.Skip((pagination.page - 1) * pagination.rows).Take(pagination.rows).ToList();
// StatisticsSkuSales(oriOrderList, pagination);
//}
}
catch (Exception ex)
{
......@@ -98,6 +88,11 @@ namespace Bailun.Statistics.Application.PurchaseAdvice.Task
if (turnoverInfoResult.Data != null)
{
newTurnoverInfo = turnoverInfoResult.Data;
if (newTurnoverInfo != null)
{
//实时获取采购在途数据
_purchaseMonitorDomainService.GetPurchaseStock(newTurnoverInfo);
}
}
if (newTurnoverInfo == null)
......
......@@ -113,6 +113,9 @@ namespace Bailun.Statistics.Application.PurchaseAdvice.Task
foreach (var turnoverDto in turnoverResult.Data)
{
//获取采购在途数量
_purchaseMonitorDomainService.GetPurchaseStock(turnoverDto);
_purchaseMonitorDomainService.AddOrUpdateMonitor(turnoverDto, null);
_orderDomainService.UpdateOrderProductNewUpdateTime(OrderRequestType.SynchroStockTurnover.ToString(), Clock.Now.ToString("yyyy-MM-dd HH:mm:ss"));
......
......@@ -244,6 +244,7 @@
<Compile Include="PurchaseAdvice\PurchaseAdvice.cs" />
<Compile Include="PurchaseAdvice\PurchaseTurnoverDays.cs" />
<Compile Include="PurchaseAdvice\Qro\ProductApiDto.cs" />
<Compile Include="PurchaseAdvice\Qro\PurchaseStockDto.cs" />
<Compile Include="PurchaseAdvice\Qro\SupplierQro.cs" />
<Compile Include="PurchaseAdvice\Qro\TurnoverQro.cs" />
<Compile Include="PurchaseAdvice\Qro\WarehouseQro.cs" />
......
......@@ -177,9 +177,9 @@ namespace Bailun.Statistics.Domain.HttpManager
}
if (!string.IsNullOrEmpty(sku))
{
postdata.AppendFormat("&sku=" + sku);
postdata.AppendFormat("&sku=" + CommonBaseLib.UrlToEncode(sku));
}
var resultStr = new Util.Shared.HttpGetOrPost().HttpPost(Url, CommonBaseLib.UrlToEncode(postdata.ToString()));
var resultStr = new Util.Shared.HttpGetOrPost().HttpPost(Url, postdata.ToString());
OutputResult<List<T>> result = resultStr.ToObject<OutputResult<List<T>>>();
if (!result.IsSuccessed)
{
......
......@@ -37,5 +37,12 @@ namespace Bailun.Statistics.Domain.OrderList
int GetInitPage(OrderConfig orderConfig);
void UpdateOrderConfigPage(OrderConfig orderConfig, int totalCount, int toalPage, int currentPage, bool isFirstRequest);
/// <summary>
/// 获取订单抓单配置信息
/// </summary>
/// <param name="configName"></param>
/// <returns></returns>
OrderConfig GetOrderConfigModel(string configName);
}
}
\ No newline at end of file
......@@ -139,7 +139,6 @@ namespace Bailun.Statistics.Domain.OrderList
{
orderConfig.LastQueryTime = oriOrderConfig.FirstUpdateTime;
}
//orderFeeConfig.CurrentQueryTime = orderFeeConfig.CurrentQueryTime.IsNullOrWhiteSpace() ? DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") : orderFeeConfig.CurrentQueryTime;
//每次获取的时间跨度最大为设置的时间间隔,单位为分钟
if (!orderConfig.LastQueryTime.IsNullOrWhiteSpace())
{
......@@ -376,5 +375,15 @@ namespace Bailun.Statistics.Domain.OrderList
};
_orderConfigRepository.ExecuteSqlCommand($@"update t_order_config set NewUpdateTime=@NewUpdateTime where ConfigName= '{configName}'", new[] { para });
}
/// <summary>
/// 获取订单抓单配置信息
/// </summary>
/// <param name="configName"></param>
/// <returns></returns>
public OrderConfig GetOrderConfigModel(string configName)
{
return _orderConfigRepository.GetAll().Where(d => d.ConfigName == configName).FirstOrDefault();
}
}
}
\ No newline at end of file
......@@ -400,7 +400,7 @@ namespace Bailun.Statistics.Domain.OrderTask
ProductWeight=d.weight,
PackageFee=d.packingPrice,
DevelopTime=d.createTime,
ShipWarehouseCode=d.wareCode
ShipWarehouseCode = d.wareCode
}).ToList();
}else
{
......
......@@ -24,5 +24,11 @@ namespace Bailun.Statistics.Domain.PurchaseAdvice
int GetTotalTurnoverDays(WarehouseType warehouseType, int deliveryTime, string warehouseCode,string ProductCode);
List<SupplierQro2> GetAllSuppliers();
/// <summary>
/// 通过仓库、sku获取采购在途数量
/// </summary>
/// <param name="model"></param>
void GetPurchaseStock(TurnoverQro model);
}
}
\ No newline at end of file
......@@ -336,7 +336,15 @@ namespace Bailun.Statistics.Domain.PurchaseAdvice
var httpManager = new HttpGetOrPost();
var url = ConfigurationManager.AppSettings["AddPurchasePlan"];
json = HttpContext.Current.Server.UrlEncode(json);
var resultStr = httpManager.HttpPost(url, "obj=" + json);
string resultStr =string.Empty;
try
{
resultStr = httpManager.HttpPost(url, "obj=" + json);
}
catch (Exception ex)
{
return new OutputResult<string>() { IsSuccessed = false, Message = "采购系统故障,请联系采购系统负责人解决。" };
}
var result = resultStr.ToObject<OutputResult<string>>();
if (result.IsSuccessed)
{
......
......@@ -954,6 +954,25 @@ namespace Bailun.Statistics.Domain.PurchaseAdvice
var result = _purchaseMonitorRepository.FindList<SupplierQro2>("Select * from t_purchase_monitor where SupplierName != '' and SupplierName is not null group by SupplierName", new object[] { });
return result;
}
/// <summary>
/// 通过仓库、sku获取采购在途数量
/// </summary>
/// <param name="model"></param>
public void GetPurchaseStock(TurnoverQro model)
{
PurchaseStockDto purchasestock = new PurchaseStockDto();
//var watch = CommonHelper.TimerStart();
var list = _httpManagerDomainService.GetPurchaseStockList<PurchaseStockDto>(model.WarehouseCode, model.SKU, 1, 1);
//Logger.WarnFormat("sku:{0}获取采购在途结束时间:{1}", model.SKU, CommonHelper.TimerEnd(watch));
if (list != null && list.Count > 0)
{
purchasestock = list.FirstOrDefault();
}
model.OrderQuantity = purchasestock.ordercount;
model.SupplierShipQuantity = purchasestock.delivercount;
model.NoWarehousingQuantity = purchasestock.arrivalcount;
}
}
public class PeihuoQro
{
......
......@@ -4,7 +4,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Bailun.Statistics.Application.OtherModel
namespace Bailun.Statistics.Domain.PurchaseAdvice.Qro
{
/// <summary>
/// 采购在途库存信息类
......
......@@ -97,6 +97,9 @@
<add key="ApiCenter" value="http://api.sku.bailuntec.com" />
<add key="ApiCenAppId" value="SystemOMS" />
<add key="ApiCenAppKey" value="YmFpbHVuT01T" />
<!--根据sku跟仓库获取采购单信息-->
<add key="GetPurchaseStock" value="http://purchase.bailuntec.com/Api/GetSkuCount" />
</appSettings>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6" />
......
......@@ -192,7 +192,7 @@ namespace Bailun.Statistics.Web.Areas.ConfigManage.Controllers
var warehousecode = row["仓库编码"].ToString();
var shipcountry = row["发货地"].ToString();
var hasmodel = skulist.FirstOrDefault(d => d.Sku == sku && d.ShipCountry == shipcountry);
//存在
//存在
if (hasmodel == null)
{
SkuWarehouseMapEntity model = new SkuWarehouseMapEntity();
......
......@@ -175,7 +175,8 @@
success: function (data, status) //服务器成功响应处理函数
{
if (!data.IsSuccessed) {
dialogMsg(data.Message,2);
dialogMsg(data.Message, 2);
document.location.reload();
} else {
dialogMsg(data.Message, 1);
document.location.reload();
......
......@@ -47,7 +47,6 @@
<input id="txt_Keyword" type="text" class="form-control div-select" style="width: 200px;" />
<a id="btn_Search" class="btn btn-primary" onclick="BtnSearch(0)" style="margin-bottom: 4px;margin-left: 10px;"><i class="fa fa-search"></i>查询</a>
<a class="btn btn-default" onclick="BtnSearch(1)" style="margin-bottom: 4px;"><i class="fa fa-search"></i>模糊查询</a>
</div>
<div class="clearfix visible-xs-block"></div>
......@@ -56,6 +55,9 @@
<div class="gridPanel">
<div class="row div-toolbar">
<div class="btn-group">
<a class="btn btn-default" onclick="MatchOrderProductWareHouse()"><i class="fa fa-pencil-square-o"></i>&nbsp;匹配仓库</a>
</div>
<div class="btn-group">
<a id="lr-detail" class="btn btn-primary" onclick="btn_detail()"><i class="fa fa-refresh"></i>&nbsp;查看订单明细</a>
</div>
<div class="btn-group">
......@@ -716,6 +718,26 @@
}
}
var MatchOrderProductWareHouse = function () {
$.ConfirmAjax({
msg: "确定手动匹配仓库?",
url: '/OrderList/Order/MatchOrderProductWareHouse',
param: {},
//loading: "正在执行...",
success: function (data) {
debugger;
if (data != null) {
if (data.type === 1) {
dialogMsg(data.message, 1);
BtnSearch();
} else {
dialogMsg(data.message, 2);
}
}
}
});
}
//导出
var ToExcel = function () {
$.download('/OrderList/Order/NoPeiHuoNoStockOrderToExcel', { queryJson: getQueryJson(false) }, "post");
......
......@@ -48,19 +48,19 @@ namespace Bailun.Statistics.Web.Areas.OrderList.Controllers
{
private readonly IOrderAppService _orderAppService;
private readonly IPurchaseMonitorAppService _purchaseMonitorAppService;
private readonly IOrderProductRemarkAppService _orderProductRemarkAppService;
private readonly IOrderProductService _orderProductService;
private readonly IHttpManagerDomainService _httpManagerDomainService;
private readonly ITempSkuCategoryAppService _tempSkuCategoryAppService;
public OrderController(IOrderAppService orderAppService,
IPurchaseMonitorAppService purchaseMonitorAppService,
IOrderProductRemarkAppService orderProductRemarkAppService,
IOrderProductService orderProductService,
IHttpManagerDomainService httpManagerDomainService,
ITempSkuCategoryAppService tempSkuCategoryAppService)
{
_orderAppService = orderAppService;
_purchaseMonitorAppService = purchaseMonitorAppService;
_orderProductRemarkAppService = orderProductRemarkAppService;
_orderProductService = orderProductService;
_httpManagerDomainService = httpManagerDomainService;
_tempSkuCategoryAppService = tempSkuCategoryAppService;
}
......@@ -900,6 +900,16 @@ namespace Bailun.Statistics.Web.Areas.OrderList.Controllers
return null;
}
/// <summary>
/// 手动匹配订单仓库
/// </summary>
public ActionResult MatchOrderProductWareHouse()
{
_orderProductService.MatchOrderProductWareHouse(false);
return Success("匹配完成");
}
#region Api
/// <summary>
......@@ -955,5 +965,25 @@ namespace Bailun.Statistics.Web.Areas.OrderList.Controllers
return _orderAppService.GetShipLogistics().ToJsonString();
}
#endregion
#region tasktest
/// <summary>
/// 测试环球配货信息同步接口
/// </summary>
/// <param name="OrderNoSystem"></param>
[AllowAnonymous]
[HttpGet]
public void testship(string OrderNoSystem)
{
_orderAppService.testship(OrderNoSystem);
}
[AllowAnonymous]
[HttpGet]
public void testOrder(string OrderNoSystem)
{
_orderAppService.testAddOrder(OrderNoSystem);
}
#endregion
}
}
......@@ -10,7 +10,12 @@
</label>
<div id="queryWarehouseId" type="select" class="ui-select div-select" style="width: 180px;"></div>
</div>
<div class="col-xs-6 col-sm-1 div-group" style="width: 260px;">
<label class="lb-title">
供应商:
</label>
<div id="suppliers" type="select" class="ui-select div-select" style="width: 200px;"></div>
</div>
<div class="col-xs-6 col-sm-1 div-group" style="width: 195px;">
<label class="lb-title">
下单状态:
......@@ -112,6 +117,15 @@
allowSearch: false,
data: [{ Id: 1, TypeName: '采购建议号' }, { Id: 3, TypeName: 'sku' }]
});
$("#suppliers").ComboBox({
url: "/PurchaseAdvice/PurchaseMonitor/GetAllSuplliers",
id: "SupplierId",
description: "全部",
text: "SupplierName",
height: "200px",
async: true,
allowSearch: true
});
$("#SearchType").ComboBoxSetValue(1);
//加载表格
......@@ -228,7 +242,6 @@
CommonSearch(isBlur);
}
var getQueryJson = function (isBlur) {
debugger;
var warehouseCode = request('warehouseCode');
var sku = request('sku');
var status = request('status');
......@@ -239,6 +252,7 @@
$("#SearchType").ComboBoxSetValue(3);
$("#txt_Keyword").val(sku);
}
var supplier = $('#suppliers').attr('data-value');
var queryJson = {
searchType: $("#SearchType").attr("data-value"),
keyword: $("#txt_Keyword").val(),
......@@ -247,7 +261,8 @@
Buyer: $('#sel_buyer').attr('data-value'),
MonitorNo: monitorNo,
IsBlur: isBlur,
Status: status
Status: status,
supplier:supplier
}
return JSON.stringify(queryJson);
}
......
......@@ -1376,6 +1376,7 @@
<Content Include="Views\Shared\_ReportIndex.cshtml" />
<Content Include="Content\scripts\plugins\form\jquery.form.min.js.map" />
<Content Include="Content\doc\sku仓库配置规则模板.xlsx" />
<Content Include="Content\doc\22.pdf" />
<None Include="Properties\PublishProfiles\oms.pubxml" />
<None Include="Web.Debug.config">
<DependentUpon>Web.config</DependentUpon>
......
......@@ -37,7 +37,7 @@ namespace Bailun.Statistics.Web
{
if (Request.IsLocal)
{
StackExchange.Profiling.MiniProfiler.Start();
//StackExchange.Profiling.MiniProfiler.Start();
}
}
protected override void Application_EndRequest(object sender, EventArgs e)
......
This source diff could not be displayed because it is too large. You can view the blob instead.
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