1
This commit is contained in:
parent
156b6806ec
commit
7b625b3048
@ -196,6 +196,9 @@ namespace MDM.Controllers.Process
|
||||
return ToResponse(response);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
//TODO 工艺参数数采删除
|
||||
[HttpDelete("operation_delete_datacollection/{operation_datacollection_id}")]
|
||||
public IActionResult OperationDeleteDatacollection(int operation_datacollection_id)
|
||||
@ -204,10 +207,50 @@ namespace MDM.Controllers.Process
|
||||
return ToResponse(response);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查询物料防错规则字典
|
||||
/// </summary>
|
||||
/// <param name="parm"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("search_material_errorproof_dict")]
|
||||
public IActionResult SearchMaterialErrorproofDict(string error_proof_rule_code)
|
||||
{
|
||||
var response = _ProcessOperationService.SearchMaterialErrorproofDict(error_proof_rule_code);
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 搜素物料档案信息
|
||||
/// </summary>
|
||||
/// <param name="material_info">物料编码或者物料名称</param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("search_material_info")]
|
||||
public IActionResult SearchMaterialInfo(string material_info)
|
||||
{
|
||||
var response = _ProcessOperationService.SearchMaterialInfo(material_info);
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
|
||||
|
||||
//TODO 新增物料信息
|
||||
[HttpPost("operation_add_material_paramter")]
|
||||
public IActionResult OperationAddMaterialParamter([FromBody] ProcessOperationFlowMaterialParamterDto parm)
|
||||
{
|
||||
var response = _ProcessOperationService.OperationAddMaterialParamter(parm);
|
||||
return ToResponse(response);
|
||||
|
||||
}
|
||||
|
||||
//TODO 物料信息删除
|
||||
[HttpDelete("operation_delete_material_paramter/{operation_material_paramter_id}")]
|
||||
public IActionResult OperationDeleteMaterialParamter(int operation_material_paramter_id)
|
||||
{
|
||||
var response = _ProcessOperationService.OperationDeleteMaterialParamter(operation_material_paramter_id);
|
||||
return ToResponse(response);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@ -96,13 +96,13 @@ namespace MDM.Model.Process.Dto
|
||||
/// 是否为控制参数:1=是(如PID控制),0=否(仅采集)
|
||||
/// </summary>
|
||||
|
||||
public string IsControlled { get; set; }
|
||||
public int IsControlled { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否为监控参数(是否采集/显示):1=是,0=否
|
||||
/// </summary>
|
||||
|
||||
public string IsMonitored { get; set; }
|
||||
public int IsMonitored { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 控制类型(如PID、ON/OFF、手动设定等,可选)
|
||||
@ -119,7 +119,7 @@ namespace MDM.Model.Process.Dto
|
||||
/// <summary>
|
||||
/// 是否必填/必采:1=是,0=否
|
||||
/// </summary>
|
||||
public string IsRequired { get; set; }
|
||||
public int IsRequired { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 参数排序(用于UI展示顺序)
|
||||
|
||||
@ -83,13 +83,13 @@ namespace MDM.Model.Process
|
||||
/// 是否为控制参数:1=是(如PID控制),0=否(仅采集)
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "is_controlled")]
|
||||
public string IsControlled { get; set; }
|
||||
public int IsControlled { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否为监控参数(是否采集/显示):1=是,0=否
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "is_monitored")]
|
||||
public string IsMonitored { get; set; }
|
||||
public int IsMonitored { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 控制类型(如PID、ON/OFF、手动设定等,可选)
|
||||
@ -107,7 +107,7 @@ namespace MDM.Model.Process
|
||||
/// 是否必填/必采:1=是,0=否
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "is_required")]
|
||||
public string IsRequired { get; set; }
|
||||
public int IsRequired { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 参数排序(用于UI展示顺序)
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
|
||||
using Aliyun.OSS;
|
||||
using MDM.Model;
|
||||
using MDM.Model.Material;
|
||||
using MDM.Model.Process;
|
||||
using MDM.Model.Process.Dto;
|
||||
using MDM.Models.Process;
|
||||
@ -42,5 +43,12 @@ namespace MDM.Services.IProcessService
|
||||
List<ProcessOperationFlow> GetOperationFlowList(string routing_code, string operation_code);
|
||||
int OperationAddDatacollection(ProcessOperationCollectParameterDto parm);
|
||||
int OperationDeleteDatacollection(int operation_datacollection_id);
|
||||
List<MaterialList> SearchMaterialInfo(string material_info);
|
||||
List<ProcessErrorProofRule> SearchMaterialErrorproofDict(string error_proof_rule_code);
|
||||
int OperationAddMaterialParamter(ProcessOperationFlowMaterialParamterDto parm);
|
||||
|
||||
int OperationDeleteMaterialParamter(int operation_material_paramter_id);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -6,6 +6,7 @@ using Infrastructure.Attribute;
|
||||
using Mapster;
|
||||
using MDM.Controllers.Process;
|
||||
using MDM.Model;
|
||||
using MDM.Model.Material;
|
||||
using MDM.Model.Process;
|
||||
using MDM.Model.Process.Dto;
|
||||
using MDM.Models.Process;
|
||||
@ -253,5 +254,33 @@ namespace MDM.Services.Process
|
||||
|
||||
}
|
||||
|
||||
|
||||
public List<MaterialList> SearchMaterialInfo(string material_info)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public List<ProcessErrorProofRule> SearchMaterialErrorproofDict(string error_proof_rule_code)
|
||||
{
|
||||
|
||||
var response = Context.Queryable<ProcessErrorProofRule>()
|
||||
.WhereIF(!string.IsNullOrEmpty(error_proof_rule_code), m => m.ErrorProofRuleCode.Contains(error_proof_rule_code))
|
||||
.ToList();
|
||||
return response;
|
||||
}
|
||||
|
||||
public int OperationAddMaterialParamter(ProcessOperationFlowMaterialParamterDto parm)
|
||||
{
|
||||
var model = parm.Adapt<ProcessOperationFlowMaterialParamterDto, ProcessOperationFlowMaterialParamter>();
|
||||
model.CreatedTime = DateTime.Now;
|
||||
var response = Context.Insertable<ProcessOperationFlowMaterialParamter>(model).ExecuteCommand();
|
||||
return response;
|
||||
}
|
||||
public int OperationDeleteMaterialParamter(int operation_material_paramter_id)
|
||||
{
|
||||
var response = Context.Deleteable<ProcessOperationFlowMaterialParamter>(m => m.id == operation_material_paramter_id).ExecuteCommand();
|
||||
return response;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user