20260831功能同步:
1. 不同车间区分料框查询、料框解绑接口 2. 注释电池型号逻辑 3. 打开电池状况界面
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
using JinYuan.DAL.Models;
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace JinYuan.DAL.Service
|
||||
{
|
||||
public interface IMesUrlService
|
||||
{
|
||||
string GetMesUrl(string trayCode, string interfaceKey);
|
||||
}
|
||||
|
||||
public class MesUrlService : IMesUrlService
|
||||
{
|
||||
protected readonly ISqlSugarClient _db;
|
||||
private MaterialFrameRuleService _ruleService;
|
||||
private WorkshopInterCfgService _cfgService;
|
||||
|
||||
public MesUrlService(ISqlSugarClient db)
|
||||
{
|
||||
_db = db;
|
||||
_ruleService = new MaterialFrameRuleService(_db);
|
||||
_cfgService = new WorkshopInterCfgService(_db);
|
||||
}
|
||||
|
||||
public string GetMesUrl(string trayCode, string interfaceKey)
|
||||
{
|
||||
if (string.IsNullOrEmpty(trayCode) || string.IsNullOrEmpty(interfaceKey))
|
||||
return string.Empty;
|
||||
|
||||
var rule = _ruleService.GetRuleByCode(trayCode);
|
||||
if (rule == null)
|
||||
return string.Empty;
|
||||
|
||||
var url = _cfgService.GetUrl(rule.Workshop_Code, interfaceKey);
|
||||
|
||||
return url;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user