meger
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -368,4 +368,5 @@ JetBrains Rider
|
|||||||
*.sln.DotSettings
|
*.sln.DotSettings
|
||||||
*.sln.DotSettings.VS2015.user
|
*.sln.DotSettings.VS2015.user
|
||||||
*.sln.DotSettings.VS2017.user
|
*.sln.DotSettings.VS2017.user
|
||||||
*.sln.DotSettings.VS2019.user
|
*.sln.DotSettings.VS2019.user
|
||||||
|
/apihost/Tnb.API.Entry/Configurations/AppSetting.json
|
||||||
|
|||||||
@@ -0,0 +1,84 @@
|
|||||||
|
namespace Tnb.BasicData.Entitys.Dto
|
||||||
|
{
|
||||||
|
public class EbomTreeOutput
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 物料名称
|
||||||
|
/// </summary>
|
||||||
|
public string material_id { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 规格描述
|
||||||
|
/// </summary>
|
||||||
|
public string material_id_extras { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 物料id
|
||||||
|
/// </summary>
|
||||||
|
public string material_id_id { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 最小包装
|
||||||
|
/// </summary>
|
||||||
|
public decimal? material_id_minpacking { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 备注
|
||||||
|
/// </summary>
|
||||||
|
public string material_id_remark { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 单位
|
||||||
|
/// </summary>
|
||||||
|
public string material_id_unitid { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 是否有下级
|
||||||
|
/// </summary>
|
||||||
|
public bool hasChildren { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:投料管控
|
||||||
|
/// Default:NULL::character varying
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string feeding_control {get;set;}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:损耗率
|
||||||
|
/// Default:NULL::character varying
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string loss_rate {get;set;}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:数量
|
||||||
|
/// Default:NULL::character varying
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string quantity {get;set;}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:需要称量
|
||||||
|
/// Default:NULL::character varying
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string require_weight {get;set;}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:替代物料
|
||||||
|
/// Default:NULL::character varying
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string substitute_material {get;set;}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:工艺路线
|
||||||
|
/// Default:NULL::character varying
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string routing {get;set;}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:版本号
|
||||||
|
/// Default:NULL::character varying
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string version {get;set;}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
namespace Tnb.BasicData.Entitys.Dto
|
namespace Tnb.BasicData.Entitys.Dto
|
||||||
{
|
{
|
||||||
public class ParentMaterialTreeQueryInput
|
public class EbomTreeQueryInput
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 物料清单id
|
/// 物料清单id
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string parentMaterialId { get; set; }
|
public string ebomId { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 物料id
|
/// 物料id
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
namespace Tnb.BasicData.Entitys.Dto
|
|
||||||
{
|
|
||||||
public class ParentMaterialTreeOutput
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// 物料名称
|
|
||||||
/// </summary>
|
|
||||||
public string material_id { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// 规格描述
|
|
||||||
/// </summary>
|
|
||||||
public string material_id_extras { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// 物料id
|
|
||||||
/// </summary>
|
|
||||||
public string material_id_id { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// 最小包装
|
|
||||||
/// </summary>
|
|
||||||
public decimal? material_id_minpacking { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// 备注
|
|
||||||
/// </summary>
|
|
||||||
public string material_id_remark { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// 单位
|
|
||||||
/// </summary>
|
|
||||||
public string material_id_unitid { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// 是否有下级
|
|
||||||
/// </summary>
|
|
||||||
public bool hasChildren { get; set; }
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -6,10 +6,10 @@ namespace Tnb.BasicData.Entitys.Entity
|
|||||||
///<summary>
|
///<summary>
|
||||||
///物料清单子表
|
///物料清单子表
|
||||||
///</summary>
|
///</summary>
|
||||||
[SugarTable("bas_parent_material_items")]
|
[SugarTable("bas_ebom_d")]
|
||||||
public class BasParentMaterialItems : BaseEntity<string>
|
public class BasEbomD : BaseEntity<string>
|
||||||
{
|
{
|
||||||
public BasParentMaterialItems(){
|
public BasEbomD(){
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -34,8 +34,8 @@ namespace Tnb.BasicData.Entitys.Entity
|
|||||||
/// Default:NULL::character varying
|
/// Default:NULL::character varying
|
||||||
/// Nullable:True
|
/// Nullable:True
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[SugarColumn(ColumnName="parent_material_id")]
|
[SugarColumn(ColumnName="ebom_id")]
|
||||||
public string ParentMaterialId {get;set;}
|
public string EbomId {get;set;}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Desc:物料编号/名称
|
/// Desc:物料编号/名称
|
||||||
@@ -6,10 +6,10 @@ namespace Tnb.BasicData.Entitys.Entity
|
|||||||
///<summary>
|
///<summary>
|
||||||
///物料清单父表
|
///物料清单父表
|
||||||
///</summary>
|
///</summary>
|
||||||
[SugarTable("bas_parent_material")]
|
[SugarTable("bas_ebom_h")]
|
||||||
public class BasParentMaterial : BaseEntity<string>
|
public class BasEbomH : BaseEntity<string>
|
||||||
{
|
{
|
||||||
public BasParentMaterial(){
|
public BasEbomH(){
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -7,82 +7,119 @@ using Tnb.Common.Contracts;
|
|||||||
|
|
||||||
namespace Tnb.BasicData.Entitys.Entity
|
namespace Tnb.BasicData.Entitys.Entity
|
||||||
{
|
{
|
||||||
/// <summary>
|
///<summary>
|
||||||
/// 工艺路线资料
|
///工艺路线
|
||||||
///</summary>
|
///</summary>
|
||||||
[SugarTable("bas_route")]
|
[SugarTable("bas_route")]
|
||||||
public class BasRoute : BaseEntity<string>
|
public class BasRoute : BaseEntity<string>
|
||||||
{
|
{
|
||||||
/// <summary>
|
public BasRoute(){
|
||||||
/// 工艺路线代码
|
|
||||||
///</summary>
|
|
||||||
[SugarColumn(ColumnName = "route_code")]
|
}
|
||||||
public string RouteCode { get; set; }
|
/// <summary>
|
||||||
/// <summary>
|
/// Desc:主键
|
||||||
/// 工艺路线名称
|
/// Default:
|
||||||
///</summary>
|
/// Nullable:False
|
||||||
[SugarColumn(ColumnName = "route_name")]
|
/// </summary>
|
||||||
public string RouteName { get; set; }
|
[SugarColumn(IsPrimaryKey=true,ColumnName="id")]
|
||||||
/// <summary>
|
public string Id {get;set;}
|
||||||
/// 工艺路线版本
|
|
||||||
///</summary>
|
/// <summary>
|
||||||
[SugarColumn(ColumnName = "version")]
|
/// Desc:编号
|
||||||
public string Version { get; set; }
|
/// Default:
|
||||||
/// <summary>
|
/// Nullable:False
|
||||||
/// 工艺路线类型: 标准途程:Standard 返工途程:Rework 试制途程:Trial 返修途程:RMA
|
/// </summary>
|
||||||
///</summary>
|
[SugarColumn(ColumnName="code")]
|
||||||
[SugarColumn(ColumnName = "route_type")]
|
public string Code {get;set;}
|
||||||
public string RouteType { get; set; }
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 创建时间
|
/// Desc:名称
|
||||||
///</summary>
|
/// Default:
|
||||||
[SugarColumn(ColumnName = "create_time")]
|
/// Nullable:False
|
||||||
public DateTime CreateTime { get; set; }
|
/// </summary>
|
||||||
/// <summary>
|
[SugarColumn(ColumnName="name")]
|
||||||
/// 修改时间
|
public string Name {get;set;}
|
||||||
///</summary>
|
|
||||||
[SugarColumn(ColumnName = "modify_time")]
|
/// <summary>
|
||||||
public DateTime? ModifyTime { get; set; }
|
/// Desc:有效开始时间
|
||||||
/// <summary>
|
/// Default:
|
||||||
/// 扩展字段
|
/// Nullable:True
|
||||||
///</summary>
|
/// </summary>
|
||||||
[SugarColumn(ColumnName = "extras")]
|
[SugarColumn(ColumnName="start_time")]
|
||||||
public string? Extras { get; set; }
|
public DateTime? StartTime {get;set;}
|
||||||
/// <summary>
|
|
||||||
/// 租户ID
|
/// <summary>
|
||||||
/// 默认值: NULL::character varying
|
/// Desc:有效结束时间
|
||||||
///</summary>
|
/// Default:
|
||||||
[SugarColumn(ColumnName = "tenant_id")]
|
/// Nullable:True
|
||||||
public string? TenantId { get; set; }
|
/// </summary>
|
||||||
/// <summary>
|
[SugarColumn(ColumnName="end_time")]
|
||||||
/// 所属组织ID
|
public DateTime? EndTime {get;set;}
|
||||||
/// 默认值: NULL::character varying
|
|
||||||
///</summary>
|
/// <summary>
|
||||||
[SugarColumn(ColumnName = "org_id")]
|
/// Desc:0 未发布 1 已发布
|
||||||
public string? OrgId { get; set; }
|
/// Default:
|
||||||
/// <summary>
|
/// Nullable:False
|
||||||
/// 备注
|
/// </summary>
|
||||||
/// 默认值: NULL::character varying
|
[SugarColumn(ColumnName="status")]
|
||||||
///</summary>
|
public string Status {get;set;}
|
||||||
[SugarColumn(ColumnName = "remark")]
|
|
||||||
public string? Remark { get; set; }
|
/// <summary>
|
||||||
/// <summary>
|
/// Desc:创建时间
|
||||||
/// 时间戳(用于并发控制)
|
/// Default:
|
||||||
/// 默认值: NULL::character varying
|
/// Nullable:True
|
||||||
///</summary>
|
/// </summary>
|
||||||
[SugarColumn(ColumnName = "timestamp")]
|
[SugarColumn(ColumnName="create_time")]
|
||||||
public string? Timestamp { get; set; }
|
public DateTime? CreateTime {get;set;}
|
||||||
/// <summary>
|
|
||||||
/// 创建用户
|
/// <summary>
|
||||||
/// 默认值: NULL::character varying
|
/// Desc:修改时间
|
||||||
///</summary>
|
/// Default:
|
||||||
[SugarColumn(ColumnName = "create_id")]
|
/// Nullable:True
|
||||||
public string? CreateId { get; set; }
|
/// </summary>
|
||||||
/// <summary>
|
[SugarColumn(ColumnName="modify_time")]
|
||||||
/// 修改用户
|
public DateTime? ModifyTime {get;set;}
|
||||||
/// 默认值: NULL::character varying
|
|
||||||
///</summary>
|
/// <summary>
|
||||||
[SugarColumn(ColumnName = "modify_id")]
|
/// Desc:是否永远有效
|
||||||
public string? ModifyId { get; set; }
|
/// Default:
|
||||||
|
/// Nullable:False
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnName="is_always_valid")]
|
||||||
|
public int IsAlwaysValid {get;set;}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:所属组织ID
|
||||||
|
/// Default:NULL::character varying
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnName="org_id")]
|
||||||
|
public string OrgId {get;set;}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:创建用户
|
||||||
|
/// Default:NULL::character varying
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnName="create_id")]
|
||||||
|
public string CreateId {get;set;}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:修改用户
|
||||||
|
/// Default:NULL::character varying
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnName="modify_id")]
|
||||||
|
public string ModifyId {get;set;}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:备注
|
||||||
|
/// Default:NULL::character varying
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnName="remark")]
|
||||||
|
public string Remark {get;set;}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,15 +14,15 @@ namespace Tnb.BasicData
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 物料清单
|
/// 物料清单
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[ApiDescriptionSettings(Tag = "BasicData", Name = "ParentMaterial", Order = 701)]
|
[ApiDescriptionSettings(Tag = "BasicData", Name = "Ebom", Order = 701)]
|
||||||
[Route("api/basic/[controller]")]
|
[Route("api/basic/[controller]")]
|
||||||
public class ParentMaterialService : IDynamicApiController, ITransient
|
public class EbomService : IDynamicApiController, ITransient
|
||||||
{
|
{
|
||||||
private readonly ISqlSugarRepository<BasMaterial> _repository;
|
private readonly ISqlSugarRepository<BasMaterial> _repository;
|
||||||
private readonly DataBaseManager _dbManager;
|
private readonly DataBaseManager _dbManager;
|
||||||
private readonly IDictionaryDataService _dictionaryDataService;
|
private readonly IDictionaryDataService _dictionaryDataService;
|
||||||
|
|
||||||
public ParentMaterialService(
|
public EbomService(
|
||||||
ISqlSugarRepository<BasMaterial> repository,DataBaseManager dbManager,IDictionaryDataService dictionaryDataService)
|
ISqlSugarRepository<BasMaterial> repository,DataBaseManager dbManager,IDictionaryDataService dictionaryDataService)
|
||||||
{
|
{
|
||||||
_repository = repository;
|
_repository = repository;
|
||||||
@@ -36,7 +36,7 @@ namespace Tnb.BasicData
|
|||||||
/// <param name="input">获取物料清单树.</param>
|
/// <param name="input">获取物料清单树.</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost("[action]")]
|
[HttpPost("[action]")]
|
||||||
public async Task<dynamic> GetTree(ParentMaterialTreeQueryInput queryInput)
|
public async Task<dynamic> GetTree(EbomTreeQueryInput queryInput)
|
||||||
{
|
{
|
||||||
var db = _repository.AsSugarClient();
|
var db = _repository.AsSugarClient();
|
||||||
var dic = await _dictionaryDataService.GetDicByKey(DicTypeKey.MeasurementUnit);
|
var dic = await _dictionaryDataService.GetDicByKey(DicTypeKey.MeasurementUnit);
|
||||||
@@ -49,11 +49,12 @@ namespace Tnb.BasicData
|
|||||||
|
|
||||||
if (string.IsNullOrEmpty(queryInput.materialId))
|
if (string.IsNullOrEmpty(queryInput.materialId))
|
||||||
{
|
{
|
||||||
var data = await db.Queryable<BasParentMaterialItems>()
|
var data = await db.Queryable<BasEbomD>()
|
||||||
.LeftJoin<BasParentMaterial>((a,b)=>a.ParentMaterialId==b.Id)
|
.LeftJoin<BasEbomH>((a,b)=>a.EbomId==b.Id)
|
||||||
.LeftJoin<BasMaterial>((a,b,c)=>a.MaterialId==c.Id)
|
.LeftJoin<BasMaterial>((a,b,c)=>a.MaterialId==c.Id)
|
||||||
.Where((a,b,c)=>a.ParentMaterialId==queryInput.parentMaterialId)
|
.LeftJoin<BasEbomH>((a,b,c,d)=>a.MaterialId==d.MaterialId)
|
||||||
.Select((a,b,c)=>new ParentMaterialTreeOutput
|
.Where((a,b,c)=>a.EbomId==queryInput.ebomId)
|
||||||
|
.Select((a,b,c,d)=>new EbomTreeOutput
|
||||||
{
|
{
|
||||||
material_id = c.MaterialName,
|
material_id = c.MaterialName,
|
||||||
material_id_extras = c.Extras,
|
material_id_extras = c.Extras,
|
||||||
@@ -61,7 +62,14 @@ namespace Tnb.BasicData
|
|||||||
material_id_minpacking = c.Minpacking,
|
material_id_minpacking = c.Minpacking,
|
||||||
material_id_remark = c.Remark,
|
material_id_remark = c.Remark,
|
||||||
material_id_unitid = c.Unitid,
|
material_id_unitid = c.Unitid,
|
||||||
hasChildren = SqlFunc.Subqueryable<BasParentMaterial>().Where(x=>x.MaterialId==a.MaterialId).Any(),
|
feeding_control = a.FeedingControl,
|
||||||
|
loss_rate = a.LossRate,
|
||||||
|
quantity = a.Quantity,
|
||||||
|
require_weight = a.RequireWeight,
|
||||||
|
substitute_material = a.SubstituteMaterial,
|
||||||
|
routing = d.Routing,
|
||||||
|
version = d.Version,
|
||||||
|
hasChildren = SqlFunc.Subqueryable<BasEbomH>().Where(x=>x.MaterialId==a.MaterialId).Any(),
|
||||||
}).Mapper(it =>
|
}).Mapper(it =>
|
||||||
{
|
{
|
||||||
it.material_id_unitid = dic[it.material_id_unitid].ToString();
|
it.material_id_unitid = dic[it.material_id_unitid].ToString();
|
||||||
@@ -70,11 +78,12 @@ namespace Tnb.BasicData
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
var data = await db.Queryable<BasParentMaterialItems>()
|
var data = await db.Queryable<BasEbomD>()
|
||||||
.LeftJoin<BasParentMaterial>((a,b)=>a.ParentMaterialId==b.Id)
|
.LeftJoin<BasEbomH>((a,b)=>a.EbomId==b.Id)
|
||||||
.LeftJoin<BasMaterial>((a,b,c)=>a.MaterialId==c.Id)
|
.LeftJoin<BasMaterial>((a,b,c)=>a.MaterialId==c.Id)
|
||||||
.Where((a,b,c)=>b.MaterialId==queryInput.materialId && a.ParentMaterialId==b.Id)
|
.LeftJoin<BasEbomH>((a,b,c,d)=>a.MaterialId==d.MaterialId)
|
||||||
.Select((a,b,c)=>new ParentMaterialTreeOutput
|
.Where((a,b,c)=>b.MaterialId==queryInput.materialId && a.EbomId==b.Id)
|
||||||
|
.Select((a,b,c,d)=>new EbomTreeOutput
|
||||||
{
|
{
|
||||||
material_id = c.MaterialName,
|
material_id = c.MaterialName,
|
||||||
material_id_extras = c.Extras,
|
material_id_extras = c.Extras,
|
||||||
@@ -82,7 +91,14 @@ namespace Tnb.BasicData
|
|||||||
material_id_minpacking = c.Minpacking,
|
material_id_minpacking = c.Minpacking,
|
||||||
material_id_remark = c.Remark,
|
material_id_remark = c.Remark,
|
||||||
material_id_unitid = c.Unitid,
|
material_id_unitid = c.Unitid,
|
||||||
hasChildren = SqlFunc.Subqueryable<BasParentMaterial>().Where(x=>x.MaterialId==a.MaterialId).Any(),
|
feeding_control = a.FeedingControl,
|
||||||
|
loss_rate = a.LossRate,
|
||||||
|
quantity = a.Quantity,
|
||||||
|
require_weight = a.RequireWeight,
|
||||||
|
substitute_material = a.SubstituteMaterial,
|
||||||
|
routing = d.Routing,
|
||||||
|
version = d.Version,
|
||||||
|
hasChildren = SqlFunc.Subqueryable<BasEbomH>().Where(x=>x.MaterialId==a.MaterialId).Any(),
|
||||||
}).Mapper(it =>
|
}).Mapper(it =>
|
||||||
{
|
{
|
||||||
it.material_id_unitid = dic[it.material_id_unitid].ToString();
|
it.material_id_unitid = dic[it.material_id_unitid].ToString();
|
||||||
@@ -92,5 +108,32 @@ namespace Tnb.BasicData
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[HttpPost("[action]")]
|
||||||
|
public async Task<Dictionary<string,string>> GetEbomVersionAndRouteName(string materialId)
|
||||||
|
{
|
||||||
|
var db = _repository.AsSugarClient();
|
||||||
|
|
||||||
|
var momDbLink = await _repository.AsSugarClient().Queryable<DbLinkEntity>().FirstAsync(x => x.FullName == DbName.TNBMON);
|
||||||
|
if (momDbLink != null)
|
||||||
|
{
|
||||||
|
db = _dbManager.ChangeDataBase(momDbLink);
|
||||||
|
}
|
||||||
|
|
||||||
|
var ebom = await db.Queryable<BasEbomH>()
|
||||||
|
.LeftJoin<BasRoute>((a,b)=>a.Routing==b.Id)
|
||||||
|
.Where((a,b) => a.MaterialId == materialId)
|
||||||
|
.Select((a,b)=>new
|
||||||
|
{
|
||||||
|
a.Version,
|
||||||
|
b.Name,
|
||||||
|
}).SingleAsync();
|
||||||
|
return new Dictionary<string,string>()
|
||||||
|
{
|
||||||
|
["version"] = ebom?.Version,
|
||||||
|
["routeName"] = ebom?.Name
|
||||||
|
,
|
||||||
|
};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,142 +1,142 @@
|
|||||||
using System.CodeDom;
|
// using System.CodeDom;
|
||||||
using Aop.Api.Domain;
|
// using Aop.Api.Domain;
|
||||||
using Aop.Api.Request;
|
// using Aop.Api.Request;
|
||||||
using Aspose.Cells;
|
// using Aspose.Cells;
|
||||||
using JNPF.Common.Core.Manager;
|
// using JNPF.Common.Core.Manager;
|
||||||
using JNPF.Common.Security;
|
// using JNPF.Common.Security;
|
||||||
using JNPF.DependencyInjection;
|
// using JNPF.DependencyInjection;
|
||||||
using JNPF.DynamicApiController;
|
// using JNPF.DynamicApiController;
|
||||||
using JNPF.Systems.Entitys.System;
|
// using JNPF.Systems.Entitys.System;
|
||||||
using JNPF.Systems.Interfaces.System;
|
// using JNPF.Systems.Interfaces.System;
|
||||||
using JNPF.VisualDev;
|
// using JNPF.VisualDev;
|
||||||
using Microsoft.AspNetCore.Authorization;
|
// using Microsoft.AspNetCore.Authorization;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
// using Microsoft.AspNetCore.Mvc;
|
||||||
using NPOI.SS.Formula.Functions;
|
// using NPOI.SS.Formula.Functions;
|
||||||
using Spire.Presentation;
|
// using Spire.Presentation;
|
||||||
using SqlSugar;
|
// using SqlSugar;
|
||||||
using Tnb.BasicData.Entitys.Dto.ProcessManage;
|
// using Tnb.BasicData.Entitys.Dto.ProcessManage;
|
||||||
using Tnb.BasicData.Entitys.Entity;
|
// using Tnb.BasicData.Entitys.Entity;
|
||||||
using Tnb.BasicData.Entitys.Model;
|
// using Tnb.BasicData.Entitys.Model;
|
||||||
|
//
|
||||||
namespace Tnb.BasicData
|
// namespace Tnb.BasicData
|
||||||
{
|
// {
|
||||||
/// <summary>
|
// /// <summary>
|
||||||
/// MOM基础数据-工艺管理
|
// /// MOM基础数据-工艺管理
|
||||||
/// </summary>
|
// /// </summary>
|
||||||
|
//
|
||||||
[ApiDescriptionSettings(Tag = "BasicData", Name = "ProcessManage", Order = 700)]
|
// [ApiDescriptionSettings(Tag = "BasicData", Name = "ProcessManage", Order = 700)]
|
||||||
[Route("api/basic/[controller]")]
|
// [Route("api/basic/[controller]")]
|
||||||
public class ProcessManageService : IOverideVisualDevService, IDynamicApiController, ITransient
|
// public class ProcessManageService : IOverideVisualDevService, IDynamicApiController, ITransient
|
||||||
{
|
// {
|
||||||
private readonly ISqlSugarRepository<BasRoute> _repository;
|
// private readonly ISqlSugarRepository<BasRoute> _repository;
|
||||||
private readonly DataBaseManager _dbManager;
|
// private readonly DataBaseManager _dbManager;
|
||||||
private readonly IDictionaryDataService _dictionaryDataService;
|
// private readonly IDictionaryDataService _dictionaryDataService;
|
||||||
private readonly string _dictionaryTypeId;
|
// private readonly string _dictionaryTypeId;
|
||||||
|
//
|
||||||
public ProcessManageService(
|
// public ProcessManageService(
|
||||||
IDictionaryDataService dictionaryDataService,
|
// IDictionaryDataService dictionaryDataService,
|
||||||
ISqlSugarRepository<BasRoute> repository,
|
// ISqlSugarRepository<BasRoute> repository,
|
||||||
DataBaseManager dbManager)
|
// DataBaseManager dbManager)
|
||||||
{
|
// {
|
||||||
_dictionaryDataService = dictionaryDataService;
|
// _dictionaryDataService = dictionaryDataService;
|
||||||
_repository = repository;
|
// _repository = repository;
|
||||||
_dbManager = dbManager;
|
// _dbManager = dbManager;
|
||||||
_dictionaryTypeId = "24950639717653";
|
// _dictionaryTypeId = "24950639717653";
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
public OverideVisualDevFunc OverideFuncs => new OverideVisualDevFunc();
|
// public OverideVisualDevFunc OverideFuncs => new OverideVisualDevFunc();
|
||||||
|
//
|
||||||
/// <summary>
|
// /// <summary>
|
||||||
/// 获取工艺路线树形结构
|
// /// 获取工艺路线树形结构
|
||||||
/// </summary>
|
// /// </summary>
|
||||||
/// <returns>工艺路线模版树形结构</returns>
|
// /// <returns>工艺路线模版树形结构</returns>
|
||||||
/// <remarks>
|
// /// <remarks>
|
||||||
///<br/> [{
|
// ///<br/> [{
|
||||||
///<br/> "RouteType": 工艺路线类型,
|
// ///<br/> "RouteType": 工艺路线类型,
|
||||||
///<br/> "Name": 工艺路线类型名称,
|
// ///<br/> "Name": 工艺路线类型名称,
|
||||||
///<br/> "RouteName": 工艺路线名称,
|
// ///<br/> "RouteName": 工艺路线名称,
|
||||||
///<br/> "RouteCode": 工艺路线代码,
|
// ///<br/> "RouteCode": 工艺路线代码,
|
||||||
///<br/> "Version": 工艺路线版本,
|
// ///<br/> "Version": 工艺路线版本,
|
||||||
///<br/> "id": "25325800913429",
|
// ///<br/> "id": "25325800913429",
|
||||||
///<br/> "parentId": null,
|
// ///<br/> "parentId": null,
|
||||||
///<br/> "hasChildren": true,
|
// ///<br/> "hasChildren": true,
|
||||||
///<br/> "children": [{
|
// ///<br/> "children": [{
|
||||||
///<br/> "RouteType": 工艺路线类型,
|
// ///<br/> "RouteType": 工艺路线类型,
|
||||||
///<br/> "Name": 工艺路线名称|工艺路线版本,
|
// ///<br/> "Name": 工艺路线名称|工艺路线版本,
|
||||||
///<br/> "RouteName": "显示器集成",
|
// ///<br/> "RouteName": "显示器集成",
|
||||||
///<br/> "RouteCode": 工艺路线代码,
|
// ///<br/> "RouteCode": 工艺路线代码,
|
||||||
///<br/> "Version": 工艺路线版本,
|
// ///<br/> "Version": 工艺路线版本,
|
||||||
///<br/> "id": 当前节点Id,不用可以忽略,
|
// ///<br/> "id": 当前节点Id,不用可以忽略,
|
||||||
///<br/> "parentId": "父节点Id,不用可以忽略",
|
// ///<br/> "parentId": "父节点Id,不用可以忽略",
|
||||||
///<br/> "hasChildren": 是否包含子节点,true/false,
|
// ///<br/> "hasChildren": 是否包含子节点,true/false,
|
||||||
///<br/> "children": [{
|
// ///<br/> "children": [{
|
||||||
///<br/> "Version": 工艺路线版本,
|
// ///<br/> "Version": 工艺路线版本,
|
||||||
///<br/> }
|
// ///<br/> }
|
||||||
///<br/> ],
|
// ///<br/> ],
|
||||||
///<br/> "num": 子节点数量,不用可以忽略,
|
// ///<br/> "num": 子节点数量,不用可以忽略,
|
||||||
///<br/> "isLeaf": 是否页节点,不用可以忽略 true/false
|
// ///<br/> "isLeaf": 是否页节点,不用可以忽略 true/false
|
||||||
///<br/> }
|
// ///<br/> }
|
||||||
///<br/> ]
|
// ///<br/> ]
|
||||||
///<br/>}
|
// ///<br/>}
|
||||||
///<br/>]
|
// ///<br/>]
|
||||||
/// </remarks>
|
// /// </remarks>
|
||||||
[HttpGet("route-tree")]
|
// [HttpGet("route-tree")]
|
||||||
public async Task<dynamic> GetRouteTreeList()
|
// public async Task<dynamic> GetRouteTreeList()
|
||||||
{
|
// {
|
||||||
var result = new List<RouteLineTreeOutput>();
|
// var result = new List<RouteLineTreeOutput>();
|
||||||
var dictaryDataList = await _dictionaryDataService.GetList(_dictionaryTypeId);
|
// var dictaryDataList = await _dictionaryDataService.GetList(_dictionaryTypeId);
|
||||||
var dictaryData = dictaryDataList.ToDictionary(x => x.EnCode, x => x.FullName);
|
// var dictaryData = dictaryDataList.ToDictionary(x => x.EnCode, x => x.FullName);
|
||||||
SqlSugarScope sugarClient = null!;
|
// SqlSugarScope sugarClient = null!;
|
||||||
var momDbLink = await _repository.AsSugarClient().Queryable<DbLinkEntity>().FirstAsync(x => x.FullName == "tnb_mom");
|
// var momDbLink = await _repository.AsSugarClient().Queryable<DbLinkEntity>().FirstAsync(x => x.FullName == "tnb_mom");
|
||||||
if (momDbLink != null)
|
// if (momDbLink != null)
|
||||||
{
|
// {
|
||||||
sugarClient = _dbManager.ChangeDataBase(momDbLink);
|
// sugarClient = _dbManager.ChangeDataBase(momDbLink);
|
||||||
}
|
// }
|
||||||
var list = await sugarClient.Queryable<BasRoute>().ToListAsync();
|
// var list = await sugarClient.Queryable<BasRoute>().ToListAsync();
|
||||||
if (list?.Count > 0)
|
// if (list?.Count > 0)
|
||||||
{
|
// {
|
||||||
var routeGroups = list.GroupBy(g => g.RouteType);
|
// var routeGroups = list.GroupBy(g => g.RouteType);
|
||||||
var dic1 = routeGroups.ToDictionary(x => x.Key, x => Tuple.Create(new RouteLineTreeOutput
|
// var dic1 = routeGroups.ToDictionary(x => x.Key, x => Tuple.Create(new RouteLineTreeOutput
|
||||||
{
|
// {
|
||||||
id = SnowflakeIdHelper.NextId(),
|
// id = SnowflakeIdHelper.NextId(),
|
||||||
RouteType = x.Key,
|
// RouteType = x.Key,
|
||||||
Name = dictaryData.ContainsKey(x.Key) ? dictaryData[x.Key] : string.Empty
|
// Name = dictaryData.ContainsKey(x.Key) ? dictaryData[x.Key] : string.Empty
|
||||||
}, x.GroupBy(g => new { g.RouteName, g.RouteCode })));
|
// }, x.GroupBy(g => new { g.RouteName, g.RouteCode })));
|
||||||
result.AddRange(dic1.Values.Select(t => t.Item1));
|
// result.AddRange(dic1.Values.Select(t => t.Item1));
|
||||||
foreach (var routeGroup in routeGroups)
|
// foreach (var routeGroup in routeGroups)
|
||||||
{
|
// {
|
||||||
if (dic1.ContainsKey(routeGroup.Key))
|
// if (dic1.ContainsKey(routeGroup.Key))
|
||||||
{
|
// {
|
||||||
var nodes = new List<RouteLineTreeOutput>();
|
// var nodes = new List<RouteLineTreeOutput>();
|
||||||
foreach (var item in dic1[routeGroup.Key].Item2)
|
// foreach (var item in dic1[routeGroup.Key].Item2)
|
||||||
{
|
// {
|
||||||
var node = new RouteLineTreeOutput();
|
// var node = new RouteLineTreeOutput();
|
||||||
node.id = SnowflakeIdHelper.NextId();
|
// node.id = SnowflakeIdHelper.NextId();
|
||||||
node.parentId = dic1[routeGroup.Key].Item1.id;
|
// node.parentId = dic1[routeGroup.Key].Item1.id;
|
||||||
node.Name = $"{item.Key.RouteName}|{item.Key.RouteCode}";
|
// node.Name = $"{item.Key.RouteName}|{item.Key.RouteCode}";
|
||||||
node.RouteName = item.Key.RouteName;
|
// node.RouteName = item.Key.RouteName;
|
||||||
node.RouteCode = item.Key.RouteCode;
|
// node.RouteCode = item.Key.RouteCode;
|
||||||
nodes.Add(node);
|
// nodes.Add(node);
|
||||||
}
|
// }
|
||||||
result.AddRange(nodes);
|
// result.AddRange(nodes);
|
||||||
var dic2 = nodes.ToDictionary(x => x.Name, x => x.id);
|
// var dic2 = nodes.ToDictionary(x => x.Name, x => x.id);
|
||||||
foreach (var item in dic1[routeGroup.Key].Item2)
|
// foreach (var item in dic1[routeGroup.Key].Item2)
|
||||||
{
|
// {
|
||||||
if (dic2.ContainsKey($"{item.Key.RouteName}|{item.Key.RouteCode}"))
|
// if (dic2.ContainsKey($"{item.Key.RouteName}|{item.Key.RouteCode}"))
|
||||||
{
|
// {
|
||||||
result.AddRange(item.Select(x => new RouteLineTreeOutput
|
// result.AddRange(item.Select(x => new RouteLineTreeOutput
|
||||||
{
|
// {
|
||||||
id = SnowflakeIdHelper.NextId(),
|
// id = SnowflakeIdHelper.NextId(),
|
||||||
parentId = dic2[$"{item.Key.RouteName}|{item.Key.RouteCode}"],
|
// parentId = dic2[$"{item.Key.RouteName}|{item.Key.RouteCode}"],
|
||||||
Name = x.Version,
|
// Name = x.Version,
|
||||||
Version = x.Version,
|
// Version = x.Version,
|
||||||
}));
|
// }));
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
return new { list = result.ToTree() };
|
// return new { list = result.ToTree() };
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
@@ -9,7 +9,7 @@ namespace Tnb.ProductionPlanMgr.Entitys.Dto.WorkOrder
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 生产工单下发输入参数
|
/// 生产工单下发输入参数
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class WorkOrderIssueCrInput
|
public class MoCrInput
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 生产工单Id列表
|
/// 生产工单Id列表
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Tnb.ProductionMgr.Entitys.Entity;
|
||||||
|
|
||||||
|
namespace Tnb.ProductionMgr.Entitys.Dto.WorkOrder
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 模具列表输出参数
|
||||||
|
/// </summary>
|
||||||
|
public class MoldListOutput : Molds
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 产品 名称
|
||||||
|
/// </summary>
|
||||||
|
public string item_name { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Tnb.ProductionMgr.Entitys.Dto.PrdManage
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 生产操作记录查询参数
|
||||||
|
/// </summary>
|
||||||
|
public class PrdTaskOperInput
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 工单号
|
||||||
|
/// </summary>
|
||||||
|
public string mo_no { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 任务单号
|
||||||
|
/// </summary>
|
||||||
|
public string task_no { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 产品编号
|
||||||
|
/// </summary>
|
||||||
|
public string item_code { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 设备编号
|
||||||
|
/// </summary>
|
||||||
|
public string eqp_code { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 计划生产开始日期
|
||||||
|
/// </summary>
|
||||||
|
public DateTime? plan_start_date{ get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 计划生产结束日期
|
||||||
|
/// </summary>
|
||||||
|
public DateTime? plan_end_date { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 任务ID
|
||||||
|
/// </summary>
|
||||||
|
public string task_id { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Tnb.ProductionMgr.Entitys.Entity;
|
||||||
|
|
||||||
|
namespace Tnb.ProductionMgr.Entitys.Dto.PrdManage
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 生产操作记录输出类
|
||||||
|
/// </summary>
|
||||||
|
public class PrdTaskOperOutput : PrdTaskLog
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
///任务单操作状态
|
||||||
|
/// </summary>
|
||||||
|
public string statusName { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Tnb.ProductionMgr.Entitys.Dto.PrdManage
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 生产任务单下发输入参数
|
||||||
|
/// </summary>
|
||||||
|
public class PrdTaskReleaseUpInput
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 生产任务ID列表
|
||||||
|
/// </summary>
|
||||||
|
public List<string> TaskIds { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,201 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Tnb.ProductionMgr.Entitys.Dto.WorkOrder
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 生产工单排产输入参数
|
||||||
|
/// </summary>
|
||||||
|
public class ProductionSchedulingCrInput
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
public string id { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:工单类型 1、注塑/挤出工单 2、组装/包装工单
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public int? mo_type { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:计划开始时间
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public DateTime? plan_start_date { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:计划结束时间
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public DateTime? plan_end_date { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:预计开始时间
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public DateTime? estimated_start_date { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:预计结束时间
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public DateTime? estimated_end_date { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:生产任务单状态
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string status { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:工单Id
|
||||||
|
/// Default:NULL::character varying
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string mo_id { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:工单代码
|
||||||
|
/// Default:NULL::character varying
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string mo_code { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:模具Id
|
||||||
|
/// Default:NULL::character varying
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string mold_id { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 模具编号
|
||||||
|
/// </summary>
|
||||||
|
public string mold_code { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:模具名称
|
||||||
|
/// Default:NULL::character varying
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string mold_name { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:设备Id
|
||||||
|
/// Default:NULL::character varying
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string eqp_id { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 设备编号
|
||||||
|
/// </summary>
|
||||||
|
public string eqp_code { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:设备名称
|
||||||
|
/// Default:NULL::character varying
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string eqp_name { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:产线编号
|
||||||
|
/// Default:NULL::character varying
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string line_id { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:产线名称
|
||||||
|
/// Default:NULL::character varying
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string line_name { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:产品Id
|
||||||
|
/// Default:NULL::character varying
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string item_id { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 产品编号
|
||||||
|
/// </summary>
|
||||||
|
public string item_code { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:产品名称
|
||||||
|
/// Default:NULL::character varying
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string item_name { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 产品规格型号
|
||||||
|
/// </summary>
|
||||||
|
public string item_standard { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:创建用户
|
||||||
|
/// Default:NULL::character varying
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string create_id { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:修改用户
|
||||||
|
/// Default:NULL::character varying
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string modify_id { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:生产车间
|
||||||
|
/// Default:NULL::character varying
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string workshop { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:模穴数
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public int? mold_cavity_num { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:计划生产数量
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public int? plan_num { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:吨位
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public decimal? tonnage { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 已排产数量
|
||||||
|
/// </summary>
|
||||||
|
public int scheduled_num { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 设备型号
|
||||||
|
/// </summary>
|
||||||
|
public string eqp_type_code { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Tnb.ProductionMgr.Entitys.Entity;
|
||||||
|
|
||||||
|
namespace Tnb.ProductionMgr.Entitys.Dto.PrdManage
|
||||||
|
{
|
||||||
|
public class TaskOperRecordOutput
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 任务单状态名称
|
||||||
|
/// </summary>
|
||||||
|
public string statusName { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:工单Id
|
||||||
|
/// Default:NULL::character varying
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string mo_id { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 任务单号
|
||||||
|
/// </summary>
|
||||||
|
public string taskId { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:设备编号
|
||||||
|
/// Default:NULL::character varying
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string eqp_code { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 模具编号
|
||||||
|
/// </summary>
|
||||||
|
public string mold_code { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 产品型号
|
||||||
|
/// </summary>
|
||||||
|
public string item_code { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 操作人姓名
|
||||||
|
/// </summary>
|
||||||
|
public string operatorName { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,68 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Tnb.ProductionMgr.Entitys.Dto.WorkOrder
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// 生产工单排产输入参数
|
|
||||||
/// </summary>
|
|
||||||
public class ProductionSchedulingCrInput
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// 生产任务主键Id
|
|
||||||
/// </summary>
|
|
||||||
public string? Id { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// 工单类型 1、注塑/挤出 2、组装/包装
|
|
||||||
/// </summary>
|
|
||||||
public int MoType { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// 工单Id
|
|
||||||
/// </summary>
|
|
||||||
public int MoId { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// 产品编号
|
|
||||||
/// </summary>
|
|
||||||
public string ItemId { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// 产品名称
|
|
||||||
/// </summary>
|
|
||||||
public string ItemName { get; set; }
|
|
||||||
|
|
||||||
#region 注塑工单
|
|
||||||
/// <summary>
|
|
||||||
/// 模具Id
|
|
||||||
/// </summary>
|
|
||||||
public string MoldId { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// 模具名称
|
|
||||||
/// </summary>
|
|
||||||
public string MoldName { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// 设备Id
|
|
||||||
/// </summary>
|
|
||||||
public string EqpId { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// 设备名称
|
|
||||||
/// </summary>
|
|
||||||
public string EqpName { get; set; }
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region 组装包装工单
|
|
||||||
/// <summary>
|
|
||||||
/// 产线编号
|
|
||||||
/// </summary>
|
|
||||||
public string LineId { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// 产线名称
|
|
||||||
/// </summary>
|
|
||||||
public string LineName { get; set; }
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
132
ProductionMgr/Tnb.ProductionMgr.Entitys/Entity/BasItem.cs
Normal file
132
ProductionMgr/Tnb.ProductionMgr.Entitys/Entity/BasItem.cs
Normal file
@@ -0,0 +1,132 @@
|
|||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using SqlSugar;
|
||||||
|
|
||||||
|
namespace Tnb.ProductionMgr.Entitys.Entity
|
||||||
|
{
|
||||||
|
///<summary>
|
||||||
|
///产品信息
|
||||||
|
///</summary>
|
||||||
|
[SugarTable("bas_item")]
|
||||||
|
public partial class BasItem
|
||||||
|
{
|
||||||
|
public BasItem(){
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:主键
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:False
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(IsPrimaryKey=true)]
|
||||||
|
public string id {get;set;}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:产品代码
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:False
|
||||||
|
/// </summary>
|
||||||
|
public string item_code {get;set;}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:产品分类ID
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:False
|
||||||
|
/// </summary>
|
||||||
|
public string categoryid {get;set;}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:关联比例
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public decimal? relation_ratio {get;set;}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:创建时间
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public DateTime? create_time {get;set;}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:修改时间
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public DateTime? modify_time {get;set;}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:扩展字段
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string extras {get;set;}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:所属组织ID
|
||||||
|
/// Default:NULL::character varying
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string org_id {get;set;}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:产品名称
|
||||||
|
/// Default:NULL::character varying
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string item_name {get;set;}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:产品规格型号
|
||||||
|
/// Default:NULL::character varying
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string item_standard {get;set;}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:物料ID,BAS_MATERIAL.ID
|
||||||
|
/// Default:NULL::character varying
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string material_id {get;set;}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:产品类型: 半成品:SemiManufacture 成品:FinishedProduct
|
||||||
|
/// Default:NULL::character varying
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string item_type {get;set;}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:备注
|
||||||
|
/// Default:NULL::character varying
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string remark {get;set;}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:时间戳(用于并发控制)
|
||||||
|
/// Default:NULL::character varying
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string timestamp {get;set;}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:创建用户
|
||||||
|
/// Default:NULL::character varying
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string create_id {get;set;}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:修改用户
|
||||||
|
/// Default:NULL::character varying
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string modify_id {get;set;}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
186
ProductionMgr/Tnb.ProductionMgr.Entitys/Entity/Molds.cs
Normal file
186
ProductionMgr/Tnb.ProductionMgr.Entitys/Entity/Molds.cs
Normal file
@@ -0,0 +1,186 @@
|
|||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using SqlSugar;
|
||||||
|
|
||||||
|
namespace Tnb.ProductionMgr.Entitys.Entity
|
||||||
|
{
|
||||||
|
///<summary>
|
||||||
|
///模具信息表
|
||||||
|
///</summary>
|
||||||
|
[SugarTable("tool_molds")]
|
||||||
|
public partial class Molds
|
||||||
|
{
|
||||||
|
public Molds()
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:主键
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:False
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(IsPrimaryKey = true)]
|
||||||
|
public string id { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:生产模数
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public int? production_modulus { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:保养模次
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public int? maintain_num { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:日定额
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public decimal? daily_rate { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:工时定额(H/PCS)
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public decimal? hour_norm { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:成长周期
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public int? growth_cycle { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:型腔数
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public int? cavity_num { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:模具寿命
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public int? mold_life { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:备注
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string remark { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:创建时间
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public DateTime? create_time { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:修改时间
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public DateTime? modify_time { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:扩展字段
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string extras { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:模具编号
|
||||||
|
/// Default:NULL::character varying
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string mold_code { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:模具名称
|
||||||
|
/// Default:NULL::character varying
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string mold_name { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:产品Id
|
||||||
|
/// Default:NULL::character varying
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string item_id { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 产品code
|
||||||
|
/// </summary>
|
||||||
|
public string item_code { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:设备Id
|
||||||
|
/// Default:NULL::character varying
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string eqp_id { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:设备代码
|
||||||
|
/// Default:NULL::character varying
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string eqp_code { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:磨具使用状态
|
||||||
|
/// Default:NULL::character varying
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string mold_status { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:模具剩余寿命
|
||||||
|
/// Default:NULL::character varying
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string mold_remaining_life { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:库房编号
|
||||||
|
/// Default:NULL::character varying
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string warehosue_id { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:库位编号
|
||||||
|
/// Default:NULL::character varying
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string location_id { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:创建用户
|
||||||
|
/// Default:NULL::character varying
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string create_id { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:修改用户
|
||||||
|
/// Default:NULL::character varying
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string modify_id { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
326
ProductionMgr/Tnb.ProductionMgr.Entitys/Entity/PrdMo.cs
Normal file
326
ProductionMgr/Tnb.ProductionMgr.Entitys/Entity/PrdMo.cs
Normal file
@@ -0,0 +1,326 @@
|
|||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using SqlSugar;
|
||||||
|
|
||||||
|
namespace Tnb.ProductionMgr.Entitys.Entity
|
||||||
|
{
|
||||||
|
///<summary>
|
||||||
|
///MES生产工单
|
||||||
|
///</summary>
|
||||||
|
[SugarTable("prd_mo")]
|
||||||
|
public partial class PrdMo
|
||||||
|
{
|
||||||
|
public PrdMo()
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:Id
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:False
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(IsPrimaryKey = true)]
|
||||||
|
public string id { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:工单代码
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:False
|
||||||
|
/// </summary>
|
||||||
|
public string mo_code { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 产品ID
|
||||||
|
/// </summary>
|
||||||
|
//public string item_id { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:产品代码, BAS_MATERIA.MATERIALCODE BAS_ITEM.ITEMCODE
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:False
|
||||||
|
/// </summary>
|
||||||
|
public string item_code { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:工单类型:1-正常工单、2-返工工单、3-试制工单
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:False
|
||||||
|
/// </summary>
|
||||||
|
public string mo_type { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:生产状态 Initial: 初始, Confirm:确认 Release: 下发, Open: 生产中, Close: 关单, Pending: 暂停
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:False
|
||||||
|
/// </summary>
|
||||||
|
public string mo_status { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:生产数量
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:False
|
||||||
|
/// </summary>
|
||||||
|
public decimal plan_qty { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:已投入数量
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public decimal? input_qty { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:已完工数量
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public decimal? complete_qty { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:报废数量
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public decimal? scrap_qty { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:计划开始时间
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:False
|
||||||
|
/// </summary>
|
||||||
|
public DateTime plan_start_date { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:计划结束时间
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:False
|
||||||
|
/// </summary>
|
||||||
|
public DateTime plan_end_date { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:实际开工日期
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public DateTime? act_start_date { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:实际完工日期
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public DateTime? act_end_date { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:订单行号
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public int? order_seq { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:关联比例
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public decimal? relation_ratio { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:下发日期
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public DateTime? mo_down_date { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:排程开始时间
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public DateTime? seduling_start_date { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:排程结束时间
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public DateTime? seduling_end_date { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:是否生派工单
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public int? is_create_dispatch { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:子工单序号(1开始,最大+1,不强制连续)
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public int? seq { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:租户ID
|
||||||
|
/// Default:NULL::character varying
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string tenant_id { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:ismerge
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public int? is_merge { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:创建时间
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public DateTime? create_time { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:修改时间
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public DateTime? modify_time { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:扩展字段
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string extras { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:所属组织ID
|
||||||
|
/// Default:NULL::character varying
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string org_id { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:产品附属信息
|
||||||
|
/// Default:NULL::character varying
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string item_attribute { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:生产部门ID
|
||||||
|
/// Default:NULL::character varying
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string dept_id { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:客户代码
|
||||||
|
/// Default:NULL::character varying
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string customer_code { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:订单号
|
||||||
|
/// Default:NULL::character varying
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string order_no { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:BOM版本
|
||||||
|
/// Default:NULL::character varying
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string bom_version { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:下发人员ID
|
||||||
|
/// Default:NULL::character varying
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string mo_down_user_id { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:下发人员名称
|
||||||
|
/// Default:NULL::character varying
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string mo_down_user_name { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:备注
|
||||||
|
/// Default:NULL::character varying
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string remark { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:工作中心代码
|
||||||
|
/// Default:NULL::character varying
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string work_center_code { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:主工单代码
|
||||||
|
/// Default:NULL::character varying
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string parent_mo_code { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:数据来源 10-计划,20-插入,30-导入
|
||||||
|
/// Default:NULL::character varying
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string data_sources { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:产线代码
|
||||||
|
/// Default:NULL::character varying
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string production_linecode { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:组合工单
|
||||||
|
/// Default:NULL::character varying
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string combine_mo_code { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:时间戳
|
||||||
|
/// Default:NULL::character varying
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string time_stamp { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:创建用户
|
||||||
|
/// Default:NULL::character varying
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string create_id { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:修改用户
|
||||||
|
/// Default:NULL::character varying
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string modify_id { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:工单组号
|
||||||
|
/// Default:NULL::character varying
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string mo_group_no { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,239 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using SqlSugar;
|
|
||||||
using Tnb.Common.Contracts;
|
|
||||||
|
|
||||||
namespace Tnb.ProductionMgr.Entitys.Entity
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// MES生产工单
|
|
||||||
///</summary>
|
|
||||||
[SugarTable("prd_mo")]
|
|
||||||
public class PrdMoEntity : BaseEntity<string>
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// 租户ID
|
|
||||||
/// 默认值: NULL::character varying
|
|
||||||
///</summary>
|
|
||||||
[SugarColumn(ColumnName = "tenant_id")]
|
|
||||||
public string TenantId { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// 所属组织ID
|
|
||||||
/// 默认值: NULL::character varying
|
|
||||||
///</summary>
|
|
||||||
[SugarColumn(ColumnName = "org_id")]
|
|
||||||
public string OrgId { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// 工单代码
|
|
||||||
///</summary>
|
|
||||||
[SugarColumn(ColumnName = "mo_code")]
|
|
||||||
public string MoCode { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// 产品代码, BAS_MATERIA.MATERIALCODE BAS_ITEM.ITEMCODE
|
|
||||||
///</summary>
|
|
||||||
[SugarColumn(ColumnName = "item_code")]
|
|
||||||
public string ItemCode { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// 产品附属信息
|
|
||||||
/// 默认值: NULL::character varying
|
|
||||||
///</summary>
|
|
||||||
[SugarColumn(ColumnName = "item_attribute")]
|
|
||||||
public string ItemAttribute { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// 工单类型:1-正常工单、2-返工工单、3-试制工单
|
|
||||||
///</summary>
|
|
||||||
[SugarColumn(ColumnName = "mo_type")]
|
|
||||||
public string MoType { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// 生产状态 Initial: 初始, Confirm:确认 Release: 下发, Open: 生产中, Close: 关单, Pending: 暂停
|
|
||||||
///</summary>
|
|
||||||
[SugarColumn(ColumnName = "mo_status")]
|
|
||||||
public string MoStatus { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// 生产数量
|
|
||||||
///</summary>
|
|
||||||
[SugarColumn(ColumnName = "plan_qty")]
|
|
||||||
public decimal PlanQty { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// 已投入数量
|
|
||||||
///</summary>
|
|
||||||
[SugarColumn(ColumnName = "input_qty")]
|
|
||||||
public decimal? InputQty { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// 已完工数量
|
|
||||||
///</summary>
|
|
||||||
[SugarColumn(ColumnName = "complete_qty")]
|
|
||||||
public decimal? CompleteQty { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// 报废数量
|
|
||||||
///</summary>
|
|
||||||
[SugarColumn(ColumnName = "scrap_qty")]
|
|
||||||
public decimal? ScrapQty { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// 计划开始时间
|
|
||||||
///</summary>
|
|
||||||
[SugarColumn(ColumnName = "plan_start_date")]
|
|
||||||
public DateTime PlanStartDate { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// 计划结束时间
|
|
||||||
///</summary>
|
|
||||||
[SugarColumn(ColumnName = "plan_end_date")]
|
|
||||||
public DateTime PlanEndDate { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// 实际开工日期
|
|
||||||
///</summary>
|
|
||||||
[SugarColumn(ColumnName = "act_start_date")]
|
|
||||||
public DateTime? ActStartDate { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// 实际完工日期
|
|
||||||
///</summary>
|
|
||||||
[SugarColumn(ColumnName = "act_end_date")]
|
|
||||||
public DateTime? ActEndDate { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// 生产部门ID
|
|
||||||
/// 默认值: NULL::character varying
|
|
||||||
///</summary>
|
|
||||||
[SugarColumn(ColumnName = "dept_id")]
|
|
||||||
public string DeptId { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// 客户代码
|
|
||||||
/// 默认值: NULL::character varying
|
|
||||||
///</summary>
|
|
||||||
[SugarColumn(ColumnName = "customer_code")]
|
|
||||||
public string CustomerCode { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// 订单号
|
|
||||||
/// 默认值: NULL::character varying
|
|
||||||
///</summary>
|
|
||||||
[SugarColumn(ColumnName = "order_no")]
|
|
||||||
public string OrderNo { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// 订单行号
|
|
||||||
///</summary>
|
|
||||||
[SugarColumn(ColumnName = "order_seq")]
|
|
||||||
public int? OrderSeq { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// BOM版本
|
|
||||||
/// 默认值: NULL::character varying
|
|
||||||
///</summary>
|
|
||||||
[SugarColumn(ColumnName = "bom_version")]
|
|
||||||
public string BomVersion { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// 关联比例
|
|
||||||
///</summary>
|
|
||||||
[SugarColumn(ColumnName = "relation_ratio")]
|
|
||||||
public decimal? RelationRatio { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// 下发人员ID
|
|
||||||
/// 默认值: NULL::character varying
|
|
||||||
///</summary>
|
|
||||||
[SugarColumn(ColumnName = "mo_down_user_id")]
|
|
||||||
public string MoDownUserId { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// 下发人员名称
|
|
||||||
/// 默认值: NULL::character varying
|
|
||||||
///</summary>
|
|
||||||
[SugarColumn(ColumnName = "mo_down_user_name")]
|
|
||||||
public string MoDownUserName { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// 下发日期
|
|
||||||
///</summary>
|
|
||||||
[SugarColumn(ColumnName = "mo_down_date")]
|
|
||||||
public DateTime? MoDownDate { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// 备注
|
|
||||||
/// 默认值: NULL::character varying
|
|
||||||
///</summary>
|
|
||||||
[SugarColumn(ColumnName = "remark")]
|
|
||||||
public string Remark { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// 工作中心代码
|
|
||||||
/// 默认值: NULL::character varying
|
|
||||||
///</summary>
|
|
||||||
[SugarColumn(ColumnName = "work_center_code")]
|
|
||||||
public string WorkCenterCode { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// 主工单代码
|
|
||||||
/// 默认值: NULL::character varying
|
|
||||||
///</summary>
|
|
||||||
[SugarColumn(ColumnName = "parent_mo_code")]
|
|
||||||
public string ParentMoCode { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// 排程开始时间
|
|
||||||
///</summary>
|
|
||||||
[SugarColumn(ColumnName = "seduling_start_date")]
|
|
||||||
public DateTime? SedulingStartDate { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// 排程结束时间
|
|
||||||
///</summary>
|
|
||||||
[SugarColumn(ColumnName = "seduling_end_date")]
|
|
||||||
public DateTime? SedulingEndDate { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// 是否生派工单
|
|
||||||
///</summary>
|
|
||||||
[SugarColumn(ColumnName = "is_create_dispatch")]
|
|
||||||
public int? IsCreateDispatch { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// 子工单序号(1开始,最大+1,不强制连续)
|
|
||||||
///</summary>
|
|
||||||
[SugarColumn(ColumnName = "seq")]
|
|
||||||
public int? Seq { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// 数据来源 10-计划,20-插入,30-导入
|
|
||||||
/// 默认值: NULL::character varying
|
|
||||||
///</summary>
|
|
||||||
[SugarColumn(ColumnName = "data_sources")]
|
|
||||||
public string DataSources { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// 产线代码
|
|
||||||
/// 默认值: NULL::character varying
|
|
||||||
///</summary>
|
|
||||||
[SugarColumn(ColumnName = "production_linecode")]
|
|
||||||
public string ProductionLinecode { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// ismerge
|
|
||||||
///</summary>
|
|
||||||
[SugarColumn(ColumnName = "is_merge")]
|
|
||||||
public int? IsMerge { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// 组合工单
|
|
||||||
/// 默认值: NULL::character varying
|
|
||||||
///</summary>
|
|
||||||
[SugarColumn(ColumnName = "combine_mo_code")]
|
|
||||||
public string CombineMoCode { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// 时间戳
|
|
||||||
/// 默认值: NULL::character varying
|
|
||||||
///</summary>
|
|
||||||
[SugarColumn(ColumnName = "time_stamp")]
|
|
||||||
public string TimeStamp { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// 创建用户
|
|
||||||
/// 默认值: NULL::character varying
|
|
||||||
///</summary>
|
|
||||||
[SugarColumn(ColumnName = "create_id")]
|
|
||||||
public string CreateId { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// 创建时间
|
|
||||||
///</summary>
|
|
||||||
[SugarColumn(ColumnName = "create_time")]
|
|
||||||
public DateTime? CreateTime { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// 修改用户
|
|
||||||
/// 默认值: NULL::character varying
|
|
||||||
///</summary>
|
|
||||||
[SugarColumn(ColumnName = "modify_id")]
|
|
||||||
public string ModifyId { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// 修改时间
|
|
||||||
///</summary>
|
|
||||||
[SugarColumn(ColumnName = "modify_time")]
|
|
||||||
public DateTime? ModifyTime { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// 扩展字段
|
|
||||||
///</summary>
|
|
||||||
[SugarColumn(ColumnName = "extras")]
|
|
||||||
public string Extras { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -11,193 +11,209 @@ namespace Tnb.ProductionMgr.Entitys.Entity
|
|||||||
[SugarTable("prd_task")]
|
[SugarTable("prd_task")]
|
||||||
public partial class PrdTask
|
public partial class PrdTask
|
||||||
{
|
{
|
||||||
public PrdTask(){
|
public PrdTask()
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Desc:主键
|
/// Desc:主键
|
||||||
/// Default:
|
/// Default:
|
||||||
/// Nullable:False
|
/// Nullable:False
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[SugarColumn(IsPrimaryKey=true,ColumnName="id")]
|
[SugarColumn(IsPrimaryKey = true)]
|
||||||
public string Id {get;set;}
|
public string id { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Desc:工单类型 1、注塑/挤出工单 2、组装/包装工单
|
/// Desc:工单类型 1、注塑/挤出工单 2、组装/包装工单
|
||||||
/// Default:
|
/// Default:
|
||||||
/// Nullable:True
|
/// Nullable:True
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[SugarColumn(ColumnName="mo_type")]
|
public int? mo_type { get; set; }
|
||||||
public int? MoType {get;set;}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Desc:计划开始时间
|
/// Desc:计划开始时间
|
||||||
/// Default:
|
/// Default:
|
||||||
/// Nullable:True
|
/// Nullable:True
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[SugarColumn(ColumnName="plan_start_date")]
|
public DateTime? plan_start_date { get; set; }
|
||||||
public DateTime? PlanStartDate {get;set;}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Desc:计划结束时间
|
/// Desc:计划结束时间
|
||||||
/// Default:
|
/// Default:
|
||||||
/// Nullable:True
|
/// Nullable:True
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[SugarColumn(ColumnName="plan_end_date")]
|
public DateTime? plan_end_date { get; set; }
|
||||||
public DateTime? PlanEndDate {get;set;}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Desc:预计开始时间
|
/// Desc:预计开始时间
|
||||||
/// Default:
|
/// Default:
|
||||||
/// Nullable:True
|
/// Nullable:True
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[SugarColumn(ColumnName="estimated_start_date")]
|
public DateTime? estimated_start_date { get; set; }
|
||||||
public DateTime? EstimatedStartDate {get;set;}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Desc:预计结束时间
|
/// Desc:预计结束时间
|
||||||
/// Default:
|
/// Default:
|
||||||
/// Nullable:True
|
/// Nullable:True
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[SugarColumn(ColumnName="estimated_end_date")]
|
public DateTime? estimated_end_date { get; set; }
|
||||||
public DateTime? EstimatedEndDate {get;set;}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Desc:实际开工时间
|
/// Desc:实际开工时间
|
||||||
/// Default:
|
/// Default:
|
||||||
/// Nullable:True
|
/// Nullable:True
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[SugarColumn(ColumnName="start_date")]
|
public DateTime? start_date { get; set; }
|
||||||
public DateTime? StartDate {get;set;}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Desc:实际完工时间
|
/// Desc:实际完工时间
|
||||||
/// Default:
|
/// Default:
|
||||||
/// Nullable:True
|
/// Nullable:True
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[SugarColumn(ColumnName="end_date")]
|
public DateTime? end_date { get; set; }
|
||||||
public DateTime? EndDate {get;set;}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Desc:创建时间
|
/// Desc:创建时间
|
||||||
/// Default:
|
/// Default:
|
||||||
/// Nullable:True
|
/// Nullable:True
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[SugarColumn(ColumnName="create_time")]
|
public DateTime? create_time { get; set; }
|
||||||
public DateTime? CreateTime {get;set;}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Desc:修改时间
|
/// Desc:修改时间
|
||||||
/// Default:
|
/// Default:
|
||||||
/// Nullable:True
|
/// Nullable:True
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[SugarColumn(ColumnName="modify_time")]
|
public DateTime? modify_time { get; set; }
|
||||||
public DateTime? ModifyTime {get;set;}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Desc:扩展字段
|
/// Desc:扩展字段
|
||||||
/// Default:
|
/// Default:
|
||||||
/// Nullable:True
|
/// Nullable:True
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[SugarColumn(ColumnName="extras")]
|
public string extras { get; set; }
|
||||||
public string Extras {get;set;}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Desc:工单Id
|
/// Desc:模穴数
|
||||||
/// Default:NULL::character varying
|
/// Default:
|
||||||
/// Nullable:True
|
/// Nullable:True
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[SugarColumn(ColumnName="mo_id")]
|
public int? mold_cavity_num { get; set; }
|
||||||
public string MoId {get;set;}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Desc:工单代码
|
/// Desc:计划生产数量
|
||||||
/// Default:NULL::character varying
|
/// Default:
|
||||||
/// Nullable:True
|
/// Nullable:True
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[SugarColumn(ColumnName="mo_code")]
|
public int? plan_num { get; set; }
|
||||||
public string MoCode {get;set;}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Desc:模具Id
|
/// Desc:完成数量
|
||||||
/// Default:NULL::character varying
|
/// Default:
|
||||||
/// Nullable:True
|
/// Nullable:True
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[SugarColumn(ColumnName="mold_id")]
|
public int? comple_num { get; set; }
|
||||||
public string MoldId {get;set;}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Desc:模具名称
|
/// Desc:吨位
|
||||||
/// Default:NULL::character varying
|
/// Default:
|
||||||
/// Nullable:True
|
/// Nullable:True
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[SugarColumn(ColumnName="mold_name")]
|
public decimal? tonnage { get; set; }
|
||||||
public string MoldName {get;set;}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Desc:设备Id
|
/// Desc:已排产数
|
||||||
/// Default:NULL::character varying
|
/// Default:
|
||||||
/// Nullable:True
|
/// Nullable:True
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[SugarColumn(ColumnName="eqp_id")]
|
public int? scheduled_num { get; set; }
|
||||||
public string EqpId {get;set;}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Desc:设备名称
|
/// Desc:工单Id
|
||||||
/// Default:NULL::character varying
|
/// Default:NULL::character varying
|
||||||
/// Nullable:True
|
/// Nullable:True
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[SugarColumn(ColumnName="eqp_name")]
|
public string mo_id { get; set; }
|
||||||
public string EqpName {get;set;}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Desc:产线编号
|
/// Desc:模具Id
|
||||||
/// Default:NULL::character varying
|
/// Default:NULL::character varying
|
||||||
/// Nullable:True
|
/// Nullable:True
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[SugarColumn(ColumnName="line_id")]
|
public string mold_id { get; set; }
|
||||||
public string LineId {get;set;}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Desc:产线名称
|
/// Desc:设备Id
|
||||||
/// Default:NULL::character varying
|
/// Default:NULL::character varying
|
||||||
/// Nullable:True
|
/// Nullable:True
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[SugarColumn(ColumnName="line_name")]
|
public string eqp_id { get; set; }
|
||||||
public string LineName {get;set;}
|
/// <summary>
|
||||||
|
/// 设备型号
|
||||||
|
/// </summary>
|
||||||
|
public string eqp_type_code { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Desc:产品Id
|
/// Desc:产线编号
|
||||||
/// Default:NULL::character varying
|
/// Default:NULL::character varying
|
||||||
/// Nullable:True
|
/// Nullable:True
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[SugarColumn(ColumnName="item_id")]
|
public string line_id { get; set; }
|
||||||
public string ItemId {get;set;}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Desc:产品名称
|
/// Desc:产品Id
|
||||||
/// Default:NULL::character varying
|
/// Default:NULL::character varying
|
||||||
/// Nullable:True
|
/// Nullable:True
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[SugarColumn(ColumnName="item_name")]
|
public string item_id { get; set; }
|
||||||
public string ItemName {get;set;}
|
/// <summary>
|
||||||
|
/// 产品编号
|
||||||
|
/// </summary>
|
||||||
|
public string item_code { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 产品规格型号
|
||||||
|
/// </summary>
|
||||||
|
public string item_standard { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Desc:创建用户
|
/// Desc:创建用户
|
||||||
/// Default:NULL::character varying
|
/// Default:NULL::character varying
|
||||||
/// Nullable:True
|
/// Nullable:True
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[SugarColumn(ColumnName="create_id")]
|
public string create_id { get; set; }
|
||||||
public string CreateId {get;set;}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Desc:修改用户
|
/// Desc:修改用户
|
||||||
/// Default:NULL::character varying
|
/// Default:NULL::character varying
|
||||||
/// Nullable:True
|
/// Nullable:True
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[SugarColumn(ColumnName="modify_id")]
|
public string modify_id { get; set; }
|
||||||
public string ModifyId {get;set;}
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:生产任务单状态
|
||||||
|
/// Default:NULL::character varying
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string status { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:生产车间
|
||||||
|
/// Default:NULL::character varying
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string workshop { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:操作人姓名
|
||||||
|
/// Default:NULL::character varying
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string operator_name { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 生产任务ID
|
||||||
|
/// </summary>
|
||||||
|
public string prd_task_id { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
108
ProductionMgr/Tnb.ProductionMgr.Entitys/Entity/PrdTaskLog.cs
Normal file
108
ProductionMgr/Tnb.ProductionMgr.Entitys/Entity/PrdTaskLog.cs
Normal file
@@ -0,0 +1,108 @@
|
|||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using SqlSugar;
|
||||||
|
|
||||||
|
namespace Tnb.ProductionMgr.Entitys.Entity
|
||||||
|
{
|
||||||
|
///<summary>
|
||||||
|
///生产任务操作记录
|
||||||
|
///</summary>
|
||||||
|
[SugarTable("prd_task_log")]
|
||||||
|
public partial class PrdTaskLog
|
||||||
|
{
|
||||||
|
public PrdTaskLog(){
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:主键
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:False
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(IsPrimaryKey=true)]
|
||||||
|
public string id {get;set;}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:创建时间
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public DateTime? create_time {get;set;}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:扩展字段
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string extras {get;set;}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:工单号
|
||||||
|
/// Default:NULL::character varying
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string mo_code {get;set;}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:设备编号
|
||||||
|
/// Default:NULL::character varying
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string eqp_code {get;set;}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:模具编号
|
||||||
|
/// Default:NULL::character varying
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string mold_code {get;set;}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:产品编号
|
||||||
|
/// Default:NULL::character varying
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string item_code {get;set;}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:产品规格型号
|
||||||
|
/// Default:NULL::character varying
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string item_standard {get;set;}
|
||||||
|
|
||||||
|
///// <summary>
|
||||||
|
///// Desc:设备型号
|
||||||
|
///// Default:NULL::character varying
|
||||||
|
///// Nullable:True
|
||||||
|
///// </summary>
|
||||||
|
//public string eqp_type_code {get;set;}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:任务单状态
|
||||||
|
/// Default:NULL::character varying
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string? status {get;set;}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:操作人姓名
|
||||||
|
/// Default:NULL::character varying
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string operator_name {get;set;}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:创建用户
|
||||||
|
/// Default:NULL::character varying
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string create_id {get;set;}
|
||||||
|
/// <summary>
|
||||||
|
/// 生产任务ID
|
||||||
|
/// </summary>
|
||||||
|
public string task_id { get;set;}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -7,6 +7,6 @@ namespace Tnb.ProductionPlanMgr.Interfaces
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IPrdMoService
|
public interface IPrdMoService
|
||||||
{
|
{
|
||||||
Task<dynamic> WorkOrderIssue(WorkOrderIssueCrInput input);
|
Task<dynamic> WorkOrderIssue(MoCrInput input);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,14 +1,20 @@
|
|||||||
using JNPF.Common.Core.Manager;
|
using System.Dynamic;
|
||||||
|
using Aop.Api.Domain;
|
||||||
|
using JNPF.Common.Core.Manager;
|
||||||
using JNPF.Common.Extension;
|
using JNPF.Common.Extension;
|
||||||
|
using JNPF.Common.Filter;
|
||||||
using JNPF.Common.Security;
|
using JNPF.Common.Security;
|
||||||
using JNPF.DependencyInjection;
|
using JNPF.DependencyInjection;
|
||||||
using JNPF.DynamicApiController;
|
using JNPF.DynamicApiController;
|
||||||
|
using JNPF.Logging;
|
||||||
using JNPF.Systems.Entitys.System;
|
using JNPF.Systems.Entitys.System;
|
||||||
|
using JNPF.Systems.Interfaces.System;
|
||||||
using Mapster;
|
using Mapster;
|
||||||
using Microsoft.AspNetCore.Authorization;
|
using Microsoft.AspNetCore.Authorization;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using NPOI.OpenXmlFormats.Shared;
|
using NPOI.OpenXmlFormats.Shared;
|
||||||
using SqlSugar;
|
using SqlSugar;
|
||||||
|
using Tnb.ProductionMgr.Entitys.Dto.PrdManage;
|
||||||
using Tnb.ProductionMgr.Entitys.Dto.WorkOrder;
|
using Tnb.ProductionMgr.Entitys.Dto.WorkOrder;
|
||||||
using Tnb.ProductionMgr.Entitys.Entity;
|
using Tnb.ProductionMgr.Entitys.Entity;
|
||||||
using Tnb.ProductionPlanMgr.Entitys.Dto.WorkOrder;
|
using Tnb.ProductionPlanMgr.Entitys.Dto.WorkOrder;
|
||||||
@@ -23,12 +29,22 @@ namespace Tnb.ProductionPlanMgr
|
|||||||
[Route("api/production/[controller]")]
|
[Route("api/production/[controller]")]
|
||||||
public class PrdMoService : IPrdMoService, IDynamicApiController, ITransient
|
public class PrdMoService : IPrdMoService, IDynamicApiController, ITransient
|
||||||
{
|
{
|
||||||
private readonly ISqlSugarRepository<PrdMoEntity> _repository;
|
private readonly ISqlSugarRepository<PrdMo> _repository;
|
||||||
private readonly IDataBaseManager _dataBaseManager;
|
private readonly IDataBaseManager _dataBaseManager;
|
||||||
public PrdMoService(ISqlSugarRepository<PrdMoEntity> repository, IDataBaseManager dataBaseManager)
|
private readonly IUserManager _userManager;
|
||||||
|
private readonly IDictionaryDataService _dictionaryDataService;
|
||||||
|
|
||||||
|
public PrdMoService(
|
||||||
|
ISqlSugarRepository<PrdMo> repository,
|
||||||
|
IDataBaseManager dataBaseManager,
|
||||||
|
IUserManager userManager,
|
||||||
|
IDictionaryDataService dictionaryDataService
|
||||||
|
)
|
||||||
{
|
{
|
||||||
_repository = repository;
|
_repository = repository;
|
||||||
_dataBaseManager = dataBaseManager;
|
_dataBaseManager = dataBaseManager;
|
||||||
|
_userManager = userManager;
|
||||||
|
_dictionaryDataService = dictionaryDataService;
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 生产工单创建-生产工单下发
|
/// 生产工单创建-生产工单下发
|
||||||
@@ -36,42 +52,220 @@ namespace Tnb.ProductionPlanMgr
|
|||||||
/// <param name="input">生产工单下发输入参数</param>
|
/// <param name="input">生产工单下发输入参数</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPut("workorder-issue")]
|
[HttpPut("workorder-issue")]
|
||||||
public async Task<dynamic> WorkOrderIssue(WorkOrderIssueCrInput input)
|
public async Task<dynamic> WorkOrderIssue(MoCrInput input)
|
||||||
{
|
{
|
||||||
if (input is null)
|
if (input is null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException(nameof(input));
|
throw new ArgumentNullException(nameof(input));
|
||||||
}
|
}
|
||||||
var db = await GetDbContext();
|
var db = _repository.AsSugarClient();
|
||||||
var row = await db.Updateable<PrdMoEntity>()
|
var row = await db.Updateable<PrdMo>()
|
||||||
.SetColumns(it => new PrdMoEntity { MoStatus = "25019232867093" })
|
.SetColumns(it => new PrdMo { mo_status = "25019232867093" })
|
||||||
.Where(it => input.WorkOrderIds.Contains(it.Id))
|
.Where(it => input.WorkOrderIds.Contains(it.id))
|
||||||
.ExecuteCommandAsync();
|
.ExecuteCommandAsync();
|
||||||
return (row > 0);
|
return (row > 0);
|
||||||
}
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 关联同组工单
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="input">关联同组工单输入参数</param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost("relevancy")]
|
||||||
|
public async Task<dynamic> RelevancySameGroupMo(MoCrInput input)
|
||||||
|
{
|
||||||
|
var row = -1;
|
||||||
|
var list = await _repository.AsSugarClient().Queryable<PrdMo>()
|
||||||
|
.InnerJoin<Molds>((a, b) => a.item_code == b.item_code)
|
||||||
|
.Where((a, b) => input.WorkOrderIds.Contains(a.id))
|
||||||
|
.Select((a, b) => new
|
||||||
|
{
|
||||||
|
planDate = a.plan_start_date,
|
||||||
|
moldId = b.id,
|
||||||
|
}).ToListAsync();
|
||||||
|
if (list?.Count > 0)
|
||||||
|
{
|
||||||
|
var planDate = list.FirstOrDefault()?.planDate;
|
||||||
|
var moId = list.FirstOrDefault()?.moldId;
|
||||||
|
|
||||||
|
var all = list.Skip(1).All(x => x.planDate == planDate && x.moldId == moId);
|
||||||
|
if (all)
|
||||||
|
{
|
||||||
|
var groupId = SnowflakeIdHelper.NextId();
|
||||||
|
row = await _repository.AsSugarClient().Updateable<PrdMo>()
|
||||||
|
.SetColumns(c => new PrdMo { mo_group_no = groupId })
|
||||||
|
.Where(it => input.WorkOrderIds.Contains(it.id))
|
||||||
|
.ExecuteCommandAsync();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return row > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 生产工单-生产排产
|
/// 生产工单-生产排产
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="input"></param>
|
/// <param name="input">
|
||||||
|
///<br/>{
|
||||||
|
///<br/> Id:生产任务主键Id
|
||||||
|
///<br/> MoType:工单类型 1、注塑/挤出 2、组装/包装
|
||||||
|
///<br/> MoId:工单Id
|
||||||
|
///<br/> ItemId:产品编号
|
||||||
|
///<br/> ItemName:产品名称
|
||||||
|
///<br/> MoldId:模具Id
|
||||||
|
///<br/> MoldName:模具名称
|
||||||
|
///<br/> EqpId:设备Id
|
||||||
|
///<br/> EqpName:设备名称
|
||||||
|
///<br/> LineId:产线编号
|
||||||
|
///<br/> LineName:产线名称
|
||||||
|
///<br/>}
|
||||||
|
/// </param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
|
|
||||||
[HttpPost("scheduling")]
|
[HttpPost("scheduling")]
|
||||||
public async Task<dynamic> ProductionScheduling(ProductionSchedulingCrInput input)
|
public async Task<dynamic> ProductionScheduling(ProductionSchedulingCrInput input)
|
||||||
{
|
{
|
||||||
var entity = input.Adapt<PrdTask>();
|
var row = -1;
|
||||||
entity.Id = input.Id ?? SnowflakeIdHelper.NextId();
|
if (input.mo_type.HasValue && input.mo_type.Value == 1)
|
||||||
var db = await GetDbContext();
|
{
|
||||||
var row = await db.Storageable(entity).ExecuteCommandAsync();
|
input.id ??= SnowflakeIdHelper.NextId();
|
||||||
|
var entity = input.Adapt<PrdTask>();
|
||||||
|
entity.status = "ToBeScheduled"; //任务单状态默认,待排产
|
||||||
|
entity.create_id = _userManager.UserId;
|
||||||
|
entity.create_time = DateTime.Now;
|
||||||
|
|
||||||
|
var db = _repository.AsSugarClient();
|
||||||
|
try
|
||||||
|
{
|
||||||
|
await db.Ado.BeginTranAsync();
|
||||||
|
|
||||||
|
row = await db.Storageable(entity).ExecuteCommandAsync();
|
||||||
|
var taskLogEntity = input.Adapt<PrdTaskLog>();
|
||||||
|
taskLogEntity.id ??= SnowflakeIdHelper.NextId();
|
||||||
|
taskLogEntity.task_id = input.id;
|
||||||
|
taskLogEntity.status ??= "ToBeStarted";
|
||||||
|
taskLogEntity.create_id = _userManager.UserId;
|
||||||
|
taskLogEntity.create_time = DateTime.Now;
|
||||||
|
taskLogEntity.operator_name = _userManager.RealName;
|
||||||
|
|
||||||
|
//任务状态变更时插入操作记录
|
||||||
|
if (!db.Queryable<PrdTaskLog>().Where(it => it.task_id == input.id && it.status == taskLogEntity.status).Any())
|
||||||
|
{
|
||||||
|
row = await db.Insertable(taskLogEntity).ExecuteCommandAsync();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (row > 0)
|
||||||
|
{
|
||||||
|
var obj = (await db.Queryable<PrdMo>().FirstAsync(it => it.id == input.mo_id));
|
||||||
|
obj.input_qty += entity.scheduled_num;
|
||||||
|
var moStatus = "";
|
||||||
|
//判断,已排产数量>=计划数量时将状态改为 已完成
|
||||||
|
if (obj.input_qty >= obj.plan_qty)
|
||||||
|
{
|
||||||
|
moStatus = "25019252113685";
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//修改工单状态为已排产,同事修改已排产数量
|
||||||
|
moStatus = "25019244276501";
|
||||||
|
}
|
||||||
|
row = await db.Updateable<PrdMo>().SetColumns(it => new PrdMo
|
||||||
|
{
|
||||||
|
mo_status = moStatus,
|
||||||
|
input_qty = obj.input_qty
|
||||||
|
})
|
||||||
|
.Where(it => it.id == entity.mo_id).ExecuteCommandAsync();
|
||||||
|
}
|
||||||
|
|
||||||
|
await db.Ado.CommitTranAsync();
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Log.Error("生产任务发布时发生错误", ex);
|
||||||
|
await db.Ado.RollbackTranAsync();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return row > 0;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 生产任务下发
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost("task-release")]
|
||||||
|
public async Task<dynamic> PrdTaskRelease(PrdTaskReleaseUpInput input)
|
||||||
|
{
|
||||||
|
if (input is null)
|
||||||
|
{
|
||||||
|
throw new ArgumentNullException(nameof(input));
|
||||||
|
}
|
||||||
|
var db = _repository.AsSugarClient(); ;
|
||||||
|
var row = await db.Updateable<PrdTask>()
|
||||||
|
.SetColumns(it => new PrdTask { status = "ToBeStarted" })
|
||||||
|
.Where(it => input.TaskIds.Contains(it.id))
|
||||||
|
.ExecuteCommandAsync();
|
||||||
return (row > 0);
|
return (row > 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task<ISqlSugarClient> GetDbContext()
|
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 根据产品ID获取模具列表
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="itemId">产品ID</param>
|
||||||
|
/// <returns></returns>
|
||||||
|
/// <remarks>
|
||||||
|
/// <br/>return results:
|
||||||
|
/// <br/>[
|
||||||
|
/// <br/> {
|
||||||
|
/// <br/> mold_code:模具编号
|
||||||
|
/// <br/> mold_name:模具名称
|
||||||
|
/// <br/> item_name:产品名称
|
||||||
|
/// <br/> item_code:产品编号
|
||||||
|
/// <br/> cavity_num:模穴数
|
||||||
|
/// <br/> }
|
||||||
|
/// <br/>]
|
||||||
|
/// </remarks>
|
||||||
|
[HttpGet("moldlist/{itemId}")]
|
||||||
|
public async Task<dynamic> GetMoldListByItemId(string itemId)
|
||||||
{
|
{
|
||||||
var link = await _repository.AsSugarClient().Queryable<DbLinkEntity>().FirstAsync(x => x.FullName == "tnb_mes");
|
var db = _repository.AsSugarClient();
|
||||||
var db = _dataBaseManager.ChangeDataBase(link);
|
var list = await db.Queryable<Molds>().InnerJoin<BasItem>((a, b) => a.item_id == b.id)
|
||||||
return db;
|
.Where((a, b) => a.item_id == itemId)
|
||||||
|
.Select((a, b) => new MoldListOutput
|
||||||
|
{
|
||||||
|
id = a.id,
|
||||||
|
mold_code = a.mold_code,
|
||||||
|
mold_name = a.mold_name,
|
||||||
|
item_name = b.item_name,
|
||||||
|
item_code = b.item_code,
|
||||||
|
cavity_num = a.cavity_num,
|
||||||
|
})
|
||||||
|
.ToListAsync();
|
||||||
|
return list;
|
||||||
|
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 查看工单操作记录
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="taskId">任务ID</param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpGet("record/{taskId}")]
|
||||||
|
public async Task<dynamic> GetMoOperRecord(string taskId)
|
||||||
|
{
|
||||||
|
//var list = await _repository.AsSugarClient().Queryable<PrdTask>().LeftJoin<PrdTaskLog>((a, b) => a.prd_task_id == b.id)
|
||||||
|
// .WhereIF(!string.IsNullOrWhiteSpace(input.mo_no),b=>b.id == input.task_no)
|
||||||
|
// .WhereIF(!string.IsNullOrWhiteSpace(input.task_no), b => b.prd_task_id == input.task_id)
|
||||||
|
// .WhereIF(!string.IsNullOrWhiteSpace(input.item_code), a => a.item_code == input.item_code)
|
||||||
|
// .WhereIF(!string.IsNullOrWhiteSpace(input.eqp_code), a => a.eqp_type_code == input.eqp_code)
|
||||||
|
// .WhereIF(input.plan_start_date.HasValue, a => a.plan_start_date >= input.plan_start_date!.Value)
|
||||||
|
// .WhereIF(input.plan_end_date.HasValue, a => a.plan_end_date <= input.plan_end_date!.Value)
|
||||||
|
// .ToListAsync();
|
||||||
|
var list = await _repository.AsSugarClient().Queryable<PrdTaskLog>().Where(it => it.id == taskId).ToListAsync();
|
||||||
|
var data = list.Adapt<List<PrdTaskOperOutput>>();
|
||||||
|
var dic = await _dictionaryDataService.GetDicByTypeId("25572555259157");
|
||||||
|
_repository.AsSugarClient().ThenMapper(data, x => x.statusName = dic.ContainsKey(x.status) ? dic[x.status].ToString() : "");
|
||||||
|
return data;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
{
|
|
||||||
"AppSettings": {
|
|
||||||
"InjectMiniProfiler": true,
|
|
||||||
"SupportPackageNamePrefixs": [ "Tnb" ]
|
|
||||||
},
|
|
||||||
"Kestrel": {
|
|
||||||
"Endpoints": {
|
|
||||||
"Http": {
|
|
||||||
"Url": "http://localhost:9231"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"YitId": {
|
|
||||||
"WorkerId": 1, //必须 全局唯一,必须 程序设定,理论最大值 2^WorkerIdBitLength-1
|
|
||||||
"WorkerIdBitLength": 4, //机器码位长,决定 WorkerId 的最大值,默认值6,取值范围 [1, 16]
|
|
||||||
"SeqBitLength": 4 //序列数位长,默认值6,取值范围 [3, 21](建议不小于4),决定每毫秒基础生成的ID个数
|
|
||||||
},
|
|
||||||
"UnifyResultSettings": {
|
|
||||||
"ShowExceptionDetail": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -52,4 +52,9 @@ public class DepartmentCrInput
|
|||||||
/// 组织类型
|
/// 组织类型
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string category { get; set; }
|
public string category { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 组织类型名称
|
||||||
|
/// added by ly on 20230421
|
||||||
|
/// </summary>
|
||||||
|
public string typeName { get; set; }
|
||||||
}
|
}
|
||||||
@@ -62,4 +62,8 @@ public class DepartmentInfoOutput
|
|||||||
/// added by ly on 20230420
|
/// added by ly on 20230420
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string category { get; set; }
|
public string category { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 组织类型名称
|
||||||
|
/// </summary>
|
||||||
|
public string categoryName { get; set; }
|
||||||
}
|
}
|
||||||
@@ -73,4 +73,9 @@ public class OrganizeListOutput : TreeModel
|
|||||||
/// 集团名 (组织树最后一个).
|
/// 集团名 (组织树最后一个).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string lastFullName { get; set; }
|
public string lastFullName { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 组织类型名称
|
||||||
|
/// added by ly on 20230421
|
||||||
|
/// </summary>
|
||||||
|
public string categoryName { get; set; }
|
||||||
}
|
}
|
||||||
@@ -31,4 +31,11 @@ public interface IDictionaryDataService
|
|||||||
/// <param name="key"></param>
|
/// <param name="key"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
Task<Dictionary<string, object>> GetDicByKey(string key);
|
Task<Dictionary<string, object>> GetDicByKey(string key);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 根据typeId获取字典
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="typeId"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<Dictionary<string, object>> GetDicByTypeId(string typeId);
|
||||||
}
|
}
|
||||||
@@ -9,6 +9,7 @@ using JNPF.Systems.Entitys.Dto.Department;
|
|||||||
using JNPF.Systems.Entitys.Dto.Organize;
|
using JNPF.Systems.Entitys.Dto.Organize;
|
||||||
using JNPF.Systems.Entitys.Dto.SysConfig;
|
using JNPF.Systems.Entitys.Dto.SysConfig;
|
||||||
using JNPF.Systems.Entitys.Permission;
|
using JNPF.Systems.Entitys.Permission;
|
||||||
|
using JNPF.Systems.Entitys.System;
|
||||||
using JNPF.Systems.Interfaces.Permission;
|
using JNPF.Systems.Interfaces.Permission;
|
||||||
using JNPF.Systems.Interfaces.System;
|
using JNPF.Systems.Interfaces.System;
|
||||||
using Mapster;
|
using Mapster;
|
||||||
@@ -212,6 +213,9 @@ public class DepartmentService : IDepartmentService, IDynamicApiController, ITra
|
|||||||
var res = entity.Adapt<DepartmentInfoOutput>();
|
var res = entity.Adapt<DepartmentInfoOutput>();
|
||||||
if (entity.ParentId.Equals("-1")) res.organizeIdTree = new List<string>() { res.id };
|
if (entity.ParentId.Equals("-1")) res.organizeIdTree = new List<string>() { res.id };
|
||||||
else res.organizeIdTree = (await _repository.GetSingleAsync(p => p.Id == entity.ParentId)).OrganizeIdTree.Split(",").ToList();
|
else res.organizeIdTree = (await _repository.GetSingleAsync(p => p.Id == entity.ParentId)).OrganizeIdTree.Split(",").ToList();
|
||||||
|
//modified by ly on 20230421
|
||||||
|
var dic = await _repository.AsSugarClient().Queryable<DictionaryDataEntity>().Where(it => it.DictionaryTypeId == "24754619407381").ToDictionaryAsync(x => x.EnCode, x => x.FullName);
|
||||||
|
res.categoryName = dic.ContainsKey(res.category) ? dic[res.category].ToString() : "";
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -578,7 +582,7 @@ public class DepartmentService : IDepartmentService, IDynamicApiController, ITra
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public async Task<List<OrganizeEntity>> GetCompanyAllDep(string id)
|
public async Task<List<OrganizeEntity>> GetCompanyAllDep(string id)
|
||||||
{
|
{
|
||||||
return await _repository.GetListAsync(x => x.OrganizeIdTree.Contains(id) && x.Category == "department" && x.EnabledMark == 1 && x.DeleteMark == null);
|
return await _repository.GetListAsync(x => x.OrganizeIdTree.Contains(id) && x.Category == "department" && x.EnabledMark == 1 && x.DeleteMark == null);
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
@@ -12,6 +12,7 @@ using JNPF.LinqBuilder;
|
|||||||
using JNPF.Systems.Entitys.Dto.Organize;
|
using JNPF.Systems.Entitys.Dto.Organize;
|
||||||
using JNPF.Systems.Entitys.Dto.SysConfig;
|
using JNPF.Systems.Entitys.Dto.SysConfig;
|
||||||
using JNPF.Systems.Entitys.Permission;
|
using JNPF.Systems.Entitys.Permission;
|
||||||
|
using JNPF.Systems.Entitys.System;
|
||||||
using JNPF.Systems.Interfaces.Permission;
|
using JNPF.Systems.Interfaces.Permission;
|
||||||
using JNPF.Systems.Interfaces.System;
|
using JNPF.Systems.Interfaces.System;
|
||||||
using Mapster;
|
using Mapster;
|
||||||
@@ -88,6 +89,8 @@ public class OrganizeService : IOrganizeService, IDynamicApiController, ITransie
|
|||||||
|
|
||||||
// 获取分级管理组织
|
// 获取分级管理组织
|
||||||
var dataScope = _userManager.DataScope.Where(x => x.Select).Select(x => x.organizeId).Distinct().ToList();
|
var dataScope = _userManager.DataScope.Where(x => x.Select).Select(x => x.organizeId).Distinct().ToList();
|
||||||
|
//modified by ly on 20230421 查询区域类型数据字典
|
||||||
|
var dic = await _repository.AsSugarClient().Queryable<DictionaryDataEntity>().Where(it => it.DictionaryTypeId == "24754619407381").ToDictionaryAsync(x => x.EnCode, x => x.FullName);
|
||||||
|
|
||||||
List<OrganizeListOutput>? data = await _repository.AsQueryable().Where(t => t.DeleteMark == null)
|
List<OrganizeListOutput>? data = await _repository.AsQueryable().Where(t => t.DeleteMark == null)
|
||||||
.WhereIF(!_userManager.IsAdministrator, a => dataScope.Contains(a.Id))
|
.WhereIF(!_userManager.IsAdministrator, a => dataScope.Contains(a.Id))
|
||||||
@@ -105,7 +108,9 @@ public class OrganizeService : IOrganizeService, IDynamicApiController, ITransie
|
|||||||
sortCode = x.SortCode,
|
sortCode = x.SortCode,
|
||||||
icon = SqlFunc.IIF(x.Category.Equals("company"), "icon-ym icon-ym-tree-organization3", "icon-ym icon-ym-tree-department1"),
|
icon = SqlFunc.IIF(x.Category.Equals("company"), "icon-ym icon-ym-tree-organization3", "icon-ym icon-ym-tree-department1"),
|
||||||
type = x.Category
|
type = x.Category
|
||||||
}).ToListAsync();
|
})
|
||||||
|
.Mapper(x => x.categoryName = dic.ContainsKey(x.category) ? dic[x.category].ToString() : "")
|
||||||
|
.ToListAsync();
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(input.keyword))
|
if (!string.IsNullOrEmpty(input.keyword))
|
||||||
data = data.TreeWhere(t => t.fullName.Contains(input.keyword) || t.enCode.Contains(input.keyword), t => t.id, t => t.parentId);
|
data = data.TreeWhere(t => t.fullName.Contains(input.keyword) || t.enCode.Contains(input.keyword), t => t.id, t => t.parentId);
|
||||||
@@ -290,19 +295,19 @@ public class OrganizeService : IOrganizeService, IDynamicApiController, ITransie
|
|||||||
queryWhere = queryWhere.And(x => x.DeleteMark == null);
|
queryWhere = queryWhere.And(x => x.DeleteMark == null);
|
||||||
List<OrganizeListOutput>? data = await _repository.AsQueryable().Where(queryWhere)
|
List<OrganizeListOutput>? data = await _repository.AsQueryable().Where(queryWhere)
|
||||||
.WhereIF(input.keyword.IsNotEmptyOrNull(), a => a.FullName.Contains(input.keyword) || a.EnCode.Contains(input.keyword)).Select(a => new OrganizeListOutput
|
.WhereIF(input.keyword.IsNotEmptyOrNull(), a => a.FullName.Contains(input.keyword) || a.EnCode.Contains(input.keyword)).Select(a => new OrganizeListOutput
|
||||||
{
|
{
|
||||||
id = a.Id,
|
id = a.Id,
|
||||||
organizeIdTree = a.OrganizeIdTree,
|
organizeIdTree = a.OrganizeIdTree,
|
||||||
type = a.Category,
|
type = a.Category,
|
||||||
parentId = a.ParentId,
|
parentId = a.ParentId,
|
||||||
lastFullName = a.FullName,
|
lastFullName = a.FullName,
|
||||||
fullName = a.FullName,
|
fullName = a.FullName,
|
||||||
enabledMark = a.EnabledMark,
|
enabledMark = a.EnabledMark,
|
||||||
creatorTime = a.CreatorTime,
|
creatorTime = a.CreatorTime,
|
||||||
icon = a.Category.Equals("company") ? "icon-ym icon-ym-tree-organization3" : "icon-ym icon-ym-tree-department1",
|
icon = a.Category.Equals("company") ? "icon-ym icon-ym-tree-organization3" : "icon-ym icon-ym-tree-department1",
|
||||||
sortCode = a.SortCode,
|
sortCode = a.SortCode,
|
||||||
isLeaf = true
|
isLeaf = true
|
||||||
}).ToListAsync();
|
}).ToListAsync();
|
||||||
|
|
||||||
// 获取所有组织
|
// 获取所有组织
|
||||||
List<OrganizeEntity>? allOrgList = GetOrgListTreeName();
|
List<OrganizeEntity>? allOrgList = GetOrgListTreeName();
|
||||||
@@ -393,7 +398,7 @@ public class OrganizeService : IOrganizeService, IDynamicApiController, ITransie
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
if(adminlist.Any()) await _repository.AsSugarClient().Insertable(adminlist).CallEntityMethod(m => m.Create()).ExecuteReturnEntityAsync();
|
if (adminlist.Any()) await _repository.AsSugarClient().Insertable(adminlist).CallEntityMethod(m => m.Create()).ExecuteReturnEntityAsync();
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 第三方同步
|
#region 第三方同步
|
||||||
@@ -629,7 +634,7 @@ public class OrganizeService : IOrganizeService, IDynamicApiController, ITransie
|
|||||||
[NonAction]
|
[NonAction]
|
||||||
public async Task<List<OrganizeEntity>> GetListAsync(Expression<Func<OrganizeEntity, bool>> expression = null)
|
public async Task<List<OrganizeEntity>> GetListAsync(Expression<Func<OrganizeEntity, bool>> expression = null)
|
||||||
{
|
{
|
||||||
var query = _repository.AsQueryable().Where(t => t.EnabledMark == 1 && t.DeleteMark == null).WhereIF(expression!=null, expression);
|
var query = _repository.AsQueryable().Where(t => t.EnabledMark == 1 && t.DeleteMark == null).WhereIF(expression != null, expression);
|
||||||
return await query.OrderBy(o => o.SortCode).OrderBy(a => a.CreatorTime, OrderByType.Desc).ToListAsync();
|
return await query.OrderBy(o => o.SortCode).OrderBy(a => a.CreatorTime, OrderByType.Desc).ToListAsync();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -420,8 +420,8 @@ public class DataBaseService : IDynamicApiController, ITransient
|
|||||||
sugarClient.MappingTables.Add(entityName, item.Name);
|
sugarClient.MappingTables.Add(entityName, item.Name);
|
||||||
foreach (var col in sugarClient.DbMaintenance.GetColumnInfosByTableName(item.Name))
|
foreach (var col in sugarClient.DbMaintenance.GetColumnInfosByTableName(item.Name))
|
||||||
{
|
{
|
||||||
var colName = CustomFormatName(col.DbColumnName);
|
//var colName = CustomFormatName(col.DbColumnName);
|
||||||
sugarClient.MappingColumns.Add(colName /*类的属性首字母大写*/, col.DbColumnName, entityName);
|
sugarClient.MappingColumns.Add(col.DbColumnName /*类的属性首字母大写*/, col.DbColumnName, entityName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sugarClient.DbFirst.Where(input.TableName)
|
sugarClient.DbFirst.Where(input.TableName)
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using JNPF.Common.Core.Manager;
|
using JNPF.ClayObject.Extensions;
|
||||||
|
using JNPF.Common.Core.Manager;
|
||||||
using JNPF.Common.Core.Manager.Files;
|
using JNPF.Common.Core.Manager.Files;
|
||||||
using JNPF.Common.Enums;
|
using JNPF.Common.Enums;
|
||||||
using JNPF.Common.Manager;
|
using JNPF.Common.Manager;
|
||||||
@@ -338,9 +339,15 @@ public class DictionaryDataService : IDictionaryDataService, IDynamicApiControll
|
|||||||
return await _repository.AsSugarClient().Queryable<DictionaryDataEntity>()
|
return await _repository.AsSugarClient().Queryable<DictionaryDataEntity>()
|
||||||
.LeftJoin<DictionaryTypeEntity>((a, b) => a.DictionaryTypeId == b.Id)
|
.LeftJoin<DictionaryTypeEntity>((a, b) => a.DictionaryTypeId == b.Id)
|
||||||
.Where((a, b) => b.EnCode == key && b.DeleteMark == null)
|
.Where((a, b) => b.EnCode == key && b.DeleteMark == null)
|
||||||
.ToDictionaryAsync((it)=>it.EnCode,it=>it.FullName);
|
.ToDictionaryAsync((it) => it.EnCode, it => it.FullName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async Task<Dictionary<string, object>> GetDicByTypeId(string typeId) =>
|
||||||
|
await _repository.AsQueryable().Where(x => x.DictionaryTypeId == typeId && x.DeleteMark == null).ToDictionaryAsync(x => x.EnCode, x => x.FullName);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region PrivateMethod
|
#region PrivateMethod
|
||||||
|
|||||||
@@ -2919,8 +2919,12 @@ public class RunService : IRunService, ITransient
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
//modified by ly on 20230407
|
//modified by ly on 20230407
|
||||||
itemValue = Regex.Match(itemValue, @"\[(.+)\]").Groups[1].Value;
|
if (itemValue.IsMatch(@"\[(.+)\]"))
|
||||||
itemValue = itemValue.Trim('"');
|
{
|
||||||
|
itemValue = Regex.Match(itemValue, @"\[(.+)\]").Groups[1].Value;
|
||||||
|
itemValue = itemValue.Trim('"');
|
||||||
|
}
|
||||||
|
|
||||||
conModels.Add(new ConditionalCollections()
|
conModels.Add(new ConditionalCollections()
|
||||||
{
|
{
|
||||||
ConditionalList = new List<KeyValuePair<WhereType, ConditionalModel>>()
|
ConditionalList = new List<KeyValuePair<WhereType, ConditionalModel>>()
|
||||||
@@ -2939,6 +2943,7 @@ public class RunService : IRunService, ITransient
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
|
if (item.Value.IsNullOrEmpty()) continue;
|
||||||
var itemValue = item.Value.ToString().Contains("[") ? item.Value.ToJsonString() : item.Value.ToString();
|
var itemValue = item.Value.ToString().Contains("[") ? item.Value.ToJsonString() : item.Value.ToString();
|
||||||
|
|
||||||
if (model.searchType == 1)
|
if (model.searchType == 1)
|
||||||
|
|||||||
Reference in New Issue
Block a user