This commit is contained in:
qianjiawei
2023-07-21 15:16:22 +08:00
parent 7bb60e3018
commit 9b779d5407
8 changed files with 171 additions and 34 deletions

View File

@@ -13,6 +13,7 @@ namespace Tnb.QcMgr.Entities
public string? addid { get; set; }
public string? triggertype { get; set; }
public string? content { get; set; }
public int? number { get; set; }
public List<CheckPlanTypeInput>? checktypes { get; set; }
}
public class CheckPlanTypeInput
@@ -38,10 +39,11 @@ namespace Tnb.QcMgr.Entities
{
public string? id { get; set; }
public bool hasadd { get; set; }
public bool hasitem{ get; set; }
public bool hasitem { get; set; }
public string? addid { get; set; }
public string? triggertype { get; set; }
public string? content { get; set; }
public int? number { get; set; }
public List<CheckPlanTypeOut>? checktypes { get; set; }
}
public class CheckPlanTypeOut

View File

@@ -37,5 +37,18 @@ namespace Tnb.QcMgr.Entities.Dto
/// 触发条件
/// </summary>
public EnumTriggerEvent? triggerevent { get; set; }
/// <summary>
/// 原先生产数量
/// </summary>
public int? oldpronum { get; set; }
/// <summary>
/// 新生产数量
/// </summary>
public int? newpronum { get; set; }
/// <summary>
/// 生产次数
/// </summary>
public int? pronum { get; set; }
}
}

View File

@@ -34,5 +34,10 @@ namespace Tnb.QcMgr.Entities
/// 主表编号
/// </summary>
public string? mainid { get; set; }
/// <summary>
/// 频次/数量
/// </summary>
public int? number { get; set; }
}
}

View File

@@ -1,6 +1,8 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
@@ -14,18 +16,48 @@ namespace Tnb.QcMgr.Entities.Enums
}
public enum EnumTriggerEvent
{
[Remark("首件检", "换模具")]
= 1,
[Remark("首件检", "换物料批号")]
= 2,
[Remark("首件检", "换物料编号")]
= 3,
[Remark("首件检", "新的生产任务")]
= 4,
[Remark("首件检", "生产任务暂停")]
= 5,
[Remark("出厂检", "按入厂频次")]
= 6,
[Remark("入厂检", "按物料频次")]
= 7,
[Remark("入厂检", "按物料编号")]
= 8,
[Remark("生产检", "定量")]
= 9,
[Remark("生产检", "定码")]
= 10,
[Remark("生产检", "产出频次")]
= 11,
[Remark("生产检", "固定次数")]
= 12,
[Remark("生产检", "按流转卡")]
= 13
}
public class RemarkAttribute : Attribute
{
public string CheckType { get; set; }
public string CheckContent { get; set; }
public RemarkAttribute(string checkType, string checkContent)
{
this.CheckType = checkType;
this.CheckContent = checkContent;
}
public static RemarkAttribute GetRemark(EnumTriggerEvent? enumTriggerEvent)
{
FieldInfo fi = enumTriggerEvent!.GetType().GetField(enumTriggerEvent.ToString()!)!;
object[] attributes = fi.GetCustomAttributes(typeof(RemarkAttribute), false);
return ((RemarkAttribute)attributes[0]);
}
}
}