|
|
|
@ -19,6 +19,7 @@ using ApiServer = SlnMesnac.RfidUpload.TouchSocket.ApiServer;
|
|
|
|
|
using System.Windows;
|
|
|
|
|
using System.Threading;
|
|
|
|
|
using static SlnMesnac.RfidUpload.UI.SelectRouterWindow;
|
|
|
|
|
using static SlnMesnac.RfidUpload.UI.viewModel.containerStorageQueryByCsbViewModel;
|
|
|
|
|
|
|
|
|
|
namespace SlnMesnac.RfidUpload.UI.viewModel
|
|
|
|
|
{
|
|
|
|
@ -38,6 +39,7 @@ namespace SlnMesnac.RfidUpload.UI.viewModel
|
|
|
|
|
private AppConfig appConfig = AppConfig.Instance;
|
|
|
|
|
private JsonChange jsonChange = JsonChange.Instance;
|
|
|
|
|
private int No = 1;
|
|
|
|
|
private string TrackNo = "";
|
|
|
|
|
//暂存库存容器分发配发机构数据
|
|
|
|
|
private Institution Institution;
|
|
|
|
|
#region 参数定义
|
|
|
|
@ -249,6 +251,7 @@ namespace SlnMesnac.RfidUpload.UI.viewModel
|
|
|
|
|
public MainWindowViewModel()
|
|
|
|
|
{
|
|
|
|
|
containerStorageQueryByCsbViewModel.RefreshSubmitVerifyEvent += RefreshSubmitVerify;
|
|
|
|
|
containerStorageQueryByCsbViewModel.RefreshTrackNoEvent += RefreshTrackNo;
|
|
|
|
|
TransferOrderViewModel.RefreshSubmitVerifyEvent += RefreshSubmitVerify;
|
|
|
|
|
SelectRouterWindow.RefreshSubmitVerifyEvent += RefreshSubmitVerify;
|
|
|
|
|
logger.Info("程序启动");
|
|
|
|
@ -410,18 +413,44 @@ namespace SlnMesnac.RfidUpload.UI.viewModel
|
|
|
|
|
{
|
|
|
|
|
if (workModelParam == 1) //新容器入库
|
|
|
|
|
{
|
|
|
|
|
//取出托盘号并调用接口
|
|
|
|
|
var palletInfo = labelItems.FirstOrDefault();
|
|
|
|
|
if (palletInfo == null)
|
|
|
|
|
{
|
|
|
|
|
MessageBox.Show("请先放包裹读条码!");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
var info = labelItems.ToList();
|
|
|
|
|
var strList = info.Select(x => x.result).ToList();
|
|
|
|
|
int batchNo = 0;
|
|
|
|
|
string opBatch = System.Guid.NewGuid().ToString("N").Substring(0, 20);
|
|
|
|
|
ListPage<string> ls = new ListPage<string>(strList, 500);
|
|
|
|
|
CsbResult res = new CsbResult();
|
|
|
|
|
foreach (var enumerable in ls.GetPage())
|
|
|
|
|
{
|
|
|
|
|
CsbResult res = csbHandleBusiness.scanAnyContainerCodeByCsb(palletInfo.result);
|
|
|
|
|
MessageBox.Show("新容器入库" + res.message);
|
|
|
|
|
batchNo++;
|
|
|
|
|
res = csbHandleBusiness.containerStorageBatchQueryByCsb(TrackNo,batchNo.ToString(), enumerable.ToList());
|
|
|
|
|
}
|
|
|
|
|
MainPageTipMessage = $"新容器入库 [{res.GetMsg()}]";
|
|
|
|
|
Task.Run(() =>
|
|
|
|
|
{
|
|
|
|
|
Thread.Sleep(3000);
|
|
|
|
|
CsbResult res = csbHandleBusiness.receContainerStorageByCsb(TrackNo, "1");
|
|
|
|
|
|
|
|
|
|
Application.Current.Dispatcher.Invoke(() =>
|
|
|
|
|
{
|
|
|
|
|
MainPageTipMessage = $"新容器入库反馈接口,[{res.GetMsg()}]";
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
////取出托盘号并调用接口
|
|
|
|
|
//var palletInfo = labelItems.FirstOrDefault();
|
|
|
|
|
//if (palletInfo == null)
|
|
|
|
|
//{
|
|
|
|
|
// MessageBox.Show("请先放包裹读条码!");
|
|
|
|
|
// return;
|
|
|
|
|
//}
|
|
|
|
|
//else
|
|
|
|
|
//{
|
|
|
|
|
// CsbResult res = csbHandleBusiness.scanAnyContainerCodeByCsb(palletInfo.result);
|
|
|
|
|
// MessageBox.Show("新容器入库" + res.message);
|
|
|
|
|
//}
|
|
|
|
|
}
|
|
|
|
|
else if (workModelParam == 2) //封发-按调拨单
|
|
|
|
|
{
|
|
|
|
@ -752,6 +781,13 @@ namespace SlnMesnac.RfidUpload.UI.viewModel
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void RefreshTrackNo(string trackNo)
|
|
|
|
|
{
|
|
|
|
|
MainPageTipMessage = "trackNo:" + trackNo;
|
|
|
|
|
TrackNo = trackNo;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|