同步最新程序

This commit is contained in:
XingCheng3
2026-06-26 13:45:37 +08:00
parent ff5249fa75
commit d504245fcf
27 changed files with 169 additions and 209 deletions

View File

@@ -1,4 +1,4 @@
using DataLinkMesWork;
using DataLinkMesWork;
using MesDataFunction;
using MesServerWork;
using MesWork.PLC;
@@ -138,7 +138,7 @@ namespace MisDataSaveDate
var dt_Device = MisDataFunDll.MisDataFun.dt_Device();
var dt_TagTypeDataType = MisDataFunDll.MisDataFun.dt_TagTypeDataType();
ReloadSpecialConfig();
Get_SpecialOpList();
var sql =
$" SELECT [工位号],[工位名称],[PLC],[PLC代码],[MesDll]" +
@@ -221,13 +221,6 @@ namespace MisDataSaveDate
}
// 重新加载特殊工位及硬编码规则配置缓存
static public void ReloadSpecialConfig()
{
Get_SpecialOpList();
Get_SpecialOpRuleConfig();
}
// 获取特殊工位列表
static public void Get_SpecialOpList()
{
@@ -245,35 +238,6 @@ namespace MisDataSaveDate
PP.SpecialOpList = specialOpList;
}
// 获取特殊工位规则配置缓存结构type -> opName -> ruleKey -> ruleValue
static public void Get_SpecialOpRuleConfig()
{
string procedureName = "MES_特殊工位规则配置表_查询";
SqlParameter[] thisParms = new SqlParameter[0];
DataAccess.ExecuteStoredProcedure(procedureName, ref thisParms, out DataTable dt);
var ruleConfig = new Dictionary<string, Dictionary<string, Dictionary<string, string>>>();
foreach (DataRow row in dt.Rows)
{
string type = row["type"].ToString();
string opName = row["opName"].ToString();
string ruleKey = row["ruleKey"].ToString();
string ruleValue = row["ruleValue"].ToString();
if (!ruleConfig.ContainsKey(type))
{
ruleConfig[type] = new Dictionary<string, Dictionary<string, string>>();
}
if (!ruleConfig[type].ContainsKey(opName))
{
ruleConfig[type][opName] = new Dictionary<string, string>();
}
ruleConfig[type][opName][ruleKey] = ruleValue;
}
PP.SpecialOpRuleConfig = ruleConfig;
}
public void SaveData_Load(object sender, EventArgs e)
{
@@ -1110,8 +1074,7 @@ namespace MisDataSaveDate
private void button19_Click_1(object sender, EventArgs e)
{
ReloadSpecialConfig();
MessageBox.Show("特殊工位和规则配置已重新加载!");
Get_SpecialOpList();
}
private void button21_Click(object sender, EventArgs e)

View File

@@ -275,6 +275,10 @@
<Project>{9ace8658-5e01-4323-8a59-d43cffcb47f3}</Project>
<Name>Function1061</Name>
</ProjectReference>
<ProjectReference Include="..\..\MisDataFunction\Function1062\Function1062.csproj">
<Project>{304a54d1-63ad-44de-b573-772ee533c47f}</Project>
<Name>Function1062</Name>
</ProjectReference>
<ProjectReference Include="..\..\MisDataFunction\Function1065\Function1065.csproj">
<Project>{abe98fa8-80eb-40e8-a93a-d70f14eb80dc}</Project>
<Name>Function1065</Name>

View File

@@ -10,6 +10,7 @@ namespace MisDataSaveDate
readonly string headUrl = "WebSend/";
[HttpPost]
[Route("ApiFailRetry")]
public HttpResponseMessage ReceiveMomPlanData([FromBody] JObject jobj)
{

View File

@@ -861,8 +861,9 @@ namespace MisDataSaveDate
/// 产品型号代码
/// </summary>
public int EngineTypeID { get; set; }
/// <summary>
/// 工位号
/// 工位号,如 OP120
/// </summary>
public string OpName { get; set; }
}