20260831功能同步:
1. 不同车间区分料框查询、料框解绑接口 2. 注释电池型号逻辑 3. 打开电池状况界面
This commit is contained in:
@@ -182,6 +182,29 @@ namespace JinYuan.VirtualDataLibrary
|
||||
return 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 将电池型号+车间转换成下发PLC的型号编号
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public short GetModelNum(string modelName, string workshopCode)
|
||||
{
|
||||
short defVal = 0;
|
||||
bool existModel = modelMapping.TryGetValue(modelName, out int resModel);
|
||||
if (!existModel)
|
||||
{
|
||||
return defVal; // 键存在,返回对应值
|
||||
}
|
||||
|
||||
bool existCode = ConstValue.WorkshopMap.TryGetValue(workshopCode, out short workshopOffset);
|
||||
if (!existCode)
|
||||
{
|
||||
workshopOffset = 0;
|
||||
}
|
||||
|
||||
defVal = (short)(resModel * 10 + workshopOffset);
|
||||
return defVal;
|
||||
}
|
||||
|
||||
// 物流线各工位,生产型号写PLC地址
|
||||
private Dictionary<string, string> modelPLCAddr_Mapping = new Dictionary<string, string>()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user