This commit is contained in:
parent
1eadacf760
commit
81988597f3
|
@ -21,4 +21,27 @@
|
||||||
</Content>
|
</Content>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Remove="Packages\Common~\**" />
|
||||||
|
<Compile Remove="Packages\Editor\**" />
|
||||||
|
<Compile Remove="Packages\Runtime\**" />
|
||||||
|
<Compile Remove="Packages\Core\Cache\**" />
|
||||||
|
<Compile Remove="Packages\Tests\**" />
|
||||||
|
<Compile Remove="Packages\Runtime~\Unity\**" />
|
||||||
|
<Compile Remove="Packages\Runtime~\UnityPluginsSupport\**" />
|
||||||
|
<Compile Remove="Src\Unity\**" />
|
||||||
|
<Compile Remove="Src\UnityPluginsSupport\**" />
|
||||||
|
<Compile Remove="Src\UnityEditor\**" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<!-- 排除Unity文件 -->
|
||||||
|
<None Remove="**\*.meta"/>
|
||||||
|
<None Remove="**\*.asmdef"/>
|
||||||
|
<None Remove="Src\Unity\**" />
|
||||||
|
<None Remove="Src\UnityPluginsSupport\**" />
|
||||||
|
<None Remove="Src\UnityEditor\**" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
@ -2,63 +2,64 @@
|
||||||
using IDIS.Model;
|
using IDIS.Model;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
namespace IDIS.YL106.Model;
|
namespace IDIS.YL106.Model
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 数据-订单
|
|
||||||
/// </summary>
|
|
||||||
public record Data_Oder : IDIS_Model
|
|
||||||
{
|
{
|
||||||
public override string[] Tags { get; set; } = new string[] { "order" };
|
/// <summary>
|
||||||
|
/// 数据-订单
|
||||||
|
/// </summary>
|
||||||
|
public record Data_Oder : IDIS_Model
|
||||||
|
{
|
||||||
|
public override string[] Tags { get; set; } = new string[] { "order" };
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 订单编号
|
/// 订单编号
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DisplayName("订单编号")]
|
[DisplayName("订单编号")]
|
||||||
[JsonProperty("order_number")]
|
[JsonProperty("order_number")]
|
||||||
public string OderNumber { get; set; } = string.Empty;
|
public string OderNumber { get; set; } = string.Empty;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 产品编码
|
/// 产品编码
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DisplayName("产品编码")]
|
[DisplayName("产品编码")]
|
||||||
[JsonProperty("product_code")]
|
[JsonProperty("product_code")]
|
||||||
public string ProductCode { get; set; } = string.Empty;
|
public string ProductCode { get; set; } = string.Empty;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 产品名称
|
/// 产品名称
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DisplayName("产品名称")]
|
[DisplayName("产品名称")]
|
||||||
[JsonProperty("product_name")]
|
[JsonProperty("product_name")]
|
||||||
public string ProductName { get; set; } = string.Empty;
|
public string ProductName { get; set; } = string.Empty;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 订单状态
|
/// 订单状态
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DisplayName("订单状态")]
|
[DisplayName("订单状态")]
|
||||||
public string OrderState { get; set; } = string.Empty;
|
public string OrderState { get; set; } = string.Empty;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 下单时间
|
/// 下单时间
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DisplayName("下单时间")]
|
[DisplayName("下单时间")]
|
||||||
public DateTime CreateTime { get; set; } = DateTime.MinValue;
|
public DateTime CreateTime { get; set; } = DateTime.MinValue;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 更新时间
|
/// 更新时间
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DisplayName("更新时间")]
|
[DisplayName("更新时间")]
|
||||||
public DateTime UpdateTime { get; set; } = DateTime.MinValue;
|
public DateTime UpdateTime { get; set; } = DateTime.MinValue;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 完成时间
|
/// 完成时间
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DisplayName("完成时间")]
|
[DisplayName("完成时间")]
|
||||||
public DateTime FinishTime { get; set; } = DateTime.MinValue;
|
public DateTime FinishTime { get; set; } = DateTime.MinValue;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 产品标识
|
/// 产品标识
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DisplayName("产品标识")]
|
[DisplayName("产品标识")]
|
||||||
public string ProductHandle { get; set; } = string.Empty;
|
public string ProductHandle { get; set; } = string.Empty;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 原材料标识
|
/// 原材料标识
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DisplayName("原材料标识")]
|
[DisplayName("原材料标识")]
|
||||||
public string Materials { get; set; } = string.Empty;
|
public string Materials { get; set; } = string.Empty;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,66 +2,67 @@
|
||||||
using IDIS.Model;
|
using IDIS.Model;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
namespace IDIS.YL106.Model;
|
namespace IDIS.YL106.Model
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 实体,用于描述例如机器人、传送带等设备的信息
|
|
||||||
/// </summary>
|
|
||||||
public record Object_Equipment : IDIS_Model
|
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 编号
|
/// 实体,用于描述例如机器人、传送带等设备的信息
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DisplayName("编号")]
|
public record Object_Equipment : IDIS_Model
|
||||||
[JsonProperty("number")]
|
{
|
||||||
public string Number { get; set; } = string.Empty;
|
/// <summary>
|
||||||
|
/// 编号
|
||||||
|
/// </summary>
|
||||||
|
[DisplayName("编号")]
|
||||||
|
[JsonProperty("number")]
|
||||||
|
public string Number { get; set; } = string.Empty;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 名称
|
/// 名称
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DisplayName("名称")]
|
[DisplayName("名称")]
|
||||||
[JsonProperty("name")]
|
[JsonProperty("name")]
|
||||||
public string Name { get; set; } = string.Empty;
|
public string Name { get; set; } = string.Empty;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 型号
|
/// 型号
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DisplayName("型号")]
|
[DisplayName("型号")]
|
||||||
[JsonProperty("model")]
|
[JsonProperty("model")]
|
||||||
public string Model { get; set; } = string.Empty;
|
public string Model { get; set; } = string.Empty;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 类型
|
/// 类型
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DisplayName("类型")]
|
[DisplayName("类型")]
|
||||||
[JsonProperty("type")]
|
[JsonProperty("type")]
|
||||||
public string Type { get; set; } = string.Empty;
|
public string Type { get; set; } = string.Empty;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 描述,用于介绍该设备的用途
|
/// 描述,用于介绍该设备的用途
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DisplayName("描述")]
|
[DisplayName("描述")]
|
||||||
[JsonProperty("description")]
|
[JsonProperty("description")]
|
||||||
public string Description { get; set; } = string.Empty;
|
public string Description { get; set; } = string.Empty;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 设备来源
|
/// 设备来源
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DisplayName("来源")]
|
[DisplayName("来源")]
|
||||||
[JsonProperty("source")]
|
[JsonProperty("source")]
|
||||||
public string Trace { get; set; } = string.Empty;
|
public string Trace { get; set; } = string.Empty;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 生产厂家
|
/// 生产厂家
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DisplayName("生产厂家")]
|
[DisplayName("生产厂家")]
|
||||||
[JsonProperty("manufacturer")]
|
[JsonProperty("manufacturer")]
|
||||||
public string Manufacturer { get; set; } = string.Empty;
|
public string Manufacturer { get; set; } = string.Empty;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 生产日期
|
/// 生产日期
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DisplayName("生产日期")]
|
[DisplayName("生产日期")]
|
||||||
[JsonProperty("manufacture_date")]
|
[JsonProperty("manufacture_date")]
|
||||||
public DateTime ManufactureDate { get; set; } =DateTime.MinValue;
|
public DateTime ManufactureDate { get; set; } =DateTime.MinValue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,31 +2,32 @@
|
||||||
using IDIS.Model;
|
using IDIS.Model;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
namespace IDIS.YL106.Model;
|
namespace IDIS.YL106.Model
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 实体,用于描述物料的信息
|
|
||||||
/// </summary>
|
|
||||||
public record Object_Material: IDIS_Model
|
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 物料名称
|
/// 实体,用于描述物料的信息
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DisplayName("物料名称")]
|
public record Object_Material: IDIS_Model
|
||||||
[JsonProperty("material_name")]
|
{
|
||||||
public string MaterialName { get; set; } = string.Empty;
|
/// <summary>
|
||||||
|
/// 物料名称
|
||||||
|
/// </summary>
|
||||||
|
[DisplayName("物料名称")]
|
||||||
|
[JsonProperty("material_name")]
|
||||||
|
public string MaterialName { get; set; } = string.Empty;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 物料类型
|
/// 物料类型
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DisplayName("物料类型")]
|
[DisplayName("物料类型")]
|
||||||
[JsonProperty("material_type")]
|
[JsonProperty("material_type")]
|
||||||
public string MaterialType { get; set; } = string.Empty;
|
public string MaterialType { get; set; } = string.Empty;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 生产日期
|
/// 生产日期
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DisplayName("生产日期")]
|
[DisplayName("生产日期")]
|
||||||
[JsonProperty("manufacture_date")]
|
[JsonProperty("manufacture_date")]
|
||||||
public string ManufactureDate { get; set; } = string.Empty;
|
public string ManufactureDate { get; set; } = string.Empty;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,54 +2,55 @@
|
||||||
using IDIS.Model;
|
using IDIS.Model;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
namespace IDIS.YL106.Model;
|
namespace IDIS.YL106.Model
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 实体,用于描述产品的信息
|
|
||||||
/// </summary>
|
|
||||||
public record Object_Product:IDIS_Model
|
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 产品名称
|
/// 实体,用于描述产品的信息
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DisplayName("产品名称")]
|
public record Object_Product:IDIS_Model
|
||||||
[JsonProperty("product_name")]
|
{
|
||||||
public string ProductName { get; set; } = string.Empty;
|
/// <summary>
|
||||||
|
/// 产品名称
|
||||||
|
/// </summary>
|
||||||
|
[DisplayName("产品名称")]
|
||||||
|
[JsonProperty("product_name")]
|
||||||
|
public string ProductName { get; set; } = string.Empty;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 产品类型
|
/// 产品类型
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DisplayName("产品类型")]
|
[DisplayName("产品类型")]
|
||||||
[JsonProperty("product_type")]
|
[JsonProperty("product_type")]
|
||||||
public string ProductType { get; set; }= string.Empty;
|
public string ProductType { get; set; }= string.Empty;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 订单标识
|
/// 订单标识
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DisplayName("订单标识")]
|
[DisplayName("订单标识")]
|
||||||
[JsonProperty("order_handle")]
|
[JsonProperty("order_handle")]
|
||||||
public string OrderHandle { get; set; }= string.Empty;
|
public string OrderHandle { get; set; }= string.Empty;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 生产日期
|
/// 生产日期
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DisplayName("生产日期")]
|
[DisplayName("生产日期")]
|
||||||
[JsonProperty("manufacture_date")]
|
[JsonProperty("manufacture_date")]
|
||||||
public DateTime ManufactureDate { get; set; } = DateTime.MinValue;
|
public DateTime ManufactureDate { get; set; } = DateTime.MinValue;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 批次号
|
/// 批次号
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DisplayName("批次号")]
|
[DisplayName("批次号")]
|
||||||
[JsonProperty("batch_number")]
|
[JsonProperty("batch_number")]
|
||||||
public string BatchNumber { get; set; }= string.Empty;
|
public string BatchNumber { get; set; }= string.Empty;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 注意事项 (默认值: "请勿将移动电源放入水中")
|
/// 注意事项 (默认值: "请勿将移动电源放入水中")
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DisplayName("注意事项")]
|
[DisplayName("注意事项")]
|
||||||
[JsonProperty("note")]
|
[JsonProperty("note")]
|
||||||
public string Note { get; set; } = "请不要在用力弯曲或者误食笔芯";
|
public string Note { get; set; } = "请不要在用力弯曲或者误食笔芯";
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,17 +1,18 @@
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
|
|
||||||
namespace IDIS.YL106.Model;
|
namespace IDIS.YL106.Model
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 装配工序
|
|
||||||
/// </summary>
|
|
||||||
public record Procedure_Assembly:Procedure_Base
|
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 物料名称
|
/// 装配工序
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DisplayName("物料名称")]
|
public record Procedure_Assembly:Procedure_Base
|
||||||
public string MaterialName { get; set; } = string.Empty;
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 物料名称
|
||||||
|
/// </summary>
|
||||||
|
[DisplayName("物料名称")]
|
||||||
|
public string MaterialName { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -2,54 +2,55 @@ using System.ComponentModel;
|
||||||
using IDIS.Model;
|
using IDIS.Model;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
namespace IDIS.YL106.Model;
|
namespace IDIS.YL106.Model
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 工序基类
|
|
||||||
/// </summary>
|
|
||||||
public record Procedure_Base:IDIS_Model
|
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 工序名称
|
/// 工序基类
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DisplayName("工序名称")]
|
public record Procedure_Base:IDIS_Model
|
||||||
[JsonProperty("name")]
|
{
|
||||||
public string Name { get; set; } = string.Empty;
|
/// <summary>
|
||||||
/// <summary>
|
/// 工序名称
|
||||||
/// 业务任务编码
|
/// </summary>
|
||||||
/// </summary>
|
[DisplayName("工序名称")]
|
||||||
[DisplayName("业务任务编码")]
|
[JsonProperty("name")]
|
||||||
[JsonProperty("assignment_code")]
|
public string Name { get; set; } = string.Empty;
|
||||||
public string AssignmentCode { get; set; } = string.Empty;
|
/// <summary>
|
||||||
/// <summary>
|
/// 业务任务编码
|
||||||
/// 主要物体,例如设备、物料等
|
/// </summary>
|
||||||
/// </summary>
|
[DisplayName("业务任务编码")]
|
||||||
[DisplayName("主要物体")]
|
[JsonProperty("assignment_code")]
|
||||||
[JsonProperty("main_object")]
|
public string AssignmentCode { get; set; } = string.Empty;
|
||||||
public string MainObject { get; set; } = string.Empty;
|
/// <summary>
|
||||||
/// <summary>
|
/// 主要物体,例如设备、物料等
|
||||||
/// 创建时间
|
/// </summary>
|
||||||
/// </summary>
|
[DisplayName("主要物体")]
|
||||||
[DisplayName("创建时间")]
|
[JsonProperty("main_object")]
|
||||||
[JsonProperty("create_time")]
|
public string MainObject { get; set; } = string.Empty;
|
||||||
public DateTime CreateTime { get; set; } = DateTime.Now;
|
/// <summary>
|
||||||
/// <summary>
|
/// 创建时间
|
||||||
/// 完成时间(未完成时为DateTime.Min)
|
/// </summary>
|
||||||
/// </summary>
|
[DisplayName("创建时间")]
|
||||||
[DisplayName("完成时间")]
|
[JsonProperty("create_time")]
|
||||||
[JsonProperty("complete_time")]
|
public DateTime CreateTime { get; set; } = DateTime.Now;
|
||||||
public DateTime CompleteTime { get; set; } = DateTime.Now;
|
/// <summary>
|
||||||
/// <summary>
|
/// 完成时间(未完成时为DateTime.Min)
|
||||||
/// 最后更新时间
|
/// </summary>
|
||||||
/// </summary>
|
[DisplayName("完成时间")]
|
||||||
[DisplayName("最后更新时间")]
|
[JsonProperty("complete_time")]
|
||||||
[JsonProperty("last_updateTime")]
|
public DateTime CompleteTime { get; set; } = DateTime.Now;
|
||||||
public DateTime LastUpdateTime { get; set; } = DateTime.Now;
|
/// <summary>
|
||||||
|
/// 最后更新时间
|
||||||
|
/// </summary>
|
||||||
|
[DisplayName("最后更新时间")]
|
||||||
|
[JsonProperty("last_updateTime")]
|
||||||
|
public DateTime LastUpdateTime { get; set; } = DateTime.Now;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 订单标识
|
/// 订单标识
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DisplayName("订单标识")]
|
[DisplayName("订单标识")]
|
||||||
[JsonProperty("order_handle")]
|
[JsonProperty("order_handle")]
|
||||||
public string OderHandle { get; set; } = string.Empty;
|
public string OderHandle { get; set; } = string.Empty;
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -2,31 +2,32 @@ using System.ComponentModel;
|
||||||
using IDIS.Model;
|
using IDIS.Model;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
namespace IDIS.YL106.Model;
|
namespace IDIS.YL106.Model
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 出库工序
|
|
||||||
/// </summary>
|
|
||||||
public record Procedure_Transport:Procedure_Base
|
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 指定容器
|
/// 出库工序
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DisplayName("指定容器")]
|
public record Procedure_Transport:Procedure_Base
|
||||||
[JsonProperty("container_handle")]
|
{
|
||||||
public string ContainerHandle { get; set; } = string.Empty;
|
/// <summary>
|
||||||
|
/// 指定容器
|
||||||
|
/// </summary>
|
||||||
|
[DisplayName("指定容器")]
|
||||||
|
[JsonProperty("container_handle")]
|
||||||
|
public string ContainerHandle { get; set; } = string.Empty;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 原位置
|
/// 原位置
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DisplayName("原位置")]
|
[DisplayName("原位置")]
|
||||||
[JsonProperty("original_destination")]
|
[JsonProperty("original_destination")]
|
||||||
public string OriginalDestination { get; set; } = string.Empty;
|
public string OriginalDestination { get; set; } = string.Empty;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 目标位置
|
/// 目标位置
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DisplayName("目标位置")]
|
[DisplayName("目标位置")]
|
||||||
[JsonProperty("target_destination")]
|
[JsonProperty("target_destination")]
|
||||||
public string TargetDestination { get; set; } = string.Empty;
|
public string TargetDestination { get; set; } = string.Empty;
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -2,46 +2,47 @@ using IDIS.Model;
|
||||||
using IDIS.Models;
|
using IDIS.Models;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
namespace IDIS.YL106.Model;
|
namespace IDIS.YL106.Model
|
||||||
|
|
||||||
public class Program
|
|
||||||
{
|
{
|
||||||
public static void Main()
|
public class Program
|
||||||
{
|
{
|
||||||
var list = new List<IDIS_Model>
|
public static void Main()
|
||||||
{
|
{
|
||||||
new Data_Oder(),
|
var list = new List<IDIS_Model>
|
||||||
new Object_Equipment(),
|
|
||||||
new Object_Material(),
|
|
||||||
new Object_Product(),
|
|
||||||
new Procedure_Assembly(),
|
|
||||||
new Procedure_Transport()
|
|
||||||
};
|
|
||||||
|
|
||||||
var currentDirectory = Environment.CurrentDirectory;
|
|
||||||
#if DEBUG
|
|
||||||
currentDirectory = new DirectoryInfo(currentDirectory).Parent!.Parent!.Parent?.FullName!;
|
|
||||||
#endif
|
|
||||||
currentDirectory = Path.Combine(currentDirectory, "Samples");
|
|
||||||
|
|
||||||
Console.WriteLine("生成的样本将保存于: " + currentDirectory);
|
|
||||||
|
|
||||||
new DirectoryInfo(currentDirectory).Create();
|
|
||||||
foreach (var x in list)
|
|
||||||
{
|
|
||||||
var templatePath = Path.Combine(currentDirectory, $"{x.GetType().Name}_Template.json");
|
|
||||||
var registerPath = Path.Combine(currentDirectory, $"{x.GetType().Name}_Register.json");
|
|
||||||
var registerData = new IDIS_Register_Data
|
|
||||||
{
|
{
|
||||||
Handle = $"88.123.99/{DateTime.Now.Ticks}",
|
new Data_Oder(),
|
||||||
TemplateVersion = "Template-1.0.0",
|
new Object_Equipment(),
|
||||||
Value = x.AsValueInfo()
|
new Object_Material(),
|
||||||
|
new Object_Product(),
|
||||||
|
new Procedure_Assembly(),
|
||||||
|
new Procedure_Transport()
|
||||||
};
|
};
|
||||||
File.WriteAllText(templatePath,JsonConvert.SerializeObject(x.AsTemplate(),Formatting.Indented));
|
|
||||||
File.WriteAllText(registerPath,JsonConvert.SerializeObject(registerData,Formatting.Indented));
|
|
||||||
|
|
||||||
Console.WriteLine();
|
var currentDirectory = Environment.CurrentDirectory;
|
||||||
Console.WriteLine($"生成了{x.GetType().Name}的样本,模板保存于\n{templatePath},注册数据保存于\n{registerPath}");
|
#if DEBUG
|
||||||
|
currentDirectory = new DirectoryInfo(currentDirectory).Parent!.Parent!.Parent?.FullName!;
|
||||||
|
#endif
|
||||||
|
currentDirectory = Path.Combine(currentDirectory, "Samples");
|
||||||
|
|
||||||
|
Console.WriteLine("生成的样本将保存于: " + currentDirectory);
|
||||||
|
|
||||||
|
new DirectoryInfo(currentDirectory).Create();
|
||||||
|
foreach (var x in list)
|
||||||
|
{
|
||||||
|
var templatePath = Path.Combine(currentDirectory, $"{x.GetType().Name}_Template.json");
|
||||||
|
var registerPath = Path.Combine(currentDirectory, $"{x.GetType().Name}_Register.json");
|
||||||
|
var registerData = new IDIS_Register_Data
|
||||||
|
{
|
||||||
|
Handle = $"88.123.99/{DateTime.Now.Ticks}",
|
||||||
|
TemplateVersion = "Template-1.0.0",
|
||||||
|
Value = x.AsValueInfo()
|
||||||
|
};
|
||||||
|
File.WriteAllText(templatePath,JsonConvert.SerializeObject(x.AsTemplate(),Formatting.Indented));
|
||||||
|
File.WriteAllText(registerPath,JsonConvert.SerializeObject(registerData,Formatting.Indented));
|
||||||
|
|
||||||
|
Console.WriteLine();
|
||||||
|
Console.WriteLine($"生成了{x.GetType().Name}的样本,模板保存于\n{templatePath},注册数据保存于\n{registerPath}");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue