diff --git a/BasicData/Tnb.BasicData.Entities/Dto/BasMbom/MbomDataOutput.cs b/BasicData/Tnb.BasicData.Entities/Dto/BasMbom/MbomDataOutput.cs
index 275c7e03..1deef47e 100644
--- a/BasicData/Tnb.BasicData.Entities/Dto/BasMbom/MbomDataOutput.cs
+++ b/BasicData/Tnb.BasicData.Entities/Dto/BasMbom/MbomDataOutput.cs
@@ -52,7 +52,7 @@ namespace Tnb.BasicData.Entities.Dto
///
/// 物料均再首道工序投产
///
- public int is_first { get; set; }
+ public int? is_first { get; set; }
///
/// 备注
diff --git a/BasicData/Tnb.BasicData.Entities/Entity/BasSupplierContact.cs b/BasicData/Tnb.BasicData.Entities/Entity/BasSupplierContact.cs
index 5560cdc8..2784e366 100644
--- a/BasicData/Tnb.BasicData.Entities/Entity/BasSupplierContact.cs
+++ b/BasicData/Tnb.BasicData.Entities/Entity/BasSupplierContact.cs
@@ -22,7 +22,7 @@ namespace Tnb.BasicData.Entities
/// Nullable:False
///
[SugarColumn(IsPrimaryKey=true)]
- public long id {get;set;} = SnowflakeIdHelper.NextId();
+ public string id {get;set;} = SnowflakeIdHelper.NextId();
///
/// Desc:TODO
diff --git a/EquipMgr/Tnb.EquipMgr.Entities/Dto/RelevanceMoldInput.cs b/EquipMgr/Tnb.EquipMgr.Entities/Dto/RelevanceMoldInput.cs
new file mode 100644
index 00000000..c64c5312
--- /dev/null
+++ b/EquipMgr/Tnb.EquipMgr.Entities/Dto/RelevanceMoldInput.cs
@@ -0,0 +1,23 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Tnb.EquipMgr.Entities.Dto
+{
+ ///
+ /// 模具规则定义,关键模具输入参数
+ ///
+ public class RelevanceMoldInput
+ {
+ ///
+ /// 规则Id
+ ///
+ public string? rule_id { get; set; }
+ ///
+ /// 模具Id
+ ///
+ public string? mold_id { get; set;}
+ }
+}
diff --git a/EquipMgr/Tnb.EquipMgr.Entities/Entity/MoldMaintenance.cs b/EquipMgr/Tnb.EquipMgr.Entities/Entity/MoldMaintenance.cs
index c2a6290f..187a4940 100644
--- a/EquipMgr/Tnb.EquipMgr.Entities/Entity/MoldMaintenance.cs
+++ b/EquipMgr/Tnb.EquipMgr.Entities/Entity/MoldMaintenance.cs
@@ -8,90 +8,86 @@ namespace Tnb.EquipMgr.Entities
///
///模具保养
///
- [SugarTable("mold_maintenance")]
+ [SugarTable("tool_mold_maintenance")]
public partial class MoldMaintenance
{
- public MoldMaintenance(){
+ ///
+ /// Desc:编号
+ /// Default:
+ /// Nullable:False
+ ///
+ [SugarColumn(IsPrimaryKey = true)]
+ public string id { get; set; }
+ ///
+ /// Desc:所属组织
+ /// Default:NULL::character varying
+ /// Nullable:True
+ ///
+ public string? org_id { get; set; }
- }
- ///
- /// Desc:编号
- /// Default:
- /// Nullable:False
- ///
- [SugarColumn(IsPrimaryKey=true)]
- public string id {get;set;}
+ ///
+ /// Desc:项目
+ /// Default:NULL::character varying
+ /// Nullable:True
+ ///
+ public string? name { get; set; }
- ///
- /// Desc:所属组织
- /// Default:NULL::character varying
- /// Nullable:True
- ///
- public string? org_id {get;set;}
+ ///
+ /// Desc:描述
+ /// Default:NULL::character varying
+ /// Nullable:True
+ ///
+ public string? descrip { get; set; }
- ///
- /// Desc:项目
- /// Default:NULL::character varying
- /// Nullable:True
- ///
- public string? name {get;set;}
+ ///
+ /// Desc:备注
+ /// Default:NULL::character varying
+ /// Nullable:True
+ ///
+ public string? remark { get; set; }
- ///
- /// Desc:描述
- /// Default:NULL::character varying
- /// Nullable:True
- ///
- public string? descrip {get;set;}
+ ///
+ /// Desc:查看照片
+ /// Default:NULL::character varying
+ /// Nullable:True
+ ///
+ public string? image { get; set; }
- ///
- /// Desc:备注
- /// Default:NULL::character varying
- /// Nullable:True
- ///
- public string? remark {get;set;}
+ ///
+ /// Desc:扩展
+ /// Default:
+ /// Nullable:True
+ ///
+ public string? extras { get; set; }
- ///
- /// Desc:查看照片
- /// Default:NULL::character varying
- /// Nullable:True
- ///
- public string? image {get;set;}
+ ///
+ /// Desc:创建用户
+ /// Default:NULL::character varying
+ /// Nullable:True
+ ///
+ public string? create_id { get; set; }
- ///
- /// Desc:扩展
- /// Default:
- /// Nullable:True
- ///
- public string? extras {get;set;}
+ ///
+ /// Desc:创建时间
+ /// Default:
+ /// Nullable:True
+ ///
+ public DateTime? create_time { get; set; }
- ///
- /// Desc:创建用户
- /// Default:NULL::character varying
- /// Nullable:True
- ///
- public string? create_id {get;set;}
+ ///
+ /// Desc:修改用户
+ /// Default:NULL::character varying
+ /// Nullable:True
+ ///
+ public string? modify_id { get; set; }
- ///
- /// Desc:创建时间
- /// Default:
- /// Nullable:True
- ///
- public DateTime? create_time {get;set;}
-
- ///
- /// Desc:修改用户
- /// Default:NULL::character varying
- /// Nullable:True
- ///
- public string? modify_id {get;set;}
-
- ///
- /// Desc:修改时间
- /// Default:
- /// Nullable:True
- ///
- public DateTime? modify_time {get;set;}
+ ///
+ /// Desc:修改时间
+ /// Default:
+ /// Nullable:True
+ ///
+ public DateTime? modify_time { get; set; }
}
}
diff --git a/EquipMgr/Tnb.EquipMgr.Entities/Entity/ToolCheckItem.cs b/EquipMgr/Tnb.EquipMgr.Entities/Entity/ToolCheckItem.cs
index f39a6882..9c90f8a6 100644
--- a/EquipMgr/Tnb.EquipMgr.Entities/Entity/ToolCheckItem.cs
+++ b/EquipMgr/Tnb.EquipMgr.Entities/Entity/ToolCheckItem.cs
@@ -22,7 +22,7 @@ namespace Tnb.EquipMgr.Entities
/// Nullable:False
///
[SugarColumn(IsPrimaryKey=true)]
- public long id {get;set;} = SnowflakeIdHelper.NextId();
+ public string id {get;set;} = SnowflakeIdHelper.NextId();
///
/// Desc:TODO
diff --git a/EquipMgr/Tnb.EquipMgr.Entities/Entity/ToolCheckPeriod.cs b/EquipMgr/Tnb.EquipMgr.Entities/Entity/ToolCheckPeriod.cs
index 55590ce7..a8fb3621 100644
--- a/EquipMgr/Tnb.EquipMgr.Entities/Entity/ToolCheckPeriod.cs
+++ b/EquipMgr/Tnb.EquipMgr.Entities/Entity/ToolCheckPeriod.cs
@@ -22,7 +22,7 @@ namespace Tnb.EquipMgr.Entities
/// Nullable:False
///
[SugarColumn(IsPrimaryKey=true)]
- public long id {get;set;} = SnowflakeIdHelper.NextId();
+ public string id {get;set;} = SnowflakeIdHelper.NextId();
///
/// Desc:TODO
diff --git a/EquipMgr/Tnb.EquipMgr.Entities/Entity/ToolCheckResult.cs b/EquipMgr/Tnb.EquipMgr.Entities/Entity/ToolCheckResult.cs
index 86e169c8..70caa0a5 100644
--- a/EquipMgr/Tnb.EquipMgr.Entities/Entity/ToolCheckResult.cs
+++ b/EquipMgr/Tnb.EquipMgr.Entities/Entity/ToolCheckResult.cs
@@ -22,7 +22,7 @@ namespace Tnb.EquipMgr.Entities
/// Nullable:False
///
[SugarColumn(IsPrimaryKey=true)]
- public char id {get;set;} = SnowflakeIdHelper.NextId();
+ public string id {get;set;} = SnowflakeIdHelper.NextId();
///
/// Desc:TODO
diff --git a/EquipMgr/Tnb.EquipMgr.Entities/Entity/ToolCheckResultDetail.cs b/EquipMgr/Tnb.EquipMgr.Entities/Entity/ToolCheckResultDetail.cs
index bf56217e..cf9fb105 100644
--- a/EquipMgr/Tnb.EquipMgr.Entities/Entity/ToolCheckResultDetail.cs
+++ b/EquipMgr/Tnb.EquipMgr.Entities/Entity/ToolCheckResultDetail.cs
@@ -22,7 +22,7 @@ namespace Tnb.EquipMgr.Entities
/// Nullable:False
///
[SugarColumn(IsPrimaryKey=true)]
- public char id {get;set;} = SnowflakeIdHelper.NextId();
+ public string id {get;set;} = SnowflakeIdHelper.NextId();
///
/// Desc:TODO
diff --git a/EquipMgr/Tnb.EquipMgr.Entities/Entity/ToolCheckResultIcon.cs b/EquipMgr/Tnb.EquipMgr.Entities/Entity/ToolCheckResultIcon.cs
index 6b04d375..bcc83090 100644
--- a/EquipMgr/Tnb.EquipMgr.Entities/Entity/ToolCheckResultIcon.cs
+++ b/EquipMgr/Tnb.EquipMgr.Entities/Entity/ToolCheckResultIcon.cs
@@ -22,7 +22,7 @@ namespace Tnb.EquipMgr.Entities
/// Nullable:False
///
[SugarColumn(IsPrimaryKey=true)]
- public long id {get;set;} = SnowflakeIdHelper.NextId();
+ public string id {get;set;} = SnowflakeIdHelper.NextId();
///
/// Desc:TODO
diff --git a/EquipMgr/Tnb.EquipMgr.Entities/Entity/ToolModelCheckItem.cs b/EquipMgr/Tnb.EquipMgr.Entities/Entity/ToolModelCheckItem.cs
index 6adf9ec4..d4d2b399 100644
--- a/EquipMgr/Tnb.EquipMgr.Entities/Entity/ToolModelCheckItem.cs
+++ b/EquipMgr/Tnb.EquipMgr.Entities/Entity/ToolModelCheckItem.cs
@@ -22,7 +22,7 @@ namespace Tnb.EquipMgr.Entities
/// Nullable:False
///
[SugarColumn(IsPrimaryKey=true)]
- public long id {get;set;} = SnowflakeIdHelper.NextId();
+ public string id {get;set;} = SnowflakeIdHelper.NextId();
///
/// Desc:TODO
diff --git a/EquipMgr/Tnb.EquipMgr.Entities/Entity/ToolModelCheckPeriod.cs b/EquipMgr/Tnb.EquipMgr.Entities/Entity/ToolModelCheckPeriod.cs
index e5db4138..a101a58c 100644
--- a/EquipMgr/Tnb.EquipMgr.Entities/Entity/ToolModelCheckPeriod.cs
+++ b/EquipMgr/Tnb.EquipMgr.Entities/Entity/ToolModelCheckPeriod.cs
@@ -22,7 +22,7 @@ namespace Tnb.EquipMgr.Entities
/// Nullable:False
///
[SugarColumn(IsPrimaryKey=true)]
- public long id {get;set;} = SnowflakeIdHelper.NextId();
+ public string id {get;set;} = SnowflakeIdHelper.NextId();
///
/// Desc:TODO
diff --git a/EquipMgr/Tnb.EquipMgr.Entities/Entity/ToolMoldMaintainGroupItem.cs b/EquipMgr/Tnb.EquipMgr.Entities/Entity/ToolMoldMaintainGroupItem.cs
index 54a71d1d..f1ec7a64 100644
--- a/EquipMgr/Tnb.EquipMgr.Entities/Entity/ToolMoldMaintainGroupItem.cs
+++ b/EquipMgr/Tnb.EquipMgr.Entities/Entity/ToolMoldMaintainGroupItem.cs
@@ -11,33 +11,22 @@ namespace Tnb.EquipMgr.Entities
///模具保养项目组与保养项关系
///
[SugarTable("tool_mold_maintain_group_item")]
- public partial class ToolMoldMaintainGroupItem
+ public partial class ToolMoldMaintainGroupItem : BaseEntity
{
- public ToolMoldMaintainGroupItem(){
-
- }
///
- /// Desc:主键
- /// Default:
- /// Nullable:False
+ /// Desc:项目组id
+ /// Default:NULL::character varying
+ /// Nullable:True
///
- [SugarColumn(IsPrimaryKey=true)]
- public string id {get;set;} = SnowflakeIdHelper.NextId();
-
- ///
- /// Desc:项目组id
- /// Default:NULL::character varying
- /// Nullable:True
- ///
- public string? item_group_id {get;set;}
+ public string? item_group_id { get; set; }
///
/// Desc:保养项id
- /// Default:NULL::character varying
+ /// Default:NULL::character varying
/// Nullable:True
///
- public string? item_id {get;set;}
+ public string? item_id { get; set; }
}
}
diff --git a/EquipMgr/Tnb.EquipMgr.Entities/Entity/ToolMoldMaintainGroupRelation.cs b/EquipMgr/Tnb.EquipMgr.Entities/Entity/ToolMoldMaintainGroupRelation.cs
index b303a251..c6b6c323 100644
--- a/EquipMgr/Tnb.EquipMgr.Entities/Entity/ToolMoldMaintainGroupRelation.cs
+++ b/EquipMgr/Tnb.EquipMgr.Entities/Entity/ToolMoldMaintainGroupRelation.cs
@@ -11,19 +11,9 @@ namespace Tnb.EquipMgr.Entities
///模具保养组与磨具关联
///
[SugarTable("tool_mold_maintain_group_relation")]
- public partial class ToolMoldMaintainGroupRelation
+ public partial class ToolMoldMaintainGroupRelation :BaseEntity
{
- public ToolMoldMaintainGroupRelation(){
-
- }
- ///
- /// Desc:主键
- /// Default:
- /// Nullable:False
- ///
- [SugarColumn(IsPrimaryKey=true)]
- public string id {get;set;} = SnowflakeIdHelper.NextId();
///
/// Desc:项目组Id
diff --git a/EquipMgr/Tnb.EquipMgr.Entities/Entity/ToolToolTypeCheckPeriod.cs b/EquipMgr/Tnb.EquipMgr.Entities/Entity/ToolToolTypeCheckPeriod.cs
index bf9e394d..f025f57a 100644
--- a/EquipMgr/Tnb.EquipMgr.Entities/Entity/ToolToolTypeCheckPeriod.cs
+++ b/EquipMgr/Tnb.EquipMgr.Entities/Entity/ToolToolTypeCheckPeriod.cs
@@ -22,7 +22,7 @@ namespace Tnb.EquipMgr.Entities
/// Nullable:False
///
[SugarColumn(IsPrimaryKey=true)]
- public long id {get;set;} = SnowflakeIdHelper.NextId();
+ public string id {get;set;} = SnowflakeIdHelper.NextId();
///
/// Desc:TODO
diff --git a/EquipMgr/Tnb.EquipMgr.Entities/Entity/ToolToolTypeChekItem.cs b/EquipMgr/Tnb.EquipMgr.Entities/Entity/ToolToolTypeChekItem.cs
index e59b412f..d529927e 100644
--- a/EquipMgr/Tnb.EquipMgr.Entities/Entity/ToolToolTypeChekItem.cs
+++ b/EquipMgr/Tnb.EquipMgr.Entities/Entity/ToolToolTypeChekItem.cs
@@ -22,7 +22,7 @@ namespace Tnb.EquipMgr.Entities
/// Nullable:False
///
[SugarColumn(IsPrimaryKey=true)]
- public long id {get;set;} = SnowflakeIdHelper.NextId();
+ public string id {get;set;} = SnowflakeIdHelper.NextId();
///
/// Desc:TODO
diff --git a/EquipMgr/Tnb.EquipMgr.Interfaces/IToolMoldMaintainRuleService.cs b/EquipMgr/Tnb.EquipMgr.Interfaces/IToolMoldMaintainRuleService.cs
new file mode 100644
index 00000000..a066341d
--- /dev/null
+++ b/EquipMgr/Tnb.EquipMgr.Interfaces/IToolMoldMaintainRuleService.cs
@@ -0,0 +1,15 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Tnb.EquipMgr.Interfaces
+{
+ ///
+ /// 设备保养规则定义
+ ///
+ public interface IToolMoldMaintainRuleService
+ {
+ }
+}
diff --git a/EquipMgr/Tnb.EquipMgr/MoldMaintainBaseService.cs b/EquipMgr/Tnb.EquipMgr/MoldMaintainBaseService.cs
new file mode 100644
index 00000000..9fdee9cf
--- /dev/null
+++ b/EquipMgr/Tnb.EquipMgr/MoldMaintainBaseService.cs
@@ -0,0 +1,12 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Tnb.EquipMgr
+{
+ public class MoldMaintainBaseService
+ {
+ }
+}
diff --git a/EquipMgr/Tnb.EquipMgr/ToolMoldMaintainRuleService.cs b/EquipMgr/Tnb.EquipMgr/ToolMoldMaintainRuleService.cs
new file mode 100644
index 00000000..fbc88461
--- /dev/null
+++ b/EquipMgr/Tnb.EquipMgr/ToolMoldMaintainRuleService.cs
@@ -0,0 +1,52 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Aspose.Cells.Drawing;
+using JNPF.Common.Core.Manager;
+using JNPF.Common.Enums;
+using JNPF.DependencyInjection;
+using JNPF.DynamicApiController;
+using JNPF.FriendlyException;
+using Mapster;
+using Microsoft.AspNetCore.Mvc;
+using SqlSugar;
+using Tnb.EquipMgr.Entities;
+using Tnb.EquipMgr.Entities.Dto;
+using Tnb.EquipMgr.Interfaces;
+
+namespace Tnb.EquipMgr
+{
+ ///
+ /// 模具保养规则定义服务
+ ///
+ [ApiDescriptionSettings(Tag = ModuleConsts.Tag, Area = ModuleConsts.Area, Order = 700)]
+ [Route("api/[area]/[controller]/[action]")]
+ public class ToolMoldMaintainRuleService : IToolMoldMaintainRuleService, IDynamicApiController, ITransient
+ {
+ private readonly ISqlSugarRepository _repository;
+ private readonly IUserManager _userManager;
+ private readonly ISqlSugarClient _db;
+ public ToolMoldMaintainRuleService(ISqlSugarRepository repository, IUserManager userManager)
+ {
+ _repository = repository;
+ _userManager = userManager;
+ _db = repository.AsSugarClient();
+ }
+ ///
+ /// 关联模具
+ ///
+ /// 关联模具输入参数
+ ///
+ ///
+ [HttpPost]
+ public async Task RelevanceMold(RelevanceMoldInput input)
+ {
+ if (input is null) throw new ArgumentNullException(nameof(input));
+ var entity = input.Adapt();
+ var row = await _db.Insertable(entity).ExecuteCommandAsync();
+ if (row < 1) throw Oops.Oh(ErrorCode.COM1000);
+ }
+ }
+}
diff --git a/ProductionMgr/Tnb.ProductionMgr.Entities/Dto/PrdManage/PackSechelToBeIssueListOutput.cs b/ProductionMgr/Tnb.ProductionMgr.Entities/Dto/PrdManage/PackSechelToBeIssueListOutput.cs
index 5413c2e7..972eb245 100644
--- a/ProductionMgr/Tnb.ProductionMgr.Entities/Dto/PrdManage/PackSechelToBeIssueListOutput.cs
+++ b/ProductionMgr/Tnb.ProductionMgr.Entities/Dto/PrdManage/PackSechelToBeIssueListOutput.cs
@@ -43,15 +43,15 @@ namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
///
/// 生产任务数量
///
- public int scheduled_qty { get; set; }
+ public int? scheduled_qty { get; set; }
///
/// 计划数量
///
- public int plan_qty { get; set; }
+ public int? plan_qty { get; set; }
///
/// 工序任务量
///
- public int process_task_qty { get; set; }
+ public int? process_task_qty { get; set; }
}
}
diff --git a/ProductionMgr/Tnb.ProductionMgr.Entities/Dto/PrdManage/PrdMoTaskDefectOutput.cs b/ProductionMgr/Tnb.ProductionMgr.Entities/Dto/PrdManage/PrdMoTaskDefectOutput.cs
index 64b545c6..dc76daba 100644
--- a/ProductionMgr/Tnb.ProductionMgr.Entities/Dto/PrdManage/PrdMoTaskDefectOutput.cs
+++ b/ProductionMgr/Tnb.ProductionMgr.Entities/Dto/PrdManage/PrdMoTaskDefectOutput.cs
@@ -18,24 +18,24 @@ namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
/// Default:
/// Nullable:True
///
- public string mo_task_code { get; set; }
- public List batchItems { get; set; }
+ public string? mo_task_code { get; set; }
+ public List? batchItems { get; set; }
}
public class BatchItem
{
- public string batch { get; set; }
+ public string? batch { get; set; }
- public string create_time { get; set; }
+ public string? create_time { get; set; }
///
/// 报废数量
///
- public int scrap_qty { get; set; }
+ public int? scrap_qty { get; set; }
///
///次品分类数组
///
- public List categoryItems { get; set; }
+ public List? categoryItems { get; set; }
}
public class CategoryItem
@@ -43,16 +43,16 @@ namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
///
/// 次品分类名称
///
- public string name { get; set; }
+ public string? name { get; set; }
///
/// 次品分类数量
///
- public int qty { get; set; }
+ public int? qty { get; set; }
///
/// 次品项数组
///
- public List defectItems { get; set; }
+ public List? defectItems { get; set; }
}
public class DefectItem
@@ -60,10 +60,10 @@ namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
///
/// 次品分类名称
///
- public string name { get; set; }
+ public string? name { get; set; }
///
/// 次品分类数量
///
- public int qty { get; set; }
+ public int? qty { get; set; }
}
}
diff --git a/ProductionMgr/Tnb.ProductionMgr.Entities/Dto/PrdManage/PrdMoTaskOutput.cs b/ProductionMgr/Tnb.ProductionMgr.Entities/Dto/PrdManage/PrdMoTaskOutput.cs
index dc48353f..0eb46fc1 100644
--- a/ProductionMgr/Tnb.ProductionMgr.Entities/Dto/PrdManage/PrdMoTaskOutput.cs
+++ b/ProductionMgr/Tnb.ProductionMgr.Entities/Dto/PrdManage/PrdMoTaskOutput.cs
@@ -61,20 +61,20 @@ namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
///
/// 完成数量
///
- public int complete_qty { get; set; }
+ public int? complete_qty { get; set; }
///
/// 计划生产数量
///
- public int plan_qty { get; set; }
- public int scheduled_qty { get; set; }
+ public int? plan_qty { get; set; }
+ public int? scheduled_qty { get; set; }
///
/// 预计开工时间
///
- public DateTime estimated_start_date { get; set; }
+ public DateTime? estimated_start_date { get; set; }
///
/// 预计完工时间
///
- public DateTime estimated_end_date { get; set; }
+ public DateTime? estimated_end_date { get; set; }
}
diff --git a/ProductionMgr/Tnb.ProductionMgr.Entities/Dto/PrdManage/PrdTaskSortOutput.cs b/ProductionMgr/Tnb.ProductionMgr.Entities/Dto/PrdManage/PrdTaskSortOutput.cs
index 0805c22e..a7d4f906 100644
--- a/ProductionMgr/Tnb.ProductionMgr.Entities/Dto/PrdManage/PrdTaskSortOutput.cs
+++ b/ProductionMgr/Tnb.ProductionMgr.Entities/Dto/PrdManage/PrdTaskSortOutput.cs
@@ -28,15 +28,15 @@ namespace Tnb.ProductionMgr.Entities.Dto
///
/// 是否同组标识
///
- public int group_flag { get; set; }
+ public int? group_flag { get; set; }
///
/// 计划生产量
///
- public int plan_qty { get; set; }
+ public int? plan_qty { get; set; }
///
/// 已完工数量
///
- public int comple_qty { get; set; }
+ public int? comple_qty { get; set; }
///
/// 产品名称
///
diff --git a/ProductionMgr/Tnb.ProductionMgr.Entities/Entity/PrdMo.cs b/ProductionMgr/Tnb.ProductionMgr.Entities/Entity/PrdMo.cs
index 84ce245b..26fd6543 100644
--- a/ProductionMgr/Tnb.ProductionMgr.Entities/Entity/PrdMo.cs
+++ b/ProductionMgr/Tnb.ProductionMgr.Entities/Entity/PrdMo.cs
@@ -64,28 +64,28 @@ namespace Tnb.ProductionMgr.Entities
/// Default:
/// Nullable:True
///
- public decimal? plan_qty {get;set;}
+ public int? plan_qty {get;set;}
///
/// Desc:已投入数量
/// Default:
/// Nullable:True
///
- public decimal? input_qty {get;set;}
+ public int? input_qty {get;set;}
///
/// Desc:已完工数量
/// Default:
/// Nullable:True
///
- public decimal? complete_qty {get;set;}
+ public int? complete_qty {get;set;}
///
/// Desc:报废数量
/// Default:
/// Nullable:True
///
- public decimal? scrap_qty {get;set;}
+ public int? scrap_qty {get;set;}
///
/// Desc:计划开始时间
@@ -155,7 +155,7 @@ namespace Tnb.ProductionMgr.Entities
/// Default:
/// Nullable:True
///
- public decimal? relation_ratio {get;set;}
+ public int? relation_ratio {get;set;}
///
/// Desc:下发人员ID
diff --git a/ProductionMgr/Tnb.ProductionMgr.Entities/Entity/PrdMoTask.cs b/ProductionMgr/Tnb.ProductionMgr.Entities/Entity/PrdMoTask.cs
index ffdb0a18..432953d1 100644
--- a/ProductionMgr/Tnb.ProductionMgr.Entities/Entity/PrdMoTask.cs
+++ b/ProductionMgr/Tnb.ProductionMgr.Entities/Entity/PrdMoTask.cs
@@ -12,234 +12,255 @@ namespace Tnb.ProductionMgr.Entities
[SugarTable("prd_mo_task")]
public partial class PrdMoTask
{
- public PrdMoTask(){
+ public PrdMoTask()
+ {
- }
- ///
- /// Desc:编号
- /// Default:
- /// Nullable:False
- ///
- [SugarColumn(IsPrimaryKey=true)]
- public string id {get;set;} = SnowflakeIdHelper.NextId();
+ }
+ ///
+ /// Desc:编号
+ /// Default:
+ /// Nullable:False
+ ///
+ [SugarColumn(IsPrimaryKey = true)]
+ public string id { get; set; } = SnowflakeIdHelper.NextId();
- ///
- /// Desc:生产任务编号
- /// Default:
- /// Nullable:True
- ///
- public string? mo_task_code {get;set;}
+ ///
+ /// Desc:生产任务编号
+ /// Default:
+ /// Nullable:True
+ ///
+ public string? mo_task_code { get; set; }
- ///
- /// Desc:工单Id
- /// Default:NULL::character varying
- /// Nullable:True
- ///
- public string? mo_id {get;set;}
+ ///
+ /// Desc:工单Id
+ /// Default:NULL::character varying
+ /// Nullable:True
+ ///
+ public string? mo_id { get; set; }
- ///
- /// Desc:物料Id
- /// Default:NULL::character varying
- /// Nullable:True
- ///
- public string? material_id {get;set;}
+ ///
+ /// Desc:物料Id
+ /// Default:NULL::character varying
+ /// Nullable:True
+ ///
+ public string? material_id { get; set; }
- ///
- /// Desc:模具Id
- /// Default:NULL::character varying
- /// Nullable:True
- ///
- public string? mold_id {get;set;}
+ ///
+ /// Desc:模具Id
+ /// Default:NULL::character varying
+ /// Nullable:True
+ ///
+ public string? mold_id { get; set; }
- ///
- /// Desc:设备Id
- /// Default:NULL::character varying
- /// Nullable:True
- ///
- public string? eqp_id {get;set;}
+ ///
+ /// Desc:设备Id
+ /// Default:NULL::character varying
+ /// Nullable:True
+ ///
+ public string? eqp_id { get; set; }
- ///
- /// Desc:产线id
- /// Default:NULL::character varying
- /// Nullable:True
- ///
- public string? workline_id {get;set;}
+ ///
+ /// Desc:产线id
+ /// Default:NULL::character varying
+ /// Nullable:True
+ ///
+ public string? workline_id { get; set; }
- ///
- /// Desc:工位id
- /// Default:
- /// Nullable:True
- ///
- public string? workstation_id {get;set;}
+ ///
+ /// Desc:工位id
+ /// Default:
+ /// Nullable:True
+ ///
+ public string? workstation_id { get; set; }
- ///
- /// Desc:工艺路线id
- /// Default:
- /// Nullable:True
- ///
- public string? workroute_id {get;set;}
+ ///
+ /// Desc:工艺路线id
+ /// Default:
+ /// Nullable:True
+ ///
+ public string? workroute_id { get; set; }
- ///
- /// Desc:生产bom id
- /// Default:
- /// Nullable:True
- ///
- public string? bom_id {get;set;}
+ ///
+ /// Desc:生产bom id
+ /// Default:
+ /// Nullable:True
+ ///
+ public string? bom_id { get; set; }
- ///
- /// Desc:任务单状态
- /// Default:
- /// Nullable:True
- ///
- public string? mo_task_status {get;set;}
+ ///
+ /// Desc:任务单状态
+ /// Default:
+ /// Nullable:True
+ ///
+ public string? mo_task_status { get; set; }
- ///
- /// Desc:计划数量
- /// Default:
- /// Nullable:True
- ///
- public decimal? plan_qty {get;set;}
+ ///
+ /// Desc:计划数量
+ /// Default:
+ /// Nullable:True
+ ///
+ public int? plan_qty { get; set; }
- ///
- /// Desc:已投入数量
- /// Default:
- /// Nullable:True
- ///
- public decimal? input_qty {get;set;}
+ ///
+ /// Desc:已投入数量
+ /// Default:
+ /// Nullable:True
+ ///
+ public int? input_qty { get; set; }
- ///
- /// Desc:已完工数量
- /// Default:
- /// Nullable:True
- ///
- public decimal? complete_qty {get;set;}
+ ///
+ /// Desc:已完工数量
+ /// Default:
+ /// Nullable:True
+ ///
+ public int? complete_qty { get; set; }
- ///
- /// Desc:报废数量
- /// Default:
- /// Nullable:True
- ///
- public decimal? scrap_qty {get;set;}
+ ///
+ /// Desc:报废数量
+ /// Default:
+ /// Nullable:True
+ ///
+ public int? scrap_qty { get; set; }
- ///
- /// Desc:已排产数量
- /// Default:
- /// Nullable:True
- ///
- public decimal? scheduled_qty {get;set;}
+ ///
+ /// Desc:已排产数量
+ /// Default:
+ /// Nullable:True
+ ///
+ public int? scheduled_qty { get; set; }
- ///
- /// Desc:排产类型:1、注塑、挤出2、组装、包装
- /// Default:
- /// Nullable:True
- ///
- public int? schedule_type {get;set;}
+ ///
+ /// Desc:排产类型:1、注塑、挤出2、组装、包装
+ /// Default:
+ /// Nullable:True
+ ///
+ public int? schedule_type { get; set; }
- ///
- /// Desc:计划开始时间
- /// Default:
- /// Nullable:True
- ///
- public DateTime? plan_start_date {get;set;}
+ ///
+ /// Desc:计划开始时间
+ /// Default:
+ /// Nullable:True
+ ///
+ public DateTime? plan_start_date { get; set; }
- ///
- /// Desc:计划结束时间
- /// Default:
- /// Nullable:True
- ///
- public DateTime? plan_end_date {get;set;}
+ ///
+ /// Desc:计划结束时间
+ /// Default:
+ /// Nullable:True
+ ///
+ public DateTime? plan_end_date { get; set; }
- ///
- /// Desc:实际开工日期
- /// Default:
- /// Nullable:True
- ///
- public DateTime? act_start_date {get;set;}
+ ///
+ /// Desc:实际开工日期
+ /// Default:
+ /// Nullable:True
+ ///
+ public DateTime? act_start_date { get; set; }
- ///
- /// Desc:实际完工日期
- /// Default:
- /// Nullable:True
- ///
- public DateTime? act_end_date {get;set;}
+ ///
+ /// Desc:实际完工日期
+ /// Default:
+ /// Nullable:True
+ ///
+ public DateTime? act_end_date { get; set; }
- ///
- /// Desc:创建人
- /// Default:
- /// Nullable:True
- ///
- public string? create_id {get;set;}
+ ///
+ /// Desc:创建人
+ /// Default:
+ /// Nullable:True
+ ///
+ public string? create_id { get; set; }
- ///
- /// Desc:创建时间
- /// Default:
- /// Nullable:True
- ///
- public DateTime? create_time {get;set;}
+ ///
+ /// Desc:创建时间
+ /// Default:
+ /// Nullable:True
+ ///
+ public DateTime? create_time { get; set; }
- ///
- /// Desc:修改人
- /// Default:
- /// Nullable:True
- ///
- public string? modify_id {get;set;}
+ ///
+ /// Desc:修改人
+ /// Default:
+ /// Nullable:True
+ ///
+ public string? modify_id { get; set; }
- ///
- /// Desc:修改时间
- /// Default:
- /// Nullable:True
- ///
- public DateTime? modify_time {get;set;}
+ ///
+ /// Desc:修改时间
+ /// Default:
+ /// Nullable:True
+ ///
+ public DateTime? modify_time { get; set; }
- ///
- /// Desc:扩展字段
- /// Default:
- /// Nullable:True
- ///
- public string? extras {get;set;}
+ ///
+ /// Desc:扩展字段
+ /// Default:
+ /// Nullable:True
+ ///
+ public string? extras { get; set; }
- ///
- /// Desc:生产顺序
- /// Default:
- /// Nullable:True
- ///
- public int? prd_order {get;set;}
+ ///
+ /// Desc:生产顺序
+ /// Default:
+ /// Nullable:True
+ ///
+ public int? prd_order { get; set; }
- ///
- /// Desc:预计开始时间
- /// Default:
- /// Nullable:True
- ///
- public DateTime? estimated_start_date {get;set;}
+ ///
+ /// Desc:预计开始时间
+ /// Default:
+ /// Nullable:True
+ ///
+ public DateTime? estimated_start_date { get; set; }
- ///
- /// Desc:预计结束时间
- /// Default:
- /// Nullable:True
- ///
- public DateTime? estimated_end_date {get;set;}
+ ///
+ /// Desc:预计结束时间
+ /// Default:
+ /// Nullable:True
+ ///
+ public DateTime? estimated_end_date { get; set; }
- ///
- /// Desc:同组标识
- /// Default:
- /// Nullable:True
- ///
- public int? group_flag {get;set;}
+ ///
+ /// Desc:同组标识
+ /// Default:
+ /// Nullable:True
+ ///
+ public int? group_flag { get; set; }
- ///
- /// Desc:父任务Id
- /// Default:
- /// Nullable:True
- ///
- public string? parent_id {get;set;}
+ ///
+ /// Desc:父任务Id
+ /// Default:
+ /// Nullable:True
+ ///
+ public string? parent_id { get; set; }
- ///
- /// Desc:工序任务量
- /// Default:
- /// Nullable:True
- ///
- public int? process_task_qty {get;set;}
+ ///
+ /// Desc:工序任务量
+ /// Default:
+ /// Nullable:True
+ ///
+ public int? process_task_qty { get; set; }
+ ///
+ /// 设备类型编码
+ ///
+ [SugarColumn(IsIgnore = true)]
+ public string eqp_type_code { get; set; }
+ ///
+ /// 模具编号
+ ///
+ [SugarColumn(IsIgnore = true)]
+ public string mold_code { get; set; }
+ ///
+ /// 模具名称
+ ///
+ [SugarColumn(IsIgnore = true)]
+ public string mold_name { get; set; }
+ ///
+ /// 模具型腔数
+ ///
+ [SugarColumn(IsIgnore = true)]
+ public int mold_cavity_qty { get; set; }
}
}
diff --git a/ProductionMgr/Tnb.ProductionMgr.Entities/Entity/PrdOnwipTool.cs b/ProductionMgr/Tnb.ProductionMgr.Entities/Entity/PrdOnwipTool.cs
index 9bc76bb3..cba25ca5 100644
--- a/ProductionMgr/Tnb.ProductionMgr.Entities/Entity/PrdOnwipTool.cs
+++ b/ProductionMgr/Tnb.ProductionMgr.Entities/Entity/PrdOnwipTool.cs
@@ -22,7 +22,7 @@ namespace Tnb.ProductionMgr.Entities
/// Nullable:False
///
[SugarColumn(IsPrimaryKey=true)]
- public char id {get;set;} = SnowflakeIdHelper.NextId();
+ public string id {get;set;} = SnowflakeIdHelper.NextId();
///
/// Desc:TODO
diff --git a/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs b/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs
index d2d17fbf..3d3b7bb4 100644
--- a/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs
+++ b/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs
@@ -402,7 +402,7 @@ namespace Tnb.ProductionMgr
})
.Mapper(it =>
{
- it.mo_task_status = dic.ContainsKey(it.mo_task_status) ? dic[it.mo_task_status].ToString() : "";
+ it.mo_task_status = dic.ContainsKey(it.mo_task_status) ? dic[it.mo_task_status].ToString()! : "";
})
.ToListAsync();
}
@@ -434,7 +434,7 @@ namespace Tnb.ProductionMgr
scheduled_qty = a.scheduled_qty,
plan_qty = d.plan_qty
})
- .Mapper(it => it.mo_task_status = dic.ContainsKey(it.mo_task_status) ? dic[it.mo_task_status].ToString() : "")
+ .Mapper(it => it.mo_task_status = dic.ContainsKey(it.mo_task_status) ? dic[it.mo_task_status].ToString()! : "")
.ToListAsync();
return result;
}
@@ -465,7 +465,7 @@ namespace Tnb.ProductionMgr
plan_qty = d.plan_qty,
process_task_qty = a.process_task_qty,
})
- .Mapper(it => it.mo_task_status = dic.ContainsKey(it.mo_task_status) ? dic[it.mo_task_status].ToString() : "")
+ .Mapper(it => it.mo_task_status = dic.ContainsKey(it.mo_task_status) ? dic[it.mo_task_status].ToString()! : "")
.ToListAsync();
return result;
}
@@ -699,7 +699,7 @@ namespace Tnb.ProductionMgr
var mo = await _db.Queryable().FirstAsync(it => it.id == input.mo_id);
var moCode = mo?.mo_code;
var taskCode = await _db.Queryable().Where(it => !string.IsNullOrEmpty(it.mo_task_code) && it.mo_task_code.Contains(moCode)).OrderByDescending(it => it.mo_task_code).Select(it => it.mo_task_code).FirstAsync();
- if (taskCode.IsNullOrEmpty())
+ if (taskCode!.IsNullOrEmpty())
{
moTask.mo_task_code = $"{moCode}-01";
}
@@ -727,7 +727,7 @@ namespace Tnb.ProductionMgr
taskLog.create_id = _userManager.UserId;
taskLog.create_time = DateTime.Now;
taskLog.mo_task_id = moTask.id;
- taskLog.mo_task_code = moTask.mo_task_code;
+ taskLog.mo_task_code = moTask.mo_task_code!;
row = await _db.Insertable(taskLog).ExecuteCommandAsync();
//根据工单号获取当前工单包含的已排产数
var schedQty = _db.Queryable().Where(it => it.mo_id == input.mo_id)?.Sum(d => d.scheduled_qty);
@@ -781,7 +781,7 @@ namespace Tnb.ProductionMgr
subMoTasks.Add(subMoTask);
}
//根据生产任务编号生成子任务编号
- if (moTask.mo_task_code.IsNotEmptyOrNull())
+ if (moTask.mo_task_code!.IsNotEmptyOrNull())
{
for (int i = 1; i <= subMoTasks.Count; i++)
{
@@ -884,19 +884,19 @@ namespace Tnb.ProductionMgr
taskLog.id = SnowflakeIdHelper.NextId();
if (taskItem != null)
{
- if (taskItem.mo_id.IsNotEmptyOrNull())
+ if (taskItem.mo_id!.IsNotEmptyOrNull())
{
taskLog.mo_code = (await db.Queryable().FirstAsync(it => it.id == taskItem.mo_id))?.mo_code!;
}
- if (taskItem.eqp_id.IsNotEmptyOrNull())
+ if (taskItem.eqp_id!.IsNotEmptyOrNull())
{
taskLog.eqp_code = (await db.Queryable().FirstAsync(it => it.id == taskItem.eqp_id))?.code!;
}
- if (taskItem.mold_id.IsNotEmptyOrNull())
+ if (taskItem.mold_id!.IsNotEmptyOrNull())
{
taskLog.mold_code = (await db.Queryable().FirstAsync(it => it.id == taskItem.mold_id))?.mold_code!;
}
- if (taskItem.material_id.IsNotEmptyOrNull())
+ if (taskItem.material_id!.IsNotEmptyOrNull())
{
var material = await db.Queryable().FirstAsync(it => it.id == taskItem.material_id);
taskLog.item_code = material?.code!;