Compare commits
11 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
1d6c2a99c9 | ||
![]() |
380a5e6b7c | ||
![]() |
4000c331ac | ||
![]() |
449725e03c | ||
![]() |
3bb7e88752 | ||
![]() |
1fda31eb3b | ||
![]() |
e674b6929a | ||
![]() |
ea434ac8b9 | ||
![]() |
872c678b10 | ||
![]() |
d8c53f8bee | ||
![]() |
1e852f0d86 |
@ -9,7 +9,6 @@ public class HyosungAgvService(
|
||||
ILoggerFactory loggerFactory,
|
||||
IAgvBinService agvBinService,
|
||||
ITrayService trayService,
|
||||
IVarietyService varietyService,
|
||||
IDictService dictService) : IHyosungAgvService
|
||||
{
|
||||
private readonly HikAgv _agv = new(loggerFactory.CreateLogger<HikAgv>());
|
||||
@ -25,9 +24,8 @@ public class HyosungAgvService(
|
||||
} while (status is null);
|
||||
|
||||
var tray = await trayService.GetByCode(trayCode);
|
||||
var variety = await varietyService.GetById(tray.VarietyId);
|
||||
var height = (int)Math.Ceiling(((tray.StackHeight ?? 0) / 10.0)!);
|
||||
var bin = await agvBinService.GetAvailableBin(variety);
|
||||
var height = (int)Math.Ceiling((double)((tray.StackHeight ?? 0) / 10.0)!);
|
||||
var bin = await agvBinService.GetAvailableBin(height);
|
||||
AgvPosition start = new AgvPosition()
|
||||
{
|
||||
PositionCode = "A1",
|
||||
@ -40,15 +38,14 @@ public class HyosungAgvService(
|
||||
};
|
||||
if (!string.IsNullOrEmpty(bin.HeightCode))
|
||||
await UnBin(bin);
|
||||
// var ctnrType = await dictService.GetKeyAsync("AgvRackType", bin.Height.ToString());
|
||||
var ctnrType = variety.CtnrType;
|
||||
var ctnrType = await dictService.GetKeyAsync("AgvRackType", bin.Height.ToString());
|
||||
if (string.IsNullOrEmpty(ctnrType))
|
||||
ctnrType = "14";
|
||||
bin.HeightCode = ctnrType;
|
||||
|
||||
var taskCode = await _agv.CarryToAsync(start, stop, ctnrType, 120, "1");
|
||||
await _agv.WaitingForTaskCompletedAsync(taskCode);
|
||||
await agvBinService.BindAsync(bin, variety.Lot);
|
||||
await agvBinService.BindAsync(bin);
|
||||
}
|
||||
|
||||
public async Task UnBin(AgvBinEntity bin)
|
||||
|
@ -148,7 +148,7 @@ public class HyosungPlcService(ILogger<HyosungPlcService> logger) : IHyosungPlcS
|
||||
break;
|
||||
}
|
||||
|
||||
await _writer.WriteShortsAsync(13050, [1, 1, 1, masterCount]);
|
||||
await _writer.WriteShortsAsync(13050, [1, 1, 1, 2]);
|
||||
}
|
||||
|
||||
public async Task WritePrintLabelResultAsync(int index, bool result)
|
||||
|
@ -49,7 +49,7 @@ public class AveryPrinter(string host, int port)
|
||||
await ConnectAsync(CancellationToken.None);
|
||||
}
|
||||
|
||||
await _socket.SendAsync(Encoding.UTF8.GetBytes(context));
|
||||
await _socket.SendAsync(Encoding.ASCII.GetBytes(context));
|
||||
}
|
||||
|
||||
private const string CleanCmd = "#!A1#!CA#!P1";
|
||||
@ -63,7 +63,7 @@ public class AveryPrinter(string host, int port)
|
||||
await ConnectAsync(CancellationToken.None);
|
||||
}
|
||||
|
||||
await _socket.SendAsync(Encoding.UTF8.GetBytes(CleanCmd));
|
||||
await _socket.SendAsync(Encoding.ASCII.GetBytes(CleanCmd));
|
||||
}
|
||||
|
||||
public async Task PrintAsync()
|
||||
@ -74,6 +74,6 @@ public class AveryPrinter(string host, int port)
|
||||
await ConnectAsync(CancellationToken.None);
|
||||
}
|
||||
|
||||
await _socket.SendAsync(Encoding.UTF8.GetBytes(PrintCmd));
|
||||
await _socket.SendAsync(Encoding.ASCII.GetBytes(PrintCmd));
|
||||
}
|
||||
}
|
@ -121,14 +121,14 @@ public class HyosungPrinter(
|
||||
"250101J068",
|
||||
$"\"{DateTime.Now.ToString("yyMMdd" + "J") + tray.ControlNo.ToString()?.PadLeft(3, '0')}\""
|
||||
},
|
||||
{ "DTYY-JPA11530SFG250101000900115305480", $"\"{tray.Barcode}\"" }
|
||||
{ "DTYY-JPA11530SFG250101000900115305480", $"{tray.Barcode}" }
|
||||
};
|
||||
string content = options.Value.DefaultTemp;
|
||||
foreach (var (key, value) in dic)
|
||||
{
|
||||
content = content.Replace(key, value);
|
||||
}
|
||||
|
||||
logger.LogInformation($"print content: {content}");
|
||||
return content;
|
||||
}
|
||||
}
|
@ -32,14 +32,8 @@ public class AgvBinEntity
|
||||
[SugarColumn(ColumnDescription = "排序")]
|
||||
public int Sort { get; set; }
|
||||
|
||||
[SugarColumn(IsNullable = true)] public string HeightCode { get; set; }
|
||||
[SugarColumn(IsNullable =true)]
|
||||
public string HeightCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否是第二层
|
||||
/// </summary>
|
||||
[SugarColumn(IsNullable = true)]
|
||||
public bool IsSecondLayer { get; set; } = false;
|
||||
|
||||
[SugarColumn(IsNullable = true)] public int BindLot { get; set; } = 0;
|
||||
public bool IsDeleted { get; set; }
|
||||
}
|
@ -57,7 +57,7 @@ public class VarietyEntity
|
||||
[SugarColumn(ColumnDescription = "垛头数量")]
|
||||
public int? StackHeadCount { get; set; }
|
||||
|
||||
[SugarColumn(ColumnDescription = "纸托Id", IsNullable = true)]
|
||||
[SugarColumn(ColumnDescription = "纸托Id",IsNullable =true)]
|
||||
public int? PaperTrayId { get; set; }
|
||||
|
||||
[SugarColumn(ColumnDescription = "是否需要纸箱")]
|
||||
@ -84,13 +84,13 @@ public class VarietyEntity
|
||||
[SugarColumn(ColumnDescription = "副标签数量")]
|
||||
public int SubLabelCount { get; set; }
|
||||
|
||||
[SugarColumn(IsNullable = true)] public int? LastNo { get; set; }
|
||||
[SugarColumn(IsNullable =true)]
|
||||
public int? LastNo { get; set; }
|
||||
|
||||
[SugarColumn(IsNullable = true)] public double? NetWeight { get; set; }
|
||||
[SugarColumn(IsNullable =true)]
|
||||
public double? NetWeight { get; set; }
|
||||
|
||||
[SugarColumn(IsNullable = true)] public double? GrossWeight { get; set; }
|
||||
[SugarColumn(IsNullable =true)]
|
||||
public double? GrossWeight { get; set; }
|
||||
|
||||
[SugarColumn(IsNullable = true)] public bool? IsDoubleStack { get; set; }
|
||||
|
||||
[SugarColumn(IsNullable = true)] public string? CtnrType { get; set; }
|
||||
}
|
@ -70,10 +70,6 @@ public class Variety
|
||||
|
||||
public double? GrossWeight { get; set; }
|
||||
|
||||
public bool? IsDoubleStack { get; set; }
|
||||
|
||||
public string? CtnrType { get; set; }
|
||||
|
||||
public static Variety Create(VarietyEntity entity, List<PalletEntity> pallets)
|
||||
{
|
||||
var variety = new Variety()
|
||||
@ -105,9 +101,7 @@ public class Variety
|
||||
HasBox = entity.HasBox,
|
||||
LastNo = entity.LastNo,
|
||||
NetWeight = entity.NetWeight,
|
||||
GrossWeight = entity.GrossWeight,
|
||||
IsDoubleStack = entity.IsDoubleStack,
|
||||
CtnrType = entity.CtnrType
|
||||
GrossWeight = entity.GrossWeight
|
||||
};
|
||||
if (entity.PaperTrayId != null && entity.PaperTrayId != 0)
|
||||
variety.PaperTray = Pallet.FromEntity(pallets.First(x => x.Id == entity.PaperTrayId));
|
||||
@ -147,9 +141,7 @@ public class Variety
|
||||
HasBox = HasBox,
|
||||
LastNo = LastNo,
|
||||
NetWeight = NetWeight,
|
||||
GrossWeight = GrossWeight,
|
||||
IsDoubleStack = IsDoubleStack,
|
||||
CtnrType = CtnrType
|
||||
GrossWeight = GrossWeight
|
||||
};
|
||||
return entity;
|
||||
}
|
||||
|
@ -1,6 +1,5 @@
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Seyounth.Hyosung.Data.Entities;
|
||||
using Seyounth.Hyosung.Data.Models;
|
||||
using Seyounth.Hyosung.Data.Repositories;
|
||||
|
||||
namespace Seyounth.Hyosung.Data.Services;
|
||||
@ -13,69 +12,37 @@ public class AgvBinService : IAgvBinService
|
||||
|
||||
public AgvBinService(IServiceProvider provider)
|
||||
{
|
||||
_repository = provider.CreateScope().ServiceProvider.GetRequiredService<IRepository<AgvBinEntity>>();
|
||||
_repository = provider.CreateScope().ServiceProvider.GetRequiredService<IRepository<AgvBinEntity>>();
|
||||
//_repository = provider.GetService<IRepository<AgvBinEntity>>();
|
||||
_cache = _repository.GetList();
|
||||
_cache = _repository.GetList();
|
||||
}
|
||||
|
||||
public async Task<AgvBinEntity> GetAvailableBin(Variety variety)
|
||||
public async Task<AgvBinEntity> GetAvailableBin(int height)
|
||||
{
|
||||
var repo = _repository.CopyNew();
|
||||
AgvBinEntity? bin = null;
|
||||
|
||||
if (variety.IsDoubleStack ?? false)
|
||||
var bin = await _repository.CopyNew().AsQueryable()
|
||||
.Where(x => x.IsFree && !x.IsDeleted).OrderBy(x => x.Sort).FirstAsync();
|
||||
if (bin.BinCode == "B10")
|
||||
{
|
||||
bin = await repo.AsQueryable()
|
||||
.Where(x =>
|
||||
x.IsFree && // 二层是空的
|
||||
!x.IsDeleted &&
|
||||
x.IsSecondLayer &&
|
||||
// 查找底层放了相同产品且底层不是 Free 的情况
|
||||
repo.AsQueryable()
|
||||
.Any(y =>
|
||||
y.BinCode == x.BinCode && // 底层和二层库位码相同
|
||||
!y.IsSecondLayer && // 是底层
|
||||
!y.IsFree && // 底层不是 Free
|
||||
y.BindLot == variety.Lot // 底层和二层绑定的 Lot 相同
|
||||
)
|
||||
)
|
||||
.OrderBy(x => x.Sort)
|
||||
.FirstAsync();
|
||||
await _repository.CopyNew().AsUpdateable()
|
||||
.Where(x => x.RackType == 2 && !x.IsDeleted)
|
||||
.SetColumns(x => x.IsFree, true)
|
||||
.ExecuteCommandAsync();
|
||||
}
|
||||
else
|
||||
else if (bin.BinCode == "B33")
|
||||
{
|
||||
bin = await repo.AsQueryable()
|
||||
.Where(x => x.IsFree && !x.IsDeleted)
|
||||
.OrderBy(x => x.Sort)
|
||||
.FirstAsync();
|
||||
}
|
||||
|
||||
if (bin != null)
|
||||
{
|
||||
if (bin.BinCode == "B10")
|
||||
{
|
||||
await repo.AsUpdateable()
|
||||
.Where(x => x.RackType == 2 && !x.IsDeleted)
|
||||
.SetColumns(x => x.IsFree, true)
|
||||
.ExecuteCommandAsync();
|
||||
}
|
||||
else if (bin.BinCode == "B33")
|
||||
{
|
||||
await repo.AsUpdateable()
|
||||
.Where(x => x.RackType == 1 && !x.IsDeleted)
|
||||
.SetColumns(x => x.IsFree, true)
|
||||
.ExecuteCommandAsync();
|
||||
}
|
||||
await _repository.CopyNew().AsUpdateable()
|
||||
.Where(x => x.RackType == 1 && !x.IsDeleted)
|
||||
.SetColumns(x => x.IsFree, true)
|
||||
.ExecuteCommandAsync();
|
||||
}
|
||||
|
||||
return bin;
|
||||
}
|
||||
|
||||
public Task BindAsync(AgvBinEntity entity, int lot)
|
||||
public Task BindAsync(AgvBinEntity entity)
|
||||
{
|
||||
entity.IsFree = false;
|
||||
_cache.First(e => e.Id == entity.Id).IsFree = false;
|
||||
entity.BindLot = lot;
|
||||
return _repository.CopyNew().UpdateAsync(entity);
|
||||
}
|
||||
}
|
@ -9,25 +9,32 @@ public class LabelResult
|
||||
public string BE_ID { get; set; } = "2240";
|
||||
public string BAR_CODE { get; set; } = "";
|
||||
public string ITEM_CODE { get; set; } = "";
|
||||
public string LABEL_ID { get; set; } = "";
|
||||
public string LABEL_ID { get; set; } = "TY_CN_PRODUCT";
|
||||
public string WMS_UOM { get; set; } = "";
|
||||
public string ERP_UOM { get; set; } = "";
|
||||
public string MFG_DATE { get; set; } = "";
|
||||
public decimal NET_WEIGHT { get; set; } = 0;
|
||||
public decimal GROSS_WEIGHT { get; set; } = 0;
|
||||
public string MFG_LINE { get; set; } = "";
|
||||
public string MFG_LINE { get; set; } = "TYJP11";
|
||||
public string GRADE { get; set; } = "";
|
||||
public string LOT { get; set; } = "";
|
||||
|
||||
public string BOX_NO { get; set; } = "";
|
||||
// public string DENIER { get; set; } = "";
|
||||
// public string FILA { get; set; } = "";
|
||||
|
||||
// public string DENIER { get; set; } = "";
|
||||
// public string FILA { get; set; } = "";
|
||||
public string CUSTOMER_NAME { get; set; } = "";
|
||||
// public string REMARKS { get; set; } = "";
|
||||
// public string TRI_INTERFACE_YN { get; set; } = "";
|
||||
public string TRI_TYPE { get; set; } = "zp10";
|
||||
//public string COMMON_S1 { get; set; } = "";
|
||||
//public string COMMON_S2 { get; set; } = "";
|
||||
//public string COMMON_S3 { get; set; } = "";
|
||||
|
||||
// public string REMARKS { get; set; } = "";
|
||||
// public string TRI_INTERFACE_YN { get; set; } = "";
|
||||
public string TRI_TYPE { get; set; } = "ZP10";
|
||||
public string COMMON_S1 { get; set; } = "";
|
||||
public string COMMON_S2 { get; set; } = "";
|
||||
|
||||
public string COMMON_S3 { get; set; } = "";
|
||||
public string COMMON_S4 { get; set; } = "";
|
||||
public string COMMON_S5 { get; set; } = "";
|
||||
|
||||
//public string COMMON_S4 { get; set; } = "";
|
||||
//public string COMMON_S5 { get; set; } = "";
|
||||
//public string COMMON_N1 { get; set; } = "";
|
||||
@ -37,20 +44,30 @@ public class LabelResult
|
||||
public string MODIFIED_BY { get; set; } = "seyounth";
|
||||
public string MODIFIED_ON { get; set; } = DateTime.Now.ToString("yyyy-MM-dd");
|
||||
|
||||
public double COMMON_N1 { get; set; } = 0;
|
||||
|
||||
public LabelResult(Tray tray, Variety variety)
|
||||
{
|
||||
LABEL_ID = tray.TrayCode;
|
||||
BE_ID = "2240";
|
||||
BAR_CODE = tray.Barcode ?? "";
|
||||
ITEM_CODE = variety.Code;
|
||||
MFG_DATE = DateTime.Now.ToString("yyyy-MM-dd");
|
||||
MFG_DATE = DateTime.Now.ToString("yyyyMMdd");
|
||||
NET_WEIGHT = (decimal)tray.NetWeight;
|
||||
GROSS_WEIGHT = (decimal)tray.GrossWeight;
|
||||
GRADE = tray.Grade ?? "";
|
||||
LOT = variety.Lot.ToString();
|
||||
BOX_NO = tray.ControlNo?.ToString() ?? "";
|
||||
BOX_NO = $"{DateTime.Now.ToString("yyMMdd" + "J") + tray.ControlNo.ToString()?.PadLeft(3, '0')}";
|
||||
CREATED_BY = "seyounth";
|
||||
CREATED_ON = DateTime.Now.ToString("yyyy-MM-dd");
|
||||
COMMON_S1 = tray.Type?? "";
|
||||
COMMON_S2 = variety.TotalCount.ToString();
|
||||
COMMON_S3=tray.DenFila?? "";
|
||||
COMMON_S4 = tray.DtexFila?? "";
|
||||
COMMON_S5 = "0";
|
||||
COMMON_N1 = (double)tray.ControlNo;
|
||||
MODIFIED_BY = "seyounth";
|
||||
MODIFIED_ON = DateTime.Now.ToString("yyyy-MM-dd");
|
||||
}
|
||||
|
||||
public LabelResult()
|
||||
|
@ -97,8 +97,10 @@ public class HyosungWmsService : IHyosungWmsService
|
||||
&& t.ITEM_CODE_TYPE == "FERT");
|
||||
result.WMS_UOM = mst_item.WMS_UOM_ID;
|
||||
result.ERP_UOM = mst_item.ERP_UOM_ID;
|
||||
|
||||
var workCenter = await _db.Queryable<MST_ITEM_VERSION>()
|
||||
.FirstAsync(v => v.ITEM_CODE == result.ITEM_CODE);
|
||||
result.MFG_LINE=(workCenter?.WORK_CENTER)??"TYJP11";
|
||||
await _db.Insertable(result).ExecuteCommandAsync();
|
||||
}catch(Exception e)
|
||||
{
|
||||
|
@ -8,14 +8,14 @@ public interface IAgvBinService
|
||||
/// <summary>
|
||||
/// 获取可用的库位信息
|
||||
/// </summary>
|
||||
/// <param name="variety"></param>
|
||||
/// <param name="height"></param>
|
||||
/// <returns></returns>
|
||||
Task<AgvBinEntity> GetAvailableBin(Variety variety);
|
||||
Task<AgvBinEntity> GetAvailableBin(int height);
|
||||
|
||||
/// <summary>
|
||||
/// 绑定相应的库
|
||||
/// </summary>
|
||||
/// <param name="entity"></param>
|
||||
/// <returns></returns>
|
||||
Task BindAsync(AgvBinEntity entity,int lot);
|
||||
Task BindAsync(AgvBinEntity entity);
|
||||
}
|
@ -4,6 +4,8 @@ public interface IReportExportService
|
||||
{
|
||||
Task ExportAsync(string trayCode);
|
||||
|
||||
Task ExportSampleAsync(string trayCode);
|
||||
|
||||
|
||||
Task ExportNoExportAsync();
|
||||
|
||||
|
@ -31,6 +31,70 @@ public class ReportExportService(
|
||||
}
|
||||
}
|
||||
|
||||
public async Task ExportSampleAsync(string trayCode)
|
||||
{
|
||||
try
|
||||
{
|
||||
var tray = await trayService.GetByCode(trayCode);
|
||||
var variety = await varietyService.GetById(tray.VarietyId);
|
||||
var yarns = await yarnService.GetYarnsByTrayIdAsync(tray.Id);
|
||||
await CreateSample(tray, variety, yarns);
|
||||
await trayService.ExportedAsync(tray.TrayCode);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
logger.LogError(e, $"export report [{trayCode}] error");
|
||||
}
|
||||
}
|
||||
|
||||
private async Task CreateSample(Tray tray, Variety variety, List<Yarn> yarns)
|
||||
{
|
||||
try
|
||||
{
|
||||
DataTable dt = new DataTable();
|
||||
dt.Columns.Add("LOT");
|
||||
dt.Columns.Add("DEN");
|
||||
dt.Columns.Add("总个数/垛");
|
||||
dt.Columns.Add("生产时间");
|
||||
dt.Columns.Add("机台");
|
||||
dt.Columns.Add("班次");
|
||||
dt.Columns.Add("码垛时间");
|
||||
for (int i = 1; i <= yarns.Count; i++)
|
||||
{
|
||||
if (i == 1)
|
||||
{
|
||||
dt.Rows.Add(yarns[i - 1].Lot, tray.DenFila, yarns.Count, yarns[i - 1].ProduceTime,
|
||||
yarns[i - 1].Machine, yarns[i - 1].WorkShift, yarns[i - 1].StackTime);
|
||||
}
|
||||
else
|
||||
{
|
||||
dt.Rows.Add(yarns[i - 1].Lot, tray.DenFila, " ", yarns[i - 1].ProduceTime,
|
||||
yarns[i - 1].Machine, yarns[i - 1].WorkShift,yarns[i - 1].StackTime);
|
||||
}
|
||||
}
|
||||
|
||||
var path = await GetDirectoryAsync();
|
||||
var fileName = $"{variety.Lot}_{tray.Barcode.Split(" ")[1]}_{DateTime.Now:yyyyMMdd}.xlsx";
|
||||
var filePath = Path.Combine(path, fileName);
|
||||
using var workbook = new XLWorkbook();
|
||||
var worksheet = workbook.Worksheets.Add(dt,"export");
|
||||
// 设置数据行字体大小
|
||||
var dataRows = worksheet.RowsUsed();
|
||||
foreach (var row in dataRows)
|
||||
{
|
||||
row.Style.Font.FontSize = 14;
|
||||
}
|
||||
|
||||
// 自动调整列宽
|
||||
worksheet.Columns().AdjustToContents();
|
||||
workbook.SaveAs(filePath);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
logger.LogError(e, "export today report error");
|
||||
}
|
||||
}
|
||||
|
||||
private async Task Create(Tray tray, Variety variety, List<Yarn> yarns)
|
||||
{
|
||||
using var workbook = new XLWorkbook(TempPath);
|
||||
@ -90,7 +154,7 @@ public class ReportExportService(
|
||||
{
|
||||
try
|
||||
{
|
||||
await ExportAsync(code);
|
||||
await ExportSampleAsync(code);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
@ -88,9 +88,12 @@ public class TrayService : ITrayService
|
||||
tray.Unit = itemInfo.UNIT;
|
||||
tray.NetWeight = variety.NetWeight ?? itemInfo.NET_WEIGHT;
|
||||
tray.GrossWeight = variety.GrossWeight ?? itemInfo.GROSS_WEIGHT;
|
||||
var netWeight = tray.NetWeight.ToString("0.0");
|
||||
if (netWeight.EndsWith(".0"))
|
||||
netWeight = netWeight.Replace(".0", "");
|
||||
tray.Barcode =
|
||||
$"{itemInfo.ITEM_CODE} {DateTime.Now:yyMMdd}{tray.NetWeight.ToString("0.0").PadLeft(6,'0')}{itemInfo.LOTNO.PadLeft(4, '0')}{tray.ControlNo?.ToString().PadLeft(4, '0')}0";
|
||||
await _db.Updateable(tray.ToEntity()).ExecuteCommandAsync();
|
||||
$"{itemInfo.ITEM_CODE} {DateTime.Now:yyMMdd}{netWeight.PadLeft(6,'0')}{itemInfo.LOTNO.PadLeft(4, '0')}{tray.ControlNo?.ToString().PadLeft(4, '0')}0";
|
||||
await _db.Updateable<TrayEntity>(tray.ToEntity()).ExecuteCommandAsync();
|
||||
// _cache.Remove(tray.TrayCode, out _);
|
||||
return tray;
|
||||
}
|
||||
|
@ -204,10 +204,10 @@ public class HyosungRuntime(
|
||||
{
|
||||
await trayService.StorageAsync(info.TrayCode);
|
||||
|
||||
reportExportService.ExportSampleAsync(info.TrayCode);
|
||||
await hyosungAgvService.StorageAsync(info.TrayCode);
|
||||
//标志下线已完成
|
||||
await hyosungPlcService.LeaveCompletedAsync();
|
||||
await reportExportService.ExportAsync(info.TrayCode);
|
||||
logger.LogInformation($"plc leaving production line success");
|
||||
}
|
||||
catch (Exception e)
|
||||
@ -422,9 +422,10 @@ public class HyosungRuntime(
|
||||
{
|
||||
await printer.PrintAsync(2, tray.TrayCode);
|
||||
await hyosungPlcService.WritePrintLabelResultAsync(arg1, true);
|
||||
var version=await hyosungWmsService.GetItemInfoByItemCode(variety.Code);
|
||||
// await varietyService.SetLastNo(variety.Id, tray.ControlNo.Value);
|
||||
//await hyosungWmsService.UpdateControlNo(variety, tray.ControlNo.Value);
|
||||
await hyosungWmsService.AddLabelResult(new LabelResult(tray, variety));
|
||||
// await hyosungWmsService.AddLabelResult(new LabelResult(tray, variety));
|
||||
}
|
||||
|
||||
logger.LogInformation($"plc request print label success");
|
||||
|
Loading…
x
Reference in New Issue
Block a user