dev
liuwf 1 year ago
parent bbada3ca7f
commit a1eae00139

@ -47,8 +47,8 @@ namespace Admin.Core.Service
{
try
{
storeCode = "FPJCK-001";
List<RecordInStore> preCordList = await _recordInstoreRepository.QueryAsync(d =>d.StoreCode.Equals(storeCode) );//&& d.CreatedTime >= startTime&& d.CreatedTime <= endTime
List<RecordInStore> preCordList = _recordInstoreRepository.QueryAsync(d =>d.StoreCode.Equals(storeCode) ).Result;//&& d.CreatedTime >= startTime&& d.CreatedTime <= endTime
if (preCordList.Count() == 0) return null;
var proList = _productPlanInfoRepository.Query();
if (proList.Count() == 0) return null;

@ -101,8 +101,7 @@ namespace Aucma.Core.BoxFoam.Business
private List<BaseSpaceInfo> allSpaces = null;
private List<SpaceAddress> spaceAddresses = new List<SpaceAddress>();
private SemaphoreSlim _lock = new SemaphoreSlim(1);
private static int AAA = 1;
public void init()
{
@ -111,7 +110,12 @@ namespace Aucma.Core.BoxFoam.Business
{
spaceAddresses.Add(spaceConfig.GetSpaceAddress(storeCode, space.SpaceCode));
}
// 模拟入库
Task.Run(() =>
{
Thread.Sleep(2000);
InStore("B24010181060282920011");
});
//实时监测入库任务下发和入库任务完成
StartPassDownAndRealInstoreFinish();
@ -278,16 +282,16 @@ namespace Aucma.Core.BoxFoam.Business
if (result)
{
#region 更新过点数据
MaterialCompletion completion = new MaterialCompletion();
completion.OrderCode = print.OrderCode;
completion.MaterialBarcode = materialBarCode;
completion.MaterialCode = print.MaterialCode;
completion.MaterialName = print.MaterialName;
completion.StationName = "1003";
completion.CompleteDate = DateTime.Now;
await _iMaterialCompletionServices.AddAsync(completion);
//MaterialCompletion completion = new MaterialCompletion();
//completion.OrderCode = print.OrderCode;
//completion.MaterialBarcode = materialBarCode;
//completion.MaterialCode = print.MaterialCode;
//completion.MaterialName = print.MaterialName;
//completion.StationName = "1003";
//completion.CompleteDate = DateTime.Now;
//await _iMaterialCompletionServices.AddAsync(completion);
#endregion
// RefreshDataGridDelegateEvent?.Invoke();
await _baseSpaceInfoServices.UpdateSpaceInfo(spaceInfo);
}
}

@ -36,7 +36,7 @@ namespace Aucma.Core.BoxFoam.ViewModels
InStoreBusiness.RefreshScanMateriaCodeEvent += RefreshScanInfo;//扫码信息刷新
// Job_BoxFoamInStoreTask_Quartz.LogDelegateEvent += PrintMessageToListBox;//入库日志事件
InStoreBusiness.LogDelegateEvent += PrintMessageToListBox;//入库日志事件
ExecMethod();
}
public async Task ExecMethod()
@ -54,7 +54,7 @@ namespace Aucma.Core.BoxFoam.ViewModels
private async Task LoadData()
{
var storeCode = Appsettings.app("StoreInfo", "StoreCode");
var storeCode = Appsettings.app("StoreInfo", "BeforeStoreCode");
DateTime startTime = Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd 00:00:00"));
DateTime endTime = Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd 23:59:59"));
@ -65,6 +65,7 @@ namespace Aucma.Core.BoxFoam.ViewModels
int i = 1;
try
{
var list = await _recordInstoreServices.SaveRecordToDb(storeCode, startTime, endTime);
foreach (var item in list.OrderByDescending(d => d.No))
{
@ -84,8 +85,7 @@ namespace Aucma.Core.BoxFoam.ViewModels
}
catch (Exception ex)
{
throw;
Console.WriteLine(ex.ToString());
}
//Datalist.Insert(0, Datalist[Datalist.Count - 1]);
//Datalist.RemoveAt(Datalist.Count - 1);

@ -202,7 +202,7 @@
"EquipName": "泡前库Plc",
"PlcType": "Siemens",
"Enabled": true,
"IP": "10.10.93.41",
"IP": "127.0.0.1",
"Port": 102
},
{

Loading…
Cancel
Save