diff --git a/Tnb.BasicData.Entitys/Mapper/Mapper.cs b/Tnb.BasicData.Entitys/Mapper/Mapper.cs
index 3c664fd1..62a2b39b 100644
--- a/Tnb.BasicData.Entitys/Mapper/Mapper.cs
+++ b/Tnb.BasicData.Entitys/Mapper/Mapper.cs
@@ -1,5 +1,4 @@
-using JNPF.Systems.Entitys.System;
-using Mapster;
+using Mapster;
using SqlSugar;
using Tnb.BasicData.Entitys.Dto.ProcessManage;
using Tnb.BasicData.Entitys.Entity;
diff --git a/Tnb.ProductionPlanMgr.Entitys/Class1.cs b/Tnb.ProductionPlanMgr.Entitys/Class1.cs
deleted file mode 100644
index d6367141..00000000
--- a/Tnb.ProductionPlanMgr.Entitys/Class1.cs
+++ /dev/null
@@ -1,7 +0,0 @@
-namespace Tnb.ProductionPlanMgr.Entitys
-{
- public class Class1
- {
-
- }
-}
\ No newline at end of file
diff --git a/Tnb.ProductionPlanMgr.Entitys/Dto/WorkOrder/ProductionSchedulingCrInput.cs b/Tnb.ProductionPlanMgr.Entitys/Dto/WorkOrder/ProductionSchedulingCrInput.cs
new file mode 100644
index 00000000..ac852eb4
--- /dev/null
+++ b/Tnb.ProductionPlanMgr.Entitys/Dto/WorkOrder/ProductionSchedulingCrInput.cs
@@ -0,0 +1,68 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Tnb.ProductionMgr.Entitys.Dto.WorkOrder
+{
+ ///
+ /// 生产工单排产输入参数
+ ///
+ public class ProductionSchedulingCrInput
+ {
+ ///
+ /// 生产任务主键Id
+ ///
+ public string? Id { get; set; }
+ ///
+ /// 工单类型 1、注塑/挤出 2、组装/包装
+ ///
+ public int MoType { get; set; }
+ ///
+ /// 工单Id
+ ///
+ public int MoId { get; set; }
+ ///
+ /// 产品编号
+ ///
+ public string ItemId { get; set; }
+ ///
+ /// 产品名称
+ ///
+ public string ItemName { get; set; }
+
+ #region 注塑工单
+ ///
+ /// 模具Id
+ ///
+ public string MoldId { get; set; }
+ ///
+ /// 模具名称
+ ///
+ public string MoldName { get; set; }
+ ///
+ /// 设备Id
+ ///
+ public string EqpId { get; set; }
+ ///
+ /// 设备名称
+ ///
+ public string EqpName { get; set; }
+ #endregion
+
+ #region 组装包装工单
+ ///
+ /// 产线编号
+ ///
+ public string LineId { get; set; }
+ ///
+ /// 产线名称
+ ///
+ public string LineName { get; set; }
+ #endregion
+
+
+ }
+
+}
diff --git a/Tnb.ProductionPlanMgr.Entitys/Entity/MoldsEntity.cs b/Tnb.ProductionPlanMgr.Entitys/Entity/MoldsEntity.cs
new file mode 100644
index 00000000..409b8b0c
--- /dev/null
+++ b/Tnb.ProductionPlanMgr.Entitys/Entity/MoldsEntity.cs
@@ -0,0 +1,142 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using SqlSugar;
+using Tnb.Common.Contracts;
+
+namespace Tnb.ProductionMgr.Entitys.Entity
+{
+ ///
+ /// 模具信息表
+ ///
+ [SugarTable("tool_molds")]
+ public class MoldsEntity : BaseEntity
+ {
+ /////
+ ///// 主键
+ /////
+ // [SugarColumn(ColumnName="id" ,IsPrimaryKey = true )]
+ // public string Id { get; set; }
+ ///
+ /// 磨具编号
+ /// 默认值: NULL::character varying
+ ///
+ [SugarColumn(ColumnName = "mold_code")]
+ public string MoldCode { get; set; }
+ ///
+ /// 磨具名称
+ /// 默认值: NULL::character varying
+ ///
+ [SugarColumn(ColumnName = "mold_name")]
+ public string MoldName { get; set; }
+ ///
+ /// 产品代码
+ /// 默认值: NULL::character varying
+ ///
+ [SugarColumn(ColumnName = "item_id")]
+ public string ItemId { get; set; }
+ ///
+ /// 设备Id
+ /// 默认值: NULL::character varying
+ ///
+ [SugarColumn(ColumnName = "eqp_id")]
+ public string EqpId { get; set; }
+ ///
+ /// 设备代码
+ /// 默认值: NULL::character varying
+ ///
+ [SugarColumn(ColumnName = "eqp_code")]
+ public string EqpCode { get; set; }
+ ///
+ /// 生产模数
+ ///
+ [SugarColumn(ColumnName = "production_modulus")]
+ public int? ProductionModulus { get; set; }
+ ///
+ /// 保养模次
+ ///
+ [SugarColumn(ColumnName = "maintain_num")]
+ public int? MaintainNum { get; set; }
+ ///
+ /// 磨具使用状态
+ /// 默认值: NULL::character varying
+ ///
+ [SugarColumn(ColumnName = "mold_status")]
+ public string MoldStatus { get; set; }
+ ///
+ /// 日定额
+ ///
+ [SugarColumn(ColumnName = "daily_rate")]
+ public decimal? DailyRate { get; set; }
+ ///
+ /// 工时定额(H/PCS)
+ ///
+ [SugarColumn(ColumnName = "hour_norm")]
+ public decimal? HourNorm { get; set; }
+ ///
+ /// 成长周期
+ ///
+ [SugarColumn(ColumnName = "growth_cycle")]
+ public int? GrowthCycle { get; set; }
+ ///
+ /// 型腔数
+ ///
+ [SugarColumn(ColumnName = "cavity_num")]
+ public int? CavityNum { get; set; }
+ ///
+ /// 模具寿命
+ ///
+ [SugarColumn(ColumnName = "mold_life")]
+ public int? MoldLife { get; set; }
+ ///
+ /// 模具剩余寿命
+ /// 默认值: NULL::character varying
+ ///
+ [SugarColumn(ColumnName = "mold_remaining_life")]
+ public string MoldRemainingLife { get; set; }
+ ///
+ /// 库房编号
+ /// 默认值: NULL::character varying
+ ///
+ [SugarColumn(ColumnName = "warehosue_id")]
+ public string WarehosueId { get; set; }
+ ///
+ /// 库位编号
+ /// 默认值: NULL::character varying
+ ///
+ [SugarColumn(ColumnName = "location_id")]
+ public string LocationId { get; set; }
+ ///
+ /// 备注
+ ///
+ [SugarColumn(ColumnName = "remark")]
+ public string Remark { get; set; }
+ ///
+ /// 创建用户
+ /// 默认值: NULL::character varying
+ ///
+ [SugarColumn(ColumnName = "create_id")]
+ public string CreateId { get; set; }
+ ///
+ /// 创建时间
+ ///
+ [SugarColumn(ColumnName = "create_time")]
+ public DateTime? CreateTime { get; set; }
+ ///
+ /// 修改用户
+ /// 默认值: NULL::character varying
+ ///
+ [SugarColumn(ColumnName = "modify_id")]
+ public string ModifyId { get; set; }
+ ///
+ /// 修改时间
+ ///
+ [SugarColumn(ColumnName = "modify_time")]
+ public DateTime? ModifyTime { get; set; }
+ ///
+ /// 扩展字段
+ ///
+ [SugarColumn(ColumnName = "extras")]
+ public string Extras { get; set; }
+ }
+}
diff --git a/Tnb.ProductionPlanMgr.Entitys/Entity/PrdMoEntity.cs b/Tnb.ProductionPlanMgr.Entitys/Entity/PrdMoEntity.cs
index e4f2a0a6..2fc1ef74 100644
--- a/Tnb.ProductionPlanMgr.Entitys/Entity/PrdMoEntity.cs
+++ b/Tnb.ProductionPlanMgr.Entitys/Entity/PrdMoEntity.cs
@@ -4,7 +4,7 @@ using System.Linq;
using SqlSugar;
using Tnb.Common.Contracts;
-namespace Tnb.ProductionPlanMgr.Entitys.Entity
+namespace Tnb.ProductionMgr.Entitys.Entity
{
///
/// MES生产工单
diff --git a/Tnb.ProductionPlanMgr.Entitys/Entity/PrdTask.cs b/Tnb.ProductionPlanMgr.Entitys/Entity/PrdTask.cs
new file mode 100644
index 00000000..0fea1d8f
--- /dev/null
+++ b/Tnb.ProductionPlanMgr.Entitys/Entity/PrdTask.cs
@@ -0,0 +1,203 @@
+using System;
+using System.Linq;
+using System.Text;
+using SqlSugar;
+
+namespace Tnb.ProductionMgr.Entitys.Entity
+{
+ ///
+ ///生产任务信息
+ ///
+ [SugarTable("prd_task")]
+ public partial class PrdTask
+ {
+ public PrdTask(){
+
+
+ }
+ ///
+ /// Desc:主键
+ /// Default:
+ /// Nullable:False
+ ///
+ [SugarColumn(IsPrimaryKey=true,ColumnName="id")]
+ public string Id {get;set;}
+
+ ///
+ /// Desc:工单类型 1、注塑/挤出工单 2、组装/包装工单
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="mo_type")]
+ public int? MoType {get;set;}
+
+ ///
+ /// Desc:计划开始时间
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="plan_start_date")]
+ public DateTime? PlanStartDate {get;set;}
+
+ ///
+ /// Desc:计划结束时间
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="plan_end_date")]
+ public DateTime? PlanEndDate {get;set;}
+
+ ///
+ /// Desc:预计开始时间
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="estimated_start_date")]
+ public DateTime? EstimatedStartDate {get;set;}
+
+ ///
+ /// Desc:预计结束时间
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="estimated_end_date")]
+ public DateTime? EstimatedEndDate {get;set;}
+
+ ///
+ /// Desc:实际开工时间
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="start_date")]
+ public DateTime? StartDate {get;set;}
+
+ ///
+ /// Desc:实际完工时间
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="end_date")]
+ public DateTime? EndDate {get;set;}
+
+ ///
+ /// Desc:创建时间
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="create_time")]
+ public DateTime? CreateTime {get;set;}
+
+ ///
+ /// Desc:修改时间
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="modify_time")]
+ public DateTime? ModifyTime {get;set;}
+
+ ///
+ /// Desc:扩展字段
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="extras")]
+ public string Extras {get;set;}
+
+ ///
+ /// Desc:工单Id
+ /// Default:NULL::character varying
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="mo_id")]
+ public string MoId {get;set;}
+
+ ///
+ /// Desc:工单代码
+ /// Default:NULL::character varying
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="mo_code")]
+ public string MoCode {get;set;}
+
+ ///
+ /// Desc:模具Id
+ /// Default:NULL::character varying
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="mold_id")]
+ public string MoldId {get;set;}
+
+ ///
+ /// Desc:模具名称
+ /// Default:NULL::character varying
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="mold_name")]
+ public string MoldName {get;set;}
+
+ ///
+ /// Desc:设备Id
+ /// Default:NULL::character varying
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="eqp_id")]
+ public string EqpId {get;set;}
+
+ ///
+ /// Desc:设备名称
+ /// Default:NULL::character varying
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="eqp_name")]
+ public string EqpName {get;set;}
+
+ ///
+ /// Desc:产线编号
+ /// Default:NULL::character varying
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="line_id")]
+ public string LineId {get;set;}
+
+ ///
+ /// Desc:产线名称
+ /// Default:NULL::character varying
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="line_name")]
+ public string LineName {get;set;}
+
+ ///
+ /// Desc:产品Id
+ /// Default:NULL::character varying
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="item_id")]
+ public string ItemId {get;set;}
+
+ ///
+ /// Desc:产品名称
+ /// Default:NULL::character varying
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="item_name")]
+ public string ItemName {get;set;}
+
+ ///
+ /// Desc:创建用户
+ /// Default:NULL::character varying
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="create_id")]
+ public string CreateId {get;set;}
+
+ ///
+ /// Desc:修改用户
+ /// Default:NULL::character varying
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="modify_id")]
+ public string ModifyId {get;set;}
+
+ }
+}
diff --git a/Tnb.ProductionPlanMgr.Entitys/Mapper/Mapper.cs b/Tnb.ProductionPlanMgr.Entitys/Mapper/Mapper.cs
new file mode 100644
index 00000000..74927245
--- /dev/null
+++ b/Tnb.ProductionPlanMgr.Entitys/Mapper/Mapper.cs
@@ -0,0 +1,14 @@
+using Mapster;
+using Tnb.ProductionMgr.Entitys.Dto.WorkOrder;
+using Tnb.ProductionMgr.Entitys.Entity;
+
+namespace Tnb.ProductionMgr.Entitys.Mapper
+{
+ public class Mapper : IRegister
+ {
+ public void Register(TypeAdapterConfig config)
+ {
+ config.ForType();
+ }
+ }
+}
\ No newline at end of file
diff --git a/Tnb.ProductionPlanMgr.Entitys/Tnb.ProductionPlanMgr.Entitys.csproj b/Tnb.ProductionPlanMgr.Entitys/Tnb.ProductionMgr.Entitys.csproj
similarity index 100%
rename from Tnb.ProductionPlanMgr.Entitys/Tnb.ProductionPlanMgr.Entitys.csproj
rename to Tnb.ProductionPlanMgr.Entitys/Tnb.ProductionMgr.Entitys.csproj
diff --git a/Tnb.ProductionPlanMgr.Interfaces/IWorkOrderCreateService.cs b/Tnb.ProductionPlanMgr.Interfaces/IPrdMoService.cs
similarity index 84%
rename from Tnb.ProductionPlanMgr.Interfaces/IWorkOrderCreateService.cs
rename to Tnb.ProductionPlanMgr.Interfaces/IPrdMoService.cs
index 9570bb1f..097de8cb 100644
--- a/Tnb.ProductionPlanMgr.Interfaces/IWorkOrderCreateService.cs
+++ b/Tnb.ProductionPlanMgr.Interfaces/IPrdMoService.cs
@@ -5,7 +5,7 @@ namespace Tnb.ProductionPlanMgr.Interfaces
///
/// 工单生成
///
- public interface IWorkOrderCreateService
+ public interface IPrdMoService
{
Task WorkOrderIssue(WorkOrderIssueCrInput input);
}
diff --git a/Tnb.ProductionPlanMgr.Interfaces/Tnb.ProductionPlanMgr.Interfaces.csproj b/Tnb.ProductionPlanMgr.Interfaces/Tnb.ProductionMgr.Interfaces.csproj
similarity index 91%
rename from Tnb.ProductionPlanMgr.Interfaces/Tnb.ProductionPlanMgr.Interfaces.csproj
rename to Tnb.ProductionPlanMgr.Interfaces/Tnb.ProductionMgr.Interfaces.csproj
index 989d9ab5..378ec7c5 100644
--- a/Tnb.ProductionPlanMgr.Interfaces/Tnb.ProductionPlanMgr.Interfaces.csproj
+++ b/Tnb.ProductionPlanMgr.Interfaces/Tnb.ProductionMgr.Interfaces.csproj
@@ -9,7 +9,7 @@
-
+
diff --git a/Tnb.ProductionPlanMgr/WorkOrderCreateService.cs b/Tnb.ProductionPlanMgr/PrdMoService.cs
similarity index 59%
rename from Tnb.ProductionPlanMgr/WorkOrderCreateService.cs
rename to Tnb.ProductionPlanMgr/PrdMoService.cs
index 19654e3d..31807629 100644
--- a/Tnb.ProductionPlanMgr/WorkOrderCreateService.cs
+++ b/Tnb.ProductionPlanMgr/PrdMoService.cs
@@ -1,13 +1,17 @@
using JNPF.Common.Core.Manager;
+using JNPF.Common.Extension;
+using JNPF.Common.Security;
using JNPF.DependencyInjection;
using JNPF.DynamicApiController;
using JNPF.Systems.Entitys.System;
+using Mapster;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using NPOI.OpenXmlFormats.Shared;
using SqlSugar;
+using Tnb.ProductionMgr.Entitys.Dto.WorkOrder;
+using Tnb.ProductionMgr.Entitys.Entity;
using Tnb.ProductionPlanMgr.Entitys.Dto.WorkOrder;
-using Tnb.ProductionPlanMgr.Entitys.Entity;
using Tnb.ProductionPlanMgr.Interfaces;
namespace Tnb.ProductionPlanMgr
@@ -15,13 +19,13 @@ namespace Tnb.ProductionPlanMgr
///
/// 生产计划管理
///
- [ApiDescriptionSettings(Tag = "ProductPlanMgr", Name = "WorkOrderCreate", Order = 700)]
+ [ApiDescriptionSettings(Tag = "ProductionMgr", Name = "WorkOrderCreate", Order = 700)]
[Route("api/production/[controller]")]
- public class WorkOrderCreateService :IWorkOrderCreateService,IDynamicApiController, ITransient
+ public class PrdMoService : IPrdMoService, IDynamicApiController, ITransient
{
private readonly ISqlSugarRepository _repository;
private readonly IDataBaseManager _dataBaseManager;
- public WorkOrderCreateService(ISqlSugarRepository repository, IDataBaseManager dataBaseManager)
+ public PrdMoService(ISqlSugarRepository repository, IDataBaseManager dataBaseManager)
{
_repository = repository;
_dataBaseManager = dataBaseManager;
@@ -38,13 +42,36 @@ namespace Tnb.ProductionPlanMgr
{
throw new ArgumentNullException(nameof(input));
}
- var link = await _repository.AsSugarClient().Queryable().FirstAsync(x => x.FullName == "tnb_mes");
- var db = _dataBaseManager.ChangeDataBase(link);
+ var db = await GetDbContext();
var row = await db.Updateable()
.SetColumns(it => new PrdMoEntity { MoStatus = "25019232867093" })
.Where(it => input.WorkOrderIds.Contains(it.Id))
.ExecuteCommandAsync();
return (row > 0);
}
+ ///
+ /// 生产工单-生产排产
+ ///
+ ///
+ ///
+ [HttpPost("scheduling")]
+ public async Task ProductionScheduling(ProductionSchedulingCrInput input)
+ {
+ var entity = input.Adapt();
+ entity.Id = input.Id ?? SnowflakeIdHelper.NextId();
+ var db = await GetDbContext();
+ var row = await db.Storageable(entity).ExecuteCommandAsync();
+ return (row > 0);
+ }
+
+ private async Task GetDbContext()
+ {
+ var link = await _repository.AsSugarClient().Queryable().FirstAsync(x => x.FullName == "tnb_mes");
+ var db = _dataBaseManager.ChangeDataBase(link);
+ return db;
+ }
}
+
+
+
}
\ No newline at end of file
diff --git a/Tnb.ProductionPlanMgr/Tnb.ProductionPlanMgr.csproj b/Tnb.ProductionPlanMgr/Tnb.ProductionMgr.csproj
similarity index 87%
rename from Tnb.ProductionPlanMgr/Tnb.ProductionPlanMgr.csproj
rename to Tnb.ProductionPlanMgr/Tnb.ProductionMgr.csproj
index 9e1129e2..60920d19 100644
--- a/Tnb.ProductionPlanMgr/Tnb.ProductionPlanMgr.csproj
+++ b/Tnb.ProductionPlanMgr/Tnb.ProductionMgr.csproj
@@ -11,8 +11,8 @@
-
-
+
+
diff --git a/Tnb.ProductionPlanMgr/WorkOrderSchedulingService.cs b/Tnb.ProductionPlanMgr/WorkOrderSchedulingService.cs
index dfba6aad..1e4905c8 100644
--- a/Tnb.ProductionPlanMgr/WorkOrderSchedulingService.cs
+++ b/Tnb.ProductionPlanMgr/WorkOrderSchedulingService.cs
@@ -4,20 +4,80 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Aspose.Cells;
+using DingTalk.Api.Request;
+using JNPF.Common.Core.Manager;
+using JNPF.Common.Security;
using JNPF.DependencyInjection;
using JNPF.DynamicApiController;
+using JNPF.Systems.Entitys.System;
+using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
+using NPOI.SS.UserModel;
+using SqlSugar;
+using Tnb.ProductionMgr.Entitys.Entity;
namespace Tnb.ProductionPlanMgr
{
- [ApiDescriptionSettings(Tag = "ProductPlanMgr", Name = "WorkOrderScheduling", Order = 700)]
+ ///
+ /// 生产排产
+ ///
+ [ApiDescriptionSettings(Tag = "ProductMgr", Name = "WorkOrderScheduling", Order = 700)]
[Route("api/production/[controller]")]
- public class WorkOrderSchedulingService: IDynamicApiController, ITransient
+ public class WorkOrderSchedulingService : IDynamicApiController, ITransient
{
-
- public WorkOrderSchedulingService()
+ private readonly IDataBaseManager _dataBaseManager;
+ private readonly ISqlSugarRepository _repository;
+ public WorkOrderSchedulingService(IDataBaseManager dataBaseManager, ISqlSugarRepository repository)
{
-
+ _dataBaseManager = dataBaseManager;
+ _repository = repository;
+ }
+
+ ///
+ /// 测试数据导入
+ ///
+ ///
+ [HttpPost("data")]
+ [AllowAnonymous]
+ public async Task ImportMoldsData()
+ {
+ List<(string pId, string eqpId)> multi = new()
+ {
+ ("25546268026149","25530823999765"),
+ ("25546256076325","25530834099477"),
+ };
+ List list = new();
+ var index = 1;
+ foreach (var item in multi)
+ {
+ MoldsEntity entity = new();
+ entity.Id = SnowflakeIdHelper.NextId();
+ entity.MoldCode = $"m00{index}";
+ entity.MoldName = "磨具" + index;
+ entity.ItemId = item.pId;
+ entity.EqpId = item.eqpId;
+ list.Add(entity);
+ index++;
+ }
+ var link = await _repository.GetFirstAsync(x => x.FullName == "tnb_eqp");
+ var db = _dataBaseManager.ChangeDataBase(link);
+ var row = await db.Insertable(list).ExecuteCommandAsync();
+ if (row > 0)
+ {
+ foreach (var item in list)
+ {
+ var dic = new Dictionary
+ {
+ {"id",item.EqpId },
+ { "mold_id", item.Id}
+ };
+ var row2 = await db.Updateable(dic).AS("eqp_equipment")
+ .WhereColumns("id").
+ ExecuteCommandAsync();
+ }
+ }
+
+ await Task.CompletedTask;
}
}
}
diff --git a/Tnb.ProductionPlanMgr/internals/BaseService.cs b/Tnb.ProductionPlanMgr/internals/BaseService.cs
index 05f0b7f7..f3e6f073 100644
--- a/Tnb.ProductionPlanMgr/internals/BaseService.cs
+++ b/Tnb.ProductionPlanMgr/internals/BaseService.cs
@@ -9,17 +9,13 @@ using JNPF.DependencyInjection;
using JNPF.Systems.Entitys.System;
using SqlSugar;
-namespace Tnb.ProductionPlanMgr.internals
+namespace Tnb.ProductionPlanMgr
{
public class BaseService : ITransient
{
private readonly Dictionary _dbContextDic = new(StringComparer.OrdinalIgnoreCase);
static BaseService()
{
- var repo = App.GetService>();
- //var = await repo.GetListAsync();
- var dbMgr = App.GetService();
-
}
diff --git a/Tnb.Server.sln b/Tnb.Server.sln
index ec7d3b6e..4510444c 100644
--- a/Tnb.Server.sln
+++ b/Tnb.Server.sln
@@ -99,11 +99,11 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tnb.BasicData", "Tnb.BasicD
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "10-ProductionPlanMgr", "10-ProductionPlanMgr", "{ABE58B5E-610B-4159-BFF0-8B04BF700B3C}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tnb.ProductionPlanMgr", "Tnb.ProductionPlanMgr\Tnb.ProductionPlanMgr.csproj", "{1E8D442B-D136-4D1A-A265-16E2DE19D938}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tnb.ProductionMgr", "Tnb.ProductionPlanMgr\Tnb.ProductionMgr.csproj", "{1E8D442B-D136-4D1A-A265-16E2DE19D938}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tnb.ProductionPlanMgr.Entitys", "Tnb.ProductionPlanMgr.Entitys\Tnb.ProductionPlanMgr.Entitys.csproj", "{CE77DCAE-5210-4876-8C52-443823FF886F}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tnb.ProductionMgr.Entitys", "Tnb.ProductionPlanMgr.Entitys\Tnb.ProductionMgr.Entitys.csproj", "{CE77DCAE-5210-4876-8C52-443823FF886F}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tnb.ProductionPlanMgr.Interfaces", "Tnb.ProductionPlanMgr.Interfaces\Tnb.ProductionPlanMgr.Interfaces.csproj", "{BCC64BB9-B22C-475E-BF6C-BF22B644C359}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tnb.ProductionMgr.Interfaces", "Tnb.ProductionPlanMgr.Interfaces\Tnb.ProductionMgr.Interfaces.csproj", "{BCC64BB9-B22C-475E-BF6C-BF22B644C359}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
diff --git a/apihost/Tnb.API.Entry/Tnb.API.Entry.csproj b/apihost/Tnb.API.Entry/Tnb.API.Entry.csproj
index 13267fd0..f9101102 100644
--- a/apihost/Tnb.API.Entry/Tnb.API.Entry.csproj
+++ b/apihost/Tnb.API.Entry/Tnb.API.Entry.csproj
@@ -39,7 +39,7 @@
-
+
diff --git a/common/Tnb.Common.Core/Manager/DataBase/DataBaseManager.cs b/common/Tnb.Common.Core/Manager/DataBase/DataBaseManager.cs
index 7ff09329..f6460e7d 100644
--- a/common/Tnb.Common.Core/Manager/DataBase/DataBaseManager.cs
+++ b/common/Tnb.Common.Core/Manager/DataBase/DataBaseManager.cs
@@ -316,7 +316,7 @@ public class DataBaseManager : IDataBaseManager, ITransient
if (pageInput.superQueryJson.IsNotEmptyOrNull()) superQueryJson = _sqlSugarClient.Utilities.JsonToConditionalModels(pageInput.superQueryJson);
// var sql = _sqlSugarClient.SqlQueryable
public long? sortCode { get; set; }
+ ///
+ /// 组织类型
+ ///
+ public string category { get; set; }
}
\ No newline at end of file
diff --git a/system/Tnb.Systems.Entitys/Dto/Permission/Department/DepartmentInfoOutput.cs b/system/Tnb.Systems.Entitys/Dto/Permission/Department/DepartmentInfoOutput.cs
index dbf215df..286425bd 100644
--- a/system/Tnb.Systems.Entitys/Dto/Permission/Department/DepartmentInfoOutput.cs
+++ b/system/Tnb.Systems.Entitys/Dto/Permission/Department/DepartmentInfoOutput.cs
@@ -52,4 +52,9 @@ public class DepartmentInfoOutput
/// 所属组织 组织树.
///
public List organizeIdTree { get; set; }
+ ///
+ /// 机构类型
+ /// added by ly on 20230420
+ ///
+ public string category { get; set; }
}
\ No newline at end of file
diff --git a/system/Tnb.Systems.Entitys/Mapper/PermissionMapper.cs b/system/Tnb.Systems.Entitys/Mapper/PermissionMapper.cs
index c615a0a3..2cf51800 100644
--- a/system/Tnb.Systems.Entitys/Mapper/PermissionMapper.cs
+++ b/system/Tnb.Systems.Entitys/Mapper/PermissionMapper.cs
@@ -36,8 +36,12 @@ public class PermissionMapper : IRegister
config.ForType()
.Ignore(dest => dest.UserId);
config.ForType()
- .Ignore(dest => dest.organizeIdTree);
+ .Ignore(dest => dest.organizeIdTree)
+ .NameMatchingStrategy(NameMatchingStrategy.IgnoreCase); //modified by ly on 20230420
config.ForType()
.Ignore(dest => dest.organizeIdTree);
+ //modified by ly on 20230420
+ config.ForType()
+ .NameMatchingStrategy(NameMatchingStrategy.IgnoreCase); //忽略字段大小写
}
}
\ No newline at end of file
diff --git a/system/Tnb.Systems/Common/TestService.cs b/system/Tnb.Systems/Common/TestService.cs
index 98576c4b..23d62315 100644
--- a/system/Tnb.Systems/Common/TestService.cs
+++ b/system/Tnb.Systems/Common/TestService.cs
@@ -70,6 +70,13 @@ public class TestService : IDynamicApiController, ITransient
}
}
+
+ public async Task ImportMoldData()
+ {
+
+ }
+
+
public void xx(UserEntity user)
{
user.Account = "2312321";