Merge branch 'dev' of https://git.tuotong-tech.com/tnb/tnb.server into dev
This commit is contained in:
@@ -5,26 +5,26 @@ namespace Tnb.BasicData.Entities.Dto
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public class EbomListOutput
|
public class EbomListOutput
|
||||||
{
|
{
|
||||||
public string id { get; set; }
|
public string? id { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 物料编码-物料名称
|
/// 物料编码-物料名称
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string material_id { get; set; }
|
public string? material_id { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 物料id
|
/// 物料id
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string material_id_id { get; set; }
|
public string? material_id_id { get; set; }
|
||||||
public string status { get; set; }
|
public string? status { get; set; }
|
||||||
public string descrip { get; set; }
|
public string? descrip { get; set; }
|
||||||
public string unit_id { get; set; }
|
public string? unit_id { get; set; }
|
||||||
public string version { get; set; }
|
public string? version { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 工艺路线名称
|
/// 工艺路线名称
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string route_id { get; set; }
|
public string? route_id { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 工艺路线id
|
/// 工艺路线id
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string route_id_id { get; set; }
|
public string? route_id_id { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -5,15 +5,15 @@ namespace Tnb.BasicData.Entities.Dto
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 物料名称
|
/// 物料名称
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string material_id { get; set; }
|
public string? material_id { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 规格描述
|
/// 规格描述
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string material_id_descrip { get; set; }
|
public string? material_id_descrip { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 物料id
|
/// 物料id
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string material_id_id { get; set; }
|
public string? material_id_id { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 最小包装
|
/// 最小包装
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -21,11 +21,11 @@ namespace Tnb.BasicData.Entities.Dto
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 备注
|
/// 备注
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string material_id_remark { get; set; }
|
public string? material_id_remark { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 单位
|
/// 单位
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string material_id_unit_id { get; set; }
|
public string? material_id_unit_id { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 是否有下级
|
/// 是否有下级
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -36,49 +36,49 @@ namespace Tnb.BasicData.Entities.Dto
|
|||||||
/// Default:NULL::character varying
|
/// Default:NULL::character varying
|
||||||
/// Nullable:True
|
/// Nullable:True
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string feeding_control {get;set;}
|
public string? feeding_control {get;set;}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Desc:损耗率
|
/// Desc:损耗率
|
||||||
/// Default:NULL::character varying
|
/// Default:NULL::character varying
|
||||||
/// Nullable:True
|
/// Nullable:True
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string loss_rate {get;set;}
|
public string? loss_rate {get;set;}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Desc:数量
|
/// Desc:数量
|
||||||
/// Default:NULL::character varying
|
/// Default:NULL::character varying
|
||||||
/// Nullable:True
|
/// Nullable:True
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string quantity {get;set;}
|
public string? quantity {get;set;}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Desc:需要称量
|
/// Desc:需要称量
|
||||||
/// Default:NULL::character varying
|
/// Default:NULL::character varying
|
||||||
/// Nullable:True
|
/// Nullable:True
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string require_weight {get;set;}
|
public string? require_weight {get;set;}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Desc:替代物料
|
/// Desc:替代物料
|
||||||
/// Default:NULL::character varying
|
/// Default:NULL::character varying
|
||||||
/// Nullable:True
|
/// Nullable:True
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string substitute_material_id {get;set;}
|
public string? substitute_material_id {get;set;}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Desc:工艺路线
|
/// Desc:工艺路线
|
||||||
/// Default:NULL::character varying
|
/// Default:NULL::character varying
|
||||||
/// Nullable:True
|
/// Nullable:True
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string route_name {get;set;}
|
public string? route_name {get;set;}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Desc:版本号
|
/// Desc:版本号
|
||||||
/// Default:NULL::character varying
|
/// Default:NULL::character varying
|
||||||
/// Nullable:True
|
/// Nullable:True
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string version {get;set;}
|
public string? version {get;set;}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -5,11 +5,11 @@ namespace Tnb.BasicData.Entities.Dto
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 物料清单id
|
/// 物料清单id
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string ebomId { get; set; }
|
public string? ebomId { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 物料id
|
/// 物料id
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string materialId { get; set; }
|
public string? materialId { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -8,31 +8,31 @@ namespace Tnb.BasicData.Entities.Dto
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 物料id
|
/// 物料id
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string id { get; set; }
|
public string? id { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 编码
|
/// 编码
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string code { get; set; }
|
public string? code { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 名称
|
/// 名称
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string name { get; set; }
|
public string? name { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 描述
|
/// 描述
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string descrip { get; set; }
|
public string? descrip { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 主单位id
|
/// 主单位id
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string unit_id { get; set; }
|
public string? unit_id { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 主单位名称
|
/// 主单位名称
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string unit_name { get; set; }
|
public string? unit_name { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -5,12 +5,12 @@ namespace Tnb.BasicData.Entities.Dto
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 物料清单id
|
/// 物料清单id
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string ebom_id { get; set; }
|
public string? ebom_id { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 物料编码名称查询
|
/// 物料编码名称查询
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string material_info { get; set; }
|
public string material_info { get; set; } = string.Empty;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 当前页码:pageIndex.
|
/// 当前页码:pageIndex.
|
||||||
|
|||||||
@@ -7,12 +7,12 @@ namespace Tnb.BasicData.Entities.Dto
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 生产bomid
|
/// 生产bomid
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string id { get; set; }
|
public string? id { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 物料id
|
/// 物料id
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string material_id { get; set; }
|
public string? material_id { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 数量
|
/// 数量
|
||||||
@@ -22,12 +22,12 @@ namespace Tnb.BasicData.Entities.Dto
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 单位id
|
/// 单位id
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string unit_id { get; set; }
|
public string? unit_id { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 版本号
|
/// 版本号
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string version { get; set; }
|
public string? version { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 有效开始时间
|
/// 有效开始时间
|
||||||
@@ -42,12 +42,12 @@ namespace Tnb.BasicData.Entities.Dto
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 物料清单id
|
/// 物料清单id
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string ebom_id { get; set; }
|
public string? ebom_id { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 工艺路线id
|
/// 工艺路线id
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string route_id { get; set; }
|
public string? route_id { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 物料均再首道工序投产
|
/// 物料均再首道工序投产
|
||||||
@@ -57,12 +57,12 @@ namespace Tnb.BasicData.Entities.Dto
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 备注
|
/// 备注
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string remark { get; set; }
|
public string? remark { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 工序
|
/// 工序
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public List<MbomProcessOutDto> processes { get; set; }
|
public List<MbomProcessOutDto>? processes { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class MbomProcessOutDto
|
public class MbomProcessOutDto
|
||||||
@@ -72,14 +72,14 @@ namespace Tnb.BasicData.Entities.Dto
|
|||||||
/// Default:
|
/// Default:
|
||||||
/// Nullable:False
|
/// Nullable:False
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string mbom_id { get; set; }
|
public string? mbom_id { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Desc:工序id
|
/// Desc:工序id
|
||||||
/// Default:
|
/// Default:
|
||||||
/// Nullable:False
|
/// Nullable:False
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string process_id { get; set; }
|
public string? process_id { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Desc:准备时间
|
/// Desc:准备时间
|
||||||
@@ -93,7 +93,7 @@ namespace Tnb.BasicData.Entities.Dto
|
|||||||
/// Default:NULL::character varying
|
/// Default:NULL::character varying
|
||||||
/// Nullable:True
|
/// Nullable:True
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string station { get; set; }
|
public string? station { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Desc:副产出管控 0 不启用 1 启用
|
/// Desc:副产出管控 0 不启用 1 启用
|
||||||
@@ -107,16 +107,16 @@ namespace Tnb.BasicData.Entities.Dto
|
|||||||
/// Default:NULL::character varying
|
/// Default:NULL::character varying
|
||||||
/// Nullable:True
|
/// Nullable:True
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string production_method {get;set;}
|
public string? production_method {get;set;}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 投入物料
|
/// 投入物料
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public List<BasMbomInput> inputs { get; set; }
|
public List<BasMbomInput>? inputs { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 产出物料
|
/// 产出物料
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public List<BasMbomOutput> outputs { get; set; }
|
public List<BasMbomOutput>? outputs { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2,17 +2,17 @@ namespace Tnb.BasicData.Entities.Dto
|
|||||||
{
|
{
|
||||||
public class MbomListOutput
|
public class MbomListOutput
|
||||||
{
|
{
|
||||||
public string id { get; set; }
|
public string? id { get; set; }
|
||||||
public string ebom_id { get; set; }
|
public string? ebom_id { get; set; }
|
||||||
public string num { get; set; }
|
public string? num { get; set; }
|
||||||
public string unit_id { get; set; }
|
public string? unit_id { get; set; }
|
||||||
public string version { get; set; }
|
public string? version { get; set; }
|
||||||
public string start_time { get; set; }
|
public string start_time { get; set; } = string.Empty;
|
||||||
public string end_time { get; set; }
|
public string end_time { get; set; } = string.Empty;
|
||||||
public string material_id { get; set; }
|
public string? material_id { get; set; }
|
||||||
public string material_id_id { get; set; }
|
public string? material_id_id { get; set; }
|
||||||
public string route_id { get; set; }
|
public string? route_id { get; set; }
|
||||||
public string route_id_id { get; set; }
|
public string? route_id_id { get; set; }
|
||||||
public string is_first { get; set; }
|
public string? is_first { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -7,12 +7,12 @@ namespace Tnb.BasicData.Entities.Dto
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 生产bomid
|
/// 生产bomid
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string id { get; set; }
|
public string id { get; set; } = string.Empty;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 物料id
|
/// 物料id
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string material_id { get; set; }
|
public string material_id { get; set; } = string.Empty;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 数量
|
/// 数量
|
||||||
@@ -22,12 +22,12 @@ namespace Tnb.BasicData.Entities.Dto
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 单位id
|
/// 单位id
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string unit_id { get; set; }
|
public string unit_id { get; set; } = string.Empty;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 版本号
|
/// 版本号
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string version { get; set; }
|
public string version { get; set; } = string.Empty;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 有效开始时间
|
/// 有效开始时间
|
||||||
@@ -42,12 +42,12 @@ namespace Tnb.BasicData.Entities.Dto
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 物料清单id
|
/// 物料清单id
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string ebom_id { get; set; }
|
public string ebom_id { get; set; } = string.Empty;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 工艺路线id
|
/// 工艺路线id
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string route_id { get; set; }
|
public string route_id { get; set; } = string.Empty;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 物料均再首道工序投产
|
/// 物料均再首道工序投产
|
||||||
@@ -57,12 +57,12 @@ namespace Tnb.BasicData.Entities.Dto
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 备注
|
/// 备注
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string remark { get; set; }
|
public string remark { get; set; } = string.Empty;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 工序
|
/// 工序
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public List<MbomProcessDto> processes { get; set; }
|
public List<MbomProcessDto>? processes { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class MbomProcessDto
|
public class MbomProcessDto
|
||||||
@@ -72,14 +72,14 @@ namespace Tnb.BasicData.Entities.Dto
|
|||||||
/// Default:
|
/// Default:
|
||||||
/// Nullable:False
|
/// Nullable:False
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string mbom_id { get; set; }
|
public string? mbom_id { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Desc:工序id
|
/// Desc:工序id
|
||||||
/// Default:
|
/// Default:
|
||||||
/// Nullable:False
|
/// Nullable:False
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string process_id { get; set; }
|
public string? process_id { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Desc:准备时间
|
/// Desc:准备时间
|
||||||
@@ -93,7 +93,7 @@ namespace Tnb.BasicData.Entities.Dto
|
|||||||
/// Default:NULL::character varying
|
/// Default:NULL::character varying
|
||||||
/// Nullable:True
|
/// Nullable:True
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string station { get; set; }
|
public string? station { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Desc:副产出管控 0 不启用 1 启用
|
/// Desc:副产出管控 0 不启用 1 启用
|
||||||
@@ -107,16 +107,16 @@ namespace Tnb.BasicData.Entities.Dto
|
|||||||
/// Default:NULL::character varying
|
/// Default:NULL::character varying
|
||||||
/// Nullable:True
|
/// Nullable:True
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string production_method {get;set;}
|
public string? production_method {get;set;}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 投入物料
|
/// 投入物料
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public List<BasMbomInput> inputs { get; set; }
|
public List<BasMbomInput>? inputs { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 产出物料
|
/// 产出物料
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public List<BasMbomOutput> outputs { get; set; }
|
public List<BasMbomOutput>? outputs { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -5,11 +5,11 @@ namespace Tnb.BasicData.Entities.Dto
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 工序id
|
/// 工序id
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string process_id { get; set; }
|
public string? process_id { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 工位id集合
|
/// 工位id集合
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public List<string> stationIds { get; set; }
|
public List<string>? stationIds { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2,14 +2,14 @@ namespace Tnb.BasicData.Entities.Dto
|
|||||||
{
|
{
|
||||||
public class VaildRouteOutput
|
public class VaildRouteOutput
|
||||||
{
|
{
|
||||||
public string id { get; set; }
|
public string? id { get; set; }
|
||||||
|
|
||||||
public string code { get; set; }
|
public string? code { get; set; }
|
||||||
|
|
||||||
public string name { get; set; }
|
public string? name { get; set; }
|
||||||
|
|
||||||
|
public string start_time { get; set; } = string.Empty;
|
||||||
|
|
||||||
public string start_time { get; set; }
|
public string end_time { get; set; } = string.Empty;
|
||||||
|
|
||||||
public string end_time { get; set; }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2,8 +2,8 @@ namespace Tnb.BasicData.Entitys
|
|||||||
{
|
{
|
||||||
public class ElementSelectDto
|
public class ElementSelectDto
|
||||||
{
|
{
|
||||||
public string label { get; set; }
|
public string?label { get; set; }
|
||||||
|
|
||||||
public string value { get; set; }
|
public string? value { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -22,7 +22,7 @@ public partial class BasEbomD : BaseEntity<string>
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 物料编号/名称
|
/// 物料编号/名称
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string? material_id { get; set; }
|
public string material_id { get; set; } = string.Empty;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 描述
|
/// 描述
|
||||||
|
|||||||
@@ -48,8 +48,8 @@ namespace Tnb.BasicData
|
|||||||
public async Task<dynamic> GetList(VisualDevModelListQueryInput input)
|
public async Task<dynamic> GetList(VisualDevModelListQueryInput input)
|
||||||
{
|
{
|
||||||
var db = _repository.AsSugarClient();
|
var db = _repository.AsSugarClient();
|
||||||
Dictionary<string, object> queryJson = string.IsNullOrEmpty(input.queryJson) ? null : input.queryJson.ToObject<Dictionary<string, object>>();
|
Dictionary<string, object>? queryJson = (input==null || string.IsNullOrEmpty(input.queryJson)) ? null : input.queryJson.ToObject<Dictionary<string, object>>();
|
||||||
string materialInfo = queryJson?["query_info"]?.ToString();
|
string materialInfo = queryJson?["query_info"]?.ToString() ?? "";
|
||||||
var list = await db.Queryable<BasEbomH, BasMaterial, BasRouteH>((a, b, c) => new object[]
|
var list = await db.Queryable<BasEbomH, BasMaterial, BasRouteH>((a, b, c) => new object[]
|
||||||
{
|
{
|
||||||
JoinType.Left, a.material_id == b.id,
|
JoinType.Left, a.material_id == b.id,
|
||||||
@@ -67,7 +67,7 @@ namespace Tnb.BasicData
|
|||||||
route_id = c.name,
|
route_id = c.name,
|
||||||
route_id_id = c.id,
|
route_id_id = c.id,
|
||||||
|
|
||||||
}).ToPagedListAsync(input.currentPage, input.pageSize);
|
}).ToPagedListAsync((input?.currentPage ?? 1), (input?.pageSize ?? 50));
|
||||||
|
|
||||||
return PageResult<EbomListOutput>.SqlSugarPageResult(list);
|
return PageResult<EbomListOutput>.SqlSugarPageResult(list);
|
||||||
}
|
}
|
||||||
@@ -75,7 +75,6 @@ namespace Tnb.BasicData
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取物料清单树.
|
/// 获取物料清单树.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="input">获取物料清单树.</param>
|
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<dynamic> GetTree(EbomTreeQueryInput queryInput)
|
public async Task<dynamic> GetTree(EbomTreeQueryInput queryInput)
|
||||||
@@ -115,7 +114,7 @@ namespace Tnb.BasicData
|
|||||||
hasChildren = SqlFunc.Subqueryable<BasEbomH>().Where(x=>x.material_id==a.material_id).Any(),
|
hasChildren = SqlFunc.Subqueryable<BasEbomH>().Where(x=>x.material_id==a.material_id).Any(),
|
||||||
}).Mapper(it =>
|
}).Mapper(it =>
|
||||||
{
|
{
|
||||||
it.material_id_unit_id = dic[it.material_id_unit_id].ToString();
|
it.material_id_unit_id = !string.IsNullOrEmpty(it.material_id_unit_id) ? dic[it.material_id_unit_id].ToString() : "";
|
||||||
}).ToListAsync();
|
}).ToListAsync();
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
@@ -145,7 +144,7 @@ namespace Tnb.BasicData
|
|||||||
hasChildren = SqlFunc.Subqueryable<BasEbomH>().Where(x=>x.material_id==a.material_id).Any(),
|
hasChildren = SqlFunc.Subqueryable<BasEbomH>().Where(x=>x.material_id==a.material_id).Any(),
|
||||||
}).Mapper(it =>
|
}).Mapper(it =>
|
||||||
{
|
{
|
||||||
it.material_id_unit_id = dic[it.material_id_unit_id].ToString();
|
it.material_id_unit_id = !string.IsNullOrEmpty(it.material_id_unit_id) ? dic[it.material_id_unit_id].ToString() : "";
|
||||||
}).ToListAsync();
|
}).ToListAsync();
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
@@ -182,9 +181,9 @@ namespace Tnb.BasicData
|
|||||||
}).FirstAsync();
|
}).FirstAsync();
|
||||||
return new Dictionary<string,string>()
|
return new Dictionary<string,string>()
|
||||||
{
|
{
|
||||||
["version"] = ebom?.version,
|
["version"] = ebom?.version ?? "",
|
||||||
["routeName"] = ebom?.name,
|
["routeName"] = ebom?.name ?? "",
|
||||||
["routeId"] = ebom?.id
|
["routeId"] = ebom?.id ?? ""
|
||||||
,
|
,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -88,7 +88,8 @@ namespace Tnb.BasicData
|
|||||||
{
|
{
|
||||||
List<string> ids = await GetAllChildrenMaterialId(queryInput.ebom_id,0);
|
List<string> ids = await GetAllChildrenMaterialId(queryInput.ebom_id,0);
|
||||||
BasEbomH ebom = await db.Queryable<BasEbomH>().Where(x => x.id == queryInput.ebom_id).SingleAsync();
|
BasEbomH ebom = await db.Queryable<BasEbomH>().Where(x => x.id == queryInput.ebom_id).SingleAsync();
|
||||||
ids.Add(ebom.material_id);
|
if(ebom!=null && !string.IsNullOrEmpty(ebom.material_id))
|
||||||
|
ids.Add(ebom.material_id);
|
||||||
var result = await db.Queryable<BasMaterial>()
|
var result = await db.Queryable<BasMaterial>()
|
||||||
.LeftJoin<DictionaryTypeEntity>((a, b) => b.EnCode == DictConst.MeasurementUnit && b.DeleteMark == null)
|
.LeftJoin<DictionaryTypeEntity>((a, b) => b.EnCode == DictConst.MeasurementUnit && b.DeleteMark == null)
|
||||||
.LeftJoin<DictionaryDataEntity>((a, b, c) => c.DictionaryTypeId == b.Id && a.unit_id == c.EnCode)
|
.LeftJoin<DictionaryDataEntity>((a, b, c) => c.DictionaryTypeId == b.Id && a.unit_id == c.EnCode)
|
||||||
@@ -144,7 +145,7 @@ namespace Tnb.BasicData
|
|||||||
{
|
{
|
||||||
//获取最新创建的物料清单
|
//获取最新创建的物料清单
|
||||||
var ebom = await _repository.AsSugarClient().Queryable<BasEbomH>().Where(x=>x.material_id==id).OrderByDescending(x=>x.create_time).FirstAsync();
|
var ebom = await _repository.AsSugarClient().Queryable<BasEbomH>().Where(x=>x.material_id==id).OrderByDescending(x=>x.create_time).FirstAsync();
|
||||||
ids.AddRange(await GetAllChildrenMaterialId(ebom?.id,index));
|
ids.AddRange(await GetAllChildrenMaterialId(ebom?.id ?? "",index));
|
||||||
}
|
}
|
||||||
ids.AddRange(list);
|
ids.AddRange(list);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -57,8 +57,8 @@ namespace Tnb.BasicData
|
|||||||
public async Task<dynamic> GetList(VisualDevModelListQueryInput input)
|
public async Task<dynamic> GetList(VisualDevModelListQueryInput input)
|
||||||
{
|
{
|
||||||
var db = _repository.AsSugarClient();
|
var db = _repository.AsSugarClient();
|
||||||
Dictionary<string, object> queryJson = string.IsNullOrEmpty(input.queryJson) ? null : input.queryJson.ToObject<Dictionary<string, object>>();
|
Dictionary<string, object>? queryJson = string.IsNullOrEmpty(input.queryJson) ? null : input.queryJson.ToObject<Dictionary<string, object>>();
|
||||||
string materialInfo = queryJson?["query_info"]?.ToString();
|
string materialInfo = queryJson?["query_info"]?.ToString() ?? "";
|
||||||
var list = await db.Queryable<BasMbom, BasMaterial, BasEbomH, BasRouteH>((a, b, c, d) => new object[]
|
var list = await db.Queryable<BasMbom, BasMaterial, BasEbomH, BasRouteH>((a, b, c, d) => new object[]
|
||||||
{
|
{
|
||||||
JoinType.Left, a.material_id == b.id,
|
JoinType.Left, a.material_id == b.id,
|
||||||
@@ -75,8 +75,8 @@ namespace Tnb.BasicData
|
|||||||
ebom_id = c.version,
|
ebom_id = c.version,
|
||||||
route_id = d.name,
|
route_id = d.name,
|
||||||
route_id_id = c.id,
|
route_id_id = c.id,
|
||||||
start_time = a.start_time.Value.ToString("yyyy-MM-dd"),
|
start_time = a.start_time==null ? "" : a.start_time.Value.ToString("yyyy-MM-dd"),
|
||||||
end_time = a.start_time.Value.ToString("yyyy-MM-dd"),
|
end_time = a.end_time==null ? "" : a.end_time.Value.ToString("yyyy-MM-dd"),
|
||||||
is_first = SqlFunc.IIF(a.is_first == 0, "否", "是"),
|
is_first = SqlFunc.IIF(a.is_first == 0, "否", "是"),
|
||||||
}).ToPagedListAsync(input.currentPage, input.pageSize);
|
}).ToPagedListAsync(input.currentPage, input.pageSize);
|
||||||
|
|
||||||
@@ -278,55 +278,58 @@ namespace Tnb.BasicData
|
|||||||
List<BasMbomInput> inputs = new List<BasMbomInput>();
|
List<BasMbomInput> inputs = new List<BasMbomInput>();
|
||||||
List<BasMbomOutput> outputs = new List<BasMbomOutput>();
|
List<BasMbomOutput> outputs = new List<BasMbomOutput>();
|
||||||
|
|
||||||
foreach (var process in mbomSaveDataInput.processes)
|
if (mbomSaveDataInput != null && mbomSaveDataInput.processes != null)
|
||||||
{
|
{
|
||||||
string mbomProcessId = SnowflakeIdHelper.NextId();
|
foreach (var process in mbomSaveDataInput.processes)
|
||||||
processes.Add(new BasMbomProcess()
|
|
||||||
{
|
{
|
||||||
id = mbomProcessId,
|
string mbomProcessId = SnowflakeIdHelper.NextId();
|
||||||
org_id = orgId,
|
processes.Add(new BasMbomProcess()
|
||||||
mbom_id = mbomId,
|
|
||||||
process_id = process.process_id,
|
|
||||||
preparation_time = process.preparation_time,
|
|
||||||
station = process.station,
|
|
||||||
byproduct_status = process.byproduct_status,
|
|
||||||
production_method = process.production_method,
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
if (process.inputs != null)
|
|
||||||
{
|
|
||||||
foreach (var input in process.inputs)
|
|
||||||
{
|
{
|
||||||
string inputId = SnowflakeIdHelper.NextId();
|
id = mbomProcessId,
|
||||||
inputs.Add(new BasMbomInput()
|
org_id = orgId,
|
||||||
|
mbom_id = mbomId,
|
||||||
|
process_id = process?.process_id ?? "",
|
||||||
|
preparation_time = process?.preparation_time ?? 0,
|
||||||
|
station = process?.station ?? "",
|
||||||
|
byproduct_status = process.byproduct_status,
|
||||||
|
production_method = process.production_method,
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
if (process.inputs != null)
|
||||||
|
{
|
||||||
|
foreach (var input in process.inputs)
|
||||||
{
|
{
|
||||||
id = inputId,
|
string inputId = SnowflakeIdHelper.NextId();
|
||||||
mbom_id = mbomId,
|
inputs.Add(new BasMbomInput()
|
||||||
mbom_process_id = mbomProcessId,
|
{
|
||||||
process_id = process.process_id,
|
id = inputId,
|
||||||
material_id = input.material_id,
|
mbom_id = mbomId,
|
||||||
num = input.num,
|
mbom_process_id = mbomProcessId,
|
||||||
org_id = orgId,
|
process_id = process?.process_id ?? "",
|
||||||
});
|
material_id = input.material_id,
|
||||||
|
num = input.num,
|
||||||
|
org_id = orgId,
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (process.outputs != null)
|
if (process.outputs != null)
|
||||||
{
|
|
||||||
foreach (var output in process.outputs)
|
|
||||||
{
|
{
|
||||||
string outputId = SnowflakeIdHelper.NextId();
|
foreach (var output in process.outputs)
|
||||||
outputs.Add(new BasMbomOutput()
|
|
||||||
{
|
{
|
||||||
id = outputId,
|
string outputId = SnowflakeIdHelper.NextId();
|
||||||
mbom_id = mbomId,
|
outputs.Add(new BasMbomOutput()
|
||||||
mbom_process_id = mbomProcessId,
|
{
|
||||||
process_id = process.process_id,
|
id = outputId,
|
||||||
material_id = output.material_id,
|
mbom_id = mbomId,
|
||||||
num = output.num,
|
mbom_process_id = mbomProcessId,
|
||||||
org_id = orgId,
|
process_id = process?.process_id ?? "",
|
||||||
});
|
material_id = output.material_id,
|
||||||
|
num = output.num,
|
||||||
|
org_id = orgId,
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -356,84 +359,93 @@ namespace Tnb.BasicData
|
|||||||
}
|
}
|
||||||
|
|
||||||
string orgId = _userManager.GetUserInfo().Result.organizeId;
|
string orgId = _userManager.GetUserInfo().Result.organizeId;
|
||||||
await _repository.UpdateAsync(x => new BasMbom()
|
if (mbomSaveDataInput != null)
|
||||||
{
|
{
|
||||||
// org_id = orgId,
|
await _repository.UpdateAsync(x => new BasMbom()
|
||||||
material_id = mbomSaveDataInput.material_id,
|
{
|
||||||
num = mbomSaveDataInput.num,
|
// org_id = orgId,
|
||||||
unit_id = mbomSaveDataInput.unit_id,
|
material_id = mbomSaveDataInput.material_id,
|
||||||
version = mbomSaveDataInput.version,
|
num = mbomSaveDataInput.num,
|
||||||
start_time = mbomSaveDataInput.start_time,
|
unit_id = mbomSaveDataInput.unit_id,
|
||||||
end_time = mbomSaveDataInput.end_time,
|
version = mbomSaveDataInput.version,
|
||||||
ebom_id = mbomSaveDataInput.ebom_id,
|
start_time = mbomSaveDataInput.start_time,
|
||||||
route_id = mbomSaveDataInput.route_id,
|
end_time = mbomSaveDataInput.end_time,
|
||||||
is_first = mbomSaveDataInput.is_first,
|
ebom_id = mbomSaveDataInput.ebom_id,
|
||||||
remark = mbomSaveDataInput.remark,
|
route_id = mbomSaveDataInput.route_id,
|
||||||
modify_id = _userManager.UserId,
|
is_first = mbomSaveDataInput.is_first,
|
||||||
modify_time = DateTime.Now,
|
remark = mbomSaveDataInput.remark,
|
||||||
|
modify_id = _userManager.UserId,
|
||||||
|
modify_time = DateTime.Now,
|
||||||
|
|
||||||
}, x => x.id == mbomSaveDataInput.id);
|
}, x => x.id == mbomSaveDataInput.id);
|
||||||
|
}
|
||||||
List<BasMbomProcess> processes = new List<BasMbomProcess>();
|
List<BasMbomProcess> processes = new List<BasMbomProcess>();
|
||||||
List<BasMbomInput> inputs = new List<BasMbomInput>();
|
List<BasMbomInput> inputs = new List<BasMbomInput>();
|
||||||
List<BasMbomOutput> outputs = new List<BasMbomOutput>();
|
List<BasMbomOutput> outputs = new List<BasMbomOutput>();
|
||||||
|
|
||||||
foreach (var process in mbomSaveDataInput.processes)
|
if (mbomSaveDataInput != null && mbomSaveDataInput.processes != null)
|
||||||
{
|
{
|
||||||
string mbomProcessId = SnowflakeIdHelper.NextId();
|
foreach (var process in mbomSaveDataInput.processes)
|
||||||
processes.Add(new BasMbomProcess()
|
|
||||||
{
|
{
|
||||||
id = mbomProcessId,
|
string mbomProcessId = SnowflakeIdHelper.NextId();
|
||||||
org_id = orgId,
|
processes.Add(new BasMbomProcess()
|
||||||
mbom_id = mbomSaveDataInput.id,
|
|
||||||
process_id = process.process_id,
|
|
||||||
preparation_time = process.preparation_time,
|
|
||||||
station = process.station,
|
|
||||||
byproduct_status = process.byproduct_status,
|
|
||||||
production_method = process.production_method,
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
if (process.inputs != null)
|
|
||||||
{
|
|
||||||
foreach (var input in process.inputs)
|
|
||||||
{
|
{
|
||||||
string inputId = SnowflakeIdHelper.NextId();
|
id = mbomProcessId,
|
||||||
inputs.Add(new BasMbomInput()
|
org_id = orgId ?? "",
|
||||||
{
|
mbom_id = mbomSaveDataInput?.id ?? "",
|
||||||
id = inputId,
|
process_id = process?.process_id ?? "",
|
||||||
mbom_id = mbomSaveDataInput.id,
|
preparation_time = process?.preparation_time ?? 0,
|
||||||
mbom_process_id = mbomProcessId,
|
station = process.station,
|
||||||
process_id = process.process_id,
|
byproduct_status = process.byproduct_status,
|
||||||
material_id = input.material_id,
|
production_method = process.production_method,
|
||||||
num = input.num,
|
|
||||||
org_id = orgId,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (process.outputs != null)
|
});
|
||||||
{
|
|
||||||
foreach (var output in process.outputs)
|
if (process.inputs != null)
|
||||||
{
|
{
|
||||||
string outputId = SnowflakeIdHelper.NextId();
|
foreach (var input in process.inputs)
|
||||||
outputs.Add(new BasMbomOutput()
|
|
||||||
{
|
{
|
||||||
id = outputId,
|
string inputId = SnowflakeIdHelper.NextId();
|
||||||
mbom_id = mbomSaveDataInput.id,
|
inputs.Add(new BasMbomInput()
|
||||||
mbom_process_id = mbomProcessId,
|
{
|
||||||
process_id = process.process_id,
|
id = inputId,
|
||||||
material_id = output.material_id,
|
mbom_id = mbomSaveDataInput?.id ?? "",
|
||||||
num = output.num,
|
mbom_process_id = mbomProcessId,
|
||||||
org_id = orgId,
|
process_id = process?.process_id ?? "",
|
||||||
});
|
material_id = input.material_id,
|
||||||
|
num = input.num,
|
||||||
|
org_id = orgId,
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
if (process.outputs != null)
|
||||||
|
{
|
||||||
|
foreach (var output in process.outputs)
|
||||||
|
{
|
||||||
|
string outputId = SnowflakeIdHelper.NextId();
|
||||||
|
outputs.Add(new BasMbomOutput()
|
||||||
|
{
|
||||||
|
id = outputId,
|
||||||
|
mbom_id = mbomSaveDataInput?.id ?? "",
|
||||||
|
mbom_process_id = mbomProcessId,
|
||||||
|
process_id = process?.process_id ?? "",
|
||||||
|
material_id = output.material_id,
|
||||||
|
num = output.num,
|
||||||
|
org_id = orgId,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
await _repository.AsSugarClient().Deleteable<BasMbomProcess>().Where(x => x.mbom_id == mbomSaveDataInput.id).ExecuteCommandAsync();
|
if (mbomSaveDataInput != null && !string.IsNullOrEmpty(mbomSaveDataInput.id))
|
||||||
await _repository.AsSugarClient().Deleteable<BasMbomInput>().Where(x => x.mbom_id == mbomSaveDataInput.id).ExecuteCommandAsync();
|
{
|
||||||
await _repository.AsSugarClient().Deleteable<BasMbomOutput>().Where(x => x.mbom_id == mbomSaveDataInput.id).ExecuteCommandAsync();
|
await _repository.AsSugarClient().Deleteable<BasMbomProcess>().Where(x => x.mbom_id == mbomSaveDataInput.id).ExecuteCommandAsync();
|
||||||
|
await _repository.AsSugarClient().Deleteable<BasMbomInput>().Where(x => x.mbom_id == mbomSaveDataInput.id).ExecuteCommandAsync();
|
||||||
|
await _repository.AsSugarClient().Deleteable<BasMbomOutput>().Where(x => x.mbom_id == mbomSaveDataInput.id).ExecuteCommandAsync();
|
||||||
|
}
|
||||||
if (processes.Count > 0)
|
if (processes.Count > 0)
|
||||||
{
|
{
|
||||||
await _repository.AsSugarClient().Insertable<BasMbomProcess>(processes).ExecuteCommandAsync();
|
await _repository.AsSugarClient().Insertable<BasMbomProcess>(processes).ExecuteCommandAsync();
|
||||||
|
|||||||
@@ -108,8 +108,6 @@ namespace Tnb.BasicData
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 保存工序工位关联表
|
/// 保存工序工位关联表
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="processStationInput">process_id 工序id</param>
|
|
||||||
/// <param name="processStationInput">stationIds 工位id集合</param>
|
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<dynamic> Create(VisualDevModelDataCrInput visualDevModelDataCrInput)
|
public async Task<dynamic> Create(VisualDevModelDataCrInput visualDevModelDataCrInput)
|
||||||
{
|
{
|
||||||
@@ -118,7 +116,7 @@ namespace Tnb.BasicData
|
|||||||
VisualDevEntity? templateEntity = await _visualDevService.GetInfoById(ModelId, true);
|
VisualDevEntity? templateEntity = await _visualDevService.GetInfoById(ModelId, true);
|
||||||
await _runService.Create(templateEntity, visualDevModelDataCrInput);
|
await _runService.Create(templateEntity, visualDevModelDataCrInput);
|
||||||
|
|
||||||
string processId = visualDevModelDataCrInput.data["ReturnIdentity"].ToString();
|
string processId = visualDevModelDataCrInput.data["ReturnIdentity"].ToString() ?? "";
|
||||||
|
|
||||||
List<BasProcessStation> list = new List<BasProcessStation>();
|
List<BasProcessStation> list = new List<BasProcessStation>();
|
||||||
foreach (var item in (JArray)visualDevModelDataCrInput.data["station"])
|
foreach (var item in (JArray)visualDevModelDataCrInput.data["station"])
|
||||||
|
|||||||
@@ -83,7 +83,6 @@ namespace Tnb.BasicData
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取有效的已发布的工艺路线
|
/// 获取有效的已发布的工艺路线
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="parameters"></param>
|
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<dynamic> GetValidRouteList([FromBody]VisualDevDataFieldDataListInput pageInput)
|
public async Task<dynamic> GetValidRouteList([FromBody]VisualDevDataFieldDataListInput pageInput)
|
||||||
{
|
{
|
||||||
@@ -99,8 +98,8 @@ namespace Tnb.BasicData
|
|||||||
id = x.id,
|
id = x.id,
|
||||||
code = x.code,
|
code = x.code,
|
||||||
name = x.name,
|
name = x.name,
|
||||||
start_time = x.start_time.Value.ToString("yyyy-MM-dd"),
|
start_time = x.start_time==null ? "" : x.start_time.Value.ToString("yyyy-MM-dd"),
|
||||||
end_time = x.end_time.Value.ToString("yyyy-MM-dd"),
|
end_time = x.end_time==null ? "" : x.end_time.Value.ToString("yyyy-MM-dd"),
|
||||||
}).ToPagedListAsync(pageInput.currentPage, pageInput.pageSize);
|
}).ToPagedListAsync(pageInput.currentPage, pageInput.pageSize);
|
||||||
return PageResult<VaildRouteOutput>.SqlSugarPageResult(result);
|
return PageResult<VaildRouteOutput>.SqlSugarPageResult(result);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,15 +2,15 @@ namespace Tnb.EquipMgr.Entities.Dto
|
|||||||
{
|
{
|
||||||
public class EquipDaqQueryOutput
|
public class EquipDaqQueryOutput
|
||||||
{
|
{
|
||||||
public string id { get; set; }
|
public string? id { get; set; }
|
||||||
public string data_source { get; set; }
|
public string? data_source { get; set; }
|
||||||
public string create_id { get; set; }
|
public string create_id { get; set; }
|
||||||
public string create_time { get; set; }
|
public string? create_time { get; set; }
|
||||||
public string data_type { get; set; }
|
public string? data_type { get; set; }
|
||||||
public string enabled { get; set; }
|
public string? enabled { get; set; }
|
||||||
public string equip_id { get; set; }
|
public string? equip_id { get; set; }
|
||||||
public string label_name { get; set; }
|
public string? label_name { get; set; }
|
||||||
public string label_point { get; set; }
|
public string? label_point { get; set; }
|
||||||
public string remark { get; set; }
|
public string? remark { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2,13 +2,13 @@ namespace Tnb.EquipMgr.Entities.Dto
|
|||||||
{
|
{
|
||||||
public class EquipFileQueryOutput
|
public class EquipFileQueryOutput
|
||||||
{
|
{
|
||||||
public string id { get; set; }
|
public string? id { get; set; }
|
||||||
public string attachment { get; set; }
|
public string? attachment { get; set; }
|
||||||
public string create_id { get; set; }
|
public string? create_id { get; set; }
|
||||||
public string create_id_id { get; set; }
|
public string? create_id_id { get; set; }
|
||||||
public string create_time { get; set; }
|
public string? create_time { get; set; }
|
||||||
public string equip_id { get; set; }
|
public string? equip_id { get; set; }
|
||||||
public string equip_id_id { get; set; }
|
public string? equip_id_id { get; set; }
|
||||||
public string file_name { get; set; }
|
public string? file_name { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2,20 +2,20 @@ namespace Tnb.EquipMgr.Entities.Dto
|
|||||||
{
|
{
|
||||||
public class EquipMaintainRecordQueryOutput
|
public class EquipMaintainRecordQueryOutput
|
||||||
{
|
{
|
||||||
public string id { get; set; }
|
public string? id { get; set; }
|
||||||
public string attachment { get; set; }
|
public string? attachment { get; set; }
|
||||||
public string create_time { get; set; }
|
public string? create_time { get; set; }
|
||||||
public string equip_id { get; set; }
|
public string? equip_id { get; set; }
|
||||||
public string equip_id_id { get; set; }
|
public string? equip_id_id { get; set; }
|
||||||
public string execute_time { get; set; }
|
public string? execute_time { get; set; }
|
||||||
public string execute_user_id { get; set; }
|
public string? execute_user_id { get; set; }
|
||||||
public string repeat_remark { get; set; }
|
public string? repeat_remark { get; set; }
|
||||||
public string repeat_result { get; set; }
|
public string? repeat_result { get; set; }
|
||||||
public string repeat_time { get; set; }
|
public string? repeat_time { get; set; }
|
||||||
public string repeat_user_id { get; set; }
|
public string? repeat_user_id { get; set; }
|
||||||
public string result { get; set; }
|
public string? result { get; set; }
|
||||||
public string result_remark { get; set; }
|
public string? result_remark { get; set; }
|
||||||
public string maintain_tem_equip_id { get; set; }
|
public string? maintain_tem_equip_id { get; set; }
|
||||||
public string status { get; set; }
|
public string? status { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2,7 +2,7 @@ namespace Tnb.EquipMgr.Entities.Dto
|
|||||||
{
|
{
|
||||||
public class EquipQueryInput
|
public class EquipQueryInput
|
||||||
{
|
{
|
||||||
public string equip_id { get; set; }
|
public string equip_id { get; set; } = string.Empty;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 当前页码:pageIndex.
|
/// 当前页码:pageIndex.
|
||||||
@@ -14,6 +14,6 @@ namespace Tnb.EquipMgr.Entities.Dto
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public virtual int pageSize { get; set; } = 50;
|
public virtual int pageSize { get; set; } = 50;
|
||||||
|
|
||||||
public string queryJson { get; set; }
|
public string? queryJson { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2,15 +2,15 @@ namespace Tnb.EquipMgr.Entities.Dto
|
|||||||
{
|
{
|
||||||
public class EquipRepairRecordQueryOutput
|
public class EquipRepairRecordQueryOutput
|
||||||
{
|
{
|
||||||
public string id { get; set; }
|
public string? id { get; set; }
|
||||||
public string code { get; set; }
|
public string? code { get; set; }
|
||||||
public string name { get; set; }
|
public string? name { get; set; }
|
||||||
public string equip_id { get; set; }
|
public string? equip_id { get; set; }
|
||||||
public string apply_user_id { get; set; }
|
public string? apply_user_id { get; set; }
|
||||||
public string is_ugent { get; set; }
|
public string? is_ugent { get; set; }
|
||||||
public string description { get; set; }
|
public string? description { get; set; }
|
||||||
public string complete_time { get; set; }
|
public string? complete_time { get; set; }
|
||||||
public string repairer_id { get; set; }
|
public string? repairer_id { get; set; }
|
||||||
public string repair_description { get; set; }
|
public string? repair_description { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2,8 +2,8 @@ namespace Tnb.EquipMgr.Entities.Dto
|
|||||||
{
|
{
|
||||||
public class EquipSparePartsInput
|
public class EquipSparePartsInput
|
||||||
{
|
{
|
||||||
public string equip_id { get; set; }
|
public string equip_id { get; set; } = string.Empty;
|
||||||
|
|
||||||
public List<string> spare_parts_ids { get; set; }
|
public List<string>? spare_parts_ids { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2,12 +2,12 @@ namespace Tnb.EquipMgr.Entities.Dto
|
|||||||
{
|
{
|
||||||
public class EquipSparePartsQueryOutput
|
public class EquipSparePartsQueryOutput
|
||||||
{
|
{
|
||||||
public string id { get; set; }
|
public string? id { get; set; }
|
||||||
public string type_code { get; set; }
|
public string? type_code { get; set; }
|
||||||
public string type_name { get; set; }
|
public string? type_name { get; set; }
|
||||||
public string code { get; set; }
|
public string? code { get; set; }
|
||||||
public string name { get; set; }
|
public string? name { get; set; }
|
||||||
public string specification { get; set; }
|
public string? specification { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2,19 +2,19 @@ namespace Tnb.EquipMgr.Entities.Dto
|
|||||||
{
|
{
|
||||||
public class EquipSpotInsRecordQueryOutput
|
public class EquipSpotInsRecordQueryOutput
|
||||||
{
|
{
|
||||||
public string id { get; set; }
|
public string? id { get; set; }
|
||||||
public string attachment { get; set; }
|
public string? attachment { get; set; }
|
||||||
public string create_time { get; set; }
|
public string? create_time { get; set; }
|
||||||
public string equip_id { get; set; }
|
public string? equip_id { get; set; }
|
||||||
public string repeat_remark { get; set; }
|
public string? repeat_remark { get; set; }
|
||||||
public string repeat_result { get; set; }
|
public string? repeat_result { get; set; }
|
||||||
public string repeat_time { get; set; }
|
public string? repeat_time { get; set; }
|
||||||
public string repeat_user_id { get; set; }
|
public string? repeat_user_id { get; set; }
|
||||||
public string result { get; set; }
|
public string? result { get; set; }
|
||||||
public string result_remark { get; set; }
|
public string? result_remark { get; set; }
|
||||||
public string spot_ins_tem_equip_id { get; set; }
|
public string? spot_ins_tem_equip_id { get; set; }
|
||||||
public string spot_record_date_time { get; set; }
|
public string? spot_record_date_time { get; set; }
|
||||||
public string spot_record_user_id { get; set; }
|
public string? spot_record_user_id { get; set; }
|
||||||
public string status { get; set; }
|
public string? status { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2,9 +2,9 @@ namespace Tnb.EquipMgr.Entities.Dto
|
|||||||
{
|
{
|
||||||
public class EquipTechnologyParameterQueryOutput
|
public class EquipTechnologyParameterQueryOutput
|
||||||
{
|
{
|
||||||
public string id { get; set; }
|
public string? id { get; set; }
|
||||||
public string name { get; set; }
|
public string? name { get; set; }
|
||||||
public string definition { get; set; }
|
public string? definition { get; set; }
|
||||||
public string remark { get; set; }
|
public string? remark { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2,12 +2,12 @@ namespace Tnb.EquipMgr.Entities.Dto
|
|||||||
{
|
{
|
||||||
public class MaintainRecordRepeatInput
|
public class MaintainRecordRepeatInput
|
||||||
{
|
{
|
||||||
public string id { get; set; }
|
public string id { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
public string repeat_result { get; set; } = string.Empty;
|
||||||
|
|
||||||
public string repeat_result { get; set; }
|
public string? repeat_remark { get; set; }
|
||||||
|
|
||||||
public string repeat_remark { get; set; }
|
public List<Dictionary<string,string>>? details { get; set; }
|
||||||
|
|
||||||
public List<Dictionary<string,string>> details { get; set; }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2,8 +2,8 @@ namespace Tnb.EquipMgr.Entities.Dto
|
|||||||
{
|
{
|
||||||
public class MaintainRecordRepeatOutput
|
public class MaintainRecordRepeatOutput
|
||||||
{
|
{
|
||||||
public EqpMaintainRecordH model { get; set; }
|
public EqpMaintainRecordH? model { get; set; }
|
||||||
|
|
||||||
public List<EqpMaintainRecordD> details { get; set; }
|
public List<EqpMaintainRecordD>? details { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2,7 +2,7 @@ namespace Tnb.EquipMgr.Entities.Dto
|
|||||||
{
|
{
|
||||||
public class RepairApplyDetailOutput
|
public class RepairApplyDetailOutput
|
||||||
{
|
{
|
||||||
public EqpRepairApply eqpRepairApply { get; set; }
|
public EqpRepairApply? eqpRepairApply { get; set; }
|
||||||
public EqpRepairOutApply eqpRepairOutApply { get; set; }
|
public EqpRepairOutApply? eqpRepairOutApply { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2,7 +2,7 @@ namespace Tnb.EquipMgr.Entities.Dto
|
|||||||
{
|
{
|
||||||
public class RepairApplyOutRegisterInput
|
public class RepairApplyOutRegisterInput
|
||||||
{
|
{
|
||||||
public string id { get; set; }
|
public string? id { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 实际维修供应商id
|
/// 实际维修供应商id
|
||||||
@@ -37,6 +37,6 @@ namespace Tnb.EquipMgr.Entities.Dto
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 报修申请id
|
/// 报修申请id
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string repair_apply_id { get; set; }
|
public string? repair_apply_id { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2,12 +2,12 @@ namespace Tnb.EquipMgr.Entities.Dto
|
|||||||
{
|
{
|
||||||
public class RepairApplyRegisterInput
|
public class RepairApplyRegisterInput
|
||||||
{
|
{
|
||||||
public string id { get; set; }
|
public string? id { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 故障ID
|
/// 故障ID
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string fault_id { get; set; }
|
public string? fault_id { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 是否完成
|
/// 是否完成
|
||||||
|
|||||||
@@ -2,16 +2,16 @@ namespace Tnb.EquipMgr.Entities.Dto
|
|||||||
{
|
{
|
||||||
public class RepairDelayInput
|
public class RepairDelayInput
|
||||||
{
|
{
|
||||||
public string repair_apply_id { get; set; }
|
public string? repair_apply_id { get; set; }
|
||||||
|
|
||||||
public string equip_id { get; set; }
|
public string? equip_id { get; set; }
|
||||||
|
|
||||||
public string repair_request_sender_id { get; set; }
|
public string? repair_request_sender_id { get; set; }
|
||||||
|
|
||||||
public string repair_sender_id { get; set; }
|
public string? repair_sender_id { get; set; }
|
||||||
|
|
||||||
public DateTime expected_time { get; set; }
|
public DateTime expected_time { get; set; }
|
||||||
|
|
||||||
public string delay_reason { get; set; }
|
public string? delay_reason { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2,13 +2,13 @@ namespace Tnb.EquipMgr.Entities.Dto
|
|||||||
{
|
{
|
||||||
public class RepairOutApplyInput
|
public class RepairOutApplyInput
|
||||||
{
|
{
|
||||||
public string id { get; set; }
|
public string? id { get; set; }
|
||||||
public string repair_apply_id { get; set; }
|
public string? repair_apply_id { get; set; }
|
||||||
public string equip_id { get; set; }
|
public string? equip_id { get; set; }
|
||||||
public string? supplier_id { get; set; }
|
public string? supplier_id { get; set; }
|
||||||
public decimal? estimated_cost { get; set; }
|
public decimal? estimated_cost { get; set; }
|
||||||
public string? construction_period_requirement { get; set; }
|
public string? construction_period_requirement { get; set; }
|
||||||
public string out_apply_reason { get; set; }
|
public string? out_apply_reason { get; set; }
|
||||||
public string? remark { get; set; }
|
public string? remark { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,14 +2,14 @@ namespace Tnb.EquipMgr.Entities.Dto
|
|||||||
{
|
{
|
||||||
public class SpotInsRecordExecuteInput
|
public class SpotInsRecordExecuteInput
|
||||||
{
|
{
|
||||||
public string id { get; set; }
|
public string? id { get; set; }
|
||||||
|
|
||||||
public string attachment { get; set; }
|
public string? attachment { get; set; }
|
||||||
|
|
||||||
public string result { get; set; }
|
public string? result { get; set; }
|
||||||
|
|
||||||
public string result_remark { get; set; }
|
public string? result_remark { get; set; }
|
||||||
|
|
||||||
public List<Dictionary<string,string>> details { get; set; }
|
public List<Dictionary<string,string>>? details { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2,10 +2,10 @@ namespace Tnb.EquipMgr.Entities.Dto
|
|||||||
{
|
{
|
||||||
public class SpotInsRecordRepeatInput
|
public class SpotInsRecordRepeatInput
|
||||||
{
|
{
|
||||||
public string id { get; set; }
|
public string? id { get; set; }
|
||||||
|
|
||||||
public string repeat_result { get; set; }
|
public string? repeat_result { get; set; }
|
||||||
|
|
||||||
public string repeat_remark { get; set; }
|
public string? repeat_remark { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2,8 +2,8 @@ namespace Tnb.EquipMgr.Entities.Dto
|
|||||||
{
|
{
|
||||||
public class SpotInsRecordRepeatOutput
|
public class SpotInsRecordRepeatOutput
|
||||||
{
|
{
|
||||||
public EqpSpotInsRecordH model { get; set; }
|
public EqpSpotInsRecordH? model { get; set; }
|
||||||
|
|
||||||
public List<EqpSpotInsRecordD> details { get; set; }
|
public List<EqpSpotInsRecordD>? details { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2,8 +2,8 @@ namespace Tnb.EquipMgr.Entities.Dto
|
|||||||
{
|
{
|
||||||
public class SpotInsTemPublishInput
|
public class SpotInsTemPublishInput
|
||||||
{
|
{
|
||||||
public string id { get; set; }
|
public string? id { get; set; }
|
||||||
|
|
||||||
public string[] equipIds { get; set; }
|
public string[]? equipIds { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2,17 +2,17 @@ namespace Tnb.EquipMgr.Entities.Dto
|
|||||||
{
|
{
|
||||||
public class SubEquipQueryOutput
|
public class SubEquipQueryOutput
|
||||||
{
|
{
|
||||||
public string code { get; set; }
|
public string? code { get; set; }
|
||||||
public string create_id { get; set; }
|
public string? create_id { get; set; }
|
||||||
public string create_id_id { get; set; }
|
public string? create_id_id { get; set; }
|
||||||
public string create_time { get; set; }
|
public string? create_time { get; set; }
|
||||||
public string equip_id { get; set; }
|
public string? equip_id { get; set; }
|
||||||
public string equip_id_id { get; set; }
|
public string? equip_id_id { get; set; }
|
||||||
public string id { get; set; }
|
public string? id { get; set; }
|
||||||
public string modify_id { get; set; }
|
public string? modify_id { get; set; }
|
||||||
public string modify_time { get; set; }
|
public string? modify_time { get; set; }
|
||||||
public string name { get; set; }
|
public string? name { get; set; }
|
||||||
public string org_id { get; set; }
|
public string? org_id { get; set; }
|
||||||
public string specification { get; set; }
|
public string? specification { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -27,7 +27,7 @@ public partial class EqpEquipSpareParts : BaseEntity<string>
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 创建用户
|
/// 创建用户
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string? create_id { get; set; }
|
public string create_id { get; set; } = string.Empty;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 创建时间
|
/// 创建时间
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ public partial class EqpEquipment : BaseEntity<string>
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 安装日期
|
/// 安装日期
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string? install_date { get; set; }
|
public string install_date { get; set; } = string.Empty;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 使用日期
|
/// 使用日期
|
||||||
@@ -82,7 +82,7 @@ public partial class EqpEquipment : BaseEntity<string>
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 备注
|
/// 备注
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string? remark { get; set; }
|
public string remark { get; set; } = string.Empty;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 时间戳
|
/// 时间戳
|
||||||
@@ -186,6 +186,6 @@ public partial class EqpEquipment : BaseEntity<string>
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 工位编码
|
/// 工位编码
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string station_code { get; set; }
|
public string? station_code { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ public partial class EqpMaintainItem : BaseEntity<string>
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 保养类型
|
/// 保养类型
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string maintain_type { get; set; }
|
public string? maintain_type { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 保养内容
|
/// 保养内容
|
||||||
|
|||||||
@@ -102,12 +102,12 @@ public partial class EqpMaintainTemEquipH : BaseEntity<string>
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 是否启用
|
/// 是否启用
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string is_start { get; set; }
|
public string? is_start { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 是否复核
|
/// 是否复核
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string is_repeat { get; set; }
|
public string? is_repeat { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 复核岗位id
|
/// 复核岗位id
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ public partial class EqpMaintainTemH : BaseEntity<string>
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 周期方式 1 单次 2 循环
|
/// 周期方式 1 单次 2 循环
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string plan_cycle_unit { get; set; }
|
public string? plan_cycle_unit { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 计划执行通知提前量
|
/// 计划执行通知提前量
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ public partial class EqpRepairApply : BaseEntity<string>
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 设备ID
|
/// 设备ID
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string equip_id { get; set; }
|
public string? equip_id { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 申请用户ID
|
/// 申请用户ID
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ namespace Tnb.EquipMgr.Entities
|
|||||||
/// Default:NULL::character varying
|
/// Default:NULL::character varying
|
||||||
/// Nullable:True
|
/// Nullable:True
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string delay_reason { get; set; }
|
public string? delay_reason { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Desc:创建用户
|
/// Desc:创建用户
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ public partial class EqpSpEquipCheckRecord : BaseEntity<string>
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 状态 0 待检验 1 已检验
|
/// 状态 0 待检验 1 已检验
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string status { get; set; }
|
public string? status { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 证书名称
|
/// 证书名称
|
||||||
|
|||||||
@@ -52,6 +52,6 @@ public partial class ToolMoldsMaterial : BaseEntity<string>
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 物料同组标识
|
/// 物料同组标识
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string? material_group { get; set; }
|
public string material_group { get; set; } = string.Empty;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,30 +32,30 @@ namespace Tnb.EquipMgr
|
|||||||
public async Task<dynamic> GetEquipDaqList(EquipQueryInput input)
|
public async Task<dynamic> GetEquipDaqList(EquipQueryInput input)
|
||||||
{
|
{
|
||||||
var db = _repository.AsSugarClient();
|
var db = _repository.AsSugarClient();
|
||||||
Dictionary<string, string> queryJson = new Dictionary<string, string>();
|
Dictionary<string, string>? queryJson = new Dictionary<string, string>();
|
||||||
if (!string.IsNullOrEmpty(input.queryJson))
|
if (input!=null && !string.IsNullOrEmpty(input.queryJson))
|
||||||
{
|
{
|
||||||
queryJson = JsonConvert.DeserializeObject<Dictionary<string, string>>(input.queryJson);
|
queryJson = JsonConvert.DeserializeObject<Dictionary<string, string>>(input.queryJson);
|
||||||
}
|
}
|
||||||
var result = await db.Queryable<EqpDaq>()
|
var result = await db.Queryable<EqpDaq>()
|
||||||
.LeftJoin<UserEntity>((a,b)=>a.create_id==b.Id)
|
.LeftJoin<UserEntity>((a,b)=>a.create_id==b.Id)
|
||||||
.Where(a=>a.equip_id==input.equip_id)
|
.WhereIF(input!=null,a=>a.equip_id==input.equip_id)
|
||||||
.WhereIF(queryJson.ContainsKey("data_source"),a=>a.data_source==queryJson["data_source"])
|
.WhereIF(queryJson!=null && queryJson.ContainsKey("data_source"),a=>a.data_source==queryJson["data_source"])
|
||||||
.WhereIF(queryJson.ContainsKey("label_name"),a=>a.label_name.Contains(queryJson["label_name"]))
|
.WhereIF(queryJson!=null && queryJson.ContainsKey("label_name"),a=>a.label_name.Contains(queryJson["label_name"]))
|
||||||
.WhereIF(queryJson.ContainsKey("label_point"),a=>a.label_point.Contains(queryJson["label_point"]))
|
.WhereIF(queryJson!=null && queryJson.ContainsKey("label_point"),a=>a.label_point.Contains(queryJson["label_point"]))
|
||||||
.Select((a,b) => new EquipDaqQueryOutput
|
.Select((a,b) => new EquipDaqQueryOutput
|
||||||
{
|
{
|
||||||
id = a.id,
|
id = a.id,
|
||||||
data_source = a.data_source,
|
data_source = a.data_source,
|
||||||
create_id = b.RealName,
|
create_id = b.RealName,
|
||||||
create_time = a.create_time.Value.ToString("yyyy-MM-dd HH:mm"),
|
create_time = a.create_time==null ? null : a.create_time.Value.ToString("yyyy-MM-dd HH:mm"),
|
||||||
data_type = a.data_type,
|
data_type = a.data_type,
|
||||||
enabled = a.enabled==1 ? "是" : "否",
|
enabled = a.enabled==1 ? "是" : "否",
|
||||||
equip_id = a.equip_id,
|
equip_id = a.equip_id,
|
||||||
label_name = a.label_name,
|
label_name = a.label_name,
|
||||||
label_point = a.label_point,
|
label_point = a.label_point,
|
||||||
remark = a.remark
|
remark = a.remark
|
||||||
}).ToPagedListAsync(input.currentPage, input.pageSize);
|
}).ToPagedListAsync((input?.currentPage??1), (input?.pageSize??50));
|
||||||
|
|
||||||
return PageResult<EquipDaqQueryOutput>.SqlSugarPageResult(result);
|
return PageResult<EquipDaqQueryOutput>.SqlSugarPageResult(result);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ namespace Tnb.EquipMgr
|
|||||||
public async Task<dynamic> GetEquipFileList(EquipQueryInput input)
|
public async Task<dynamic> GetEquipFileList(EquipQueryInput input)
|
||||||
{
|
{
|
||||||
var db = _repository.AsSugarClient();
|
var db = _repository.AsSugarClient();
|
||||||
Dictionary<string, string> queryJson = new Dictionary<string, string>();
|
Dictionary<string, string>? queryJson = new Dictionary<string, string>();
|
||||||
if (!string.IsNullOrEmpty(input.queryJson))
|
if (!string.IsNullOrEmpty(input.queryJson))
|
||||||
{
|
{
|
||||||
queryJson = JsonConvert.DeserializeObject<Dictionary<string, string>>(input.queryJson);
|
queryJson = JsonConvert.DeserializeObject<Dictionary<string, string>>(input.queryJson);
|
||||||
@@ -89,14 +89,14 @@ namespace Tnb.EquipMgr
|
|||||||
.LeftJoin<UserEntity >((a, b,c) => a.modify_id == c.Id)
|
.LeftJoin<UserEntity >((a, b,c) => a.modify_id == c.Id)
|
||||||
.LeftJoin<EqpEquipment >((a, b,c,d) => a.equip_id == d.id)
|
.LeftJoin<EqpEquipment >((a, b,c,d) => a.equip_id == d.id)
|
||||||
.Where((a,b,c,d)=>a.equip_id==input.equip_id)
|
.Where((a,b,c,d)=>a.equip_id==input.equip_id)
|
||||||
.WhereIF(queryJson.ContainsKey("file_name"),(a,b,c,d)=>a.file_name.Contains(queryJson["file_name"]))
|
.WhereIF(queryJson!=null && queryJson.ContainsKey("file_name"),(a,b,c,d)=>a.file_name.Contains(queryJson["file_name"]))
|
||||||
.Select((a, b, c,d) => new EquipFileQueryOutput
|
.Select((a, b, c,d) => new EquipFileQueryOutput
|
||||||
{
|
{
|
||||||
id = a.id,
|
id = a.id,
|
||||||
attachment = a.attachment,
|
attachment = a.attachment,
|
||||||
create_id = b.RealName,
|
create_id = b.RealName,
|
||||||
create_id_id = a.create_id,
|
create_id_id = a.create_id,
|
||||||
create_time = a.create_time.Value.ToString("yyyy-MM-dd"),
|
create_time = a.create_time==null ? null : a.create_time.Value.ToString("yyyy-MM-dd"),
|
||||||
equip_id=d.name,
|
equip_id=d.name,
|
||||||
equip_id_id= a.equip_id,
|
equip_id_id= a.equip_id,
|
||||||
file_name=a.file_name,
|
file_name=a.file_name,
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ using Tnb.EquipMgr.Interfaces;
|
|||||||
|
|
||||||
namespace Tnb.EquipMgr
|
namespace Tnb.EquipMgr
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
/// 设备备品备件
|
/// 设备备品备件
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[ApiDescriptionSettings(Tag = ModuleConsts.Tag, Area = ModuleConsts.Area, Order = 700)]
|
[ApiDescriptionSettings(Tag = ModuleConsts.Tag, Area = ModuleConsts.Area, Order = 700)]
|
||||||
@@ -34,20 +35,23 @@ namespace Tnb.EquipMgr
|
|||||||
{
|
{
|
||||||
List<EqpEquipSpareParts> oldList = await _repository.GetListAsync(x => x.equip_id == input.equip_id);
|
List<EqpEquipSpareParts> oldList = await _repository.GetListAsync(x => x.equip_id == input.equip_id);
|
||||||
List<EqpEquipSpareParts> list = new List<EqpEquipSpareParts>();
|
List<EqpEquipSpareParts> list = new List<EqpEquipSpareParts>();
|
||||||
string orgId = _userManager.GetUserInfo().Result.organizeId;
|
string orgId = _userManager?.GetUserInfo().Result.organizeId ?? "";
|
||||||
foreach (var spare_parts_id in input.spare_parts_ids)
|
if (input != null && input.spare_parts_ids != null)
|
||||||
{
|
{
|
||||||
if (oldList.Any(x => x.spare_parts_id == spare_parts_id))
|
foreach (var spare_parts_id in input.spare_parts_ids)
|
||||||
continue;
|
|
||||||
list.Add(new EqpEquipSpareParts()
|
|
||||||
{
|
{
|
||||||
id = SnowflakeIdHelper.NextId(),
|
if (oldList.Any(x => x.spare_parts_id == spare_parts_id))
|
||||||
equip_id = input.equip_id,
|
continue;
|
||||||
spare_parts_id = spare_parts_id,
|
list.Add(new EqpEquipSpareParts()
|
||||||
create_id = _userManager.UserId,
|
{
|
||||||
create_time = DateTime.Now,
|
id = SnowflakeIdHelper.NextId(),
|
||||||
org_id = orgId,
|
equip_id = input.equip_id,
|
||||||
});
|
spare_parts_id = spare_parts_id,
|
||||||
|
create_id = _userManager.UserId,
|
||||||
|
create_time = DateTime.Now,
|
||||||
|
org_id = orgId,
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
await _repository.InsertRangeAsync(list);
|
await _repository.InsertRangeAsync(list);
|
||||||
@@ -57,7 +61,7 @@ namespace Tnb.EquipMgr
|
|||||||
public async Task<dynamic> GetEquipSparePartsList(EquipQueryInput input)
|
public async Task<dynamic> GetEquipSparePartsList(EquipQueryInput input)
|
||||||
{
|
{
|
||||||
var db = _repository.AsSugarClient();
|
var db = _repository.AsSugarClient();
|
||||||
Dictionary<string, string> queryJson = new Dictionary<string, string>();
|
Dictionary<string, string>? queryJson = new Dictionary<string, string>();
|
||||||
if (!string.IsNullOrEmpty(input.queryJson))
|
if (!string.IsNullOrEmpty(input.queryJson))
|
||||||
{
|
{
|
||||||
queryJson = JsonConvert.DeserializeObject<Dictionary<string, string>>(input.queryJson);
|
queryJson = JsonConvert.DeserializeObject<Dictionary<string, string>>(input.queryJson);
|
||||||
@@ -67,8 +71,8 @@ namespace Tnb.EquipMgr
|
|||||||
.LeftJoin<DictionaryTypeEntity>((a, b, c) => c.EnCode == Tnb.BasicData.DictConst.SparePartsType && c.DeleteMark == null)
|
.LeftJoin<DictionaryTypeEntity>((a, b, c) => c.EnCode == Tnb.BasicData.DictConst.SparePartsType && c.DeleteMark == null)
|
||||||
.LeftJoin<DictionaryDataEntity>((a, b,c,d) => d.DictionaryTypeId == c.Id && b.type_id == d.EnCode)
|
.LeftJoin<DictionaryDataEntity>((a, b,c,d) => d.DictionaryTypeId == c.Id && b.type_id == d.EnCode)
|
||||||
.Where((a,b,c,d)=>a.equip_id==input.equip_id)
|
.Where((a,b,c,d)=>a.equip_id==input.equip_id)
|
||||||
.WhereIF(queryJson.ContainsKey("code"),(a,b,c,d)=>b.code.Contains(queryJson["code"]))
|
.WhereIF(queryJson!=null && queryJson.ContainsKey("code"),(a,b,c,d)=>b.code.Contains(queryJson["code"]))
|
||||||
.WhereIF(queryJson.ContainsKey("name"),(a,b,c,d)=>b.name.Contains(queryJson["name"]))
|
.WhereIF(queryJson!=null && queryJson.ContainsKey("name"),(a,b,c,d)=>b.name.Contains(queryJson["name"]))
|
||||||
.Select((a, b, c,d) => new EquipSparePartsQueryOutput
|
.Select((a, b, c,d) => new EquipSparePartsQueryOutput
|
||||||
{
|
{
|
||||||
id = a.id,
|
id = a.id,
|
||||||
|
|||||||
@@ -33,7 +33,6 @@ namespace Tnb.EquipMgr
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 根据模板id发布到设备
|
/// 根据模板id发布到设备
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="dic"></param>
|
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<string> Publish(SpotInsTemPublishInput input)
|
public async Task<string> Publish(SpotInsTemPublishInput input)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -137,7 +137,7 @@ namespace Tnb.EquipMgr
|
|||||||
public async Task<dynamic> GetRepairRecordList(EquipQueryInput input)
|
public async Task<dynamic> GetRepairRecordList(EquipQueryInput input)
|
||||||
{
|
{
|
||||||
var db = _repository.AsSugarClient();
|
var db = _repository.AsSugarClient();
|
||||||
Dictionary<string, string> queryJson = new Dictionary<string, string>();
|
Dictionary<string, string>? queryJson = new Dictionary<string, string>();
|
||||||
if (!string.IsNullOrEmpty(input.queryJson))
|
if (!string.IsNullOrEmpty(input.queryJson))
|
||||||
{
|
{
|
||||||
queryJson = JsonConvert.DeserializeObject<Dictionary<string, string>>(input.queryJson);
|
queryJson = JsonConvert.DeserializeObject<Dictionary<string, string>>(input.queryJson);
|
||||||
@@ -156,7 +156,7 @@ namespace Tnb.EquipMgr
|
|||||||
is_ugent = a.is_ugent==1 ? "是" : "否",
|
is_ugent = a.is_ugent==1 ? "是" : "否",
|
||||||
description = a.description,
|
description = a.description,
|
||||||
repair_description = a.repair_description,
|
repair_description = a.repair_description,
|
||||||
complete_time = a.complete_time.Value.ToString("yyyy-MM-dd HH:mm"),
|
complete_time = a.complete_time==null ? null : a.complete_time.Value.ToString("yyyy-MM-dd HH:mm"),
|
||||||
repairer_id = c.RealName
|
repairer_id = c.RealName
|
||||||
}).ToPagedListAsync(input.currentPage, input.pageSize);
|
}).ToPagedListAsync(input.currentPage, input.pageSize);
|
||||||
|
|
||||||
|
|||||||
@@ -33,7 +33,6 @@ namespace Tnb.EquipMgr
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 维修延期
|
/// 维修延期
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="dic"></param>
|
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<string> Delay(RepairDelayInput input)
|
public async Task<string> Delay(RepairDelayInput input)
|
||||||
{
|
{
|
||||||
@@ -43,7 +42,7 @@ namespace Tnb.EquipMgr
|
|||||||
EqpRepairDelay repairDelay = new EqpRepairDelay()
|
EqpRepairDelay repairDelay = new EqpRepairDelay()
|
||||||
{
|
{
|
||||||
id = SnowflakeIdHelper.NextId(),
|
id = SnowflakeIdHelper.NextId(),
|
||||||
equip_id = eqpRepairApply.equip_id,
|
equip_id = eqpRepairApply?.equip_id ?? "",
|
||||||
repair_apply_id = input.repair_apply_id,
|
repair_apply_id = input.repair_apply_id,
|
||||||
delay_reason = input.delay_reason,
|
delay_reason = input.delay_reason,
|
||||||
expected_time = input.expected_time,
|
expected_time = input.expected_time,
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ namespace Tnb.EquipMgr
|
|||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(input.id))
|
if (string.IsNullOrEmpty(input.id))
|
||||||
{
|
{
|
||||||
_flowTaskService.Create(new FlowTaskSubmitModel()
|
await _flowTaskService.Create(new FlowTaskSubmitModel()
|
||||||
{
|
{
|
||||||
flowId = flowId,
|
flowId = flowId,
|
||||||
parentId = "0",
|
parentId = "0",
|
||||||
@@ -127,26 +127,30 @@ namespace Tnb.EquipMgr
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
var entity = await _repository.GetSingleAsync(x=>x.id==input.id);
|
var entity = await _repository.GetSingleAsync(x=>x.id==input.id);
|
||||||
_flowTaskService.Update("",new FlowTaskSubmitModel()
|
if (entity != null)
|
||||||
{
|
{
|
||||||
flowId = flowId,
|
|
||||||
parentId = "0",
|
|
||||||
id = entity.flow_task_id,
|
|
||||||
formData = new JObject()
|
|
||||||
{
|
|
||||||
{"id",id},
|
|
||||||
{"repair_apply_id",input.repair_apply_id},
|
|
||||||
{"equip_id",input.equip_id},
|
|
||||||
{"create_id",_userManager.UserId},
|
|
||||||
{"supplier_id",input.supplier_id},
|
|
||||||
{"estimated_cost",input.estimated_cost},
|
|
||||||
{"construction_period_requirement",input.construction_period_requirement},
|
|
||||||
{"out_apply_reason",input.out_apply_reason},
|
|
||||||
{"remark",input.remark},
|
|
||||||
{"approve_status",RepairOutApplyStatus.TOBEAPPROVE},
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
await _flowTaskService.Update("",new FlowTaskSubmitModel()
|
||||||
|
{
|
||||||
|
flowId = flowId,
|
||||||
|
parentId = "0",
|
||||||
|
id = entity?.flow_task_id??"",
|
||||||
|
formData = new JObject()
|
||||||
|
{
|
||||||
|
{"id",id},
|
||||||
|
{"repair_apply_id",input.repair_apply_id},
|
||||||
|
{"equip_id",input.equip_id},
|
||||||
|
{"create_id",_userManager.UserId},
|
||||||
|
{"supplier_id",input.supplier_id},
|
||||||
|
{"estimated_cost",input.estimated_cost},
|
||||||
|
{"construction_period_requirement",input.construction_period_requirement},
|
||||||
|
{"out_apply_reason",input.out_apply_reason},
|
||||||
|
{"remark",input.remark},
|
||||||
|
{"approve_status",RepairOutApplyStatus.TOBEAPPROVE},
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return result.IsSuccess ? "操作成功" : result.ErrorMessage;
|
return result.IsSuccess ? "操作成功" : result.ErrorMessage;
|
||||||
|
|||||||
@@ -37,19 +37,22 @@ namespace Tnb.EquipMgr
|
|||||||
throw Oops.Bah("该设备已存在检验计划");
|
throw Oops.Bah("该设备已存在检验计划");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (entity.warn_unit == "1")//月
|
if (entity != null)
|
||||||
{
|
{
|
||||||
entity.next_check_time = entity.end_time.Value.AddMonths(-entity.warm_time.Value);
|
if (entity.warn_unit == "1")//月
|
||||||
}else if (entity.warn_unit == "2")//天
|
{
|
||||||
{
|
entity.next_check_time = entity.end_time?.AddMonths(-entity.warm_time.Value);
|
||||||
entity.next_check_time = entity.end_time.Value.AddDays(-entity.warm_time.Value);
|
}else if (entity.warn_unit == "2")//天
|
||||||
}
|
{
|
||||||
|
entity.next_check_time = entity.end_time?.AddDays(-entity.warm_time.Value);
|
||||||
|
}
|
||||||
|
|
||||||
entity.id = SnowflakeIdHelper.NextId();
|
entity.id = SnowflakeIdHelper.NextId();
|
||||||
entity.create_time = DateTime.Now;
|
entity.create_time = DateTime.Now;
|
||||||
entity.create_id = _userManager.UserId;
|
entity.create_id = _userManager.UserId;
|
||||||
entity.org_id = _userManager.GetUserInfo().Result.organizeId;
|
entity.org_id = _userManager.GetUserInfo().Result.organizeId;
|
||||||
await _repository.InsertAsync(entity);
|
await _repository.InsertAsync(entity);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,7 +34,6 @@ namespace Tnb.EquipMgr
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 根据模板id发布到设备
|
/// 根据模板id发布到设备
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="dic"></param>
|
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<string> Publish(SpotInsTemPublishInput input)
|
public async Task<string> Publish(SpotInsTemPublishInput input)
|
||||||
{
|
{
|
||||||
@@ -86,7 +85,7 @@ namespace Tnb.EquipMgr
|
|||||||
EqpSpotInsTemEquipD eqpSpotInsTemEquipD = new EqpSpotInsTemEquipD()
|
EqpSpotInsTemEquipD eqpSpotInsTemEquipD = new EqpSpotInsTemEquipD()
|
||||||
{
|
{
|
||||||
id = SnowflakeIdHelper.NextId(),
|
id = SnowflakeIdHelper.NextId(),
|
||||||
spot_ins_item_id = eqpSpotInsTem.spot_ins_item_id,
|
spot_ins_item_id = eqpSpotInsTem?.spot_ins_item_id ?? "",
|
||||||
spot_ins_tem_equip_id = id,
|
spot_ins_tem_equip_id = id,
|
||||||
};
|
};
|
||||||
insertEqpSpotInsTemEquipDs.Add(eqpSpotInsTemEquipD);
|
insertEqpSpotInsTemEquipDs.Add(eqpSpotInsTemEquipD);
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ namespace Tnb.EquipMgr
|
|||||||
public async Task<dynamic> GetSubEquipList(EquipQueryInput input)
|
public async Task<dynamic> GetSubEquipList(EquipQueryInput input)
|
||||||
{
|
{
|
||||||
var db = _repository.AsSugarClient();
|
var db = _repository.AsSugarClient();
|
||||||
Dictionary<string, string> queryJson = new Dictionary<string, string>();
|
Dictionary<string, string>? queryJson = new Dictionary<string, string>();
|
||||||
if (!string.IsNullOrEmpty(input.queryJson))
|
if (!string.IsNullOrEmpty(input.queryJson))
|
||||||
{
|
{
|
||||||
queryJson = JsonConvert.DeserializeObject<Dictionary<string, string>>(input.queryJson);
|
queryJson = JsonConvert.DeserializeObject<Dictionary<string, string>>(input.queryJson);
|
||||||
@@ -43,19 +43,19 @@ namespace Tnb.EquipMgr
|
|||||||
.LeftJoin<UserEntity >((a, b,c) => a.modify_id == c.Id)
|
.LeftJoin<UserEntity >((a, b,c) => a.modify_id == c.Id)
|
||||||
.LeftJoin<EqpEquipment >((a, b,c,d) => a.equip_id == d.id)
|
.LeftJoin<EqpEquipment >((a, b,c,d) => a.equip_id == d.id)
|
||||||
.Where((a,b,c,d)=>a.equip_id==input.equip_id)
|
.Where((a,b,c,d)=>a.equip_id==input.equip_id)
|
||||||
.WhereIF(queryJson.ContainsKey("code"),(a,b,c,d)=>a.code.Contains(queryJson["code"]))
|
.WhereIF(queryJson!=null && queryJson.ContainsKey("code"),(a,b,c,d)=>a.code.Contains(queryJson["code"]))
|
||||||
.WhereIF(queryJson.ContainsKey("name"),(a,b,c,d)=>a.name.Contains(queryJson["name"]))
|
.WhereIF(queryJson!=null && queryJson.ContainsKey("name"),(a,b,c,d)=>a.name.Contains(queryJson["name"]))
|
||||||
.Select((a, b, c,d) => new SubEquipQueryOutput
|
.Select((a, b, c,d) => new SubEquipQueryOutput
|
||||||
{
|
{
|
||||||
id = a.id,
|
id = a.id,
|
||||||
create_id = b.RealName,
|
create_id = b.RealName,
|
||||||
create_id_id = a.create_id,
|
create_id_id = a.create_id,
|
||||||
create_time = a.create_time.Value.ToString("yyyy-MM-dd"),
|
create_time = a.create_time==null ? null : a.create_time.Value.ToString("yyyy-MM-dd"),
|
||||||
equip_id=d.name,
|
equip_id=d.name,
|
||||||
equip_id_id= a.equip_id,
|
equip_id_id= a.equip_id,
|
||||||
code = a.code,
|
code = a.code,
|
||||||
modify_id = c.RealName,
|
modify_id = c.RealName,
|
||||||
modify_time = a.modify_time.Value.ToString("yyyy-MM-dd"),
|
modify_time = a.modify_time==null ? null : a.modify_time.Value.ToString("yyyy-MM-dd"),
|
||||||
name = a.name,
|
name = a.name,
|
||||||
org_id = a.org_id,
|
org_id = a.org_id,
|
||||||
specification = a.specification,
|
specification = a.specification,
|
||||||
|
|||||||
@@ -31,21 +31,21 @@ namespace Tnb.EquipMgr
|
|||||||
public async Task<dynamic> GetEquipTechnologyParameterList(EquipQueryInput input)
|
public async Task<dynamic> GetEquipTechnologyParameterList(EquipQueryInput input)
|
||||||
{
|
{
|
||||||
var db = _repository.AsSugarClient();
|
var db = _repository.AsSugarClient();
|
||||||
Dictionary<string, string> queryJson = new Dictionary<string, string>();
|
Dictionary<string, string>? queryJson = new Dictionary<string, string>();
|
||||||
if (!string.IsNullOrEmpty(input.queryJson))
|
if (input!=null && !string.IsNullOrEmpty(input.queryJson))
|
||||||
{
|
{
|
||||||
queryJson = JsonConvert.DeserializeObject<Dictionary<string, string>>(input.queryJson);
|
queryJson = JsonConvert.DeserializeObject<Dictionary<string, string>>(input?.queryJson ?? "");
|
||||||
}
|
}
|
||||||
var result = await db.Queryable<EqpTechnologyParameter>()
|
var result = await db.Queryable<EqpTechnologyParameter>()
|
||||||
.Where(a=>a.equip_id==input.equip_id)
|
.WhereIF(input!=null,a=>a.equip_id==input.equip_id)
|
||||||
.WhereIF(queryJson.ContainsKey("name"),a=>a.name.Contains(queryJson["name"]))
|
.WhereIF(queryJson!=null && queryJson.ContainsKey("name"),a=>a.name.Contains(queryJson["name"]))
|
||||||
.Select(a => new EquipTechnologyParameterQueryOutput
|
.Select(a => new EquipTechnologyParameterQueryOutput
|
||||||
{
|
{
|
||||||
id = a.id,
|
id = a.id,
|
||||||
name = a.name,
|
name = a.name,
|
||||||
definition = a.definition,
|
definition = a.definition,
|
||||||
remark = a.remark
|
remark = a.remark
|
||||||
}).ToPagedListAsync(input.currentPage, input.pageSize);
|
}).ToPagedListAsync((input?.currentPage??1), (input?.pageSize??50));
|
||||||
|
|
||||||
return PageResult<EquipTechnologyParameterQueryOutput>.SqlSugarPageResult(result);
|
return PageResult<EquipTechnologyParameterQueryOutput>.SqlSugarPageResult(result);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,7 +48,6 @@ namespace Tnb.EquipMgr
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 执行设备保养计划
|
/// 执行设备保养计划
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="pageInput"></param>
|
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<dynamic> ExecuteMaintain(SpotInsRecordExecuteInput input)
|
public async Task<dynamic> ExecuteMaintain(SpotInsRecordExecuteInput input)
|
||||||
@@ -75,13 +74,16 @@ namespace Tnb.EquipMgr
|
|||||||
execute_user_id = _userManager.UserId
|
execute_user_id = _userManager.UserId
|
||||||
}, x => x.id == input.id);
|
}, x => x.id == input.id);
|
||||||
|
|
||||||
foreach (var item in input.details)
|
if (input != null && input.details != null)
|
||||||
{
|
{
|
||||||
await _repository.AsSugarClient().Updateable<EqpMaintainRecordD>()
|
foreach (var item in input.details)
|
||||||
.SetColumns(x=>x.result==item["result"])
|
{
|
||||||
.SetColumnsIF(item.ContainsKey("maintain_descrip"),x=>x.maintain_descrip==item["maintain_descrip"])
|
await _repository.AsSugarClient().Updateable<EqpMaintainRecordD>()
|
||||||
.Where(x=>x.id==item["id"])
|
.SetColumns(x=>x.result==item["result"])
|
||||||
.ExecuteCommandAsync();
|
.SetColumnsIF(item.ContainsKey("maintain_descrip"),x=>x.maintain_descrip==item["maintain_descrip"])
|
||||||
|
.Where(x=>x.id==item["id"])
|
||||||
|
.ExecuteCommandAsync();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -114,7 +116,6 @@ namespace Tnb.EquipMgr
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 复核设备保养计划
|
/// 复核设备保养计划
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="pageInput"></param>
|
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<string> RepeatMaintain(MaintainRecordRepeatInput input)
|
public async Task<string> RepeatMaintain(MaintainRecordRepeatInput input)
|
||||||
@@ -123,22 +124,28 @@ namespace Tnb.EquipMgr
|
|||||||
DbResult<bool> result = await db.Ado.UseTranAsync(async () =>
|
DbResult<bool> result = await db.Ado.UseTranAsync(async () =>
|
||||||
{
|
{
|
||||||
|
|
||||||
foreach (var item in input.details)
|
if (input != null && input.details != null)
|
||||||
{
|
{
|
||||||
await db.Updateable<EqpMaintainRecordD>()
|
foreach (var item in input.details)
|
||||||
.SetColumns(x => x.repeat_descrip == item["repeat_descrip"])
|
{
|
||||||
.SetColumns(x => x.repeat_result == item["repeat_result"])
|
await db.Updateable<EqpMaintainRecordD>()
|
||||||
.Where(x => x.id == item["id"]).ExecuteCommandAsync();
|
.SetColumns(x => x.repeat_descrip == item["repeat_descrip"])
|
||||||
|
.SetColumns(x => x.repeat_result == item["repeat_result"])
|
||||||
|
.Where(x => x.id == item["id"]).ExecuteCommandAsync();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
await _repository.UpdateAsync(x => new EqpMaintainRecordH()
|
if (input != null)
|
||||||
{
|
{
|
||||||
repeat_result = input.repeat_result,
|
await _repository.UpdateAsync(x => new EqpMaintainRecordH()
|
||||||
repeat_remark = input.repeat_remark,
|
{
|
||||||
repeat_user_id = _userManager.UserId,
|
repeat_result = input.repeat_result,
|
||||||
repeat_time = DateTime.Now,
|
repeat_remark = input.repeat_remark,
|
||||||
status = SpotInsRecordExecutionStatus.COMPLETED
|
repeat_user_id = _userManager.UserId,
|
||||||
}, x => x.id == input.id);
|
repeat_time = DateTime.Now,
|
||||||
|
status = SpotInsRecordExecutionStatus.COMPLETED
|
||||||
|
}, x => x.id == input.id);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
if(!result.IsSuccess) throw Oops.Oh(ErrorCode.COM1008);
|
if(!result.IsSuccess) throw Oops.Oh(ErrorCode.COM1008);
|
||||||
@@ -149,7 +156,7 @@ namespace Tnb.EquipMgr
|
|||||||
public async Task<dynamic> GetMaintainRecordList(EquipQueryInput input)
|
public async Task<dynamic> GetMaintainRecordList(EquipQueryInput input)
|
||||||
{
|
{
|
||||||
var db = _repository.AsSugarClient();
|
var db = _repository.AsSugarClient();
|
||||||
Dictionary<string, string> queryJson = new Dictionary<string, string>();
|
Dictionary<string, string>? queryJson = new Dictionary<string, string>();
|
||||||
if (!string.IsNullOrEmpty(input.queryJson))
|
if (!string.IsNullOrEmpty(input.queryJson))
|
||||||
{
|
{
|
||||||
queryJson = JsonConvert.DeserializeObject<Dictionary<string, string>>(input.queryJson);
|
queryJson = JsonConvert.DeserializeObject<Dictionary<string, string>>(input.queryJson);
|
||||||
@@ -163,17 +170,17 @@ namespace Tnb.EquipMgr
|
|||||||
{
|
{
|
||||||
id = a.id,
|
id = a.id,
|
||||||
attachment = a.attachment,
|
attachment = a.attachment,
|
||||||
create_time = a.create_time.Value.ToString("yyyy-MM-dd HH:mm"),
|
create_time = a.create_time==null ? null : a.create_time.Value.ToString("yyyy-MM-dd HH:mm"),
|
||||||
equip_id = b.code,
|
equip_id = b.code,
|
||||||
equip_id_id = a.equip_id,
|
equip_id_id = a.equip_id,
|
||||||
repeat_remark = a.repeat_remark,
|
repeat_remark = a.repeat_remark,
|
||||||
repeat_result = a.repeat_result=="1"?"合格":"不合格",
|
repeat_result = a.repeat_result=="1"?"合格":"不合格",
|
||||||
repeat_time = a.repeat_time.Value.ToString("yyyy-MM-dd HH:mm"),
|
repeat_time = a.repeat_time==null ? null : a.repeat_time.Value.ToString("yyyy-MM-dd HH:mm"),
|
||||||
repeat_user_id = d.RealName,
|
repeat_user_id = d.RealName,
|
||||||
result = a.result=="1"?"合格":"不合格",
|
result = a.result=="1"?"合格":"不合格",
|
||||||
result_remark = a.result_remark,
|
result_remark = a.result_remark,
|
||||||
maintain_tem_equip_id = a.maintain_tem_equip_id,
|
maintain_tem_equip_id = a.maintain_tem_equip_id,
|
||||||
execute_time = a.execute_time.Value.ToString("yyyy-MM-dd HH:mm"),
|
execute_time = a.execute_time==null ? null : a.execute_time.Value.ToString("yyyy-MM-dd HH:mm"),
|
||||||
execute_user_id = c.RealName,
|
execute_user_id = c.RealName,
|
||||||
status = SqlFunc.IF(a.status.Equals("1")).Return("待执行").ElseIF(a.status.Equals("2")).Return("待复核").ElseIF(a.status.Equals("3")).Return("已完成").End("")
|
status = SqlFunc.IF(a.status.Equals("1")).Return("待执行").ElseIF(a.status.Equals("2")).Return("待复核").ElseIF(a.status.Equals("3")).Return("已完成").End("")
|
||||||
}).ToPagedListAsync(input.currentPage, input.pageSize);
|
}).ToPagedListAsync(input.currentPage, input.pageSize);
|
||||||
|
|||||||
@@ -48,7 +48,6 @@ namespace Tnb.EquipMgr
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 执行点巡检
|
/// 执行点巡检
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="pageInput"></param>
|
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<dynamic> ExecuteSpotIns(SpotInsRecordExecuteInput input)
|
public async Task<dynamic> ExecuteSpotIns(SpotInsRecordExecuteInput input)
|
||||||
@@ -75,13 +74,16 @@ namespace Tnb.EquipMgr
|
|||||||
spot_record_user_id = _userManager.UserId
|
spot_record_user_id = _userManager.UserId
|
||||||
}, x => x.id == input.id);
|
}, x => x.id == input.id);
|
||||||
|
|
||||||
foreach (var item in input.details)
|
if(input!=null && input.details!=null)
|
||||||
{
|
{
|
||||||
await _repository.AsSugarClient().Updateable<EqpSpotInsRecordD>().
|
foreach (var item in input.details)
|
||||||
SetColumns(x=>x.result==item["result"])
|
{
|
||||||
.SetColumnsIF(item["judge_type"]=="1",x=>x.real_value==Convert.ToDouble(item["real_value"]))
|
await _repository.AsSugarClient().Updateable<EqpSpotInsRecordD>().
|
||||||
.Where(x=>x.id==item["id"])
|
SetColumns(x=>x.result==item["result"])
|
||||||
.ExecuteCommandAsync();
|
.SetColumnsIF(item["judge_type"]=="1",x=>x.real_value==Convert.ToDouble(item["real_value"]))
|
||||||
|
.Where(x=>x.id==item["id"])
|
||||||
|
.ExecuteCommandAsync();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -114,7 +116,6 @@ namespace Tnb.EquipMgr
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 复核点巡检
|
/// 复核点巡检
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="pageInput"></param>
|
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task RepeatSpotIns(SpotInsRecordRepeatInput input)
|
public async Task RepeatSpotIns(SpotInsRecordRepeatInput input)
|
||||||
@@ -133,7 +134,7 @@ namespace Tnb.EquipMgr
|
|||||||
public async Task<dynamic> GetSpotInsRecordList(EquipQueryInput input)
|
public async Task<dynamic> GetSpotInsRecordList(EquipQueryInput input)
|
||||||
{
|
{
|
||||||
var db = _repository.AsSugarClient();
|
var db = _repository.AsSugarClient();
|
||||||
Dictionary<string, string> queryJson = new Dictionary<string, string>();
|
Dictionary<string, string>? queryJson = new Dictionary<string, string>();
|
||||||
if (!string.IsNullOrEmpty(input.queryJson))
|
if (!string.IsNullOrEmpty(input.queryJson))
|
||||||
{
|
{
|
||||||
queryJson = JsonConvert.DeserializeObject<Dictionary<string, string>>(input.queryJson);
|
queryJson = JsonConvert.DeserializeObject<Dictionary<string, string>>(input.queryJson);
|
||||||
@@ -145,16 +146,16 @@ namespace Tnb.EquipMgr
|
|||||||
{
|
{
|
||||||
id = a.id,
|
id = a.id,
|
||||||
attachment = a.attachment,
|
attachment = a.attachment,
|
||||||
create_time = a.create_time.Value.ToString("yyyy-MM-dd HH:mm"),
|
create_time = a.create_time==null ? null : a.create_time.Value.ToString("yyyy-MM-dd HH:mm"),
|
||||||
equip_id = a.equip_id,
|
equip_id = a.equip_id,
|
||||||
repeat_remark = a.repeat_remark,
|
repeat_remark = a.repeat_remark,
|
||||||
repeat_result = a.repeat_result=="1"?"合格":"不合格",
|
repeat_result = a.repeat_result=="1"?"合格":"不合格",
|
||||||
repeat_time = a.repeat_time.Value.ToString("yyyy-MM-dd HH:mm"),
|
repeat_time = a.repeat_time==null ? null : a.repeat_time.Value.ToString("yyyy-MM-dd HH:mm"),
|
||||||
repeat_user_id = b.RealName,
|
repeat_user_id = b.RealName,
|
||||||
result = a.result=="1"?"合格":"不合格",
|
result = a.result=="1"?"合格":"不合格",
|
||||||
result_remark = a.result_remark,
|
result_remark = a.result_remark,
|
||||||
spot_ins_tem_equip_id = a.spot_ins_tem_equip_id,
|
spot_ins_tem_equip_id = a.spot_ins_tem_equip_id,
|
||||||
spot_record_date_time = a.spot_record_date_time.Value.ToString("yyyy-MM-dd HH:mm"),
|
spot_record_date_time = a.spot_record_date_time==null ? null :a.spot_record_date_time.Value.ToString("yyyy-MM-dd HH:mm"),
|
||||||
spot_record_user_id = a.spot_record_user_id,
|
spot_record_user_id = a.spot_record_user_id,
|
||||||
status = SqlFunc.IF(a.status.Equals("1")).Return("待执行").ElseIF(a.status.Equals("2")).Return("待复核").ElseIF(a.status.Equals("3")).Return("已完成").End("")
|
status = SqlFunc.IF(a.status.Equals("1")).Return("待执行").ElseIF(a.status.Equals("2")).Return("待复核").ElseIF(a.status.Equals("3")).Return("已完成").End("")
|
||||||
}).ToPagedListAsync(input.currentPage, input.pageSize);
|
}).ToPagedListAsync(input.currentPage, input.pageSize);
|
||||||
|
|||||||
@@ -2,18 +2,18 @@ namespace Tnb.PerMgr.Entities.Dto
|
|||||||
{
|
{
|
||||||
public class ProcessChildDataInput
|
public class ProcessChildDataInput
|
||||||
{
|
{
|
||||||
|
|
||||||
public string id { get; set; }
|
public string id { get; set; } = string.Empty;
|
||||||
public string process_standards_id { get; set; }
|
public string? process_standards_id { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 工艺参数id
|
/// 工艺参数id
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string process_param_id { get; set; }
|
public string? process_param_id { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 工艺参数类型id
|
/// 工艺参数类型id
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string process_param_type_id { get; set; }
|
public string? process_param_type_id { get; set; }
|
||||||
public decimal value { get; set; }
|
public decimal value { get; set; }
|
||||||
public string daq_id { get; set; }
|
public string? daq_id { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2,7 +2,7 @@ namespace Tnb.PerMgr.Entities.Dto
|
|||||||
{
|
{
|
||||||
public class ProcessParamOutput
|
public class ProcessParamOutput
|
||||||
{
|
{
|
||||||
public string name { get; set; }
|
public string? name { get; set; }
|
||||||
|
|
||||||
public decimal upper_value { get; set; }
|
public decimal upper_value { get; set; }
|
||||||
|
|
||||||
|
|||||||
@@ -5,16 +5,16 @@ namespace Tnb.PerMgr.Entities.Dto
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 工艺标准子表id
|
/// 工艺标准子表id
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string id { get; set; }
|
public string? id { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 工艺参数id
|
/// 工艺参数id
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string process_param_id { get; set; }
|
public string? process_param_id { get; set; }
|
||||||
public string name { get; set; }
|
public string? name { get; set; }
|
||||||
public decimal? value { get; set; }
|
public decimal? value { get; set; }
|
||||||
public decimal upper_value { get; set; }
|
public decimal upper_value { get; set; }
|
||||||
public decimal lower_value { get; set; }
|
public decimal lower_value { get; set; }
|
||||||
|
|
||||||
public string daq_id { get; set; }
|
public string? daq_id { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2,7 +2,7 @@ namespace Tnb.PerMgr.Entities.Dto
|
|||||||
{
|
{
|
||||||
public class ProcessParamTypeDaqListOutput
|
public class ProcessParamTypeDaqListOutput
|
||||||
{
|
{
|
||||||
public string id { get; set; }
|
public string? id { get; set; }
|
||||||
public string label_name { get; set; }
|
public string? label_name { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -35,7 +35,7 @@ namespace Tnb.PerMgr
|
|||||||
string equipId = dic["equip_id"];
|
string equipId = dic["equip_id"];
|
||||||
var db = _repository.AsSugarClient();
|
var db = _repository.AsSugarClient();
|
||||||
var equipment = await db.Queryable<EqpEquipment>().Where(x => x.id == equipId).SingleAsync();
|
var equipment = await db.Queryable<EqpEquipment>().Where(x => x.id == equipId).SingleAsync();
|
||||||
string equipTypeId = equipment?.equip_type_id;
|
string? equipTypeId = equipment?.equip_type_id;
|
||||||
|
|
||||||
//List<PerProcessParamType> perProcessParamTypes = await _repository.GetListAsync(x => x.equip_type_id == equipTypeId);
|
//List<PerProcessParamType> perProcessParamTypes = await _repository.GetListAsync(x => x.equip_type_id == equipTypeId);
|
||||||
var result = await db.Queryable<PerProcessParamType>()
|
var result = await db.Queryable<PerProcessParamType>()
|
||||||
@@ -94,29 +94,29 @@ namespace Tnb.PerMgr
|
|||||||
{
|
{
|
||||||
PerProcessParamEditRecord record = new PerProcessParamEditRecord
|
PerProcessParamEditRecord record = new PerProcessParamEditRecord
|
||||||
{
|
{
|
||||||
process_param_id = item.process_param_id,
|
process_param_id = item?.process_param_id ?? "",
|
||||||
old_value = processStandardsD.value,
|
old_value = processStandardsD.value,
|
||||||
new_value = item.value,
|
new_value = item?.value ?? 0,
|
||||||
modify_id = _userManager.UserId,
|
modify_id = _userManager.UserId,
|
||||||
modify_time = DateTime.Now,
|
modify_time = DateTime.Now,
|
||||||
org_id = _userManager.GetUserInfo().Result.organizeId,
|
org_id = _userManager.GetUserInfo().Result.organizeId,
|
||||||
equip_id = perProcessStandardsH.equip_id,
|
equip_id = perProcessStandardsH.equip_id,
|
||||||
process_param_name = processParam.name
|
process_param_name = processParam.name
|
||||||
};
|
};
|
||||||
db.Insertable<PerProcessParamEditRecord>(record).ExecuteCommandAsync();
|
await db.Insertable<PerProcessParamEditRecord>(record).ExecuteCommandAsync();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(item.id))
|
if (item==null || string.IsNullOrEmpty(item.id))
|
||||||
{
|
{
|
||||||
PerProcessStandardsD insertObj = new PerProcessStandardsD()
|
PerProcessStandardsD insertObj = new PerProcessStandardsD()
|
||||||
{
|
{
|
||||||
value = item.value,
|
value = item?.value ?? 0,
|
||||||
process_param_id = item.process_param_id,
|
process_param_id = item?.process_param_id ?? "",
|
||||||
process_standards_id = item.process_standards_id,
|
process_standards_id = item?.process_standards_id ?? "",
|
||||||
process_param_type_id = item.process_param_type_id,
|
process_param_type_id = item?.process_param_type_id ?? "",
|
||||||
daq_id = item.daq_id,
|
daq_id = item?.daq_id??"",
|
||||||
};
|
};
|
||||||
|
|
||||||
insertIds.Add(insertObj.id);
|
insertIds.Add(insertObj.id);
|
||||||
@@ -152,7 +152,7 @@ namespace Tnb.PerMgr
|
|||||||
var db = _repository.AsSugarClient();
|
var db = _repository.AsSugarClient();
|
||||||
var perProcessStandardsH = await db.Queryable<PerProcessStandardsH>().SingleAsync(x => x.id == id);
|
var perProcessStandardsH = await db.Queryable<PerProcessStandardsH>().SingleAsync(x => x.id == id);
|
||||||
var equipment = await db.Queryable<EqpEquipment>().Where(x => x.id == perProcessStandardsH.equip_id).SingleAsync();
|
var equipment = await db.Queryable<EqpEquipment>().Where(x => x.id == perProcessStandardsH.equip_id).SingleAsync();
|
||||||
string equipTypeId = equipment?.equip_type_id;
|
string? equipTypeId = equipment?.equip_type_id;
|
||||||
|
|
||||||
var result = await db.Queryable<PerProcessParamType>()
|
var result = await db.Queryable<PerProcessParamType>()
|
||||||
.Where(a => a.equip_type_id == equipTypeId)
|
.Where(a => a.equip_type_id == equipTypeId)
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ namespace Tnb.PerMgr
|
|||||||
sheet.SetColumnWidth(i,15 * 256);
|
sheet.SetColumnWidth(i,15 * 256);
|
||||||
}
|
}
|
||||||
|
|
||||||
int rowIndex = 1;
|
// int rowIndex = 1;
|
||||||
|
|
||||||
// var column = sheet.GetColumn(0);
|
// var column = sheet.GetColumn(0);
|
||||||
// 设置下拉项
|
// 设置下拉项
|
||||||
@@ -109,7 +109,7 @@ namespace Tnb.PerMgr
|
|||||||
{
|
{
|
||||||
int rowIndex = 1;
|
int rowIndex = 1;
|
||||||
bool flag = false;
|
bool flag = false;
|
||||||
IWorkbook workbook = null;
|
IWorkbook? workbook = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
using (Stream stream = input.file.OpenReadStream())
|
using (Stream stream = input.file.OpenReadStream())
|
||||||
@@ -121,9 +121,12 @@ namespace Tnb.PerMgr
|
|||||||
else if (input.fileName.IndexOf(".xls") > 0)
|
else if (input.fileName.IndexOf(".xls") > 0)
|
||||||
workbook = new HSSFWorkbook(stream);
|
workbook = new HSSFWorkbook(stream);
|
||||||
|
|
||||||
ISheet sheet = workbook.GetSheetAt(0);
|
ISheet? sheet = workbook?.GetSheetAt(0);
|
||||||
|
|
||||||
|
if(workbook==null || sheet==null)
|
||||||
|
throw Oops.Bah("无导入数据");
|
||||||
|
|
||||||
if (sheet.LastRowNum <= 1)
|
if (sheet?.LastRowNum <= 1)
|
||||||
throw Oops.Bah("无导入数据");
|
throw Oops.Bah("无导入数据");
|
||||||
|
|
||||||
var db = _repository.AsSugarClient();
|
var db = _repository.AsSugarClient();
|
||||||
@@ -132,12 +135,12 @@ namespace Tnb.PerMgr
|
|||||||
int errorColumnIndex = 5;
|
int errorColumnIndex = 5;
|
||||||
|
|
||||||
ICellStyle style = workbook.CreateCellStyle();
|
ICellStyle style = workbook.CreateCellStyle();
|
||||||
IFont font = workbook.CreateFont();
|
IFont font = workbook.CreateFont();
|
||||||
font.Color = IndexedColors.Red.Index; // 将字体颜色设置为红色
|
font.Color = IndexedColors.Red.Index; // 将字体颜色设置为红色
|
||||||
style.SetFont(font);
|
style.SetFont(font);
|
||||||
|
|
||||||
List<PerProcessStandardsD> list = new List<PerProcessStandardsD>() { };
|
List<PerProcessStandardsD> list = new List<PerProcessStandardsD>() { };
|
||||||
for (rowIndex = 1; rowIndex <= sheet.LastRowNum; rowIndex++)
|
for (rowIndex = 1; rowIndex <= sheet?.LastRowNum; rowIndex++)
|
||||||
{
|
{
|
||||||
IRow row = sheet.GetRow(rowIndex);
|
IRow row = sheet.GetRow(rowIndex);
|
||||||
ICell cell0 = row.GetCell(0);
|
ICell cell0 = row.GetCell(0);
|
||||||
@@ -146,7 +149,7 @@ namespace Tnb.PerMgr
|
|||||||
|
|
||||||
PerProcessStandardsD item = new PerProcessStandardsD();
|
PerProcessStandardsD item = new PerProcessStandardsD();
|
||||||
item.process_standards_id = id;
|
item.process_standards_id = id;
|
||||||
PerProcessParamType perProcessParamType = perProcessParamTypes.FirstOrDefault(x => x.name == cell0.StringCellValue);
|
PerProcessParamType? perProcessParamType = perProcessParamTypes.FirstOrDefault(x => x.name == cell0.StringCellValue);
|
||||||
if (perProcessParamType != null)
|
if (perProcessParamType != null)
|
||||||
{
|
{
|
||||||
item.process_param_type_id = perProcessParamType.id;
|
item.process_param_type_id = perProcessParamType.id;
|
||||||
@@ -159,7 +162,7 @@ namespace Tnb.PerMgr
|
|||||||
flag = true;
|
flag = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
PerProcessParam perProcessParam = perProcessParams.FirstOrDefault(x => x.name == cell1.StringCellValue);
|
PerProcessParam? perProcessParam = perProcessParams.FirstOrDefault(x => x.name == cell1.StringCellValue);
|
||||||
if (perProcessParam != null)
|
if (perProcessParam != null)
|
||||||
{
|
{
|
||||||
item.process_param_id = perProcessParam.id;
|
item.process_param_id = perProcessParam.id;
|
||||||
@@ -232,7 +235,7 @@ namespace Tnb.PerMgr
|
|||||||
{
|
{
|
||||||
MemoryStream ms = new MemoryStream();
|
MemoryStream ms = new MemoryStream();
|
||||||
|
|
||||||
workbook.Write(ms);
|
workbook?.Write(ms);
|
||||||
string fileName = $"工艺标准导入报错{DateTime.Now.Ticks}.xlsx";
|
string fileName = $"工艺标准导入报错{DateTime.Now.Ticks}.xlsx";
|
||||||
using (MemoryStream ms2 = new MemoryStream(ms.ToArray()))
|
using (MemoryStream ms2 = new MemoryStream(ms.ToArray()))
|
||||||
{
|
{
|
||||||
@@ -278,6 +281,7 @@ namespace Tnb.PerMgr
|
|||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
Console.WriteLine(e);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ namespace Tnb.ProductionMgr.Entities.Dto
|
|||||||
{
|
{
|
||||||
public class MaterialReceiptInput
|
public class MaterialReceiptInput
|
||||||
{
|
{
|
||||||
public string id { get; set; }
|
public string? id { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 签收单号
|
/// 签收单号
|
||||||
@@ -59,6 +59,6 @@ namespace Tnb.ProductionMgr.Entities.Dto
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public string? mbom_process_id { get; set; }
|
public string? mbom_process_id { get; set; }
|
||||||
|
|
||||||
public List<Dictionary<string,string>> details { get; set; }
|
public List<Dictionary<string,string>>? details { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -95,7 +95,7 @@ namespace Tnb.ProductionMgr
|
|||||||
{
|
{
|
||||||
mo_task_id = input.data["mo_task_id"]?.ToString(),
|
mo_task_id = input.data["mo_task_id"]?.ToString(),
|
||||||
mo_task_code = input.data["mo_task_code"]?.ToString(),
|
mo_task_code = input.data["mo_task_code"]?.ToString(),
|
||||||
reported_qty = (int)item["reported_qty"],
|
reported_qty = item["reported_qty"]!=null ? (int)item["reported_qty"] : 0,
|
||||||
create_id = item["create_id"]?.ToString(),
|
create_id = item["create_id"]?.ToString(),
|
||||||
create_time = DateTime.Now,
|
create_time = DateTime.Now,
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -129,7 +129,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tnb.BasicData.Entities", "B
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tnb.ProductionMgr.Entities", "ProductionMgr\Tnb.ProductionMgr.Entities\Tnb.ProductionMgr.Entities.csproj", "{57E7491F-7876-451E-BA9F-5B007EBD432D}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tnb.ProductionMgr.Entities", "ProductionMgr\Tnb.ProductionMgr.Entities\Tnb.ProductionMgr.Entities.csproj", "{57E7491F-7876-451E-BA9F-5B007EBD432D}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "PerMgr", "PerMgr", "{74AB6486-1090-4CC9-9D1A-F1245E3ECFC3}"
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "16-PerMgr", "16-PerMgr", "{74AB6486-1090-4CC9-9D1A-F1245E3ECFC3}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tnb.PerMgr", "PerMgr\Tnb.PerMgr\Tnb.PerMgr.csproj", "{D41946CF-09C6-4CA4-A1F4-42E7E1538BF7}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tnb.PerMgr", "PerMgr\Tnb.PerMgr\Tnb.PerMgr.csproj", "{D41946CF-09C6-4CA4-A1F4-42E7E1538BF7}"
|
||||||
EndProject
|
EndProject
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using JNPF.Common.Dtos.VisualDev;
|
||||||
using JNPF.Systems.Interfaces.System;
|
using JNPF.Systems.Interfaces.System;
|
||||||
using JNPF.VisualDev;
|
using JNPF.VisualDev;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
@@ -25,6 +26,13 @@ namespace Tnb.WarehouseMgr
|
|||||||
{
|
{
|
||||||
_db = repository.AsSugarClient();
|
_db = repository.AsSugarClient();
|
||||||
_dictionaryDataService = dictionaryDataService;
|
_dictionaryDataService = dictionaryDataService;
|
||||||
|
OverideFuncs.CreateAsync = OutStockApplyFor;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private async Task<dynamic> OutStockApplyFor(VisualDevModelDataCrInput input)
|
||||||
|
{
|
||||||
|
return Task.FromResult(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
Reference in New Issue
Block a user