修改了入库数据以及相关BUG
This commit is contained in:
parent
d8c53f8bee
commit
872c678b10
@ -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;
|
||||
}
|
||||
}
|
@ -25,9 +25,9 @@ public class LabelResult
|
||||
// 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_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_N1 { get; set; } = "";
|
||||
@ -48,9 +48,10 @@ public class LabelResult
|
||||
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_S2 = variety.TotalCount.ToString();
|
||||
}
|
||||
|
||||
public LabelResult()
|
||||
|
@ -424,7 +424,7 @@ public class HyosungRuntime(
|
||||
await hyosungPlcService.WritePrintLabelResultAsync(arg1, true);
|
||||
// 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