设备参数init
This commit is contained in:
parent
825efc7d67
commit
12ae1f7326
@ -4,6 +4,7 @@ using DOAN.Service.huate_group.Recipe.IService;
|
||||
using DOAN.Model.huate_group.recipe;
|
||||
using DOAN.Model.huate_group.recipe.Dto;
|
||||
using System.ComponentModel;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
|
||||
//创建时间:2024-08-21
|
||||
namespace DOAN.Admin.WebApi.Controllers.huate_group.Recipe
|
||||
@ -181,5 +182,14 @@ namespace DOAN.Admin.WebApi.Controllers.huate_group.Recipe
|
||||
var response = _RecipeService.GetPartNumber(partString);
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
//TODO 根据设备获取参数
|
||||
[HttpGet("get_paramter_list")]
|
||||
public IActionResult GetParamterListByDevice(int device_id) {
|
||||
var response = _RecipeService.GetParamterListByDevice(device_id);
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -25,7 +25,10 @@ namespace DOAN.Model.huate_group.recipe.Dto
|
||||
|
||||
public string Partnumber { get; set; }
|
||||
|
||||
public string Paramter { get; set; }
|
||||
|
||||
|
||||
public int? FkParamterId { get; set; }
|
||||
public string ParamterName { get; set; }
|
||||
|
||||
}
|
||||
|
||||
@ -58,8 +61,8 @@ namespace DOAN.Model.huate_group.recipe.Dto
|
||||
public string Vehiclemodel { get; set; }
|
||||
|
||||
public string Partnumber { get; set; }
|
||||
|
||||
public string Paramter { get; set; }
|
||||
public int? FkParamterId { get; set; }
|
||||
public string ParamterName { get; set; }
|
||||
|
||||
public bool Isfilter { get; set; }
|
||||
|
||||
|
||||
@ -72,15 +72,27 @@ namespace DOAN.Model.huate_group.recipe
|
||||
/// </summary>
|
||||
public string Vehiclemodel { get; set; }
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 零件号
|
||||
/// </summary>
|
||||
public string Partnumber { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 参数id
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "fk_paramter_id")]
|
||||
public int? FkParamterId { get; set; }
|
||||
/// <summary>
|
||||
/// 参数
|
||||
/// </summary>
|
||||
public string Paramter { get; set; }
|
||||
|
||||
[SugarColumn(ColumnName = "paramter_name")]
|
||||
public string ParamterName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否过滤
|
||||
|
||||
@ -32,5 +32,7 @@ namespace DOAN.Service.huate_group.Recipe.IService
|
||||
|
||||
List<BaseVehiclemodel> GetVehicelModel(string partString);
|
||||
List<BasePartnumber> GetPartNumber(string partString);
|
||||
|
||||
List<BaseParameterConfig> GetParamterListByDevice(int device_id);
|
||||
}
|
||||
}
|
||||
|
||||
@ -123,7 +123,7 @@ namespace DOAN.Service.huate_group.Recipe
|
||||
.AndIF(parm.FkDeviceId > 0, it => it.FkDeviceId == parm.FkDeviceId)
|
||||
.AndIF(parm != null && !string.IsNullOrEmpty(parm.Vehiclemodel), it => it.Vehiclemodel.Contains(parm.Vehiclemodel))
|
||||
.AndIF(parm != null && !string.IsNullOrEmpty(parm.Partnumber), it => it.Partnumber.Contains(parm.Partnumber))
|
||||
.AndIF(parm != null && !string.IsNullOrEmpty(parm.Paramter), it => it.Paramter.Contains(parm.Paramter))
|
||||
.AndIF(parm != null && !string.IsNullOrEmpty(parm.ParamterName), it => it.ParamterName.Contains(parm.ParamterName))
|
||||
;
|
||||
|
||||
return predicate;
|
||||
@ -222,5 +222,10 @@ namespace DOAN.Service.huate_group.Recipe
|
||||
{
|
||||
return Context.Queryable<BasePartnumber>().WhereIF(!string.IsNullOrEmpty(partString), it => it.PartnumberName.Contains(partString)).ToList();
|
||||
}
|
||||
|
||||
public List<BaseParameterConfig> GetParamterListByDevice(int device_id)
|
||||
{
|
||||
return Context.Queryable<BaseParameterConfig>().Where(it => it.FkDevice == device_id).ToList();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -91,7 +91,7 @@ namespace ZR.Tasks.TaskScheduler
|
||||
foreach (T item in device01s)
|
||||
{
|
||||
//1.1 判断设备配置情况
|
||||
Recipee options = query.Where(it => it.DeviceName == item.Workstation && it.Paramter == item.Paramter).First();
|
||||
Recipee options = query.Where(it => it.DeviceName == item.Workstation && it.ParamterName == item.Paramter).First();
|
||||
|
||||
if (options != null)
|
||||
{ //不可上传
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user