20260831功能同步:
1. 不同车间区分料框查询、料框解绑接口 2. 注释电池型号逻辑 3. 打开电池状况界面
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
|
||||
using JinYuan.DAL.Models;
|
||||
using JinYuan.DAL.Service;
|
||||
using JinYuan.Helper;
|
||||
using JinYuan.MES.Enums;
|
||||
using JinYuan.MES.Models;
|
||||
@@ -312,9 +314,16 @@ namespace JinYuan.ControlCenters
|
||||
/// </summary>
|
||||
private async Task FeedBackToPLC(PlcGroup pf, TrayInfo trayInfo, string grade)
|
||||
{
|
||||
MaterialFrameRuleService service = new MaterialFrameRuleService(CommonMethods.db.Db);
|
||||
MaterialFrameRule rule = service.GetRuleByCode(trayInfo.trayNo);
|
||||
|
||||
short model = (short)CommonMethods.mesConfig.GetModel(trayInfo?.productCode ?? CommonMethods.mesConfig.ModelName);
|
||||
if (model == 0) model = 1;
|
||||
|
||||
// TODO 注释电池型号自动选择逻辑 by clm 20260831
|
||||
//string modelName = trayInfo?.productCode;
|
||||
//short model = CommonMethods.mesConfig.GetModelNum(modelName, rule?.Workshop_Code ?? string.Empty);
|
||||
|
||||
short gradeCode = 99;
|
||||
if (!string.IsNullOrEmpty(grade))
|
||||
gradeCode = (short)CommonMethods.GetGradeNo(grade);
|
||||
@@ -364,8 +373,15 @@ namespace JinYuan.ControlCenters
|
||||
|
||||
try
|
||||
{
|
||||
MesUrlService service = new MesUrlService(CommonMethods.db.Db);
|
||||
string url = service.GetMesUrl(trayID, ConstValue.INTER_QueryTray);
|
||||
if (string.IsNullOrEmpty(url))
|
||||
{
|
||||
throw new ArgumentException($"未找到{ConstValue.INTER_QueryTray}对应的MES接口地址");
|
||||
}
|
||||
|
||||
var (success, mesMessage, mesResType, trayinfo) = await CommonMethods.hbgMes.QueryMesTrayInfosAsync(
|
||||
CommonMethods.mesConfig.queryTrayUrl,
|
||||
url,
|
||||
CommonMethods.mesConfig.siteCode,
|
||||
CommonMethods.mesConfig.lineCode,
|
||||
CommonMethods.mesConfig.equipNum,
|
||||
@@ -2029,8 +2045,15 @@ namespace JinYuan.ControlCenters
|
||||
//}
|
||||
try
|
||||
{
|
||||
MesUrlService service = new MesUrlService(CommonMethods.db.Db);
|
||||
string url = service.GetMesUrl(trayID, ConstValue.INTER_UnBindTray);
|
||||
if (string.IsNullOrEmpty(url))
|
||||
{
|
||||
throw new ArgumentException($"未找到{ConstValue.INTER_UnBindTray}对应的MES接口地址");
|
||||
}
|
||||
|
||||
var (success, mesMessage) = await CommonMethods.hbgMes.UnbindTrayInfosAsync(
|
||||
CommonMethods.mesConfig.unbindTrayUrl,
|
||||
url,
|
||||
CommonMethods.mesConfig.equipNum,
|
||||
trayID
|
||||
).ConfigureAwait(false);
|
||||
|
||||
Reference in New Issue
Block a user